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 X-Spam-Level: X-Spam-Status: No, score=-5.5 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BE7BBC48BE5 for ; Tue, 15 Jun 2021 12:24:15 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 271A461461 for ; Tue, 15 Jun 2021 12:24:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 271A461461 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 159FF1693; Tue, 15 Jun 2021 14:23:22 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 159FF1693 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1623759852; bh=XoQTzRQwmuh1QMzbvDAjue3zCh0UzzKehg+0IFfhvGo=; h=Date:From:To:Subject:References:In-Reply-To:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=FO8esr0zT/kTEztiKdlQIIgXsFzuGNkD+aOGNfzuZSYoxJT9kMuV62A1WgoI7Etv5 EyOcm6ZyL62ZSmWh5/MK9/wYj80WmVQLENZwffqgsygd5tKDkhMadUxE197U+u//UL mJwf/sK2UXpqyBNUf6WswYBbbEJ8B2SSPssLIZsw= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 9EBABF80165; Tue, 15 Jun 2021 14:23:21 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 0C5E3F80171; Tue, 15 Jun 2021 14:23:20 +0200 (CEST) Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 34180F80165 for ; Tue, 15 Jun 2021 14:23:15 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 34180F80165 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="bGLRYens" Received: by mail.kernel.org (Postfix) with ESMTPSA id E544D6143E; Tue, 15 Jun 2021 12:23:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1623759792; bh=XoQTzRQwmuh1QMzbvDAjue3zCh0UzzKehg+0IFfhvGo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=bGLRYensvx/zi4r6Mx2V2HC6zErvM45s9pbLPp77nMCCF2+qERLvi+GQ4AAe4DiC6 sr1v+AUxBvRpppYNu4sgDmUejW95H3wDHVQDQ/JnOh9R4p7FMGrxT0Oy26RVuDrgQ6 25oewW1KeEG0g4MVv1ukCbq8JMmvnhP8dTp7eS2QB0w3ZEYhZEf0gLqtxhs/HIswRb wzTeweIfMy494Fupq3x3B8La21M6OgoZeDdhPSBvIAFy8e4WkrQc//GKJ2rOegriCx nTcEl4m021zdct1jkxVqLiAChTrb5+xTZKrz1A7muf3mwF+I0gOkdML52f9vrzula+ FooX6VE8DUOzA== Date: Tue, 15 Jun 2021 13:22:41 +0100 From: Mark Brown To: Claudius Heine Subject: Re: [PATCH 2/3] ASoC: tlv320aic32x4: add support for TAS2505 Message-ID: <20210615122241.GE5149@sirena.org.uk> References: <20210615094933.3076392-1-ch@denx.de> <20210615094933.3076392-3-ch@denx.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="7LkOrbQMr4cezO2T" Content-Disposition: inline In-Reply-To: <20210615094933.3076392-3-ch@denx.de> X-Cookie: See store for details. User-Agent: Mutt/1.10.1 (2018-07-13) Cc: Marek Vasut , Pierre-Louis Bossart , alsa-devel@alsa-project.org, Matthias Schiffer , Kuninori Morimoto , open list , Takashi Iwai , Sia Jee Heng , Liam Girdwood , Annaliese McDermond , Miquel Raynal , Michael Sit Wei Hong X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" --7LkOrbQMr4cezO2T Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Jun 15, 2021 at 11:49:31AM +0200, Claudius Heine wrote: > +static int aic32x4_tas2505_spkdrv_putvol(struct snd_kcontrol *kcontrol, > + struct snd_ctl_elem_value *ucontrol) > +{ > + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); > + struct soc_mixer_control *mc = > + (struct soc_mixer_control *)kcontrol->private_value; > + u8 val; > + > + val = (ucontrol->value.integer.value[0] & 0x7f); > + val = mc->invert ? mc->max - val : val; > + val = (val < 0) ? 0 : val; > + snd_soc_component_write(component, TAS2505_SPKVOL1, val); > + > + return 0; > +} Controls should return a boolean indicating if they changed their value when written. Other than the hard coded register what's device specific here? It looks like a normal control with a maximum value, it is unclear why this is being open coded. > + SOC_DOUBLE_R_S_TLV("HP Driver Gain Playback Volume", AIC32X4_HPLGAIN, > + AIC32X4_HPLGAIN, 0, -0x6, 0x1d, 5, 0, > + tlv_driver_gain), Drop the Gain. See control-names.rst. --7LkOrbQMr4cezO2T Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmDIm5AACgkQJNaLcl1U h9BiHAf/fliuYAge5Ukx/NgOlna7YT+TGmHxRUEyKrNyrw2Y7IQKgptR3dElp3Ep IZ1bbWar9WT8777vi7UXKL2muaNwSjPvf1kmVTkVAvJAHwtOOPFCfiRplZiTBUg0 sm2KLjkLuyF6sUO2x88AEUHrqDlgINzoIo59/hhAxU/RJpKOI9S3ghmV8NRFJvW6 B9eM0EMx8W4E5Rqi3P5LC+ki/T7+0qg8Y50EydvKbtCCV//HLlMgxABh8D2wzd0P 2rV+5l+du08/mm3rhBiuh003+NSz4nI481WvrLu2MdUmBPb71aoJYQLiGwXzomah DaPpUm0KFW8qDnG9jyGJ1Bl+6W22Cw== =rv4N -----END PGP SIGNATURE----- --7LkOrbQMr4cezO2T--