[ARM] tegra: tegra_i2s_audio: clean up handling of state
authorIliyan Malchev <malchev@google.com>
Wed, 18 Aug 2010 01:36:41 +0000 (18:36 -0700)
committerColin Cross <ccross@android.com>
Wed, 6 Oct 2010 23:27:49 +0000 (16:27 -0700)
commita69a4cbdc96e2b1ad2d617064c5d8709e5606bbb
tree73091f5100d74030ad48342687ae568722bbd8ab
parent6eb1d61bddb9ddf1bc82aff5ed2093daf88dd3b2
[ARM] tegra: tegra_i2s_audio: clean up handling of state

-- Use consistently the various state flags:
   -- active is set only when there is a read or write in flight
   -- recording_canncelled is set only when recording is stopped via the ioctl()
   -- dma_has_it is used to determine whether DMA is already in flight; do not
      use the state of the fifos for this (e.g., if the TX fifo is empty, do not
      assume that playback is stopped)
   -- added a stop_completion (implemented for readers only) so that readers
      closing a stream can wait until DMA or PIO transactions are stopped
-- Split /dev/audio0_{in,out} into /dev/audio0_{in,in_ctl,out,out_ctl} where the
   _ctl versions have the ioctl()s
-- Introduced an error count per audio_stream; error count is reset on open, can
   be read back & reset through an ioctl

Signed-off-by: Iliyan Malchev <malchev@google.com>
arch/arm/mach-tegra/tegra_i2s_audio.c
include/linux/tegra_audio.h