public inbox for linux-tegra@vger.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
To: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Cc: lrg-kDsPt+C1G03kYMGBc/C6ZA@public.gmane.org,
	alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw@public.gmane.org,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 3/7] ASoC: WM8903: Handle micdet_cfg more safely
Date: Fri, 11 Feb 2011 11:11:44 +0000	[thread overview]
Message-ID: <20110211111144.GC7180@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <1297377439-27382-3-git-send-email-swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>

On Thu, Feb 10, 2011 at 03:37:15PM -0700, Stephen Warren wrote:

> Specifically, if WM8903_MICDET_ENA and WM8903_MICBIAS_ENA are both part of
> micdet_cfg, and a mic is plugged in when the driver initializes, the interrupt
> will fire almost immediately. However, at that point, the micdet interrupt is
> probably still masked, and hence wm8903_irq does not handle it. However, the
> act of reading the interrupt status register in the ISR clears the micdet
> interrupt status, so it is lost.

> To avoid this, refuse to write any fields from micdet_cfg to the register
> except those simply configuring detection thresholds; actual enabling of mic
> detecion should always be implemented by calling wm8903_mic_detect().

As well as being detected via the main interrupt of the WM8903 the
detection signals can also be brought out to the WM8903 GPIOs directly,
allowing detection to operate without any I2C I/O.  That mode can be
configured via platform data only and the WM8903 microphone detection
functions will never be called so the user needs to be able to enable
detection via platform data.

I'll have a think and send something out later today; the easiest thing
is to add more documentation and possibly some sanity checking code in
the platform data parsing.
--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2011-02-11 11:11 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-10 22:37 [PATCH 1/7] ASoC: WM8903: Fix mic detection register definitions Stephen Warren
     [not found] ` <1297377439-27382-1-git-send-email-swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2011-02-10 22:37   ` [PATCH 2/7] ASoC: WM8903: Fix mic detection enable logic Stephen Warren
2011-02-10 22:37   ` [PATCH 3/7] ASoC: WM8903: Handle micdet_cfg more safely Stephen Warren
     [not found]     ` <1297377439-27382-3-git-send-email-swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2011-02-11 11:11       ` Mark Brown [this message]
     [not found]         ` <20110211111144.GC7180-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
2011-02-11 16:06           ` Stephen Warren
     [not found]             ` <74CDBE0F657A3D45AFBB94109FB122FF0310F605F3-C7FfzLzN0UxDw2glCA4ptUEOCMrvLtNR@public.gmane.org>
2011-02-11 17:29               ` [alsa-devel] " Stephen Warren
     [not found]                 ` <74CDBE0F657A3D45AFBB94109FB122FF0310F60628-C7FfzLzN0UxDw2glCA4ptUEOCMrvLtNR@public.gmane.org>
2011-02-11 18:09                   ` Mark Brown
2011-02-10 22:37   ` [PATCH 4/7] ASoC: Tegra: Harmony: Implement mic detection Stephen Warren
2011-02-10 22:37   ` [PATCH 5/7] ASoC: Harmony: Call snd_soc_dapm_nc_pin Stephen Warren
2011-02-10 22:37   ` [PATCH 6/7] ASoC: Tegra: Harmony: Explicitly set mic enables Stephen Warren
2011-02-10 22:37   ` [PATCH 7/7] ASoC: Tegra: Add MODULE_ALIAS Stephen Warren
2011-02-13 16:21   ` [alsa-devel] [PATCH 1/7] ASoC: WM8903: Fix mic detection register definitions Liam Girdwood
2011-02-13 19:47     ` 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=20110211111144.GC7180@opensource.wolfsonmicro.com \
    --to=broonie-yzvpicuk2aatku/dhu1wvuem+bqzidxxqq4iyu8u01e@public.gmane.org \
    --cc=alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw@public.gmane.org \
    --cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=lrg-kDsPt+C1G03kYMGBc/C6ZA@public.gmane.org \
    --cc=swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
    /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