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.

snd-aloop and alsaloop in ti sdk 7

Dear TI E2E Community,

I am running out of the below issue from many days, hope could you please help me in resolving this issue or could you please redirect to the respective links where my queries can be posted & get the solutions for the problem


The below is the virtual cards created after configuring snd-aloop in the linux kernel in ti sdk 7
snd-aloop provided 2 pass-through devices as shown in the below

card 0, device 0
card 0, device 1


But am unable to perform the loop back ie., whatever am playing am unable to record in the virtual device

As per the logs below, am using the below commands to perform loopback, could you please let me know why am unable to perform the loopback with the below commands or please let me know am I missing any configurations, or if possible could you please try in your am335x-evm where it has tlv codec & verify this feature ie., snd-aloop & let me know as early as possible


aplay -D hw:0,0,0 play.wav

arecord -D hw:0,1,0 record.wav or alsaloop -C hw:0,1 -P hw:0,0 -t 50000 # second terminal, latency 50ms


root@am335x-evm:/# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Loopback [Loopback], device 0: Loopback PCM [Loopback PCM]
  Subdevices: 8/8
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
  Subdevice #4: subdevice #4
  Subdevice #5: subdevice #5
  Subdevice #6: subdevice #6
  Subdevice #7: subdevice #7
card 0: Loopback [Loopback], device 1: Loopback PCM [Loopback PCM]
  Subdevices: 8/8
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
  Subdevice #4: subdevice #4
  Subdevice #5: subdevice #5
  Subdevice #6: subdevice #6
  Subdevice #7: subdevice #7
card 1: UDA1345TS [TI UDA1345TS], device 0: UDA134x uda134x-hifi-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
root@am335x-evm:/#



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

  • Dear Titus,

    Thanks a lot for your quick responses,

    1) I have tried this feature as you suggested in linux host machine, that works fine, but am unable to get this feature ie., snd-aloop working in my custom board, where I have interfaced uda1345ts codec chip to mcasp0 in which am able to get this playback & capture working using aplay & arecord.

    Could you please evaluate this feature in your am335x-evm where you have tlv codec from your end & send me the detailed steps, So that I can track the issue w.r.t my custom board

    2)As am new to alsa framework development, Please if you are aware, could you please let me the alsa links ie., communities , forums, mail ids, where I can post my queries related to alsa framework & get the answers for the queries as early as possible

    Kindly do the needful as early as possible


    Once Many Thanks a lot for your quick responses & would appreciate the same

    Awaiting for your replies,

    Many Thanks in advance again,
  • Dear Titus,

    Could you please evaluate this feature in your am335x-evm where you have tlv codec from your end & send me the detailed steps, So that I can track the issue w.r.t my custom board

    Kindly do the needful as early as possible

    Awaiting for your replies,
    Many Thanks in advance again,
  • Hi Srini,

    Please check whether the below links are of some help for the usage of the tools and utiltiies.

    http://processors.wiki.ti.com/index.php/Sitara_SDK_Linux_Audio_ALSA_User_Space

    http://processors.wiki.ti.com/index.php/Linux_Core_Audio_User%27s_Guide

    Regards,

    Shankari

    -------------------------------------------------------------------------------------------------------

    Please click the Verify Answer button on this post if it answers your question.
    --------------------------------------------------------------------------------------------------------

  • The above feature ie., snd-aloop is not being shown in the above link

    Kindly once again requesting you to test in your evm & send me across as I dont have evm here

    Because of this feature my activity is getting blocked

    sorry to push you hard

    Kindly do the needful as early as possible

    Awaiting for your replies,
  • Dear TI E2E Community,

    Could you please provide any updates w.r.t the above query

    Awaiting for your replies,

    Thanks in advance again

  • After I verify the above feature only, I would be able to proceed with my activities

    ie., two sound card devices using loopback. One is a GSM modem with a sink/source and the other is a audio codec, Using loopback module to connect the sink/source and source/sink GSM and Codec.


    Could you please test from your end & let me know as early as possible,

    Thanks in advance
  • Dear TI E2E Community,


    Please provide any updates w.r.t this thread as early as possible, because of which my development is getting affected from past 3 days

    Kindly do the needful as early as possible

    Many Thanks in advance again
  • Hi Srini,
    I will try it on board and let me update.
  • I took a breath, Thanks a lot for the update Titus
  • Dear Titus,

    Could you please provide any updates that you have tried in am335x-evm w.r.t the loopback card using snd-aloop & alsaloop,

    how this loopback card can be used to connect the GSM two way call simultanoeusly to the UDA1345TS codec on MCASP0 of the am335x (UDA1345TS ie., real sound card)

    The codec has two output channels VOUTL, VOUTR & two input channels VINL , VINR

    As I am pretty new to linux audio particularly ALSA Framework, as I was having some trouble getting a grasp on it all, (as I want this to be done in ALSA only without entering into gstreamer or ffmpeg, could you please confirm on the same that whether can it be done in ALSA only)

    If this probably isn't the place to ask this question, but I am not sure where is.  Feel free to point me somewhere else if there is a better place :)

    So it seems what is happening is basically when i up the channels from VINL to VOUTL, & VINR to VOUTR ie., I am able capture from VINR & play back using VOUTR & similarly I am able to capture from VINR & route to VOUTR using the below asound.conf & the attached application

    With this am able to achieve only one way call at a time by running only one application at a time ie., alsa_loopback_min_mono_VINL.c or alsa_loopback_min_mono_VINR.c

    Could you please kindly let me know how two way call can be established simultaneously finally with only one application

    2821.asound.conf.txt8816.alsa_loopback_min_mono_VINL.c0638.alsa_loopback_min_mono_VINR.c

    Kindly do the needful as early as possible,

    Awaiting for your replies,

     

    Many Thanks in advance again,

  • Try this command.
    aplay -D hw:1,0,0 play.wav
  • Thanks for your replies Titus,

    This command actually does the playback on real sound card ie., UDA1345TS, ie., aplay -D hw:1,0,0 play.wav but this doesn't fully resemble the property of snd-aloop

    Basically what I need to do is to make use of this loopback card ( ie., obtained from snd-aloop after configured in kernel) to establish the GSM two way call simultanoeusly to the UDA1345TS codec on MCASP0 of the am335x (UDA1345TS ie., real sound card)

    Could you please let me know how this can be achieved using loopback card

    or

    As discussed in one of the earlier discussion in this thread ie.,

    when i up the channels from VINL to VOUTL, & VINR to VOUTR ie., I am able capture from VINR & play back using VOUTR & similarly I am able to capture from VINR & route to VOUTR using the below asound.conf & the attached application

    With this am able to achieve only one way call at a time by running only one application at a time ie., alsa_loopback_min_mono_VINL.c or alsa_loopback_min_mono_VINR.c

    Could you please kindly let me know how two way call can be established simultaneously finally with only one application

    asound.conf.txtalsa_loopback_min_mono_VINL.calsa_loopback_min_mono_VINR.c

    Kindly do the needful as early as possible


    Awaiting for your replies,

    Many Thanks in advance again