mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Charles Keepax <ckeepax@opensource.cirrus.com>
To: Steven Eckhoff <steven.eckhoff.opensource@gmail.com>
Cc: Mark Brown <broonie@kernel.org>, <linux-kernel@vger.kernel.org>,
	<alsa-devel@alsa-project.org>, Takashi Iwai <tiwai@suse.com>,
	Liam Girdwood <lgirdwood@gmail.com>
Subject: Re: [alsa-devel] [PATCH v5] ASoC: TSCS42xx: Add support for Tempo Semiconductor's TSCS42xx audio CODEC
Date: Thu, 14 Dec 2017 09:32:44 +0000	[thread overview]
Message-ID: <20171214093244.udrjwgfvpxpc3jq7@localhost.localdomain> (raw)
In-Reply-To: <20171212213114.n5pcgy6q6m3qu5s4@localhost.localdomain>

On Tue, Dec 12, 2017 at 03:31:16PM -0600, Steven Eckhoff wrote:
> On Tue, Dec 12, 2017 at 04:32:54PM +0000, Mark Brown wrote:
> > On Mon, Dec 11, 2017 at 01:54:25PM -0600, Steven Eckhoff wrote:
> > > +static int tscs42xx_probe(struct snd_soc_codec *codec)
> > > +{
> > > +	int i;
> > > +	int ret;
> > > +
> > > +	for (i = 0; i < ARRAY_SIZE(r_inits); ++i) {
> > > +		ret = snd_soc_write(codec, r_inits[i].reg, r_inits[i].def);
> > > +		if (ret < 0) {
> > > +			dev_err(codec->dev,
> > > +				"Failed to write codec defaults (%d)\n", ret);
> > > +			return ret;
> > > +		}
> > > +	}
> > 
> > I'd expect the driver to just reset the CODEC (it appears to have that
> > feature) and the regmap.
> > 
> These init values were meant to be driver defaults that differed from
> the device defaults. In hindsight this was a bad idea. I am removing
> them in the next revision and will have the machine driver setup the
> codec appropriately.
> 

Not sure what you mean here but setting up CODEC registers
directly from the machine driver is probably not ideal. You
should probably be looking into regmap_register_patch this lets
you apply a bunch of register settings to the chip every time you
do a regmap_cache_sync. This is useful for situations like the
chip has terrible register defaults you want to correct.

Thanks,
Charles

  parent reply	other threads:[~2017-12-14  9:33 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-11 19:54 Steven Eckhoff
2017-12-12 13:04 ` Charles Keepax
2017-12-12 13:10   ` Takashi Iwai
2017-12-12 16:54     ` Steven Eckhoff
2017-12-12 16:35   ` Steven Eckhoff
2017-12-12 16:32 ` Mark Brown
2017-12-12 21:31   ` Steven Eckhoff
2017-12-12 22:51     ` Steven Eckhoff
2017-12-13  6:20       ` Steven Eckhoff
2017-12-13 10:47       ` Mark Brown
2017-12-13 15:40         ` Steven Eckhoff
2017-12-14  9:32     ` Charles Keepax [this message]
2017-12-14 22:36       ` [alsa-devel] " Steven Eckhoff
2017-12-14 22:43         ` Steven Eckhoff
2017-12-15 11:36           ` Charles Keepax
2017-12-15 16:08             ` Steven Eckhoff
2017-12-17 19:23       ` Steven Eckhoff

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=20171214093244.udrjwgfvpxpc3jq7@localhost.localdomain \
    --to=ckeepax@opensource.cirrus.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=steven.eckhoff.opensource@gmail.com \
    --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

all inboxes | Powered by JetHome®