Linux Sound subsystem development
 help / color / mirror / Atom feed
* [PATCH v3] ALSA: hda/realtek: Fix woofer bass on Dell Inspiron 16 7640 2-in-1
@ 2026-12-06 12:03 Phil McSwiggan via B4 Relay
  2026-12-06 12:23 ` sashiko-bot
  0 siblings, 1 reply; 2+ messages in thread
From: Phil McSwiggan via B4 Relay @ 2026-12-06 12:03 UTC (permalink / raw)
  To: Jaroslav Kysela, Takashi Iwai
  Cc: linux-sound, linux-kernel, stable, Phil McSwiggan

From: Phil McSwiggan <GitMcSwig@gmail.com>

The Dell Inspiron 16 7640 2-in-1 (SSID 1028:0c96) drives its woofers
from pin 0x17 through two TAS2781 amps, next to the main speakers on
pin 0x14. ALC295_FIXUP_DELL_TAS2781_I2C chains to ALC289_FIXUP_DUAL_SPK,
which ties pin 0x17 to DAC 0x02 together with pin 0x14. The woofers
play, but with all four speakers active the bass between roughly 130
and 200 Hz is clearly weaker than with pin 0x17 fed from DAC 0x03. With
the main speakers muted both routings sound the same, so the two paths
presumably partly cancel when they share DAC 0x02.

Add a fixup that keeps the TAS2781 binding, puts the main speakers and
the headphone on DAC 0x02 and the woofers on DAC 0x03, and orders the
speaker pins so the controls come out as "Speaker" and "Bass Speaker".
Also replace the "Dell Polaris 2in1" codename with the model name.

Tested on 7.3.6 with level-matched tone sweeps (woofers alone and all
four speakers, in both orders) and a blind, randomized A/B of the two
routings, where the new one was picked as fuller in 10 of 10 rounds.
Speakers, volume, mute and headphones with speaker auto-mute work.

The issue was investigated and this patch drafted with the help of an
AI coding assistant (Claude).

Fixes: ec8f26092e52 ("ALSA: hda/realtek: Add ALC295 Dell TAS2781 I2C fixup")
Cc: stable@vger.kernel.org
Signed-off-by: Phil McSwiggan <GitMcSwig@gmail.com>
---
Tested only with PipeWire and the UCM HDA profile; setups without UCM
are untested. 1028:0c94 ("Dell Polaris 3 metal") uses the same original
fixup and may be affected too, but I have no way to test it.
---
Changes in v3:
- Fix the comment above alc295_fixup_dell_tas2781_bass_spk(), which
  still said the woofers only get audio from DAC 0x03 (Sashiko review).
- Link to v2: https://lore.kernel.org/r/20261205-dell-7640-woofers-v2-1-0b6e8b61b71b@gmail.com

Changes in v2:
- v1 said the woofers stay silent with the current routing. That was
  wrong: my early tests used tones below the woofers' range. They play,
  but lose bass when they share DAC 0x02 with the main speakers; the
  commit message now describes what was actually tested.
- Use a dedicated fixup with pin 0x14 as the primary speaker instead of
  reusing ALC295_FIXUP_DELL_INSPIRON_TOP_SPEAKERS, as suggested by the
  Sashiko review. The headphone now shares the primary DAC and the
  woofers show up as "Bass Speaker".
- Drop the no_shutup setting that came with the reused fixup.
- Use my real name.
- Link to v1: https://lore.kernel.org/r/20261204-dell-7640-woofers-v1-1-4366d1074041@gmail.com
---
 sound/hda/codecs/realtek/alc269.c | 45 ++++++++++++++++++++++++++++++++++++++-
 1 file changed, 44 insertions(+), 1 deletion(-)

diff --git a/sound/hda/codecs/realtek/alc269.c b/sound/hda/codecs/realtek/alc269.c
index a4b433387..ad5a0305f 100644
--- a/sound/hda/codecs/realtek/alc269.c
+++ b/sound/hda/codecs/realtek/alc269.c
@@ -3952,6 +3952,35 @@ static void alc295_fixup_dell_inspiron_top_speakers(struct hda_codec *codec,
 	}
 }
 
+/*
+ * Main speakers on NID 0x14 share DAC 0x02 with the headphone. The woofers
+ * behind the TAS2781 amps on NID 0x17 go on DAC 0x03, as sharing DAC 0x02
+ * with NID 0x14 loses bass.
+ */
+static void alc295_fixup_dell_tas2781_bass_spk(struct hda_codec *codec,
+					       const struct hda_fixup *fix, int action)
+{
+	static const struct hda_pintbl pincfgs[] = {
+		{ 0x14, 0x90170150 }, /* speaker */
+		{ 0x17, 0x90170151 }, /* bass speaker */
+		{ }
+	};
+	static const hda_nid_t conn[] = { 0x02, 0x03 };
+	static const hda_nid_t preferred_pairs[] = {
+		0x14, 0x02,
+		0x17, 0x03,
+		0x21, 0x02,
+		0
+	};
+	struct alc_spec *spec = codec->spec;
+
+	if (action == HDA_FIXUP_ACT_PRE_PROBE) {
+		snd_hda_apply_pincfgs(codec, pincfgs);
+		snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn);
+		spec->gen.preferred_dacs = preferred_pairs;
+	}
+}
+
 /* Forcibly assign NID 0x03 to HP while NID 0x02 to SPK */
 static void alc287_fixup_bind_dacs(struct hda_codec *codec,
 				    const struct hda_fixup *fix, int action)
@@ -4594,6 +4623,8 @@ enum {
 	ALC287_FIXUP_ASUS_ALLY_X_SPEAKER,
 	ALC287_FIXUP_ASUS_ALLY_X_I2C,
 	ALC295_FIXUP_DELL_TAS2781_I2C,
+	ALC295_FIXUP_DELL_TAS2781_BASS_SPK,
+	ALC295_FIXUP_DELL_TAS2781_I2C_BASS_SPK,
 	ALC245_FIXUP_TAS2781_SPI_2,
 	ALC287_FIXUP_TXNW2781_I2C,
 	ALC287_FIXUP_TXNW2781_I2C_ASUS,
@@ -6312,6 +6343,18 @@ static const struct hda_fixup alc269_fixups[] = {
 		.chained = true,
 		.chain_id = ALC289_FIXUP_DUAL_SPK
 	},
+	[ALC295_FIXUP_DELL_TAS2781_BASS_SPK] = {
+		.type = HDA_FIXUP_FUNC,
+		.v.func = alc295_fixup_dell_tas2781_bass_spk,
+		.chained = true,
+		.chain_id = ALC269_FIXUP_DELL4_MIC_NO_PRESENCE
+	},
+	[ALC295_FIXUP_DELL_TAS2781_I2C_BASS_SPK] = {
+		.type = HDA_FIXUP_FUNC,
+		.v.func = tas2781_fixup_tias_i2c,
+		.chained = true,
+		.chain_id = ALC295_FIXUP_DELL_TAS2781_BASS_SPK
+	},
 	[ALC294_FIXUP_ASUS_GU502_PINS] = {
 		.type = HDA_FIXUP_PINS,
 		.v.pins = (const struct hda_pintbl[]) {
@@ -7769,7 +7812,7 @@ static const struct hda_quirk alc269_fixup_tbl[] = {
 	SND_PCI_QUIRK(0x1028, 0x0c4d, "Dell", ALC287_FIXUP_CS35L41_I2C_4),
 	SND_PCI_QUIRK(0x1028, 0x0c90, "Alienware x16 R2", ALC289_FIXUP_DUAL_SPK),
 	SND_PCI_QUIRK(0x1028, 0x0c94, "Dell Polaris 3 metal", ALC295_FIXUP_DELL_TAS2781_I2C),
-	SND_PCI_QUIRK(0x1028, 0x0c96, "Dell Polaris 2in1", ALC295_FIXUP_DELL_TAS2781_I2C),
+	SND_PCI_QUIRK(0x1028, 0x0c96, "Dell Inspiron 16 7640 2-in-1", ALC295_FIXUP_DELL_TAS2781_I2C_BASS_SPK),
 	SND_PCI_QUIRK(0x1028, 0x0cbd, "Dell Oasis 13 CS MTL-U", ALC289_FIXUP_DELL_CS35L41_SPI_2),
 	SND_PCI_QUIRK(0x1028, 0x0cbe, "Dell Oasis 13 2-IN-1 MTL-U", ALC289_FIXUP_DELL_CS35L41_SPI_2),
 	SND_PCI_QUIRK(0x1028, 0x0cbf, "Dell Oasis 13 Low Weight MTU-L", ALC289_FIXUP_DELL_CS35L41_SPI_2),

---
base-commit: 9cef9067672e1bdd71b397264d03515ffed099f7
change-id: 20261204-dell-7640-woofers-13ab412c7cb7

Best regards,
-- 
Phil McSwiggan <GitMcSwig@gmail.com>



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v3] ALSA: hda/realtek: Fix woofer bass on Dell Inspiron 16 7640 2-in-1
  2026-12-06 12:03 [PATCH v3] ALSA: hda/realtek: Fix woofer bass on Dell Inspiron 16 7640 2-in-1 Phil McSwiggan via B4 Relay
@ 2026-12-06 12:23 ` sashiko-bot
  0 siblings, 0 replies; 2+ messages in thread
