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: Fri, 04 Oct 2024 11:30:22 +0200	[thread overview]
Message-ID: <8734lcmd01.wl-tiwai@suse.de> (raw)
In-Reply-To: <8292a0dccbdcfcaebfb04bd84aa240e6@tuxedo.de>

On Fri, 04 Oct 2024 11:25:32 +0200,
Christoffer Sandberg wrote:
> 
> 
> 
> On 4.10.2024 10:25, Takashi Iwai wrote:
> > On Fri, 04 Oct 2024 10:18:10 +0200,
> > Christoffer Sandberg wrote:
> >> 
> >> 
> >> 
> >> On 2.10.2024 23:28, Jerry Luo wrote:
> >> > On 10/2/24 10:00 AM, Takashi Iwai wrote:
> >> >> 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.
> >> 
> >> Interesting, you're right, PCI SSID c3/c5 and codec SSID c3/c5 for the
> >> Siriuses.
> >> 
> >> I had a look around. In patch_realtek there are some cases where codec
> >> SSID match is needed as well. Would it be better/safer to directly do
> >> this immediately or keep it as an exception where it breaks or for
> >> known sensitive models/brands?
> > 
> > It needs a better handling, yes.  OTOH, the driver became gigantic and
> > it's very tough to change the basic matching stuff.  That is, we can't
> > flip from PCI SSID to codec SSID out of sudden, as it'll break
> > certainly many other systems.
> > 
> > What I have in mind is to add an extra flag to the matching table to
> > indicate the codec SSID matching, something like:
> > 
> > --- a/sound/pci/hda/hda_local.h
> > +++ b/sound/pci/hda/hda_local.h
> > @@ -282,6 +282,7 @@ struct hda_fixup {
> >  	int type;
> >  	bool chained:1;		/* call the chained fixup(s) after this */
> >  	bool chained_before:1;	/* call the chained fixup(s) before this */
> > +	bool match_codec_ssid:1; /* match with codec SSID instead of
> > PCI SSID */
> >  	int chain_id;
> >  	union {
> >  		const struct hda_pintbl *pins;
> > 
> 
> Sounds reasonable to me. It would mean either-or then though.

Ah yes, it matches primarily with codec SSID instead of fallback.
I guess if this flag is set, we shouldn't check PCI SSID, though.

> > Although this will help in this case, many of existing code do check
> > codec ID in addition to PCI SSID, and this flag won't help for them as
> > is.
> 
> For the fixups where codec SSID is already known for all cases it
> would be possible to represent current logic with matching both SSIDs.
> 
> Otherwise I can not judge whether matching both PCI SSID and codec
> SSID at the same time would be needed.
> 
> In any case, your approach would reduce code size if this is a
> recurring thing.

OK, I'll try to prepare a cleanup patch later.


thanks,

Takashi

  reply	other threads:[~2024-10-04  9:29 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
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 [this message]
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=8734lcmd01.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