mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: anish singh <anish198519851985@gmail.com>
Cc: linux-kernel-mail <linux-kernel@vger.kernel.org>,
	kernelnewbies <kernelnewbies@kernelnewbies.org>,
	alsa-devel@alsa-project.org,
	"Edgar (gimli) Hucek" <gimli@dark-green.com>,
	Tim Howe <tim.howe@cirrus.com>,
	Stephen Warren <swarren@nvidia.com>,
	Vince Weaver <vweaver1@eecs.utk.edu>,
	Jaroslav Kysela <perex@perex.cz>,
	Mark Brown <broonie@opensource.wolfsonmicro.com>,
	Liam Girdwood <lrg@ti.com>
Subject: Re: Headset driver detection problem during bootup
Date: Tue, 23 Aug 2011 15:52:47 +0200	[thread overview]
Message-ID: <s5h7h64p74g.wl%tiwai@suse.de> (raw)
In-Reply-To: <CAK7N6vrYRbGD14CJn4iNavc8CL_N8e5zqFbpiZ1yzRi-7kdRqA@mail.gmail.com>

At Sat, 20 Aug 2011 22:21:10 +0900,
anish singh wrote:
> 
> adding more information and experts on alsa.
> 
> On Fri, Aug 19, 2011 at 9:23 PM, anish singh
> <anish198519851985@gmail.com> wrote:
> > 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.
> 
> > 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.


Takashi

  reply	other threads:[~2011-08-23 13:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-19 12:23 anish singh
2011-08-20 13:21 ` anish singh
2011-08-23 13:52   ` Takashi Iwai [this message]
2011-08-23 15:01     ` anish singh
2011-08-20 17:40 ` Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=s5h7h64p74g.wl%tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=anish198519851985@gmail.com \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=gimli@dark-green.com \
    --cc=kernelnewbies@kernelnewbies.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lrg@ti.com \
    --cc=perex@perex.cz \
    --cc=swarren@nvidia.com \
    --cc=tim.howe@cirrus.com \
    --cc=vweaver1@eecs.utk.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®