ASoC: dapm: Add encoder and decoder widget types to kcontrol handling
PATCH 1/1 ASoC: dapm: Add encoder and decoder widget types to kcontrol handling
From: Seppo Ingalsuo <[email protected]>
This patch fixes the issue where encoder or decoder widget types are assigned kcontrols in a topology but get ignored. The controls were parsed successfully but were not registered as ALSA kcontrols.
In dapm_create_or_share_kcontrol() the snd_soc_dapm_encoder and the snd_soc_dapm_decoder are added to the switch statement to be handled similarly as e.g. the snd_soc_dapm_effect for assigning a proper long control name.
In dapm_widget_show_component() the snd_soc_dapm_encoder and the snd_soc_dapm_decoder are added to switch statement to let them to be shown in the debugfs power state output.
In snd_soc_dapm_new_widgets() the snd_soc_dapm_encoder and the snd_soc_dapm_decoder are added to same switch case handling as e.g. snd_soc_dapm_effect to be registered with dapm_new_pga(). The previous operation with default in the switch statement silently ignored them. Note: Despite the function name, the dapm_new_pga() is generic utility that calls dapm_create_or_share_kcontrol() for each kcontrol of the widget.
--- sound/soc/soc-dapm.c | 6 ++++++ 1 file changed, 6 insertions(+)
sound/soc/soc-dapm.c +6 -0
@@ -1203,6 +1203,8 @@ static int dapm_create_or_share_kcontrol(struct snd_soc_dapm_widget *w,case snd_soc_dapm_pga:case snd_soc_dapm_effect:case snd_soc_dapm_out_drv: +case snd_soc_dapm_encoder: +case snd_soc_dapm_decoder: wname_in_long_name = true; kcname_in_long_name = true;break ;
@@ -2785,6 +2787,8 @@ static ssize_t dapm_widget_show_component(struct snd_soc_component *component,case snd_soc_dapm_pga:case snd_soc_dapm_effect:case snd_soc_dapm_out_drv: +case snd_soc_dapm_encoder: +case snd_soc_dapm_decoder:case snd_soc_dapm_mixer:case snd_soc_dapm_mixer_named_ctl:case snd_soc_dapm_supply:
@@ -3367,6 +3371,8 @@ int snd_soc_dapm_new_widgets(struct snd_soc_card *card)case snd_soc_dapm_pga:case snd_soc_dapm_effect:case snd_soc_dapm_out_drv: +case snd_soc_dapm_encoder: +case snd_soc_dapm_decoder:dapm_new_pga (w);break ;case snd_soc_dapm_dai_link:
Signature · 1 line
2.55.0
Mark Brown
maintainerQuoted 1 line · Peter Ujfalusi
ASoC: dapm: Add encoder and decoder widget types to kcontrol handling
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-7.3
Thanks!
[1/1] ASoC: dapm: Add encoder and decoder widget types to kcontrol handling
https://git.kernel.org/broonie/sound/c/cde333091692
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