Skip to contentSkip to conversation

What are subdevices?

DISCUSSION dE 2 participants 6 messages Oct 26, 2014 – Oct 28, 2014

lore
Share & tools
lore

dE

author
#0 lore raw

Hi!

I tried this question in the alsa-users mailing list but it doesn't appear to be much active. So I ask here.

I'm facing problems with my system, so decided to learn ALSA to see what's the problem.

My first question -- what's a device and a sub device?

A device seems like the output streams the sound card supports. Like HDMI, DP, analog etc...

So what's a subdevice? Is this related to multichannel? Does it designate physical ports on the card?

Thanks.

#1 lore raw
Quoted 3 lines · dE

A device seems like the output streams the sound card supports. Like HDMI, DP, analog etc...

So what's a subdevice?

A subdevice is an output streams the sound card supports.

Typically, a device has multiple subdevices if the card supports hardware mixing; all the subdevices end up at the same physical output.

Regards,
Clemens

author
#2 lore raw
Quoted 4 lines · Clemens Ladisch
Quoted 3 lines · dE

A device seems like the output streams the sound card supports. Like HDMI, DP, analog etc...

So what's a subdevice?

Quoted 8 lines

A subdevice is an output streams the sound card supports.

Typically, a device has multiple subdevices if the card supports hardware mixing; all the subdevices end up at the same physical output.

Regards,
Clemens

Ok, so a device list is a list of different streams the card can supports simultaneously and they'll be output via different channels without mixing.

Thanks for clarifying this.

But, typically cards have a single analog device but support multichannel output. So how does this work at the software level? If ALSA can't send multiple streams of audio to one device, then how does ALSA send separate output to different channels of the device?

Is the PCM sent to the sound card codified? Is this the same way how stereo work?

author
#3 lore raw
Quoted 14 lines · dE
Quoted 4 lines · Clemens Ladisch
Quoted 3 lines · dE

A device seems like the output streams the sound card supports. Like HDMI, DP, analog etc...

So what's a subdevice?

Quoted 8 lines

A subdevice is an output streams the sound card supports.

Typically, a device has multiple subdevices if the card supports hardware mixing; all the subdevices end up at the same physical output.

Regards,
Clemens

Quoted 7 lines

Ok, so a device list is a list of different streams the card can supports simultaneously and they'll be output via different channels without mixing.

Thanks for clarifying this.

But, typically cards have a single analog device but support multichannel output. So how does this work at the software level? If ALSA can't send multiple streams of audio to one device, then how does ALSA send separate output to different channels of the device?

Is the PCM sent to the sound card codified? Is this the same way how stereo work?

No one knows?

#4 lore raw
In reply to dE
Quoted 4 lines · dE

typically cards have a single analog device but support multichannel output. So how does this work at the software level? If ALSA can't send multiple streams of audio to one device, then how does ALSA send separate output to different channels of the device?

The channels are not separate. For a stereo devices, the samples are arranged like LRLRLRLRLR...; for more channels, there are more interleaved values: 123456123456123456123456...

Regards,
Clemens

author
#5 lore raw
Quoted 10 lines · Clemens Ladisch
Quoted 4 lines · dE

typically cards have a single analog device but support multichannel output. So how does this work at the software level? If ALSA can't send multiple streams of audio to one device, then how does ALSA send separate output to different channels of the device?

The channels are not separate. For a stereo devices, the samples are arranged like LRLRLRLRLR...; for more channels, there are more interleaved values: 123456123456123456123456...

Quoted 6 lines

Regards,
Clemens
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

So it's with the encoding of the PCM.

Thank you so much for the response! I'll blog about this in my ALSA doc.