Message ID | 20230512122838.243002-4-ckeepax@opensource.cirrus.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp5064581vqo; Fri, 12 May 2023 05:31:29 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7h+4fusidSQbktZC2LZMOiPY6PTh5VBAML+3or9jN2N6u33/ZQxRkPTPKJt/GJIbgIRShj X-Received: by 2002:a05:6a20:4413:b0:f2:4d44:3560 with SMTP id ce19-20020a056a20441300b000f24d443560mr31449568pzb.19.1683894689073; Fri, 12 May 2023 05:31:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683894689; cv=none; d=google.com; s=arc-20160816; b=ix1HPH6B5/DwUnezXAMd8H9267YQiXp7v+zKpPLMONzAjA4GjQUipf+bEoNjW03z/d oEgPUAjNCRMfQPT7sKrI4tlm5eWOZGez/LqJ5L1/0hn/PJLaIlnWuTqBGGr5Urz92gMP dPIZmsF8l8g9TjSqEwBCRqvQrQJnXLzyOvI97HPZ4zczTzKbZA3zY+pEs8sF/KMCXijf BZNnW1wBmZhG2cawuGUbLaDVbHR7fMN8o09pRhc1Zhxi/BZSy78xjrH0TRaZAK3/nVDb fT6e2xM8h7EhGSzy4b+4MOZB7IkEps87O7BDmmm3a+w2jgQ6X00GiEF20rKt6E7Unsay rgdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=FF0MGgoGVYiyUdoLzrNTfui4hZc7QAdyPV9+R56x+60=; b=nLas4P3DGbugC4WnIptSyyiznH1RqDV+d5sVymvMzb6pzGcKF3GwJd+A7t3+DjZGWd hs+VjSCW4e1kLjQTXxa6Ps14UiN5Ke8gkh5O9Vd3SfrWUqaMgPejf7ELvd/YjGRhcq9i VBDx9AICsvVmOmDyUbpsKurXKGuPt9a8z9Dqm2HjCcwVY+vB+cz0g7ceW2SAbr5MDbbT vbp/c4Ro6XZAH+H/p9xzvhyatmCbowi+jEPziXBKh1ZFEo9S41g9yeZntvJVsfwATjqb E94nMYr1eBeNn2TUEVoHEBoi+6OCERrSSefGXBwAZvB4u2ZpX54hy3l8km4yBaVINACE RbBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cirrus.com header.s=PODMain02222019 header.b=Er69sx5m; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=cirrus.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ep23-20020a17090ae65700b0024de12511casi22431518pjb.56.2023.05.12.05.31.14; Fri, 12 May 2023 05:31:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@cirrus.com header.s=PODMain02222019 header.b=Er69sx5m; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=cirrus.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241146AbjELMaZ (ORCPT <rfc822;peekingduck44@gmail.com> + 99 others); Fri, 12 May 2023 08:30:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59920 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240546AbjELM36 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 12 May 2023 08:29:58 -0400 Received: from mx0b-001ae601.pphosted.com (mx0b-001ae601.pphosted.com [67.231.152.168]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 173AE1437A; Fri, 12 May 2023 05:29:23 -0700 (PDT) Received: from pps.filterd (m0077474.ppops.net [127.0.0.1]) by mx0b-001ae601.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 34C5eUj8031128; Fri, 12 May 2023 07:28:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=PODMain02222019; bh=FF0MGgoGVYiyUdoLzrNTfui4hZc7QAdyPV9+R56x+60=; b=Er69sx5mItoC7ting41wXRkLDp8b5HO8s/fGyGkzhxBF+20TAD3DNqAeairtfRj2D38l 7g17wC1+wGuZJyemUmRYv4eD2J9+I4gNNMP4uGmnz4y8jAB5dNT84mlw9GdjzHHc1EuR neKDzdPlX3s2bX5ChnlLn5yCXeV+2+XElpxubkHW0OvRRBrGitDGBgCsHtcAPg9TXzGV mYKOOs1ngblrB97SiHiQ0gFUmQzYayn+k+f9L2vXAZgskzj1hNM1y2fj5A+qJpQs2TW2 92/k+82n1QHInNcC6QKtawwmdfRQjDa2m6OL/Y7oq9/cJDE0LfIOj6CHRc+pl7bNXW+t zA== Received: from ediex01.ad.cirrus.com ([84.19.233.68]) by mx0b-001ae601.pphosted.com (PPS) with ESMTPS id 3qf7s46b2x-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 12 May 2023 07:28:40 -0500 Received: from ediex02.ad.cirrus.com (198.61.84.81) by ediex01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.26; Fri, 12 May 2023 07:28:38 -0500 Received: from ediswmail.ad.cirrus.com (198.61.86.93) by anon-ediex02.ad.cirrus.com (198.61.84.81) with Microsoft SMTP Server id 15.2.1118.26 via Frontend Transport; Fri, 12 May 2023 07:28:38 -0500 Received: from algalon.ad.cirrus.com (algalon.ad.cirrus.com [198.90.251.122]) by ediswmail.ad.cirrus.com (Postfix) with ESMTP id 5829715A4; Fri, 12 May 2023 12:28:38 +0000 (UTC) From: Charles Keepax <ckeepax@opensource.cirrus.com> To: <broonie@kernel.org>, <lee@kernel.org>, <robh+dt@kernel.org>, <krzysztof.kozlowski+dt@linaro.org>, <conor+dt@kernel.org>, <tglx@linutronix.de>, <maz@kernel.org>, <linus.walleij@linaro.org>, <vkoul@kernel.org> CC: <lgirdwood@gmail.com>, <yung-chuan.liao@linux.intel.com>, <sanyog.r.kale@intel.com>, <pierre-louis.bossart@linux.intel.com>, <alsa-devel@alsa-project.org>, <patches@opensource.cirrus.com>, <devicetree@vger.kernel.org>, <linux-gpio@vger.kernel.org>, <linux-spi@vger.kernel.org>, <linux-kernel@vger.kernel.org> Subject: [PATCH 03/10] ASoC: ak4118: Update to use new component control notify helper Date: Fri, 12 May 2023 13:28:31 +0100 Message-ID: <20230512122838.243002-4-ckeepax@opensource.cirrus.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230512122838.243002-1-ckeepax@opensource.cirrus.com> References: <20230512122838.243002-1-ckeepax@opensource.cirrus.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-ORIG-GUID: tR8CwHcEE0q8AMCU_M3wg1mquGdZccCi X-Proofpoint-GUID: tR8CwHcEE0q8AMCU_M3wg1mquGdZccCi X-Proofpoint-Spam-Reason: safe X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1765691557501685718?= X-GMAIL-MSGID: =?utf-8?q?1765691557501685718?= |
Series |
Add cs42l43 PC focused SoundWire CODEC
|
|
Commit Message
Charles Keepax
May 12, 2023, 12:28 p.m. UTC
Update the driver to use the new ASoC core control notify helper.
This also fixes a bug where the control would not be found if the
CODEC was given a name prefix.
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
---
sound/soc/codecs/ak4118.c | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)
Comments
On 5/12/23 07:28, Charles Keepax wrote: > Update the driver to use the new ASoC core control notify helper. > This also fixes a bug where the control would not be found if the > CODEC was given a name prefix. > > Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> > --- > sound/soc/codecs/ak4118.c | 11 ++--------- > 1 file changed, 2 insertions(+), 9 deletions(-) > > diff --git a/sound/soc/codecs/ak4118.c b/sound/soc/codecs/ak4118.c should patches 2, 3, 4 be part of a separate series, they really have nothing to do with the Cirrus CS32L43? > index b6d9a10bdccdc..74ccfb0d921d6 100644 > --- a/sound/soc/codecs/ak4118.c > +++ b/sound/soc/codecs/ak4118.c > @@ -264,8 +264,6 @@ static irqreturn_t ak4118_irq_handler(int irq, void *data) > struct ak4118_priv *ak4118 = data; > struct snd_soc_component *component = ak4118->component; > struct snd_kcontrol_new *kctl_new; > - struct snd_kcontrol *kctl; > - struct snd_ctl_elem_id *id; > unsigned int i; > > if (!component) > @@ -273,13 +271,8 @@ static irqreturn_t ak4118_irq_handler(int irq, void *data) > > for (i = 0; i < ARRAY_SIZE(ak4118_iec958_controls); i++) { > kctl_new = &ak4118_iec958_controls[i]; > - kctl = snd_soc_card_get_kcontrol(component->card, > - kctl_new->name); > - if (!kctl) > - continue; > - id = &kctl->id; > - snd_ctl_notify(component->card->snd_card, > - SNDRV_CTL_EVENT_MASK_VALUE, id); > + > + snd_soc_component_notify_control(component, kctl_new->name); > } > > return IRQ_HANDLED;
On Fri, May 12, 2023 at 08:48:40AM -0500, Pierre-Louis Bossart wrote: > On 5/12/23 07:28, Charles Keepax wrote: > > Update the driver to use the new ASoC core control notify helper. > > This also fixes a bug where the control would not be found if the > > CODEC was given a name prefix. > > > > Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> > > --- > > sound/soc/codecs/ak4118.c | 11 ++--------- > > 1 file changed, 2 insertions(+), 9 deletions(-) > > > > diff --git a/sound/soc/codecs/ak4118.c b/sound/soc/codecs/ak4118.c > > should patches 2, 3, 4 be part of a separate series, they really have > nothing to do with the Cirrus CS32L43? Patch 2 has a build dependency on the CODEC patch, 3/4 are debatable. I could do the series without these patches and do a seperate chain with those three patches and an extra patch to convert the cs42l43, if that is preferred to shrink the chain. Thanks, Charles
diff --git a/sound/soc/codecs/ak4118.c b/sound/soc/codecs/ak4118.c index b6d9a10bdccdc..74ccfb0d921d6 100644 --- a/sound/soc/codecs/ak4118.c +++ b/sound/soc/codecs/ak4118.c @@ -264,8 +264,6 @@ static irqreturn_t ak4118_irq_handler(int irq, void *data) struct ak4118_priv *ak4118 = data; struct snd_soc_component *component = ak4118->component; struct snd_kcontrol_new *kctl_new; - struct snd_kcontrol *kctl; - struct snd_ctl_elem_id *id; unsigned int i; if (!component) @@ -273,13 +271,8 @@ static irqreturn_t ak4118_irq_handler(int irq, void *data) for (i = 0; i < ARRAY_SIZE(ak4118_iec958_controls); i++) { kctl_new = &ak4118_iec958_controls[i]; - kctl = snd_soc_card_get_kcontrol(component->card, - kctl_new->name); - if (!kctl) - continue; - id = &kctl->id; - snd_ctl_notify(component->card->snd_card, - SNDRV_CTL_EVENT_MASK_VALUE, id); + + snd_soc_component_notify_control(component, kctl_new->name); } return IRQ_HANDLED;