25 lines
643 B
Bash
25 lines
643 B
Bash
#!/bin/bash
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
# Copyright (C) 2021-present Fewtarius (https://github.com/fewtarius)
|
|
|
|
. /etc/profile
|
|
|
|
if [ ! -d "/storage/.config/modprobe.d/" ]
|
|
then
|
|
mkdir -p /storage/.config/modprobe.d
|
|
fi
|
|
|
|
if [ ! -e "/storage/.config/modprobe.d/alsa-base.conf" ]
|
|
then
|
|
touch /storage/.config/modprobe.d/alsa-base.conf
|
|
reboot
|
|
fi
|
|
|
|
### Set the audio device.
|
|
set-audio set "ALC269VB (1:0)"
|
|
set-audio esset "Master"
|
|
|
|
### Disables speaker output when headphones are connected.
|
|
alsactl restore -f /storage/.config/asound.state
|
|
/usr/bin/amixer -c 1 sset "Auto-Mute Mode" Enabled
|
|
alsactl store -f /storage/.config/asound.state
|