<p>Thanks Tanu for the reply,</p>
<p>I wanted to test the module "module role cork" . So I started two media players using the gst launch tool. One had media role as phone and other had media role as music. When I tested using the "module role cork", it worked good. The player with media role "music" was paused. </p>
<p>As the next step, I tested with two different players.</p>
<p>1) gst launch tool -- media role = phone</p>
<p>2) qt based application ( runs on phonon - gstreamer framework ) -- with media role as music.</p>
<p>When the "module role cork" is used, the music stream is just muted but not paused.</p>
<p>I tried with a few other players too. The low priority stream is just paused.</p>
<p>I could not understand where the difference is coming from.</p>
<p>Can you help me with this.</p>
<p>Thanks,<br>
Sathish<br>
</p>
<div class="gmail_quote">On Nov 22, 2013 10:38 PM, "Tanu Kaskinen" <<a href="mailto:tanu.kaskinen@linux.intel.com">tanu.kaskinen@linux.intel.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Wed, 2013-11-20 at 10:57 -0500, sathishkumar sivagurunathan wrote:<br>
> Thanks Tanu for the detailed reply..<br>
><br>
> A) I would great if whatever I am intending to do could be added to<br>
> pulseaudio. But I feel what I need to do is already implemented in the<br>
> module "Module-role-cork" --> Essentially priority assignment between the<br>
> streams played by pulseaudio.<br>
<br>
module-role-cork has very primitive priority model: one role is defined<br>
to have "high" priority, and some other roles can have "low" priority.<br>
Streams that have some role that has neither "high" or "low" priority<br>
are ignored. So, module-role-cork works if this limited model is good<br>
enough for you. Of course, module-role-cork could perhaps be improved if<br>
necessary.<br>
<br>
> B) The only differentiator is that instead of the (media player or skype)<br>
> application assigning the media.role variable, I want the Audio Manager or<br>
> Routing system (to which the other applications like skype and media player<br>
> register) to manage assignment of this variable..<br>
><br>
> C) I have a question in this regard. I have listed it below.<br>
><br>
> So "*if I can keep the Module-role-cork running by adding it to the<br>
> <a href="http://default.pa" target="_blank">default.pa</a> <<a href="http://default.pa" target="_blank">http://default.pa</a>> file, I hope that assignment of the media<br>
> role variable will take care of priority (what is to be corked and<br>
> uncorked).*" -- Is this assumption right ??<br>
<br>
Yes.<br>
<br>
> D) So the module intent to write has the following aim :-<br>
><br>
> Based on the Audio Manager or routing mechanism status, media.role<br>
> priority of the particular audio stream needs to be assigned..<br>
<br>
Exactly.<br>
<br>
> *E) I have a few doubts in my mind abt the way in which the module can be<br>
> called*. In your reply, you have mentioned that the module can call and<br>
> consult the Audio Manager. Is the other way possible. In order words,<br>
><br>
> *Is their by any chance the module can loaded from my routing mechanism<br>
> code itself.. *<br>
><br>
> From the simple test I could carry out, the command line arguments for this<br>
> prioritizing functionality seems to go like this<br>
> "*pactl load-module <module-name>*". Is there by any chance I can load<br>
> these modules from a C++ program.<br>
<br>
pactl is a normal pulseaudio client. Whatever pactl does you can do too<br>
using the C API: <a href="http://freedesktop.org/software/pulseaudio/doxygen/" target="_blank">http://freedesktop.org/software/pulseaudio/doxygen/</a><br>
<br>
> F) I also tried to carry out a few simple test to check how the routing<br>
> works in pulse audio when media player is playing when a phone call over<br>
> skype arrives.. But in ubuntu 12.10, the MODULE-ROLE-CORK command doesnt<br>
> seem to working. I am using pulseaudio 2.0.<br>
><br>
> I had tried in ubuntu 12.04 LTS. the module "MODULE-CORK-MUSIC-ON-PHONE"<br>
> seems to be working good for me (pulseaudio 1.1). *Is that I should upgrade<br>
> to the latest ubuntu version 13.10 and check..*<br>
<br>
module-cork-music-on-phone was renamed to module-role-cork in 2.0.<br>
<br>
> G) The command format I used in pulseaudio 2.0 to load the<br>
> "module-role-cork" is like this<br>
><br>
> * pactl load-module module-role-cork trigger_roles="phone"<br>
> cork_roles="video"*<br>
><br>
> Is this the right way to do this..<br>
<br>
The right way to do what? If you want to load module-role-cork with<br>
pactl, then yes, that's the way to do it.<br>
<br>
--<br>
Tanu<br>
<br>
</blockquote></div>