Skip to contentSkip to conversation

With the new 2.6.33 when I plug headphones, the speaker doen't get off anymore]

Fwd: Re: Takashi Iwai 2 participants 2 messages Mar 1, 2010 – Mar 2, 2010 1 message not in the archive

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive

At Mon, 01 Mar 2010 14:46:10 +0100,

Quoted 64 lines · Guillaume De Nayer
Quoted 50 lines · Takashi Iwai

At Sun, 28 Feb 2010 15:29:25 +0100,

Quoted 39 lines · giggz
Quoted 38 lines · giggz
Quoted 13 lines · giggzounet

Hi,

I have installed debian stable lenny + backports on an eeepc 1201n. With the 2.6.30 or 2.6.32 from lenny-backport I don't have problem with sound : when I plug the headphones, speakers get off.

I have tested with 2.6.33 and when I plug headphones, speakers don't get off anymore. so I have sound in headphones and speakers.

22:42 giggz@baal ~ % cat /proc/asound/card0/codec#* | grep Codec
Codec: Realtek ALC269
Codec: Nvidia MCP7A HDMI

Quoted 7 lines

I attach the output of alsa-info with the 2.6.32.9 and the 2.6.33 (I'm in a Uni Campus and it's quite difficult to have internet on a external laptop...so I attach them at this mail and I don't upload them on pastbin).

I have opened a bug on the kernel bugzilla (bug 15399). Should I provide anything more ?

Following the advice of Paul Menzel I did a "diff" of the sources of the 2.6.32.9 kernel and of the 2.6.33. In patch_realtek.c, we see that there is an new snd_hda_jack_detect funtion with 2 arguments. I have noticed that the second argument is "normaly" the second argument of snd_hda_codec_read. In the alc269_speaker_automute function there is this new snd_hda_jack_detect function, but the second argument is "nid". But in the old alc269_speaker_automute of the 2.6.32.9 the second argument of snd_hda_codec_read is 0x15. So I think there is perhaps a bug here...But I hesitate to modify the source...so I'm waiting the anwser of the dev.

patch_realtek_modif.c renamed from patch_realtek.c +0 -0
@@ -13381,7 +13381,7 @@
 	unsigned int present;
 	unsigned char bits;
 
Quoted 8 lines

patch_realtek_modif.c line 13387

Quoted 6 lines
patch_realtek_modif.c renamed from patch_realtek.c +1 -1
-	present = snd_hda_jack_detect(codec, nid);
+	present = snd_hda_jack_detect(codec, 0x15);
 	bits = present ? AMP_IN_MUTE(0) : 0;
 	snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 0,
 				AMP_IN_MUTE(0), bits);

I tested it. And with this modif in the kernel, after recompilation and reboot, my problem is headphones and speaker is gone.

Quoted 4 lines

It implies that the setup of the headphone pin is wrong. This doesn't mean a bug of the driver, though. It might have uncovered the BIOS bug.

ok. I don't have any knowledge in C or in bios...so you're problably right :)

but it seems strange that for all the new line with snd_hda_jack_detect the second argument is always the second argument of snd_hda_codec_read except for the alc269.

Quoted 8 lines
Quoted 3 lines

Could you provide alsa-info.sh without your patch to check the setup?

In attachment of the first post on alsa-devel or on the kernel bugzilla
http://bugzilla.kernel.org/show_bug.cgi?id=15399, there are the output of alsa-info.sh with the 2.6.32.9 (no problem) and the output of alsa-info.sh with the 2.6.33 without any patch (problem occurs).

OK, thanks. This looks actually like a bug :)

But, the easiest (and probably better) fix is to use model=auto for your device. Just pass model=auto option. I guess everything should work with that.

Takashi
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

#2 lore raw
Quoted 66 lines · Takashi Iwai

At Mon, 01 Mar 2010 14:46:10 +0100,

Quoted 64 lines · Guillaume De Nayer
Quoted 49 lines · Takashi Iwai

At Sun, 28 Feb 2010 15:29:25 +0100,

Quoted 39 lines · giggz
Quoted 38 lines · giggz
Quoted 13 lines · giggzounet

