[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>
This commit is contained in:
Iliyan Malchev
2010-07-29 14:00:54 -07:00
committed by Colin Cross
parent da9070a782
commit 80a4c65c42
3 changed files with 1146 additions and 0 deletions

View File

@@ -10,6 +10,7 @@ obj-y += delay.o
obj-y += powergate.o
obj-y += suspend.o
obj-y += fuse.o
obj-y += tegra_i2s_audio.o
obj-$(CONFIG_FIQ) += fiq.o
obj-y += usb_phy.o

View File

@@ -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 */

File diff suppressed because it is too large Load Diff