All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Henningsson <david.henningsson@canonical.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: alsa-devel@alsa-project.org,
	Wang Xingchao <xingchao.wang@linux.intel.com>,
	xingchao.wang@intel.com, liam.r.girdwood@intel.com
Subject: Re: [PATCH 1/3] ALSA: hda - jack poll once if jackpoll_interval==0
Date: Wed, 24 Jul 2013 12:31:51 +0200	[thread overview]
Message-ID: <51EFAD17.3060502@canonical.com> (raw)
In-Reply-To: <s5h7gggp8wz.wl%tiwai@suse.de>

On 07/24/2013 12:08 PM, Takashi Iwai wrote:
> At Mon, 22 Jul 2013 03:19:16 -0400,
> Wang Xingchao wrote:
>>
>> jackpoll_interval used to poll jack event periodically, if it's 0,
>> give the caller one chance to probe jack status.
>
> Why?  I miss the background...
>
> jackpoll_interval=0 means that the polling is disabled.  So, there
> should be no polling at all.

I wondered that too, but figured it's to make the next patch work. I 
asked why one couldn't just call snd_hda_jack_set_dirty/poll_all from 
runtime_resume, but xingchao said it lead to a loop of some sort.

Reference: 
http://mailman.alsa-project.org/pipermail/alsa-devel/2013-July/064348.html

>
>
> Takashi
>
>> Signed-off-by: Wang Xingchao <xingchao.wang@linux.intel.com>
>> ---
>>   sound/pci/hda/hda_codec.c | 5 +++--
>>   1 file changed, 3 insertions(+), 2 deletions(-)
>>
>> diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
>> index 8a005f0..74c11bc 100644
>> --- a/sound/pci/hda/hda_codec.c
>> +++ b/sound/pci/hda/hda_codec.c
>> @@ -1216,11 +1216,12 @@ static void hda_jackpoll_work(struct work_struct *work)
>>   {
>>   	struct hda_codec *codec =
>>   		container_of(work, struct hda_codec, jackpoll_work.work);
>> -	if (!codec->jackpoll_interval)
>> -		return;
>>
>>   	snd_hda_jack_set_dirty_all(codec);
>>   	snd_hda_jack_poll_all(codec);
>> +	if (!codec->jackpoll_interval)
>> +		return;
>> +
>>   	queue_delayed_work(codec->bus->workq, &codec->jackpoll_work,
>>   			   codec->jackpoll_interval);
>>   }
>> --
>> 1.8.3.2
>>
>



-- 
David Henningsson, Canonical Ltd.
https://launchpad.net/~diwic

      reply	other threads:[~2013-07-24 10:31 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-22  7:19 [PATCH 1/3] ALSA: hda - jack poll once if jackpoll_interval==0 Wang Xingchao
2013-07-22  7:19 ` [PATCH 2/3] ALSA: hda - WAKEEN feature enabling for runtime pm Wang Xingchao
2013-07-23  7:36   ` David Henningsson
2013-07-23  8:06     ` Wang, Xingchao
2013-07-23  8:09     ` Wang, Xingchao
2013-07-24 10:48       ` Takashi Iwai
2013-07-24 11:36         ` David Henningsson
2013-07-24 12:24           ` Takashi Iwai
2013-07-25 12:54             ` Wang, Xingchao
2013-07-24 13:40         ` Wang, Xingchao
2013-07-24 13:52           ` Takashi Iwai
2013-07-24 14:02             ` Takashi Iwai
2013-07-24 14:06               ` Wang, Xingchao
2013-07-22  7:19 ` [PATCH 3/3] ALSA: hda - use azx_writew() for 16-bit length register Wang Xingchao
2013-07-24 14:00   ` Takashi Iwai
2013-07-24 10:08 ` [PATCH 1/3] ALSA: hda - jack poll once if jackpoll_interval==0 Takashi Iwai
2013-07-24 10:31   ` David Henningsson [this message]

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=51EFAD17.3060502@canonical.com \
    --to=david.henningsson@canonical.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=liam.r.girdwood@intel.com \
    --cc=tiwai@suse.de \
    --cc=xingchao.wang@intel.com \
    --cc=xingchao.wang@linux.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.