Path: blob/master/arch/arm/mach-davinci/include/mach/asp.h
17602 views
/*1* <mach/asp.h> - DaVinci Audio Serial Port support2*/3#ifndef __ASM_ARCH_DAVINCI_ASP_H4#define __ASM_ARCH_DAVINCI_ASP_H56#include <mach/irqs.h>7#include <mach/edma.h>89/* Bases of dm644x and dm355 register banks */10#define DAVINCI_ASP0_BASE 0x01E0200011#define DAVINCI_ASP1_BASE 0x01E040001213/* Bases of dm365 register banks */14#define DAVINCI_DM365_ASP0_BASE 0x01D020001516/* Bases of dm646x register banks */17#define DAVINCI_DM646X_MCASP0_REG_BASE 0x01D0100018#define DAVINCI_DM646X_MCASP1_REG_BASE 0x01D018001920/* Bases of da850/da830 McASP0 register banks */21#define DAVINCI_DA8XX_MCASP0_REG_BASE 0x01D000002223/* Bases of da830 McASP1 register banks */24#define DAVINCI_DA830_MCASP1_REG_BASE 0x01D040002526/* EDMA channels of dm644x and dm355 */27#define DAVINCI_DMA_ASP0_TX 228#define DAVINCI_DMA_ASP0_RX 329#define DAVINCI_DMA_ASP1_TX 830#define DAVINCI_DMA_ASP1_RX 93132/* EDMA channels of dm646x */33#define DAVINCI_DM646X_DMA_MCASP0_AXEVT0 634#define DAVINCI_DM646X_DMA_MCASP0_AREVT0 935#define DAVINCI_DM646X_DMA_MCASP1_AXEVT1 123637/* EDMA channels of da850/da830 McASP0 */38#define DAVINCI_DA8XX_DMA_MCASP0_AREVT 039#define DAVINCI_DA8XX_DMA_MCASP0_AXEVT 14041/* EDMA channels of da830 McASP1 */42#define DAVINCI_DA830_DMA_MCASP1_AREVT 243#define DAVINCI_DA830_DMA_MCASP1_AXEVT 34445/* Interrupts */46#define DAVINCI_ASP0_RX_INT IRQ_MBRINT47#define DAVINCI_ASP0_TX_INT IRQ_MBXINT48#define DAVINCI_ASP1_RX_INT IRQ_MBRINT49#define DAVINCI_ASP1_TX_INT IRQ_MBXINT5051struct snd_platform_data {52u32 tx_dma_offset;53u32 rx_dma_offset;54enum dma_event_q asp_chan_q; /* event queue number for ASP channel */55enum dma_event_q ram_chan_q; /* event queue number for RAM channel */56unsigned int codec_fmt;57/*58* Allowing this is more efficient and eliminates left and right swaps59* caused by underruns, but will swap the left and right channels60* when compared to previous behavior.61*/62unsigned enable_channel_combine:1;63unsigned sram_size_playback;64unsigned sram_size_capture;6566/*67* If McBSP peripheral gets the clock from an external pin,68* there are three chooses, that are MCBSP_CLKX, MCBSP_CLKR69* and MCBSP_CLKS.70* Depending on different hardware connections it is possible71* to use this setting to change the behaviour of McBSP72* driver. The dm365_clk_input_pin enum is available for dm36573*/74int clk_input_pin;7576/*77* This flag works when both clock and FS are outputs for the cpu78* and makes clock more accurate (FS is not symmetrical and the79* clock is very fast.80* The clock becoming faster is named81* i2s continuous serial clock (I2S_SCK) and it is an externally82* visible bit clock.83*84* first line : WordSelect85* second line : ContinuousSerialClock86* third line: SerialData87*88* SYMMETRICAL APPROACH:89* _______________________ LEFT90* _| RIGHT |______________________|91* _ _ _ _ _ _ _ _92* _| |_| |_ x16 _| |_| |_| |_| |_ x16 _| |_| |_93* _ _ _ _ _ _ _ _94* _/ \_/ \_ ... _/ \_/ \_/ \_/ \_ ... _/ \_/ \_95* \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/96*97* ACCURATE CLOCK APPROACH:98* ______________ LEFT99* _| RIGHT |_______________________________|100* _ _ _ _ _ _ _ _ _101* _| |_ x16 _| |_| |_ x16 _| |_| |_| |_| |_| |_| |102* _ _ _ _ dummy cycles103* _/ \_ ... _/ \_/ \_ ... _/ \__________________104* \_/ \_/ \_/ \_/105*106*/107bool i2s_accurate_sck;108109/* McASP specific fields */110int tdm_slots;111u8 op_mode;112u8 num_serializer;113u8 *serial_dir;114u8 version;115u8 txnumevt;116u8 rxnumevt;117};118119enum {120MCASP_VERSION_1 = 0, /* DM646x */121MCASP_VERSION_2, /* DA8xx/OMAPL1x */122};123124enum dm365_clk_input_pin {125MCBSP_CLKR = 0, /* DM365 */126MCBSP_CLKS,127};128129#define INACTIVE_MODE 0130#define TX_MODE 1131#define RX_MODE 2132133#define DAVINCI_MCASP_IIS_MODE 0134#define DAVINCI_MCASP_DIT_MODE 1135136#endif /* __ASM_ARCH_DAVINCI_ASP_H */137138139