Re: Question about usb audio device - how to select output connector

2017-04-30 Thread Hans Petter Selasky

On 04/30/17 11:34, Alexander Leidinger wrote:

Hi,

I had a look at snd_uaudio and there I don't find the info I look for.

What I want to do is to have 6 chanel (5.1) SPDIF output. What I don't 
understand is how to select the connectors. To my understanding the 
soundsystem only sees a line out and a line in, but not all the other 
connectors. Looking at the output of sysctl (dev.pcm, dev.uaudio and 
hw.snd) doesn't give me a hint either.


What I have:
---snip---
ugen5.2:  at usbus5
uaudio0 on uhub4
uaudio0: 1.10/1.00, addr 2> on usbus5

uaudio0: Play: 48000 Hz, 4 ch, 24-bit S-LE PCM format, 2x8ms buffer.
uaudio0: Play: 44100 Hz, 4 ch, 24-bit S-LE PCM format, 2x8ms buffer.
uaudio0: Record: 96000 Hz, 2 ch, 24-bit S-LE PCM format, 2x8ms buffer.
uaudio0: Record: 48000 Hz, 2 ch, 24-bit S-LE PCM format, 2x8ms buffer.
uaudio0: Record: 44100 Hz, 2 ch, 24-bit S-LE PCM format, 2x8ms buffer.
uaudio0: No MIDI sequencer.
pcm5:  on uaudio0
uaudio0: No HID volume keys found.
---snip---

What the sound subsystem sees:
---snip---
# cat /dev/sndstat
FreeBSD Audio Driver (64bit 2009061500/amd64)
Installed devices:
pcm0:  on hdaa0 kld snd_hda 
(1p:1v/1r:1v) default
 snddev 
flags=0x2e6
 [pcm0:play:dsp0.p0]: spd 48000, fmt 0x00200010, flags 
0x2100, 0x0004
 interrupts 62, underruns 0, feed 62, ready 0 
[b:4096/2048/2|bs:4096/2048/2]

 channel flags=0x2100
 {userland} -> feeder_mixer(0x00200010) -> {hardware}
 pcm0:play:dsp0.p0[pcm0:virtual:dsp0.vp0]: spd 44100/48000, fmt 
0x00201000/0x00200010, flags 0x1000, 0x002b
 interrupts 0, underruns 0, feed 0, ready 0 
[b:0/0/0|bs:131072/4096/32]

 channel flags=0x1000
 {userland} -> feeder_root(0x00201000) -> 
feeder_format(0x00201000 -> 0x00200010) -> feeder_volume(0x00200010) -> 
feeder_rate(0x00200010 q:1 44100 -> 48000) -> {hardware}
 [pcm0:record:dsp0.r0]: spd 48000, fmt 0x00200010, flags 
0x2100, 0x0005
 interrupts 0, overruns 0, feed 0, hfree 4096, sfree 4096 
[b:4096/2048/2|bs:4096/2048/2]

 channel flags=0x2100
 {hardware} -> feeder_root(0x00200010) -> 
feeder_mixer(0x00200010) -> {userland}
 pcm0:record:dsp0.r0[pcm0:virtual:dsp0.vr0]: spd 8000, fmt 
0x0018, flags 0x1000, 0x
 interrupts 0, overruns 0, feed 0, hfree 0, sfree 0 
[b:0/0/0|bs:0/0/0]

 channel flags=0x1000
 {hardware} -> feeder_root(0x) -> {userland}
pcm1:  on hdaa0 kld snd_hda (1p:1v/2r:1v)
 snddev 
flags=0x2e6
 [pcm1:play:dsp1.p0]: spd 48000, fmt 0x00200010, flags 
0x2100, 0x0004
 interrupts 128, underruns 0, feed 128, ready 0 
[b:4096/2048/2|bs:4096/2048/2]

 channel flags=0x2100
 {userland} -> feeder_mixer(0x00200010) -> {hardware}
 pcm1:play:dsp1.p0[pcm1:virtual:dsp1.vp0]: spd 22050/48000, fmt 
0x00201000/0x00200010, flags 0x1000, 0x002b
 interrupts 0, underruns 0, feed 0, ready 0 
[b:0/0/0|bs:65536/2048/32]

 channel flags=0x1000
 {userland} -> feeder_root(0x00201000) -> 
