[ARM] tegra: tegra_i2s_audio: configure in/out buffer sizes from user space
authorIliyan Malchev <malchev@google.com>
Tue, 17 Aug 2010 18:34:39 +0000 (11:34 -0700)
committerColin Cross <ccross@android.com>
Wed, 6 Oct 2010 23:27:49 +0000 (16:27 -0700)
commit6eb1d61bddb9ddf1bc82aff5ed2093daf88dd3b2
tree886b1e4e7d575fd7c1c74c068a3f6a60981745ea
parent8ae52a62650c9c6cc933712e13a91bf54e1241f1
[ARM] tegra: tegra_i2s_audio: configure in/out buffer sizes from user space

-- Add ioctls for configuring buffer, threshold, and DMA-transaction sizes from
   user space.
-- Buffer sizes are provided in orders of magnitude.
-- Allocate max-sized buffers during probe, and allow the user to resize them
   only within the original allocation, to avoid the risk from kmalloc failing
   due to kernel-heap fragmentation, and also to avoid race conditions on DMA
   shut-down.
-- In tegra_audio_write(), moved the call to start_playback_if_necessary()
   immediately after writing to the fifo.  Otherwise, when the fifo size is
   smaller than what the user is trying to write, the user will block before
   playback is started.
-- Silenced printk spew on spinning on i2s registers after transactions are
   completed.
-- Cleaned up a 80-col style violation in downsample()

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