Linux Sound subsystem development
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: "René Rebe" <rene@exactco.de>
Cc: linux-sound@vger.kernel.org, Takashi Iwai <tiwai@suse.com>,
	Kailang Yang <kailang@realtek.com>
Subject: Re: [PATCH] fixup realtek/alc288 headphone for MS Surface 2, 3 and
Date: Mon, 17 Nov 2025 17:20:03 +0100	[thread overview]
Message-ID: <87ikf8fx70.wl-tiwai@suse.de> (raw)
In-Reply-To: <20251116.162633.1272923634893984527.rene@exactco.de>

On Sun, 16 Nov 2025 16:26:33 +0100,
René Rebe wrote:
> 
> The Surface Pro 2 and 3 have a strage frequency response and miss most
> of the bass. I discovered connecting the HP out to the main DAC fixes
> this.  Maybe the other is mono or whatever strangely mixed signal for
> the built-in speakers?
> 
> I later noticed the Lenovo Ideapad 720S (AMD) exhibited the same
> problem, so this may be a more wide-spread general bug w/ Realtek
> codecs and the hda_auto_parser, ...

Usually in a case like this, we provide a fixed wiring by a static DAC
table, or do some other tricks instead of directly writing a verb.

Could you give the alsa-info.sh outputs from those?


thanks,

Takashi


> 
> Signed-off-by: René Rebe <rene@exactco.de>
> 
> diff --git a/sound/hda/codecs/realtek/alc269.c b/sound/hda/codecs/realtek/alc269.c
> index 4aec5067c59d..81ac86b65796 100644
> --- a/sound/hda/codecs/realtek/alc269.c
> +++ b/sound/hda/codecs/realtek/alc269.c
> @@ -2259,6 +2259,17 @@ static void alc282_fixup_asus_tx300(struct hda_codec *codec,
>  	}
>  }
>  
> +static void alc288_fixup_headset(struct hda_codec *codec,
> +				 const struct hda_fixup *fix, int action)
> +{
> +	if (action == HDA_FIXUP_ACT_INIT) {
> +		/* Surface Pro? */
> +		int nid = codec->core.vendor_id == 0x10ec0280 ? 0x15 : 0x21;
> +		/* DAC node 0x0c is giving low bass output, reverse default order. */
> +		snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_CONNECT_SEL, 1);
> +	}
> +}
> +
>  static void alc290_fixup_mono_speakers(struct hda_codec *codec,
>  				       const struct hda_fixup *fix, int action)
>  {
> @@ -3483,6 +3495,7 @@ enum {
>  	ALC283_FIXUP_SENSE_COMBO_JACK,
>  	ALC282_FIXUP_ASUS_TX300,
>  	ALC283_FIXUP_INT_MIC,
> +	ALC288_FIXUP_HEADSET,
>  	ALC290_FIXUP_MONO_SPEAKERS,
>  	ALC290_FIXUP_MONO_SPEAKERS_HSJACK,
>  	ALC290_FIXUP_SUBWOOFER,
> @@ -4245,6 +4258,10 @@ static const struct hda_fixup alc269_fixups[] = {
>  		.chained = true,
>  		.chain_id = ALC269_FIXUP_LIMIT_INT_MIC_BOOST
>  	},
> +	[ALC288_FIXUP_HEADSET] = {
> +		.type = HDA_FIXUP_FUNC,
> +		.v.func = alc288_fixup_headset,
> +	},
>  	[ALC290_FIXUP_SUBWOOFER_HSJACK] = {
>  		.type = HDA_FIXUP_PINS,
>  		.v.pins = (const struct hda_pintbl[]) {
> @@ -6872,6 +6889,7 @@ static const struct hda_quirk alc269_fixup_tbl[] = {
>  	SND_PCI_QUIRK(0x10ec, 0x12cc, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK),
>  	SND_PCI_QUIRK(0x10ec, 0x12f6, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK),
>  	SND_PCI_QUIRK(0x10f7, 0x8338, "Panasonic CF-SZ6", ALC269_FIXUP_ASPIRE_HEADSET_MIC),
> +	SND_PCI_QUIRK(0x1414, 0x9c20, "Microsoft Surface Pro 2/3", ALC288_FIXUP_HEADSET),
>  	SND_PCI_QUIRK(0x144d, 0xc109, "Samsung Ativ book 9 (NP900X3G)", ALC269_FIXUP_INV_DMIC),
>  	SND_PCI_QUIRK(0x144d, 0xc169, "Samsung Notebook 9 Pen (NP930SBE-K01US)", ALC298_FIXUP_SAMSUNG_AMP),
>  	SND_PCI_QUIRK(0x144d, 0xc176, "Samsung Notebook 9 Pro (NP930MBE-K04US)", ALC298_FIXUP_SAMSUNG_AMP),
> @@ -7053,6 +7071,7 @@ static const struct hda_quirk alc269_fixup_tbl[] = {
>  	SND_PCI_QUIRK(0x17aa, 0x3801, "Lenovo Yoga9 14IAP7", ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN),
>  	HDA_CODEC_QUIRK(0x17aa, 0x3802, "DuetITL 2021", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS),
>  	SND_PCI_QUIRK(0x17aa, 0x3802, "Lenovo Yoga Pro 9 14IRP8", ALC287_FIXUP_TAS2781_I2C),
> +	SND_PCI_QUIRK(0x17aa, 0x3812, "Lenovo Ideapad 720S", ALC288_FIXUP_HEADSET),
>  	SND_PCI_QUIRK(0x17aa, 0x3813, "Legion 7i 15IMHG05", ALC287_FIXUP_LEGION_15IMHG05_SPEAKERS),
>  	SND_PCI_QUIRK(0x17aa, 0x3818, "Lenovo C940 / Yoga Duet 7", ALC298_FIXUP_LENOVO_C940_DUET7),
>  	SND_PCI_QUIRK(0x17aa, 0x3819, "Lenovo 13s Gen2 ITL", ALC287_FIXUP_13S_GEN2_SPEAKERS),
> 
> -- 
>   René Rebe, ExactCODE GmbH, Berlin, Germany
>   https://exactco.de | https://t2linux.com | https://rene.rebe.de

  reply	other threads:[~2025-11-17 16:20 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-16 15:26 [PATCH] fixup realtek/alc288 headphone for MS Surface 2, 3 and René Rebe
2025-11-17 16:20 ` Takashi Iwai [this message]
2025-11-17 20:07   ` René Rebe
2025-11-19 15:13     ` Takashi Iwai
2025-11-19 15:44       ` Takashi Iwai
2025-11-19 17:17         ` René Rebe
2025-11-20  6:52           ` Takashi Iwai

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=87ikf8fx70.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=kailang@realtek.com \
    --cc=linux-sound@vger.kernel.org \
    --cc=rene@exactco.de \
    --cc=tiwai@suse.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox