Bug 71861
Summary: | Dell Inspiron 7537 Intel HDA Realtek ALC3223: Loud Pops at startup/shutdown and No Sound [Solved] | ||
---|---|---|---|
Product: | Drivers | Reporter: | Chris M (cmanougian) |
Component: | Sound(ALSA) | Assignee: | Jaroslav Kysela (perex) |
Status: | RESOLVED CODE_FIX | ||
Severity: | normal | CC: | francescopontillo, tiwai |
Priority: | P1 | ||
Hardware: | x86-64 | ||
OS: | Linux | ||
Kernel Version: | 3.14-rc7 | Subsystem: | |
Regression: | No | Bisected commit-id: | |
Attachments: |
alsa-info.sh with --no-upload option
Fix patch modified patch_realtek.c Patched patch_realtek.c Original rc6 patch_realtek.com Modified rc6 patch_realtek.c Difference Patch Fix patch for ALC283 & co Kailang restore default value for alc283 |
Description
Chris M
2014-03-11 05:25:29 UTC
The error from aplay is expected behavior. The first card is HDMI, and it doesn't match with "default" PCM definition of alsa-lib. Set the default card to 1, or pass index=1,0 option to snd-hda-intel to swap the devices. For the noise problem, please try the patch below. You need the patch in bug 71511 before applying this one. Created attachment 128931 [details]
Fix patch
Adding "options snd-hda-intel index=1,0" to the alsa-base.conf worked. I have sound. I tried to manually modify your latest https://github.com/tiwai/sound/blob/master/sound/pci/hda/patch_realtek.c file. The line numbers matched your patches. Then I replaced the RC6 file with my modified file, and got this error at deb creation at the end of compilation: sound/pci/hda/patch_realtek.c: In function ‘alc_auto_parse_customize_define’: sound/pci/hda/patch_realtek.c:410:3: error: implicit declaration of function ‘codec_info’ [-Werror=implicit-function-declaration] codec_info(codec, "%s: SKU not ready 0x%08x\n", ^ sound/pci/hda/patch_realtek.c:435:2: error: implicit declaration of function ‘codec_dbg’ [-Werror=implicit-function-declaration] codec_dbg(codec, "SKU: Nid=0x%x sku_cfg=0x%08x\n", ^ sound/pci/hda/patch_realtek.c: In function ‘alc272_fixup_mario’: sound/pci/hda/patch_realtek.c:4967:3: error: implicit declaration of function ‘codec_warn’ [-Werror=implicit-function-declaration] codec_warn(codec, "failed to override amp caps for NID 0x2\n"); ^ cc1: some warnings being treated as errors make[5]: *** [sound/pci/hda/patch_realtek.o] Error 1 make[4]: *** [sound/pci/hda] Error 2 make[3]: *** [sound/pci] Error 2 make[2]: *** [sound] Error 2 make[1]: *** [deb-pkg] Error 2 make: *** [deb-pkg] Error 2 So I'm assuming manually modifying won't work (or I screwed it up). Long way of asking how to apply the patch. What's the easiest way to apply the patch(s) prior to compilation? Thanks again. For a short term fix, I'll apply the options snd-hda-intel model=,generic. You just need to apply two patches on the top of 3.14-rc6 (or later). https://bugzilla.kernel.org/attachment.cgi?id=128271 and https://bugzilla.kernel.org/attachment.cgi?id=128931 The model=,generic option will lose some quirks for your microphone, so it's not perfect, I guess. Created attachment 129101 [details]
modified patch_realtek.c
snd-hda-intel model=,generic didn't work.
If I restart, I get pops. If I shut down and then hard reboot, there are no pops.
I'll have to work on applying the patch. My modified patch is attached.
(In reply to Chris M from comment #5) > snd-hda-intel model=,generic didn't work. > > If I restart, I get pops. If I shut down and then hard reboot, there are no > pops. This sounds like a contradiction to the original bug description. What is the correct state? I thought I was home free last night. The compilation error screwed me up. I'll need to run it a few ways and report back. After getting the sound to work, but failing on the compilation, I remarked out the snd-hda-intel model=,generic. Then I threw it back in, and then got no sound (but flash video played with no sound). It was late (early this AM), and I'm pushing to get this in before the kernel goes stable. I'll have to not worry about that and take my time. Your latest at https://github.com/tiwai/sound/blob/master/sound/pci/hda/patch_realtek.c already included the 1st patch. So I used that, and only applied the 2nd patch. To save time, can you attach a fully modified patch_realtek.c ? I'll compile with that in place of what's in the RC6. I think my modified file was faulty. If I fresh compile with a good patch_realtek.c, and the compilation works, do you want me to comment out snd-hda-intel model=,generic (or any variation like model=generic) before re-booting? The master branch contains all changes including the changes for 3.15. It's incompatible with 3.14-base. If any, you could pick up for-linus branch instead. Takashi, I needed a good night sleep. I grabbed this https://raw.github.com/torvalds/linux/master/sound/pci/hda/patch_realtek.c, and then applied your patch for the Inspiron 7537. It compiled without a problem. I installed the rc6 kernel, and reestablished "options snd-hda-intel model=,generic". I rebooted multiple times. It's all good. No speaker pops at all, and sound works great. Good to go. Thanks for helping me catch the right fish. Takashi, is the patch supposed to take care of the popping without passing options snd-hda-intel model=,generic ? If so, and I remark out options snd-hda-intel model=,generic , there is no pop on startup. But if I reboot, it pops on the way out on reboot. Also, if I try to shutdown completely, the computer hangs at halt. I think the patch was intended to replace options snd-hda-intel model=,generic. Created attachment 129291 [details] Patched patch_realtek.c Takashi, I saw that you posted the patch at http://blog.gmane.org/gmane.linux.alsa.devel Sorry if I jumped the gun. I don't think the hang on shutdown is related to this. No errors were observed related to sound during compilation. There may be something else in the rc6 kernel at play. I have attached the patched patch_realtek.c file. Again, if the patch is supposed to obviate the need for passing options snd-hda-intel model=,generic, there's a pop on shutdown, but not bootup/startup. As far as my shutdown issue is concerned, alsa seems to be unloading fine. I'll look at my /var/log/ logs later. So, it reduces only the noise at booting? (I don't know why you mention "the hang on shutdown". No such thing is written in the patch at all...) Please don't paste the full patch_realtek.c. It's almost useless. Please give the real "patch", the diff between patched and unpatched files. Yes, it reduces the noise at booting, only. I'll have to read up of posting a Diff. But I installed KDiff3 just to double check this, and I'm pretty sure I got it right. My line number are different than yours: 3864 ALC269_FIXUP_DELL2_MIC_NO_PRESENCE, 3865 ALC269_FIXUP_DELL3_MIC_NO_PRESENCE, 3866 ALC269_FIXUP_HEADSET_MODE, vs. 3864 ALC269_FIXUP_DELL2_MIC_NO_PRESENCE, 3865 ALC269_FIXUP_DELL3_MIC_NO_PRESENCE, 3866 ALC283_FIXUP_DELL1_SHUTUP, 3867 ALC269_FIXUP_HEADSET_MODE, and... 4085 .chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC 4086 }, 4087 [ALC269_FIXUP_HEADSET_MODE] = { vs. 4085 .chained = true, 4086 .chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC 4087 }, 4088 [ALC283_FIXUP_DELL1_SHUTUP] = { 4089 .type = HDA_FIXUP_FUNC, 4090 .v.func = alc_fixup_no_shutup, 4091 .chained = true, 4092 .chain_id = ALC269_FIXUP_DELL1_MIC_NO_PRESENCE, 4093 }, 4094 [ALC269_FIXUP_HEADSET_MODE] = { and... 4309 SND_PCI_QUIRK(0x1028, 0x05f9, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), vs. 4316 SND_PCI_QUIRK(0x1028, 0x05f9, "Dell Inspiron 7537", ALC283_FIXUP_DELL1_SHUTUP), The lines don't exactly line up in the last one (4309 vs. 4316), but they don't in yours (4343 vs. 4350). Not sure what's going on. A proper patch is created by the "diff" program. % diff -up oldfile newfile > file.patch Created attachment 129521 [details]
Original rc6 patch_realtek.com
Original patch_realtek.com that came with the rc6.
Created attachment 129531 [details]
Modified rc6 patch_realtek.c
Modified rc6 patch_realtek.c
Created attachment 129541 [details]
Difference Patch
Test patch from unmodified rc6 and modified rc6
Takashi, after hacking away at it (I used Meld to create a diff between the unmodified rc6 patch_realtek.c and modified rc6 patch_realtek.c), I was able to create a diff - see above Comment 17. Since I used the "virgin" patch, I applied both patches you created for the IdeaPad410Y and the Inspiron 7537. I recompiled the rc6 kernel - no problem. I'm still getting the pop on shutdown/reboot. Again, the pop is not happening at startup. One thing I noticed was the ALC283_FIXUP_DELL1_SHUTUP. When I boot up Xubuntu, alsamixer also shows ALC283, but should ours reference ALC3223? options snd-hda-intel model=,generic has been commented out. OK, then could you try the patch below? Apply it to 3.14-rc6 (or rc7) cleanly without other patches, and see whether this alone fixes the issue. At least, the boot noise issue might be fixed by this. You can combine with the previous patch if the new patch doesn't suffice alone. They don't conflict with each other. Created attachment 129701 [details]
Fix patch for ALC283 & co
Created attachment 129891 [details]
Kailang restore default value for alc283
Takashi, that patch alone worked perfectly. I applied it to the rc7 kernel.
You're good to go.
Thanks, and thanks to Kailang.
Thanks, good to hear. The merge of the patch to the upstream will be likely postponed to 3.15-rc1, but it won't be lost :) Takashi, OK. If it's possible to get this into 3.14, it would be great if you would. I don't need this now, for sure. The concern is that Debian freezes the Testing kernel before the general Testing freeze (scheduled for 11/05/14), and it's looking likely that 3.14 will be the kernel for Jessie. If so, the embedded fix will be a year or so off. 3.13 just came into Testing on 3/14. It's possible 3.15 just makes it into Testing, but I'm guessing not. No problem if you can't do that. Thanks again. Has this fix been included in kernel 3.16? My Realtek ALC3223 can't output audio to speakers, only headphones work. |