blob: e755b5121ec728be29aed547b662c02994b2dc50 [file] [log] [blame]
Chaithrika U Sb67f4482009-06-05 06:28:40 -04001/*
2 * ALSA SoC McASP Audio Layer for TI DAVINCI processor
3 *
4 * MCASP related definitions
5 *
6 * Author: Nirmal Pandey <n-pandey@ti.com>,
7 * Suresh Rajashekara <suresh.r@ti.com>
8 * Steve Chen <schen@.mvista.com>
9 *
10 * Copyright: (C) 2009 MontaVista Software, Inc., <source@mvista.com>
11 * Copyright: (C) 2009 Texas Instruments, India
12 *
13 * This program is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License version 2 as
15 * published by the Free Software Foundation.
16 */
17
18#ifndef DAVINCI_MCASP_H
19#define DAVINCI_MCASP_H
20
21#include <linux/io.h>
22#include <mach/asp.h>
23#include "davinci-pcm.h"
24
25extern struct snd_soc_dai davinci_mcasp_dai[];
26
27#define DAVINCI_MCASP_RATES SNDRV_PCM_RATE_8000_96000
28#define DAVINCI_MCASP_I2S_DAI 0
29#define DAVINCI_MCASP_DIT_DAI 1
30
31enum {
32 DAVINCI_AUDIO_WORD_8 = 0,
33 DAVINCI_AUDIO_WORD_12,
34 DAVINCI_AUDIO_WORD_16,
35 DAVINCI_AUDIO_WORD_20,
36 DAVINCI_AUDIO_WORD_24,
37 DAVINCI_AUDIO_WORD_32,
38 DAVINCI_AUDIO_WORD_28, /* This is only valid for McASP */
39};
40
41struct davinci_audio_dev {
Troy Kisky92e2a6f2009-09-11 14:29:03 -070042 struct davinci_pcm_dma_params dma_params[2];
Chaithrika U Sb67f4482009-06-05 06:28:40 -040043 void __iomem *base;
44 int sample_rate;
45 struct clk *clk;
Chaithrika U Sb67f4482009-06-05 06:28:40 -040046 unsigned int codec_fmt;
Chaithrika U Sa47979b2009-12-03 18:56:56 +053047 u8 clk_active;
Chaithrika U Sb67f4482009-06-05 06:28:40 -040048
49 /* McASP specific data */
50 int tdm_slots;
51 u8 op_mode;
52 u8 num_serializer;
53 u8 *serial_dir;
Chaithrika U S6a99fb52009-08-11 16:58:52 -040054 u8 version;
55
56 /* McASP FIFO related */
57 u8 txnumevt;
58 u8 rxnumevt;
Chaithrika U Sb67f4482009-06-05 06:28:40 -040059};
60
61#endif /* DAVINCI_MCASP_H */