mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-27 12:15:08 +07:00
ASoC: Intel: cht*: 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-bytcht <codec_name>" pattern for all cht* 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> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20200617165616.18511-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
b4ecd58b01
commit
7bfbddfc98
@ -382,9 +382,19 @@ static struct snd_soc_dai_link cht_dailink[] = {
|
||||
},
|
||||
};
|
||||
|
||||
#if IS_ENABLED(CONFIG_SND_SOC_SOF_BAYTRAIL)
|
||||
/* use space before codec name to simplify card ID, and simplify driver name */
|
||||
#define CARD_NAME "bytcht max98090" /* card name will be 'sof-bytcht max98090 */
|
||||
#define DRIVER_NAME "SOF"
|
||||
#else
|
||||
#define CARD_NAME "chtmax98090"
|
||||
#define DRIVER_NAME NULL /* card name will be used for driver name */
|
||||
#endif
|
||||
|
||||
/* SoC card */
|
||||
static struct snd_soc_card snd_soc_card_cht = {
|
||||
.name = "chtmax98090",
|
||||
.name = CARD_NAME,
|
||||
.driver_name = DRIVER_NAME,
|
||||
.owner = THIS_MODULE,
|
||||
.dai_link = cht_dailink,
|
||||
.num_links = ARRAY_SIZE(cht_dailink),
|
||||
|
@ -231,9 +231,19 @@ static struct snd_soc_dai_link cht_dailink[] = {
|
||||
},
|
||||
};
|
||||
|
||||
#if IS_ENABLED(CONFIG_SND_SOC_SOF_BAYTRAIL)
|
||||
/* use space before codec name to simplify card ID, and simplify driver name */
|
||||
#define CARD_NAME "bytcht nau8824" /* card name will be 'sof-bytcht nau8824 */
|
||||
#define DRIVER_NAME "SOF"
|
||||
#else
|
||||
#define CARD_NAME "chtnau8824"
|
||||
#define DRIVER_NAME NULL /* card name will be used for driver name */
|
||||
#endif
|
||||
|
||||
/* SoC card */
|
||||
static struct snd_soc_card snd_soc_card_cht = {
|
||||
.name = "chtnau8824",
|
||||
.name = CARD_NAME,
|
||||
.driver_name = DRIVER_NAME,
|
||||
.owner = THIS_MODULE,
|
||||
.dai_link = cht_dailink,
|
||||
.num_links = ARRAY_SIZE(cht_dailink),
|
||||
|
@ -479,9 +479,21 @@ static struct snd_soc_dai_link cht_dailink[] = {
|
||||
},
|
||||
};
|
||||
|
||||
#if IS_ENABLED(CONFIG_SND_SOC_SOF_BAYTRAIL)
|
||||
/* use space before codec name to simplify card ID, and simplify driver name */
|
||||
#define CARD_RT5645_NAME "bytcht rt5645" /* card name 'sof-bytcht rt5645' */
|
||||
#define CARD_RT5650_NAME "bytcht rt5650" /* card name 'sof-bytcht rt5650' */
|
||||
#define DRIVER_NAME "SOF"
|
||||
#else
|
||||
#define CARD_RT5645_NAME "chtrt5645"
|
||||
#define CARD_RT5650_NAME "chtrt5650"
|
||||
#define DRIVER_NAME NULL /* card name will be used for driver name */
|
||||
#endif
|
||||
|
||||
/* SoC card */
|
||||
static struct snd_soc_card snd_soc_card_chtrt5645 = {
|
||||
.name = "chtrt5645",
|
||||
.name = CARD_RT5645_NAME,
|
||||
.driver_name = DRIVER_NAME,
|
||||
.owner = THIS_MODULE,
|
||||
.dai_link = cht_dailink,
|
||||
.num_links = ARRAY_SIZE(cht_dailink),
|
||||
@ -494,7 +506,8 @@ static struct snd_soc_card snd_soc_card_chtrt5645 = {
|
||||
};
|
||||
|
||||
static struct snd_soc_card snd_soc_card_chtrt5650 = {
|
||||
.name = "chtrt5650",
|
||||
.name = CARD_RT5650_NAME,
|
||||
.driver_name = DRIVER_NAME,
|
||||
.owner = THIS_MODULE,
|
||||
.dai_link = cht_dailink,
|
||||
.num_links = ARRAY_SIZE(cht_dailink),
|
||||
|
@ -379,9 +379,19 @@ static int cht_resume_post(struct snd_soc_card *card)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if IS_ENABLED(CONFIG_SND_SOC_SOF_BAYTRAIL)
|
||||
/* use space before codec name to simplify card ID, and simplify driver name */
|
||||
#define CARD_NAME "bytcht rt5672" /* card name will be 'sof-bytcht rt5672' */
|
||||
#define DRIVER_NAME "SOF"
|
||||
#else
|
||||
#define CARD_NAME "cht-bsw-rt5672"
|
||||
#define DRIVER_NAME NULL /* card name will be used for driver name */
|
||||
#endif
|
||||
|
||||
/* SoC card */
|
||||
static struct snd_soc_card snd_soc_card_cht = {
|
||||
.name = "cht-bsw-rt5672",
|
||||
.name = CARD_NAME,
|
||||
.driver_name = DRIVER_NAME,
|
||||
.owner = THIS_MODULE,
|
||||
.dai_link = cht_dailink,
|
||||
.num_links = ARRAY_SIZE(cht_dailink),
|
||||
|
Loading…
Reference in New Issue
Block a user