From: Mark Brown <broonie@kernel.org>
To: Bard <bardliao@realtek.com>
Cc: Oder Chiou <oder_chiou@realtek.com>,
"alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
"swarren@nvidia.com" <swarren@nvidia.com>,
Flove <flove@realtek.com>
Subject: Re: [PATCH] ASoC: add RT5640 CODEC driver
Date: Mon, 22 Apr 2013 15:06:00 +0100 [thread overview]
Message-ID: <20130422140558.GA5019@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <1121E117AD4ECE49880A389A396215BB8718BB3D46@rtitmbs7.realtek.com.tw>
[-- Attachment #1.1: Type: text/plain, Size: 1374 bytes --]
On Mon, Apr 22, 2013 at 03:03:05PM +0800, Bard wrote:
> Please see my reply below.
As you've been told several times now please fix your mailer to quote
the text you're replying to. You shouldn't need to point out that
you're replying inline, this is how we do things...
> > +static const SOC_ENUM_SINGLE_DECL(
> > + rt5640_in2_mode_enum, RT5640_IN3_IN4,
> > + RT5640_IN_SFT2, rt5640_input_mode);
> Platform data...
> Bard: Can I export a function that machine can configure it by this function?
Why on earth would you want to do that?
> > +static int rt5640_vol_rescale_put(struct snd_kcontrol *kcontrol,
> > + struct snd_ctl_elem_value *ucontrol) {
> > + struct soc_mixer_control *mc =
> > + (struct soc_mixer_control *)kcontrol->private_value;
> > + struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
> > + unsigned int val, val2;
> > + val = VOL_RESCALE_MAX_VOL - ucontrol->value.integer.value[0];
> > + val2 = VOL_RESCALE_MAX_VOL - ucontrol->value.integer.value[1];
> > + return snd_soc_update_bits_locked(codec, mc->reg, RT5640_L_VOL_MASK |
> > + RT5640_R_VOL_MASK, val << mc->shift | val2); }
> This looks like a variant on the _RANGE controls?
> Bard: Yes, we want to limit the max value of volume.
> If it is not good, I will change it.
This shouldn't be open coded in the driver, the functions should be
generic. Code wise it's fine.
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
next prev parent reply other threads:[~2013-04-22 14:06 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1366121437-19396-1-git-send-email-bardliao@realtek.com>
[not found] ` <20130416143807.GJ26958@opensource.wolfsonmicro.com>
2013-04-22 7:03 ` [PATCH] ASoC: add RT5640 CODEC driver Bard
2013-04-22 14:06 ` Mark Brown [this message]
[not found] <1370927416-12216-1-git-send-email-bardliao@realtek.com>
2013-06-11 9:12 ` Mark Brown
2013-06-11 17:36 ` Stephen Warren
2013-06-12 7:47 ` Bard Liao
2013-06-11 17:41 ` Stephen Warren
2013-06-12 7:56 ` Bard Liao
2013-06-12 15:31 ` Mark Brown
2013-06-11 20:43 ` Stephen Warren
2013-06-12 16:42 ` Mark Brown
[not found] <1369983899-13580-1-git-send-email-bardliao@realtek.com>
2013-06-03 15:35 ` Mark Brown
2013-06-04 6:39 ` Bard Liao
2013-06-04 9:53 ` Mark Brown
[not found] ` <1121E117AD4ECE49880A389A396215BB8A8969924B@rtitmbs7.realtek.com.tw>
2013-06-03 15:48 ` Stephen Warren
2013-06-04 6:23 ` Bard Liao
2013-06-04 21:51 ` Stephen Warren
2013-06-04 22:05 ` Stephen Warren
2013-06-05 10:02 ` Bard Liao
[not found] <1364340938-17175-1-git-send-email-swarren@wwwdotorg.org>
2013-03-27 1:15 ` Mark Brown
2013-03-27 22:50 ` Stephen Warren
2013-03-27 23:07 ` Mark Brown
[not found] ` <1121E117AD4ECE49880A389A396215BB8718BB370D@rtitmbs7.realtek.com.tw>
[not found] ` <516DD0D4.5070409@wwwdotorg.org>
2013-04-17 14:01 ` Mark Brown
2013-04-17 15:18 ` Stephen Warren
2013-04-17 15:28 ` Mark Brown
2013-04-17 16:25 ` Stephen Warren
2013-04-17 18:52 ` Mark Brown
2013-04-17 18:56 ` Stephen Warren
2013-04-17 19:13 ` Mark Brown
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=20130422140558.GA5019@opensource.wolfsonmicro.com \
--to=broonie@kernel.org \
--cc=alsa-devel@alsa-project.org \
--cc=bardliao@realtek.com \
--cc=flove@realtek.com \
--cc=oder_chiou@realtek.com \
--cc=swarren@nvidia.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.