I recently purchased an Asus Vivobook 14 Flip (Model TP3407SA) for use under Linux. One of the obstacles I ran into: Playing sounds resulted in no audio, the device remained mute. However, it had worked under Windows. Time to investigate.
This thread for Linux Mint turned out to be very helpful, even though I’m running Debian Trixie. It appears that current Linux kernels do not activate the Texas Instruments audio amplifier (TI chip TIAS2781).
However, this can be fixed with a short script by Rakshit Ramesh that is to be run whenever the machine boots or wakes up. For my Vivobook, I had to change the I2C bus the device is on from 12 to 0 and flip the two amplifiers, otherwise left and right were mirrored.
Here is my version of what I created and stored in /usr/loca/lib/enable-ti-amplifier.sh:
#!/bin/sh
# Adapted from https://gist.github.com/rraks/4edddb99b50b94fe6298adbf3c9f43eb
# Check whether your I2C bus and device IDs are correct
# before running; see the instructions in the original.
# Correct for my Vivobook 14 Flip TP3407SA
one_channel() {
i2c_bus=$1
value=$2
channel=$3
i2cset -f -y "$i2c_bus" "$value" 0x00 0x00
i2cset -f -y "$i2c_bus" "$value" 0x7f 0x00
i2cset -f -y "$i2c_bus" "$value" 0x01 0x01
i2cset -f -y "$i2c_bus" "$value" 0x0e 0xc4
i2cset -f -y "$i2c_bus" "$value" 0x0f 0x40
i2cset -f -y "$i2c_bus" "$value" 0x5c 0xd9
i2cset -f -y "$i2c_bus" "$value" 0x60 0x10
if [ $channel -eq 0 ]; then
i2cset -f -y "$i2c_bus" "$value" 0x0a 0x1e
else
i2cset -f -y "$i2c_bus" "$value" 0x0a 0x2e
fi
i2cset -f -y "$i2c_bus" "$value" 0x0d 0x01
i2cset -f -y "$i2c_bus" "$value" 0x16 0x40
i2cset -f -y "$i2c_bus" "$value" 0x00 0x01
i2cset -f -y "$i2c_bus" "$value" 0x17 0xc8
i2cset -f -y "$i2c_bus" "$value" 0x00 0x04
i2cset -f -y "$i2c_bus" "$value" 0x30 0x00
i2cset -f -y "$i2c_bus" "$value" 0x31 0x00
i2cset -f -y "$i2c_bus" "$value" 0x32 0x00
i2cset -f -y "$i2c_bus" "$value" 0x33 0x01
i2cset -f -y "$i2c_bus" "$value" 0x00 0x08
i2cset -f -y "$i2c_bus" "$value" 0x18 0x00
i2cset -f -y "$i2c_bus" "$value" 0x19 0x00
i2cset -f -y "$i2c_bus" "$value" 0x1a 0x00
i2cset -f -y "$i2c_bus" "$value" 0x1b 0x00
i2cset -f -y "$i2c_bus" "$value" 0x28 0x40
i2cset -f -y "$i2c_bus" "$value" 0x29 0x00
i2cset -f -y "$i2c_bus" "$value" 0x2a 0x00
i2cset -f -y "$i2c_bus" "$value" 0x2b 0x00
i2cset -f -y "$i2c_bus" "$value" 0x00 0x0a
i2cset -f -y "$i2c_bus" "$value" 0x48 0x00
i2cset -f -y "$i2c_bus" "$value" 0x49 0x00
i2cset -f -y "$i2c_bus" "$value" 0x4a 0x00
i2cset -f -y "$i2c_bus" "$value" 0x4b 0x00
i2cset -f -y "$i2c_bus" "$value" 0x58 0x40
i2cset -f -y "$i2c_bus" "$value" 0x59 0x00
i2cset -f -y "$i2c_bus" "$value" 0x5a 0x00
i2cset -f -y "$i2c_bus" "$value" 0x5b 0x00
i2cset -f -y "$i2c_bus" "$value" 0x00 0x00
i2cset -f -y "$i2c_bus" "$value" 0x02 0x00
}
modprobe i2c-dev
i2c_bus=0
one_channel $i2c_bus 0x38 0
one_channel $i2c_bus 0x3d 1
Here is the corresponding start file for systemd, also borrowed from the Gist above, stored in /etc/systemd/system/ti-amplifier.service:
[Unit]
Description=Turn on speakers using i2c configuration for the TI amplifier
After=suspend.target hibernate.target hybrid-sleep.target suspend-then-hibernate.target
[Service]
User=root
Type=oneshot
ExecStart=/usr/local/lib/enable-ti-amplifier.sh
[Install]
WantedBy=multi-user.target sleep.target
Also=suspend.target hibernate.target hybrid-sleep.target suspend-then-hibernate.target
After storing the two files, run the following two commands as root:
systemctl daemon-reload
systemctl enable --now ti-amplifier
Hopefully, the kernel will incorporate this function in the future.


