You are not logged in.

#1 2012-09-23 10:46:07

yjcong
Member
Registered: 2009-07-06
Posts: 59

[Solved]how to know if the headphone is plugged in or not?

hi,

i just want to know whether there is a package that can test if the headphone is plugged in or not?

both of lsusb and dmesg dont work.


thanks for your help and post.

Last edited by yjcong (2012-09-24 07:01:56)

Offline

#2 2012-09-23 11:44:10

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: [Solved]how to know if the headphone is plugged in or not?

You could try to make sense of CONFIG_SND_KCTL_JACK.

Offline

#3 2012-09-23 13:55:58

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: [Solved]how to know if the headphone is plugged in or not?

Try acpi_listen, just in case it generates an acpi event.

Offline

#4 2012-09-24 06:54:22

yjcong
Member
Registered: 2009-07-06
Posts: 59

Re: [Solved]how to know if the headphone is plugged in or not?

tomk wrote:

Try acpi_listen, just in case it generates an acpi event.

thanks for help.

i installed acpid, and found out this is kind of a monitor

Offline

#5 2012-09-24 07:01:40

yjcong
Member
Registered: 2009-07-06
Posts: 59

Re: [Solved]how to know if the headphone is plugged in or not?

brebs wrote:

You could try to make sense of CONFIG_SND_KCTL_JACK.


thank your for your link.

i know how to solve my question.

amixer scontrols

to find the corresponding name. then

amixer set "Headphone Jack Sense" off

to disable it no matter the headphone is plugged in or not.

these will be coded into my "alarm" script for nap.

Offline

Board footer

Powered by FluxBB