From mboxrd@z Thu Jan 1 00:00:00 1970 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 CF615C05027 for ; Fri, 20 Jan 2023 13:14:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230468AbjATNOG (ORCPT ); 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 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@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