Hi Mikel,

On Fri, Aug 17, 2012 at 6:07 PM, Mikel Astiz <[email protected]> wrote:
> Hi Luiz,
>
> On Fri, Aug 17, 2012 at 4:21 PM, Luiz Augusto von Dentz
> <[email protected]> wrote:
>> From: Luiz Augusto von Dentz <[email protected]>
>>
>> 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.

iirc you had a series that did this in discovery which prevent the
card to be loaded if not playing which could prevent some use cases,
anyway the card loading always take into account the profile priority
(port priority is latter done according to profile priority) so you
gonna have to touch that code if you want to do things differently.


-- 
Luiz Augusto von Dentz
_______________________________________________
pulseaudio-discuss mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss

Reply via email to