Bug 216927

Summary: HP 865 G9 audio distorted after kernel upgrade past 6.0
Product: Drivers Reporter: tsengalb99
Component: Sound(ALSA)Assignee: Jaroslav Kysela (perex)
Status: REOPENED ---    
Severity: normal    
Priority: P1    
Hardware: AMD   
OS: Linux   
Kernel Version: 6.1.8 Subsystem:
Regression: Yes Bisected commit-id:
Attachments: alsa_info_out_5.19
alsa_info_out_6.1.8

Description tsengalb99 2023-01-13 20:35:52 UTC
I have a HP 865 G9 with an AMD Ryzen 5 6600U CPU. Audio works fine in various versions of kernel 5 (tested on 5.17 and 5.19), but if I upgrade to kernel 6, the audio becomes muffled. The "s" sound is not as clear as before, and it sounds as if the audio is being clipped. The OS is using the snd_hda_intel firmware both before and after. I have checked pulseaudio and alsa and do not see anything wrong. Not sure how to debug this.
Comment 1 Artem S. Tashkinov 2023-01-14 11:58:42 UTC
Changing the component. Bugs filed under Other/Other are not seen by anyone at all.

Please attach the output of 

1. http://www.alsa-project.org/alsa-info.sh
2. `dmesg`

for kernels 5.19 and 6.0 (four files in total).
Comment 2 Artem S. Tashkinov 2023-01-14 11:59:23 UTC
Please also try kernel 6.1.5 and see if it's working for you.

6.0 has already been EOLed.
Comment 3 Artem S. Tashkinov 2023-01-16 09:34:56 UTC
Please reopen if you're ready to provide the requested information.
Comment 4 tsengalb99 2023-01-16 19:15:10 UTC
I am out of town until next week, can provide the alsa info then. I tried 6.15 before too and it also had the same issue. I also tried 22.04-oem (6.xx) and that didn't fix anything. Are there any distros that by default come with 6.x? I wonder if it’s the kernel upgrade process that breaks things or something wrong with 6.0. Upgrading within 5 doesn't break anything, but upgrading from 5 to 6 does.

-----Original Message-----
From: bugzilla-daemon@kernel.org <bugzilla-daemon@kernel.org> 
Sent: Monday, January 16, 2023 5:18 AM
To: tsengalb99@gmail.com
Subject: [Bug 216927] HP 865 G9 audio distorted after kernel upgrade past 6.0

https://bugzilla.kernel.org/show_bug.cgi?id=216927

