diff options
author | Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> | 2020-06-17 11:56:16 -0500 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2020-06-17 20:58:32 +0100 |
commit | a5f610c0fa7ef819ab04a958dcde574c20b2f55b (patch) | |
tree | 96b52209d539bf9256ca2f1c878aee1ac79e1751 /sound/soc/intel/boards/bdw-rt5650.c | |
parent | 7bfbddfc98414ab52803ffd26d0dc65328d373b1 (diff) | |
download | lwn-a5f610c0fa7ef819ab04a958dcde574c20b2f55b.tar.gz lwn-a5f610c0fa7ef819ab04a958dcde574c20b2f55b.zip |
ASoC: Intel: broadwell: simplify card names for SOF uses
Blindly adding an sof- prefix to the card name is not user friendly
and causes UCM issues with a driver name truncated to 16 characters.
Simplify to use "sof-bdw <codec_name>" pattern for all Broadwell
machine drivers. The sof- prefix is added by the core. A generic "SOF"
driver name is used, and UCMv2 will detect the configuration for this
driver by testing the card name.
Legacy uses are unmodified.
Suggested-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20200617165616.18511-4-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/intel/boards/bdw-rt5650.c')
-rw-r--r-- | sound/soc/intel/boards/bdw-rt5650.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/sound/soc/intel/boards/bdw-rt5650.c b/sound/soc/intel/boards/bdw-rt5650.c index a97e912adf4b..482d501b2f43 100644 --- a/sound/soc/intel/boards/bdw-rt5650.c +++ b/sound/soc/intel/boards/bdw-rt5650.c @@ -297,9 +297,19 @@ static struct snd_soc_dai_link bdw_rt5650_dais[] = { }, }; +#if IS_ENABLED(CONFIG_SND_SOC_SOF_BROADWELL) +/* use space before codec name to simplify card ID, and simplify driver name */ +#define CARD_NAME "bdw rt5650" /* card name will be 'sof-bdw rt5650' */ +#define DRIVER_NAME "SOF" +#else +#define CARD_NAME "bdw-rt5650" +#define DRIVER_NAME NULL /* card name will be used for driver name */ +#endif + /* ASoC machine driver for Broadwell DSP + RT5650 */ static struct snd_soc_card bdw_rt5650_card = { - .name = "bdw-rt5650", + .name = CARD_NAME, + .driver_name = DRIVER_NAME, .owner = THIS_MODULE, .dai_link = bdw_rt5650_dais, .num_links = ARRAY_SIZE(bdw_rt5650_dais), |