Configuring PulseAudio to use ALSA PCM plugin

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

 



'Twas brillig, and Ben C at 04/03/11 19:44 did gyre and gimble:
> Thank you for your help Colin,
> 
> The reason I'm doing this is I'm researching audio processing effects. So I need 
> to intercept the PCM audio stream somewhere along the chain. Currently what we 
> have already coded is an ALSA PCM plugin framework, so we would like to use that 
> to intercept the PCM audio stream to apply effects as opposed to starting over 
> and writing something new.
> 
> The parameter we have to adhere to is that the original sound source could come 
> from ALSA or PA. We need to satisfy both. So currently we have the generic setup 
> where ALSA is defaulted to use the pulse plugin and redirecting everything to 
> PA. Then PA would use the ALSA sink "my_sink", and goes back to ALSA, where we 
> could insert our PCM plugin. And it turned out due to the hogging of my_sink, 
> we'd need to add dmix after.
> 
> And I understand PA has additional benefits over dmix, so if there's a better 
> way to configure this that's more natural to PA, please let me know.

OK, so this seems reasonably sensible. I guess my next question is "why
is it a problem that "my_sink" is hogged?

You stated that two different sources are supported: from alsa, and from
PA. Assuming PA is hogging my_sink, when apps play via pulse protocol
directly and uses my_sink, so all is well. When apps play via alsa, they
use the "default" device which maps through to PA via the alsa->pulse
plugin, which then uses my_sink, so all is well too.

So I don't really see where the "hogging" problem comes in to practical
effect?



Just in case a random, left-field suggestion would be appreciated, a
totally different approach is of course to write the filtering stuff
you're doing as either a ladspa plugin and use module-ladspa-sink or
even write it directly in PA based of module-virtual-sink.c code.


Food for thought maybe :)

Col








-- 

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
  Mageia Contributor [http://www.mageia.org/]
  PulseAudio Hacker [http://www.pulseaudio.org/]
  Trac Hacker [http://trac.edgewall.org/]




[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux