Tweak the post sleep quirk to use /sys.
This commit is contained in:
parent
0e1462afb3
commit
8374632236
1 changed files with 5 additions and 6 deletions
|
@ -6,7 +6,8 @@
|
|||
|
||||
. /etc/profile
|
||||
|
||||
PBDEVICE=$(amixer get "Playback Path" | awk 'BEGIN {FS="'\''"} /Item0/ {print $2}')
|
||||
DEVICE_HEADPHONE_DEV="/sys/devices/platform/rk-headset/extcon/extcon3/state"
|
||||
HEADPHONE_STATE=$(awk 'BEGIN {FS="="} /HEADPHONE/ {print $2}' ${DEVICE_HEADPHONE_DEV})
|
||||
|
||||
alsactl init
|
||||
|
||||
|
@ -15,14 +16,12 @@ amixer -c 0 set "MUTE" "MUTE"
|
|||
amixer -c 0 set "Capture MIC Path" "Main Mic"
|
||||
amixer -c 0 set "Capture MIC Path" "MIC OFF"
|
||||
|
||||
echo ${PBDEVICE}
|
||||
|
||||
case ${PBDEVICE} in
|
||||
HP)
|
||||
case ${HEADPHONE_STATE} in
|
||||
1)
|
||||
amixer -c 0 set "Playback Path" "${DEVICE_PLAYBACK_PATH_SPK}"
|
||||
amixer -c 0 set "Playback Path" "${DEVICE_PLAYBACK_PATH_HP}"
|
||||
;;
|
||||
SPK)
|
||||
2)
|
||||
amixer -c 0 set "Playback Path" "${DEVICE_PLAYBACK_PATH_HP}"
|
||||
amixer -c 0 set "Playback Path" "${DEVICE_PLAYBACK_PATH_SPK}"
|
||||
;;
|
||||
|
|
Loading…
Reference in a new issue