[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200917001007.GA22566@Asurada-Nvidia>
Date: Wed, 16 Sep 2020 17:10:08 -0700
From: Nicolin Chen <nicoleotsuka@...il.com>
To: "Viorel Suman (OSS)" <viorel.suman@....nxp.com>
Cc: Timur Tabi <timur@...nel.org>, Xiubo Li <Xiubo.Lee@...il.com>,
Fabio Estevam <festevam@...il.com>,
Shengjiu Wang <shengjiu.wang@...il.com>,
Liam Girdwood <lgirdwood@...il.com>,
Mark Brown <broonie@...nel.org>,
Jaroslav Kysela <perex@...ex.cz>,
Takashi Iwai <tiwai@...e.com>, alsa-devel@...a-project.org,
linuxppc-dev@...ts.ozlabs.org, linux-kernel@...r.kernel.org,
NXP Linux Team <linux-imx@....com>,
Viorel Suman <viorel.suman@...il.com>,
Viorel Suman <viorel.suman@....com>
Subject: Re: [PATCH] ASoC: fsl_audmix: make clock and output src write only
On Mon, Sep 14, 2020 at 08:24:34PM +0300, Viorel Suman (OSS) wrote:
> From: Viorel Suman <viorel.suman@....com>
>
> "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@....com>
Acked-by: Nicolin Chen <nicoleotsuka@...il.com>
> ---
> sound/soc/fsl/fsl_audmix.c | 16 ++++++++++++----
> 1 file changed, 12 insertions(+), 4 deletions(-)
>
> diff --git a/sound/soc/fsl/fsl_audmix.c b/sound/soc/fsl/fsl_audmix.c
> index a447baf..7ad5925 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]),
> --
> 2.7.4
>
Powered by blists - more mailing lists