Hi,

I have installed debian stable lenny + backports on an eeepc 1201n. With the 2.6.30 or 2.6.32 from lenny-backport I don't have problem with sound : when I plug the headphones, speakers get off.

I have tested with 2.6.33 and when I plug headphones, speakers don't get off anymore. so I have sound in headphones and speakers.

22:42 giggz@baal ~ % cat /proc/asound/card0/codec#* | grep Codec
Codec: Realtek ALC269
Codec: Nvidia MCP7A HDMI

Quoted 7 lines

I attach the output of alsa-info with the 2.6.32.9 and the 2.6.33 (I'm in a Uni Campus and it's quite difficult to have internet on a external laptop...so I attach them at this mail and I don't upload them on pastbin).

I have opened a bug on the kernel bugzilla (bug 15399). Should I provide anything more ?

Following the advice of Paul Menzel I did a "diff" of the sources of the 2.6.32.9 kernel and of the 2.6.33. In patch_realtek.c, we see that there is an new snd_hda_jack_detect funtion with 2 arguments. I have noticed that the second argument is "normaly" the second argument of snd_hda_codec_read. In the alc269_speaker_automute function there is this new snd_hda_jack_detect function, but the second argument is "nid". But in the old alc269_speaker_automute of the 2.6.32.9 the second argument of snd_hda_codec_read is 0x15. So I think there is perhaps a bug here...But I hesitate to modify the source...so I'm waiting the anwser of the dev.

patch_realtek_modif.c renamed from patch_realtek.c +0 -0
@@ -13381,7 +13381,7 @@
 	unsigned int present;
 	unsigned char bits;
 
Quoted 8 lines

patch_realtek_modif.c line 13387

Quoted 6 lines
patch_realtek_modif.c renamed from patch_realtek.c +1 -1
-	present = snd_hda_jack_detect(codec, nid);
+	present = snd_hda_jack_detect(codec, 0x15);
 	bits = present ? AMP_IN_MUTE(0) : 0;
 	snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 0,
 				AMP_IN_MUTE(0), bits);

I tested it. And with this modif in the kernel, after recompilation and reboot, my problem is headphones and speaker is gone.

Quoted 4 lines

It implies that the setup of the headphone pin is wrong. This doesn't mean a bug of the driver, though. It might have uncovered the BIOS bug.

ok. I don't have any knowledge in C or in bios...so you're problably right :)

but it seems strange that for all the new line with snd_hda_jack_detect the second argument is always the second argument of snd_hda_codec_read except for the alc269.

Quoted 3 lines

Could you provide alsa-info.sh without your patch to check the setup?

Quoted 7 lines
Quoted 4 lines

In attachment of the first post on alsa-devel or on the kernel bugzilla
http://bugzilla.kernel.org/show_bug.cgi?id=15399, there are the output of alsa-info.sh with the 2.6.32.9 (no problem) and the output of alsa-info.sh with the 2.6.33 without any patch (problem occurs).

OK, thanks. This looks actually like a bug :)

a bug in the driver or a bug in the bios ?

I have taken a look under the gitweb :
in the commit of the introduction of snd_hda_jack_detect()
http://git.kernel.org/?p=linux/kernel/git/next/linux-next.git;a=commit;h=864f92be7e8d4a0ba11d912e3f03d1a92a031dee
I see :
@@ -13183,8 +13098,7 @@ static void alc269_speaker_automute(struct hda_codec *codec)

        unsigned int present;
        unsigned char bits;

- present = snd_hda_codec_read(codec, 0x15, 0,
- AC_VERB_GET_PIN_SENSE, 0) & 0x80000000;

+       present = snd_hda_jack_detect(codec, 0x15);
        bits = present ? AMP_IN_MUTE(0) : 0;
        snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 0,
                                AMP_IN_MUTE(0), bits);

But in the commit :
http://git.kernel.org/?p=linux/kernel/git/next/linux-next.git;a=commitdiff;h=2a321e1defa266ad1b4ded29cb6cfb0ed5fce39d
the 0x15 is replaced with nid.

Cheers,
GiGGz

_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel