Created
June 18, 2020 20:32
-
-
Save whc2001/feaef5314c1ed0983ffb0bd2c5f09dc0 to your computer and use it in GitHub Desktop.
设置OpenWrt默认声卡和音量,丢到rc.local即可
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # ====Sound card configuration==== | |
| DEFAULT_CARD=1 | |
| VOLUME=100 | |
| # Config default card | |
| if ! grep -q "defaults.pcm.card" /etc/asound.conf; then | |
| echo "defaults.pcm.card ${DEFAULT_CARD}" >> /etc/asound.conf | |
| echo "defaults.ctl.card ${DEFAULT_CARD}" >> /etc/asound.conf | |
| fi | |
| # Set output volume | |
| amixer -c ${DEFAULT_CARD} set Master playback ${VOLUME}% unmute | |
| amixer -c ${DEFAULT_CARD} set Headphone playback ${VOLUME}% unmute | |
| # ====End of sound card configuration==== |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment