public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Christoffer Sandberg <cs@tuxedo.de>
Cc: Takashi Iwai <tiwai@suse.de>, Jerry Luo <jerryluo225@gmail.com>,
	christian@heusel.eu, linux-kernel@vger.kernel.org,
	linux-sound@vger.kernel.org, perex@perex.cz,
	regressions@lists.linux.dev, wse@tuxedocomputers.com
Subject: Re: [REGRESSION][BISECTED] Audio volume issues since 4178d78cd7a8
Date: Wed, 02 Oct 2024 16:00:10 +0200	[thread overview]
Message-ID: <87seteli51.wl-tiwai@suse.de> (raw)
In-Reply-To: <b38b5947482a5ca4b55e0ddb908c2f34@tuxedo.de>

[-- Attachment #1: Type: text/plain, Size: 1776 bytes --]

On Wed, 02 Oct 2024 10:21:22 +0200,
Christoffer Sandberg wrote:
> 
> 
> 
> On 30.9.2024 09:44, Takashi Iwai wrote:
> > On Mon, 23 Sep 2024 21:37:42 +0200,
> > Jerry Luo wrote:
> >> 
> >> 
> >> Hi Takashi,
> >> 
> >> On Mon, 16 Sep 2024 19:22:05 +0200,
> >> 
> >> Takashi Iwai wrote:
> >> 
> >>     Could you give alsa-info.sh output from both working and
> >> non-working
> >>     cases?  Run the script with --no-upload option and attach the
> >> outputs.
> >> 
> >>     thanks,
> >> 
> >>     Takashi
> >> 
> >> Issue now reappear, output from alsa-info.sh are attached. If they
> >> are still
> >> needed.
> > 
> > Thanks.  The obvious difference seems to be the assignment of two DACs
> > 0x10 and 0x11 for headphone and speaker outputs.
> > 
> > Christoffer, how are those on your machines?
> 
> I attached alsa-info from the Sirius Gen2 device.
> 
> Comparing the working/nonworking of Jerry, yeah, the assignment of
> 0x10 and 0x11 looks switched around. I don't see what difference this
> would make. Also, node 0x22 has "bass speaker" controls in the
> non-working version.
> 
> Comparing the Sirius Gen2 alsa-info with Jerrys, to me it looks like
> the non-working version corresponds to our working version.
> 
> I would expect the non-working version to happen all the time though
> with regards to the "bass speaker" controls. Why would this only
> happen sometimes?

Thanks!  The assignment of DACs depend on the pins and topology, so it
can be a bit sensitive.

Now looking more closely at both outputs, I wonder how the commit
breaks pang14.  Maybe it has a PCI SSID 2782:12c5 (or 12c3) while the
codec SSID is 2782:12b3?  If so, the patch below should fix.

Could you guys try it and verify whether it fixes for Pangolin and
doesn't break Sirius?


Takashi



[-- Attachment #2: 0001-ALSA-hda-conexant-Fix-conflicting-quirk-for-System76.patch --]
[-- Type: application/octet-stream, Size: 2314 bytes --]

From d2323f9fce4a65639a7484accce8f500ca7186f0 Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Wed, 2 Oct 2024 15:51:56 +0200
Subject: [PATCH] ALSA: hda/conexant: Fix conflicting quirk for System76
 Pangolin

We received a regression report for System76 Pangolin (pang14) due to
the recent fix for Tuxedo Sirius devices to support the top speaker.
The reason was the conflicting PCI SSID, as often seen.

As a workaround, now the codec SSID is checked and the quirk is
applied conditionally only to Sirius devices.

Fixes: 4178d78cd7a8 ("ALSA: hda/conexant: Add pincfg quirk to enable top speakers on Sirius devices")
Reported-by: Christian Heusel <christian@heusel.eu>
Reported-by: Jerry <jerryluo225@gmail.com>
Closes: https://lore.kernel.org/c930b6a6-64e5-498f-b65a-1cd5e0a1d733@heusel.eu
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 sound/pci/hda/patch_conexant.c | 24 +++++++++++++++++++-----
 1 file changed, 19 insertions(+), 5 deletions(-)

diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c
index ade42a8209c2..b61ce5e6f5ec 100644
--- a/sound/pci/hda/patch_conexant.c
+++ b/sound/pci/hda/patch_conexant.c
@@ -816,6 +816,23 @@ static const struct hda_pintbl cxt_pincfg_sws_js201d[] = {
 	{}
 };
 
+/* pincfg quirk for Tuxedo Sirius;
+ * unfortunately the (PCI) SSID conflicts with System76 Pangolin pang14,
+ * which has incompatible pin setup, so we check the codec SSID (luckily
+ * different one!) and conditionally apply the quirk here
+ */
+static void cxt_fixup_sirius_top_speaker(struct hda_codec *codec,
+					 const struct hda_fixup *fix,
+					 int action)
+{
+	/* ignore for incorrectly picked-up pang14 */
+	if (codec->core.subsystem_id == 0x278212b3)
+		return;
+	/* set up the top speaker pin */
+	if (action == HDA_FIXUP_ACT_PRE_PROBE)
+		snd_hda_codec_set_pincfg(codec, 0x1d, 0x82170111);
+}
+
 static const struct hda_fixup cxt_fixups[] = {
 	[CXT_PINCFG_LENOVO_X200] = {
 		.type = HDA_FIXUP_PINS,
@@ -976,11 +993,8 @@ static const struct hda_fixup cxt_fixups[] = {
 		.v.pins = cxt_pincfg_sws_js201d,
 	},
 	[CXT_PINCFG_TOP_SPEAKER] = {
-		.type = HDA_FIXUP_PINS,
-		.v.pins = (const struct hda_pintbl[]) {
-			{ 0x1d, 0x82170111 },
-			{ }
-		},
+		.type = HDA_FIXUP_FUNC,
+		.v.func = cxt_fixup_sirius_top_speaker,
 	},
 };
 
-- 
2.43.0


  reply	other threads:[~2024-10-02 13:59 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-16 16:39 [REGRESSION][BISECTED] Audio volume issues since 4178d78cd7a8 Christian Heusel
2024-09-16 17:22 ` Takashi Iwai
2024-09-16 19:36   ` Jerry Luo
2024-09-17  9:50     ` Christoffer Sandberg
2024-09-17 21:16       ` Jerry Luo
2024-09-18  8:06         ` Takashi Iwai
2024-09-18  8:09           ` Takashi Iwai
2024-09-18 13:39             ` Werner Sembach
2024-09-18 13:49               ` Takashi Iwai
2024-09-18 14:10                 ` Christoffer Sandberg
2024-09-19  8:57                   ` Takashi Iwai
2024-09-19  9:45                     ` Werner Sembach
2024-09-23 19:37   ` Jerry Luo
2024-09-30  7:44     ` Takashi Iwai
2024-10-02  8:21       ` Christoffer Sandberg
2024-10-02 14:00         ` Takashi Iwai [this message]
2024-10-02 21:28           ` Jerry Luo
2024-10-02 22:36             ` Jerry Luo
2024-10-04  8:18             ` Christoffer Sandberg
2024-10-04  8:25               ` Takashi Iwai
2024-10-04  9:25                 ` Christoffer Sandberg
2024-10-04  9:30                   ` Takashi Iwai
2024-10-08 16:06                     ` 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=87seteli51.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=christian@heusel.eu \
    --cc=cs@tuxedo.de \
    --cc=jerryluo225@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=regressions@lists.linux.dev \
    --cc=wse@tuxedocomputers.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