feeder_format(0x00201000 -> 0x00200010) -> feeder_volume(0x00200010) -> 
feeder_rate(0x00200010 q:1 22050 -> 48000) -> {hardware}
 [pcm1:record:dsp1.r0]: spd 48000, fmt 0x00200010, flags 
0x2100, 0x0005
 interrupts 0, overruns 0, feed 0, hfree 4096, sfree 4096 
[b:4096/2048/2|bs:4096/2048/2]

 channel flags=0x2100
 {hardware} -> feeder_root(0x00200010) -> 
feeder_mixer(0x00200010) -> {userland}
 [pcm1:record:dsp1.r1]: spd 8000, fmt 0x0018, flags 
0x, 0x
 interrupts 0, overruns 0, feed 0, hfree 65536, sfree 0 
[b:65536/32768/2|bs:0/0/0]

 channel flags=0x0
 {hardware} -> feeder_root(0x) -> {userland}
 pcm1:record:dsp1.r0[pcm1:virtual:dsp1.vr0]: spd 8000, fmt 
0x0018, flags 0x1000, 0x
 interrupts 0, overruns 0, feed 0, hfree 0, sfree 0 
[b:0/0/0|bs:0/0/0]

 channel flags=0x1000
 {hardware} -> feeder_root(0x) -> {userland}
pcm2:  on hdaa0 kld snd_hda (1p:1v/0r:0v)
 snddev 
flags=0x2e7
 [pcm2:play:dsp2.p0]: spd 48000, fmt 0x00200010, flags 
0x6100, 0x0004
 interrupts 133, underruns 0, feed 133, ready 0 
[b:4096/2048/2|bs:4096/2048/2]

 channel flags=0x6100
 {userland} -> feeder_mixer(0x00200010) -> {hardware}
 pcm2:play:dsp2.p0[pcm2:virtual:dsp2.vp0]: spd 22050/48000, fmt 
0x00201000/0x00200010, flags 0x1000, 0x002b
 interrupts 0, underruns 0, feed 0, ready 0 
[b:0/0/0|bs:65536/2048/32]

 channel flags=0x1000
 {userland} -> feeder_root(0x00201000) -> 

Question about usb audio device - how to select output connector

2017-04-30 Thread Alexander Leidinger

Hi,

I had a look at snd_uaudio and there I don't find the info I look for.

What I want to do is to have 6 chanel (5.1) SPDIF output. What I don't  
understand is how to select the connectors. To my understanding the  
soundsystem only sees a line out and a line in, but not all the other  
connectors. Looking at the output of sysctl (dev.pcm, dev.uaudio and  
hw.snd) doesn't give me a hint either.


What I have:
---snip---
ugen5.2:  at usbus5
uaudio0 on uhub4
uaudio0: 1.10/1.00, addr 2> on usbus5

uaudio0: Play: 48000 Hz, 4 ch, 24-bit S-LE PCM format, 2x8ms buffer.
uaudio0: Play: 44100 Hz, 4 ch, 24-bit S-LE PCM format, 2x8ms buffer.
uaudio0: Record: 96000 Hz, 2 ch, 24-bit S-LE PCM format, 2x8ms buffer.
uaudio0: Record: 48000 Hz, 2 ch, 24-bit S-LE PCM format, 2x8ms buffer.
uaudio0: Record: 44100 Hz, 2 ch, 24-bit S-LE PCM format, 2x8ms buffer.
uaudio0: No MIDI sequencer.
pcm5:  on uaudio0
uaudio0: No HID volume keys found.
---snip---

What the sound subsystem sees:
---snip---
# cat /dev/sndstat
FreeBSD Audio Driver (64bit 2009061500/amd64)
Installed devices:
pcm0:  on hdaa0 kld snd_hda  
(1p:1v/1r:1v) default

snddev flags=0x2e6
[pcm0:play:dsp0.p0]: spd 48000, fmt 0x00200010, flags  
0x2100, 0x0004
interrupts 62, underruns 0, feed 62, ready 0  
[b:4096/2048/2|bs:4096/2048/2]

channel flags=0x2100
{userland} -> feeder_mixer(0x00200010) -> {hardware}
pcm0:play:dsp0.p0[pcm0:virtual:dsp0.vp0]: spd 44100/48000,  
fmt 0x00201000/0x00200010, flags 0x1000, 0x002b

