blob: 9a468793a769e8914b3a240462fd348925344ee5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
#!/usr/bin/env sh
set -e
# Could get this from dt, fixed for now
GPIO=8
# Headphone detect gpios are exported by default
value="$(cat /sys/class/gpio/gpio${GPIO}/value)"
if [ "$value" -gt 0 ]; then
action=plug
else
action=unplug
fi
/etc/acpi/audio_jack_plugged_in.sh jack/headphone HEADPHONE $action
|