All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Ujfalusi <peter.ujfalusi@ti.com>
To: Mark Brown <broonie@kernel.org>
Cc: Misael Lopez Cruz <misael.lopez@ti.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	alsa-devel@alsa-project.org
Subject: Re: [PATCH 1/2] ASoC: tlv320aic3x: Add output driver pop reduction controls
Date: Mon, 10 Nov 2014 15:23:04 +0200	[thread overview]
Message-ID: <5460BC38.9010707@ti.com> (raw)
In-Reply-To: <20141110105155.GL3815@sirena.org.uk>

On 11/10/2014 12:51 PM, Mark Brown wrote:
> On Mon, Nov 10, 2014 at 12:27:32PM +0200, Peter Ujfalusi wrote:
> 
>> +static const struct soc_enum aic3x_pop_reduction_enum[] = {
>> +	SOC_ENUM_SINGLE(HPOUT_POP_REDUCTION, 4, 12, aic3x_poweron_time),
>> +	SOC_ENUM_SINGLE(HPOUT_POP_REDUCTION, 2, 4, aic3x_rampup_step),
>> +};
> 
>> +	/* Pop reduction */
>> +	SOC_ENUM("Output Driver Power-On time", aic3x_pop_reduction_enum[0]),
>> +	SOC_ENUM("Output Driver Ramp-up step", aic3x_pop_reduction_enum[1]),
> 
> Don't add arrays of enums with magic number indexes like this, it's hard
> to read and hence error prone.

I agree on this. I have not changed this since this driver is using enums like
this and I thought it is better to follow the style.

But if I add these to the aic3x_enum[] array with a define for the ID I think
it is going to be a bit better?

-- 
Péter

  reply	other threads:[~2014-11-10 13:23 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-10 10:27 [PATCH 1/2] ASoC: tlv320aic3x: Add output driver pop reduction controls Peter Ujfalusi
2014-11-10 10:27 ` [PATCH 2/2] ASoC: tlv320aic3x: Add TDM support Peter Ujfalusi
2014-11-10 12:06   ` Mark Brown
2014-11-10 10:51 ` [PATCH 1/2] ASoC: tlv320aic3x: Add output driver pop reduction controls Mark Brown
2014-11-10 13:23   ` Peter Ujfalusi [this message]
2014-11-10 13:27     ` Mark Brown
2014-11-11  8:01       ` Peter Ujfalusi

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=5460BC38.9010707@ti.com \
    --to=peter.ujfalusi@ti.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=misael.lopez@ti.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.