| Laxminath Kasam | 32657ec | 2011-08-01 19:26:57 +0530 | [diff] [blame] | 1 | /* Copyright (c) 2011, 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 | #ifndef _MSM_PCM_AFE_H |
| 13 | #define _MSM_PCM_AFE_H |
| 14 | #include <sound/apr_audio.h> |
| 15 | #include <sound/q6afe.h> |
| 16 | |
| 17 | |
| 18 | struct pcm_afe_info { |
| 19 | unsigned long dma_addr; |
| 20 | struct snd_pcm_substream *substream; |
| 21 | unsigned int pcm_irq_pos; /* IRQ position */ |
| 22 | struct mutex lock; |
| 23 | spinlock_t dsp_lock; |
| 24 | uint32_t samp_rate; |
| 25 | uint32_t channel_mode; |
| 26 | uint8_t start; |
| 27 | uint32_t dsp_cnt; |
| 28 | uint32_t buf_phys; |
| 29 | int32_t mmap_flag; |
| 30 | int prepared; |
| 31 | struct hrtimer hrt; |
| Laxminath Kasam | fa53b9f | 2011-09-22 15:14:18 +0530 | [diff] [blame] | 32 | int poll_time; |
| Laxminath Kasam | 32657ec | 2011-08-01 19:26:57 +0530 | [diff] [blame] | 33 | }; |
| 34 | |
| 35 | |
| 36 | #define MSM_EXT(xname, fp_info, fp_get, fp_put, addr) \ |
| 37 | {.iface = SNDRV_CTL_ELEM_IFACE_MIXER, \ |
| 38 | .access = SNDRV_CTL_ELEM_ACCESS_READWRITE, \ |
| 39 | .name = xname, \ |
| 40 | .info = fp_info,\ |
| 41 | .get = fp_get, .put = fp_put, \ |
| 42 | .private_value = addr, \ |
| 43 | } |
| 44 | |
| 45 | #endif /*_MSM_PCM_AFE_H*/ |