[alsa-devel] Headphone output doesn't work with 3.0.0-rc* anymore

Takashi Iwai tiwai at suse.de
Fri Jun 10 12:08:03 CEST 2011


At Fri, 10 Jun 2011 11:30:19 +0200,
Michal Hocko wrote:
> 
> On Fri 10-06-11 11:18:51, Takashi Iwai wrote:
> > At Fri, 10 Jun 2011 10:51:17 +0200,
> > Michal Hocko wrote:
> > > 
> > > On Fri 10-06-11 10:14:13, Takashi Iwai wrote:
> > > > At Fri, 10 Jun 2011 09:56:40 +0200,
> > > > Michal Hocko wrote:
> > > > > 
> > > > > On Fri 10-06-11 08:53:01, Takashi Iwai wrote:
> > > > > > At Thu, 9 Jun 2011 13:14:01 +0200,
> [...]
> > > > > OK, I git checkout v2.6.39 -- sound/pci/*.[ch] (see the patch bellow for
> > > > > reference). I have kept the earlier patch.
> > > > 
> > > > Gah, sorry, a wrong path.  It must be sound/pci/hda/*.[ch].
> > > > Also, please remove my previous patch.  It's irrelevant with 2.6.39
> > > > although it should be harmless.
> > > 
> > > OK, I have reverted the whole hda directory to 2.6.39 which means AFAIU
> > > that the driver is at the same state as it was in that kernel. And the
> > > sound really works. Both outputs are active whem they should be.
> > 
> > Thanks, it's really good to know that we have a good working-base.
> > 
> > Now, can you switch back to 3.0rc2 with my fix patch and retest?
> 
> Sorry, I am confused now. How this would be different from the previous
> testing where I had that patch applied on top of rc2?

Never mind, I found the possible spot.
Could you try the patch below in addition?  There was one missing
initialization in the transition.

The headphone would have been working when you mute/unmute "Master"
volume once.


thanks,

Takashi

---
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index bef7a77..20f01f8 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -1141,6 +1141,13 @@ static void update_speakers(struct hda_codec *codec)
 	struct alc_spec *spec = codec->spec;
 	int on;
 
+	/* Control HP pins/amps depending on master_mute state;
+	 * in general, HP pins/amps control should be enabled in all cases,
+	 * but currently set only for master_mute, just to be safe
+	 */
+	do_automute(codec, ARRAY_SIZE(spec->autocfg.hp_pins),
+		    spec->autocfg.hp_pins, spec->master_mute, true);
+
 	if (!spec->automute)
 		on = 0;
 	else
@@ -6202,11 +6209,6 @@ static const struct snd_kcontrol_new alc260_input_mixer[] = {
 /* update HP, line and mono out pins according to the master switch */
 static void alc260_hp_master_update(struct hda_codec *codec)
 {
-	struct alc_spec *spec = codec->spec;
-
-	/* change HP pins */
-	do_automute(codec, ARRAY_SIZE(spec->autocfg.hp_pins),
-		    spec->autocfg.hp_pins, spec->master_mute, true);
 	update_speakers(codec);
 }
 


More information about the Alsa-devel mailing list