Make audio work on cx2072x devices like the Asus E200HA
Good News everyone!
Starting with Version 5.3, the default linux kernel will support the cx2072x (see this commit)
This means that installing this custom patched kernel will now longer be required if you already use kernel 5.3 or newer!
You'll probably still need the alsa-ucm files, but this is great because it massively simplifies the installation and reduces the possibility of problems
TL;DR
If You're on Debian or Ubuntu, run this (at your own risk!!)
wget -qO- https://gist.github.com/heikomat/3fe272431b44b580c933bfb901a92257/raw | bashGeneral sound setup:
Most of the following information are from these sources:
This manual is for debain and derivates of it, though it can probablydefinitely be adapted
for other linux systems (see here). Debian and Ubuntu users can use the script provided
above. Its goal is to do the steps described here:
-
Get the Kernel with the cx2072x codec driver and the cx2072x machine driver from releases, or build it yourself (see building the kernel)
This tells the Linux how to talk to the hardware.
-
Install the kernel
sudo dpkg --install LINUX_IMAGE_DEB_PACKAGE.deb sudo dpkg --install LINUX_HEADERS_DEB_PACKAGE.deb -
Have
pulseaudioinstalledsudo apt install pulseaudio
-
Have
firmware-intel-sound(for debian) orlinux-firmware(for ubuntu) installed.This contains the firmware for intels sst audio device (
/lib/firmware/intel/fw_sst_22a8.bin). The firmware is the proprietary software that runs within the chip.# debian sudo apt install firmware-intel-sound # ubuntu sudo apt install linux-firmware
-
Copy the configuration files for alsa (
bytcht-cx2072x.confandHiFi.conffrom the bytcht-cx2072x folder) to/usr/share/alsa/ucm/bytcht-cx2072x(creating the folder first).These tell alsa what driver and codec to use, and how to use them
sudo mkdir --parents /usr/share/alsa/ucm/bytcht-cx2072x cd /usr/share/alsa/ucm/bytcht-cx2072x sudo wget "https://raw.githubusercontent.com/heikomat/linux/cx2072x/cx2072x_fixes_and_manual/bytcht-cx2072x/HiFi.conf" sudo wget "https://raw.githubusercontent.com/heikomat/linux/cx2072x/cx2072x_fixes_and_manual/bytcht-cx2072x/bytcht-cx2072x.conf"
-
Set
realtime-scheduling = noin/etc/pulse/daemon.conf(see this issue-comment).This makes the pulseaudio daemon not die if the audio device is not found instantly
via script
sudo sed --in-place --regexp-extended --expression='s/;?\s*realtime-scheduling\s*=\s*(yes|no)/realtime-scheduling = no/g' /etc/pulse/daemon.confby hand
- Make sure you edit the file as root, for example with
sudo nano /etc/pulse/daemon.conf - Change
; realtime-scheduling = yestorealtime-scheduling = no - make sure you removed the
;at the beginning of the line, this is important!
- Make sure you edit the file as root, for example with
-
Reboot
Possible fixes if audio is still not working:
- Remove possibly existing user-pulse-config with
rm -rf ~/.config/pulse/* - Set pulseaudios default device:
- Check wich index your non-hdmi audio device has with
pactl list short sinks pacmd set-default-sink 1(replacing the 1 with the audio-device-index)
- Check wich index your non-hdmi audio device has with
Getting a detailed pulseaudio log, for when debugging is necessary
- Enable debug-messages for pulseaudio by editing
/etc/pulse/daemon.conf- Make sure you edit the file as root, for example with
sudo nano /etc/pulse/daemon.conf - Change
; log-level = noticetolog-level = debug - make sure you removed the
;at the beginning of the line, this is important!
- Make sure you edit the file as root, for example with
- Reboot
- Put a log on the Desktop with
sudo cat /var/log/syslog | grep 'intel\|cx2072x\|pulse\|alsa\|cht\|byt\|error' > ~/Desktop/pulselog.txt
- Give use the pulselog.txt you now have on your Desktop