[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <s5h1sef96ua.wl-tiwai@suse.de>
Date: Sun, 13 May 2018 12:40:29 +0200
From: Takashi Iwai <tiwai@...e.de>
To: "Zengtao (B)" <prime.zeng@...ilicon.com>
Cc: "perex@...ex.cz" <perex@...ex.cz>,
"tiwai@...e.com" <tiwai@...e.com>,
"alsa-devel@...a-project.org" <alsa-devel@...a-project.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [alsa-devel] Timeout issues in wait_for_avail function
On Mon, 07 May 2018 12:49:34 +0200,
Zengtao (B) wrote:
>
> 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)
Hrm, in the case of capture, the data must be available.
If it's not the case, something is wrong.
> 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.
The scenario above shouldn't happen, so no need for discussion.
Rather we should check why it's woken up even though no data is
available.
You can check the tracepoints to see the action of PCM stream, and
confirm whether it's really no data, or it's just lost by some
reason (or looks as if so).
Takashi
Powered by blists - more mailing lists