Chaithrika U S | b67f448 | 2009-06-05 06:28:40 -0400 | [diff] [blame] | 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 | */ |
| 17 | |
| 18 | #ifndef DAVINCI_MCASP_H |
| 19 | #define DAVINCI_MCASP_H |
| 20 | |
| 21 | #include <linux/io.h> |
Hebbar, Gururaja | 896f66b | 2012-08-27 18:56:41 +0530 | [diff] [blame] | 22 | #include <linux/platform_data/davinci_asp.h> |
| 23 | |
Chaithrika U S | b67f448 | 2009-06-05 06:28:40 -0400 | [diff] [blame] | 24 | #include "davinci-pcm.h" |
| 25 | |
Daniel Mack | 393a53c | 2012-10-04 15:08:38 +0200 | [diff] [blame] | 26 | #define DAVINCI_MCASP_RATES SNDRV_PCM_RATE_8000_192000 |
Chaithrika U S | b67f448 | 2009-06-05 06:28:40 -0400 | [diff] [blame] | 27 | #define DAVINCI_MCASP_I2S_DAI 0 |
| 28 | #define DAVINCI_MCASP_DIT_DAI 1 |
| 29 | |
| 30 | enum { |
| 31 | DAVINCI_AUDIO_WORD_8 = 0, |
| 32 | DAVINCI_AUDIO_WORD_12, |
| 33 | DAVINCI_AUDIO_WORD_16, |
| 34 | DAVINCI_AUDIO_WORD_20, |
| 35 | DAVINCI_AUDIO_WORD_24, |
| 36 | DAVINCI_AUDIO_WORD_32, |
| 37 | DAVINCI_AUDIO_WORD_28, /* This is only valid for McASP */ |
| 38 | }; |
| 39 | |
| 40 | struct davinci_audio_dev { |
Troy Kisky | 92e2a6f | 2009-09-11 14:29:03 -0700 | [diff] [blame] | 41 | struct davinci_pcm_dma_params dma_params[2]; |
Chaithrika U S | b67f448 | 2009-06-05 06:28:40 -0400 | [diff] [blame] | 42 | void __iomem *base; |
| 43 | int sample_rate; |
Hebbar, Gururaja | 1088434 | 2012-08-08 20:40:32 +0530 | [diff] [blame] | 44 | struct device *dev; |
Chaithrika U S | b67f448 | 2009-06-05 06:28:40 -0400 | [diff] [blame] | 45 | unsigned int codec_fmt; |
| 46 | |
| 47 | /* McASP specific data */ |
| 48 | int tdm_slots; |
| 49 | u8 op_mode; |
| 50 | u8 num_serializer; |
| 51 | u8 *serial_dir; |
Chaithrika U S | 6a99fb5 | 2009-08-11 16:58:52 -0400 | [diff] [blame] | 52 | u8 version; |
| 53 | |
| 54 | /* McASP FIFO related */ |
| 55 | u8 txnumevt; |
| 56 | u8 rxnumevt; |
Chaithrika U S | b67f448 | 2009-06-05 06:28:40 -0400 | [diff] [blame] | 57 | }; |
| 58 | |
| 59 | #endif /* DAVINCI_MCASP_H */ |