Thread (3 messages) 3 messages, 2 authors, 2011-08-23

Headset driver detection problem during bootup

flat view

From: anish singh <hidden>
Date: 2011-08-23 15:01:55
Also in: alsa-devel, lkml

On Tue, Aug 23, 2011 at 10:52 PM, Takashi Iwai [off-list ref] wrote:
At Sat, 20 Aug 2011 22:21:10 +0900,
anish singh wrote:
quoted
adding more information and experts on alsa.

On Fri, Aug 19, 2011 at 9:23 PM, anish singh
[off-list ref] wrote:
quoted
I need some suggestions for below situation:

Headset if it is inserted before the device is powered up is
now detected by forcefully calling the interrupt handler in
the probe function of the headset driver.
Headset is detected in our andorid device by using a detect gpio
?which is turned on when headset is inserted.If the headset
?is inserted right from very beginging i.e. before device is even
?turned on then we forcefully call the handler and thereby in
?handler we check if gpio is turned on or not and do the rest
of things.
quoted
Once the handler is called then we find out if the headset
is there or not using gpio and then normal detection happens

Is it the right way to detect the device during power-up?
Does not linux have any other way of doing this which i may
be missing? How this is handled in the case of ALSA jack i.e.
the jack drivers which is using alsa framework for detection?
Android doesn't use ALSA framework for reporting JACK.
Judging from the source code, the likely problem is that the driver
doesn't initialize the switch-state in input device. ?The switch-state
is updated only when GPIO IRQ comes up.
Absolutely right.During bootup we check the gpio and if we find out
that the headset is inserted then we update the switch.In Android
updating the switch is nothing but updating some sysfs file and
generating uevent AFAIK.

Takashi
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help