All of lore.kernel.org
 help / color / mirror / Atom feed
From: John Hsu <KCHSU0@nuvoton.com>
To: Mark Brown <broonie@kernel.org>
Cc: AP MS30 Linux ALSA <alsa-devel@alsa-project.org>,
	"anatol.pomozov@gmail.com" <anatol.pomozov@gmail.com>,
	AC30 YHChuang <YHCHuang@nuvoton.com>,
	"lgirdwood@gmail.com" <lgirdwood@gmail.com>,
	"benzh@chromium.org" <benzh@chromium.org>,
	AC30 CTLin0 <CTLIN0@nuvoton.com>, MS40 MHKuo <MHKuo@nuvoton.com>,
	"yong.zhi@intel.com" <yong.zhi@intel.com>
Subject: Re: [PATCH 1/2] ASoC: nau8825: non-clock jack detection for power saving at standby
Date: Tue, 10 May 2016 11:18:03 +0800	[thread overview]
Message-ID: <573152EB.5090906@nuvoton.com> (raw)
In-Reply-To: <20160509163528.GD3458@sirena.org.uk>

On 5/10/2016 12:35 AM, Mark Brown wrote:
> On Mon, May 09, 2016 at 10:57:43AM +0800, John Hsu wrote:
>   
>> On 5/7/2016 2:18 AM, Mark Brown wrote:
>>     
>
>   
>>> I'm not sure I fully follow the above explanation.  I appreciate that
>>> power consumption is not going to be optimal when the clock is provided
>>> and the chip is idle but does it actually stop anything working?
>>>       
>
>   
>> The conditional check for the situation is limited. Only when jack dis-
>> connect, the clock id just will be restricted. Do you think it is better
>> to control by machine driver and codec driver not to add any restriction?
>>     
>
> Well, the machine driver has to cope anyway.  What's not clear to me is
> if the device *has* to use the internal clock when doing accessory
> detection or if it's just lower power.
>
>   
If the codec only does accessory insertion detection, the driver can setup
it and doesn't need any clock. That can make lower power. But if the codec
wants to do advanced jack detection like mic or impedance, the driver needs
the internal clock to setup auto detection. Thus, when no headset connected
yet, we use the solution without internal clock for power saving. When we
want to do advanced detection, we use the solution with internal clock.

>>> I don't see how the probe function can handle the fact that the resume
>>> function is unconditionally calling enable_irq()?
>>>       
>
>   
>> Maybe I'm not very clear about what the probe function means. Could you
>>     
>
> The probe function is the function that runs on device probe, usually
> with probe() in the name.  The relevant one here is nau8825_i2c_probe().
>
>   

I see. Thank you.

>> tell me more detail? The codec resumption recovers the interruption func-
>> tion because the function turns off when suspension. The interruption is
>> managed in resume setup function after resumption. The driver will enable
>> the insertion and ejection interruptions here. Let the codec to detect the
>> event and do report instead of manual check the jack status.
>>     
>
> There may not *be* an interrupt.
>   

For the condition, the driver makes setup to detect insertion or ejection
only, and triggers detection manually. The codec can detect the accessory
status and send the interruption out.

  reply	other threads:[~2016-05-10  3:18 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-29  8:15 [PATCH 1/2] ASoC: nau8825: non-clock jack detection for power saving at standby John Hsu
2016-04-29  8:15 ` [PATCH 2/2] ASoC: nau8825: cross talk suppression measurement function John Hsu
2016-05-02 16:27 ` [PATCH 1/2] ASoC: nau8825: non-clock jack detection for power saving at standby Mark Brown
2016-05-03  9:20   ` John Hsu
2016-05-04 16:39     ` Mark Brown
2016-05-06  7:41       ` John Hsu
2016-05-06 18:18         ` Mark Brown
2016-05-09  2:57           ` John Hsu
2016-05-09 16:35             ` Mark Brown
2016-05-10  3:18               ` John Hsu [this message]
2016-05-11 17:15                 ` Mark Brown
2016-05-12  3:54                   ` John Hsu
2016-05-12 10:58                     ` 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=573152EB.5090906@nuvoton.com \
    --to=kchsu0@nuvoton.com \
    --cc=CTLIN0@nuvoton.com \
    --cc=MHKuo@nuvoton.com \
    --cc=YHCHuang@nuvoton.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=anatol.pomozov@gmail.com \
    --cc=benzh@chromium.org \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=yong.zhi@intel.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.