Lvl4Sword / Killer

🔪 System tamper detector for USB, Bluetooth, AC, Battery, Disk Tray, and Ethernet.
https://pypi.org/project/killer/
GNU Affero General Public License v3.0
71 stars 11 forks source link

Detect Headphone Jack Connected/Disconnected Status #53

Open Lvl4Sword opened 5 years ago

Lvl4Sword commented 5 years ago

pacmd list-cards seems to show analog-output-headphones: Headphones (priority 9000, latency offset 0 usec, available: yes) when the headphones are plugged in, and analog-output-headphones: Headphones (priority 9000, latency offset 0 usec, available: no) when unplugged.

Applies to Debian 9 ( Stretch )


Maybe this? https://unix.stackexchange.com/questions/25776/detecting-headphone-connection-disconnection-in-linux

Lvl4Sword commented 5 years ago

pacmd list-cards | grep analog-output-headphones should work - unless there's more than one headphone jack?