sound.sh 813 B

1234567891011121314151617181920212223242526272829
  1. #!/bin/bash
  2. case "$1" in
  3. jack/headphone)
  4. case "$3" in
  5. plug)
  6. amixer -D hw:0 cset name='Left Speaker Mixer Left DAC Switch' off
  7. amixer -D hw:0 cset name='Right Speaker Mixer Right DAC Switch' off
  8. amixer -D hw:0 sset 'Headphone Left' on
  9. amixer -D hw:0 sset 'Headphone Right' on
  10. ;;
  11. unplug)
  12. amixer -D hw:0 cset name='Left Speaker Mixer Left DAC Switch' on
  13. amixer -D hw:0 cset name='Right Speaker Mixer Right DAC Switch' on
  14. amixer -D hw:0 sset 'Headphone Left' off
  15. amixer -D hw:0 sset 'Headphone Right' off
  16. ;;
  17. esac
  18. ;;
  19. jack/microphone)
  20. case "$3" in
  21. plug)
  22. ;;
  23. unplug)
  24. ;;
  25. esac
  26. ;;
  27. esac