I'm confused - ttable, usb endpoints, snd_pcm_open.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have a simple application that receives RTP streams and plays them to a custom headset.  The headset has up to 8 USB audio endpoints (configurable on the headset).  I want to send up to 8 RTP streams to 8 different audio endpoints within the headset (the headset allows me to select which stream is being heard with an HID device or by serial API).

‘aplay -L’ shows up as:

sysdefault:CARD=HS1
    HS1, USB Audio
    Default Audio Device
front:CARD=HS1,DEV=0
    HS1, USB Audio
    Front speakers
surround21:CARD=HS1,DEV=0
    HS1, USB Audio
    2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=HS1,DEV=0
    HS1, USB Audio
    4.0 Surround output to Front and Rear speakers
surround41:CARD=HS1,DEV=0
    HS1, USB Audio
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=HS1,DEV=0
    HS1, USB Audio
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=HS1,DEV=0
    HS1, USB Audio
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=HS1,DEV=0
    HS1, USB Audio
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=HS1,DEV=0
    HS1, USB Audio
    IEC958 (S/PDIF) Digital Audio Output

I have a .asoundrc that looks like so:

pcm.hs1_0 {
        type hw
        card 1
}
ctl.hs1_0 {
        type hw
        card 1
}

pcm.Digital1 {
        type route
        slave.pcm hs1_0
        ttable.0.0 1
}

pcm.Digital2 {
        type route
        slave.pcm hs1_0
        ttable.1.1 1
}

pcm.Digital3 {
        type route
        slave.pcm hs1_0
        ttable.2.2 1
}

pcm.Digital4 {
        type route
        slave.pcm hs1_0
        ttable.3.3 1
}

pcm.Digital5 {
        type route
        slave.pcm hs1_0
        ttable.4.4 1
}

pcm.Digital6 {
        type route
        slave.pcm hs1_0
        ttable.5.5 1
}

pcm.Digital7 {
        type route
        slave.pcm hs1_0
        ttable.6.6 1
}

pcm.Digital8 {
        type route
        slave.pcm hs1_0
        ttable.7.7 1
}


I can successfully ‘snd_pcm_open(&handle1, “Digital1”, SND_PCM_STREAM_PLAYBACK, 0)’  but (as I guess is obvious), I can’t ‘snd_pcm_open(&handle2, “Digital2”, SND_PCM_STREAM_PLAYBACK, 0)’, I get EBUSY.  

Clearly my approach is wrong and I don’t understand the right way to do what I want.   It appears as though it works to some extent.  If I snd_pcm_open(….”Digital2”,….) or snd_pcm_open(….,”Digital1”,…) then I do get audio in the expected places.  I just can’t seem to do it simultaneously.

What’s the correct way to write PCM to specific USB endpoints simultaneously?

_______________________________________________
Alsa-user mailing list
Alsa-user@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/alsa-user




[Index of Archives]     [ALSA Devel]     [Linux Audio Users]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]

  Powered by Linux