Skip to content

Commit 086cead

Browse files
TE-N-ShengjiuWangbroonie
authored andcommitted
ASoC: fsl_audmux: Fix amixer write errors
This reverts commit 944c517 ("ASoC: fsl_audmix: make clock and output src write only"). There is error after making clock and output src write only $amixer -c imxaudmix cset numid=1 1 amixer: Cannot read the given element from control sysdefault:3 Which is worse than before, so let's revert the change. Signed-off-by: Shengjiu Wang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent e96bca7 commit 086cead

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

sound/soc/fsl/fsl_audmix.c

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -199,18 +199,10 @@ static int fsl_audmix_put_out_src(struct snd_kcontrol *kcontrol,
199199

200200
static const struct snd_kcontrol_new fsl_audmix_snd_controls[] = {
201201
/* FSL_AUDMIX_CTR controls */
202-
{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
203-
.name = "Mixing Clock Source",
204-
.info = snd_soc_info_enum_double,
205-
.access = SNDRV_CTL_ELEM_ACCESS_WRITE,
206-
.put = fsl_audmix_put_mix_clk_src,
207-
.private_value = (unsigned long)&fsl_audmix_enum[0] },
208-
{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
209-
.name = "Output Source",
210-
.info = snd_soc_info_enum_double,
211-
.access = SNDRV_CTL_ELEM_ACCESS_WRITE,
212-
.put = fsl_audmix_put_out_src,
213-
.private_value = (unsigned long)&fsl_audmix_enum[1] },
202+
SOC_ENUM_EXT("Mixing Clock Source", fsl_audmix_enum[0],
203+
snd_soc_get_enum_double, fsl_audmix_put_mix_clk_src),
204+
SOC_ENUM_EXT("Output Source", fsl_audmix_enum[1],
205+
snd_soc_get_enum_double, fsl_audmix_put_out_src),
214206
SOC_ENUM("Output Width", fsl_audmix_enum[2]),
215207
SOC_ENUM("Frame Rate Diff Error", fsl_audmix_enum[3]),
216208
SOC_ENUM("Clock Freq Diff Error", fsl_audmix_enum[4]),

0 commit comments

Comments
 (0)