This is regression was introduced by kernel v4.1. As workaround i disabled power_save_node diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index 9d947ae..56663c8 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c @@ -4520,7 +4520,7 @@ static int patch_stac92hd73xx(struct hda_codec *codec) return err; spec = codec->spec; - codec->power_save_node = 1; + //codec->power_save_node = 1; spec->linear_tone_beep = 0; spec->gen.mixer_nid = 0x1d; spec->have_spdif_mux = 1; ~ My hw: Board: Intel DG45ID Codec: IDT 92HD73E1X5
Created attachment 188361 [details] asound/card0/codec#2
Created attachment 188371 [details] dmi
Could you give alsa-info.sh output? Run the script with --no-upload option and attach to Bugzilla.
Created attachment 188401 [details] alsa-info.txt
it was output with disabled power_save_node. Is it ok or you need other one too?
At best could you give both cases?
Created attachment 188421 [details] alsa-info_bad
Thanks. Could you try the patch below? It just adds some waits at power up cycle, which is known to help often.
Created attachment 188431 [details] Test patch
With this patch instead of one "Cchraz" it makes 3x "Klaz".
Increasing msleep() value (e.g. 100) changes anything?
No, same 3x "Klaz" issue
Ah, OK, so it just delays between noises. We should go back to basic. Scratch the previous patch. Does relogin snd-hda-intel module re-triggers the noise? If so, it makes easier to test / diagnose.
Yea, i can reproduce it with: pusleaudio -k
OK, then please try without pulseaudio. Maybe better to test on Linux console (runlevel 3). There, - unload snd-hda-intel module once. - If you have /var/lib/alsa/asound.state or such file that is restored by udev, remove it once (better to back up). - Load snd-hda-intel module again but with probe_only=1 option. # modprobe snd-hda-intel probe_only=1 This should *not* give any clicks. At this moment, there is no codec driver, thus power_save_node plays anything at all. Take alsa-info.sh snapshot now once, and attach to Bugzilla. Then, try to reconfigure the codec manually by # echo 1 > /sys/class/sound/hwC0D0/reconfigure Now it gives clicks? Run alsamixer to see whether all volumes are muted there. If it's not, udev (or else) did restore the mixer state. This must be eliminated for testing. If this doesn't click noise, try to start pulseaudio manually at this point. Does it give click? If the click happens without pulseaudio, good, we can go forward. This can be easily reproduced with emulator.
(In reply to Takashi Iwai from comment #15) > OK, then please try without pulseaudio. Maybe better to test on Linux > console (runlevel 3). There, > - unload snd-hda-intel module once. > - If you have /var/lib/alsa/asound.state or such file that is restored by > udev, remove it once (better to back up). > - Load snd-hda-intel module again but with probe_only=1 option. > # modprobe snd-hda-intel probe_only=1 > > This should *not* give any clicks. At this moment, there is no codec > driver, thus power_save_node plays anything at all. Take alsa-info.sh > snapshot now once, and attach to Bugzilla. There was same kind of click.. probably because codec was already preloaded. I removed codec and reloaded snd-hda-intel, this time no sounds was triggered. > > Then, try to reconfigure the codec manually by > # echo 1 > /sys/class/sound/hwC0D0/reconfigure At this stage i don't have "klick" instead of it i has "peep", which i noticed earlier too, but it was not so annoying. Then i tried to reload snd-hda-intel again and got "klick". No pulseaudio was loaded.
Created attachment 188461 [details] alsa-info_plain (no codec)
by last alsa-info did you expected values provided by BIOS?
(In reply to Oleksij Rempel from comment #16) > (In reply to Takashi Iwai from comment #15) > > OK, then please try without pulseaudio. Maybe better to test on Linux > > console (runlevel 3). There, > > - unload snd-hda-intel module once. > > - If you have /var/lib/alsa/asound.state or such file that is restored by > > udev, remove it once (better to back up). > > - Load snd-hda-intel module again but with probe_only=1 option. > > # modprobe snd-hda-intel probe_only=1 > > > > This should *not* give any clicks. At this moment, there is no codec > > driver, thus power_save_node plays anything at all. Take alsa-info.sh > > snapshot now once, and attach to Bugzilla. > > There was same kind of click.. probably because codec was already preloaded. > I removed codec and reloaded snd-hda-intel, this time no sounds was > triggered. Hm, this is an important point, so please double-check. That is, try to add blacklist snd-hda-intel, do clean boot, then try to load snd-hda-intel manually with probe_only=1. If this causes the same click noise, it's strange that power_save_node=0 ever influences. Oh, also, try to set the option power_save=0, too. It seems that power_save=5 is set (or set via Kconfig), and the driver will power down after 5 seconds. > > Then, try to reconfigure the codec manually by > > # echo 1 > /sys/class/sound/hwC0D0/reconfigure > > At this stage i don't have "klick" instead of it i has "peep", which i > noticed earlier too, but it was not so annoying. OK. > Then i tried to reload snd-hda-intel again and got "klick". > > No pulseaudio was loaded. Try to start pulseaudio manually, and see whether you get clicks here. I'm afraid that it gets there. (In reply to Oleksij Rempel from comment #18) > by last alsa-info did you expected values provided by BIOS? Yes, sort of. This is the state before the codec driver tries to parse and initialize. It can be used as the default state for emulator.
(In reply to Takashi Iwai from comment #19) > (In reply to Oleksij Rempel from comment #16) > > (In reply to Takashi Iwai from comment #15) > > > OK, then please try without pulseaudio. Maybe better to test on Linux > > > console (runlevel 3). There, > > > - unload snd-hda-intel module once. > > > - If you have /var/lib/alsa/asound.state or such file that is restored by > > > udev, remove it once (better to back up). > > > - Load snd-hda-intel module again but with probe_only=1 option. > > > # modprobe snd-hda-intel probe_only=1 > > > > > > This should *not* give any clicks. At this moment, there is no codec > > > driver, thus power_save_node plays anything at all. Take alsa-info.sh > > > snapshot now once, and attach to Bugzilla. > > > > There was same kind of click.. probably because codec was already > preloaded. > > I removed codec and reloaded snd-hda-intel, this time no sounds was > > triggered. > > Hm, this is an important point, so please double-check. That is, try to add > blacklist snd-hda-intel, do clean boot, then try to load snd-hda-intel > manually with probe_only=1. If this causes the same click noise, it's > strange that power_save_node=0 ever influences. > > Oh, also, try to set the option power_save=0, too. It seems that > power_save=5 is set (or set via Kconfig), and the driver will power down > after 5 seconds. With clean start (blacklisted snd_hda_intel and boot directly to level 3), no sounds was reproduced. Even after manual load of snd_hda_intel > > > Then, try to reconfigure the codec manually by > > > # echo 1 > /sys/class/sound/hwC0D0/reconfigure > > > > At this stage i don't have "klick" instead of it i has "peep", which i > > noticed earlier too, but it was not so annoying. > > OK. On this stage i got "beep" > > Then i tried to reload snd-hda-intel again and got "klick". > > > > No pulseaudio was loaded. > > Try to start pulseaudio manually, and see whether you get clicks here. I'm > afraid that it gets there. here i got the klick :)
Created attachment 188471 [details] alsa-info_plain_2 (no codec) Clean start, with blacklisted snd_hda_intel and runlevel 3. Info was captured after manual module load.
Does the patch below give any improvement?
Created attachment 188761 [details] Test fix patch
Results with last patch: Still same popping sound. Time distance between klicks is a bit bigger.
Too bad... Then we need the manual tests. Could you try the following? - Install hda-verb program - Load snd-hda-intel (no matter with or without the fix patch), but with probe_only=1 option. - Run like hda-verb /dev/snd/hwC0D0 0x15 SET_AMP 0xb073 hda-verb /dev/snd/hwC0D0 0x0d SET_PIN_WID 0x40 hda-verb /dev/snd/hwC0D0 0x15 SET_POWER 0x03 Does this cause a click noise? Then try hda-verb /dev/snd/hwC0D0 0x15 SET_POWER 0x00 Any click noise? At next, hda-verb /dev/snd/hwC0D0 0x15 SET_AMP 0xb0f3 hda-verb /dev/snd/hwC0D0 0x15 SET_POWER 0x03 and hda-verb /dev/snd/hwC0D0 0x15 SET_POWER 0x00 Do these still give click noises?
(In reply to Takashi Iwai from comment #25) > Too bad... > > Then we need the manual tests. Could you try the following? > > - Install hda-verb program > > - Load snd-hda-intel (no matter with or without the fix patch), but with > probe_only=1 option. > > - Run like > hda-verb /dev/snd/hwC0D2 0x15 SET_AMP 0xb073 > hda-verb /dev/snd/hwC0D2 0x0d SET_PIN_WID 0x40 > hda-verb /dev/snd/hwC0D2 0x15 SET_POWER 0x03 > > Does this cause a click noise? yes > > Then try > hda-verb /dev/snd/hwC0D2 0x15 SET_POWER 0x00 > > Any click noise? yes > > At next, > hda-verb /dev/snd/hwC0D2 0x15 SET_AMP 0xb0f3 > hda-verb /dev/snd/hwC0D2 0x15 SET_POWER 0x03 here yes > and > hda-verb /dev/snd/hwC0D2 0x15 SET_POWER 0x00 > > Do these still give click noises? and here too.
OK, then how about this? hda-verb /dev/snd/hwC0D2 0x0d SET_PIN_WID 0x00 hda-verb /dev/snd/hwC0D2 0x15 SET_AMP 0xb073 hda-verb /dev/snd/hwC0D2 0x15 SET_POWER 0x03 and hda-verb /dev/snd/hwC0D2 0x15 SET_POWER 0x00 and hda-verb /dev/snd/hwC0D2 0x15 SET_AMP 0xb0f3 hda-verb /dev/snd/hwC0D2 0x15 SET_POWER 0x03 and hda-verb /dev/snd/hwC0D2 0x15 SET_POWER 0x00 If this still gives the loud click, the power change is basically no-go, and we'd need to forget about the new power save feature...
(In reply to Takashi Iwai from comment #27) > OK, then how about this? > hda-verb /dev/snd/hwC0D2 0x0d SET_PIN_WID 0x00 > hda-verb /dev/snd/hwC0D2 0x15 SET_AMP 0xb073 > hda-verb /dev/snd/hwC0D2 0x15 SET_POWER 0x03 > Nothing here. > and > hda-verb /dev/snd/hwC0D2 0x15 SET_POWER 0x00 Nothing here > and > hda-verb /dev/snd/hwC0D2 0x15 SET_AMP 0xb0f3 > hda-verb /dev/snd/hwC0D2 0x15 SET_POWER 0x03 Nothing here > and > hda-verb /dev/snd/hwC0D2 0x15 SET_POWER 0x00 Nothing here > If this still gives the loud click, the power change is basically no-go, and > we'd need to forget about the new power save feature...
Aha, so the pin clear works around it indeed. Could you try the patch below instead, then?
Created attachment 189111 [details] Test fix patch
hmm... still same issue.
Weird. Could you double-check the test procedure in comment 25 and 27? You meant "nothing" as there is no click noise, right? Also, try to execute commands in 27 in a batch, e.g. write a shell script to execute all these at once, and check whether you still get any clicks.
"nothing" means no noice, right. i retested and still same result. even if it is scripted. May be the right pin excluded by some of this checks: if (path->path[0] != cvt_nid) /* only for output */ continue; if (!path->pin_fixed && !path->pin_enabled) continue; if (clear && path->stream_enabled) continue; For example, pin can be configured by BIOS? so it is enabled?
Well, you can just give it a try remove some of checks and see whether it gives any difference. Let me know if you find anything.
Excluded all of them and added msleep(10) at the end of this function. Still same issue, with delay between klicks.
There's one another check: if (clear && is_active_nid(codec, pin, HDA_OUTPUT, 0)) continue; excluding this also doesn't matter?
hm.. if i remove this one i'll get additional "bzzzit" noise. but still with old klicking pick on the end.
OK, this is pretty hard to be covered properly, so let's just disable the feature for these chips. There are other new chips that use the same parser code, and it works for them, at least. The patch below disables the widget power saving only for IDT 92HD73xx chips.
Created attachment 189431 [details] Patch to disable widget power saving for IDT 92HD73xx
I queued the patch now to for-linus tree. Thanks for your patient testing.
Thank you. I also testes with this amp my laptop and was not able to reproduce this issue, so you right... it is some kind of limited issue.