This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

audio loopback issue in ti sdk 8 alsa

Dear TI E2E community

Am facing the below error when i am trying to loopback, could you please let me know what could be issue???

root@lifeline:/# arecord -Dplughw:0,0 | aplay -Dplughw:0,0
Recording WAVE 'stdin' : aplay: main:722: audio open error: Invalid argument
Unsigned 8 bit, Rate 8000 Hz, Mono
[ 1880.344902] Uda134x:uda134x_hw_params UDA1345TS FORMAT SND_SOC_DAIFMT_I2S
root@lifeline:/# arecord hw:0,0 | aplay hw:0,0
Recording WAVE 'hw:0,0' : aplay: main:722: Unsigned 8 bit, Rate 8000 Hz, Mono
audio open error: Invalid argument

Kindly do the needful as early as possible

Many thanks in advance

  • Forwarding this to the SW team.
  • SW Team could you please provide any inputs w.r.t the above query, as am waiting for your replies from many days
  • Hi Srini,

    Sorry for the delay.

    Have you tried adding some kind of a buffer, i.e. :
    arecord -Dplughw:0,0 /tmp/1.wav | aplay -Dplughw:0,0 /tmp/1.wav ?

    Maybe you will need to put some additional delay between the aplay & arecord commands.

    Hope this helps.

    Best Regards,
    Yordan
  • Dear Yordan,

    Could you please let em know how additional delay can be put in between the above aplay & arecord commands

    Kindly do the needul as early as possible

    Many Thanks in advance

  • Have you tried adding the /tmp/1.wav in your arecord/aplay pipeline (any effect)?

    Have you enabled line in & mic in with amixer commands:
    Enabling Line-In
    target # amixer sset 'Right PGA Mixer Line1R' on
    target # amixer sset 'Right PGA Mixer Line1L' on
    target # amixer sset 'Left PGA Mixer Line1R' on
    target # amixer sset 'Left PGA Mixer Line1L' on
    · Enabling Mic-In
    target # amixer sset 'Right PGA Mixer Mic3L' on
    target # amixer sset 'Right PGA Mixer Mic3R' on
    target # amixer sset 'Left PGA Mixer Mic3L' on
    target # amixer sset 'Left PGA Mixer Mic3R' on

    and then try the audio loopback:
    target # arecord -f cd -t wav | aplay -f cd
    ?

    Best Regards,
    Yordan
  • Dear Yordan,

    In my sound card, I don't have the following, but individual arecord & aplay works by playing independently

    Enabling Line-In
    target # amixer sset 'Right PGA Mixer Line1R' on
    target # amixer sset 'Right PGA Mixer Line1L' on
    target # amixer sset 'Left PGA Mixer Line1R' on
    target # amixer sset 'Left PGA Mixer Line1L' on
    · Enabling Mic-In
    target # amixer sset 'Right PGA Mixer Mic3L' on
    target # amixer sset 'Right PGA Mixer Mic3R' on
    target # amixer sset 'Left PGA Mixer Mic3L' on
    target # amixer sset 'Left PGA Mixer Mic3R' on


    I have tried both but still it is the same issue

    root@lifeline:/# arecord -f cd -t wav | aplay -f cd
    aplay: main:722: Recording WAVE 'stdin' : audio open error: Invalid argument
    Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
    root@lifeline:/#

    oot@lifeline:/# arecord -Dplughw:0,0 /tmp/1.wav | aplay -Dplughw:0,0 /tmp/1.wav
    arecord: main:722: audio open error: Invalid argument
    /tmp/1.wav: No such file or directory
    root@lifeline:/#

    Kindly do the needful as early as possible
    Thanks in advance,
  • Dear Yordan,

    I have tried both as shown below, still the issue is same, for my codec it doesn't require enabling line in & mic in with amixer commands

    It works with arecord & aplay independently but trying full duplex it doesn't work

    root@lifeline:/# arecord -f cd -t wav | aplay -f cd
    Recording WAVE 'stdin' : aplay: main:722: Signed 16 bit Little Endian, audio open error: Invalid argument
    Rate 44100 Hz, Stereo
    root@lifeline:/# arecord -f cd -t wav | aplay -f cd
    aplay: main:722: Recording WAVE 'stdin' : audio open error: Invalid argument
    Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
    oot@lifeline:/# arecord -Dplughw:0,0 /tmp/1.wav | aplay -Dplughw:0,0 /tmp/1.wav
    arecord: main:722: audio open error: Invalid argument
    /tmp/1.wav: No such file or directory
    root@lifeline:/#

    Kindly do the needful as early as possible
    Many Thanks in advance