* Re: 10 Sec sleep in wait_for_avail_min function
[not found] <AANLkTim1729oJUmPvOkMGjBBKjb-BnnsWADPx1r3MmZ3@mail.gmail.com>
@ 2010-12-13 9:07 ` Clemens Ladisch
0 siblings, 0 replies; only message in thread
From: Clemens Ladisch @ 2010-12-13 9:07 UTC (permalink / raw)
To: alsa-devel; +Cc: alsa-devel
Nitin Arora wrote:
> I need to stream audio from my audio device to the host through USB.
> While audio is being streamed and songs are being played on the host
> and during that I plug out the audio device, Disconnect event takes
> too long to get reported and displayed on the screen (on GUI).
>
> I dug this problem a little deeper and found that when my application is
> continuous invoking read on the audio device to capture and audio data
> it follows this path:
>
> .... .. snd_pcm_lib_read -> snd_pcm_lib_read1 -> snd_pcm_capture_avail
>
> and in the case when there is no data left (MY DISCONNECT CASE)
> it invokes as follows:
>
> .... .. snd_pcm_lib_read -> snd_pcm_lib_read1 -> wait_for_avail_min
>
> and in wait_for_avail_min it sleeps for 10 sec.
This ten-second timeout is intended for devices where the interrupt does
not work for some reason.
In the case of USB disconnection, the driver should stop the stream
immediately. Does this happen if you try to record with the arecord
tool?
Regards,
Clemens
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-12-13 9:07 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <AANLkTim1729oJUmPvOkMGjBBKjb-BnnsWADPx1r3MmZ3@mail.gmail.com>
2010-12-13 9:07 ` 10 Sec sleep in wait_for_avail_min function Clemens Ladisch
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.