OSDN Git Service

ASoC: Intel: bytcr_rt5640: Set card long_name based on quirks
authorHans de Goede <hdegoede@redhat.com>
Sun, 13 May 2018 07:24:35 +0000 (09:24 +0200)
committerMark Brown <broonie@kernel.org>
Thu, 17 May 2018 06:47:28 +0000 (15:47 +0900)
commit063422ca2a9de238401c3848c1b3641c07b6316c
treee7052484b28f15af59ed9b04818edf316f54f7a0
parentec8e8418ff7d3c5c295a44dfd7170c3d1e0a441e
ASoC: Intel: bytcr_rt5640: Set card long_name based on quirks

Many X86 devices using a BYT SoC + RT5640 codec are cheap devices with
generic DMI strings, causing snd_soc_set_dmi_name() to fail to set a
long_name, making it impossible for userspace to have a correct UCM
profile which only uses inputs / outputs which are actually hooked up
on the device.

Our quirks already specify which input the internal mic is connected to
and if a single (mono) speaker is used or if the device has stereo
speakers.

This commit sets a long_name based on the quirks so that userspace can
have UCM profiles doing the right thing based on the long_name.

Note that if we ever encounter the need for a special UCM profile for
some device we can add a quirk to set a specific long_name for the
device,

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/boards/bytcr_rt5640.c