When booting 2.6.35-rc3 with HDA power save enabled, we see the optical SPDIF output intermittently working. Disabling power saving in the kernel config makes it consistently work as expected. Differences from the 'alsa-info.sh' script in both non-working and working cases show 'Pin-ctls: 0x40 OUT' in the working case, and 'Pin-ctls: 0x00' in the non-working case with the SPDIF pin complex node: Node 0x1e [Pin Complex] wcaps 0x400300: Mono Digital Pincap 0x00000010: OUT Pin Default 0x01452120: [Jack] SPDIF Out at Ext Rear Conn = Optical, Color = Grey DefAssociation = 0x2, Sequence = 0x0 Misc = NO_PRESENCE Pin-ctls: 0x40: OUT Connection: 1 0x06 Other times, when the SPDIF output is enabled and the power saving mode kicks in, it will be disabled, but not reenabled.
Created attachment 27013 [details] Output from 'alsa-info.sh' when SPDIF is working as expected
Created attachment 27014 [details] Output from 'alsa-info.sh' when SPDIF is not working as expected
Looking at patch_realtek.c, it looks like there is nothing to enable the SPDIF pin complex in the verb array at alc880_pin_5stack_init_verbs, which would explain the non-deterministic state when the chip is brought out of sleep/power-down state. We need: {0x11, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, {0x1e, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
OK, that's a problem indeed. Could you try the patch below? It'll restore the cleared pin controls.
Created attachment 27024 [details] Fix patch
Ping.
Ack. Just saw the mail and preparing to test your patch. Thanks, Takashi!
Excellent - this addresses the bug, Takashi-san. I cross-checked both failing and non-failing cases with the patch a number of times, and it looks good for -rc5. Many thanks! This has potential to address quite a lot of HDA power_save regressions people experience with this feature enabled, which I think has kept this good feature disabled in distros. If you feel this will address a significant number of these cases, is it worth general heads-up LKML and eg kernel-team@lists.ubuntu.com for their evaluation? Thanks again, Daniel
late-night typos fixed: If you feel this will address a significant number of these cases, is it worth a general heads-up on LKML and a quick post to eg kernel-team@lists.ubuntu.com for their evaluation?
Is power_save disabled on distros due to this bug? I've never heard it, and if so, it's really a communication problem... There are potential problems hit by this bug, but I think most people didn't notice, because it's mostly unused SPDIF or such pins. Of course, more tests are welcome, though. Anyway, I merged it now and it'll be included in the next pull request. Thanks.