[alsa-devel] multiple devices or one device w/ multiple subdevices?

Liam Girdwood lrg at slimlogic.co.uk
Mon Aug 24 22:07:44 CEST 2009

Hi Pierre-Louis,

On Mon, 2009-08-24 at 12:26 -0500, pl bossart wrote:
> Hi,
> I have a piece of custom hardware that provides 7 independent PCM
> outputs. This is not intended for multichannel playback, the content
> on each output can be completely different; playback will not be
> synchronized and will start separately. The only restriction is that
> all outputs rely on the same baserate and share the same bitclock,
> i.e. all the outputs work at 48kHz.
> >From the mailling list archives, subdevices seem to be relevant when
> doing hw mixing or when lots of streams are handled. None of this
> applies to my case. Also it looks like PulseAudio knows nothing about
> subdevices in its detection loop, meaning the user would need to
> manually add some load-module commands in the PulseAudio configuration
> files. And last but not least, I didn't see very many lines of code
> (and no documentation) that showed how subdevices are
> registered/handled, etc.
> My conclusion is that multiple devices would seem like a much better
> option. But I wanted to check with the community that I am on the
> right track. Thanks for your feedback!
> - P

Fwiw, I worked on a similar piece of hardware a few years back (WM9713).
It too had a shared 48kHz clock (AC97) and 3 independent outputs. I
found creating a single card with 3 pcms worked very well in this case
and kept the code simple. 

I could independently play different audio data to each pcm with
different start/stop times.

There is some example code in the ASoC WM9713 codec driver and in



More information about the Alsa-devel mailing list