You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
1.1 KiB
42 lines
1.1 KiB
#!/bin/bash
|
|
|
|
ENABLED=yes
|
|
[[ ${ENABLED} == "yes" ]] || exit 0
|
|
|
|
DEBUGMODE=no
|
|
. /usr/lib/ublinux/functions
|
|
. /usr/lib/ublinux/default
|
|
debug_mode "$0" "$@"
|
|
|
|
SOURCE=${SYSCONF}/config; [ -f ${SOURCE} ] && . ${SOURCE} 2>/dev/null
|
|
SOURCE=${SYSCONF}/hardware; [ -f ${SOURCE} ] && . ${SOURCE} 2>/dev/null
|
|
|
|
[ -z "$PULSEAUDIO" ] && PULSEAUDIO=default
|
|
|
|
function pulse() {
|
|
ln -sfT /etc/sound/profiles/pulse /etc/alternatives/soundprofile
|
|
sed -i 's|^.*autospawn.*$|autospawn = yes|' /etc/pulse/client.conf
|
|
# sed -i 's|^.*PULSE_SERVER_TYPE.*$|PULSE_SERVER_TYPE=personal|' /etc/ublinux/pulseaudio
|
|
echo " Soundprofile switched to PULSEAUDIO"
|
|
}
|
|
|
|
function alsa() {
|
|
ln -sfT /etc/sound/profiles/alsa /etc/alternatives/soundprofile
|
|
sed -i 's|^.*autospawn.*$|autospawn = no|' /etc/pulse/client.conf
|
|
# sed -i 's|^.*PULSE_SERVER_TYPE.*$|PULSE_SERVER_TYPE=none|' /etc/ublinux/pulseaudio
|
|
echo " Soundprofile switched to ALSA"
|
|
}
|
|
|
|
function default() {
|
|
/bin/true
|
|
}
|
|
|
|
case "$PULSEAUDIO" in
|
|
"default" | "DEFAULT" )
|
|
default ;;
|
|
"no" | "NO" | "disable" | "DISABLE" | "off" | "OFF" )
|
|
alsa ;;
|
|
* )
|
|
pulse ;;
|
|
esac
|