build/packages/bsp/pinebook/pinebook-enable-sound.service

15 lines
491 B
Desktop File

[Unit]
Description=A simple service to switch headphone jack function on Pinebook from serial to sound
ConditionKernelCommandLine=!pinebook.forceserial
[Service]
Type=oneshot
ExecStart=-/bin/bash -c "echo 362 > /sys/class/gpio/export"
ExecStart=/bin/bash -c "echo out > /sys/class/gpio/gpio362/direction"
ExecStart=/bin/bash -c "echo 1 > /sys/class/gpio/gpio362/value"
ExecStop=/bin/bash -c "echo 0 > /sys/class/gpio/gpio362/value"
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target