tsowell / linux-samus

Linux kernel packages with Chromebook Pixel 2015 (Samus) support borrowed from Chromium OS
GNU General Public License v2.0
61 stars 7 forks source link

Lost instructions for persisting/restoring ALSA config #2

Closed colemickens closed 9 years ago

colemickens commented 9 years ago

There were, at one point in time, instructions for the enabling a service that would persist and restore the alsa state, so that I don't have to reinitialize ucm after each reboot. Any chance those could be re-added?

Thanks.

tsowell commented 9 years ago

alsa-util's systemd services should take of saving and restoring state, but running alsactl store will save the state for you in case there's an issue preventing it from happening during shutdown. The volume won't be saved and restored because of an issue with reading the volume through the ALSA mixer interface.

I've added a reference to alsa-util and it services to the Sound section in the README and also included instructions for automatically re-assigning audio output to the headphone jack.

colemickens commented 9 years ago

Interesting. I didn't realize that install alsa-utils was sufficient. Looks like I might be hitting a bug since it isn't restoring for me:

Potentially: https://bugs.archlinux.org/task/31163

 $ sudo systemctl status alsa-restore
● alsa-restore.service - Restore Sound Card State
   Loaded: loaded (/usr/lib/systemd/system/alsa-restore.service; static; vendor preset: disabled)
   Active: inactive (dead) since Fri 2015-04-03 18:02:26 PDT; 18h ago
  Process: 186 ExecStart=/usr/bin/alsactl restore (code=exited, status=19)
 Main PID: 186 (code=exited, status=19)

Apr 03 18:02:26 pixel alsactl[186]: /usr/bin/alsactl: load_state:1735: No soundcards found...

Mostly just posting in case someone else winds up with this issue. I'll follow up if I find a workaround.

tsowell commented 9 years ago

Hm, I think if you're using PulseAudio, PulseAudio should handle saving and restoring the sound state. I think if even if alsactl worked, it would just save and restore the PulseAudio mixer controls.

colemickens commented 9 years ago

I must have gotten wires crossed. Fixing the default PA sink has made this go away.