From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Lars-Peter Clausen <lars@metafoo.de>
Cc: Mike Frysinger <vapier.adi@gmail.com>,
alsa-devel@alsa-project.org, Liam Girdwood <lrg@ti.com>,
device-drivers-devel@blackfin.uclinux.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/4] ASoC: Add ADAU1373 codec support
Date: Thu, 11 Aug 2011 18:27:11 +0900 [thread overview]
Message-ID: <20110811092702.GA18454@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <1312948364-2587-2-git-send-email-lars@metafoo.de>
On Wed, Aug 10, 2011 at 05:52:42AM +0200, Lars-Peter Clausen wrote:
> +static const char *adau1373_micbias_text[] = {
> + "2.9 V",
> + "2.2 V",
> + "2.6 V",
> + "1.8 V",
> +};
This should be controlled by platform data and/or the machine driver,
not interactively by the user. With some microphone technologies there
is actually a risk of damage with higher micbiases.
> + SOC_DOUBLE("AIF3 Playback Boost(+6dB)", ADAU1373_VOL_GAIN1, 4, 5, 1, 0),
> + SOC_DOUBLE("AIF2 Playback Boost(+6dB)", ADAU1373_VOL_GAIN1, 2, 3, 1, 0),
> + SOC_DOUBLE("AIF1 Playback Boost(+6dB)", ADAU1373_VOL_GAIN1, 0, 1, 1, 0),
> + SOC_DOUBLE("AIF3 Capture Boost(+6dB)", ADAU1373_VOL_GAIN2, 4, 5, 1, 0),
> + SOC_DOUBLE("AIF2 Capture Boost(+6dB)", ADAU1373_VOL_GAIN2, 2, 3, 1, 0),
> + SOC_DOUBLE("AIF1 Capture Boost(+6dB)", ADAU1373_VOL_GAIN2, 0, 1, 1, 0),
> + SOC_DOUBLE("DMIC Capture Boost(+6dB)", ADAU1373_VOL_GAIN3, 6, 7, 1, 0),
> + SOC_DOUBLE("ADC Capture Boost(+6dB)", ADAU1373_VOL_GAIN3, 4, 5, 1, 0),
> + SOC_DOUBLE("DAC2 Playback Boost(+6dB)", ADAU1373_VOL_GAIN3, 2, 3, 1, 0),
> + SOC_DOUBLE("DAC1 Playback Boost(+6dB)", ADAU1373_VOL_GAIN3, 0, 1, 1, 0),
> +
> + SOC_DOUBLE("Input1 Boost(+20dB)", ADAU1373_ADC_GAIN, 0, 4, 1, 0),
> + SOC_DOUBLE("Input2 Boost(+20dB)", ADAU1373_ADC_GAIN, 1, 5, 1, 0),
> + SOC_DOUBLE("Input3 Boost(+20dB)", ADAU1373_ADC_GAIN, 2, 6, 1, 0),
> + SOC_DOUBLE("Input4 Boost(+20dB)", ADAU1373_ADC_GAIN, 3, 7, 1, 0),
All this stuff should be TLV.
> + SOC_ENUM("Lineout1 Mono Stereo", adau1373_lineout1_mode_enum),
> + SOC_ENUM("Speaker Mono Stereo", adau1373_speaker_mode_enum),
I'd expect these to be platform data/machine data rather than user
control? The speaker wiring isn't going to vary dynamically...
> + switch (freq / params_rate(params)) {
> + case 1024: /* fs */
> + div = 0;
> + break;
> + case 1536: /* 2/3 fs */
> + div = 1;
> + break;
These comments look inaccuate, fs is the sample rate so a divide of 1
would be fs.
> +static void adau1373_load_drc_settings(struct snd_soc_codec *codec,
> + unsigned int nr, uint8_t *drc)
> +{
> + unsigned int i;
> +
> + for (i = 0; i < 13; ++i)
> + snd_soc_write(codec, ADAU1373_DRC(nr) + i, drc[i]);
ARRAY_SIZE() or a #define or something rather than a magic number.
WARNING: multiple messages have this Message-ID (diff)
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Lars-Peter Clausen <lars@metafoo.de>
Cc: Liam Girdwood <lrg@ti.com>,
alsa-devel@alsa-project.org,
device-drivers-devel@blackfin.uclinux.org,
linux-kernel@vger.kernel.org,
Mike Frysinger <vapier.adi@gmail.com>
Subject: Re: [PATCH 2/4] ASoC: Add ADAU1373 codec support
Date: Thu, 11 Aug 2011 18:27:11 +0900 [thread overview]
Message-ID: <20110811092702.GA18454@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <1312948364-2587-2-git-send-email-lars@metafoo.de>
On Wed, Aug 10, 2011 at 05:52:42AM +0200, Lars-Peter Clausen wrote:
> +static const char *adau1373_micbias_text[] = {
> + "2.9 V",
> + "2.2 V",
> + "2.6 V",
> + "1.8 V",
> +};
This should be controlled by platform data and/or the machine driver,
not interactively by the user. With some microphone technologies there
is actually a risk of damage with higher micbiases.
> + SOC_DOUBLE("AIF3 Playback Boost(+6dB)", ADAU1373_VOL_GAIN1, 4, 5, 1, 0),
> + SOC_DOUBLE("AIF2 Playback Boost(+6dB)", ADAU1373_VOL_GAIN1, 2, 3, 1, 0),
> + SOC_DOUBLE("AIF1 Playback Boost(+6dB)", ADAU1373_VOL_GAIN1, 0, 1, 1, 0),
> + SOC_DOUBLE("AIF3 Capture Boost(+6dB)", ADAU1373_VOL_GAIN2, 4, 5, 1, 0),
> + SOC_DOUBLE("AIF2 Capture Boost(+6dB)", ADAU1373_VOL_GAIN2, 2, 3, 1, 0),
> + SOC_DOUBLE("AIF1 Capture Boost(+6dB)", ADAU1373_VOL_GAIN2, 0, 1, 1, 0),
> + SOC_DOUBLE("DMIC Capture Boost(+6dB)", ADAU1373_VOL_GAIN3, 6, 7, 1, 0),
> + SOC_DOUBLE("ADC Capture Boost(+6dB)", ADAU1373_VOL_GAIN3, 4, 5, 1, 0),
> + SOC_DOUBLE("DAC2 Playback Boost(+6dB)", ADAU1373_VOL_GAIN3, 2, 3, 1, 0),
> + SOC_DOUBLE("DAC1 Playback Boost(+6dB)", ADAU1373_VOL_GAIN3, 0, 1, 1, 0),
> +
> + SOC_DOUBLE("Input1 Boost(+20dB)", ADAU1373_ADC_GAIN, 0, 4, 1, 0),
> + SOC_DOUBLE("Input2 Boost(+20dB)", ADAU1373_ADC_GAIN, 1, 5, 1, 0),
> + SOC_DOUBLE("Input3 Boost(+20dB)", ADAU1373_ADC_GAIN, 2, 6, 1, 0),
> + SOC_DOUBLE("Input4 Boost(+20dB)", ADAU1373_ADC_GAIN, 3, 7, 1, 0),
All this stuff should be TLV.
> + SOC_ENUM("Lineout1 Mono Stereo", adau1373_lineout1_mode_enum),
> + SOC_ENUM("Speaker Mono Stereo", adau1373_speaker_mode_enum),
I'd expect these to be platform data/machine data rather than user
control? The speaker wiring isn't going to vary dynamically...
> + switch (freq / params_rate(params)) {
> + case 1024: /* fs */
> + div = 0;
> + break;
> + case 1536: /* 2/3 fs */
> + div = 1;
> + break;
These comments look inaccuate, fs is the sample rate so a divide of 1
would be fs.
> +static void adau1373_load_drc_settings(struct snd_soc_codec *codec,
> + unsigned int nr, uint8_t *drc)
> +{
> + unsigned int i;
> +
> + for (i = 0; i < 13; ++i)
> + snd_soc_write(codec, ADAU1373_DRC(nr) + i, drc[i]);
ARRAY_SIZE() or a #define or something rather than a magic number.
next prev parent reply other threads:[~2011-08-11 9:27 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-10 3:52 [PATCH 1/4] ASoC: DAPM: Allow multiple mixer sources to be routed via the same switch Lars-Peter Clausen
2011-08-10 3:52 ` Lars-Peter Clausen
2011-08-10 3:52 ` [PATCH 2/4] ASoC: Add ADAU1373 codec support Lars-Peter Clausen
2011-08-10 3:52 ` Lars-Peter Clausen
2011-08-10 6:11 ` Lars-Peter Clausen
2011-08-10 6:11 ` Lars-Peter Clausen
2011-08-11 9:27 ` Mark Brown [this message]
2011-08-11 9:27 ` Mark Brown
2011-08-11 10:11 ` Lars-Peter Clausen
2011-08-11 10:11 ` Lars-Peter Clausen
2011-08-11 13:16 ` Mark Brown
2011-08-11 13:16 ` Mark Brown
2011-08-12 0:20 ` Lars-Peter Clausen
2011-08-12 0:20 ` Lars-Peter Clausen
2011-08-12 1:20 ` Mark Brown
2011-08-12 1:20 ` Mark Brown
2011-08-13 3:25 ` Lars-Peter Clausen
2011-08-13 3:25 ` Lars-Peter Clausen
2011-08-14 10:24 ` Mark Brown
2011-08-14 10:24 ` Mark Brown
2011-08-10 3:52 ` [PATCH 3/4] ASoC: Blackfin: ADAU1373 eval board support Lars-Peter Clausen
2011-08-10 3:52 ` Lars-Peter Clausen
2011-08-10 5:27 ` Scott Jiang
2011-08-10 5:27 ` [alsa-devel] " Scott Jiang
2011-08-10 6:09 ` Lars-Peter Clausen
2011-08-10 6:09 ` [alsa-devel] " Lars-Peter Clausen
2011-08-10 3:52 ` [PATCH 4/4] Blackfin: bf537: Stamp: Register ASoC EVAL-ADAU1373 board driver Lars-Peter Clausen
2011-08-10 3:52 ` Lars-Peter Clausen
2011-08-11 9:31 ` [PATCH 1/4] ASoC: DAPM: Allow multiple mixer sources to be routed via the same switch Mark Brown
2011-08-11 9:31 ` Mark Brown
2011-08-11 9:59 ` Lars-Peter Clausen
2011-08-11 9:59 ` [alsa-devel] " Lars-Peter Clausen
2011-08-12 1:22 ` Mark Brown
-- strict thread matches above, loose matches on Subject: below --
2011-08-15 18:15 Lars-Peter Clausen
2011-08-15 18:15 ` [PATCH 2/4] ASoC: Add ADAU1373 codec support Lars-Peter Clausen
2011-08-16 15:54 ` Mark Brown
2011-08-16 15:54 ` 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=20110811092702.GA18454@opensource.wolfsonmicro.com \
--to=broonie@opensource.wolfsonmicro.com \
--cc=alsa-devel@alsa-project.org \
--cc=device-drivers-devel@blackfin.uclinux.org \
--cc=lars@metafoo.de \
--cc=linux-kernel@vger.kernel.org \
--cc=lrg@ti.com \
--cc=vapier.adi@gmail.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.