interrupts 0, underruns 0, feed 0, ready 0 [b:0/0/0|bs:131072/4096/32]
channel flags=0x1000
{userland} -> feeder_root(0x00201000) ->  
feeder_format(0x00201000 -> 0x00200010) -> feeder_volume(0x00200010)  
-> feeder_rate(0x00200010 q:1 44100 -> 48000) -> {hardware}
[pcm0:record:dsp0.r0]: spd 48000, fmt 0x00200010, flags  
0x2100, 0x0005
interrupts 0, overruns 0, feed 0, hfree 4096, sfree 4096  
[b:4096/2048/2|bs:4096/2048/2]

channel flags=0x2100
{hardware} -> feeder_root(0x00200010) ->  
feeder_mixer(0x00200010) -> {userland}
pcm0:record:dsp0.r0[pcm0:virtual:dsp0.vr0]: spd 8000, fmt  
0x0018, flags 0x1000, 0x

interrupts 0, overruns 0, feed 0, hfree 0, sfree 0 [b:0/0/0|bs:0/0/0]
channel flags=0x1000
{hardware} -> feeder_root(0x) -> {userland}
pcm1:  on hdaa0 kld snd_hda (1p:1v/2r:1v)
snddev flags=0x2e6
[pcm1:play:dsp1.p0]: spd 48000, fmt 0x00200010, flags  
0x2100, 0x0004
interrupts 128, underruns 0, feed 128, ready 0  
[b:4096/2048/2|bs:4096/2048/2]

channel flags=0x2100
{userland} -> feeder_mixer(0x00200010) -> {hardware}
pcm1:play:dsp1.p0[pcm1:virtual:dsp1.vp0]: spd 22050/48000,  
fmt 0x00201000/0x00200010, flags 0x1000, 0x002b

interrupts 0, underruns 0, feed 0, ready 0 [b:0/0/0|bs:65536/2048/32]
channel flags=0x1000
{userland} -> feeder_root(0x00201000) ->  
feeder_format(0x00201000 -> 0x00200010) -> feeder_volume(0x00200010)  
-> feeder_rate(0x00200010 q:1 22050 -> 48000) -> {hardware}
[pcm1:record:dsp1.r0]: spd 48000, fmt 0x00200010, flags  
0x2100, 0x0005
interrupts 0, overruns 0, feed 0, hfree 4096, sfree 4096  
[b:4096/2048/2|bs:4096/2048/2]

channel flags=0x2100
{hardware} -> feeder_root(0x00200010) ->  
feeder_mixer(0x00200010) -> {userland}
[pcm1:record:dsp1.r1]: spd 8000, fmt 0x0018, flags  
0x, 0x
interrupts 0, overruns 0, feed 0, hfree 65536, sfree 0  
[b:65536/32768/2|bs:0/0/0]

channel flags=0x0
{hardware} -> feeder_root(0x) -> {userland}
pcm1:record:dsp1.r0[pcm1:virtual:dsp1.vr0]: spd 8000, fmt  
0x0018, flags 0x1000, 0x

interrupts 0, overruns 0, feed 0, hfree 0, sfree 0 [b:0/0/0|bs:0/0/0]
channel flags=0x1000
{hardware} -> feeder_root(0x) -> {userland}
pcm2:  on hdaa0 kld snd_hda (1p:1v/0r:0v)
snddev  
flags=0x2e7
[pcm2:play:dsp2.p0]: spd 48000, fmt 0x00200010, flags  
0x6100, 0x0004
interrupts 133, underruns 0, feed 133, ready 0  
[b:4096/2048/2|bs:4096/2048/2]

channel flags=0x6100
{userland} -> feeder_mixer(0x00200010) -> {hardware}
pcm2:play:dsp2.p0[pcm2:virtual:dsp2.vp0]: spd 22050/48000,  
fmt 0x00201000/0x00200010, flags 0x1000, 0x002b

interrupts 0, underruns 0, feed 0, ready 0 [b:0/0/0|bs:65536/2048/32]
channel flags=0x1000
{userland} -> feeder_root(0x00201000) ->  
feeder_format(0x00201000 -> 0x00200010) -> feeder_volume(0x00200010)  
->