Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame^] | 1 | /* Copyright (c) 2010, Code Aurora Forum. All rights reserved. |
| 2 | * |
| 3 | * This program is free software; you can redistribute it and/or modify |
| 4 | * it under the terms of the GNU General Public License version 2 and |
| 5 | * only version 2 as published by the Free Software Foundation. |
| 6 | * |
| 7 | * This program is distributed in the hope that it will be useful, |
| 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 10 | * GNU General Public License for more details. |
| 11 | */ |
| 12 | |
| 13 | #ifndef _MSM_PCM_H |
| 14 | #define _MSM_PCM_H |
| 15 | |
| 16 | #define USE_CHANNELS_MIN 1 |
| 17 | #define USE_CHANNELS_MAX 2 |
| 18 | #define NUM_DMAS 9 |
| 19 | #define DMASZ 16384 |
| 20 | #define MAX_CHANNELS 9 |
| 21 | |
| 22 | #define MSM_LPA_PHYS 0x28100000 |
| 23 | #define MSM_LPA_END 0x2810DFFF |
| 24 | |
| 25 | |
| 26 | struct msm_audio { |
| 27 | struct snd_pcm_substream *substream; |
| 28 | |
| 29 | /* data allocated for various buffers */ |
| 30 | char *data; |
| 31 | dma_addr_t phys; |
| 32 | |
| 33 | unsigned int pcm_size; |
| 34 | unsigned int pcm_count; |
| 35 | int enabled; |
| 36 | int period; |
| 37 | int dma_ch; |
| 38 | int period_index; |
| 39 | int start; |
| 40 | }; |
| 41 | |
| 42 | extern struct snd_soc_dai msm_cpu_dai[NUM_DMAS]; |
| 43 | extern struct snd_soc_platform msm8660_soc_platform; |
| 44 | |
| 45 | #endif /*_MSM_PCM_H*/ |