On Sun, 20 Oct 2024 17:12:14 +0200, Dean Matthew Menezes wrote:
The first change worked to fix the sound from the speaker.
Then please double-check whether my original fix in https://lore.kernel.org/87cyjzrutw.wl-tiwai@suse.de really doesn't bring back the speaker output.
If it's confirmed to be broken, run as root: echo 1 > /sys/module/snd_hda_codec/parameters/dump_coef
and get alsa-info.sh outputs from both working and patched-but-not-working cases again, but at this time, during the playback.
(Also, please keep Cc.)
thanks,
Takashi
On Sun, 20 Oct 2024 17:29:33 +0200, Takashi Iwai wrote:
On Sun, 20 Oct 2024 17:12:14 +0200, Dean Matthew Menezes wrote:
The first change worked to fix the sound from the speaker.
Then please double-check whether my original fix in https://lore.kernel.org/87cyjzrutw.wl-tiwai@suse.de really doesn't bring back the speaker output.
If it's confirmed to be broken, run as root: echo 1 > /sys/module/snd_hda_codec/parameters/dump_coef
and get alsa-info.sh outputs from both working and patched-but-not-working cases again, but at this time, during the playback.
(Also, please keep Cc.)
... and let's put Kailang to Cc, as the commit 1e707769df07 ("ALSA: hda/realtek - Set GPIO3 to default at S4 state for Thinkpad with ALC1318") is the likely culprit.
Kailang, it seems that your fix with GPIO3 workaround causes the lack of the speaker output on Lenovo X1 Carbon Gen 12 with 17aa:231e where ALC287_FIXUP_THINKPAD_I2S_SPK was applied beforehand.
Takashi
I can confirm that the original fix does not bring back the speaker output. I have attached both outputs for alsa-info.sh
On Mon, 21 Oct 2024 03:30:13 +0200, Dean Matthew Menezes wrote:
I can confirm that the original fix does not bring back the speaker output. I have attached both outputs for alsa-info.sh
Thanks! This confirms that the only significant difference is the COEF data between working and patched-non-working cases.
Kailang, I guess this model (X1 Carbon Gen 12) isn't with ALC1318, hence your quirk rather influences badly. Or may the GPIO3 workaround have the similar effect?
As of now, the possible fix is to simply remove the quirk entries for ALC1318. But I'd need to know which model was targeted for your original fix in commit 1e707769df07 and whether the regressed model is with ALC1318.
Takashi
-----Original Message----- From: Takashi Iwai tiwai@suse.de Sent: Monday, October 21, 2024 2:59 PM To: Dean Matthew Menezes dean.menezes@utexas.edu Cc: Takashi Iwai tiwai@suse.de; Kailang kailang@realtek.com; stable@vger.kernel.org; regressions@lists.linux.dev; Jaroslav Kysela perex@perex.cz; Takashi Iwai tiwai@suse.com; Linux Sound System linux-sound@vger.kernel.org; Greg KH gregkh@linuxfoundation.org Subject: Re: No sound on speakers X1 Carbon Gen 12
External mail.
On Mon, 21 Oct 2024 03:30:13 +0200, Dean Matthew Menezes wrote:
I can confirm that the original fix does not bring back the speaker output. I have attached both outputs for alsa-info.sh
Thanks! This confirms that the only significant difference is the COEF data between working and patched-non-working cases.
Kailang, I guess this model (X1 Carbon Gen 12) isn't with ALC1318, hence your quirk rather influences badly. Or may the GPIO3 workaround have the similar effect?
No, I check with our AE. It's ALC1318 include. And This fixed was testing with Lenovo.
As of now, the possible fix is to simply remove the quirk entries for ALC1318. But I'd need to know which model was targeted for your original fix in commit 1e707769df07 and whether the regressed model is with ALC1318.
+ SND_PCI_QUIRK(0x17aa, 0x231e, "Thinkpad", ALC287_FIXUP_LENOVO_THKPAD_WH_ALC1318), + SND_PCI_QUIRK(0x17aa, 0x231f, "Thinkpad", ALC287_FIXUP_LENOVO_THKPAD_WH_ALC1318),
Yes, this model include ALC1318.
Takashi
On Mon, 21 Oct 2024 09:56:32 +0200, Kailang wrote:
-----Original Message----- From: Takashi Iwai tiwai@suse.de Sent: Monday, October 21, 2024 2:59 PM To: Dean Matthew Menezes dean.menezes@utexas.edu Cc: Takashi Iwai tiwai@suse.de; Kailang kailang@realtek.com; stable@vger.kernel.org; regressions@lists.linux.dev; Jaroslav Kysela perex@perex.cz; Takashi Iwai tiwai@suse.com; Linux Sound System linux-sound@vger.kernel.org; Greg KH gregkh@linuxfoundation.org Subject: Re: No sound on speakers X1 Carbon Gen 12
External mail.
On Mon, 21 Oct 2024 03:30:13 +0200, Dean Matthew Menezes wrote:
I can confirm that the original fix does not bring back the speaker output. I have attached both outputs for alsa-info.sh
Thanks! This confirms that the only significant difference is the COEF data between working and patched-non-working cases.
Kailang, I guess this model (X1 Carbon Gen 12) isn't with ALC1318, hence your quirk rather influences badly. Or may the GPIO3 workaround have the similar effect?
No, I check with our AE. It's ALC1318 include. And This fixed was testing with Lenovo.
As of now, the possible fix is to simply remove the quirk entries for ALC1318. But I'd need to know which model was targeted for your original fix in commit 1e707769df07 and whether the regressed model is with ALC1318.
- SND_PCI_QUIRK(0x17aa, 0x231e, "Thinkpad", ALC287_FIXUP_LENOVO_THKPAD_WH_ALC1318),
- SND_PCI_QUIRK(0x17aa, 0x231f, "Thinkpad", ALC287_FIXUP_LENOVO_THKPAD_WH_ALC1318),
Yes, this model include ALC1318.
Thanks for confirmation. So, from the Realtek side, the current code looks correct.
Dean, is the BIOS firmware up-to-date on your device? Just to be sure.
Takashi
Change to below model. + SND_PCI_QUIRK(0x17aa, 0x231e, "Thinkpad", ALC287_FIXUP_THINKPAD_I2S_SPK), + SND_PCI_QUIRK(0x17aa, 0x231f, "Thinkpad", ALC287_FIXUP_THINKPAD_I2S_SPK),
The speaker will have output. Right?
-----Original Message----- From: Takashi Iwai tiwai@suse.de Sent: Monday, October 21, 2024 2:59 PM To: Dean Matthew Menezes dean.menezes@utexas.edu Cc: Takashi Iwai tiwai@suse.de; Kailang kailang@realtek.com; stable@vger.kernel.org; regressions@lists.linux.dev; Jaroslav Kysela perex@perex.cz; Takashi Iwai tiwai@suse.com; Linux Sound System linux-sound@vger.kernel.org; Greg KH gregkh@linuxfoundation.org Subject: Re: No sound on speakers X1 Carbon Gen 12
External mail.
On Mon, 21 Oct 2024 03:30:13 +0200, Dean Matthew Menezes wrote:
I can confirm that the original fix does not bring back the speaker output. I have attached both outputs for alsa-info.sh
Thanks! This confirms that the only significant difference is the COEF data between working and patched-non-working cases.
Kailang, I guess this model (X1 Carbon Gen 12) isn't with ALC1318, hence your quirk rather influences badly. Or may the GPIO3 workaround have the similar effect?
As of now, the possible fix is to simply remove the quirk entries for ALC1318. But I'd need to know which model was targeted for your original fix in commit 1e707769df07 and whether the regressed model is with ALC1318.
Takashi
On Mon, 21 Oct 2024 10:19:53 +0200, Kailang wrote:
Change to below model.
- SND_PCI_QUIRK(0x17aa, 0x231e, "Thinkpad", ALC287_FIXUP_THINKPAD_I2S_SPK),
- SND_PCI_QUIRK(0x17aa, 0x231f, "Thinkpad", ALC287_FIXUP_THINKPAD_I2S_SPK),
The speaker will have output. Right?
FWIW, that was what I asked in https://lore.kernel.org/87h697jl6c.wl-tiwai@suse.de and Dean replied that the speaker worked with it. (His reply missed Cc, so it didn't appear in the thread, unfortunately).
Takashi
-----Original Message----- From: Takashi Iwai tiwai@suse.de Sent: Monday, October 21, 2024 2:59 PM To: Dean Matthew Menezes dean.menezes@utexas.edu Cc: Takashi Iwai tiwai@suse.de; Kailang kailang@realtek.com; stable@vger.kernel.org; regressions@lists.linux.dev; Jaroslav Kysela perex@perex.cz; Takashi Iwai tiwai@suse.com; Linux Sound System linux-sound@vger.kernel.org; Greg KH gregkh@linuxfoundation.org Subject: Re: No sound on speakers X1 Carbon Gen 12
External mail.
On Mon, 21 Oct 2024 03:30:13 +0200, Dean Matthew Menezes wrote:
I can confirm that the original fix does not bring back the speaker output. I have attached both outputs for alsa-info.sh
Thanks! This confirms that the only significant difference is the COEF data between working and patched-non-working cases.
Kailang, I guess this model (X1 Carbon Gen 12) isn't with ALC1318, hence your quirk rather influences badly. Or may the GPIO3 workaround have the similar effect?
As of now, the possible fix is to simply remove the quirk entries for ALC1318. But I'd need to know which model was targeted for your original fix in commit 1e707769df07 and whether the regressed model is with ALC1318.
Takashi
But this platform need to assign model ALC287_FIXUP_LENOVO_THKPAD_WH_ALC1318. It has a chance to broken amp IC. But I don't know why it doesn't have output from speaker. Maybe could run hda_verb to get COEF value. To get NID 0x5A index 0 value.
-----Original Message----- From: Takashi Iwai tiwai@suse.de Sent: Monday, October 21, 2024 4:24 PM To: Kailang kailang@realtek.com Cc: Takashi Iwai tiwai@suse.de; Dean Matthew Menezes dean.menezes@utexas.edu; stable@vger.kernel.org; regressions@lists.linux.dev; Jaroslav Kysela perex@perex.cz; Takashi Iwai tiwai@suse.com; Linux Sound System linux-sound@vger.kernel.org; Greg KH gregkh@linuxfoundation.org Subject: Re: No sound on speakers X1 Carbon Gen 12
External mail.
On Mon, 21 Oct 2024 10:19:53 +0200, Kailang wrote:
Change to below model.
SND_PCI_QUIRK(0x17aa, 0x231e, "Thinkpad",
ALC287_FIXUP_THINKPAD_I2S_SPK),
SND_PCI_QUIRK(0x17aa, 0x231f, "Thinkpad",
- ALC287_FIXUP_THINKPAD_I2S_SPK),
The speaker will have output. Right?
FWIW, that was what I asked in https://lore.kernel.org/87h697jl6c.wl-tiwai@suse.de and Dean replied that the speaker worked with it. (His reply missed Cc, so it didn't appear in the thread, unfortunately).
Takashi
-----Original Message----- From: Takashi Iwai tiwai@suse.de Sent: Monday, October 21, 2024 2:59 PM To: Dean Matthew Menezes dean.menezes@utexas.edu Cc: Takashi Iwai tiwai@suse.de; Kailang kailang@realtek.com; stable@vger.kernel.org; regressions@lists.linux.dev; Jaroslav Kysela perex@perex.cz; Takashi Iwai tiwai@suse.com; Linux Sound System linux-sound@vger.kernel.org; Greg KH gregkh@linuxfoundation.org Subject: Re: No sound on speakers X1 Carbon Gen 12
External mail.
On Mon, 21 Oct 2024 03:30:13 +0200, Dean Matthew Menezes wrote:
I can confirm that the original fix does not bring back the speaker output. I have attached both outputs for alsa-info.sh
Thanks! This confirms that the only significant difference is the COEF data between working and patched-non-working cases.
Kailang, I guess this model (X1 Carbon Gen 12) isn't with ALC1318, hence your quirk rather influences badly. Or may the GPIO3 workaround have the similar effect?
As of now, the possible fix is to simply remove the quirk entries for
ALC1318.
But I'd need to know which model was targeted for your original fix in commit 1e707769df07 and whether the regressed model is with ALC1318.
Takashi
On Mon, 21 Oct 2024 10:38:48 +0200, Kailang wrote:
But this platform need to assign model ALC287_FIXUP_LENOVO_THKPAD_WH_ALC1318. It has a chance to broken amp IC.
Yes, if X1 Carbon Gen 12 is indeed the targeted model of the fix, it must be applied. But we seem still missing some small piece...
But I don't know why it doesn't have output from speaker.
The diff of COEF dump showed at NID 0x20: (working) Coeff 0x10: 0x8006 (broken) Coeff 0x10: 0x8806 (working) Coeff 0x46: 0x0004 (broken) Coeff 0x46: 0x0404 It shouldn't be a problem to leave the bit 0x800 to COEF 0x10, I suppose?
Maybe could run hda_verb to get COEF value. To get NID 0x5A index 0 value.
Dean, please run hda-verb program (as root) like: hda-verb /dev/snd/hwC0D0 0x5a SET_COEF_INDEX 0x00 hda-verb /dev/snd/hwC0D0 0x5a GET_PROC_COEF 0
and give the outputs on both working and non-working cases.
hda-verb should be included in alsa-utils.
Takashi
-----Original Message----- From: Takashi Iwai tiwai@suse.de Sent: Monday, October 21, 2024 4:24 PM To: Kailang kailang@realtek.com Cc: Takashi Iwai tiwai@suse.de; Dean Matthew Menezes dean.menezes@utexas.edu; stable@vger.kernel.org; regressions@lists.linux.dev; Jaroslav Kysela perex@perex.cz; Takashi Iwai tiwai@suse.com; Linux Sound System linux-sound@vger.kernel.org; Greg KH gregkh@linuxfoundation.org Subject: Re: No sound on speakers X1 Carbon Gen 12
External mail.
On Mon, 21 Oct 2024 10:19:53 +0200, Kailang wrote:
Change to below model.
SND_PCI_QUIRK(0x17aa, 0x231e, "Thinkpad",
ALC287_FIXUP_THINKPAD_I2S_SPK),
SND_PCI_QUIRK(0x17aa, 0x231f, "Thinkpad",
- ALC287_FIXUP_THINKPAD_I2S_SPK),
The speaker will have output. Right?
FWIW, that was what I asked in https://lore.kernel.org/87h697jl6c.wl-tiwai@suse.de and Dean replied that the speaker worked with it. (His reply missed Cc, so it didn't appear in the thread, unfortunately).
Takashi
-----Original Message----- From: Takashi Iwai tiwai@suse.de Sent: Monday, October 21, 2024 2:59 PM To: Dean Matthew Menezes dean.menezes@utexas.edu Cc: Takashi Iwai tiwai@suse.de; Kailang kailang@realtek.com; stable@vger.kernel.org; regressions@lists.linux.dev; Jaroslav Kysela perex@perex.cz; Takashi Iwai tiwai@suse.com; Linux Sound System linux-sound@vger.kernel.org; Greg KH gregkh@linuxfoundation.org Subject: Re: No sound on speakers X1 Carbon Gen 12
External mail.
On Mon, 21 Oct 2024 03:30:13 +0200, Dean Matthew Menezes wrote:
I can confirm that the original fix does not bring back the speaker output. I have attached both outputs for alsa-info.sh
Thanks! This confirms that the only significant difference is the COEF data between working and patched-non-working cases.
Kailang, I guess this model (X1 Carbon Gen 12) isn't with ALC1318, hence your quirk rather influences badly. Or may the GPIO3 workaround have the similar effect?
As of now, the possible fix is to simply remove the quirk entries for
ALC1318.
But I'd need to know which model was targeted for your original fix in commit 1e707769df07 and whether the regressed model is with ALC1318.
Takashi
-----Original Message----- From: Takashi Iwai tiwai@suse.de Sent: Monday, October 21, 2024 4:57 PM To: Kailang kailang@realtek.com Cc: Takashi Iwai tiwai@suse.de; Dean Matthew Menezes dean.menezes@utexas.edu; stable@vger.kernel.org; regressions@lists.linux.dev; Jaroslav Kysela perex@perex.cz; Takashi Iwai tiwai@suse.com; Linux Sound System linux-sound@vger.kernel.org; Greg KH gregkh@linuxfoundation.org Subject: Re: No sound on speakers X1 Carbon Gen 12
External mail.
On Mon, 21 Oct 2024 10:38:48 +0200, Kailang wrote:
But this platform need to assign model
ALC287_FIXUP_LENOVO_THKPAD_WH_ALC1318.
It has a chance to broken amp IC.
Yes, if X1 Carbon Gen 12 is indeed the targeted model of the fix, it must be applied. But we seem still missing some small piece...
But I don't know why it doesn't have output from speaker.
The diff of COEF dump showed at NID 0x20: (working) Coeff 0x10: 0x8006 (broken) Coeff 0x10: 0x8806 (working) Coeff 0x46: 0x0004 (broken) Coeff 0x46: 0x0404 It shouldn't be a problem to leave the bit 0x800 to COEF 0x10, I suppose?
Maybe could run hda_verb to get COEF value. To get NID 0x5A index 0 value.
Dean, please run hda-verb program (as root) like: hda-verb /dev/snd/hwC0D0 0x5a SET_COEF_INDEX 0x00 hda-verb /dev/snd/hwC0D0 0x5a GET_PROC_COEF 0
and give the outputs on both working and non-working cases.
hda-verb should be included in alsa-utils.
Dean, Please also get the value via music playing.
Takashi
-----Original Message----- From: Takashi Iwai tiwai@suse.de Sent: Monday, October 21, 2024 4:24 PM To: Kailang kailang@realtek.com Cc: Takashi Iwai tiwai@suse.de; Dean Matthew Menezes dean.menezes@utexas.edu; stable@vger.kernel.org; regressions@lists.linux.dev; Jaroslav Kysela perex@perex.cz; Takashi Iwai tiwai@suse.com; Linux Sound System linux-sound@vger.kernel.org; Greg KH gregkh@linuxfoundation.org Subject: Re: No sound on speakers X1 Carbon Gen 12
External mail.
On Mon, 21 Oct 2024 10:19:53 +0200, Kailang wrote:
Change to below model.
SND_PCI_QUIRK(0x17aa, 0x231e, "Thinkpad",
ALC287_FIXUP_THINKPAD_I2S_SPK),
SND_PCI_QUIRK(0x17aa, 0x231f, "Thinkpad",
- ALC287_FIXUP_THINKPAD_I2S_SPK),
The speaker will have output. Right?
FWIW, that was what I asked in https://lore.kernel.org/87h697jl6c.wl-tiwai@suse.de and Dean replied that the speaker worked with it. (His reply missed Cc, so it didn't appear in the thread, unfortunately).
Takashi
-----Original Message----- From: Takashi Iwai tiwai@suse.de Sent: Monday, October 21, 2024 2:59 PM To: Dean Matthew Menezes dean.menezes@utexas.edu Cc: Takashi Iwai tiwai@suse.de; Kailang kailang@realtek.com; stable@vger.kernel.org; regressions@lists.linux.dev; Jaroslav Kysela perex@perex.cz; Takashi Iwai tiwai@suse.com; Linux Sound System linux-sound@vger.kernel.org; Greg KH gregkh@linuxfoundation.org Subject: Re: No sound on speakers X1 Carbon Gen 12
External mail.
On Mon, 21 Oct 2024 03:30:13 +0200, Dean Matthew Menezes wrote:
I can confirm that the original fix does not bring back the speaker output. I have attached both outputs for alsa-info.sh
Thanks! This confirms that the only significant difference is the COEF data between working and patched-non-working cases.
Kailang, I guess this model (X1 Carbon Gen 12) isn't with ALC1318, hence your quirk rather influences badly. Or may the GPIO3 workaround have the similar effect?
As of now, the possible fix is to simply remove the quirk entries for
ALC1318.
But I'd need to know which model was targeted for your original fix in commit 1e707769df07 and whether the regressed model is with ALC1318.
Takashi
I get the same values for both
axiom /home/dean/linux-6.11.3/sound/pci/hda # hda-verb /dev/snd/hwC0D0 0x5a SET_COEF_INDEX 0x00 nid = 0x5a, verb = 0x500, param = 0x0 value = 0x0 axiom /home/dean/linux-6.11.3/sound/pci/hda # hda-verb /dev/snd/hwC0D0 0x5a SET_PROC_COEF 0x00 nid = 0x5a, verb = 0x400, param = 0x0 value = 0x0
axiom /home/dean # hda-verb /dev/snd/hwC0D0 0x5a SET_COEF_INDEX 0x00 nid = 0x5a, verb = 0x500, param = 0x0 value = 0x0 axiom /home/dean # hda-verb /dev/snd/hwC0D0 0x5a SET_PROC_COEF 0x00 nid = 0x5a, verb = 0x400, param = 0x0 value = 0x0
On Fri, 25 Oct 2024 03:22:38 +0200, Dean Matthew Menezes wrote:
I get the same values for both
axiom /home/dean/linux-6.11.3/sound/pci/hda # hda-verb /dev/snd/hwC0D0 0x5a SET_COEF_INDEX 0x00 nid = 0x5a, verb = 0x500, param = 0x0 value = 0x0
Here OK, but...
axiom /home/dean/linux-6.11.3/sound/pci/hda # hda-verb /dev/snd/hwC0D0 0x5a SET_PROC_COEF 0x00
... here run GET_PROC_COEF instead, i.e. to read the value.
thanks,
Takashi
-----Original Message----- From: Takashi Iwai tiwai@suse.de Sent: Friday, October 25, 2024 3:17 PM To: Dean Matthew Menezes dean.menezes@utexas.edu Cc: Kailang kailang@realtek.com; Takashi Iwai tiwai@suse.de; stable@vger.kernel.org; regressions@lists.linux.dev; Jaroslav Kysela perex@perex.cz; Takashi Iwai tiwai@suse.com; Linux Sound System linux-sound@vger.kernel.org; Greg KH gregkh@linuxfoundation.org Subject: Re: No sound on speakers X1 Carbon Gen 12
External mail.
On Fri, 25 Oct 2024 03:22:38 +0200, Dean Matthew Menezes wrote:
I get the same values for both
axiom /home/dean/linux-6.11.3/sound/pci/hda # hda-verb /dev/snd/hwC0D0 0x5a SET_COEF_INDEX 0x00 nid = 0x5a, verb = 0x500, param = 0x0 value = 0x0
Here OK, but...
axiom /home/dean/linux-6.11.3/sound/pci/hda # hda-verb /dev/snd/hwC0D0 0x5a SET_PROC_COEF 0x00
... here run GET_PROC_COEF instead, i.e. to read the value.
But SOF mode can't read from this usage. I forgot.
thanks,
Takashi
I get the same output: axiom /home/dean # hda-verb /dev/snd/hwC0D0 0x5a SET_COEF_INDEX 0x00 nid = 0x5a, verb = 0x500, param = 0x0 value = 0x0 axiom /home/dean # hda-verb /dev/snd/hwC0D0 0x5a GET_PROC_COEF 0x00 nid = 0x5a, verb = 0xc00, param = 0x0 value = 0x0
On Fri, 25 Oct 2024 at 02:16, Takashi Iwai tiwai@suse.de wrote:
On Fri, 25 Oct 2024 03:22:38 +0200, Dean Matthew Menezes wrote:
I get the same values for both
axiom /home/dean/linux-6.11.3/sound/pci/hda # hda-verb /dev/snd/hwC0D0 0x5a SET_COEF_INDEX 0x00 nid = 0x5a, verb = 0x500, param = 0x0 value = 0x0
Here OK, but...
axiom /home/dean/linux-6.11.3/sound/pci/hda # hda-verb /dev/snd/hwC0D0 0x5a SET_PROC_COEF 0x00
... here run GET_PROC_COEF instead, i.e. to read the value.
thanks,
Takashi
Hi Dean,
I check issues with our site machine. I guess your BIOS didn't update to newer version.
If BIOS no update, you need to add below patch.
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 74ca0bb6c091..126b68140e7e 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -7450,7 +7450,6 @@ static void alc287_alc1318_playback_pcm_hook(struct hda_pcm_stream *hinfo, struct snd_pcm_substream *substream, int action) { - alc_write_coef_idx(codec, 0x10, 0x8806); /* Change MLK to GPIO3 */ switch (action) { case HDA_GEN_PCM_ACT_OPEN: alc_write_coefex_idx(codec, 0x5a, 0x00, 0x954f); /* write gpio3 to high */ @@ -7464,7 +7463,6 @@ static void alc287_alc1318_playback_pcm_hook(struct hda_pcm_stream *hinfo, static void alc287_s4_power_gpio3_default(struct hda_codec *codec) { if (is_s4_suspend(codec)) { - alc_write_coef_idx(codec, 0x10, 0x8806); /* Change MLK to GPIO3 */ alc_write_coefex_idx(codec, 0x5a, 0x00, 0x554f); /* write gpio3 as default value */ } } @@ -7473,9 +7471,17 @@ static void alc287_fixup_lenovo_thinkpad_with_alc1318(struct hda_codec *codec, const struct hda_fixup *fix, int action) { struct alc_spec *spec = codec->spec; + static const struct coef_fw coefs[] = { + WRITE_COEF(0x24, 0x0013), WRITE_COEF(0x25, 0x0000), WRITE_COEF(0x26, 0xC300), + WRITE_COEF(0x28, 0x0001), WRITE_COEF(0x29, 0xb023), + WRITE_COEF(0x24, 0x0013), WRITE_COEF(0x25, 0x0000), WRITE_COEF(0x26, 0xC301), + WRITE_COEF(0x28, 0x0001), WRITE_COEF(0x29, 0xb023), + };
if (action != HDA_FIXUP_ACT_PRE_PROBE) return; + alc_update_coef_idx(codec, 0x10, 1<<11, 1<<11); + alc_process_coef_fw(codec, coefs); spec->power_hook = alc287_s4_power_gpio3_default; spec->gen.pcm_playback_hook = alc287_alc1318_playback_pcm_hook; }
-----Original Message----- From: Dean Matthew Menezes dean.menezes@utexas.edu Sent: Saturday, October 26, 2024 8:23 AM To: Takashi Iwai tiwai@suse.de Cc: Kailang kailang@realtek.com; stable@vger.kernel.org; regressions@lists.linux.dev; Jaroslav Kysela perex@perex.cz; Takashi Iwai tiwai@suse.com; Linux Sound System linux-sound@vger.kernel.org; Greg KH gregkh@linuxfoundation.org Subject: Re: No sound on speakers X1 Carbon Gen 12
External mail.
I get the same output: axiom /home/dean # hda-verb /dev/snd/hwC0D0 0x5a SET_COEF_INDEX 0x00 nid = 0x5a, verb = 0x500, param = 0x0 value = 0x0 axiom /home/dean # hda-verb /dev/snd/hwC0D0 0x5a GET_PROC_COEF 0x00 nid = 0x5a, verb = 0xc00, param = 0x0 value = 0x0
On Fri, 25 Oct 2024 at 02:16, Takashi Iwai tiwai@suse.de wrote:
On Fri, 25 Oct 2024 03:22:38 +0200, Dean Matthew Menezes wrote:
I get the same values for both
axiom /home/dean/linux-6.11.3/sound/pci/hda # hda-verb /dev/snd/hwC0D0 0x5a SET_COEF_INDEX 0x00 nid = 0x5a, verb = 0x500, param = 0x0 value = 0x0
Here OK, but...
axiom /home/dean/linux-6.11.3/sound/pci/hda # hda-verb /dev/snd/hwC0D0 0x5a SET_PROC_COEF 0x00
... here run GET_PROC_COEF instead, i.e. to read the value.
thanks,
Takashi
Hi Dean,
Could you test the patch?
-----Original Message----- From: Kailang Sent: Friday, November 8, 2024 10:59 AM To: 'Dean Matthew Menezes' dean.menezes@utexas.edu; Takashi Iwai tiwai@suse.de Cc: stable@vger.kernel.org; regressions@lists.linux.dev; Jaroslav Kysela perex@perex.cz; Takashi Iwai tiwai@suse.com; Linux Sound System linux-sound@vger.kernel.org; Greg KH gregkh@linuxfoundation.org Subject: RE: No sound on speakers X1 Carbon Gen 12
Hi Dean,
I check issues with our site machine. I guess your BIOS didn't update to newer version.
If BIOS no update, you need to add below patch.
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 74ca0bb6c091..126b68140e7e 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -7450,7 +7450,6 @@ static void alc287_alc1318_playback_pcm_hook(struct hda_pcm_stream *hinfo, struct snd_pcm_substream *substream, int action) {
- alc_write_coef_idx(codec, 0x10, 0x8806); /* Change MLK to GPIO3 */ switch (action) { case HDA_GEN_PCM_ACT_OPEN: alc_write_coefex_idx(codec, 0x5a, 0x00, 0x954f); /* write gpio3 to
high */ @@ -7464,7 +7463,6 @@ static void alc287_alc1318_playback_pcm_hook(struct hda_pcm_stream *hinfo, static void alc287_s4_power_gpio3_default(struct hda_codec *codec) { if (is_s4_suspend(codec)) {
alc_write_coef_idx(codec, 0x10, 0x8806); /* Change MLK to GPIO3
*/ alc_write_coefex_idx(codec, 0x5a, 0x00, 0x554f); /* write gpio3 as default value */ } } @@ -7473,9 +7471,17 @@ static void alc287_fixup_lenovo_thinkpad_with_alc1318(struct hda_codec *codec, const struct hda_fixup *fix, int action) { struct alc_spec *spec = codec->spec;
static const struct coef_fw coefs[] = {
WRITE_COEF(0x24, 0x0013), WRITE_COEF(0x25, 0x0000),
WRITE_COEF(0x26, 0xC300),
WRITE_COEF(0x28, 0x0001), WRITE_COEF(0x29, 0xb023),
WRITE_COEF(0x24, 0x0013), WRITE_COEF(0x25, 0x0000),
WRITE_COEF(0x26, 0xC301),
WRITE_COEF(0x28, 0x0001), WRITE_COEF(0x29, 0xb023),
};
if (action != HDA_FIXUP_ACT_PRE_PROBE) return;
alc_update_coef_idx(codec, 0x10, 1<<11, 1<<11);
alc_process_coef_fw(codec, coefs);
spec->power_hook = alc287_s4_power_gpio3_default; spec->gen.pcm_playback_hook =
alc287_alc1318_playback_pcm_hook; }
-----Original Message----- From: Dean Matthew Menezes dean.menezes@utexas.edu Sent: Saturday, October 26, 2024 8:23 AM To: Takashi Iwai tiwai@suse.de Cc: Kailang kailang@realtek.com; stable@vger.kernel.org; regressions@lists.linux.dev; Jaroslav Kysela perex@perex.cz; Takashi Iwai tiwai@suse.com; Linux Sound System linux-sound@vger.kernel.org; Greg KH gregkh@linuxfoundation.org Subject: Re: No sound on speakers X1 Carbon Gen 12
External mail.
I get the same output: axiom /home/dean # hda-verb /dev/snd/hwC0D0 0x5a SET_COEF_INDEX 0x00 nid = 0x5a, verb = 0x500, param = 0x0 value = 0x0 axiom /home/dean # hda-verb /dev/snd/hwC0D0 0x5a GET_PROC_COEF 0x00 nid = 0x5a, verb = 0xc00, param = 0x0 value = 0x0
On Fri, 25 Oct 2024 at 02:16, Takashi Iwai tiwai@suse.de wrote:
On Fri, 25 Oct 2024 03:22:38 +0200, Dean Matthew Menezes wrote:
I get the same values for both
axiom /home/dean/linux-6.11.3/sound/pci/hda # hda-verb /dev/snd/hwC0D0 0x5a SET_COEF_INDEX 0x00 nid = 0x5a, verb = 0x500, param = 0x0 value = 0x0
Here OK, but...
axiom /home/dean/linux-6.11.3/sound/pci/hda # hda-verb /dev/snd/hwC0D0 0x5a SET_PROC_COEF 0x00
... here run GET_PROC_COEF instead, i.e. to read the value.
thanks,
Takashi
Hi Takashi,
Attach patch will solve issue.
-----Original Message----- From: Dean Matthew Menezes dean.menezes@utexas.edu Sent: Tuesday, November 12, 2024 11:18 AM To: Kailang kailang@realtek.com Cc: Takashi Iwai tiwai@suse.de; stable@vger.kernel.org; regressions@lists.linux.dev; Jaroslav Kysela perex@perex.cz; Takashi Iwai tiwai@suse.com; Linux Sound System linux-sound@vger.kernel.org; Greg KH gregkh@linuxfoundation.org Subject: Re: No sound on speakers X1 Carbon Gen 12
External mail.
Yes, it works!
-----Original Message----- From: Takashi Iwai tiwai@suse.de Sent: Monday, October 21, 2024 4:57 PM To: Kailang kailang@realtek.com Cc: Takashi Iwai tiwai@suse.de; Dean Matthew Menezes dean.menezes@utexas.edu; stable@vger.kernel.org; regressions@lists.linux.dev; Jaroslav Kysela perex@perex.cz; Takashi Iwai tiwai@suse.com; Linux Sound System linux-sound@vger.kernel.org; Greg KH gregkh@linuxfoundation.org Subject: Re: No sound on speakers X1 Carbon Gen 12
External mail.
On Mon, 21 Oct 2024 10:38:48 +0200, Kailang wrote:
But this platform need to assign model
ALC287_FIXUP_LENOVO_THKPAD_WH_ALC1318.
It has a chance to broken amp IC.
Yes, if X1 Carbon Gen 12 is indeed the targeted model of the fix, it must be applied. But we seem still missing some small piece...
But I don't know why it doesn't have output from speaker.
The diff of COEF dump showed at NID 0x20: (working) Coeff 0x10: 0x8006 (broken) Coeff 0x10: 0x8806 (working) Coeff 0x46: 0x0004 (broken) Coeff 0x46: 0x0404 It shouldn't be a problem to leave the bit 0x800 to COEF 0x10, I suppose?
This just change pin function from MLK to GIPO. Our AE guess says, it maybe GPIO3 can't pull high.
Maybe could run hda_verb to get COEF value. To get NID 0x5A index 0 value.
Dean, please run hda-verb program (as root) like: hda-verb /dev/snd/hwC0D0 0x5a SET_COEF_INDEX 0x00 hda-verb /dev/snd/hwC0D0 0x5a GET_PROC_COEF 0
and give the outputs on both working and non-working cases.
hda-verb should be included in alsa-utils.
Takashi
-----Original Message----- From: Takashi Iwai tiwai@suse.de Sent: Monday, October 21, 2024 4:24 PM To: Kailang kailang@realtek.com Cc: Takashi Iwai tiwai@suse.de; Dean Matthew Menezes dean.menezes@utexas.edu; stable@vger.kernel.org; regressions@lists.linux.dev; Jaroslav Kysela perex@perex.cz; Takashi Iwai tiwai@suse.com; Linux Sound System linux-sound@vger.kernel.org; Greg KH gregkh@linuxfoundation.org Subject: Re: No sound on speakers X1 Carbon Gen 12
External mail.
On Mon, 21 Oct 2024 10:19:53 +0200, Kailang wrote:
Change to below model.
SND_PCI_QUIRK(0x17aa, 0x231e, "Thinkpad",
ALC287_FIXUP_THINKPAD_I2S_SPK),
SND_PCI_QUIRK(0x17aa, 0x231f, "Thinkpad",
- ALC287_FIXUP_THINKPAD_I2S_SPK),
The speaker will have output. Right?
FWIW, that was what I asked in https://lore.kernel.org/87h697jl6c.wl-tiwai@suse.de and Dean replied that the speaker worked with it. (His reply missed Cc, so it didn't appear in the thread, unfortunately).
Takashi
-----Original Message----- From: Takashi Iwai tiwai@suse.de Sent: Monday, October 21, 2024 2:59 PM To: Dean Matthew Menezes dean.menezes@utexas.edu Cc: Takashi Iwai tiwai@suse.de; Kailang kailang@realtek.com; stable@vger.kernel.org; regressions@lists.linux.dev; Jaroslav Kysela perex@perex.cz; Takashi Iwai tiwai@suse.com; Linux Sound System linux-sound@vger.kernel.org; Greg KH gregkh@linuxfoundation.org Subject: Re: No sound on speakers X1 Carbon Gen 12
External mail.
On Mon, 21 Oct 2024 03:30:13 +0200, Dean Matthew Menezes wrote:
I can confirm that the original fix does not bring back the speaker output. I have attached both outputs for alsa-info.sh
Thanks! This confirms that the only significant difference is the COEF data between working and patched-non-working cases.
Kailang, I guess this model (X1 Carbon Gen 12) isn't with ALC1318, hence your quirk rather influences badly. Or may the GPIO3 workaround have the similar effect?
As of now, the possible fix is to simply remove the quirk entries for
ALC1318.
But I'd need to know which model was targeted for your original fix in commit 1e707769df07 and whether the regressed model is with ALC1318.
Takashi
linux-stable-mirror@lists.linaro.org