Hi Janos,

Many thanks for your answers.

>>
>> (C) How is the data flow coordinated between nodes?
>>
> Could you be pls. a bit more specific on this?

I meant, how can I influence the data flow between a source and a sink, e.g. 
inserting a special mixing or filter strategy. I guess, this can be done 
traditionally via loading specific pulse modules and inject them into the 
processing pipeline. [Player]->[Mixer]->[Post Processing Effect]->[Speakers]


Thanks,
Robert


-----Original Message-----
From: Kovacs, Janos [mailto:janos.kov...@intel.com]
Sent: Montag, 14. April 2014 10:16
To: ivi@lists.tizen.org; Fritzsche, Robert (059)
Subject: Re: PulseAudio Murphy IVI Configuration // Question Regarding: nodes, 
routing_groups and roles

Hi,

I just joined to the mailing list, so my answer might not go to the original 
thread.

> Hi,
>
> I try to understand the configuration of the PulseAudio Murphy IVI
> module. Right now I try to wrap my head around routing_groups and
> nodes. This is my understanding so far, please correct me if I am
> wrong:
>
> (1) As I understand, an application and a device can be a node, right?

That's correct. All possible routing start and endpoints are a nodes.

>
> (2) OK, a routing_group is set of nodes, right?

A routing group is a prioritized list of possible routing endpoints.
Source nodes are assigned to a single routing group based on their node type. 
Routing groups are used for implicit, ie. default, routing. When implicit 
routing is used first the routing group is picked based on the type of the node 
that represents the stream. Next, the list of routing endpoints in that routing 
group walked through in priority order and the highest priority available node 
is picked as the routing target for the input stream. In the last step the 
input stream is routed to the sink of the picked routing target.

However, explicit routes requested directly by the applications do not use the 
routing groups.

>
> (3) Application_class.roles define the resources an application wants
> to bind to itself, right?

That's correct. The applicable resource definitions are picked either by a 
matching media.role property or binary name, ie, either the media.role property 
of the stream or the binary name of the application must match one of the 
entries in the relevant list in the application_class definition.

>
>
> What I don't understand:
>
> (A) What is the purpose of the routing_group.compare method?

As we said earlier a routing group is basically a prioritized list of possible 
routing targets. The list is defined by two functions: 'accept'
and 'compare'.
The 'accept' function is used to decide whether a node belong to the routing 
group, eg. when an output node is created the 'accept' function is called for 
each routing group and the node is added to the routing group if 'accept' would 
return 'true'.
'compare' is used to find for the newly created node the insertion point in the 
prioritized list. 'compare' takes two nodes as input and return -1, 0 or +1 
just like 'strcmp' does.

>
> (B) How do I map nodes, like phone input, to real sources or sink
> (devices)?

For streams the media.role property or the binary name can be used.
For dynamically loaded device nodes there are hardwired heuristics to determine 
the node type. For manually loaded alsa devices a node.type sink property can 
be specified. For instance in your default.pa you might load a sink like:
    load-module module-alsa-sink device=hw:0,1 name=speakers 
sink_properties="node.type='speakers'"
Currently the following node.types are supported: 'speakers', 'front-speakers', 
'rear-speakers', 'microphone', 'jack', 'hdmi' and 'spdif'

Phone inputs/outputs, if Bluez is used, are handled by the hardwired heuristics 
and for the phone inputs/outputs loop-back streams are automatically created. 
In turn those are routed implicitly.

In case you wanted to change the loop-back stuff, pls. consult the
pa_classify_loopback_stream() function in classify.c. If needed, the table 
there can be made configurable.

>
> (C) How is the data flow coordinated between nodes?

Could you be pls. a bit more specific on this?

>
>
> I hope someone can help me with my questions.
>
>
> Cheers,
> Robert

br
-janos-

---------------------------------------------------------------------
Intel Finland Oy
Registered Address: PL 281, 00181 Helsinki Business Identity Code: 0357606 - 4 
Domiciled in Helsinki

This e-mail and any attachments may contain confidential material for the sole 
use of the intended recipient(s). Any review or distribution by others is 
strictly prohibited. If you are not the intended recipient, please contact the 
sender and delete all copies.

If you are not the addressee, please inform us immediately that you have 
received this e-mail by mistake, and delete it. We thank you for your support.

_______________________________________________
IVI mailing list
IVI@lists.tizen.org
https://lists.tizen.org/listinfo/ivi

Reply via email to