clearlinux / distribution

Placeholder repository to allow filing of general bugs/issues/etc against the Clear Linux OS for Intel Architecture linux distribution
522 stars 29 forks source link

Add TAS 2781 drivers to Kernel (no sound through speakers on Lenovo Legion 7i) #2992

Open pmoolchand opened 1 year ago

pmoolchand commented 1 year ago

Hello,

No sound is coming through speakers on Lenovo Legion 7i 16IRX8. As per the discussion here, https://forums.lenovo.com/t5/Ubuntu/Ubuntu-and-legion-pro-7-16IRX8H-audio-issues/m-p/5210709?page=17#6119839, patches for the linux kernel have been developed, and available at https://neo-zeon.de/~hiryu/tas/

Could you please patch and integrate it in Clear Linux, kernel 6.5.9?

Firmware from the manufacturer, Texas Instruments, is available at https://www.ti.com/tool/download/TAS2781-LINUX/1.0.0

Thanks!

fenrus75 commented 1 year ago

Hi,

as a general rule we do not patch in new drivers into our kernels -- they are extreme maintenance cost for us, but also... the bar for such a driver to go into the upstream kernel as staging is super low ("it needs to compile")... and anything not ready for that is a quality and security risk for us

On Mon, Nov 6, 2023 at 12:08 AM pmoolchand @.***> wrote:

Hello,

No sound is coming through speakers on Lenovo Legion 7i 16IRX8. As per the discussion here, https://forums.lenovo.com/t5/Ubuntu/Ubuntu-and-legion-pro-7-16IRX8H-audio-issues/m-p/5210709?page=17#6119839, patches for the linux kernel have been developed, and available at https://neo-zeon.de/~hiryu/tas/

Could you please patch and integrate it in Clear Linux, kernel 6.5.9?

Firmware from the manufacturer, Texas Instruments, is available at https://www.ti.com/tool/download/TAS2781-LINUX/1.0.0

Thanks, Girish

— Reply to this email directly, view it on GitHub https://github.com/clearlinux/distribution/issues/2992, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJ54FKCNYHXSB6KEEZRW2LYDCLJVAVCNFSM6AAAAAA67CUDTCVHI2DSMVQWIX3LMV43ASLTON2WKOZRHE3TQNJTG4ZDGOA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

pmoolchand commented 12 months ago

Hi,

"If a kernel module is available as part of the Linux kernel source tree but not enabled in the Clear Linux OS kernels, in many cases the Clear Linux OS team will enable it upon request. "

The patch is already available in the official linux kernel archives.. E.g. both https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.5.10.tar.xz and https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.6.tar.xz already have

'sound/pci/hda/patch_realtek.c'

Wouldn't that count as 'having made it into the upstream kernel'?

Thanks!

fenrus75 commented 12 months ago

we ship the 6.5.latest kernels so yes that would could and we'd already be shipping it! (which then means this request is a bit strange in that something must be wrong, but the answer isn't patching in a driver, the answer needs to be finding which config option is not enabled)

On Wed, Nov 8, 2023 at 1:19 AM pmoolchand @.***> wrote:

Hi,

"If a kernel module is available as part of the Linux kernel source tree but not enabled in the Clear Linux OS kernels, in many cases the Clear Linux OS team will enable it upon request. "

The patch is already available in the official linux kernel archives.. E.g. both https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.5.10.tar.xz and https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.6.tar.xz already have

'sound/pci/hda/patch_realtek.c'

Wouldn't that count as 'having made it into the upstream kernel'?

Thanks!

— Reply to this email directly, view it on GitHub https://github.com/clearlinux/distribution/issues/2992#issuecomment-1801389381, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJ54FO4SN77NZFAGGHTXVLYDNFAPAVCNFSM6AAAAAA67CUDTCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMBRGM4DSMZYGE . You are receiving this because you commented.Message ID: @.***>

pmoolchand commented 12 months ago

I see. I do not have a working understanding of patching kernels.

I have run the script from Texas Instruments, that uses i2c tools. Relevant bus is 13. https://e2e.ti.com/support/audio-group/audio/f/audio-forum/1282089/tas2781-tas2781/4877653#4877653 Script at https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/6/8306.2pa_2D00_byps.sh My understanding is that it forces the speakers to power on. And I do get sound!

However, the procedure needs to be repeated at every boot.

Could you help with the config option? What I understand is that the speakers are on the IC on bus 13, at addresses 0x38 and 0x3f.

Thanks.