Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Oder Chiou <oder_chiou@realtek.com>
Cc: bardliao@realtek.com, alsa-devel@alsa-project.org,
	lgirdwood@gmail.com, flove@realtek.com
Subject: Re: [PATCH] ASoC: add RT5677 CODEC driver
Date: Sun, 1 Jun 2014 20:19:13 +0100	[thread overview]
Message-ID: <20140601191913.GP5099@sirena.org.uk> (raw)
In-Reply-To: <1401107553-314-1-git-send-email-oder_chiou@realtek.com>


[-- Attachment #1.1: Type: text/plain, Size: 1844 bytes --]

On Mon, May 26, 2014 at 08:32:33PM +0800, Oder Chiou wrote:
> This patch adds the Realtek ALC5677 codec driver.

This looks nice but some minor things need fixing.  Since they're so
minor especially in the context of such a large and generally good
driver I've gone ahead and applied this, please submit followup patches
for the issues below.

> +	/* ADC Boost Volume Control */
> +	SOC_DOUBLE_TLV("STO1 ADC Boost Gain", RT5677_STO1_2_ADC_BST,
> +		RT5677_STO1_ADC_L_BST_SFT, RT5677_STO1_ADC_R_BST_SFT, 3, 0,
> +		adc_bst_tlv),

Gain controls of all kinds should be called Volume so UIs do the right
thing.

> +static const struct snd_kcontrol_new rt5677_sto2_dmic_mux =
> +	SOC_DAPM_ENUM("Stereo2 DMIC source", rt5677_stereo2_dmic_enum);

The general style is to capitalise each word so "Stereo2 DMIC Source".

> +static int rt5677_set_micbias1_event(struct snd_soc_dapm_widget *w,
> +	struct snd_kcontrol *kcontrol, int event)
> +{
> +	struct snd_soc_codec *codec = w->codec;
> +	struct rt5677_priv *rt5677 = snd_soc_codec_get_drvdata(codec);
> +
> +	switch (event) {
> +	case SND_SOC_DAPM_POST_PMU:
> +		regmap_update_bits(rt5677->regmap, RT5677_PWR_ANLG2,
> +			RT5677_PWR_CLK_MB1 | RT5677_PWR_PP_MB1 |
> +			RT5677_PWR_CLK_MB, RT5677_PWR_CLK_MB1 |
> +			RT5677_PWR_PP_MB1 | RT5677_PWR_CLK_MB);

What does this do - I note we never undo this?

> +	/* Input Side */
> +	/* micbias */
> +	SND_SOC_DAPM_SUPPLY("micbias1", RT5677_PWR_ANLG2, RT5677_PWR_MB1_BIT,
> +		0, rt5677_set_micbias1_event, SND_SOC_DAPM_POST_PMU),

Idiomaticlaly this would be "MICBIAS1".

> +static int __init rt5677_modinit(void)
> +{
> +	return i2c_add_driver(&rt5677_i2c_driver);
> +}
> +module_init(rt5677_modinit);
> +
> +static void __exit rt5677_modexit(void)
> +{
> +	i2c_del_driver(&rt5677_i2c_driver);
> +}
> +module_exit(rt5677_modexit);

module_i2c_driver().

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



  reply	other threads:[~2014-06-01 19:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-26 12:32 [PATCH] ASoC: add RT5677 CODEC driver Oder Chiou
2014-06-01 19:19 ` Mark Brown [this message]
2014-06-09  5:22   ` Oder Chiou

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=20140601191913.GP5099@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=bardliao@realtek.com \
    --cc=flove@realtek.com \
    --cc=lgirdwood@gmail.com \
    --cc=oder_chiou@realtek.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