From: broonie@opensource.wolfsonmicro.com (Mark Brown)
To: linux-arm-kernel@lists.infradead.org
Subject: [alsa-devel] [PATCH] ASoC: CS4271 codec support
Date: Mon, 17 Jan 2011 15:40:44 +0000 [thread overview]
Message-ID: <20110117154044.GL21113@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <1295271449.16460.34.camel@r60e>
On Mon, Jan 17, 2011 at 04:37:29PM +0300, Alexander wrote:
> On Mon, 2011-01-17 at 10:30 +0000, Dimitris Papastamos wrote:
> > On Mon, 2011-01-17 at 01:35 +0300, Alexander wrote:
> > > +/* CS4271 default register settings, except auto-mute is off */
> > > +static const u8 cs4271_dflt_reg[CS4271_NR_REGS] = {
> > > + 0, 0, 0, CS4271_DACVOL_ATAPI_AL_BR, 0, 0, 0,
> > > + CS4271_MODE2_CPEN | CS4271_MODE2_PDN,
> > > +};
> > I'd be better to leave these as defaults, and perform any initialization
> > in the the cs4271_probe() function.
> It's space optimized without affecting readability. I can rename it to
> cs4271_init_reg[].
You're missing Dimitris' point here. There's an expectation that the
register defaults will be the physical register defaults, if you need to
change them do it with an explicit write during startup.
There's several other places where you're responding to review with
similar comments about space optimisation which don't really seem to
engage at all with what Dimitris has said.
> > > +/* CS4271 controls */
> > > +static DECLARE_TLV_DB_SCALE(cs4271_dac_tlv, -12700, 100, 0);
> > Are you use this doesn't mute the DAC? If so the the last parameter
> > should be 1.
> No I do not use this, some people asked for this last time I've tried to
> submit this code. And no, this doesn't mute the DAC.
Then again -127dB is more attenuation than many actual mutes.
> > > + ret = (cs4271->bus_type == SND_SOC_SPI) ? 16 : 8;
> > Please avoid using the ternary operator like this.
> What's wrong with it?
It's not great for legibility.
prev parent reply other threads:[~2011-01-17 15:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-16 22:35 [PATCH] ASoC: CS4271 codec support Alexander
2011-01-17 10:30 ` [alsa-devel] " Dimitris Papastamos
2011-01-17 13:37 ` Alexander
2011-01-17 15:40 ` Mark Brown [this message]
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=20110117154044.GL21113@opensource.wolfsonmicro.com \
--to=broonie@opensource.wolfsonmicro.com \
--cc=linux-arm-kernel@lists.infradead.org \
/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).