Received: by 10.223.185.111 with SMTP id b44csp440210wrg; Fri, 9 Mar 2018 07:30:41 -0800 (PST) X-Google-Smtp-Source: AG47ELuEx3rkHXikUq7LmlXJHxJCicvC808Kv2z7BAs40Zh/ouQuAXOsQKKPpE2Wf4LRRqMk0y8B X-Received: by 2002:a17:902:2b84:: with SMTP id l4-v6mr28316631plb.338.1520609441324; Fri, 09 Mar 2018 07:30:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520609441; cv=none; d=google.com; s=arc-20160816; b=ltI0ZRfsTbS0hzuphwUkGjL0sVpTZj8WMHAOF+g2/L6OcmFTzwX4WC40YLkH3/BSjU M0nW/Pb9XzhCXJcvmmUW1yOKPtHrvqN4ByymiJZQ0xU0wt1NWiU59JXw8mGmYCMHfxZ3 vxn7C+xnRzaaYNOGh+aitJx6eqOkQiSO4Vg4bF9M0zydgOFjrsldJKAcSepYFycWgukZ ZHzXfcmrIc/UuPxWJKSh3kpnBx63M8hUIK4dt3yiA6LTaC6dbqsQht9TGPM4xdUKC6KK cfWLeAQeg0GTiduBmRXrg0vk1dev/4VyyfgqARlayEpN9ssNmoiHc/KzYN1xVwlHKOvs f7DA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=ux+AvgVlRUslX3m38olyz/wBxBQSEY2yggy7MNNdpjc=; b=E+Jo3pu5Gy+rLeDZBx+4lHCZTOxGrbUhPUrfB0pzE+13XhW81HJkWwtLyCai1vL2/5 APR9rTBvAENUf4D+XQCJ3vMB8whukocTazMQwguwDMS+zAk/wAIfUjVXDVSHwOu9l5kR CxYorXxOhmpaFdEjcLvK+tfoFrQv/smxfWiXYvLlA8ynUiCIpaBguTUPrAuKfg7IiNF/ UraRuOaH2sXcf+E9qAJVV1QUVW3NtXJqQgbjTMPqZCeXIvl4tp/hhfrCdlvcWU1lPbr5 jJsDmuwaxQuhcKh5NyF5hbOAJzOwc8w7LoWYxEmMWbpOtiX9Gm2Oqr+xJC8I81ovcp9G gdhw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=vwFpyJ0F; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l77si1020530pfk.210.2018.03.09.07.30.26; Fri, 09 Mar 2018 07:30:41 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=vwFpyJ0F; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751199AbeCIP30 (ORCPT + 99 others); Fri, 9 Mar 2018 10:29:26 -0500 Received: from heliosphere.sirena.org.uk ([172.104.155.198]:33854 "EHLO heliosphere.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751106AbeCIP3Y (ORCPT ); Fri, 9 Mar 2018 10:29:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=ux+AvgVlRUslX3m38olyz/wBxBQSEY2yggy7MNNdpjc=; b=vwFpyJ0F1oaAq1637N8ourYIx B7Aq2buwZjgiLl0gO2UeuSthSXAwwXCv6jryQu2SMIQuDL3eVNBC3RMXua1PcBq60LCNZcnB9qzQ+ Zg27W0LiH4ZehLIqtA3HjhwG5n9Q2+Nl9Npn179dS5/5TzIfMV53HmnIkP7Zf/BTmdHYc=; Received: from debutante.sirena.org.uk ([2001:470:1f1d:6b5::3] helo=debutante) by heliosphere.sirena.org.uk with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1euJxJ-0007tD-8S; Fri, 09 Mar 2018 15:29:13 +0000 Received: from broonie by debutante with local (Exim 4.90_1) (envelope-from ) id 1euJxI-0005gO-8A; Fri, 09 Mar 2018 15:29:12 +0000 Date: Fri, 9 Mar 2018 15:29:12 +0000 From: Mark Brown To: Matt Porter Cc: Liam Girdwood , Jaroslav Kysela , Takashi Iwai , Rob Herring , Mark Rutland , alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] ASoC: add tda7419 audio processor driver Message-ID: <20180309152912.GF5252@sirena.org.uk> References: <20180227225128.17815-1-mporter@konsulko.com> <20180227225128.17815-3-mporter@konsulko.com> <20180228110038.GA6722@sirena.org.uk> <20180309143548.xuajwfhiwuua7jg5@bacon.ohporter.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="FeAIMMcddNRN4P4/" Content-Disposition: inline In-Reply-To: <20180309143548.xuajwfhiwuua7jg5@bacon.ohporter.com> X-Cookie: Beam me up, Scotty! User-Agent: Mutt/1.9.3 (2018-01-21) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --FeAIMMcddNRN4P4/ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Mar 09, 2018 at 09:35:48AM -0500, Matt Porter wrote: > On Wed, Feb 28, 2018 at 11:00:38AM +0000, Mark Brown wrote: > > On Tue, Feb 27, 2018 at 05:51:28PM -0500, Matt Porter wrote: > > > +static struct snd_kcontrol_new tda7419_controls[] = { > > > +SOC_ENUM("Main Source Select", soc_enum_main_src_sel), > > Should this be a DAPM route? > Ultimately yes. I initially took the path of ignoring DAPM support in > interests of getting some clean done. Is it ok to merge DAPM support > later or do you prefer just having it in the intitial driver? For > routes, it'll include Main/Second source selects, the Rear Source > switch, and Mix enable at least. You definitely shouldn't be implementing things that should be in DAPM as non-DAPM controls. > > > + regmap_write(tda7419->regmap, TDA7419_ATTENUATOR_SUB_REG, 0xe0); > > This looks like it's setting default volumes - just leave those at the > > chip defaults and let userspace handle setting them, what works for one > > board may be totally inappropriate on another board and using the chip > > default means we've got some fixed thing we don't need to discuss. > This is actually setting the default/cache to the first mute value due > to the assumption in my implementation of the tda7419-specific get/set > for these registers. It simplified the code a bit to have these > initialized like this. e.g. for the attenuator group of registers, > x11xxxxx are all mute values, so 0xe0 is setting these regs to that > first mute value to simplify things. I'll take another look at > eliminating this. As it is, it does not change the fact that the actual > reset value of 0xff is also mute from a user POV. If it is useful it definitely needs a comment explaining what's happening and that there's no practical change to the configuration. It would be nicer to be robust against the device getting a wider range of values in the register but that seems plausible. --FeAIMMcddNRN4P4/ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAlqiqEcACgkQJNaLcl1U h9DjSwf/QqqpF+vmYV6qsaB0YjTlO0Nh5EAkOzubnQ8tIVazX3xRgK40/kbW+jyI 7beYEg+CO4znTEZGClm121f1oeWUDc+cZCnPsCBcIDzhUsbgPdJRMIq3Rp/3Cv6a 6DYqlhjs49h0tHu6OEXvC9rWWdSaNSePF6OQu7S73QpTJ/IMv5KFe3d+3A/nUXLs 5iyUraQBY1PkC7RdHbUSqHL3iTAzj3oGP9BmL9F50JmbE2ksjmgdIBj8g1Y+yjaP AG4n5ZBJdDURjO0GyGADSxqTVX7Crj9mClrj9ZEJ6gncLnETmEk5a74MjmRoOeNd /TBQW6/5doDKnhxI9abhGelsvZrG5g== =sf3B -----END PGP SIGNATURE----- --FeAIMMcddNRN4P4/--