Coder Social home page Coder Social logo

yoga-slim-7's Introduction

Info

from dmidecode

System Information
	Manufacturer: LENOVO
	Product Name: 83AA
	Version: YogaAir 14s APU8
	Wake-up Type: Power Switch
	SKU Number: LENOVO_MT_83AA_BU_idea_FM_YogaAir 14s APU8
	Family: YogaAir 14s APU8
cat /sys/class/sound/hwC1D0/subsystem_id 
0x17aa38bb

Sound

It uses TI 2781 for the subwoofer speakers. The support is in kernel 6.6+. The driver's design has two flaws that makes the runtime PM not work very well. On each runtime suspend, the driver resets the current program and upon resume it reloads all of the DSP's firmware. The firmware (/lib/firmware/TIAS2781RCA4.bin) supplied is also flawed as it does hardware resets (instead of software ones) each time the play pauses. This causes the DSP to shutdown. So on play resume, all the FW (/lib/firmware/TAS2XXX38BB.bin) needs to be uploaded again. That takes more than 2 secs before the play starts. Even after it starts, it does few pauses. The easiest solution for this problem is to replace the hardware resets with software ones. That is done by replacing all occurences of 00 00 5c d9 in the TIAS2781RCA4.bin file with 00 00 5c 19. Check the data sheet for the description of register 5c.

To make the subwoofer's work need the following:

Disable driver runtime suspend/resume PM

as root (if rc.local doesn't exit - create, make executable and add #!/bin/sh)

cat << EOF >> /etc/rc.local
# Disable runtime suspend/resume for tas 2781 as it is not working
echo on > /sys/bus/i2c/drivers/tas2781-hda/i2c-TIAS2781\:00/power/control
EOF

On Fedora the rc.local file is /etc/rc.d/rc.local

Place the firmware in /lib/firmware

The files TIAS2781RCA4.bin and TAS2XXX38BB.bin need to be copies in /lib/firmware

Controling subwoofer speakers volume

By default the normal speaker volume controls don't control the volume of the subwoofer's. The 2781 speakers are controlled with a separate control

amixer cget numid=3
numid=3,iface=CARD,name='Speaker Digital Gain'
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=200,step=0
  : values=148
  | dBscale-min=-100.00dB,step=1.00dB,mute=0

To make the amp speakers change volume in sync with the volume of the main speakers - use https://github.com/darinpp/alsa-controller It will update the digital gain for the amp speakers when the main speaker's volume changes. The 2781 driver doesn't expose changing the volume of the L/R speakers separately (even though that should work). So changing the L/R balance won't afect the amp speakers.

yoga-slim-7's People

Contributors

darinpp avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.