Hello,

The support for QT in Tizen has been quite unofficial and we have not
been testing this what comes to the audio routing. Basically you are
able to route from pulseaudio and gstreamer* explicitly (meaning
there's nothing happening automatically, but you are saying where you
want to route).

QT Multimedia seems to have some audiooutputcontrol class, which would
have the API to set the routing target explicitly, but this would have
to bubble down to gstreamer and on to pulseaudio. I really don't know
if this is working or not (has it even ever been implemented). So this
way you could set your qt element to go to which output you want.

***********************************************
* There is a clear bug at the moment in gstreamer's pulsesink and it
overrides the users setting for target routing device (however this
can and should be fixed)

Example how gstreamer "explicit routing" should work:
gst-launch-1.0 playbin uri=file:///test.mp3 audio-sink="pulsesink 
device="alsa_output.usb-Logitech_Logitech_USB_Headset-00-Headset.analog-stereo""
*************************************************

pulseaudio-module-murphy-ivi is based on concept of explicit and
implicit routing. In explicit routing the user is himself defining the
routing target and pulseaudio-module-murphy-ivi will honor that (you
are on your own what comes to automatic routing). Implicit routing
means that pulseaudio-module-murphy-ivi will try to categorize you to:

1) certain "class" of applications
2) which are bind to certain audio "zone" and
3) on to that zones "routing group".

Routing group is queue or routing targets to which you are
automatically routed depending on the situation. So for example
if usb is appearing or bluetooth is disappearing you will be
automatically routed in the next target.

So you have to first decide do you want to take responsibility of your
own routing or give the resposibility to
pulseaudio-module-murphy-ivi. If you want to do it with
pulseaudio-module-murphy-ivi there are certain boundary conditions
that have to be fulfilled:

1) We have to somehow be able to understand, which application class you belong 
to
2) and to which audio zone you want to belong

There are currently couple of  mechanism to do this:
1) You are telling us this info with properties
2) We do binary name mapping in murphy-ivi.lua
3) We get this info from your environment variables (this is still to be 
released feature)

Example from gstreamer:
gst-launch-1.0 playbin uri=file:///test.mp3 audio-sink="pulsesink 
stream-properties="props,media.role=music,zone.name=passanger1""

This means you are telling pulseaudio-module-murphy-ivi that you are
playing music (media.role=music) and that you wanted to belong to zone
of passanger2. If you check murphy-ivi.lua configuration file you'll
see that with media.role=music you will be categorized as application
class player and that you want to use the zone passenger1's routing
group, which is defined also in the same file.

If you don't set up some of these params you will be assigned some default
application class and zone (which will probably be player/driver).

-- Binary mapping --

We have a mechanism in murphy-ivi.lua to do "binary mapping", which
means we can bind a application binary to belong always to a certain
application class. This is done for those apps that are legacy or
don't otherwise set the properties and from policy point of view we
still want to enforce them to behave in a certain way. You can see an
example of this in the murphy-ivi.lua also.

If in your use case you are using 2 different binaries, this mechanism
would be the way to go (if we don't get any explicit targets or
implicit parameters through QT). If you have 1 binary with multiple QT
multimedia elements and no way of sending params down, even this
mechanism would not work (because it is the same binary). The issue I
see here is that we don't at the moment have binary->zone mapping in
the murphy-ivi.lua configuration. So you would have the limitation
that you have to lock certain application classes the certain zones
and then use them consistently. So for example saying "Player" will
always go to zone "Driver" and "Event" will always go to "Passenger1"

Also depending on the sw stack above us, it might be really difficult
for us to dig out the binary name (for example crosswalk, which is
using separate rendering process)

-- Env variables --

We are experimenting with a feature, where you can set the routing
zone as an environment variable and we could read that and you would
be routed to different zone (and hence possibly to different sound
card if defined so)

br,
Jaska


