Re: [Pkg-alsa-devel] Bug#438118: alsa-utils: aplay non-blocking mode isn't working

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 14 Dec 2007, Anders Boström wrote:

> >>>>> "TI" == Takashi Iwai <tiwai@xxxxxxx> writes:
> 
>  TI> OK, thanks, I see the problem now.
>  >> 
>  TI> I don't remember whether it's a feature or a bug.  The drain ioctl
>  TI> rejects the non-block mode.
>  >> 
>  >> I can understand the idea here, that in non-blocking mode, no call
>  >> should block, ever. But on the other hand, if you call the drain
>  >> ioctl, you probably expect it to work, even in non-blocking mode. Why
>  >> would you otherwise call it?
> 
>  TI> Yes, that's my opinion, too.  This particular ioctl is to block the
>  TI> operation, so it should be allowed as long as it's called.
> 
>  TI> But I vaguely remember that we discussed about it, and the current
>  TI> form is the result of that.  Namely, we can call
>  TI> snd_pcm_nonblock(FALSE) explicitly before calling snd_pcm_drain().
> 
>  TI> Though, I prefer fixing the behavior in the core side to allow the
>  TI> blocking with this call...  Any reasonable objections in mind?
> 
> Any progress in including a solotion to this bug in mainstream
> alsa & linux kernel? Has anything been done? The patch works fine for
> me...

I think that this proposal breaks basic posix rules. Application should 
change blocking state itself. And non-blocking snd_pcm_drain() still makes 
sense - it will return state of stream (-EAGAIN - unfinished) or reset PCM 
state to SETUP in case when all data are played.

						Jaroslav

-----
Jaroslav Kysela <perex@xxxxxxxx>
Linux Kernel Sound Maintainer
ALSA Project
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux