mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-02 09:01:48 -05:00
ucm: Load device-specific configuration file based on the card long name
Intel DSP platform drivers are used by many different devices. For user space to differentiate them, ASoC machine drivers may use the DMI info (vendor-product-version-board) as card long name. Possible card long names are: DellInc.-XPS139343-01-0310JH ASUSTeKCOMPUTERINC.-T100TA-1.0-T100TA Circuitco-MinnowboardMaxD0PLATFORM-D0-MinnowBoardMAX ... If we want to define a device-specific UCM config file for a card, we need to use the card long name as the name of both the directory that contains the UCM config file and the UCM config file itself, like longname/longname.conf When being asked to load configuration file of a card, UCM will try to find the card in the local machine and get its long name. If the card long name is available, try to load the file longname/longname.conf to get the best device-specific configuration; if this file is not available, fall back to load the default configuration file shortname/shortname.conf as before. This update is backward compatible, because if ASoC machine drivers don't explicity use DMI or other means to set the card long name, ASoC core will use the card short name as the long name. And so UCM will load the config file that matches both the card short name and the long name. Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
2b9b3f0134
commit
4b9297e65f
2 changed files with 97 additions and 4 deletions
|
|
@ -191,6 +191,8 @@ struct use_case_verb {
|
|||
*/
|
||||
struct snd_use_case_mgr {
|
||||
char *card_name;
|
||||
char card_long_name[MAX_CARD_LONG_NAME];
|
||||
char conf_file_name[MAX_CARD_LONG_NAME];
|
||||
char *comment;
|
||||
|
||||
/* use case verb, devices and modifier configs parsed from files */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue