OSDN Git Service

Merge android-4.4-p.194 (2b29211) into msm-4.4
[sagit-ice-cold/kernel_xiaomi_msm8998.git] / include / sound / msm-slim-dma.h
1 /*
2  * Copyright (c) 2014, The Linux Foundation. All rights reserved.
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License version 2 and
6  * only version 2 as published by the Free Software Foundation.
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11  * GNU General Public License for more details.
12  *
13  */
14 #ifndef _MSM_SLIMBUS_DMA_H
15 #define _MSM_SLIMBUS_DMA_H
16
17 #include <linux/slimbus/slimbus.h>
18
19 /*
20  * struct msm_slim_dma_data - DMA data for slimbus data transfer
21  *
22  * @sdev: Handle to the slim_device instance associated with the
23  *        data transfer.
24  * @ph: Port handle for the slimbus ports.
25  * @dai_channel_ctl: callback function into the CPU dai driver
26  *                   to setup the data path.
27  *
28  * This structure is used to share the slimbus port handles and
29  * other data path setup related handles with other drivers.
30  */
31 struct msm_slim_dma_data {
32
33         /* Handle to slimbus device */
34         struct slim_device *sdev;
35
36         /* Port Handle */
37         u32 ph;
38
39         /* Callback for data channel control */
40         int (*dai_channel_ctl) (struct msm_slim_dma_data *dma_data,
41                                 struct snd_soc_dai *dai, bool enable);
42 };
43
44 #endif