summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/include/mach/audio.h
diff options
context:
space:
mode:
authorIliyan Malchev <malchev@google.com>2010-07-29 14:00:54 -0700
committerDan Willemsen <dwillemsen@nvidia.com>2011-11-30 21:34:56 -0800
commit9a84745ee9c4f2952101bfaa15bb2adb3e099e96 (patch)
tree701a6247284b9b49176ceae1b1ec069eed60b15b /arch/arm/mach-tegra/include/mach/audio.h
parent67bac30fe828af9319634c04ef1e9723a15b7499 (diff)
[ARM] tegra: generic driver for i2s audio (initial implementation)
-- i2s settings are passed through the board file -- supports playback (no recording yet) -- works in DMA and PIO (non-DMA) modes (toggle through debugfs) -- does NOT perform volume and audio-path control -- exports /dev/audio<n>_{in, out}, where <n> is the i2s interface -- assumes that i2s is used such that fifo1 is TX and fifo2 is RX Signed-off-by: Iliyan Malchev <malchev@google.com>
Diffstat (limited to 'arch/arm/mach-tegra/include/mach/audio.h')
-rw-r--r--arch/arm/mach-tegra/include/mach/audio.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/include/mach/audio.h b/arch/arm/mach-tegra/include/mach/audio.h
new file mode 100644
index 000000000000..1e65b7c300d5
--- /dev/null
+++ b/arch/arm/mach-tegra/include/mach/audio.h
@@ -0,0 +1,46 @@
+/*
+ * arch/arm/mach-tegra/include/mach/audio.h
+ *
+ * Copyright (C) 2010 Google, Inc.
+ *
+ * Author:
+ * Iliyan Malchev <malchev@google.com>
+ *
+ * This software is licensed under the terms of the GNU General Public
+ * License version 2, as published by the Free Software Foundation, and
+ * may be copied, distributed, and modified under those terms.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ */
+
+#ifndef __ARCH_ARM_MACH_TEGRA_AUDIO_H
+#define __ARCH_ARM_MACH_TEGRA_AUDIO_H
+
+#include <linux/kernel.h>
+#include <linux/types.h>
+#include <mach/i2s.h>
+
+#define FIFO1 0
+#define FIFO2 1
+
+/* FIXME: this is not enforced by the hardware. */
+#define I2S_FIFO_TX FIFO1
+#define I2S_FIFO_RX FIFO2
+
+struct tegra_audio_platform_data {
+ bool master;
+ bool dma_on;
+ unsigned long i2s_clk_rate;
+ const char *dap_clk;
+ const char *audio_sync_clk;
+
+ int mode; /* I2S, LJM, RJM, etc. */
+ int fifo_fmt;
+ int bit_size;
+};
+
+#endif /* __ARCH_ARM_MACH_TEGRA_AUDIO_H */