P.S. I hope you read the other mail I sent to this list concerning
this issue, there was some concrete examples of the murphy-ivi.lua
configuration.

________________________________________
From: Yang Andy [[email protected]]
Sent: Wednesday, December 17, 2014 10:36 AM
To: Uimonen, Jaska; [email protected]
Subject: RE: [IVI] [TizenIVI3.0]Question about Multi Audio stream routing

Hi Jaska

Thank you very much for your reply.

> It would be helpful if you could give more concrete example of your
> use case and hw configuration.

My use case is:

I want to play different mp3 files for driver and passanger with two different 
applications
or the same application which is deployed by two QTMultiMedia components.

Driver:HMI-->QT-->GStreamer-->PulseAudio-->ALSA--SoundCard1
Passanger:HMI-->QT-->GStreamer-->PulseAudio-->ALSA--SoundCard2

Is it possibility to modify Gstreamer pipeline of QT MultiMedia Framwork for 
fulfill my requirement?

> P.S. there are possibilities to do "automatic" routing in a module inside
> pulseaudio (pulseaudio-module-murphy-ivi). So you can route based
> on your binary name or some other properties you have given to  pulseaudio.

What is the meaning of other properties?Could you give me more detail?

And if i use pulseaudio-module-murphy-ivi, which modules do i need to modify 
except modifying xxxx.lua configure file?

Best regards,

Andy
> From: [email protected]
> To: [email protected]; [email protected]
> Subject: RE: [IVI] [TizenIVI3.0]Question about Multi Audio stream routing
> Date: Mon, 15 Dec 2014 07:20:19 +0000
>
> Hi,
>
> Sound card should appear as sink (or many sinks)in pulseaudio,
> to where you can then explicitly route.
>
> However there are exceptions:
> 1) If your extra sound card is mapped as separate alsa pcm,
> pulseaudio should automatically create a sink for you.
>
> 2) If the extra output you want to route, is a alsa "sub pcm"
> like hdmi is in many pc sound cards, you have to manually load these
> in pulseaudio configuration or create a multisink profile in pulseaudio.
>
> The above things you can check with aplay or amixer commands.
>
> You can give the routing target to gstreamer as gsreamer pulsesink
> "device" property. However I'm not sure if this is anyway mapped
> through to QT. We haven't officially so far supported qt very well.
>
> It would be helpful if you could give more concrete example of your
> use case and hw configuration.
>
> br,
> Jaska
>
>
> P.S. there are possibilities to do "automatic" routing in a module inside
> pulseaudio (pulseaudio-module-murphy-ivi). So you can route based
> on your binary name or some other properties you have given to
> pulseaudio. Unfortunately the documentation is somewhat scarce.
> Somebody else was asking the similar question and I'll try to put
> some tutorial for this to Murphy web pages as soon as I'm able.
>
>
> ________________________________________
> From: IVI [[email protected]] on behalf of Yang Andy 
> [[email protected]]
> Sent: Monday, December 15, 2014 6:33 AM
> To: [email protected]
> Subject: [IVI] [TizenIVI3.0]Question about Multi Audio stream routing
>
> Hi everyone
>
> This is a question about Multi audio stream routing in TizenIVI3.0 .
>
> [Use Case]
> There are two media players playing different mp3 files at the same time.
> I want to rount them to different sound card.
>
>
> [Soft arch]
> HMI--->QT--->gstreamer--->pluseaudio--->alsa
>
> [Question]
> I think i can use paplay command to play the file to particular sink,
>
> but in the TizenIVI MultiMedia software architecture,How to route them to 
> different sound card?
>
> Where should I config the route? Gstreamer or pluseaudio or alsa?
>
> Best Regards
>
>
> Andy
>
> ---------------------------------------------------------------------
> 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.
>
---------------------------------------------------------------------
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.

_______________________________________________
IVI mailing list
[email protected]
https://lists.tizen.org/listinfo/ivi

Reply via email to