Bug 15399 - [PATCH]since 2.6.33 when I plug headphones, the speaker doen't get off anymore
Summary: [PATCH]since 2.6.33 when I plug headphones, the speaker doen't get off anymore
Status: RESOLVED CODE_FIX
Alias: None
Product: Drivers
Classification: Unclassified
Component: Sound(ALSA) (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Jaroslav Kysela
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-02-25 21:54 UTC by guillaume
Modified: 2013-11-15 14:48 UTC (History)
3 users (show)

See Also:
Kernel Version: 2.6.33
Subsystem:
Regression: Yes
Bisected commit-id:


Attachments
output of the also-info script when I boot on the 2.6.32.9 (13.09 KB, text/x-log)
2010-02-26 09:09 UTC, guillaume
Details
output of the also-info script when I boot on the 2.6.33 (14.02 KB, text/x-log)
2010-02-26 09:10 UTC, guillaume
Details
custom config file for the 2.6.32.9 (68.63 KB, application/octet-stream)
2010-02-26 11:05 UTC, guillaume
Details
custom config file for the 2.6.33 (71.28 KB, text/plain)
2010-02-26 11:08 UTC, guillaume
Details

Description guillaume 2010-02-25 21:54:56 UTC
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

What can I provide in order to help ?

Best regards,
Guillaume
Comment 1 guillaume 2010-02-26 09:09:08 UTC
Created attachment 25238 [details]
output of the also-info script when I boot on the 2.6.32.9

With the 2.6.32.9, when I plug the headphones, the speaker gets off. So NO problem
Comment 2 guillaume 2010-02-26 09:10:43 UTC
Created attachment 25239 [details]
output of the also-info script when I boot on the 2.6.33

With the 2.6.33, when I plug my headphone, the speaker doesn't get off.
Comment 3 guillaume 2010-02-26 11:05:34 UTC
Created attachment 25241 [details]
custom config file for the 2.6.32.9

custom config file for the 2.6.32.9 with I don't have any problem with the sound driver.
Comment 4 guillaume 2010-02-26 11:08:10 UTC
Created attachment 25242 [details]
custom config file for the 2.6.33

custom config file for the 2.6.33. I get problem with it.
Comment 5 guillaume 2010-02-28 09:50:54 UTC
I have discussed on the alsa-devel list. 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.c	2010-02-27 14:58:06.000000000 +0100
+++ patch_realtek_modif.c	2010-02-27 14:58:54.000000000 +0100
@@ -13381,7 +13381,7 @@
 	unsigned int present;
 	unsigned char bits;

-	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);
Comment 6 guillaume 2010-02-28 14:27:34 UTC
I have modified the patch_realtek.c with snd_hda_jack_detect(codec, 0x15); and recompile the kernel. Then reboot on this kernel. My initial problem (speaker doesn't get off when I plug the headphones) is solved with that.
Comment 7 Krzysztof Chojnowski 2010-05-22 16:53:58 UTC
I can confirm this bug running 2.6.33.4 on EEE 901. Can any developer comment on the patch posted above? Is it correct way to fix the problem?
Comment 8 Takashi Iwai 2013-11-15 14:48:45 UTC
This bug must have been fixed in the recent kernels, as the Realtek driver is using the generic parser now.  Reopen if the problem is still present with 3.12 kernel.

Note You need to log in before you can comment on or make changes to this bug.