Hi @srini,
With suggested patches, we are able to enable the full duplex support.
below command working fine every time.
arecord -D plughw:0,0 -c 2 -f S16_LE -r 48000 | tee hendset.wav | aplay -D plughw:0,0
But using below Gstreamer command pipeline not properly free by CTRL+C and audio not working every time
gst-launch-1.0 alsasrc device=plughw:0,0 ! capsfilter caps=āaudio/x-raw, channels=2, rate=48000, format=S16LE, layout=interleavedā ! alsasink device=plughw:0,0
gst-launch-1.0 -v filesrc location= /usr/share/sounds/alsa/front_Center.wav ! capsfilter caps=āaudio/x-raw, channels=1, rate=48000, format=S16LE, layout=interleavedā ! alsasink device=plughw:0,0
Our observation:
After Rebooting or first time run command it working fine.
Logs:
root@linaro-alip:~# gst-launch-1.0 -v filesrc location= /usr/share/sounds/alsa/front_Center.wav ! capsfilter caps=āaudio/x-raw, channels=1, rate=48000, format=S16LE, layout=interleavedā ! alsasink device=plughw:0,0
Setting pipeline to PAUSED ā¦
Pipeline is PREROLLING ā¦
/GstPipeline:pipeline0/GstCapsfilter:capsfilter0.GstPad:src: caps = audio/x-raw, channels=(int)1, rate=(int)48000, format=(string)S16LE, layout=(string)interleaved
Redistribute latencyā¦
/GstPipeline:pipeline0/GstAlsaSink:alsasink0.GstPad:sink: caps = audio/x-raw, channels=(int)1, rate=(int)48000, format=(string)S16LE, layout=(string)interleaved
Pipeline is PREROLLED ā¦
Setting pipeline to PLAYING ā¦
New clock: GstAudioSinkClock
Got EOS from element āpipeline0ā.
Execution ended after 0:00:01.083614843
Setting pipeline to PAUSED ā¦
Setting pipeline to READY ā¦
Setting pipeline to NULL ā¦
freeing pipeline ā¦
root@linaro-alip:~#
When we run same command second time, audio is not working and pipeline hang
Log:
root@linaro-alip:~# gst-launch-1.0 -v filesrc location= /usr/share/sounds/alsa/front_Center.wav ! capsfilter caps="audio/x-raw, channels=1, rate=48000, format=S16LE, layout=interleaved" ! alsasink device=plughw:0,0
Setting pipeline to PAUSED ā¦
Pipeline is PREROLLING ā¦
/GstPipeline:pipeline0/GstCapsfilter:capsfilter0.GstPad:src: caps = audio/x-raw, channels=(int)1, rate=(int)48000, format=(string)S16LE, layout=(string)interleaved
Redistribute latencyā¦
/GstPipeline:pipeline0/GstAlsaSink:alsasink0.GstPad:sink: caps = audio/x-raw, channels=(int)1, rate=(int)48000, format=(string)S16LE, layout=(string)interleaved
Pipeline is PREROLLED ā¦
Setting pipeline to PLAYING ā¦
New clock: GstAudioSinkClock
no audio + Press CTRL+c then it hang at āSetting pipeline to PAUSEDā ,
^Chandling interrupt.
Interrupt: Stopping pipeline ā¦
Execution ended after 0:00:07.383965934
Setting pipeline to PAUSED ā¦
Again Press CTRL+c then run Gsteamer command now itās work because we interrupted above pipeline at PAUSED stage.
All Logs,
root@linaro-alip:~# gst-launch-1.0 -v filesrc location= /usr/share/sounds/alsa/front_Center.wav ! capsfilter caps="audio/x-raw, channels=1, rate=48000, format=S16LE, layout=interleaved" ! alsasink device=plughw:0,0
Setting pipeline to PAUSED ā¦
Pipeline is PREROLLING ā¦
/GstPipeline:pipeline0/GstCapsfilter:capsfilter0.GstPad:src: caps = audio/x-raw, channels=(int)1, rate=(int)48000, format=(string)S16LE, layout=(string)interleaved
Redistribute latencyā¦
/GstPipeline:pipeline0/GstAlsaSink:alsasink0.GstPad:sink: caps = audio/x-raw, channels=(int)1, rate=(int)48000, format=(string)S16LE, layout=(string)interleaved
Pipeline is PREROLLED ā¦
Setting pipeline to PLAYING ā¦
New clock: GstAudioSinkClock
^Chandling interrupt.
Interrupt: Stopping pipeline ā¦
Execution ended after 0:00:02.652495051
Setting pipeline to PAUSED ā¦
^C
root@linaro-alip:~# gst-launch-1.0 -v filesrc location= /usr/share/sounds/alsa/front_Center.wav ! capsfilter caps="audio/x-raw, channels=1, rate=48000, format=S16LE, layout=interleaved" ! alsasink device=plughw:0,0
Setting pipeline to PAUSED ā¦
Pipeline is PREROLLING ā¦
/GstPipeline:pipeline0/GstCapsfilter:capsfilter0.GstPad:src: caps = audio/x-raw, channels=(int)1, rate=(int)48000, format=(string)S16LE, layout=(string)interleaved
Redistribute latencyā¦
/GstPipeline:pipeline0/GstAlsaSink:alsasink0.GstPad:sink: caps = audio/x-raw, channels=(int)1, rate=(int)48000, format=(string)S16LE, layout=(string)interleaved
Pipeline is PREROLLED ā¦
Setting pipeline to PLAYING ā¦
New clock: GstAudioSinkClock
Got EOS from element āpipeline0ā.
Execution ended after 0:00:01.082949010
Setting pipeline to PAUSED ā¦
Setting pipeline to READY ā¦
Setting pipeline to NULL ā¦
freeing pipeline ā¦
root@linaro-alip:~#
Commands failed one time out of three try.
Thanks,
Darshak