Comment 425 for bug 1958019

Revision history for this message
In , jakub.przystasz (jakub.przystasz-linux-kernel-bugs) wrote :

(In reply to Max from comment #397)
> Created attachment 298379 [details]
> little modification to the `linux-max.patch` to fix sound for Legion 7i,
> S740, Yoga 9i
>
> Beware of a misunderstanding. With patch 0.0.10 alias
> `linux-5.13-legion-yoga-14ITL5-sound-0.0.10-001.patch - correct patch` only
> the right speaker was working for me, the left one did not on the `Yoga 7
> 14ITL5`, which is how my model is called according to the back plate. It
> also has stickers on it, calling it a `YOGA 7i`.
>
> I restructured the patch code a little and there was this comment `set right
> speaker Yoga 7i.`, but that was not sitting in the middle of the code block:
> The code block for the left speaker was shorter, so that I compared line by
> line what was missing and finally copied the difference from the right
> speaker to the left. I compiled the kernel with that and tested it on my
> hardware and it works - on a Yoga 7i that is.
>
> The gist document from @sycxyc gives me a better understanding of what the
> code does and by the looks of it: `set the speaker` and `activate speaker`
> for both channels. But there are twopossibilities to `set the speaker` in
> the document and one is dedicated to the Yoga 7i only. Both possibilities
> are implemented in the patch in the same code block, so that changes for one
> model can influence another and I made a mistake, which could be a problem
> with other models: The attachment 298363 [details], line 8223 should have
> been `0x1a` instead of `0x2a` to select the correct speaker before
> activating a speaker.
>
> Attached is a patch called `linux-max-untested.patch` with the little change
> I mentioned. It should fix problem with other models and it should still
> work with the Yoga 7i. However it is untested, because I currently have no
> time to compile the kernel again.
>
> Have fun and good luck.

I've tested your patch on 15ITL5, at first try nothing happened after reboot.
To make it working on Yoga 7i 15ITl5 i had to add:
+ SND_PCI_QUIRK(0x17aa, 0x3853, "Lenovo Yoga 7 15ITL5", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS),