alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Matt Porter <mporter@konsulko.com>
Cc: Liam Girdwood <lgirdwood@gmail.com>,
	Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
	Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	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
Date: Fri, 9 Mar 2018 15:29:12 +0000	[thread overview]
Message-ID: <20180309152912.GF5252@sirena.org.uk> (raw)
In-Reply-To: <20180309143548.xuajwfhiwuua7jg5@bacon.ohporter.com>

[-- Attachment #1: Type: text/plain, Size: 1929 bytes --]

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.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2018-03-09 15:29 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-27 22:51 [PATCH 0/2] TDA7419 audio processor driver Matt Porter
2018-02-27 22:51 ` [PATCH 1/2] ASoC: add tda7419 audio processor binding Matt Porter
2018-03-05 22:29   ` Rob Herring
2018-03-09 14:39     ` Matt Porter
2018-02-27 22:51 ` [PATCH 2/2] ASoC: add tda7419 audio processor driver Matt Porter
2018-02-28 11:00   ` Mark Brown
2018-03-09 14:35     ` Matt Porter
2018-03-09 15:29       ` Mark Brown [this message]
2018-03-18 17:21         ` Matt Porter
2018-03-02 22:48   ` [PATCH] ASoC: fix boolreturn.cocci warnings kbuild test robot
2018-03-02 22:48   ` [PATCH 2/2] ASoC: add tda7419 audio processor driver kbuild test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180309152912.GF5252@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=devicetree@vger.kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mporter@konsulko.com \
    --cc=perex@perex.cz \
    --cc=robh+dt@kernel.org \
    --cc=tiwai@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).