From: Stephen Warren <swarren@wwwdotorg.org>
To: Lars-Peter Clausen <lars@metafoo.de>
Cc: Bard Liao <bardliao@realtek.com>,
Linux-ALSA <alsa-devel@alsa-project.org>
Subject: Re: Broken headphone and speaker amplifier supplies for the rt5640 driver
Date: Fri, 26 Jul 2013 10:57:53 -0600 [thread overview]
Message-ID: <51F2AA91.1010400@wwwdotorg.org> (raw)
In-Reply-To: <51F29064.8080003@metafoo.de>
On 07/26/2013 09:06 AM, Lars-Peter Clausen wrote:
> Hi,
>
> The rt5640 driver sets for both the headphone and speaker amplifier widget
> the shift to SND_SOC_NOPM, which is -1. This doesn't make much sense and
> breaks compilation with some changes I've made.
>
> I guess for the heaphone amplifier the right fix is to set the shift to
> RT5640_PWR_HA_BIT ...
If I make those changes (see below for the exact patch I tried), then
both headphones and speakers do appear to still work fine. Bard will
have to comment on whether the changes are actually correct though:-)
> diff --git a/sound/soc/codecs/rt5640.c b/sound/soc/codecs/rt5640.c
> index ce585e3..e3ab0b2 100644
> --- a/sound/soc/codecs/rt5640.c
> +++ b/sound/soc/codecs/rt5640.c
> @@ -899,8 +899,6 @@ static int spk_event(struct snd_soc_dapm_widget *w,
>
> switch (event) {
> case SND_SOC_DAPM_POST_PMU:
> - regmap_update_bits(rt5640->regmap, RT5640_PWR_DIG1,
> - 0x0001, 0x0001);
> regmap_update_bits(rt5640->regmap, RT5640_PR_BASE + 0x1c,
> 0xf000, 0xf000);
> break;
> @@ -908,8 +906,6 @@ static int spk_event(struct snd_soc_dapm_widget *w,
> case SND_SOC_DAPM_PRE_PMD:
> regmap_update_bits(rt5640->regmap, RT5640_PR_BASE + 0x1c,
> 0xf000, 0x0000);
> - regmap_update_bits(rt5640->regmap, RT5640_PWR_DIG1,
> - 0x0001, 0x0000);
> break;
>
> default:
> @@ -1159,13 +1155,13 @@ static const struct snd_soc_dapm_widget rt5640_dapm_widgets[] = {
> SND_SOC_DAPM_SUPPLY("Improve MONO Amp Drv", RT5640_PWR_ANLG1,
> RT5640_PWR_MA_BIT, 0, NULL, 0),
> SND_SOC_DAPM_SUPPLY("Improve HP Amp Drv", RT5640_PWR_ANLG1,
> - SND_SOC_NOPM, 0, NULL, 0),
> + RT5640_PWR_HA_BIT, 0, NULL, 0),
> SND_SOC_DAPM_PGA("HP L Amp", RT5640_PWR_ANLG1,
> RT5640_PWR_HP_L_BIT, 0, NULL, 0),
> SND_SOC_DAPM_PGA("HP R Amp", RT5640_PWR_ANLG1,
> RT5640_PWR_HP_R_BIT, 0, NULL, 0),
> SND_SOC_DAPM_SUPPLY("Improve SPK Amp Drv", RT5640_PWR_DIG1,
> - SND_SOC_NOPM, 0, spk_event,
> + RT5640_PWR_CLS_D_BIT, 0, spk_event,
> SND_SOC_DAPM_PRE_PMD | SND_SOC_DAPM_POST_PMU),
> /* Output Lines */
> SND_SOC_DAPM_OUTPUT("SPOLP"),
next prev parent reply other threads:[~2013-07-26 16:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-26 15:06 Broken headphone and speaker amplifier supplies for the rt5640 driver Lars-Peter Clausen
2013-07-26 16:57 ` Stephen Warren [this message]
2013-07-27 17:35 ` Mark Brown
2013-07-29 3:04 ` Broken headphone and speaker amplifier suppliesforthe " Bard Liao
2013-07-29 6:07 ` Mark Brown
2013-07-29 6:14 ` Lars-Peter Clausen
2013-07-29 6:45 ` Mark Brown
[not found] ` <201307290148.r6T1mLk1013980@rtits1.realtek.com>
2013-07-29 2:48 ` Bard Liao
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=51F2AA91.1010400@wwwdotorg.org \
--to=swarren@wwwdotorg.org \
--cc=alsa-devel@alsa-project.org \
--cc=bardliao@realtek.com \
--cc=lars@metafoo.de \
/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