How about making profile switch more general?

1. When a card adds a new profile, add a property "intended roles" to the 
profile, same as what we do to a device:
  Add a line to proplist.h
  #define PA_PROP_DEVICE_PROFILE_DESCRIPTION     "device.profile. 
intended_roles"

  And change the API to create a profile:
  From pa_card_profile *pa_card_profile_new(const char *name, const char 
*description, size_t extra);
  To pa_card_profile *pa_card_profile_new(const char *name, pa_profile_new_data 
*data);
  The "pa_profile_new_data" structure can contain both a description and the 
intended roles property.
   

2. Then the module-device-switch can query the profile intended roles and 
select the best profile for a stream.

Is this doable? If yes, I can write a patch for it and change the Bluetooth 
device module to add "phone" property for "hsp" profile?
And for ALSA, we can just make a little update to use the new 
"pa_card_profile_new" for the moment.

Thanks
Mengdong
_______________________________________________
pulseaudio-discuss mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss

Reply via email to