/* * ALSA SoC McASP Audio Layer for TI DAVINCI processor * * MCASP related definitions * * Author: Nirmal Pandey , * Suresh Rajashekara * Steve Chen * * Copyright: (C) 2009 MontaVista Software, Inc., * Copyright: (C) 2009 Texas Instruments, India * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ #ifndef DAVINCI_MCASP_H #define DAVINCI_MCASP_H #include #include #include "davinci-pcm.h" #define DAVINCI_MCASP_RATES SNDRV_PCM_RATE_8000_96000 #define DAVINCI_MCASP_I2S_DAI 0 #define DAVINCI_MCASP_DIT_DAI 1 enum { DAVINCI_AUDIO_WORD_8 = 0, DAVINCI_AUDIO_WORD_12, DAVINCI_AUDIO_WORD_16, DAVINCI_AUDIO_WORD_20, DAVINCI_AUDIO_WORD_24, DAVINCI_AUDIO_WORD_32, DAVINCI_AUDIO_WORD_28, /* This is only valid for McASP */ }; struct davinci_audio_dev { struct davinci_pcm_dma_params dma_params[2]; struct device *dev; void __iomem *base; int sample_rate; struct clk *clk; unsigned int codec_fmt; u8 clk_active; /* McASP specific data */ int tdm_slots; u8 op_mode; u8 num_serializer; u8 *serial_dir; u8 version; /* McASP FIFO related */ u8 txnumevt; u8 rxnumevt; /* backup related */ unsigned int *xrsrctl; unsigned int pfunc; unsigned int pdir; unsigned int gblctlx; unsigned int txmask; unsigned int txfmt; unsigned int txfmctl; unsigned int aclkxctl; unsigned int ahclkxctl; unsigned int txtdm; unsigned int wfifoctl; unsigned int gblctlr; unsigned int rxmask; unsigned int rxfmt; unsigned int rxfmctl; unsigned int aclkrctl; unsigned int ahclkrctl; unsigned int rxtdm; unsigned int rfifoctl; int context_loss_cnt; }; #endif /* DAVINCI_MCASP_H */