Jump to content

Audio

From postmarketOS Wiki
Revision as of 16:37, 3 February 2018 by Michitux (talk | contribs) (Added guide for WM1811 audio chip)
Note If you're trying out anything and learn something that would have helped, please extend this wiki page.

alsactl method

Cascardo reported having success with the following method on Debian, this should work for postmarketOS as well:

I ran a debian chroot on a cyanogenmod, set the volume up, then ran alsactl save on the chroot. booted into debian, then after alsactl restore was run, I had audio working

so, in summary, it's hard to know which mixer settings will make it work, so my strategy was running some android stack that correctly set the mixer, then saving the state with a chroot or any other tool that would allow you to save, copy and restore that state later on a gnu stack

This method may work for non-Android devices as well, as long as you see an audio device in alsamixer. Just boot the normal OS, save the volume settings somehow, then restore them.

WM1811

This audio chip is present in several Samsung devices that are based on the Exynos 4412 platform. There is a configuration for the Samsung Galaxy Note 10.1 available at the opensgn project. Have a look at the files in opensgn/data/n8000/usr/share/alsa/ucm/Midas_WM1811/. In opensgn/data/n8000/etc/rc.local there are the commands to use the configuration:

# restore alsa sinitial tate
/usr/sbin/alsactl restore -f /usr/share/alsa/ucm/Midas_WM1811/init.state

# enable speaker for output and builtin mic for input
/usr/bin/alsaucm -c Midas_WM1811 set _verb HiFi set _enadev Speaker
/usr/bin/alsaucm -c Midas_WM1811 set _verb HiFi set _enadev Mic

For other devices the configuration might need to be adapted. On the Samsung Galaxy Note 8.0 for example, the audio device is named "Kona_WM1811". Replacing all occurrences in file names and file contents of Midas by Kona worked.

See also