ASoC: add control components management
Subsystems (3)
Jaroslav Kysela
maintainerPATCH 1/2 ASoC: add control components management
This ASCII string can carry additional information about soundcard components or configuration. Add the possibility to set this string via the ASoC card.
--- include/sound/soc.h | 1 + sound/soc/soc-core.c | 13 +++++++++++++ 2 files changed, 14 insertions(+)
include/sound/soc.h +1 -0
@@ -982,6 +982,7 @@ struct snd_soc_card {const char *name;const char *long_name;const char *driver_name; +const char *components;char dmi_longname[80 ];char topology_shortname[32 ];
sound/soc/soc-core.c +13 -0
@@ -2121,6 +2121,19 @@ static int snd_soc_instantiate_card(struct snd_soc_card *card)soc_setup_card_name (card->snd_card->driver, card->driver_name, card->name,1 ); +if (card->components) { +/* the current implementation of snd_component_add() accepts */ +/* multiple components in the string separated by space, */ +/* but the string collision (identical string) check might */ +/* not work correctly */ + ret =snd_component_add (card->snd_card, card->components); +if (ret <0 ) { +dev_err (card->dev,"ASoC: %s snd_component_add() failed: %d\n" , + card->name, ret); + goto probe_end; + } + } +if (card->late_probe) { ret = card->late_probe (card);if (ret <0 ) {
Signature · 5 lines
2.20.1 _______________________________________________ Alsa-devel mailing list [email protected] https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
Jaroslav Kysela
maintainerPATCH 2/2 ASoC: Intel - use control components to describe card config
Use the control interface (field 'components' in the info structure) to pass the I/O configuration details. The long card name might be used in GUI. This information should be hidden.
--- sound/soc/intel/Kconfig | 9 +++++++++ sound/soc/intel/boards/bytcht_es8316.c | 16 ++++++++++++---- sound/soc/intel/boards/bytcr_rt5640.c | 14 +++++++++++--- sound/soc/intel/boards/bytcr_rt5651.c | 26 ++++++++++++++++---------- 4 files changed, 48 insertions(+), 17 deletions(-)
sound/soc/intel/Kconfig +9 -0
@@ -47,6 +47,15 @@ config SND_SOC_INTEL_SST_FIRMWARE # Haswell/Broadwell/Baytrail legacy and will be set # when these platforms are enabled +config SND_SOC_INTEL_USE_CTL_COMPONENTS + bool "Use CTL components for I/O configuration" + help + Some drivers might pass the I/O configuration through the + soundcard's driver name in the control user space API. + The new scheme is to put this information to the components + field in the ALSA's card info structure. Say Y, if you + have ALSA user space version 1.2.2+. + config SND_SOC_INTEL_HASWELL tristate "Haswell/Broadwell Platforms" depends on SND_DMA_SGBUF
sound/soc/intel/boards/bytcht_es8316.c +12 -4
@@ -360,7 +360,7 @@ static struct snd_soc_dai_link byt_cht_es8316_dais[] = {/* SoC card */ static char codec_name[SND_ACPI_I2C_ID_LEN ]; -static char long_name[50 ];/* = "bytcht-es8316-*-spk-*-mic" */ +static char config_string[50 ];/* = long name or components */ static int byt_cht_es8316_suspend (struct snd_soc_card *card) {
@@ -572,11 +572,19 @@ static int snd_byt_cht_es8316_mc_probe(struct platform_device *pdev) } } -/* register the soc card */ -snprintf (long_name,sizeof (long_name),"bytcht-es8316-%s-spk-%s-mic" , +#if IS_ENABLED (CONFIG_SND_SOC_INTEL_USE_CTL_COMPONENTS ) +snprintf (config_string,sizeof (config_string),"cfg-spk:%s cfg-mic:%s" , + (quirk &BYT_CHT_ES8316_MONO_SPEAKER ) ?"1" :"2" , + mic_name[BYT_CHT_ES8316_MAP (quirk)]); + byt_cht_es8316_card.components = config_string; +#else +snprintf (config_string,sizeof (config_string),"bytcht-es8316-%s-spk-%s-mic" , (quirk &BYT_CHT_ES8316_MONO_SPEAKER ) ?"mono" :"stereo" , mic_name[BYT_CHT_ES8316_MAP (quirk)]); - byt_cht_es8316_card.long_name = long_name; + byt_cht_es8316_card.long_name = config_string; +#endif + +/* register the soc card */ snd_soc_card_set_drvdata (&byt_cht_es8316_card, priv); ret =devm_snd_soc_register_card (dev, &byt_cht_es8316_card);
sound/soc/intel/boards/bytcr_rt5640.c +11 -3
@@ -1080,7 +1080,7 @@ static struct snd_soc_dai_link byt_rt5640_dais[] = {static char byt_rt5640_codec_name[SND_ACPI_I2C_ID_LEN ];static char byt_rt5640_codec_aif_name[12 ];/* = "rt5640-aif[1|2]" */ static char byt_rt5640_cpu_dai_name[10 ];/* = "ssp[0|2]-port" */ -static char byt_rt5640_long_name[40 ];/* = "bytcr-rt5640-*-spk-*-mic" */ +static char byt_rt5640_config[40 ];/* = long name or components */ static int byt_rt5640_suspend (struct snd_soc_card *card) {
@@ -1303,12 +1303,20 @@ static int snd_byt_rt5640_mc_probe(struct platform_device *pdev) } } -snprintf (byt_rt5640_long_name,sizeof (byt_rt5640_long_name), +#if IS_ENABLED (CONFIG_SND_SOC_INTEL_USE_CTL_COMPONENTS ) +snprintf (byt_rt5640_config,sizeof (byt_rt5640_config), +"cfg-spk:%s cfg-mic:%s" , + (byt_rt5640_quirk &BYT_RT5640_MONO_SPEAKER ) ?"1" :"2" , + map_name[BYT_RT5640_MAP (byt_rt5640_quirk)]); + byt_rt5640_card.components = byt_rt5640_config; +#else +snprintf (byt_rt5640_config,sizeof (byt_rt5640_config),"bytcr-rt5640-%s-spk-%s-mic" , (byt_rt5640_quirk &BYT_RT5640_MONO_SPEAKER ) ?"mono" :"stereo" , map_name[BYT_RT5640_MAP (byt_rt5640_quirk)]); - byt_rt5640_card.long_name = byt_rt5640_long_name; + byt_rt5640_card.long_name = byt_rt5640_config; +#endif /* override plaform name, if required */ platform_name = mach->mach_params.platform;
sound/soc/intel/boards/bytcr_rt5651.c +16 -10
@@ -797,7 +797,7 @@ static struct snd_soc_dai_link byt_rt5651_dais[] = {static char byt_rt5651_codec_name[SND_ACPI_I2C_ID_LEN ];static char byt_rt5651_codec_aif_name[12 ];/* = "rt5651-aif[1|2]" */ static char byt_rt5651_cpu_dai_name[10 ];/* = "ssp[0|2]-port" */ -static char byt_rt5651_long_name[50 ];/* = "bytcr-rt5651-*-spk-*-mic[-swapped-hp]" */ +static char byt_rt5651_config[50 ];/* = long name or components */ static int byt_rt5651_suspend (struct snd_soc_card *card) {
@@ -876,7 +876,6 @@ static int snd_byt_rt5651_mc_probe(struct platform_device *pdev)const char *platform_name;struct acpi_device *adev;struct device *codec_dev; -const char *hp_swapped;bool is_bytcr = false;int ret_val =0 ;int dai_index =0 ;
@@ -1080,17 +1079,24 @@ static int snd_byt_rt5651_mc_probe(struct platform_device *pdev) } } -if (byt_rt5651_quirk &BYT_RT5651_HP_LR_SWAPPED ) - hp_swapped ="-hp-swapped" ; -else - hp_swapped ="" ; - -snprintf (byt_rt5651_long_name,sizeof (byt_rt5651_long_name), +#if IS_ENABLED (CONFIG_SND_SOC_INTEL_USE_CTL_COMPONENTS ) +snprintf (byt_rt5651_config,sizeof (byt_rt5651_config), +"cfg-spk:%s cfg-mic:%s%s" , + (byt_rt5651_quirk &BYT_RT5651_MONO_SPEAKER ) ?"1" :"2" , + mic_name[BYT_RT5651_MAP (byt_rt5651_quirk)], + (byt_rt5651_quirk &BYT_RT5651_HP_LR_SWAPPED ) ? +" cfg-hp:lrswap" :"" ); + byt_rt5651_card.components = byt_rt5651_config; +#else +snprintf (byt_rt5651_config,sizeof (byt_rt5651_config),"bytcr-rt5651-%s-spk-%s-mic%s" , (byt_rt5651_quirk &BYT_RT5651_MONO_SPEAKER ) ?"mono" :"stereo" , - mic_name[BYT_RT5651_MAP (byt_rt5651_quirk)], hp_swapped); - byt_rt5651_card.long_name = byt_rt5651_long_name; + mic_name[BYT_RT5651_MAP (byt_rt5651_quirk)], + (byt_rt5651_quirk &BYT_RT5651_HP_LR_SWAPPED ) ? +"-hp-swapped" :"" ); + byt_rt5651_card.long_name = byt_rt5651_config; +#endif /* override plaform name, if required */ platform_name = mach->mach_params.platform;
Signature · 5 lines
2.20.1 _______________________________________________ Alsa-devel mailing list [email protected] https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
Re: [alsa-devel] [PATCH 2/2] ASoC: Intel - use control components to describe card config
Quoted 21 lines · Jaroslav Kysela
Use the control interface (field 'components' in the info structure) to pass the I/O configuration details. The long card name might be used in GUI. This information should be hidden.
Signed-off-by Jaroslav Kysela <[email protected]>Cc Pierre-Louis Bossart <[email protected]>Cc Mark Brown <[email protected]>--- sound/soc/intel/Kconfig | 9 +++++++++ sound/soc/intel/boards/bytcht_es8316.c | 16 ++++++++++++---- sound/soc/intel/boards/bytcr_rt5640.c | 14 +++++++++++--- sound/soc/intel/boards/bytcr_rt5651.c | 26 ++++++++++++++++---------- 4 files changed, 48 insertions(+), 17 deletions(-)sound/soc/intel/Kconfig +0
-0@@ -47,6 +47,15 @@ config SND_SOC_INTEL_SST_FIRMWARE # Haswell/Broadwell/Baytrail legacy and will be set # when these platforms are enabled
sound/soc/intel/Kconfig config SND_SOC_INTEL_SST_FIRMWARE · line 58
Quoted 10 lines
sound/soc/intel/Kconfig +9
-0+config SND_SOC_INTEL_USE_CTL_COMPONENTS + bool "Use CTL components for I/O configuration" + help + Some drivers might pass the I/O configuration through the + soundcard's driver name in the control user space API. + The new scheme is to put this information to the components + field in the ALSA's card info structure. Say Y, if you + have ALSA user space version 1.2.2+. +
If this is at the board level, then maybe move this to sound/soc/intel/boards/Kconfig
I am not sure about the alsa-lib dependency, it's a bit odd, isn't it?
shouldn't this be handled via protocol versions? or a configuration provided by alsa-lib somehow?
_______________________________________________
Alsa-devel mailing list
[email protected]
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
Jaroslav Kysela
maintainerRe: [alsa-devel] [PATCH 2/2] ASoC: Intel - use control components to describe card config
Dne 19. 11. 19 v 20:12 Pierre-Louis Bossart napsal(a):
Quoted 38 lines · Jaroslav Kysela
Quoted 21 lines
Use the control interface (field 'components' in the info structure) to pass the I/O configuration details. The long card name might be used in GUI. This information should be hidden.
Signed-off-by Jaroslav Kysela <[email protected]>Cc Pierre-Louis Bossart <[email protected]>Cc Mark Brown <[email protected]>--- sound/soc/intel/Kconfig | 9 +++++++++ sound/soc/intel/boards/bytcht_es8316.c | 16 ++++++++++++---- sound/soc/intel/boards/bytcr_rt5640.c | 14 +++++++++++--- sound/soc/intel/boards/bytcr_rt5651.c | 26 ++++++++++++++++---------- 4 files changed, 48 insertions(+), 17 deletions(-)sound/soc/intel/Kconfig +0
-0@@ -47,6 +47,15 @@ config SND_SOC_INTEL_SST_FIRMWARE # Haswell/Broadwell/Baytrail legacy and will be set # when these platforms are enabledsound/soc/intel/Kconfig config SND_SOC_INTEL_SST_FIRMWARE · line 58
Quoted 10 lines
sound/soc/intel/Kconfig +9
-0+config SND_SOC_INTEL_USE_CTL_COMPONENTS + bool "Use CTL components for I/O configuration" + help + Some drivers might pass the I/O configuration through the + soundcard's driver name in the control user space API. + The new scheme is to put this information to the components + field in the ALSA's card info structure. Say Y, if you + have ALSA user space version 1.2.2+. +If this is at the board level, then maybe move this to
sound/soc/intel/boards/Kconfig
Quoted 3 lines
I am not sure about the alsa-lib dependency, it's a bit odd, isn't it? shouldn't this be handled via protocol versions? or a configuration provided by alsa-lib somehow?
It's not about the protocol. It's about to move this type of information to another place. I can remove the ALSA version sentence from the help, because it's just a hint. I would like to create ucm2 configurations based on this rather than the misused long card names.
Jaroslav
Signature · 6 lines
Jaroslav Kysela <[email protected]> Linux Sound Maintainer; ALSA Project; Red Hat, Inc. _______________________________________________ Alsa-devel mailing list [email protected] https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
Re: [alsa-devel] [PATCH 2/2] ASoC: Intel - use control components to describe card config
Quoted 14 lines
Quoted 14 lines
sound/soc/intel/Kconfig config SND_SOC_INTEL_SST_FIRMWARE · line 58
Quoted 10 lines
sound/soc/intel/Kconfig +9
-0+config SND_SOC_INTEL_USE_CTL_COMPONENTS + bool "Use CTL components for I/O configuration" + help + Some drivers might pass the I/O configuration through the + soundcard's driver name in the control user space API. + The new scheme is to put this information to the components + field in the ALSA's card info structure. Say Y, if you + have ALSA user space version 1.2.2+. +If this is at the board level, then maybe move this to
sound/soc/intel/boards/Kconfig
Quoted 5 lines
Quoted 3 lines
I am not sure about the alsa-lib dependency, it's a bit odd, isn't it? shouldn't this be handled via protocol versions? or a configuration provided by alsa-lib somehow?
It's not about the protocol. It's about to move this type of information to another place. I can remove the ALSA version sentence from the help, because it's just a hint. I would like to create ucm2 configurations based on this rather than the misused long card names.
I am with you on the idea, it's the transition that worries me. I guess for a distro that would be fine, one would hope that there is a communication between the alsa-lib and the kernel configurations parts, but for a random user there's a chance that they would not select this and not use ucm2 and vice versa.
it's also painful for kernel developers to rely on to-be-released alsa-lib changes, we've been there with SOF and I don't know how many times we had reports of issues related to alsa-lib setup problems. Here it'd be worse since alsa-lib updates would need to be deployed on target devices.
Again I am not against the idea, but anything we can do to reuse friction during the transition will help a great deal.
_______________________________________________
Alsa-devel mailing list
[email protected]
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
Jaroslav Kysela
maintainerRe: [alsa-devel] [PATCH 2/2] ASoC: Intel - use control components to describe card config
Dne 19. 11. 19 v 20:39 Pierre-Louis Bossart napsal(a):
Quoted 29 lines
Quoted 14 lines
Quoted 14 lines
sound/soc/intel/Kconfig config SND_SOC_INTEL_SST_FIRMWARE · line 58
Quoted 10 lines
sound/soc/intel/Kconfig +9
-0+config SND_SOC_INTEL_USE_CTL_COMPONENTS + bool "Use CTL components for I/O configuration" + help + Some drivers might pass the I/O configuration through the + soundcard's driver name in the control user space API. + The new scheme is to put this information to the components + field in the ALSA's card info structure. Say Y, if you + have ALSA user space version 1.2.2+. +If this is at the board level, then maybe move this to
sound/soc/intel/boards/KconfigQuoted 8 lines
Quoted 3 lines
I am not sure about the alsa-lib dependency, it's a bit odd, isn't it? shouldn't this be handled via protocol versions? or a configuration provided by alsa-lib somehow?
It's not about the protocol. It's about to move this type of information to another place. I can remove the ALSA version sentence from the help, because it's just a hint. I would like to create ucm2 configurations based on this rather than the misused long card names.
I am with you on the idea, it's the transition that worries me. I guess for a distro that would be fine, one would hope that there is a communication between the alsa-lib and the kernel configurations parts, but for a random user there's a chance that they would not select this and not use ucm2 and vice versa.
Quoted 3 lines
it's also painful for kernel developers to rely on to-be-released alsa-lib changes, we've been there with SOF and I don't know how many times we had reports of issues related to alsa-lib setup problems.
I think that the most of issues were because there was no stable ucm upstream for SOF. I've seen multiple variants of UCM configuration files for SOF (and everything will be finalized with 5.5 kernel!).
Quoted 5 lines
Here it'd be worse since alsa-lib updates would need to be deployed on target devices.
Again I am not against the idea, but anything we can do to reuse friction during the transition will help a great deal.
Thinking more, we can create an ucm2 configuration which will handle both cases (independent on CONFIG_SND_SOC_INTEL_USE_CTL_COMPONENTS). I prepared an example:
https://github.com/alsa-project/alsa-ucm-conf/commit/f1c0083483e184eb7a5eee1f7d8cb4df66cac085
Jaroslav
Signature · 6 lines
Jaroslav Kysela <[email protected]> Linux Sound Maintainer; ALSA Project; Red Hat, Inc. _______________________________________________ Alsa-devel mailing list [email protected] https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
Re: [alsa-devel] [PATCH 2/2] ASoC: Intel - use control components to describe card config
Quoted 4 lines
Thinking more, we can create an ucm2 configuration which will handle both cases (independent on
CONFIG_SND_SOC_INTEL_USE_CTL_COMPONENTS). I prepared an example:https://github.com/alsa-project/alsa-ucm-conf/commit/f1c0083483e184eb7a5eee1f7d8cb4df66cac085
That'd be fine with me. There's a bit of duplication but it's manageable.
Rather than keep this forever, may we force the use of these components for HDaudio+DMIC devices that are only handled by SOF, starting with 5.5 w/ ucm2, and for older devices BYT/CHT devices ucm2 files are backwards compatible on two levels (SOF or legacy, and longnames or components)?
_______________________________________________
Alsa-devel mailing list
[email protected]
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
Re: [alsa-devel] [PATCH 2/2] ASoC: Intel - use control components to describe card config
In reply to Jaroslav KyselaQuoted 39 lines · Jaroslav Kysela
Dne 19. 11. 19 v 20:12 Pierre-Louis Bossart napsal(a):
Quoted 37 lines · Jaroslav Kysela
Quoted 20 lines
Use the control interface (field 'components' in the info structure) to pass the I/O configuration details. The long card name might be used in GUI. This information should be hidden.
Signed-off-by Jaroslav Kysela <[email protected]>Cc Pierre-Louis Bossart <[email protected]>Cc Mark Brown <[email protected]>--- sound/soc/intel/Kconfig | 9 +++++++++ sound/soc/intel/boards/bytcht_es8316.c | 16 ++++++++++++---- sound/soc/intel/boards/bytcr_rt5640.c | 14 +++++++++++--- sound/soc/intel/boards/bytcr_rt5651.c | 26 ++++++++++++++++---------- 4 files changed, 48 insertions(+), 17 deletions(-)sound/soc/intel/Kconfig +0
-0@@ -47,6 +47,15 @@ config SND_SOC_INTEL_SST_FIRMWARE # Haswell/Broadwell/Baytrail legacy and will be setsound/soc/intel/Kconfig config SND_SOC_INTEL_SST_FIRMWARE · line 57
Quoted 10 lines
sound/soc/intel/Kconfig +8
-0# when these platforms are enabled +config SND_SOC_INTEL_USE_CTL_COMPONENTS + bool "Use CTL components for I/O configuration" + help + Some drivers might pass the I/O configuration through the + soundcard's driver name in the control user space API. + The new scheme is to put this information to the components + field in the ALSA's card info structure. Say Y, if you + have ALSA user space version 1.2.2+. +If this is at the board level, then maybe move this to
sound/soc/intel/boards/Kconfig
Quoted 8 lines
Quoted 3 lines
I am not sure about the alsa-lib dependency, it's a bit odd, isn't it? shouldn't this be handled via protocol versions? or a configuration provided by alsa-lib somehow?
It's not about the protocol. It's about to move this type of information to another place. I can remove the ALSA version sentence from the help, because it's just a hint. I would like to create ucm2 configurations based on this rather than the misused long card names.
But why these are exclusive? The current longname workaround makes the device appearing a bit messy, but does it conflict with the additional component string?
thanks,
Takashi
_______________________________________________
Alsa-devel mailing list
[email protected]
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
Mark Brown
maintainerRe: [alsa-devel] [PATCH 2/2] ASoC: Intel - use control components to describe card config
Quoted 10 lines · Takashi Iwai
Quoted 4 lines · Jaroslav Kysela
It's not about the protocol. It's about to move this type of information to another place. I can remove the ALSA version sentence from the help, because it's just a hint. I would like to create ucm2 configurations based on this rather than the misused long card names.
But why these are exclusive? The current longname workaround makes the device appearing a bit messy, but does it conflict with the additional component string?
Yeah, it's not clear to me why it's a config option to enable this. I can see a config option to turn off the old display name if it's particularly irritating to people but I can't see any reason not to just provide the new stuff.
_______________________________________________
Alsa-devel mailing list
[email protected]
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
Jaroslav Kysela
maintainerRe: [alsa-devel] [PATCH 2/2] ASoC: Intel - use control components to describe card config
Dne 19. 11. 19 v 21:41 Mark Brown napsal(a):
Quoted 8 lines · Takashi Iwai
Quoted 6 lines
Quoted 4 lines · Jaroslav Kysela
It's not about the protocol. It's about to move this type of information to another place. I can remove the ALSA version sentence from the help, because it's just a hint. I would like to create ucm2 configurations based on this rather than the misused long card names.
Quoted 8 lines
Quoted 3 lines
But why these are exclusive? The current longname workaround makes the device appearing a bit messy, but does it conflict with the additional component string?
Yeah, it's not clear to me why it's a config option to enable this. I can see a config option to turn off the old display name if it's particularly irritating to people but I can't see any reason not to just provide the new stuff.
Yes, it is really better way to do this. I'll rewrite my patch. Thanks for the idea.
Jaroslav
Signature · 6 lines
Jaroslav Kysela <[email protected]> Linux Sound Maintainer; ALSA Project; Red Hat, Inc. _______________________________________________ Alsa-devel mailing list [email protected] https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
Mark Brown
maintainer[alsa-devel] Applied "ASoC: add control components management" to the asoc tree
In reply to Jaroslav KyselaThe patch
ASoC: add control components management
has been applied to the asoc tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-5.5
All 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
From dc73d73aa7145f55412611f3eead1e85ae026785 Mon Sep 17 00:00:00 2001
From: Jaroslav Kysela <[email protected]>
Date: Tue, 19 Nov 2019 18:49:32 +0100
Subject: [PATCH] ASoC: add control components management
This ASCII string can carry additional information about soundcard components or configuration. Add the possibility to set this string via the ASoC card.
--- include/sound/soc.h | 1 + sound/soc/soc-core.c | 13 +++++++++++++ 2 files changed, 14 insertions(+)
include/sound/soc.h +1 -0
@@ -982,6 +982,7 @@ struct snd_soc_card {const char *name;const char *long_name;const char *driver_name; +const char *components;char dmi_longname[80 ];char topology_shortname[32 ];
sound/soc/soc-core.c +13 -0
@@ -2108,6 +2108,19 @@ static int snd_soc_bind_card(struct snd_soc_card *card)soc_setup_card_name (card->snd_card->driver, card->driver_name, card->name,1 ); +if (card->components) { +/* the current implementation of snd_component_add() accepts */ +/* multiple components in the string separated by space, */ +/* but the string collision (identical string) check might */ +/* not work correctly */ + ret =snd_component_add (card->snd_card, card->components); +if (ret <0 ) { +dev_err (card->dev,"ASoC: %s snd_component_add() failed: %d\n" , + card->name, ret); + goto probe_end; + } + } +if (card->late_probe) { ret = card->late_probe (card);if (ret <0 ) {
Signature · 6 lines
2.20.1 _______________________________________________ Alsa-devel mailing list [email protected] https://mailman.alsa-project.org/mailman/listinfo/alsa-devel