rc.alsa 1.2 KB

123456789101112131415161718192021222324252627282930313233343536
  1. #! /bin/sh -
  2. # /etc/rc.d/rc.alsa - Start ALSA (Advanced Linux Sound Architecture).
  3. #
  4. # Version: (#)1.00 2009-01-04 (MAF)
  5. # (#)1.01 2010-06-21 (MAF)
  6. # (#)1.02 2010-12-09 (MAF)
  7. # (#)1.03 2011-03-31 (MAF)
  8. # (#)1.04 2017-07-27 (MAF)
  9. #
  10. # Written by Matias Fonzo for Dragora GNU/Linux-Libre,
  11. # under the terms of the Apache License 2.0.
  12. type alsactl > /dev/null 2>&1 || exit 2;
  13. type amixer > /dev/null 2>&1 || exit 2;
  14. if test -d /proc/asound
  15. then
  16. if test -r /var/lib/alsa/asound.state
  17. then
  18. echo "Restoring ALSA mixer from /var/lib/alsa/asound.state ..."
  19. alsactl restore
  20. else
  21. echo "Setting values for the ALSA mixer ..."
  22. amixer set Master 90% unmute > /dev/null 2>&1
  23. amixer set Front 80% unmute > /dev/null 2>&1
  24. amixer set PCM 80% unmute > /dev/null 2>&1
  25. amixer set Side 80% unmute > /dev/null 2>&1
  26. amixer set CD 90% unmute > /dev/null 2>&1
  27. amixer set Headphone unmute > /dev/null 2>&1
  28. amixer set Mic 90% unmute > /dev/null 2>&1
  29. amixer set 'Front Mic' 90% unmute > /dev/null 2>&1
  30. alsactl store
  31. fi
  32. fi