[pulseaudio-discuss] dynamic routing through pulse audio

Himanshu Chug himanshu.chug at gmail.com
Thu Jun 2 05:29:39 PDT 2011


Thanks Colin. got your point here.
Now similar to music cork over phone, I need to cork the stream with
role="event" when another stream with role="phone" becomes active.
(here event can be sms alert etc)  , Do I need to write any new module for
this? or this can be achieved some how, any pointers can be helpful?

Best Regards,
Himanshu

On Wed, Jun 1, 2011 at 2:03 PM, Colin Guthrie <gmane at colin.guthr.ie> wrote:

> 'Twas brillig, and Himanshu Chug at 01/06/11 07:27 did gyre and gimble:
> > Thanks for the quick reply Amanda, actually I need to understand this in
> > some more details ,
> > since I am new to pulseaudio please forgive if I ask something with not
> > much sense
> > 1. What this module do? and how PA modules can be loaded?
>
> It more or less does as Amanda suggests. It corks/pauses the music
> streams when a phone stream is active on the same sink.
>
> In order to "cork" the application must handle cork requests from PA
> (thus allowing the app to properly pause itself). Just in case the app
> does not handle the cork, PA will mute the stream also. When the phone
> stream disappears, the stream is unmuted and the uncork request is sent.
> It's up to the music app to handle this gracefully.
>
> Modules are loaded typically by the default.pa script that is processed
> on startup. module-cork-music-on-phone is part of the default.pa we ship.
>
> > 2. How and When the module "module-cork-music-on-phone"  comes to
> > picture or gets loaded? What condition triggers to load this module?
>
> It's listens for new streams and when it find both two streams tagged
> with phone and a music respectively, it will cork/pause the music one.
>
> > 3. I am setting the role through music application.
>
> Yeah, if you set it explicitly that's best but PA also tries to parse
> the .desktop file shipped with apps to try and augment the properties if
> possible. This is why, e.g. we know that lastfm-player (which uses alsa)
> is a "Music" app.
>
> HTHs
>
> 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/]
>
> _______________________________________________
> pulseaudio-discuss mailing list
> pulseaudio-discuss at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20110602/dbf5c658/attachment.html>


More information about the pulseaudio-discuss mailing list