How to set media role variable ??

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

 



On Wed, 2013-11-20 at 10:57 -0500, sathishkumar sivagurunathan wrote:
> Thanks Tanu for the detailed reply..
> 
> A) I would great if whatever I am intending to do could be added to
> pulseaudio. But I feel what I need to do is already implemented in the
> module "Module-role-cork" --> Essentially priority assignment between the
> streams played by pulseaudio.

module-role-cork has very primitive priority model: one role is defined
to have "high" priority, and some other roles can have "low" priority.
Streams that have some role that has neither "high" or "low" priority
are ignored. So, module-role-cork works if this limited model is good
enough for you. Of course, module-role-cork could perhaps be improved if
necessary.

> B) The only differentiator is that instead of the (media player or skype)
> application assigning the media.role variable, I want the Audio Manager or
> Routing system (to which the other applications like skype and media player
> register) to manage assignment of this variable..
> 
> C) I have a question in this regard. I have listed it below.
> 
> So "*if I can keep the Module-role-cork running by adding it to the
> default.pa <http://default.pa> file, I hope that assignment of the media
> role variable will take care of priority (what is to be corked and
> uncorked).*" -- Is this assumption right ??

Yes.

> D) So the module intent to write has the following aim :-
> 
>      Based on the Audio Manager or routing mechanism status, media.role
> priority of the particular audio stream needs to be assigned..

Exactly.

> *E) I have a few doubts in my mind abt the way in which the module can be
> called*. In your reply, you have mentioned that the module can call and
> consult the Audio Manager. Is the other way possible. In order words,
> 
> *Is their by any chance the module can loaded from my routing mechanism
> code itself.. *
> 
> From the simple test I could carry out, the command line arguments for this
> prioritizing functionality seems to go like this
>   "*pactl load-module <module-name>*". Is there by any chance I can load
> these modules from a C++ program.

pactl is a normal pulseaudio client. Whatever pactl does you can do too
using the C API: http://freedesktop.org/software/pulseaudio/doxygen/

> F) I also tried to carry out a few simple test to check how the routing
> works in pulse audio when media player is playing when a phone call over
> skype arrives.. But in ubuntu 12.10, the MODULE-ROLE-CORK command doesnt
> seem to working. I am using pulseaudio 2.0.
> 
> I had tried in ubuntu 12.04 LTS. the module "MODULE-CORK-MUSIC-ON-PHONE"
> seems to be working good for me (pulseaudio 1.1). *Is that I should upgrade
> to the latest ubuntu version 13.10 and check..*

module-cork-music-on-phone was renamed to module-role-cork in 2.0.

> G) The command format I used in pulseaudio 2.0 to load the
> "module-role-cork" is like this
> 
> *    pactl load-module module-role-cork trigger_roles="phone"
> cork_roles="video"*
> 
>     Is this the right way to do this..

The right way to do what? If you want to load module-role-cork with
pactl, then yes, that's the way to do it.

-- 
Tanu



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

  Powered by Linux