Hi Luiz, On Fri, Aug 17, 2012 at 4:21 PM, Luiz Augusto von Dentz <luiz.dentz at gmail.com> wrote: > From: Luiz Augusto von Dentz <luiz.von.dentz at intel.com> > > This means only profiles on PA_BT_AUDIO_STATE_PLAYING state will have > bigger priority than 'Off'. > --- > src/modules/bluetooth/module-bluetooth-device.c | 8 +++++--- > 1 file changed, 5 insertions(+), 3 deletions(-) > > diff --git a/src/modules/bluetooth/module-bluetooth-device.c b/src/modules/bluetooth/module-bluetooth-device.c > index 6e3f81e..af56302 100644 > --- a/src/modules/bluetooth/module-bluetooth-device.c > +++ b/src/modules/bluetooth/module-bluetooth-device.c > @@ -2140,7 +2140,7 @@ static int add_card(struct userdata *u, const pa_bluetooth_device *device) { > we are loaded with profile="hsp", for instance */ > if (pa_bluetooth_uuid_has(device->uuids, A2DP_SINK_UUID)) { > p = pa_card_profile_new("a2dp", _("High Fidelity Playback (A2DP)"), sizeof(enum profile)); > - p->priority = 10; > + p->priority = device->audio_sink_state * 10; I have an alternative patchset (to be submitted soon) that addressed the same problem in a different way (and with a bigger scope). I would like you to consider this approach before using state-dependant port priorities. Cheers, Mikel