~mil/sxmo-utils

ref: dbc3b1ab509aab5f1db72c5cece2ee2a6eb521e8 sxmo-utils/scripts/core/sxmo_audiocurrentdevice.sh -rwxr-xr-x 277 bytes
dbc3b1abStacy Harper Allow the sendnewtextmenu to be used with a number as arg 1 year, 4 months ago
                                                                                
1
2
3
4
5
6
7
8
9
#!/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