[PATCH] profile-switcher: New module to switch card profiles based on roles

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2011-11-01 at 17:24 +0800, Lin, Mengdong wrote:
> 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.

Other than on Bluetooth (and *maybe* USB devices with sufficient
metadata), there really isn't a way to accurately tag a sink (especially
ALSA sink) with an intended role.

> 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?

This is already done in the bluetooth module.

Regards,
Arun



[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux