summaryrefslogtreecommitdiff
path: root/include/linux/tegra_audio.h
diff options
context:
space:
mode:
authorIliyan Malchev <malchev@google.com>2010-10-12 12:50:48 -0700
committerDan Willemsen <dwillemsen@nvidia.com>2011-11-30 21:36:13 -0800
commit6546383b55c28690426e66037d93ecaccf4d0150 (patch)
tree58052b2e51fadbc26f174d726a948d2228514680 /include/linux/tegra_audio.h
parente1b69a7f443ebfa21a380338c451ee37cc4d6437 (diff)
[ARM] tegra_i2s_audio: fixes
-- Ignore kfifo thresholds on recording and playback and adjust the delays. -- Take out the code from TEGRA_AUDIO_IN_STOP into a separate function stop_recording_nosync() -- Rename stop_recording() to wait_for_recording_to_stop(). -- add ioctl(TEGRA_AUDIO_OUT_FLUSH), which blocks the caller until the output fifo is drained. While the caller is blocked, pending write() calls will return immediately with whatever data they had managed to queue up. -- removed ioctl(TEGRA_AUDIO_OUT_PRELOAD_FIFO) -- since TEGRA_AUDIO_OUT_FLUSH and TEGRA_AUDIO_IN_STOP act similarly, moved audio_driver_state::recording_cancelled to audio_stream::stop and changed the code accordingly. Renamed functions wait_for_recording_to_stop() and stop_recording_nosync() to wait_till_stopped() and request_stop_nosync() since they handle both playback and recording. -- print errors on close() if wakelocks are still held -- Call request_stop_nosync() on close() of a recording file handle -- Do not use struct audio_stream::active for playback streams. Instead, where applicable, use kfifo_len(). As a consequence, playback kfifo underruns are no longer reported. These were bogus anyway, as we really need the DMA engine to tell us if there are underruns. -- Because of above item, had to rework tx_fifo_atn_store(), rx_fifo_atn_store(), and __attr_fifo_atn_write(). -- Set struct audio_stream::active for a recording stream to true when a recording starts, and set it to false when recording get stopped. Do not set/clear it within the body of read(), because just being within read() does not mean that recording is in progress. -- In tegra_audio_read(), check for stop == true before calling start_recording_if_necessary(); this makes sure that if a user calls read() after calling ioctl(TEGRA_AUDIO_IN_STOP), recording will not resume unless ioctl(TEGRA_AUDIO_IN_START) gets called, or the file is closed and re-opened. -- Fixed TEGRA_AUDIO_IN_START -- In PIO mode, enabled FIFOs before enabling interrupts as specified in the TRM. -- Added missing break in tegra_audio_ioctl(). -- Silenced some debug spew Signed-off-by: Iliyan Malchev <malchev@google.com>
Diffstat (limited to 'include/linux/tegra_audio.h')
-rw-r--r--include/linux/tegra_audio.h13
1 files changed, 3 insertions, 10 deletions
diff --git a/include/linux/tegra_audio.h b/include/linux/tegra_audio.h
index b97b640819a0..0ca6250beac4 100644
--- a/include/linux/tegra_audio.h
+++ b/include/linux/tegra_audio.h
@@ -63,20 +63,13 @@ struct tegra_audio_error_counts {
#define TEGRA_AUDIO_OUT_GET_ERROR_COUNT _IOR(TEGRA_AUDIO_MAGIC, 9, \
struct tegra_audio_error_counts *)
-struct tegra_audio_out_preload {
- void *data;
- size_t len;
- size_t len_written;
-};
-
-#define TEGRA_AUDIO_OUT_PRELOAD_FIFO _IOWR(TEGRA_AUDIO_MAGIC, 10, \
- struct tegra_audio_out_preload *)
+#define TEGRA_AUDIO_OUT_FLUSH _IO(TEGRA_AUDIO_MAGIC, 10)
#define TEGRA_AUDIO_BIT_FORMAT_DEFAULT 0
#define TEGRA_AUDIO_BIT_FORMAT_DSP 1
-#define TEGRA_AUDIO_SET_BIT_FORMAT _IOW(TEGRA_AUDIO_MAGIC, 11, \
+#define TEGRA_AUDIO_SET_BIT_FORMAT _IOW(TEGRA_AUDIO_MAGIC, 11, \
unsigned int *)
-#define TEGRA_AUDIO_GET_BIT_FORMAT _IOR(TEGRA_AUDIO_MAGIC, 12, \
+#define TEGRA_AUDIO_GET_BIT_FORMAT _IOR(TEGRA_AUDIO_MAGIC, 12, \
unsigned int *)
#endif/*_CPCAP_AUDIO_H*/