]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - sitara-epos/sitara-epos-kernel.git/blob - sound/soc/davinci/davinci-mcasp.h
ASoC: McASP: use runtime PM for better clock handling
[sitara-epos/sitara-epos-kernel.git] / sound / soc / davinci / davinci-mcasp.h
1 /*
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  */
18 #ifndef DAVINCI_MCASP_H
19 #define DAVINCI_MCASP_H
21 #include <linux/io.h>
22 #include <asm/hardware/asp.h>
23 #include "davinci-pcm.h"
25 #define DAVINCI_MCASP_RATES     SNDRV_PCM_RATE_8000_96000
26 #define DAVINCI_MCASP_I2S_DAI   0
27 #define DAVINCI_MCASP_DIT_DAI   1
29 enum {
30         DAVINCI_AUDIO_WORD_8 = 0,
31         DAVINCI_AUDIO_WORD_12,
32         DAVINCI_AUDIO_WORD_16,
33         DAVINCI_AUDIO_WORD_20,
34         DAVINCI_AUDIO_WORD_24,
35         DAVINCI_AUDIO_WORD_32,
36         DAVINCI_AUDIO_WORD_28,  /* This is only valid for McASP */
37 };
39 struct davinci_audio_dev {
40         struct davinci_pcm_dma_params dma_params[2];
41         struct device *dev;
42         void __iomem *base;
43         int sample_rate;
44         struct clk *clk;
45         unsigned int codec_fmt;
46         u8 clk_active;
48         /* McASP specific data */
49         int     tdm_slots;
50         u8      op_mode;
51         u8      num_serializer;
52         u8      *serial_dir;
53         u8      version;
55         /* McASP FIFO related */
56         u8      txnumevt;
57         u8      rxnumevt;
58 };
60 #endif  /* DAVINCI_MCASP_H */