blob: b3f457e9e544c07c13d191abbebd9201f4e6fa59 [file] [log] [blame]
Rohit kumarb242df42017-10-16 15:37:05 +05301/* Copyright (c) 2012-2017, The Linux Foundation. All rights reserved.
Asish Bhattacharya8e2277f2017-07-20 18:31:55 +05302 *
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_DAI_Q6_PDATA_H__
14
15#define __MSM_DAI_Q6_PDATA_H__
16
17#define MSM_MI2S_SD0 (1 << 0)
18#define MSM_MI2S_SD1 (1 << 1)
19#define MSM_MI2S_SD2 (1 << 2)
20#define MSM_MI2S_SD3 (1 << 3)
21#define MSM_MI2S_CAP_RX 0
22#define MSM_MI2S_CAP_TX 1
23
24#define MSM_PRIM_MI2S 0
25#define MSM_SEC_MI2S 1
26#define MSM_TERT_MI2S 2
27#define MSM_QUAT_MI2S 3
Rohit kumarb242df42017-10-16 15:37:05 +053028#define MSM_QUIN_MI2S 4
29#define MSM_SEC_MI2S_SD1 5
Asish Bhattacharya8e2277f2017-07-20 18:31:55 +053030#define MSM_SENARY_MI2S 6
31#define MSM_INT0_MI2S 7
32#define MSM_INT1_MI2S 8
33#define MSM_INT2_MI2S 9
34#define MSM_INT3_MI2S 10
35#define MSM_INT4_MI2S 11
36#define MSM_INT5_MI2S 12
37#define MSM_INT6_MI2S 13
38#define MSM_MI2S_MIN MSM_PRIM_MI2S
39#define MSM_MI2S_MAX MSM_INT6_MI2S
40
41struct msm_dai_auxpcm_config {
42 u16 mode;
43 u16 sync;
44 u16 frame;
45 u16 quant;
46 u16 num_slots;
47 u16 *slot_mapping;
48 u16 data;
49 u32 pcm_clk_rate;
50};
51
52struct msm_dai_auxpcm_pdata {
53 struct msm_dai_auxpcm_config mode_8k;
54 struct msm_dai_auxpcm_config mode_16k;
55};
56
57struct msm_mi2s_pdata {
58 u16 rx_sd_lines;
59 u16 tx_sd_lines;
60 u16 intf_id;
61};
62
63struct msm_i2s_data {
64 u32 capability; /* RX or TX */
65 u16 sd_lines;
66};
67
68struct msm_dai_tdm_group_config {
69 u16 group_id;
70 u16 num_ports;
71 u16 *port_id;
72 u32 clk_rate;
73};
74
75struct msm_dai_tdm_config {
76 u16 sync_mode;
77 u16 sync_src;
78 u16 data_out;
79 u16 invert_sync;
80 u16 data_delay;
81 u32 data_align;
82 u16 header_start_offset;
83 u16 header_width;
84 u16 header_num_frame_repeat;
85};
86
87struct msm_dai_tdm_pdata {
88 struct msm_dai_tdm_group_config group_config;
89 struct msm_dai_tdm_config config;
90};
91
92#endif