Bug 215885 - Dell Latitude 7520 - Pop noises and screen flickers caused by the HDMI codec
Summary: Dell Latitude 7520 - Pop noises and screen flickers caused by the HDMI codec
Status: RESOLVED CODE_FIX
Alias: None
Product: Drivers
Classification: Unclassified
Component: Sound(ALSA) (show other bugs)
Hardware: Intel Linux
: P1 normal
Assignee: Jaroslav Kysela
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-04-25 17:04 UTC by Gabriele Mazzotta
Modified: 2022-05-18 19:48 UTC (History)
3 users (show)

See Also:
Kernel Version: 5.18-rc3
Subsystem:
Regression: No
Bisected commit-id:


Attachments
alsa-info.sh output (72.97 KB, text/plain)
2022-04-25 17:04 UTC, Gabriele Mazzotta
Details
Pop noises fix for Dell Latitude 7520 (2.60 KB, patch)
2022-04-25 17:05 UTC, Gabriele Mazzotta
Details | Diff

Description Gabriele Mazzotta 2022-04-25 17:04:23 UTC
Created attachment 300802 [details]
alsa-info.sh output

I have just got a Dell Latitude 7520 (Realtek ALC289 - Intel Tigerlake HDMI) and I'm experiencing some audio related issues running mainline v5.18-rc3. So far the only other version I tested is v5.17 that came with my distro.

The issues I am experiencing are:

1) Pop noises at startup and shutdown if headphones are plugged in and pop noises whenever headphones are plugged or unplugged.
I managed to fix this changing the vref of the mic pins. My headset mic is correctly detected even after the change.

2) The laptop screen turns off very briefly every time something interacts with the "Intel Tigerlake HDMI" codec. Reading "/proc/sound/card0/codec#2" is enough to cause the issue.
The screen turns off and on twice actually: off -> on -> ~1 second -> off -> on.
If there is an external monitor plugged in, reading the file causes the screen to turn off just once.
These two facts make me think this is related to the driver's power management.

3) If I turn on the laptop while headphones are plugged in, pactl shows "Active Port: analog-output-headphones", but everything plays as if it were "Active Port: analog-output-speaker". Switching to "analog-output-speaker" and back to  "analog-output-headphones" fixes the problem.
This is potentially a userspace bug, but this is the first time I experience it and I am not sure what kind of interaction there is between pipewire and the kernel. For now I'm working around this issue with a startup script.

The attached alsa-info.txt was obtained while running 5.18-rc3 with the patch attached applied.
Comment 1 Gabriele Mazzotta 2022-04-25 17:05:54 UTC
Created attachment 300803 [details]
Pop noises fix for Dell Latitude 7520

This is the patch I'm currently using to fix the pop noises.
Comment 2 Ozgur Kara 2022-04-25 17:29:59 UTC
Hello,

if you are using ALSA first, did you make any adjustments under /etc/modprobe.d?

options snd_hda_intel index=1
options snd_usb_audio index=0

and is recommended that you add and test them. also can you send email kernel for the your patch please?

--to <perex@perex.cz>
-- to alsa-devel@alsa-project.org
--cc linux-kernel@vger.kernel.org
Comment 3 Gabriele Mazzotta 2022-04-25 17:46:43 UTC
Hello,

I did not make any adjustment and the above options have no effect, other than changing /proc/asound/card0 with /proc/asound/card1.

I will submit the patch, I just wanted to try it a bit more and also wanted see if it could also somehow include some potential fix for the HDMI related issue, but I guess that one is unrelated and can go separately.
Comment 4 Takashi Iwai 2022-04-26 08:25:35 UTC
If both headset mic and built-in mic are working after the patch, the patch looks OK.  Feel free to submit to alsa-devel ML and Cc to me.

The HDMI problem is rather about i915 graphics driver.  The HD-audio codec is a part of GPU.  Better to report it to the i915 bug tracker at gitlab.freedesktop.org Issues.

BTW, I'll be off from tomorrow, so the further reaction will be delayed.
Comment 5 Gabriele Mazzotta 2022-05-02 07:18:58 UTC
For anyone interested, yesterday I reported the issue i915 bug tracker. Here the link: https://gitlab.freedesktop.org/drm/intel/-/issues/5872
Comment 6 Gabriele Mazzotta 2022-05-18 19:48:51 UTC
Commit 1efcdd9c1f34f5a6590bc9ac5471e562fb011386 ("ALSA: hda/realtek: Add quirk for Dell Latitude 7520") is now in master and the i915 issue is tracked elsewhere, so there is nothing left to do here. Marking this as resolved.

Note You need to log in before you can comment on or make changes to this bug.