ASoC: Intel: simplify driver/card names for SOF/UCM integration
Subsystems (3)
cover ASoC: Intel: simplify driver/card names for SOF/UCM integration
As suggested by Jaroslav, this patchset simplifies legacy cards compiled with SOF: they now expose an 'SOF' driver name and an 'sof-bytcht <codec>' card name. UCM uses this driver name and additionally checks for the card name to load a configuration shared with the SST driver.
This patchset is just a rename with no functionality change. There is no modification when SOF is not used, and Kconfig for SOF are disabled when SST is enabled so no risk of interference.
This helps make 5.9 the first kernel version where SOF 'just works'(tm) on legacy platforms with no additional configuration needed (as is already the case with more recent HDaudio+DMIC platforms).
Thanks to Jaroslav for all the hard work on the alsa-lib/UCM side (the majority of the configs are already merged in alsa-ucm-conf, only minor updates are in-flight for max98090 and broadwell).
Patches sent initially on May 29, probably missed with the merge window. No changes except for the addition of Jaroslav's Reviewed-by tag.
Pierre-Louis Bossart (3):
ASoC: Intel: byt*: simplify card names for SOF uses
ASoC: Intel: cht*: simplify card names for SOF uses
ASoC: Intel: broadwell: simplify card names for SOF uses
sound/soc/intel/boards/bdw-rt5650.c | 12 +++++++++++- sound/soc/intel/boards/bdw-rt5677.c | 12 +++++++++++- sound/soc/intel/boards/broadwell.c | 12 +++++++++++- sound/soc/intel/boards/bytcht_cx2072x.c | 12 +++++++++++- sound/soc/intel/boards/bytcht_da7213.c | 12 +++++++++++- sound/soc/intel/boards/bytcht_es8316.c | 12 +++++++++++- sound/soc/intel/boards/bytcr_rt5640.c | 12 +++++++++++- sound/soc/intel/boards/bytcr_rt5651.c | 12 +++++++++++- sound/soc/intel/boards/cht_bsw_max98090_ti.c | 12 +++++++++++- sound/soc/intel/boards/cht_bsw_nau8824.c | 12 +++++++++++- sound/soc/intel/boards/cht_bsw_rt5645.c | 17 +++++++++++++++-- sound/soc/intel/boards/cht_bsw_rt5672.c | 12 +++++++++++- 12 files changed, 136 insertions(+), 13 deletions(-)
Signature · 1 line
2.20.1
PATCH RESEND 1/3 ASoC: Intel: byt*: 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 byt* 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.
--- sound/soc/intel/boards/bytcht_cx2072x.c | 12 +++++++++++- sound/soc/intel/boards/bytcht_da7213.c | 12 +++++++++++- sound/soc/intel/boards/bytcht_es8316.c | 12 +++++++++++- sound/soc/intel/boards/bytcr_rt5640.c | 12 +++++++++++- sound/soc/intel/boards/bytcr_rt5651.c | 12 +++++++++++- 5 files changed, 55 insertions(+), 5 deletions(-)
sound/soc/intel/boards/bytcht_cx2072x.c +11 -1
@@ -205,9 +205,19 @@ static struct snd_soc_dai_link byt_cht_cx2072x_dais[] = { }, }; +#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 cx2072x"/* card name will be 'sof-bytcht cx2072x' */ +#define DRIVER_NAME "SOF" +#else +#define CARD_NAME "bytcht-cx2072x" +#define DRIVER_NAME NULL/* card name will be used for driver name */ +#endif +/* SoC card */ static struct snd_soc_card byt_cht_cx2072x_card = { - .name ="bytcht-cx2072x" , + .name =CARD_NAME , + .driver_name =DRIVER_NAME , .owner =THIS_MODULE , .dai_link = byt_cht_cx2072x_dais, .num_links =ARRAY_SIZE (byt_cht_cx2072x_dais),
sound/soc/intel/boards/bytcht_da7213.c +11 -1
@@ -205,9 +205,19 @@ static struct snd_soc_dai_link 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 da7213"/* card name will be 'sof-bytcht da7213' */ +#define DRIVER_NAME "SOF" +#else +#define CARD_NAME "bytcht-da7213" +#define DRIVER_NAME NULL/* card name will be used for driver name */ +#endif +/* SoC card */ static struct snd_soc_card bytcht_da7213_card = { - .name ="bytcht-da7213" , + .name =CARD_NAME , + .driver_name =DRIVER_NAME , .owner =THIS_MODULE , .dai_link = dailink, .num_links =ARRAY_SIZE (dailink),
sound/soc/intel/boards/bytcht_es8316.c +11 -1
@@ -407,8 +407,18 @@ static int byt_cht_es8316_resume(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 es8316"/* card name will be 'sof-bytcht es8316' */ +#define DRIVER_NAME "SOF" +#else +#define CARD_NAME "bytcht-es8316" +#define DRIVER_NAME NULL/* card name will be used for driver name */ +#endif +static struct snd_soc_card byt_cht_es8316_card = { - .name ="bytcht-es8316" , + .name =CARD_NAME , + .driver_name =DRIVER_NAME , .owner =THIS_MODULE , .dai_link = byt_cht_es8316_dais, .num_links =ARRAY_SIZE (byt_cht_es8316_dais),
sound/soc/intel/boards/bytcr_rt5640.c +11 -1
@@ -1127,8 +1127,18 @@ static int byt_rt5640_resume(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 rt5640"/* card name will be 'sof-bytcht rt5640' */ +#define DRIVER_NAME "SOF" +#else +#define CARD_NAME "bytcr-rt5640" +#define DRIVER_NAME NULL/* card name will be used for driver name */ +#endif +static struct snd_soc_card byt_rt5640_card = { - .name ="bytcr-rt5640" , + .name =CARD_NAME , + .driver_name =DRIVER_NAME , .owner =THIS_MODULE , .dai_link = byt_rt5640_dais, .num_links =ARRAY_SIZE (byt_rt5640_dais),
sound/soc/intel/boards/bytcr_rt5651.c +11 -1
@@ -827,8 +827,18 @@ static int byt_rt5651_resume(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 rt5651"/* card name will be 'sof-bytcht rt5651' */ +#define DRIVER_NAME "SOF" +#else +#define CARD_NAME "bytcr-rt5651" +#define DRIVER_NAME NULL/* card name will be used for driver name */ +#endif +static struct snd_soc_card byt_rt5651_card = { - .name ="bytcr-rt5651" , + .name =CARD_NAME , + .driver_name =DRIVER_NAME , .owner =THIS_MODULE , .dai_link = byt_rt5651_dais, .num_links =ARRAY_SIZE (byt_rt5651_dais),
Signature · 1 line
2.20.1
PATCH RESEND 2/3 ASoC: Intel: cht*: simplify card names for SOF uses
In reply to Pierre-Louis BossartBlindly 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.
--- sound/soc/intel/boards/cht_bsw_max98090_ti.c | 12 +++++++++++- sound/soc/intel/boards/cht_bsw_nau8824.c | 12 +++++++++++- sound/soc/intel/boards/cht_bsw_rt5645.c | 17 +++++++++++++++-- sound/soc/intel/boards/cht_bsw_rt5672.c | 12 +++++++++++- 4 files changed, 48 insertions(+), 5 deletions(-)
sound/soc/intel/boards/cht_bsw_max98090_ti.c +11 -1
@@ -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),
sound/soc/intel/boards/cht_bsw_nau8824.c +11 -1
@@ -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),
sound/soc/intel/boards/cht_bsw_rt5645.c +15 -2
@@ -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),
sound/soc/intel/boards/cht_bsw_rt5672.c +11 -1
@@ -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),
Signature · 1 line
2.20.1
PATCH RESEND 3/3 ASoC: Intel: broadwell: simplify card names for SOF uses
In reply to Pierre-Louis BossartBlindly 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.
--- sound/soc/intel/boards/bdw-rt5650.c | 12 +++++++++++- sound/soc/intel/boards/bdw-rt5677.c | 12 +++++++++++- sound/soc/intel/boards/broadwell.c | 12 +++++++++++- 3 files changed, 33 insertions(+), 3 deletions(-)
sound/soc/intel/boards/bdw-rt5650.c +11 -1
@@ -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),
sound/soc/intel/boards/bdw-rt5677.c +11 -1
@@ -404,9 +404,19 @@ static int bdw_rt5677_resume_post(struct snd_soc_card *card)return 0 ; } +#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 rt5677"/* card name will be 'sof-bdw rt5677' */ +#define DRIVER_NAME "SOF" +#else +#define CARD_NAME "bdw-rt5677" +#define DRIVER_NAME NULL/* card name will be used for driver name */ +#endif +/* ASoC machine driver for Broadwell DSP + RT5677 */ static struct snd_soc_card bdw_rt5677_card = { - .name ="bdw-rt5677" , + .name =CARD_NAME , + .driver_name =DRIVER_NAME , .owner =THIS_MODULE , .dai_link = bdw_rt5677_dais, .num_links =ARRAY_SIZE (bdw_rt5677_dais),
sound/soc/intel/boards/broadwell.c +11 -1
@@ -291,9 +291,19 @@ static int broadwell_resume(struct snd_soc_card *card){return 0 ; } +#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 rt286"/* card name will be 'sof-bdw rt286' */ +#define DRIVER_NAME "SOF" +#else +#define CARD_NAME "broadwell-rt286" +#define DRIVER_NAME NULL/* card name will be used for driver name */ +#endif +/* broadwell audio machine driver for WPT + RT286S */ static struct snd_soc_card broadwell_rt286 = { - .name ="broadwell-rt286" , + .name =CARD_NAME , + .driver_name =DRIVER_NAME , .owner =THIS_MODULE , .dai_link = broadwell_rt286_dais, .num_links =ARRAY_SIZE (broadwell_rt286_dais),
Signature · 1 line
2.20.1
Mark Brown
maintainerQuoted 11 lines · Pierre-Louis Bossart
As suggested by Jaroslav, this patchset simplifies legacy cards compiled with SOF: they now expose an 'SOF' driver name and an 'sof-bytcht <codec>' card name. UCM uses this driver name and additionally checks for the card name to load a configuration shared with the SST driver.
This patchset is just a rename with no functionality change. There is no modification when SOF is not used, and
Kconfigfor SOF are disabled when SST is enabled so no risk of interference.[...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/3] ASoC: Intel: byt*: simplify card names for SOF uses
commit: b4ecd58b01fbd9420bb3d8911c526dc877319df5
[2/3] ASoC: Intel: cht*: simplify card names for SOF uses
commit: 7bfbddfc98414ab52803ffd26d0dc65328d373b1
[3/3] ASoC: Intel: broadwell: simplify card names for SOF uses
commit: a5f610c0fa7ef819ab04a958dcde574c20b2f55bAll being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark