All of lore.kernel.org
 help / color / mirror / Atom feed
* multiple devices or one device w/ multiple subdevices?
@ 2009-08-24 17:26 pl bossart
  2009-08-24 20:07 ` Liam Girdwood
  2009-08-25  3:06 ` Eliot Blennerhassett
  0 siblings, 2 replies; 3+ messages in thread
From: pl bossart @ 2009-08-24 17:26 UTC (permalink / raw)
  To: alsa-devel

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: multiple devices or one device w/ multiple subdevices?
  2009-08-24 17:26 multiple devices or one device w/ multiple subdevices? pl bossart
@ 2009-08-24 20:07 ` Liam Girdwood
  2009-08-25  3:06 ` Eliot Blennerhassett
  1 sibling, 0 replies; 3+ messages in thread
From: Liam Girdwood @ 2009-08-24 20:07 UTC (permalink / raw)
  To: pl bossart; +Cc: alsa-devel

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
soc-core.c

HTH 

Liam 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: multiple devices or one device w/ multiple subdevices?
  2009-08-24 17:26 multiple devices or one device w/ multiple subdevices? pl bossart
  2009-08-24 20:07 ` Liam Girdwood
@ 2009-08-25  3:06 ` Eliot Blennerhassett
  1 sibling, 0 replies; 3+ messages in thread
From: Eliot Blennerhassett @ 2009-08-25  3:06 UTC (permalink / raw)
  Cc: alsa-devel

pl bossart wrote:
> Hi,
> I have a piece of custom hardware that provides 7 independent PCM
> outputs. 
 >
> 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!

It used to be that there was a limit of 4 devices per card.
But no (or large) limit on subdevices.

If this still applies you will need to use subdevices, and for 
simplicity you would create just one device with 7 subdevs.

--
Eliot

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-08-25  3:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-24 17:26 multiple devices or one device w/ multiple subdevices? pl bossart
2009-08-24 20:07 ` Liam Girdwood
2009-08-25  3:06 ` Eliot Blennerhassett

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.