linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Zengtao (B)" <prime.zeng@hisilicon.com>
To: "perex@perex.cz" <perex@perex.cz>, "tiwai@suse.com" <tiwai@suse.com>
Cc: "alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Timeout issues in wait_for_avail function
Date: Mon, 7 May 2018 10:49:34 +0000	[thread overview]
Message-ID: <678F3D1BB717D949B966B68EAEB446ED0C8D7B4E@DGGEMM506-MBS.china.huawei.com> (raw)

Hi perex and tiwai:

I have met a timeout case when capture audio from snd-usb-audio device, 
when the host call the pcm_read and get into the wait_for_avail function.
The following happends
1.  No available data for capture(maybe because of the late response audio data by the uac device)
2.  The current thread falls into sleep state and no one wakes up it.
3.  The current thread will sleep 10s(schedule_timeout(1000)) and then wakeup.

I have two question about the wait_for_avail:
1. The timeout value too long, is it a reasonable value? 
2. Is there any mechanism to wake up the thread if there is data from the hw.

Regards
Zengtao

             reply	other threads:[~2018-05-07 10:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-07 10:49 Zengtao (B) [this message]
2018-05-13 10:40 ` [alsa-devel] Timeout issues in wait_for_avail function Takashi Iwai
2018-05-31  7:43   ` Zengtao (B)
2018-05-31  8:06     ` Takashi Iwai

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=678F3D1BB717D949B966B68EAEB446ED0C8D7B4E@DGGEMM506-MBS.china.huawei.com \
    --to=prime.zeng@hisilicon.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).