From: sashiko-bot @ 2026-12-06 12:23 UTC (permalink / raw)
  To: Phil McSwiggan; +Cc: linux-sound

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] ALSA: hda/realtek: unrenamed shared-DAC Front volume in Dell
  7640 fixup
--

commit 7bfe6345fa59f0e634b2c7c0f608c06eccd40c24
Author: Phil McSwiggan <GitMcSwig@gmail.com>

ALSA: hda/realtek: Fix woofer bass on Dell Inspiron 16 7640 2-in-1

This commit adds a new fixup for the Dell Inspiron 16 7640 2-in-1 that
assigns the main speakers (0x14) and headphones (0x21) to DAC 0x02 and
the TAS2781 woofers (0x17) to DAC 0x03.

> diff --git a/sound/hda/codecs/realtek/alc269.c b/sound/hda/codecs/realtek/alc269.c
> index a4b4333878896..ad5a0305f0336 100644
> --- a/sound/hda/codecs/realtek/alc269.c
> +++ b/sound/hda/codecs/realtek/alc269.c
> @@ -3952,6 +3952,35 @@ static void alc295_fixup_dell_inspiron_top_speakers(struct hda_codec *codec,
>  	}
>  }
>  
> +/*
> + * Main speakers on NID 0x14 share DAC 0x02 with the headphone. The woofers
> + * behind the TAS2781 amps on NID 0x17 go on DAC 0x03, as sharing DAC 0x02
> + * with NID 0x14 loses bass.
> + */
> +static void alc295_fixup_dell_tas2781_bass_spk(struct hda_codec *codec,
> +					       const struct hda_fixup *fix, int action)
> +{
> +	static const struct hda_pintbl pincfgs[] = {
> +		{ 0x14, 0x90170150 }, /* speaker */
> +		{ 0x17, 0x90170151 }, /* bass speaker */
> +		{ }
> +	};
> +	static const hda_nid_t conn[] = { 0x02, 0x03 };
> +	static const hda_nid_t preferred_pairs[] = {
> +		0x14, 0x02,
> +		0x17, 0x03,
> +		0x21, 0x02,
> +		0
> +	};
> +	struct alc_spec *spec = codec->spec;
> +
> +	if (action == HDA_FIXUP_ACT_PRE_PROBE) {
> +		snd_hda_apply_pincfgs(codec, pincfgs);
> +		snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn);
> +		spec->gen.preferred_dacs = preferred_pairs;
> +	}
> +}

