From: Dong Aisheng <aisheng.dong@freescale.com>
To: Shawn Guo <shawn.guo@linaro.org>
Cc: Zeng@alsa-project.org, alsa-devel@alsa-project.org,
Lionel Xu <Lionel.Xu@freescale.com>,
Brown <broonie@opensource.wolfsonmicro.com>,
Mark@alsa-project.org, Zhaoming <zengzm.kernel@gmail.com>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] ASoC: sgtl5000: fix power on/off of MIC bias
Date: Wed, 28 Mar 2012 17:58:58 +0800 [thread overview]
Message-ID: <20120328095857.GA29787@shlinux2.ap.freescale.net> (raw)
In-Reply-To: <1332919833-9641-1-git-send-email-shawn.guo@linaro.org>
On Wed, Mar 28, 2012 at 03:30:33PM +0800, Shawn Guo wrote:
> From: Lionel Xu <Lionel.Xu@freescale.com>
>
> There is no sound in the recorded wav, to enable recording, the VAG
> should be powered up, and the mic bias resistor should be set up with
> proper value.
>
> Signed-off-by: Lionel Xu <lionel.xu@freescale.com>
> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
> Cc: Zeng Zhaoming <zengzm.kernel@gmail.com>
> ---
> sound/soc/codecs/sgtl5000.c | 14 +++++++++++---
> 1 files changed, 11 insertions(+), 3 deletions(-)
>
> diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c
> index d192626..a24299c 100644
> --- a/sound/soc/codecs/sgtl5000.c
> +++ b/sound/soc/codecs/sgtl5000.c
> @@ -132,11 +132,18 @@ static int mic_bias_event(struct snd_soc_dapm_widget *w,
> snd_soc_update_bits(w->codec, SGTL5000_CHIP_MIC_CTRL,
> SGTL5000_BIAS_R_MASK,
> SGTL5000_BIAS_R_4k << SGTL5000_BIAS_R_SHIFT);
> +
> + snd_soc_update_bits(w->codec, SGTL5000_CHIP_ANA_POWER,
> + SGTL5000_VAG_POWERUP, SGTL5000_VAG_POWERUP);
Only enable SGTL5000_VAG_POWERUP for mic bias_event may not be sufficient.
IIRC for line-in record, we also need to enable VAG_POWER.
Will verify it later when i'm free.
Regards
Dong Aisheng
> break;
>
> case SND_SOC_DAPM_PRE_PMD:
> snd_soc_update_bits(w->codec, SGTL5000_CHIP_MIC_CTRL,
> - SGTL5000_BIAS_R_MASK, 0);
> + SGTL5000_BIAS_R_MASK,
> + SGTL5000_BIAS_R_off << SGTL5000_BIAS_R_SHIFT);
> +
> + snd_soc_update_bits(w->codec, SGTL5000_CHIP_ANA_POWER,
> + SGTL5000_VAG_POWERUP, 0);
> break;
> }
> return 0;
> @@ -197,7 +204,7 @@ static const struct snd_soc_dapm_widget sgtl5000_dapm_widgets[] = {
> SND_SOC_DAPM_OUTPUT("HP_OUT"),
> SND_SOC_DAPM_OUTPUT("LINE_OUT"),
>
> - SND_SOC_DAPM_MICBIAS_E("Mic Bias", SGTL5000_CHIP_MIC_CTRL, 8, 0,
> + SND_SOC_DAPM_MICBIAS_E("Mic Bias", SND_SOC_NOPM, 0, 0,
> mic_bias_event,
> SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD),
>
> @@ -229,7 +236,8 @@ static const struct snd_soc_dapm_widget sgtl5000_dapm_widgets[] = {
> /* routes for sgtl5000 */
> static const struct snd_soc_dapm_route sgtl5000_dapm_routes[] = {
> {"Capture Mux", "LINE_IN", "LINE_IN"}, /* line_in --> adc_mux */
> - {"Capture Mux", "MIC_IN", "MIC_IN"}, /* mic_in --> adc_mux */
> + {"Mic Bias", NULL, "MIC_IN"}, /* mic_in --> mic bias */
> + {"Capture Mux", "MIC_IN", "Mic Bias"}, /* mic bias --> adc_mux */
>
> {"ADC", NULL, "Capture Mux"}, /* adc_mux --> adc */
> {"AIFOUT", NULL, "ADC"}, /* adc --> i2s_out */
> --
> 1.7.4.1
>
>
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
>
WARNING: multiple messages have this Message-ID (diff)
From: aisheng.dong@freescale.com (Dong Aisheng)
To: linux-arm-kernel@lists.infradead.org
Subject: [alsa-devel] [PATCH] ASoC: sgtl5000: fix power on/off of MIC bias
Date: Wed, 28 Mar 2012 17:58:58 +0800 [thread overview]
Message-ID: <20120328095857.GA29787@shlinux2.ap.freescale.net> (raw)
In-Reply-To: <1332919833-9641-1-git-send-email-shawn.guo@linaro.org>
On Wed, Mar 28, 2012 at 03:30:33PM +0800, Shawn Guo wrote:
> From: Lionel Xu <Lionel.Xu@freescale.com>
>
> There is no sound in the recorded wav, to enable recording, the VAG
> should be powered up, and the mic bias resistor should be set up with
> proper value.
>
> Signed-off-by: Lionel Xu <lionel.xu@freescale.com>
> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
> Cc: Zeng Zhaoming <zengzm.kernel@gmail.com>
> ---
> sound/soc/codecs/sgtl5000.c | 14 +++++++++++---
> 1 files changed, 11 insertions(+), 3 deletions(-)
>
> diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c
> index d192626..a24299c 100644
> --- a/sound/soc/codecs/sgtl5000.c
> +++ b/sound/soc/codecs/sgtl5000.c
> @@ -132,11 +132,18 @@ static int mic_bias_event(struct snd_soc_dapm_widget *w,
> snd_soc_update_bits(w->codec, SGTL5000_CHIP_MIC_CTRL,
> SGTL5000_BIAS_R_MASK,
> SGTL5000_BIAS_R_4k << SGTL5000_BIAS_R_SHIFT);
> +
> + snd_soc_update_bits(w->codec, SGTL5000_CHIP_ANA_POWER,
> + SGTL5000_VAG_POWERUP, SGTL5000_VAG_POWERUP);
Only enable SGTL5000_VAG_POWERUP for mic bias_event may not be sufficient.
IIRC for line-in record, we also need to enable VAG_POWER.
Will verify it later when i'm free.
Regards
Dong Aisheng
> break;
>
> case SND_SOC_DAPM_PRE_PMD:
> snd_soc_update_bits(w->codec, SGTL5000_CHIP_MIC_CTRL,
> - SGTL5000_BIAS_R_MASK, 0);
> + SGTL5000_BIAS_R_MASK,
> + SGTL5000_BIAS_R_off << SGTL5000_BIAS_R_SHIFT);
> +
> + snd_soc_update_bits(w->codec, SGTL5000_CHIP_ANA_POWER,
> + SGTL5000_VAG_POWERUP, 0);
> break;
> }
> return 0;
> @@ -197,7 +204,7 @@ static const struct snd_soc_dapm_widget sgtl5000_dapm_widgets[] = {
> SND_SOC_DAPM_OUTPUT("HP_OUT"),
> SND_SOC_DAPM_OUTPUT("LINE_OUT"),
>
> - SND_SOC_DAPM_MICBIAS_E("Mic Bias", SGTL5000_CHIP_MIC_CTRL, 8, 0,
> + SND_SOC_DAPM_MICBIAS_E("Mic Bias", SND_SOC_NOPM, 0, 0,
> mic_bias_event,
> SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD),
>
> @@ -229,7 +236,8 @@ static const struct snd_soc_dapm_widget sgtl5000_dapm_widgets[] = {
> /* routes for sgtl5000 */
> static const struct snd_soc_dapm_route sgtl5000_dapm_routes[] = {
> {"Capture Mux", "LINE_IN", "LINE_IN"}, /* line_in --> adc_mux */
> - {"Capture Mux", "MIC_IN", "MIC_IN"}, /* mic_in --> adc_mux */
> + {"Mic Bias", NULL, "MIC_IN"}, /* mic_in --> mic bias */
> + {"Capture Mux", "MIC_IN", "Mic Bias"}, /* mic bias --> adc_mux */
>
> {"ADC", NULL, "Capture Mux"}, /* adc_mux --> adc */
> {"AIFOUT", NULL, "ADC"}, /* adc --> i2s_out */
> --
> 1.7.4.1
>
>
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel at alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
>
next prev parent reply other threads:[~2012-03-28 9:47 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-28 7:30 [PATCH] ASoC: sgtl5000: fix power on/off of MIC bias Shawn Guo
2012-03-28 7:30 ` Shawn Guo
2012-03-28 9:05 ` Zeng Zhaoming
2012-03-28 9:05 ` Zeng Zhaoming
2012-03-28 9:52 ` Dong Aisheng-B29396
2012-03-28 9:52 ` [alsa-devel] " Dong Aisheng-B29396
2012-03-28 10:11 ` Zeng Zhaoming
2012-03-28 10:11 ` Zeng Zhaoming
2012-03-28 11:17 ` Xu Lionel-R63889
2012-03-28 11:17 ` Xu Lionel-R63889
2012-03-28 14:18 ` Shawn Guo
2012-03-28 14:18 ` [alsa-devel] " Shawn Guo
2012-03-28 14:36 ` Mark Brown
2012-03-28 14:36 ` [alsa-devel] " Mark Brown
2012-03-28 9:58 ` Dong Aisheng [this message]
2012-03-28 9:58 ` Dong Aisheng
2012-03-29 5:56 ` Shawn Guo
2012-03-29 5:56 ` Shawn Guo
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=20120328095857.GA29787@shlinux2.ap.freescale.net \
--to=aisheng.dong@freescale.com \
--cc=Lionel.Xu@freescale.com \
--cc=Mark@alsa-project.org \
--cc=Zeng@alsa-project.org \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=shawn.guo@linaro.org \
--cc=zengzm.kernel@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.