From: Takashi Iwai <tiwai@suse.de>
To: Frans Pop <elendil@planet.nl>
Cc: linux-pm@lists.linux-foundation.org,
linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org
Subject: Re: [regression] Sound not transferred to docking station after resume from StR
Date: Mon, 19 Apr 2010 14:14:57 +0200 [thread overview]
Message-ID: <s5h633nprjy.wl%tiwai@suse.de> (raw)
In-Reply-To: <s5h8w8jps9j.wl%tiwai@suse.de>
At Mon, 19 Apr 2010 13:59:36 +0200,
I wrote:
>
> At Mon, 19 Apr 2010 13:38:14 +0200,
> Frans Pop wrote:
> >
> > On Monday 19 April 2010, Takashi Iwai wrote:
> > > Could you give alsa-info.sh on your machine, preferably before/after
> > > suspend on both working (2.6.33) and non-working kernels?
> >
> > See files in attached tarball. Contents are:
> > * system boot (docked)
> > => alsa-info.txt_3[34]_docked
> > * undock
> > => alsa-info.txt_3[34]_undocked
> > * suspend - dock (while suspended) - resume
> > => alsa-info.txt_3[34]_after_resume_docked
> > * undock - redock (this disables the internal speakers)
> > => alsa-info.txt_34_after_resume_redocked
> >
> > > Also, you can try to copy sound/pci/hda/patch_analog.c from 2.6.33 to
> > > 2.6.34 to check whether it works. There shouldn't be many changes in
> > > that file.
> >
> > That fixes the problem.
>
> Then my rough guess is
>
> commit ea52bf260ecbb175339af3178c15788df21b7516
> Author: Daniel T Chen <crimsun@ubuntu.com>
> Date: Sun Dec 27 18:48:29 2009 -0500
>
> ALSA: hda: Add powerdown for Analog Devices HDA codecs
>
> Could you try to revert it?
Or how about the patch below?
Takashi
---
diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c
index 9cbd80c..2cf7d19 100644
--- a/sound/pci/hda/patch_analog.c
+++ b/sound/pci/hda/patch_analog.c
@@ -85,6 +85,9 @@ struct ad198x_spec {
const char **slave_sws;
};
+#define AD_HP_EVENT 0x01
+#define AD_MIC_EVENT 0x02
+
/*
* input MUX handling (common part)
*/
@@ -533,6 +536,11 @@ static int ad198x_resume(struct hda_codec *codec)
ad198x_init(codec);
snd_hda_codec_resume_amp(codec);
snd_hda_codec_resume_cache(codec);
+ if (codec->patch_ops.unsol_event) {
+ /* fake unsol events */
+ codec->patch_ops.unsol_event(codec, AD_HP_EVENT << 26);
+ codec->patch_ops.unsol_event(codec, AD_MIC_EVENT << 26);
+ }
return 0;
}
#endif
@@ -822,7 +830,7 @@ static void ad1986a_automic(struct hda_codec *codec)
present ? 0 : 2);
}
-#define AD1986A_MIC_EVENT 0x36
+#define AD1986A_MIC_EVENT AD_MIC_EVENT
static void ad1986a_automic_unsol_event(struct hda_codec *codec,
unsigned int res)
@@ -865,7 +873,7 @@ static void ad1986a_hp_automute(struct hda_codec *codec)
ad1986a_update_hp(codec);
}
-#define AD1986A_HP_EVENT 0x37
+#define AD1986A_HP_EVENT AD_HP_EVENT
static void ad1986a_hp_unsol_event(struct hda_codec *codec, unsigned int res)
{
@@ -1609,8 +1617,8 @@ static struct hda_amp_list ad1981_loopbacks[] = {
* speaker output enabled _and_ mute-LED off.
*/
-#define AD1981_HP_EVENT 0x37
-#define AD1981_MIC_EVENT 0x38
+#define AD1981_HP_EVENT AD_HP_EVENT
+#define AD1981_MIC_EVENT AD_MIC_EVENT
static struct hda_verb ad1981_hp_init_verbs[] = {
{0x05, AC_VERB_SET_EAPD_BTLENABLE, 0x00 }, /* default off */
@@ -2599,7 +2607,7 @@ static struct hda_verb ad1988_laptop_hp_off[] = {
{ } /* end */
};
-#define AD1988_HP_EVENT 0x01
+#define AD1988_HP_EVENT AD_HP_EVENT
static struct hda_verb ad1988_laptop_init_verbs[] = {
/* Front, Surround, CLFE, side DAC; unmute as default */
@@ -3936,8 +3944,8 @@ static void ad1884a_hp_automic(struct hda_codec *codec)
present ? 0 : 1);
}
-#define AD1884A_HP_EVENT 0x37
-#define AD1884A_MIC_EVENT 0x36
+#define AD1884A_HP_EVENT AD_HP_EVENT
+#define AD1884A_MIC_EVENT AD_MIC_EVENT
/* unsolicited event for HP jack sensing */
static void ad1884a_hp_unsol_event(struct hda_codec *codec, unsigned int res)
next prev parent reply other threads:[~2010-04-19 12:14 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-16 19:31 [regression] Sound not transferred to docking station after resume from StR Frans Pop
2010-04-16 19:48 ` Frans Pop
2010-04-17 9:06 ` Frans Pop
2010-04-19 7:47 ` Takashi Iwai
2010-04-19 11:38 ` Frans Pop
2010-04-19 11:59 ` Takashi Iwai
2010-04-19 12:14 ` Takashi Iwai [this message]
2010-04-19 12:39 ` Frans Pop
2010-04-19 12:53 ` Takashi Iwai
2010-04-19 14:58 ` Frans Pop
2010-04-19 16:17 ` Takashi Iwai
2010-04-19 12:18 ` Frans Pop
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=s5h633nprjy.wl%tiwai@suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@alsa-project.org \
--cc=elendil@planet.nl \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@lists.linux-foundation.org \
/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