Bug 75041
Summary: | No sound from speakers on ASUS A8Jn | ||
---|---|---|---|
Product: | Drivers | Reporter: | Mike Crash (mike) |
Component: | Sound(ALSA) | Assignee: | Jaroslav Kysela (perex) |
Status: | RESOLVED CODE_FIX | ||
Severity: | normal | CC: | superquad.vortex2, tiwai |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | 3.12, 3.13, 3.14 | Subsystem: | |
Regression: | No | Bisected commit-id: | |
Attachments: |
Output of alsa-info for kernel 3.11 on ASUS A8Jn
Output of alsa-info for kernel 3.14 on ASUS A8Jn Fix patch |
Description
Mike Crash
2014-04-29 06:10:12 UTC
you have to post output of alsa-info.sh it was using ad1986a_3stack https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/commit/?id=658fba0efe93fdef44f65cff391ae2a881e30d90 Yes, but it was removed here: https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/commit/sound/pci/hda/patch_analog.c?id=0f7dbda0ec3bc4d778d7acf741b220fbf4318a20 I am attaching output from alsa-info for kernel 3.14 and also working kernel 3.11. Also I was wrong, that headphones works in 3.12-3.14. After power up, speakers are silent, but headphones produce strange clicks only at maximum volume. If I reboot to 3.11, sound works OK, after restart to 3.14, headphones work OK, no sound from speakers. It seems, there is something not initialized correctly. May be "Most of ASUS laptops and Lenovo N100 provide proper BIOS pin-configs." is not correct for ASUS A8Jn. Also I have tried to set model to 3stack and laptop-eapd, none of them works. If I compare previous code https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/tree/sound/pci/hda/patch_analog.c?id=cf30f46acde1f84fbf603bba6540cbb40cc6c954 with the last one https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/tree/sound/pci/hda/patch_analog.c?id=c5eda4c1bf6214332c46fb2f4e7c42a85e5e5643 It was rewritten and some init seems to be missing, look at lines 1320- for example need_dac_fix, also AD1986A_FIXUP_3STACK seems different, but I have not studied it deeply. Comparing output from alsa-info, in 3.11: Node 0x1b [Pin Complex] wcaps 0x400185: Stereo Amp-Out Control: name="Front Playback Volume", index=0, device=0 ControlAmp: chs=3, dir=Out, idx=0, ofs=0 Control: name="Front Playback Switch", index=0, device=0 ControlAmp: chs=3, dir=Out, idx=0, ofs=0 Amp-Out caps: ofs=0x1f, nsteps=0x1f, stepsize=0x05, mute=1 Amp-Out vals: [0x1f 0x1f] Pincap 0x0001001f: OUT HP EAPD Detect Trigger ImpSense EAPD 0x2: EAPD Pin Default 0x9117f110: [Fixed] Speaker at Int Rear Conn = Analog, Color = Other DefAssociation = 0x1, Sequence = 0x0 Misc = NO_PRESENCE Pin-ctls: 0x40: OUT Unsolicited: tag=00, enabled=0 Connection: 1 0x0b And in 3.14: Node 0x1b [Pin Complex] wcaps 0x400185: Stereo Amp-Out Control: name="Speaker Playback Volume", index=0, device=0 ControlAmp: chs=3, dir=Out, idx=0, ofs=0 Control: name="Speaker Playback Switch", index=0, device=0 ControlAmp: chs=3, dir=Out, idx=0, ofs=0 Control: name="Speaker Phantom Jack", index=0, device=0 Amp-Out caps: ofs=0x1f, nsteps=0x1f, stepsize=0x05, mute=1 Amp-Out vals: [0x00 0x00] Pincap 0x0001001f: OUT HP EAPD Detect Trigger ImpSense EAPD 0x0: Pin Default 0x9117f110: [Fixed] Speaker at Int Rear Conn = Analog, Color = Other DefAssociation = 0x1, Sequence = 0x0 Misc = NO_PRESENCE Pin-ctls: 0x40: OUT Unsolicited: tag=00, enabled=0 Connection: 1 0x0b Difference is missing EAPD and Amp-Out vals is zero instead of 0x1f. Created attachment 134291 [details]
Output of alsa-info for kernel 3.11 on ASUS A8Jn
Created attachment 134301 [details]
Output of alsa-info for kernel 3.14 on ASUS A8Jn
the original quirk was removed by this patch https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/commit/sound/pci/hda/patch_analog.c?id=0f7dbda0ec3bc4d778d7acf741b220fbf4318a20 The 3stack model was designed for desktop with 3 audio jacks at rear panel the latest alsa driver seem still using mic mix https://bugzilla.kernel.org/show_bug.cgi?id=66621 the main difference is unsolicited event is not enabled in the static ad1986a_3stack try hda-jack-sense-test to check whether you need inv Jack detect Node 0x1a [Pin Complex] wcaps 0x400185: Stereo Amp-Out Control: name="Headphone Playback Volume", index=0, device=0 ControlAmp: chs=3, dir=Out, idx=0, ofs=0 Control: name="Headphone Playback Switch", index=0, device=0 ControlAmp: chs=3, dir=Out, idx=0, ofs=0 Amp-Out caps: ofs=0x1f, nsteps=0x1f, stepsize=0x05, mute=1 Amp-Out vals: [0x1f 0x1f] Pincap 0x0000001f: OUT HP Detect Trigger ImpSense Pin Default 0x0121401f: [Jack] HP Out at Ext Rear Conn = 1/8, Color = Green DefAssociation = 0x1, Sequence = 0xf Pin-ctls: 0xc0: OUT HP Unsolicited: tag=00, enabled=0 Connection: 1 0x0a The output from hda-jack-sense-test is only: Pin 0x1a (Green HP Out): present = No Pin 0x1f (Pink Mic): present = No But I found, that in hda_analyzer, under Node[0x1b] PIN, if I check EAPD, the sound comes from speakers! So it acknowledges what I wrote earlier - missing EAPD. Here is Text dump from hda_analyzer with working setup: Node 0x1b [Pin Complex] wcaps 0x400185: Stereo Amp-Out Control: name="Speaker Playback Volume", index=0, device=0 ControlAmp: chs=3, dir=1, idx=0, ofs=0 Control: name="Speaker Playback Switch", index=0, device=0 ControlAmp: chs=3, dir=1, idx=0, ofs=0 Control: iface="card", name="Speaker Phantom Jack", index=0, device=0 Amp-Out caps: ofs=0x1f, nsteps=0x1f, stepsize=0x05, mute=1 Amp-Out vals: [0x1f 0x1f] Pincap 0x0001001f: OUT HP EAPD Detect Trigger ImpSense EAPD 0x2: EAPD Pin Default 0x9117f110: [Fixed] Speaker at Int Rear Conn = Analog, Color = Other DefAssociation = 0x1, Sequence = 0x0 Misc = NO_PRESENCE Pin-ctls: 0x40: OUT Unsolicited: tag=0x00, enabled=0 Connection: 1 0x0b Could you try the patch below? Created attachment 137211 [details]
Fix patch
I have recompiled kernel 3.14.4 with the provided patch and also added spec->gen.own_eapd_ctl = 1; to function ad1986a_fixup_eapd, so it looks like: static void ad1986a_fixup_eapd(struct hda_codec *codec, const struct hda_fixup *fix, int action) { struct ad198x_spec *spec = codec->spec; if (action == HDA_FIXUP_ACT_PRE_PROBE) { codec->inv_eapd = 0; spec->gen.keep_eapd_on = 1; spec->gen.own_eapd_ctl = 1; spec->eapd_nid = 0x1b; } } Now it works. I will check, if own_eapd_ctl is needed. I can confirm, that provided patch by Takashi Iwai works. Parameter own_eapd_ctl is not needed. Is it possible to merge it to kernel and mark bug as resolved? Great, I'll merge it to sound git tree. Maybe it's too late for 3.15-rc8 (or -final), but it'll be in the next pull request. OK, thank you! Now merged to sound git tree (with Cc to stable). Let's close. |