public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Armas Spann <armas@codux.tech>
To: Luke Jones <luke@ljones.dev>,
	Stuart Henderson <stuarth@opensource.cirrus.com>,
	Takashi Iwai <tiwai@suse.de>
Cc: linux-kernel@vger.kernel.org, tiwai@suse.com,
	sbinding@opensource.cirrus.com, perex@perex.cz,
	tangmeng@uniontech.com, andy.chi@canonical.com,
	p.jungkamp@gmx.net, kasper93@gmail.com, yangyuchi66@gmail.com,
	ealex95@gmail.com, james.schulman@cirrus.com,
	david.rhodes@cirrus.com, tanureal@opensource.cirrus.com,
	rf@opensource.cirrus.com, patches@opensource.cirrus.com,
	alsa-devel@alsa-project.org
Subject: Re: CSC3551 and devices missing related _DSD bits
Date: Sun, 28 May 2023 02:02:46 +0200	[thread overview]
Message-ID: <12102f7419c5e44cd2133aa769e25dbd16f4e0c9.camel@codux.tech> (raw)
In-Reply-To: <19d69a5da8f1d4017ac14ed87f927ab82278073d.camel@ljones.dev>

Hi Takashi, Hi Stuart (and of course, all others in here),

would you mind to evaluate this small (pseudo-)patch to be harmless? 
(concerning the blow-up theory the first answer in this converstion)

I won't push it upstream right now but I want to know if this patch
might be harmfull. I'm owning a GA402XY myself and we digged out that
the initial setting of the cr3551 can be done via:

diff --git a/sound/pci/hda/cs35l41_hda.c b/sound/pci/hda/cs35l41_hda.c
index 75020edd39e7..eaa06751bd48 100644
--- a/sound/pci/hda/cs35l41_hda.c
+++ b/sound/pci/hda/cs35l41_hda.c
@@ -1243,6 +1243,12 @@ static int cs35l41_no_acpi_dsd(struct
cs35l41_hda *cs35l41, struct device *physd
 		hw_cfg->bst_type = CS35L41_EXT_BOOST;
 		hw_cfg->gpio1.func = CS35l41_VSPK_SWITCH;
 		hw_cfg->gpio1.valid = true;
+	} else if (strncmp(hid, "CSC3551", 7) == 0 && strcmp(cs35l41-
>acpi_subsystem_id, "10431463") == 0) {
+		// TESTING - (Hook for GA402X)
+		dev_warn(cs35l41->dev, "Warning: ASUS didn't provide
the needed ACPI _DSD properties for GA402X series, using defaults..");
+		hw_cfg->bst_type = CS35L41_EXT_BOOST;
+		hw_cfg->gpio1.func = CS35l41_VSPK_SWITCH;
+		hw_cfg->gpio1.valid = true;
 	} else {
 		/*
 		 * Note: CLSA010(0/1) are special cases which use a
slightly different design.

--

Which for our devices(GA402XY) enables the DAC to be used (it's still
quiet, as we don't know/set the right limits for boost/ind/cap at the
moment).

The above will be called in our HDA_Quirk
(sound/pci/hda/patch_realtek.c)

```pseudo
	[ALC285_FIXUP_ASUS_GA402XY] = {
		.type = HDA_FIXUP_FUNC,
		.v.func = cs35l41_fixup_i2c_two,
		// ....
	},
```

The cs3551 init be loaded by the above quirk wich is bound to and
checks its ID internally again(acpi_subsystem_id):

```pseudo
SND_PCI_QUIRK(0x1043, 0x1463, "Asus Zephyrus G14 2023",
ALC285_FIXUP_ASUS_GA402XY),
```


Many thanks in advance!

Best regards
Armas


On Thu, 2023-05-25 at 09:30 +1200, Luke Jones wrote:
> On Wed, 2023-05-24 at 17:36 +0100, Stuart Henderson wrote:
> > 
> > > The problem is that this can really easily blow up your machine
> > > if
> > > some incorrect bit is applied.  And more easily applicable, more
> > > chance to break by novice users, simply by believing what a chat
> > > bot
> > > speaks :)
> > > That's the very reason why this kind of change should be via ACPI
> > > table officially set up by the vendor.  That said, the question
> > > is
> > > only who and how can be responsible for this kind of change. 
> > > It's
> > > no technical issue, per se.
> > > 
> > > If BIOS can't be updated, at least, the configuration change has
> > > to
> > > be
> > > confirmed by ASUS people.  If ASUS still ignores the inquires and
> > > requests, we may put the quirk but with a bit fat warning (and
> > > maybe
> > > complaints to ASUS) to be shown in the log as a very last resort.
> > > 
> > > Let's see what happens.
> > 
> > Thanks Takashi.
> > 
> > Just a note to say we're not ignoring this and are investigating
> > the 
> > best way to support released laptops with ACPI incompatible with
> > Linux.  
> > We're hoping this is going to be less of an issue going forward. 
> > Please 
> > bear with us while we look into this.
> > 
> 
> This is great news, thank you Stuart. If you need testing done at all
> on a wide range please reach out to me and I will enlist the help of
> those with the affected laptops I mentioned.

  reply	other threads:[~2023-05-28  0:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-18 22:26 CSC3551 and devices missing related _DSD bits Luke Jones
2023-05-20  8:14 ` Takashi Iwai
2023-05-21 21:35   ` Luke Jones
2023-05-24 16:36   ` Stuart Henderson
2023-05-24 18:08     ` Takashi Iwai
2023-05-24 21:30     ` Luke Jones
2023-05-28  0:02       ` Armas Spann [this message]
2023-06-01  9:42         ` Stuart Henderson

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=12102f7419c5e44cd2133aa769e25dbd16f4e0c9.camel@codux.tech \
    --to=armas@codux.tech \
    --cc=alsa-devel@alsa-project.org \
    --cc=andy.chi@canonical.com \
    --cc=david.rhodes@cirrus.com \
    --cc=ealex95@gmail.com \
    --cc=james.schulman@cirrus.com \
    --cc=kasper93@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luke@ljones.dev \
    --cc=p.jungkamp@gmx.net \
    --cc=patches@opensource.cirrus.com \
    --cc=perex@perex.cz \
    --cc=rf@opensource.cirrus.com \
    --cc=sbinding@opensource.cirrus.com \
    --cc=stuarth@opensource.cirrus.com \
    --cc=tangmeng@uniontech.com \
    --cc=tanureal@opensource.cirrus.com \
    --cc=tiwai@suse.com \
    --cc=tiwai@suse.de \
    --cc=yangyuchi66@gmail.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