[Severity: Medium]
Does sharing DAC 0x02 between the main speakers (0x14) and headphones
(0x21) without renaming the generated volume controls break headphone
playback on non-UCM setups?

Because hp_paths[0] shares DAC 0x02 with out_paths[0] and gets no volume
control of its own, get_line_out_pfx() in sound/hda/codecs/generic.c
falls back from "Speaker" to "Front".  The resulting volume controls are
"Front Playback Volume" and "Bass Speaker Playback Volume", not
"Speaker" and "Bass Speaker" as stated in the commit message.

PulseAudio and non-UCM PipeWire ACP treat "Front Playback Volume" as a
speaker/line-out control and mute or zero it when switching to
headphones, silencing headphone output.

Handling HDA_FIXUP_ACT_BUILD with rename_ctl() to rename "Front Playback
Volume" to "DAC1 Playback Volume" and "Bass Speaker Playback Volume" to
"DAC2 Playback Volume", as alc285_fixup_thinkpad_x1_gen7() does, keeps
non-UCM mixers on Master Playback Volume instead.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261206-dell-7640-woofers-v3-1-dc3629986aba@gmail.com?part=1

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-12-06 12:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-06 12:03 [PATCH v3] ALSA: hda/realtek: Fix woofer bass on Dell Inspiron 16 7640 2-in-1 Phil McSwiggan via B4 Relay
2026-12-06 12:23 ` sashiko-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox