sxmo-utils/scripts/core/sxmo_audiocurrentdevice.sh
2020-06-13 20:36:13 -05:00

9 lines
277 B
Bash
Executable file

#!/usr/bin/env sh
audiodevice() {
amixer sget "Earpiece" | grep -qE '\[on\]' && echo Earpiece && return
amixer sget "Headphone" | grep -qE '\[on\]' && echo Headphone && return
amixer sget "Line Out" | grep -qE '\[on\]' && echo Line Out && return
echo "None"
}
audiodevice