The Linux kernel's regression tracker (Thorsten Leemhuis) (regressions@leemhuis.info) changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |regressions@leemhuis.info
Comment 5 The Linux kernel's regression tracker (Thorsten Leemhuis) 2023-01-19 12:25:38 UTC
(In reply to tsengalb99 from comment #4)
> I am out of town until next week, can provide the alsa info then. I tried
> 6.15

Did you mean 6.1.5?

> Are there any distros that by default come with 6.x?

Fedora 37 and likely a few others, especially the rolling release ones (not sure if they have Live-ISOs). Give one of those a try and report back please
Comment 6 tsengalb99 2023-01-19 19:08:53 UTC
Got back and tried Fedora 37 live. I did not have any audio issues, so it is probably not related to kernel 6 itself but rather upgrade process then. I have windows installed on the laptop right now to do taxes so I cannot easily install a kernel 5 distro and upgrade to 6 and get the alsa output unless I find an external drive to do that with. 

-----Original Message-----
From: bugzilla-daemon@kernel.org <bugzilla-daemon@kernel.org> 
Sent: Thursday, January 19, 2023 4:26 AM
To: tsengalb99@gmail.com
Subject: [Bug 216927] HP 865 G9 audio distorted after kernel upgrade past 6.0

https://bugzilla.kernel.org/show_bug.cgi?id=216927

--- Comment #5 from The Linux kernel's regression tracker (Thorsten Leemhuis) (regressions@leemhuis.info) --- (In reply to tsengalb99 from comment #4)
> I am out of town until next week, can provide the alsa info then. I 
> tried
> 6.15

Did you mean 6.1.5?

> Are there any distros that by default come with 6.x?

Fedora 37 and likely a few others, especially the rolling release ones (not sure if they have Live-ISOs). Give one of those a try and report back please

--
You may reply to this email to add a comment.

You are receiving this mail because:
You reported the bug.
Comment 7 tsengalb99 2023-01-19 19:11:54 UTC
And yes I meant 6.1.5 not 6.15, sorry.

-----Original Message-----
From: bugzilla-daemon@kernel.org <bugzilla-daemon@kernel.org> 
Sent: Thursday, January 19, 2023 4:26 AM
To: tsengalb99@gmail.com
Subject: [Bug 216927] HP 865 G9 audio distorted after kernel upgrade past 6.0

https://bugzilla.kernel.org/show_bug.cgi?id=216927

--- Comment #5 from The Linux kernel's regression tracker (Thorsten Leemhuis) (regressions@leemhuis.info) --- (In reply to tsengalb99 from comment #4)
> I am out of town until next week, can provide the alsa info then. I 
> tried
> 6.15

Did you mean 6.1.5?

> Are there any distros that by default come with 6.x?

Fedora 37 and likely a few others, especially the rolling release ones (not sure if they have Live-ISOs). Give one of those a try and report back please

--
You may reply to this email to add a comment.

You are receiving this mail because:
You reported the bug.
Comment 8 tsengalb99 2023-01-19 19:22:47 UTC
https://bugzilla.kernel.org/show_bug.cgi?id=216206

could this be related?

-----Original Message-----
From: bugzilla-daemon@kernel.org <bugzilla-daemon@kernel.org> 
Sent: Thursday, January 19, 2023 4:26 AM
To: tsengalb99@gmail.com
Subject: [Bug 216927] HP 865 G9 audio distorted after kernel upgrade past 6.0

https://bugzilla.kernel.org/show_bug.cgi?id=216927

--- Comment #5 from The Linux kernel's regression tracker (Thorsten Leemhuis) (regressions@leemhuis.info) --- (In reply to tsengalb99 from comment #4)
> I am out of town until next week, can provide the alsa info then. I 
> tried
> 6.15

Did you mean 6.1.5?

> Are there any distros that by default come with 6.x?

Fedora 37 and likely a few others, especially the rolling release ones (not sure if they have Live-ISOs). Give one of those a try and report back please

--
You may reply to this email to add a comment.

You are receiving this mail because:
You reported the bug.
Comment 9 tsengalb99 2023-01-30 04:23:08 UTC
Created attachment 303663 [details]
alsa_info_out_5.19

attached are the alsa info outputs for 5.19 (normal audio) and 6.1.8 
(distorted audio)

On 1/19/23 07:25, bugzilla-daemon@kernel.org wrote:
> https://bugzilla.kernel.org/show_bug.cgi?id=216927
>
> --- Comment #5 from The Linux kernel's regression tracker (Thorsten Leemhuis)
> (regressions@leemhuis.info) ---
> (In reply to tsengalb99 from comment #4)
>> I am out of town until next week, can provide the alsa info then. I tried
>> 6.15
> Did you mean 6.1.5?
>
>> Are there any distros that by default come with 6.x?
> Fedora 37 and likely a few others, especially the rolling release ones (not
> sure if they have Live-ISOs). Give one of those a try and report back please
>
Comment 10 tsengalb99 2023-01-30 04:23:08 UTC
Created attachment 303664 [details]
alsa_info_out_6.1.8
Comment 11 Jaroslav Kysela 2023-01-30 09:51:48 UTC
This is suspicious:

  !!-------Mixer controls for card Generic_1
 
  -Card sysdefault:1 'Generic_1'/'HD-Audio Generic at 0xb48c0000 irq 134'
  +Card sysdefault:1 'Generic_1'/'HD-Audio Generic at 0xb48c0000 irq 120'
     Mixer name	: 'Realtek ALC245'
     Components	: 'HDA:10ec0245,103c8994,00100001'
  -  Controls      : 18
  +  Controls      : 136
     Simple ctrls  : 8

The mixer state is missing in 6.1.8. If you run command `alsactl -f /tmp/alsa.state store` command, do you see an error? Could you attach /tmp/alsa.state file if it's not empty?
Comment 12 tsengalb99 2023-01-30 17:15:06 UTC
I can do that at some point. I tried 6.2.0rc6 and the audio works, so I did some more debugging last night. dmesg in 6.1.8 has this line 

[   84.054774] cs35l41-hda i2c-CSC3551:00-cs35l41-hda.0: DSP1: Failed to read 256 bytes from 2800608: -121


while dmesg in 5.19 and 6.2.0rc6 do not. This makes me think the audio issue is related to https://bugzilla.kernel.org/show_bug.cgi?id=216311 (the audio chip is also a realtek alc245). Someone else on that thread with the same laptop but different cpu config also reported issues with audio, but they had a different issue.
Comment 13 Jaroslav Kysela 2023-01-30 17:22:49 UTC
The problem is probably in the Cirrus Logic driver code (amplifier chips with DSP connected to ALC245). If upstream works, you may try to isolate the fix code for 6.1 and send it to the stable maintainer so distros can pick this fix.
Comment 14 Jaroslav Kysela 2023-01-30 17:23:30 UTC
I meant "maintainer of the stable 6.1 kernel".
Comment 15 tsengalb99 2023-01-31 02:49:31 UTC
>If upstream works, you may try to isolate the fix code for 6.1 and send it to
>the stable maintainer so distros can pick this fix.

I tried checking if any of the files referenced in https://lore.kernel.org/lkml/20220811053950.11810-1-faenkhauser@gmail.com/ changed between 6.1.8 and 6.2rc6 regarding HP stuff and didn't see anything. How do I contact the 6.1 stable maintainer / who is this person?
Comment 16 Jaroslav Kysela 2023-02-02 10:10:25 UTC
Sorry, but with "isolate the fix code" I meant to use "git bisect" or any other tools to determine the first patch which fixes your issue. You should compile and test different versions of kernels. Then we can talk, if the patch can be included to the stable kernel.
Comment 17 tsengalb99 2023-02-02 15:55:08 UTC
Perhaps this is something that the cirrus people should look at instead 
of me? I am entirely unfamiliar with the kernel codebase, this is 
probably not going to be an efficient use of my time. Also, it should be 
cirrus's job to provide support for their firmware when notified of bugs 
and not the user's. I sent an email yesterday with some cirrus people 
cc'ed, and I believe you were cc'ed as well. Is that the correct way to 
get a hold of the cirrus people?

On 2/2/23 05:10, bugzilla-daemon@kernel.org wrote:
> https://bugzilla.kernel.org/show_bug.cgi?id=216927
>
> --- Comment #16 from Jaroslav Kysela (perex@perex.cz) ---
> Sorry, but with "isolate the fix code" I meant to use "git bisect" or any
> other
> tools to determine the first patch which fixes your issue. You should compile
> and test different versions of kernels. Then we can talk, if the patch can be
> included to the stable kernel.
>