diff options
author | Viorel Suman <viorel.suman@nxp.com> | 2020-09-14 20:24:34 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2020-09-17 16:47:09 +0300 |
commit | 944c517b8c838832a166f1c89afbf8724f4a6b49 (patch) | |
tree | b03c7ce60ef235304d1e2cece37e84586618eaad /sound/soc/fsl/fsl_audmix.c | |
parent | 8d9a14fc7371a18d54226bf2542f77b11e5a7101 (diff) | |
download | linux-944c517b8c838832a166f1c89afbf8724f4a6b49.tar.xz |
ASoC: fsl_audmix: make clock and output src write only
"alsactl -f state.conf store/restore" sequence fails because setting
"mixing clock source" and "output source" requires active TDM clock
being started for configuration propagation. Make these two controls
write only so that their values are not stored at "alsactl store".
Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Link: https://lore.kernel.org/r/1600104274-13110-1-git-send-email-viorel.suman@oss.nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/fsl/fsl_audmix.c')
-rw-r--r-- | sound/soc/fsl/fsl_audmix.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/sound/soc/fsl/fsl_audmix.c b/sound/soc/fsl/fsl_audmix.c index a447bafa00d2..7ad5925772e8 100644 --- a/sound/soc/fsl/fsl_audmix.c +++ b/sound/soc/fsl/fsl_audmix.c @@ -199,10 +199,18 @@ static int fsl_audmix_put_out_src(struct snd_kcontrol *kcontrol, static const struct snd_kcontrol_new fsl_audmix_snd_controls[] = { /* FSL_AUDMIX_CTR controls */ - SOC_ENUM_EXT("Mixing Clock Source", fsl_audmix_enum[0], - snd_soc_get_enum_double, fsl_audmix_put_mix_clk_src), - SOC_ENUM_EXT("Output Source", fsl_audmix_enum[1], - snd_soc_get_enum_double, fsl_audmix_put_out_src), + { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, + .name = "Mixing Clock Source", + .info = snd_soc_info_enum_double, + .access = SNDRV_CTL_ELEM_ACCESS_WRITE, + .put = fsl_audmix_put_mix_clk_src, + .private_value = (unsigned long)&fsl_audmix_enum[0] }, + { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, + .name = "Output Source", + .info = snd_soc_info_enum_double, + .access = SNDRV_CTL_ELEM_ACCESS_WRITE, + .put = fsl_audmix_put_out_src, + .private_value = (unsigned long)&fsl_audmix_enum[1] }, SOC_ENUM("Output Width", fsl_audmix_enum[2]), SOC_ENUM("Frame Rate Diff Error", fsl_audmix_enum[3]), SOC_ENUM("Clock Freq Diff Error", fsl_audmix_enum[4]), |