Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp2636182rwb; Fri, 20 Jan 2023 05:38:24 -0800 (PST) X-Google-Smtp-Source: AMrXdXu4RBWC7Tz05JzW+OrnbxfR1p5h9zzDqVGfAYt887uJZAdvlLx0svPM3EZxfQUpjH64f639 X-Received: by 2002:a17:906:1e42:b0:86f:763c:2695 with SMTP id i2-20020a1709061e4200b0086f763c2695mr13689497ejj.17.1674221904573; Fri, 20 Jan 2023 05:38:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674221904; cv=none; d=google.com; s=arc-20160816; b=Vw2AFBWqiWXZVP/ZyoexxolY7Q563JPdT6jZ8V8Nax+4l8S36OdZO5WwAFdxoZM6Dh Z0htkMT1j80HLHixbgDYr7lgU9313IfDaI9sOSJHuT2xOjlnsGDB/+E4CNa5HWTrmcza BJ14p2LVW7oXGdaJZxx86qSEkXS+K7PXumQWWMpsS9TujBIq1XpLxCb6XV/tXEIep3jr nXQEvgmxBzCG5I8s1fW3sLiOaS1jH6cB6K4RwvhvPfQXslU5iqPf+4Xyim38btWkb796 3w3Dwi8K+11S32xMcDrCSRbbnx3Q5gIR3vT1vIeMpHB8XUUc7tqhXk4hBVpaJV1FVYUl k2yg== 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 :organization:references:in-reply-to:message-id:subject:cc:to:from :date:dkim-signature; bh=ttRLjpJX7+bPZySHlgrLI4SdZs2FLcJbSnATZxL8sq4=; b=Kp6px+6hW9vAKv8Aq8pXe4DfTammI1m192NkXVWm3JLnHKNfLUzj3msnpSqIkQ6Ku6 jkteBUqhZ+nTCKeXoJC9Jlbn0dTfE/uDnW1+na+I8xe+FuV3LFIGSPLWFgz5wYehvgMV kKmOgBSjxqMS21O2PHKZXVneLZ9/2xfl5YI16818K1+CI7UBoyOuioKdVO9Nbxg+asL6 CkDhEBr55ccHcADzWe1UHol6RrvlWbUoY0KoA9aTJ28vuXl0PF59jvQWEQ/7TkIOQSIO RdDGca/sU0qEBH4BMuR+hZPeItYCR6lbPpVM6pWHXdzd3+72uuT1OeA3bSKJN+CNHWRR QeDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=C9bv1YWd; 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=bootlin.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id jg40-20020a170907972800b00872733f3b9esi12260322ejc.855.2023.01.20.05.38.11; Fri, 20 Jan 2023 05:38:24 -0800 (PST) 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=@bootlin.com header.s=gm1 header.b=C9bv1YWd; 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=bootlin.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230475AbjATNOG (ORCPT + 49 others); Fri, 20 Jan 2023 08:14:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34776 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229644AbjATNOF (ORCPT ); Fri, 20 Jan 2023 08:14:05 -0500 Received: from relay10.mail.gandi.net (relay10.mail.gandi.net [217.70.178.230]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D346279EBF; Fri, 20 Jan 2023 05:14:03 -0800 (PST) Received: (Authenticated sender: herve.codina@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 5B35C240004; Fri, 20 Jan 2023 13:14:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1674220442; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ttRLjpJX7+bPZySHlgrLI4SdZs2FLcJbSnATZxL8sq4=; b=C9bv1YWdcNmayF8fuRXHTOmKZ1v7FdA5eJ9fPnhkC3tciKtXV+cTZ9UNKo7kezA72ewWTf Pfiwe0hgRbT3XeqN/23Ki4PMTvndZfCUneutZFCTgqfefGHlNG/AxTkIXu5YUAxLNbknU7 BiAgZXQ5mRSPxBmFERMTTxKY4lYV7YPo9cCRKafI2vqVgKCVTXC6poqPLkxRmiB5lV5Npe R4dGk5SrZu3F/GmIqoXRUz/nM5lAHGRjaaBRQSWJZP4lps8xtxH7fYB60ZoMgYg+Tqp4M+ ibdsE1vST+qzulQ2riNCGHHyRsiAe04qAXkhD+jzH8DtHR3IPq8owQOmIle1iA== Date: Fri, 20 Jan 2023 14:13:59 +0100 From: Herve Codina To: Mark Brown Cc: Liam Girdwood , Rob Herring , Krzysztof Kozlowski , Linus Walleij , Bartosz Golaszewski , Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, Christophe Leroy , Thomas Petazzoni Subject: Re: [PATCH v2 2/3] ASoC: codecs: Add support for the Renesas IDT821034 codec Message-ID: <20230120141359.4606b617@bootlin.com> In-Reply-To: References: <20230120095036.514639-1-herve.codina@bootlin.com> <20230120095036.514639-3-herve.codina@bootlin.com> Organization: Bootlin X-Mailer: Claws Mail 4.1.1 (GTK 3.24.36; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS 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: X-Mailing-List: linux-kernel@vger.kernel.org Hi Mark, On Fri, 20 Jan 2023 12:12:44 +0000 Mark Brown wrote: > On Fri, Jan 20, 2023 at 10:50:35AM +0100, Herve Codina wrote: >=20 > > +static int idt821034_kctrl_gain_put(struct snd_kcontrol *kcontrol, > > + struct snd_ctl_elem_value *ucontrol) > > +{ > > + struct soc_mixer_control *mc =3D (struct soc_mixer_control *)kcontrol= ->private_value; > > + struct snd_soc_component *component =3D snd_soc_kcontrol_component(kc= ontrol); > > + struct idt821034 *idt821034 =3D snd_soc_component_get_drvdata(compone= nt); > > + struct idt821034_amp *amp; =20 >=20 > > + > > + amp->gain =3D val; > > + ret =3D 0; > > +end: > > + mutex_unlock(&idt821034->mutex); > > + return ret; =20 >=20 > _put() methods should return 1 if the value changed to generate > events - if you use the mixer-test selftest it'll spot this and > other issues for you. >=20 Thanks for pointing this. I will look at mixer-test and fix the _put() methods return code in v3. > Otherwise this looks fine. Thanks for the review. Best regards, Herv=C3=A9 --=20 Herv=C3=A9 Codina, Bootlin Embedded Linux and Kernel engineering https://bootlin.com