Linux Sound subsystem development
 help / color / mirror / Atom feed
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>
To: johannes.goede@oss.qualcomm.com, Ted Vera <tedvera@gmail.com>,
	linux-sound@vger.kernel.org, Yauhen Kharuzhy <jekhor@gmail.com>
Cc: regressions@lists.linux.dev, oder_chiou@realtek.com,
	lgirdwood@gmail.com, broonie@kernel.org,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Subject: Re: ASoC: rt5677: Do not apply Yoga Book ACPI GPIO mappings to Samus
Date: Tue, 17 Nov 2026 18:34:24 +0100	[thread overview]
Message-ID: <c0da379f-e10a-464d-b01a-d65e0e07e5e6@linux.dev> (raw)
In-Reply-To: <d5ece1f3-b70b-4c70-aa52-cd0d00253ea5@oss.qualcomm.com>

On 11/17/26 11:54, johannes.goede@oss.qualcomm.com wrote:
> Hi,
> 
> Note adding Yauhen the author of the troublesome commit to the To: list
> (why was this not done in the first place ?).
> 
> 
> On 16-Nov-26 22:24, Ted Vera wrote:
>> Summary:
>> On a Google Pixel 2 LS Chromebook (Samus, EVT2) running Fedora 45
>> kernel 7.3.3-300.fc45.x86_64, the RT5677 codec repeatedly fails probe
>> with Failed to request POW_LDO2: -517 (-EPROBE_DEFER). The codec
>> appears in devices_deferred, no RT5677 ALSA card is registered, and
>> only HDMI audio is available.
>>
>> The driver’s ACPI GPIO mapping added by commit 0cc00de3dd5b maps GPIO
>> resource indexes 0 and 1 to reset and pow-ldo2 for every ACPI RT5677
>> device. Samus’s DSDT uses those resources for codec GPIOs (jack detect
>> and mic-present), not Yoga Book-style external reset and power GPIOs.
>> The driver requests the mapped GPIOs before registering the codec’s
>> GPIO chip, which appears to cause the deferred-probe loop.
>>
>> Test and result:
>> I built a temporary module against the matching Fedora kernel source
>> that skips devm_acpi_dev_add_driver_gpios() on DMI board Samus. With
>> that module, the RT5677 device bound successfully, the bdw-rt5677 ALSA
>> card appeared, and laptop-speaker audio worked. Secure Boot remained
>> enabled. This strongly supports the ACPI GPIO mapping as the cause.
>>
>> Suggested fix: Restrict the mapping to devices whose ACPI GPIO
>> resource layout matches the Yoga Book, rather than applying it to
>> every RT5677 ACPI device.
> 
> Only adding the GPIO mappings (devm_acpi_dev_add_driver_gpios()) on
> a DMI match of the yogabook sounds good to me.
> 
> DMI strings can be taken from:
> 
> drivers/platform/x86/x86-android-tablets/dmi.c
> 
> Note there are both a X90F/L models which ship with Android and
> use a different BIOS, as well as X91F/L models which ship with
> Windows (same hw, different BIOS).
> 
> Yauhen, I guess the ACPI mappings where for the Windows X91 model,
> since on Android I expect the GPIO's to be hardcoded in the driver?
> 
> So the devm_acpi_dev_add_driver_gpios() should be only done
> if there is a DMI match for the X91F/L models, re-using
> the DMI match strings from:
> 
> drivers/platform/x86/x86-android-tablets/dmi.c
But the open is whether those GPIO mappings belong in the codec driver?
Back in 2017 (!) Andy moved the Samus mappings to the machine driver
bdw-rt5677, why not add those YogaBook mappings to the cht_rt5677
machine driver?

Looks like the addition of those mappings for the YogaBook didn't follow
the Samus precedent, now we have two different ways of doing the same
thing even though the codec is the same...

  reply	other threads:[~2026-11-17 17:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-16 21:24 ASoC: rt5677: Do not apply Yoga Book ACPI GPIO mappings to Samus Ted Vera
2026-11-17  8:11 ` Pierre-Louis Bossart
2026-11-17 14:48   ` Ted Vera
2026-11-17 10:54 ` johannes.goede
2026-11-17 17:34   ` Pierre-Louis Bossart [this message]
2026-11-17 20:08     ` Yauhen Kharuzhy
2026-11-17 23:39     ` Mark Brown

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=c0da379f-e10a-464d-b01a-d65e0e07e5e6@linux.dev \
    --to=pierre-louis.bossart@linux.dev \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=broonie@kernel.org \
    --cc=jekhor@gmail.com \
    --cc=johannes.goede@oss.qualcomm.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-sound@vger.kernel.org \
    --cc=oder_chiou@realtek.com \
    --cc=regressions@lists.linux.dev \
    --cc=tedvera@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