Comment 385 for bug 1958019

Revision history for this message
In , cam (cam-linux-kernel-bugs) wrote :

It seems everyone who's done this so far (including myself) had to
really work at getting Windows to use the correct driver for the device.
Likely, you'll have to do the same.

I had to go into the device manager and figure out how get things
working. I have some notes in this bug in what I had to do, others had
to do similar steps but not exactly the same.

Under my branch, I have notes on the steps I was able to use for the
2020 Legion:
https://github.com/thiagotei/linux-realtek-alc287/tree/cameron/lenovo-legion

Take a look at the "Getting sound working under Windows" section.

I haven't worked on my branch for a while because I'm waiting to repeat
this process again once I have my 2021 Legion. Unfortunately, I am
likely cancelling my 2021 Legion order soon as they've pushed the ship
date out to many months (*after* customer service confirmed I'd have it
in August or September) . I'm just waiting to hear back for confirmation
on the new shipping date from Lenovo's customer service.

On 7/26/21 10:09 AM, <email address hidden> wrote:
> https://bugzilla.kernel.org/show_bug.cgi?id=208555
>
> Marcus (kernel@m.vb1.nl) changed:
>
> What |Removed |Added
> ----------------------------------------------------------------------------
> CC| |kernel@m.vb1.nl
>
> --- Comment #371 from Marcus (kernel@m.vb1.nl) ---
> Some update on de Legion 7 16ACHg6 (AMD Ryzen 5000), I finally got the QEMU
> VM
> working, the IOMMU groups were really bad grouped for the sound card. But
> started and got the HDA verbs. But still no sound, in the VM is also no
> sound.
> The Cirrus Logic amplifier needs to be initialized on this board. Got the
> driver but the VM doesn't pick it up. After some searching in the drivers it
> seems that this chip is controlled by I2C/GPIO through ACPI.
>
> Decoded the DSDT table in ACPI and found the following:
> Scope (_SB.I2CD)
> {
> Device (SPKR)
> {
> Name (_HID, "CLSA0100") // _HID: Hardware ID
> Name (_UID, One) // _UID: Unique ID
> Method (_CRS, 0, NotSerialized) // _CRS: Current Resource
> Settings
> {
> Name (RBUF, ResourceTemplate ()
> {
> I2cSerialBusV2 (0x0040, ControllerInitiated, 0x000F4240,
> AddressingMode7Bit, "\\_SB.I2CD",
> 0x00, ResourceConsumer, , Exclusive,
> )
> I2cSerialBusV2 (0x0041, ControllerInitiated, 0x000F4240,
> AddressingMode7Bit, "\\_SB.I2CD",
> 0x00, ResourceConsumer, , Exclusive,
> )
> GpioIo (Exclusive, PullDown, 0x0000, 0x0000,
> IoRestrictionOutputOnly,
> "\\_SB.GPIO", 0x00, ResourceConsumer, ,
> )
> { // Pin list
> 0x0006
> }
> GpioIo (Shared, PullUp, 0x0064, 0x0000,
> IoRestrictionInputOnly,
> "\\_SB.GPIO", 0x00, ResourceConsumer, ,
> )
> { // Pin list
> 0x0054
> }
> GpioIo (Exclusive, PullUp, 0x0000, 0x0000,
> IoRestrictionInputOnly,
> "\\_SB.GPIO", 0x00, ResourceConsumer, ,
> )
> { // Pin list
> 0x0091
> }
> GpioInt (Edge, ActiveBoth, Shared, PullUp, 0x0064,
> "\\_SB.GPIO", 0x00, ResourceConsumer, ,
> )
> { // Pin list
> 0x0054
> }
> })
> Return (RBUF) /* \_SB_.I2CD.SPKR._CRS.RBUF */
> }
>
> Method (_STA, 0, NotSerialized) // _STA: Status
> {
> If ((MCSK == 0x04))
> {
> Return (0x0F)
> }
> Else
> {
> Return (Zero)
> }
> }
>
> Method (_DIS, 0, NotSerialized) // _DIS: Disable Device
> {
> }
> }
> }
>
>
> Is there anyone that can help me from here on? Now I've no idea what to do,
> how
> to set the GPIO pins of this device from linux, maybe that works. There are
> also some init sequences and blobs from the Cirrus Logic drivers. Or can this
> be debugged from Windows in any way?
>