From: Kailang <kailang@realtek.com>
To: Dean Matthew Menezes <dean.menezes@utexas.edu>
Cc: Takashi Iwai <tiwai@suse.de>,
"stable@vger.kernel.org" <stable@vger.kernel.org>,
"regressions@lists.linux.dev" <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
Date: Wed, 13 Nov 2024 06:22:48 +0000 [thread overview]
Message-ID: <ced4ebe356ad4e5796f059df8cdef3dd@realtek.com> (raw)
In-Reply-To: <CAEkK70QottpLxq-prAEPe8TtPR=QBdQWuUrjf6ZT6PipcfS9xw@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 578 bytes --]
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!
[-- Attachment #2: 0000-x1-gen12-speaker.patch --]
[-- Type: application/octet-stream, Size: 2204 bytes --]
From 95b64bfc26c492ca2fbff1718fdf40f7da499b4c Mon Sep 17 00:00:00 2001
From: Kailang Yang <kailang@realtek.com>
Date: Tue, 12 Nov 2024 14:03:53 +0800
Subject: [PATCH] ALSA: hda/realtek - update set GPIO3 to default for Thinkpad with ALC1318
If user no update BIOS, the speaker will no sound.
This patch support old BIOS to have sound from speaker.
Fixes: 1e707769df07 ("ALSA: hda/realtek - Set GPIO3 to default at S4 state for Thinkpad with ALC1318")
Signed-off-by: Kailang Yang <kailang@realtek.com>
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 74ca0bb6c091..d83b29f9a70f 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;
}
next prev parent reply other threads:[~2024-11-13 6:22 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-16 0:47 No sound on speakers X1 Carbon Gen 12 Dean Matthew Menezes
2024-10-16 5:42 ` Greg KH
2024-10-16 5:56 ` Linux regression tracking (Thorsten Leemhuis)
2024-10-16 9:21 ` Takashi Iwai
2024-10-16 21:18 ` Dean Matthew Menezes
2024-10-17 8:34 ` Takashi Iwai
2024-10-18 23:14 ` Dean Matthew Menezes
2024-10-19 8:12 ` Takashi Iwai
2024-10-19 23:11 ` Dean Matthew Menezes
2024-10-20 7:19 ` Takashi Iwai
2024-10-20 14:54 ` Dean Matthew Menezes
[not found] ` <CAEkK70TWL_me58QZXeJSq+=Ry3jA+CgZJttsgAPz1wP7ywqj6A@mail.gmail.com>
2024-10-20 15:29 ` Takashi Iwai
2024-10-20 15:33 ` Takashi Iwai
2024-10-21 1:30 ` Dean Matthew Menezes
2024-10-21 6:59 ` Takashi Iwai
2024-10-21 7:56 ` Kailang
2024-10-21 8:20 ` Takashi Iwai
2024-10-21 8:19 ` Kailang
2024-10-21 8:24 ` Takashi Iwai
2024-10-21 8:38 ` Kailang
2024-10-21 8:56 ` Takashi Iwai
2024-10-21 8:59 ` Kailang
2024-10-25 1:22 ` Dean Matthew Menezes
2024-10-25 7:17 ` Takashi Iwai
2024-10-25 7:32 ` Kailang
2024-10-26 0:22 ` Dean Matthew Menezes
2024-11-08 2:58 ` Kailang
2024-11-11 6:57 ` Kailang
2024-11-12 3:17 ` Dean Matthew Menezes
2024-11-13 6:22 ` Kailang [this message]
2024-11-13 6:43 ` Takashi Iwai
2024-10-21 9:31 ` Kailang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ced4ebe356ad4e5796f059df8cdef3dd@realtek.com \
--to=kailang@realtek.com \
--cc=dean.menezes@utexas.edu \
--cc=gregkh@linuxfoundation.org \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--cc=regressions@lists.linux.dev \
--cc=stable@vger.kernel.org \
--cc=tiwai@suse.com \
--cc=tiwai@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.