Takashi Iwai 4cdc115fd3 ALSA: pcm - Fix drain behavior in non-blocking mode
The current PCM core has the following problems regarding PCM draining
in non-blocking mode:

- the current f_flags isn't checked in snd_pcm_drain(), thus changing
  the mode dynamically via snd_pcm_nonblock() after open doesn't work.
- calling drain in non-blocking mode just return -EAGAIN error, but
  doesn't provide any way to sync with draining.

This patch fixes these issues.
- check file->f_flags in snd_pcm_drain() properly
- when O_NONBLOCK is set, PCM core sets the stream(s) to DRAIN state
  but quits ioctl immediately without waiting the whole drain; the
  caller can sync the drain manually via poll()

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-08-20 16:40:16 +02:00
..
2009-04-14 12:39:12 +02:00
2008-01-31 17:29:48 +01:00
2008-01-31 17:29:48 +01:00
2008-10-18 11:05:36 +02:00
2009-03-24 00:35:50 +01:00
2009-01-06 15:59:11 -08:00
2009-04-14 12:39:12 +02:00