]> git.alsa-project.org Git - alsa-lib.git/commit
ucm: Load device-specific configuration file based on the card long name
authorMengdong Lin <mengdong.lin@linux.intel.com>
Wed, 18 Jan 2017 03:53:35 +0000 (11:53 +0800)
committerTakashi Iwai <tiwai@suse.de>
Wed, 18 Jan 2017 10:55:20 +0000 (11:55 +0100)
commit4b9297e65f541f1a6c1b4a036f66936b9cafe030
tree4d1797ac41c2bd069fb5588d35225b8b228081f6
parent2b9b3f013467765219c8ab8a50943d3c7db68f75
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>
src/ucm/parser.c
src/ucm/ucm_local.h