Bug 42740
Summary: | No sound with kernel 3.2.* | ||
---|---|---|---|
Product: | Drivers | Reporter: | Ansa89 (ansalonistefano) |
Component: | Sound(ALSA) | Assignee: | Jaroslav Kysela (perex) |
Status: | RESOLVED PATCH_ALREADY_AVAILABLE | ||
Severity: | normal | CC: | florian, tiwai |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | 3.2.5 | Subsystem: | |
Regression: | Yes | Bisected commit-id: | |
Attachments: |
Alsa-info for kernel 3.1.10
Alsa-info for kernel 3.2.5 Aplay on kernel 3.2.5 Alsa-info for kernel 3.2.5 with 3.5mm jack headphone plugged in Kernel compile log A test patch to suppress multi-io creations for Realtek Patch to fix the routing on Acer Aspire 5935 (for 3.2 kernel) Additional fix patch Additional fix patch (correct one) |
Description
Ansa89
2012-02-07 11:29:35 UTC
Forgot one thing: with kernel 3.2.* I can still change the volume of channels and all related things with "alsamixer". Please give alsa-info.sh outputs (run with --no-upload option) on both working (3.0.x or 3.1.x) and non-working (3.2.x) kernels. Created attachment 72317 [details]
Alsa-info for kernel 3.1.10
Created attachment 72318 [details]
Alsa-info for kernel 3.2.5
Since I hadn't "alsa-info.sh", I get it with: wget -O alsa-info.sh http://www.alsa-project.org/alsa-info.sh Hope this is the correct way. Thanks, that's correct. Did you test both speaker(s) and the headphone outputs? As a quick look, I see anything wrong in the setup. How did you test? Could you check via aplay like % aplay -Dplughw -vv somefile.wav ?? (In reply to comment #6) > Thanks, that's correct. > > Did you test both speaker(s) and the headphone outputs? Sorry, I don't understand. Do you mean if I tried to plug headphone/external speaker through a 3.5mm jack? If so, then no, I don't. The only external peripheral is a microphone plugged into the "microphone-in" port. (In reply to comment #7) > As a quick look, I see anything wrong in the setup. > How did you test? Could you check via aplay like > > % aplay -Dplughw -vv somefile.wav > > ?? Tested with "mplayer file.mp3" and it doesn't show off any error/warning related to sound. Now I will reboot, try aplay and post the output. Created attachment 72319 [details]
Aplay on kernel 3.2.5
The output is the same (according to "diff") on kernel 3.1.10.
I tried to plug the headphone and (surprise!) I can hear sound (from the headphone). What is the source of this strange behavior? (In reply to comment #8) > (In reply to comment #6) > > Thanks, that's correct. > > > > Did you test both speaker(s) and the headphone outputs? > Sorry, I don't understand. > Do you mean if I tried to plug headphone/external speaker through a 3.5mm > jack? > If so, then no, I don't. Well, I thought the machine has a built-in speaker. What output did you test exactly? Only from the headphone jack? Or from any other outputs? > Tested with "mplayer file.mp3" and it doesn't show off any error/warning > related to sound. There should be no "error" in this bug. In the user-space side, everything looks OK. It's just some missing piece in the driver. (In reply to comment #10) > I tried to plug the headphone and (surprise!) I can hear sound (from the > headphone). > What is the source of this strange behavior? So, do you mean that the headphone output didn't work unless you re-plug the headphone? In anyway, please give alsa-info.sh outputs before and after working. (In reply to comment #11) > Well, I thought the machine has a built-in speaker. > What output did you test exactly? Only from the headphone jack? > Or from any other outputs? The machine is a laptop with integrated speakers and a port where plug the headphone. The problem is with integrated speakers (normally I use them to hear sounds). If I plug the 3.5mm jack headphone, then I can hear sounds from headphone (still no sound from integrated speakers) and when unplug it we come back to initial situation. Again I will reboot, catch output and post it. Created attachment 72320 [details] Alsa-info for kernel 3.2.5 with 3.5mm jack headphone plugged in The difference from attachment 72318 [details] should be: @@ -279,7 +279,7 @@ Conn = ATAPI, Color = Unknown DefAssociation = 0x1, Sequence = 0x0 Misc = NO_PRESENCE - Pin-ctls: 0x40: OUT + Pin-ctls: 0x00: Unsolicited: tag=00, enabled=0 Connection: 5 0x0c 0x0d 0x0e 0x0f* 0x26 The difference is just because the speaker is turned off by the auto-mute feature of the headphone. Just to be sure, try to unmute "Surround", "Center" and "LFE" mixer switches. And turn off "Auto-Mute Mode". Does this change anything? Other than that, I run out of idea. There is no difference in the init sequence between 3.0/3.1 and 3.2. The only difference is that the assignment of DAC, but this must work. (In reply to comment #15) > Just to be sure, try to unmute "Surround", "Center" and "LFE" mixer switches. > And turn off "Auto-Mute Mode". Does this change anything? Tried, but no luck, I can't hear nothing from integrated speakers. OK, could you double-check that the speaker output works with 3.1.10 kernel? If it's confirmed to work, copy sound/pci/hda/patch_realtek.c from 3.2 kernel, and build again and test. Does it still work? If the speaker is still working with the new patch_realtek.c, try to copy sound/pci/hda/hda_intel.c. Edit the file like below: --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c @@ -2160,7 +2160,7 @@ static void azx_clear_irq_pending(struct azx *chip) spin_unlock_irq(&chip->reg_lock); } -#ifdef CONFIG_X86 +#if 0 static int azx_pcm_mmap(struct snd_pcm_substream *substream, struct vm_area_struct *area) { and rebuild and retest. If the speaker is still working with this change, try to copy the whole files in sound/pci/hda. Created attachment 72353 [details] Kernel compile log (In reply to comment #17) > OK, could you double-check that the speaker output works with 3.1.10 kernel? Yes, it works. > If it's confirmed to work, copy sound/pci/hda/patch_realtek.c from 3.2 > kernel, > and build again and test. Does it still work? When I try to compile (with modified sources), it returns me an error (see attachment 72321 [details]). (In reply to comment #18) > When I try to compile (with modified sources), it returns me an error (see > attachment 72321 [details]). Whoops! I mean attachment 72353 [details]. I guess you are copying from 3.3-rc? Let's try from 3.2 kernel. I copied "sound/pci/hda/patch_realtek.c" to 3.1.10 kernel from 3.2.5 kernel. OK, I seem to have tested wrongly then. Instead, start from hda_intel.c (with patch). If it still works, copy all files in sound/pci/hda/*. And touch include/linux/export.h. Then you should be able to build, at least. (In reply to comment #22) > Instead, start from hda_intel.c (with patch). It works. > copy all files in sound/pci/hda/*. And touch include/linux/export.h. > Then you should be able to build, at least. I can't build: sound/pci/hda/hda_codec.c: In function ‘get_jack_default_name’: sound/pci/hda/hda_codec.c:5275: error: ‘SND_JACK_LINEIN’ undeclared (first use in this function) sound/pci/hda/hda_codec.c:5275: error: (Each undeclared identifier is reported only once sound/pci/hda/hda_codec.c:5275: error: for each function it appears in.) make[3]: *** [sound/pci/hda/hda_codec.o] Error 1 make[2]: *** [sound/pci/hda] Error 2 make[1]: *** [sound/pci] Error 2 make: *** [sound] Error 2 Just disable CONFIG_SND_HDA_INPUT_JACK kconfig. (In reply to comment #22) > If it still works, copy all files in sound/pci/hda/*. > And touch include/linux/export.h. Then you should be > able to build, at least. Disabling CONFIG_SND_HDA_INPUT_JACK, it compiles, but the internal speakers doesn't work. Thanks, so something got broken in patch_realtek.c, as it seems. Please go back to the clean 3.2.x, and try to apply the patch below. It just disables the multi-io creation so that the speaker is assigned to DAC 0x03 like in 3.1.x kernel. Created attachment 72361 [details]
A test patch to suppress multi-io creations for Realtek
Good news: with the patch to suppress multi-io creations, it works. However the "surround", "center" and "lfe" controls disappeared from alsamixer (I think this is the normal behavior). Personal conclusion: since I don't need "surround", "center" and "lfe" controls, then the bug is fixed for me. Moreover I don't know if the patch break support for other sound devices. OK, then I'll work on the "right" patch. The patch in comment 27 will be never applied. It's just a test to identify the problem. (In reply to comment #29) > The patch in comment 27 will be never applied. > It's just a test to identify the problem. Yes, that was obvious. So can we mark this bug as "RESOLVED"? Try the patch below instead (for 3.2 kernel). It should fix the routing of Aspire 5935 to be as in 3.1 kernel. Created attachment 72362 [details]
Patch to fix the routing on Acer Aspire 5935 (for 3.2 kernel)
(In reply to comment #31) > Try the patch below instead (for 3.2 kernel). It should fix the routing of > Aspire 5935 to be as in 3.1 kernel. Reverted previous change, then applied attachment 72362 [details] . It works and alsamixer shows again "surround", "center" and "lfe" controls. Thanks. Now the patch is merged to the sound git tree. It'll be merged back to 3.2.y tree once when reached to the upstream Linus tree. We can close this bug now :) (In reply to comment #34) > It'll be merged back to 3.2.y tree Also to 3.3 tree? Sure. Linus tree is 3.3 tree for now. Ok, thanks for your patience and all your work. I found another problem with my previous patch. It wrongly sets the connections for surround and CLFE outputs. The additional patch below fixes the problem. I'll queue it up for 3.3 and 3.2-stable. Created attachment 72423 [details]
Additional fix patch
Created attachment 72424 [details]
Additional fix patch (correct one)
Sorry, a wrong patch was attached in the previous comment...
In 3.3-rc4 changelog I see "ALSA: hda - Fix silent speaker output on Acer Aspire 6935" but should be "ALSA: hda - Fix silent speaker output on Acer Aspire 5935" or I'm wrong? BTW the important thing is that your patch was merged into mainline. A patch referencing this bug report has been merged in Linux v3.3-rc4: commit 02a237b24d57e2e2d5402c92549e9e792aa24359 Author: Takashi Iwai <tiwai@suse.de> Date: Mon Feb 13 15:25:07 2012 +0100 ALSA: hda - Fix silent speaker output on Acer Aspire 6935 A patch referencing this bug report has been merged in Linux v3.3-rc5: commit ef8d60fb79614a86a82720dc2402631dbcafb315 Author: Takashi Iwai <tiwai@suse.de> Date: Fri Feb 17 10:12:38 2012 +0100 ALSA: hda/realtek - Fix surround output regression on Acer Aspire 5935 |