Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp2539147rwb; Fri, 20 Jan 2023 04:24:02 -0800 (PST) X-Google-Smtp-Source: AMrXdXu4rcXC+QyyBN0+t9PLoxjTIF9lVKzPodIJMeBjjKiYanzzkNuYrunEDifFNXDBKoWBK9ny X-Received: by 2002:a17:902:ea94:b0:194:c128:1c92 with SMTP id x20-20020a170902ea9400b00194c1281c92mr8360923plb.65.1674217442465; Fri, 20 Jan 2023 04:24:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674217442; cv=none; d=google.com; s=arc-20160816; b=CdGl8Yhh8jGyPZH+EvYktWNf2JLTiGeWsKrm4ea7t5h5/ZhhZ1cLOEAWn6LkoHYvOb ye8Tgbiaeqxl4kvxhI4R5oNVu7C8gpsnSiFG5C5MXDCnUZfktLbToeZfxli/wWqSabtB mMqYM8AWPP2rNvObNjGqZ1Sc04cjZdSLHBce7YQ+mhYlOfyTWMvhQABvtz1Wku9RJMpE Es3yw2P33pBKoboEStUnKzj6LQFOefucly3tKf6IwkpDCsziEkQrf6LMM7qb5feF4BtB IOERTf15U5dG+WaNSWu8eTpgwT+rZTl7vsJ1n0WjyFYHES7e8OT+3PqYLzbnjcsePK4k ENpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Q1RBpJQKA9Mgy8ofRJLbbXt71BVLL3F6RMZMf6dZKHA=; b=XVS0kzNxhg83+q+AAI9xMyIIIHs6U2zU+ObnD0mcFuwzk6zV9reZrvIoljmPnN//Y9 Kir/wxhrkjlbmf1BXxo25cXXDGjCddthxfvTd7fTwmklVZcjbnmPx2hREDpyUwLJ1e6r dx8Dav6s9GvWl/QRGgsNBhZhR0HO8xth76RjTjaykfg9Dnb8RhpR+1FvzjTDRmAHCiY1 wpCfo3t0N77EF/08XOXQ4LWg0m9EMOPzFr+xghIhjgGyypigw996u6lKbhT0IY/l6Ij+ w5JnO8YY6KScoOkTdXiTWJ9JZsc422NBCpEbal11LXkF+pt80uXEcRkGZVE0JxAe10vZ c8fQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qoXeMA5I; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s13-20020a170902ea0d00b00188e045470csi1657880plg.542.2023.01.20.04.23.55; Fri, 20 Jan 2023 04:24:02 -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=@kernel.org header.s=k20201202 header.b=qoXeMA5I; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230100AbjATMMx (ORCPT + 51 others); Fri, 20 Jan 2023 07:12:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48464 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230099AbjATMMs (ORCPT ); Fri, 20 Jan 2023 07:12:48 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EF990EC6C; Fri, 20 Jan 2023 04:12:47 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 86C8B61DEA; Fri, 20 Jan 2023 12:12:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 983BCC433EF; Fri, 20 Jan 2023 12:12:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1674216767; bh=bYTCpxpMUaj0u9NVrjzlxJiwlSH7GhZL8wVTYhvi1kk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=qoXeMA5IEcu8/YWtvxIdMEIAJOVuAuu0rHb3KldXH7yvXPpMMaipN0ptWsqquCLLr YGpaGwaJkGMl75bP9I0beehAiUZEgbK9RI6zxQnT/xueeKtx7wNbYnc7tRY3496dYc c7czRz4IT1hCuVGnsxUyTrnrmJVVs+18GGWLVZCDpG59qSXolyCdAP7YIdSHSqBx5/ UeexsOh/Fq6NppIEkNK24lneWzF3Dfby1XsJyRYL5Kc5TusGA0mDLgghVpG+WQ7bXN oCeL6JDyMeZF8q0zsiEz1X5i+sAE6drGy8w+fNtsWsAEf2i1BNlmEkHRL5MzczBuKk V8FBgyAgoqqsw== Date: Fri, 20 Jan 2023 12:12:44 +0000 From: Mark Brown To: Herve Codina 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: References: <20230120095036.514639-1-herve.codina@bootlin.com> <20230120095036.514639-3-herve.codina@bootlin.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="wlRMvD60qIyTikCQ" Content-Disposition: inline In-Reply-To: <20230120095036.514639-3-herve.codina@bootlin.com> X-Cookie: Serving suggestion. X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 --wlRMvD60qIyTikCQ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Jan 20, 2023 at 10:50:35AM +0100, Herve Codina wrote: > +static int idt821034_kctrl_gain_put(struct snd_kcontrol *kcontrol, > + struct snd_ctl_elem_value *ucontrol) > +{ > + struct soc_mixer_control *mc = (struct soc_mixer_control *)kcontrol->private_value; > + struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); > + struct idt821034 *idt821034 = snd_soc_component_get_drvdata(component); > + struct idt821034_amp *amp; > + > + amp->gain = val; > + ret = 0; > +end: > + mutex_unlock(&idt821034->mutex); > + return ret; _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. Otherwise this looks fine. --wlRMvD60qIyTikCQ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmPKhTsACgkQJNaLcl1U h9AQ4Af8De8E5PJEpMZ8aXgoqJ5oNtOF6fOh2uOEQ0Sl+8/7usPM9y8GqpAlyIxy 09ITOezWYsh9XvhCuHefFVr/Tr7KVbz34OoXwo1XNmzmkWXcezr6PrS1VAb1DaGT qdOP6wEG+ei0PqHg6CX+oaRLnsqSVi1ojAbbN9GHAqNDRlXAzJfal0hIZuCUw9cp JA9r1B+7/G83PP5UWFXYOydws1OqGg9fsny9D1FfEt1uuVWu/uXfGMAYCg0XeqOD 0y0yD4PaCUsv4g6Qp+eevMbsTHERfGb2YzjsZf73kE2YacIY4wATPBrt8SnFSYew hVXpJFtOdhIyKL+8p1tHnJ0AtZDDYw== =nMiM -----END PGP SIGNATURE----- --wlRMvD60qIyTikCQ--