pmaports/device/testing/device-xiaomi-santoni/ucm/90-device-xiaomi-santoni-audio.rules
Oliver Smith 64035ac463
device/*: move to device/testing/* (!1063)
Prepare for better device categorization by moving everything to testing
subdir first.

[skip-ci]: chicken-egg problem: passing pmaports CI depends on pmbootstrap MR
				depends on this MR

Related: postmarketos#16
2020-03-14 08:35:32 +01:00

9 lines
552 B
Text

# This udev rule is a workaround, udev doesn't care about the headphone jack input events :(
# We need a better workaround, perhaps a daemon for jack detection?
# Init
ATTRS{id}=="msm8920sku7sndc", RUN+="/usr/bin/alsaucm -c msm8920-sku7-snd-card set _verb HiFi set _enadev Speaker"
# Jack detection
SUBSYSTEM=="switch",ATTRS{state}=="[1-4]",RUN+="/usr/bin/alsaucm -c msm8920-sku7-snd-card set _verb HiFi set _enadev Headphones"
SUBSYSTEM=="switch",ATTRS{state}=="0",RUN+="/usr/bin/alsaucm -c msm8920-sku7-snd-card set _verb HiFi set _enadev Speaker"