From nobody Mon Apr 6 15:40:21 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4D7D2ECAAD8 for ; Fri, 23 Sep 2022 10:44:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231678AbiIWKoa (ORCPT ); Fri, 23 Sep 2022 06:44:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47066 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231661AbiIWKoZ (ORCPT ); Fri, 23 Sep 2022 06:44:25 -0400 Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9762E10D64C for ; Fri, 23 Sep 2022 03:44:24 -0700 (PDT) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 513641A0F2A; Fri, 23 Sep 2022 12:44:23 +0200 (CEST) Received: from aprdc01srsp001v.ap-rdc01.nxp.com (aprdc01srsp001v.ap-rdc01.nxp.com [165.114.16.16]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 0657B1A0F0A; Fri, 23 Sep 2022 12:44:23 +0200 (CEST) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by aprdc01srsp001v.ap-rdc01.nxp.com (Postfix) with ESMTP id 48DBB181D0CB; Fri, 23 Sep 2022 18:44:21 +0800 (+08) From: Shengjiu Wang To: nicoleotsuka@gmail.com, Xiubo.Lee@gmail.com, festevam@gmail.com, shengjiu.wang@gmail.com, lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz, tiwai@suse.com, alsa-devel@alsa-project.org Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: [RESEND PATCH] Revert "ASoC: fsl_audmix: make clock and output src write only" Date: Fri, 23 Sep 2022 18:25:26 +0800 Message-Id: <1663928726-10213-1-git-send-email-shengjiu.wang@nxp.com> X-Mailer: git-send-email 2.7.4 X-Virus-Scanned: ClamAV using ClamSMTP Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" This reverts commit 944c517b8c838832a166f1c89afbf8724f4a6b49. There is error after making clock and output src write only $amixer -c imxaudmix cset numid=3D1 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 --- sound/soc/fsl/fsl_audmix.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/sound/soc/fsl/fsl_audmix.c b/sound/soc/fsl/fsl_audmix.c index 43857b7a81c9..672148dd4b23 100644 --- a/sound/soc/fsl/fsl_audmix.c +++ b/sound/soc/fsl/fsl_audmix.c @@ -199,18 +199,10 @@ static int fsl_audmix_put_out_src(struct snd_kcontrol= *kcontrol, =20 static const struct snd_kcontrol_new fsl_audmix_snd_controls[] =3D { /* FSL_AUDMIX_CTR controls */ - { .iface =3D SNDRV_CTL_ELEM_IFACE_MIXER, - .name =3D "Mixing Clock Source", - .info =3D snd_soc_info_enum_double, - .access =3D SNDRV_CTL_ELEM_ACCESS_WRITE, - .put =3D fsl_audmix_put_mix_clk_src, - .private_value =3D (unsigned long)&fsl_audmix_enum[0] }, - { .iface =3D SNDRV_CTL_ELEM_IFACE_MIXER, - .name =3D "Output Source", - .info =3D snd_soc_info_enum_double, - .access =3D SNDRV_CTL_ELEM_ACCESS_WRITE, - .put =3D fsl_audmix_put_out_src, - .private_value =3D (unsigned long)&fsl_audmix_enum[1] }, + 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), 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]), --=20 2.34.1