Galaxy S2: Added wired headset input device params
[yamaha-mc1n2-audio.git] / device / galaxys2.c
1 /*
2  * Copyright (C) 2012 Paul Kocialkowski <contact@paulk.fr>
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 as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
16  */
17
18 #include <stdio.h>
19 #include <stdlib.h>
20 #include <unistd.h>
21
22 #include <sys/types.h>
23 #include <sys/stat.h>
24 #include <fcntl.h>
25
26 #define LOG_TAG "Yamaha-MC1N2-Audio"
27 #include <cutils/log.h>
28
29 #include <yamaha-mc1n2-audio.h>
30
31 struct yamaha_mc1n2_audio_params_init galaxys2_params_init = {
32         .ae_info = {
33                 .bOnOff = 0x00,
34                 .abBex = { 0x00 },
35                 .abWide = { 0x00 },
36                 .abDrc = { 0x00 },
37                 .abEq5 = { 0x00 },
38                 .abEq3 = { 0x00 },
39         },
40
41         .path_info = {
42                 .asHpOut[0].abSrcOnOff[0] = MCDRV_SRC0_MIC3_OFF | MCDRV_SRC0_MIC2_OFF | MCDRV_SRC0_MIC1_OFF,
43                 .asHpOut[0].abSrcOnOff[1] = MCDRV_SRC1_LINE1_M_OFF | MCDRV_SRC1_LINE1_R_OFF | MCDRV_SRC1_LINE1_L_OFF,
44                 .asHpOut[0].abSrcOnOff[2] = MCDRV_SRC2_LINE2_M_OFF | MCDRV_SRC2_LINE2_R_OFF | MCDRV_SRC2_LINE2_L_OFF,
45                 .asHpOut[0].abSrcOnOff[3] = MCDRV_SRC3_DIR2_DIRECT_OFF | MCDRV_SRC3_DIR2_OFF | MCDRV_SRC3_DIR1_OFF,
46                 .asHpOut[0].abSrcOnOff[4] = MCDRV_SRC4_ADC1_OFF | MCDRV_SRC4_ADC0_OFF | MCDRV_SRC4_PDM_OFF | MCDRV_SRC4_DTMF_OFF,
47                 .asHpOut[0].abSrcOnOff[5] = MCDRV_SRC5_DAC_M_OFF | MCDRV_SRC5_DAC_R_OFF | MCDRV_SRC5_DAC_L_OFF,
48                 .asHpOut[0].abSrcOnOff[6] = MCDRV_SRC6_CDSP_DIRECT_OFF | MCDRV_SRC6_CDSP_OFF | MCDRV_SRC6_AE_OFF | MCDRV_SRC6_MIX_OFF,
49                 .asHpOut[1].abSrcOnOff[0] = MCDRV_SRC0_MIC3_OFF | MCDRV_SRC0_MIC2_OFF | MCDRV_SRC0_MIC1_OFF,
50                 .asHpOut[1].abSrcOnOff[1] = MCDRV_SRC1_LINE1_M_OFF | MCDRV_SRC1_LINE1_R_OFF | MCDRV_SRC1_LINE1_L_OFF,
51                 .asHpOut[1].abSrcOnOff[2] = MCDRV_SRC2_LINE2_M_OFF | MCDRV_SRC2_LINE2_R_OFF | MCDRV_SRC2_LINE2_L_OFF,
52                 .asHpOut[1].abSrcOnOff[3] = MCDRV_SRC3_DIR2_DIRECT_OFF | MCDRV_SRC3_DIR2_OFF | MCDRV_SRC3_DIR1_OFF,
53                 .asHpOut[1].abSrcOnOff[4] = MCDRV_SRC4_ADC1_OFF | MCDRV_SRC4_ADC0_OFF | MCDRV_SRC4_PDM_OFF | MCDRV_SRC4_DTMF_OFF,
54                 .asHpOut[1].abSrcOnOff[5] = MCDRV_SRC5_DAC_M_OFF | MCDRV_SRC5_DAC_R_OFF | MCDRV_SRC5_DAC_L_OFF,
55                 .asHpOut[1].abSrcOnOff[6] = MCDRV_SRC6_CDSP_DIRECT_OFF | MCDRV_SRC6_CDSP_OFF | MCDRV_SRC6_AE_OFF | MCDRV_SRC6_MIX_OFF,
56
57                 .asSpOut[0].abSrcOnOff[0] = MCDRV_SRC0_MIC3_OFF | MCDRV_SRC0_MIC2_OFF | MCDRV_SRC0_MIC1_OFF,
58                 .asSpOut[0].abSrcOnOff[1] = MCDRV_SRC1_LINE1_M_OFF | MCDRV_SRC1_LINE1_R_OFF | MCDRV_SRC1_LINE1_L_OFF,
59                 .asSpOut[0].abSrcOnOff[2] = MCDRV_SRC2_LINE2_M_OFF | MCDRV_SRC2_LINE2_R_OFF | MCDRV_SRC2_LINE2_L_OFF,
60                 .asSpOut[0].abSrcOnOff[3] = MCDRV_SRC3_DIR2_DIRECT_OFF | MCDRV_SRC3_DIR2_OFF | MCDRV_SRC3_DIR1_OFF,
61                 .asSpOut[0].abSrcOnOff[4] = MCDRV_SRC4_ADC1_OFF | MCDRV_SRC4_ADC0_OFF | MCDRV_SRC4_PDM_OFF | MCDRV_SRC4_DTMF_OFF,
62                 .asSpOut[0].abSrcOnOff[5] = MCDRV_SRC5_DAC_M_OFF | MCDRV_SRC5_DAC_R_OFF | MCDRV_SRC5_DAC_L_OFF,
63                 .asSpOut[0].abSrcOnOff[6] = MCDRV_SRC6_CDSP_DIRECT_OFF | MCDRV_SRC6_CDSP_OFF | MCDRV_SRC6_AE_OFF | MCDRV_SRC6_MIX_OFF,
64                 .asSpOut[1].abSrcOnOff[0] = MCDRV_SRC0_MIC3_OFF | MCDRV_SRC0_MIC2_OFF | MCDRV_SRC0_MIC1_OFF,
65                 .asSpOut[1].abSrcOnOff[1] = MCDRV_SRC1_LINE1_M_OFF | MCDRV_SRC1_LINE1_R_OFF | MCDRV_SRC1_LINE1_L_OFF,
66                 .asSpOut[1].abSrcOnOff[2] = MCDRV_SRC2_LINE2_M_OFF | MCDRV_SRC2_LINE2_R_OFF | MCDRV_SRC2_LINE2_L_OFF,
67                 .asSpOut[1].abSrcOnOff[3] = MCDRV_SRC3_DIR2_DIRECT_OFF | MCDRV_SRC3_DIR2_OFF | MCDRV_SRC3_DIR1_OFF,
68                 .asSpOut[1].abSrcOnOff[4] = MCDRV_SRC4_ADC1_OFF | MCDRV_SRC4_ADC0_OFF | MCDRV_SRC4_PDM_OFF | MCDRV_SRC4_DTMF_OFF,
69                 .asSpOut[1].abSrcOnOff[5] = MCDRV_SRC5_DAC_M_OFF | MCDRV_SRC5_DAC_R_OFF | MCDRV_SRC5_DAC_L_OFF,
70                 .asSpOut[1].abSrcOnOff[6] = MCDRV_SRC6_CDSP_DIRECT_OFF | MCDRV_SRC6_CDSP_OFF | MCDRV_SRC6_AE_OFF | MCDRV_SRC6_MIX_OFF,
71
72                 .asRcOut[0].abSrcOnOff[0] = MCDRV_SRC0_MIC3_OFF | MCDRV_SRC0_MIC2_OFF | MCDRV_SRC0_MIC1_OFF,
73                 .asRcOut[0].abSrcOnOff[1] = MCDRV_SRC1_LINE1_M_OFF | MCDRV_SRC1_LINE1_R_OFF | MCDRV_SRC1_LINE1_L_OFF,
74                 .asRcOut[0].abSrcOnOff[2] = MCDRV_SRC2_LINE2_M_OFF | MCDRV_SRC2_LINE2_R_OFF | MCDRV_SRC2_LINE2_L_OFF,
75                 .asRcOut[0].abSrcOnOff[3] = MCDRV_SRC3_DIR2_DIRECT_OFF | MCDRV_SRC3_DIR2_OFF | MCDRV_SRC3_DIR1_OFF,
76                 .asRcOut[0].abSrcOnOff[4] = MCDRV_SRC4_ADC1_OFF | MCDRV_SRC4_ADC0_OFF | MCDRV_SRC4_PDM_OFF | MCDRV_SRC4_DTMF_OFF,
77                 .asRcOut[0].abSrcOnOff[5] = MCDRV_SRC5_DAC_M_OFF | MCDRV_SRC5_DAC_R_OFF | MCDRV_SRC5_DAC_L_OFF,
78                 .asRcOut[0].abSrcOnOff[6] = MCDRV_SRC6_CDSP_DIRECT_OFF | MCDRV_SRC6_CDSP_OFF | MCDRV_SRC6_AE_OFF | MCDRV_SRC6_MIX_OFF,
79
80                 .asLout1[0].abSrcOnOff[0] = MCDRV_SRC0_MIC3_OFF | MCDRV_SRC0_MIC2_OFF | MCDRV_SRC0_MIC1_OFF,
81                 .asLout1[0].abSrcOnOff[1] = MCDRV_SRC1_LINE1_M_OFF | MCDRV_SRC1_LINE1_R_OFF | MCDRV_SRC1_LINE1_L_OFF,
82                 .asLout1[0].abSrcOnOff[2] = MCDRV_SRC2_LINE2_M_OFF | MCDRV_SRC2_LINE2_R_OFF | MCDRV_SRC2_LINE2_L_OFF,
83                 .asLout1[0].abSrcOnOff[3] = MCDRV_SRC3_DIR2_DIRECT_OFF | MCDRV_SRC3_DIR2_OFF | MCDRV_SRC3_DIR1_OFF,
84                 .asLout1[0].abSrcOnOff[4] = MCDRV_SRC4_ADC1_OFF | MCDRV_SRC4_ADC0_OFF | MCDRV_SRC4_PDM_OFF | MCDRV_SRC4_DTMF_OFF,
85                 .asLout1[0].abSrcOnOff[5] = MCDRV_SRC5_DAC_M_OFF | MCDRV_SRC5_DAC_R_OFF | MCDRV_SRC5_DAC_L_OFF,
86                 .asLout1[0].abSrcOnOff[6] = MCDRV_SRC6_CDSP_DIRECT_OFF | MCDRV_SRC6_CDSP_OFF | MCDRV_SRC6_AE_OFF | MCDRV_SRC6_MIX_OFF,
87                 .asLout1[1].abSrcOnOff[0] = MCDRV_SRC0_MIC3_OFF | MCDRV_SRC0_MIC2_OFF | MCDRV_SRC0_MIC1_OFF,
88                 .asLout1[1].abSrcOnOff[1] = MCDRV_SRC1_LINE1_M_OFF | MCDRV_SRC1_LINE1_R_OFF | MCDRV_SRC1_LINE1_L_OFF,
89                 .asLout1[1].abSrcOnOff[2] = MCDRV_SRC2_LINE2_M_OFF | MCDRV_SRC2_LINE2_R_OFF | MCDRV_SRC2_LINE2_L_OFF,
90                 .asLout1[1].abSrcOnOff[3] = MCDRV_SRC3_DIR2_DIRECT_OFF | MCDRV_SRC3_DIR2_OFF | MCDRV_SRC3_DIR1_OFF,
91                 .asLout1[1].abSrcOnOff[4] = MCDRV_SRC4_ADC1_OFF | MCDRV_SRC4_ADC0_OFF | MCDRV_SRC4_PDM_OFF | MCDRV_SRC4_DTMF_OFF,
92                 .asLout1[1].abSrcOnOff[5] = MCDRV_SRC5_DAC_M_OFF | MCDRV_SRC5_DAC_R_OFF | MCDRV_SRC5_DAC_L_OFF,
93                 .asLout1[1].abSrcOnOff[6] = MCDRV_SRC6_CDSP_DIRECT_OFF | MCDRV_SRC6_CDSP_OFF | MCDRV_SRC6_AE_OFF | MCDRV_SRC6_MIX_OFF,
94
95                 .asLout2[0].abSrcOnOff[0] = MCDRV_SRC0_MIC3_OFF | MCDRV_SRC0_MIC2_OFF | MCDRV_SRC0_MIC1_OFF,
96                 .asLout2[0].abSrcOnOff[1] = MCDRV_SRC1_LINE1_M_OFF | MCDRV_SRC1_LINE1_R_OFF | MCDRV_SRC1_LINE1_L_OFF,
97                 .asLout2[0].abSrcOnOff[2] = MCDRV_SRC2_LINE2_M_OFF | MCDRV_SRC2_LINE2_R_OFF | MCDRV_SRC2_LINE2_L_OFF,
98                 .asLout2[0].abSrcOnOff[3] = MCDRV_SRC3_DIR2_DIRECT_OFF | MCDRV_SRC3_DIR2_OFF | MCDRV_SRC3_DIR1_OFF,
99                 .asLout2[0].abSrcOnOff[4] = MCDRV_SRC4_ADC1_OFF | MCDRV_SRC4_ADC0_OFF | MCDRV_SRC4_PDM_OFF | MCDRV_SRC4_DTMF_OFF,
100                 .asLout2[0].abSrcOnOff[5] = MCDRV_SRC5_DAC_M_OFF | MCDRV_SRC5_DAC_R_OFF | MCDRV_SRC5_DAC_L_OFF,
101                 .asLout2[0].abSrcOnOff[6] = MCDRV_SRC6_CDSP_DIRECT_OFF | MCDRV_SRC6_CDSP_OFF | MCDRV_SRC6_AE_OFF | MCDRV_SRC6_MIX_OFF,
102                 .asLout2[1].abSrcOnOff[0] = MCDRV_SRC0_MIC3_OFF | MCDRV_SRC0_MIC2_OFF | MCDRV_SRC0_MIC1_OFF,
103                 .asLout2[1].abSrcOnOff[1] = MCDRV_SRC1_LINE1_M_OFF | MCDRV_SRC1_LINE1_R_OFF | MCDRV_SRC1_LINE1_L_OFF,
104                 .asLout2[1].abSrcOnOff[2] = MCDRV_SRC2_LINE2_M_OFF | MCDRV_SRC2_LINE2_R_OFF | MCDRV_SRC2_LINE2_L_OFF,
105                 .asLout2[1].abSrcOnOff[3] = MCDRV_SRC3_DIR2_DIRECT_OFF | MCDRV_SRC3_DIR2_OFF | MCDRV_SRC3_DIR1_OFF,
106                 .asLout2[1].abSrcOnOff[4] = MCDRV_SRC4_ADC1_OFF | MCDRV_SRC4_ADC0_OFF | MCDRV_SRC4_PDM_OFF | MCDRV_SRC4_DTMF_OFF,
107                 .asLout2[1].abSrcOnOff[5] = MCDRV_SRC5_DAC_M_OFF | MCDRV_SRC5_DAC_R_OFF | MCDRV_SRC5_DAC_L_OFF,
108                 .asLout2[1].abSrcOnOff[6] = MCDRV_SRC6_CDSP_DIRECT_OFF | MCDRV_SRC6_CDSP_OFF | MCDRV_SRC6_AE_OFF | MCDRV_SRC6_MIX_OFF,
109
110                 .asPeak[0].abSrcOnOff[0] = MCDRV_SRC0_MIC3_OFF | MCDRV_SRC0_MIC2_OFF | MCDRV_SRC0_MIC1_OFF,
111                 .asPeak[0].abSrcOnOff[1] = MCDRV_SRC1_LINE1_M_OFF | MCDRV_SRC1_LINE1_R_OFF | MCDRV_SRC1_LINE1_L_OFF,
112                 .asPeak[0].abSrcOnOff[2] = MCDRV_SRC2_LINE2_M_OFF | MCDRV_SRC2_LINE2_R_OFF | MCDRV_SRC2_LINE2_L_OFF,
113                 .asPeak[0].abSrcOnOff[3] = MCDRV_SRC3_DIR2_DIRECT_OFF | MCDRV_SRC3_DIR2_OFF | MCDRV_SRC3_DIR1_OFF | MCDRV_SRC3_DIR0_OFF,
114                 .asPeak[0].abSrcOnOff[4] = MCDRV_SRC4_ADC1_OFF | MCDRV_SRC4_ADC0_OFF | MCDRV_SRC4_PDM_OFF | MCDRV_SRC4_DTMF_OFF,
115                 .asPeak[0].abSrcOnOff[5] = MCDRV_SRC5_DAC_M_OFF | MCDRV_SRC5_DAC_R_OFF | MCDRV_SRC5_DAC_L_OFF,
116                 .asPeak[0].abSrcOnOff[6] = MCDRV_SRC6_CDSP_DIRECT_OFF | MCDRV_SRC6_CDSP_OFF | MCDRV_SRC6_AE_OFF | MCDRV_SRC6_MIX_OFF,
117
118                 .asDit0[0].abSrcOnOff = { 0x00 },
119
120                 .asDit1[0].abSrcOnOff[0] = MCDRV_SRC0_MIC3_OFF | MCDRV_SRC0_MIC2_OFF | MCDRV_SRC0_MIC1_OFF,
121                 .asDit1[0].abSrcOnOff[1] = MCDRV_SRC1_LINE1_M_OFF | MCDRV_SRC1_LINE1_R_OFF | MCDRV_SRC1_LINE1_L_OFF,
122                 .asDit1[0].abSrcOnOff[2] = MCDRV_SRC2_LINE2_M_OFF | MCDRV_SRC2_LINE2_R_OFF | MCDRV_SRC2_LINE2_L_OFF,
123                 .asDit1[0].abSrcOnOff[3] = MCDRV_SRC3_DIR2_DIRECT_OFF | MCDRV_SRC3_DIR2_OFF | MCDRV_SRC3_DIR1_OFF,
124                 .asDit1[0].abSrcOnOff[4] = MCDRV_SRC4_ADC1_OFF | MCDRV_SRC4_ADC0_OFF | MCDRV_SRC4_PDM_OFF | MCDRV_SRC4_DTMF_OFF,
125                 .asDit1[0].abSrcOnOff[5] = MCDRV_SRC5_DAC_M_OFF | MCDRV_SRC5_DAC_R_OFF | MCDRV_SRC5_DAC_L_OFF,
126                 .asDit1[0].abSrcOnOff[6] = MCDRV_SRC6_CDSP_DIRECT_OFF | MCDRV_SRC6_CDSP_OFF | MCDRV_SRC6_AE_OFF | MCDRV_SRC6_MIX_OFF,
127
128                 .asDit2[0].abSrcOnOff[0] = MCDRV_SRC0_MIC3_OFF | MCDRV_SRC0_MIC2_OFF | MCDRV_SRC0_MIC1_OFF,
129                 .asDit2[0].abSrcOnOff[1] = MCDRV_SRC1_LINE1_M_OFF | MCDRV_SRC1_LINE1_R_OFF | MCDRV_SRC1_LINE1_L_OFF,
130                 .asDit2[0].abSrcOnOff[2] = MCDRV_SRC2_LINE2_M_OFF | MCDRV_SRC2_LINE2_R_OFF | MCDRV_SRC2_LINE2_L_OFF,
131                 .asDit2[0].abSrcOnOff[3] = MCDRV_SRC3_DIR2_DIRECT_OFF | MCDRV_SRC3_DIR2_OFF | MCDRV_SRC3_DIR1_OFF,
132                 .asDit2[0].abSrcOnOff[4] = MCDRV_SRC4_ADC1_OFF | MCDRV_SRC4_ADC0_OFF | MCDRV_SRC4_PDM_OFF | MCDRV_SRC4_DTMF_OFF,
133                 .asDit2[0].abSrcOnOff[5] = MCDRV_SRC5_DAC_M_OFF | MCDRV_SRC5_DAC_R_OFF | MCDRV_SRC5_DAC_L_OFF,
134                 .asDit2[0].abSrcOnOff[6] = MCDRV_SRC6_CDSP_DIRECT_OFF | MCDRV_SRC6_CDSP_OFF | MCDRV_SRC6_AE_OFF | MCDRV_SRC6_MIX_OFF,
135
136                 .asDac[0].abSrcOnOff[0] = MCDRV_SRC0_MIC3_OFF | MCDRV_SRC0_MIC2_OFF | MCDRV_SRC0_MIC1_OFF,
137                 .asDac[0].abSrcOnOff[1] = MCDRV_SRC1_LINE1_M_OFF | MCDRV_SRC1_LINE1_R_OFF | MCDRV_SRC1_LINE1_L_OFF,
138                 .asDac[0].abSrcOnOff[2] = MCDRV_SRC2_LINE2_M_OFF | MCDRV_SRC2_LINE2_R_OFF | MCDRV_SRC2_LINE2_L_OFF,
139                 .asDac[0].abSrcOnOff[3] = MCDRV_SRC3_DIR2_DIRECT_OFF | MCDRV_SRC3_DIR2_OFF | MCDRV_SRC3_DIR1_OFF,
140                 .asDac[0].abSrcOnOff[4] = MCDRV_SRC4_ADC1_OFF | MCDRV_SRC4_ADC0_OFF | MCDRV_SRC4_PDM_OFF | MCDRV_SRC4_DTMF_OFF,
141                 .asDac[0].abSrcOnOff[5] = MCDRV_SRC5_DAC_M_OFF | MCDRV_SRC5_DAC_R_OFF | MCDRV_SRC5_DAC_L_OFF,
142                 .asDac[0].abSrcOnOff[6] = MCDRV_SRC6_CDSP_DIRECT_OFF | MCDRV_SRC6_CDSP_OFF | MCDRV_SRC6_AE_OFF | MCDRV_SRC6_MIX_OFF,
143                 .asDac[1].abSrcOnOff[0] = MCDRV_SRC0_MIC3_OFF | MCDRV_SRC0_MIC2_OFF | MCDRV_SRC0_MIC1_OFF,
144                 .asDac[1].abSrcOnOff[1] = MCDRV_SRC1_LINE1_M_OFF | MCDRV_SRC1_LINE1_R_OFF | MCDRV_SRC1_LINE1_L_OFF,
145                 .asDac[1].abSrcOnOff[2] = MCDRV_SRC2_LINE2_M_OFF | MCDRV_SRC2_LINE2_R_OFF | MCDRV_SRC2_LINE2_L_OFF,
146                 .asDac[1].abSrcOnOff[3] = MCDRV_SRC3_DIR2_DIRECT_OFF | MCDRV_SRC3_DIR2_OFF | MCDRV_SRC3_DIR1_OFF,
147                 .asDac[1].abSrcOnOff[4] = MCDRV_SRC4_ADC1_OFF | MCDRV_SRC4_ADC0_OFF | MCDRV_SRC4_PDM_OFF | MCDRV_SRC4_DTMF_OFF,
148                 .asDac[1].abSrcOnOff[5] = MCDRV_SRC5_DAC_M_OFF | MCDRV_SRC5_DAC_R_OFF | MCDRV_SRC5_DAC_L_OFF,
149                 .asDac[1].abSrcOnOff[6] = MCDRV_SRC6_CDSP_DIRECT_OFF | MCDRV_SRC6_CDSP_OFF | MCDRV_SRC6_AE_OFF | MCDRV_SRC6_MIX_OFF,
150
151                 .asAe[0].abSrcOnOff[0] = MCDRV_SRC0_MIC3_OFF | MCDRV_SRC0_MIC2_OFF | MCDRV_SRC0_MIC1_OFF,
152                 .asAe[0].abSrcOnOff[1] = MCDRV_SRC1_LINE1_M_OFF | MCDRV_SRC1_LINE1_R_OFF | MCDRV_SRC1_LINE1_L_OFF,
153                 .asAe[0].abSrcOnOff[2] = MCDRV_SRC2_LINE2_M_OFF | MCDRV_SRC2_LINE2_R_OFF | MCDRV_SRC2_LINE2_L_OFF,
154                 .asAe[0].abSrcOnOff[3] = MCDRV_SRC3_DIR2_DIRECT_OFF | MCDRV_SRC3_DIR2_OFF | MCDRV_SRC3_DIR1_OFF,
155                 .asAe[0].abSrcOnOff[4] = MCDRV_SRC4_ADC1_OFF | MCDRV_SRC4_ADC0_OFF | MCDRV_SRC4_PDM_OFF | MCDRV_SRC4_DTMF_OFF,
156                 .asAe[0].abSrcOnOff[5] = MCDRV_SRC5_DAC_M_OFF | MCDRV_SRC5_DAC_R_OFF | MCDRV_SRC5_DAC_L_OFF,
157                 .asAe[0].abSrcOnOff[6] = MCDRV_SRC6_CDSP_DIRECT_OFF | MCDRV_SRC6_CDSP_OFF | MCDRV_SRC6_AE_OFF | MCDRV_SRC6_MIX_OFF,
158
159                 .asCdsp[0].abSrcOnOff[0] = MCDRV_SRC0_MIC3_OFF | MCDRV_SRC0_MIC2_OFF | MCDRV_SRC0_MIC1_OFF,
160                 .asCdsp[0].abSrcOnOff[1] = MCDRV_SRC1_LINE1_M_OFF | MCDRV_SRC1_LINE1_R_OFF | MCDRV_SRC1_LINE1_L_OFF,
161                 .asCdsp[0].abSrcOnOff[2] = MCDRV_SRC2_LINE2_M_OFF | MCDRV_SRC2_LINE2_R_OFF | MCDRV_SRC2_LINE2_L_OFF,
162                 .asCdsp[0].abSrcOnOff[3] = MCDRV_SRC3_DIR2_DIRECT_OFF | MCDRV_SRC3_DIR2_OFF | MCDRV_SRC3_DIR1_OFF | MCDRV_SRC3_DIR0_OFF,
163                 .asCdsp[0].abSrcOnOff[4] = MCDRV_SRC4_ADC1_OFF | MCDRV_SRC4_ADC0_OFF | MCDRV_SRC4_PDM_OFF | MCDRV_SRC4_DTMF_OFF,
164                 .asCdsp[0].abSrcOnOff[5] = MCDRV_SRC5_DAC_M_OFF | MCDRV_SRC5_DAC_R_OFF | MCDRV_SRC5_DAC_L_OFF,
165                 .asCdsp[0].abSrcOnOff[6] = MCDRV_SRC6_CDSP_DIRECT_OFF | MCDRV_SRC6_CDSP_OFF | MCDRV_SRC6_AE_OFF | MCDRV_SRC6_MIX_OFF,
166                 .asCdsp[1].abSrcOnOff[0] = MCDRV_SRC0_MIC3_OFF | MCDRV_SRC0_MIC2_OFF | MCDRV_SRC0_MIC1_OFF,
167                 .asCdsp[1].abSrcOnOff[1] = MCDRV_SRC1_LINE1_M_OFF | MCDRV_SRC1_LINE1_R_OFF | MCDRV_SRC1_LINE1_L_OFF,
168                 .asCdsp[1].abSrcOnOff[2] = MCDRV_SRC2_LINE2_M_OFF | MCDRV_SRC2_LINE2_R_OFF | MCDRV_SRC2_LINE2_L_OFF,
169                 .asCdsp[1].abSrcOnOff[3] = MCDRV_SRC3_DIR2_DIRECT_OFF | MCDRV_SRC3_DIR2_OFF | MCDRV_SRC3_DIR1_OFF | MCDRV_SRC3_DIR0_OFF,
170                 .asCdsp[1].abSrcOnOff[4] = MCDRV_SRC4_ADC1_OFF | MCDRV_SRC4_ADC0_OFF | MCDRV_SRC4_PDM_OFF | MCDRV_SRC4_DTMF_OFF,
171                 .asCdsp[1].abSrcOnOff[5] = MCDRV_SRC5_DAC_M_OFF | MCDRV_SRC5_DAC_R_OFF | MCDRV_SRC5_DAC_L_OFF,
172                 .asCdsp[1].abSrcOnOff[6] = MCDRV_SRC6_CDSP_DIRECT_OFF | MCDRV_SRC6_CDSP_OFF | MCDRV_SRC6_AE_OFF | MCDRV_SRC6_MIX_OFF,
173                 .asCdsp[2].abSrcOnOff = { 0x00 },
174                 .asCdsp[3].abSrcOnOff = { 0x00 },
175
176                 .asAdc0[0].abSrcOnOff[0] = MCDRV_SRC0_MIC3_OFF | MCDRV_SRC0_MIC2_OFF | MCDRV_SRC0_MIC1_OFF,
177                 .asAdc0[0].abSrcOnOff[1] = MCDRV_SRC1_LINE1_M_OFF | MCDRV_SRC1_LINE1_R_OFF | MCDRV_SRC1_LINE1_L_OFF,
178                 .asAdc0[0].abSrcOnOff[2] = MCDRV_SRC2_LINE2_M_OFF | MCDRV_SRC2_LINE2_R_OFF | MCDRV_SRC2_LINE2_L_OFF,
179                 .asAdc0[0].abSrcOnOff[3] = MCDRV_SRC3_DIR2_DIRECT_OFF | MCDRV_SRC3_DIR2_OFF | MCDRV_SRC3_DIR1_OFF,
180                 .asAdc0[0].abSrcOnOff[4] = MCDRV_SRC4_ADC1_OFF | MCDRV_SRC4_ADC0_OFF | MCDRV_SRC4_PDM_OFF | MCDRV_SRC4_DTMF_OFF,
181                 .asAdc0[0].abSrcOnOff[5] = MCDRV_SRC5_DAC_M_OFF | MCDRV_SRC5_DAC_R_OFF | MCDRV_SRC5_DAC_L_OFF,
182                 .asAdc0[0].abSrcOnOff[6] = MCDRV_SRC6_CDSP_DIRECT_OFF | MCDRV_SRC6_CDSP_OFF | MCDRV_SRC6_AE_OFF | MCDRV_SRC6_MIX_OFF,
183                 .asAdc0[1].abSrcOnOff[0] = MCDRV_SRC0_MIC3_OFF | MCDRV_SRC0_MIC2_OFF | MCDRV_SRC0_MIC1_OFF,
184                 .asAdc0[1].abSrcOnOff[1] = MCDRV_SRC1_LINE1_M_OFF | MCDRV_SRC1_LINE1_R_OFF | MCDRV_SRC1_LINE1_L_OFF,
185                 .asAdc0[1].abSrcOnOff[2] = MCDRV_SRC2_LINE2_M_OFF | MCDRV_SRC2_LINE2_R_OFF | MCDRV_SRC2_LINE2_L_OFF,
186                 .asAdc0[1].abSrcOnOff[3] = MCDRV_SRC3_DIR2_DIRECT_OFF | MCDRV_SRC3_DIR2_OFF | MCDRV_SRC3_DIR1_OFF,
187                 .asAdc0[1].abSrcOnOff[4] = MCDRV_SRC4_ADC1_OFF | MCDRV_SRC4_ADC0_OFF | MCDRV_SRC4_PDM_OFF | MCDRV_SRC4_DTMF_OFF,
188                 .asAdc0[1].abSrcOnOff[5] = MCDRV_SRC5_DAC_M_OFF | MCDRV_SRC5_DAC_R_OFF | MCDRV_SRC5_DAC_L_OFF,
189                 .asAdc0[1].abSrcOnOff[6] = MCDRV_SRC6_CDSP_DIRECT_OFF | MCDRV_SRC6_CDSP_OFF | MCDRV_SRC6_AE_OFF | MCDRV_SRC6_MIX_OFF,
190
191                 .asAdc1[0].abSrcOnOff[0] = MCDRV_SRC0_MIC3_OFF | MCDRV_SRC0_MIC2_OFF | MCDRV_SRC0_MIC1_OFF,
192                 .asAdc1[0].abSrcOnOff[1] = MCDRV_SRC1_LINE1_M_OFF | MCDRV_SRC1_LINE1_R_OFF | MCDRV_SRC1_LINE1_L_OFF,
193                 .asAdc1[0].abSrcOnOff[2] = MCDRV_SRC2_LINE2_M_OFF | MCDRV_SRC2_LINE2_R_OFF | MCDRV_SRC2_LINE2_L_OFF,
194                 .asAdc1[0].abSrcOnOff[3] = MCDRV_SRC3_DIR2_DIRECT_OFF | MCDRV_SRC3_DIR2_OFF | MCDRV_SRC3_DIR1_OFF | MCDRV_SRC3_DIR0_OFF,
195                 .asAdc1[0].abSrcOnOff[4] = MCDRV_SRC4_ADC1_OFF | MCDRV_SRC4_ADC0_OFF | MCDRV_SRC4_PDM_OFF | MCDRV_SRC4_DTMF_OFF,
196                 .asAdc1[0].abSrcOnOff[5] = MCDRV_SRC5_DAC_M_OFF | MCDRV_SRC5_DAC_R_OFF | MCDRV_SRC5_DAC_L_OFF,
197                 .asAdc1[0].abSrcOnOff[6] = MCDRV_SRC6_CDSP_DIRECT_OFF | MCDRV_SRC6_CDSP_OFF | MCDRV_SRC6_AE_OFF | MCDRV_SRC6_MIX_OFF,
198
199                 .asMix[0].abSrcOnOff[0] = MCDRV_SRC0_MIC3_OFF | MCDRV_SRC0_MIC2_OFF | MCDRV_SRC0_MIC1_OFF,
200                 .asMix[0].abSrcOnOff[1] = MCDRV_SRC1_LINE1_M_OFF | MCDRV_SRC1_LINE1_R_OFF | MCDRV_SRC1_LINE1_L_OFF,
201                 .asMix[0].abSrcOnOff[2] = MCDRV_SRC2_LINE2_M_OFF | MCDRV_SRC2_LINE2_R_OFF | MCDRV_SRC2_LINE2_L_OFF,
202                 .asMix[0].abSrcOnOff[3] = MCDRV_SRC3_DIR2_DIRECT_OFF | MCDRV_SRC3_DIR2_OFF | MCDRV_SRC3_DIR1_OFF,
203                 .asMix[0].abSrcOnOff[4] = MCDRV_SRC4_ADC1_OFF | MCDRV_SRC4_ADC0_OFF | MCDRV_SRC4_PDM_OFF | MCDRV_SRC4_DTMF_OFF,
204                 .asMix[0].abSrcOnOff[5] = MCDRV_SRC5_DAC_M_OFF | MCDRV_SRC5_DAC_R_OFF | MCDRV_SRC5_DAC_L_OFF,
205                 .asMix[0].abSrcOnOff[6] = MCDRV_SRC6_CDSP_DIRECT_OFF | MCDRV_SRC6_CDSP_OFF | MCDRV_SRC6_AE_OFF | MCDRV_SRC6_MIX_OFF,
206
207                 .asBias[0].abSrcOnOff[0] = MCDRV_SRC0_MIC3_OFF | MCDRV_SRC0_MIC2_OFF | MCDRV_SRC0_MIC1_OFF,
208                 .asBias[0].abSrcOnOff[1] = MCDRV_SRC1_LINE1_M_OFF | MCDRV_SRC1_LINE1_R_OFF | MCDRV_SRC1_LINE1_L_OFF,
209                 .asBias[0].abSrcOnOff[2] = MCDRV_SRC2_LINE2_M_OFF | MCDRV_SRC2_LINE2_R_OFF | MCDRV_SRC2_LINE2_L_OFF,
210                 .asBias[0].abSrcOnOff[3] = MCDRV_SRC3_DIR2_DIRECT_OFF | MCDRV_SRC3_DIR2_OFF | MCDRV_SRC3_DIR1_OFF,
211                 .asBias[0].abSrcOnOff[4] = MCDRV_SRC4_ADC1_OFF | MCDRV_SRC4_ADC0_OFF | MCDRV_SRC4_PDM_OFF | MCDRV_SRC4_DTMF_OFF,
212                 .asBias[0].abSrcOnOff[5] = MCDRV_SRC5_DAC_M_OFF | MCDRV_SRC5_DAC_R_OFF | MCDRV_SRC5_DAC_L_OFF,
213                 .asBias[0].abSrcOnOff[6] = MCDRV_SRC6_CDSP_DIRECT_OFF | MCDRV_SRC6_CDSP_OFF | MCDRV_SRC6_AE_OFF | MCDRV_SRC6_MIX_OFF,
214         },
215
216         .dac_info = {
217                 .bMasterSwap = MCDRV_DSWAP_OFF,
218                 .bVoiceSwap = MCDRV_DSWAP_OFF,
219                 .bDcCut = MCDRV_DCCUT_ON,
220         },
221
222         .adc_info = {
223                 .bAgcAdjust = MCDRV_AGCADJ_0,
224                 .bAgcOn = MCDRV_AGC_OFF,
225                 .bMono = MCDRV_ADC_STEREO,
226         },
227
228         .sp_info = {
229                 .bSwap = MCDRV_SPSWAP_OFF,
230         },
231
232         .pdm_info = {
233                 .bClk = MCDRV_PDM_CLK_64,
234                 .bAgcAdjust = MCDRV_AGCADJ_0,
235                 .bAgcOn = MCDRV_AGC_OFF,
236                 .bPdmEdge = MCDRV_PDMEDGE_LH,
237                 .bPdmWait = MCDRV_PDMWAIT_10,
238                 .bPdmSel = MCDRV_PDMSEL_L1R2,
239                 .bMono = MCDRV_PDM_STEREO,
240         },
241
242         .dng_info = {
243                 .abOnOff[MCDRV_DNG_ITEM_HP] = MCDRV_DNG_ON,
244                 .abThreshold[MCDRV_DNG_ITEM_HP] = MCDRV_DNG_THRES_60,
245                 .abHold[MCDRV_DNG_ITEM_HP] = MCDRV_DNG_HOLD_500,
246                 .abAttack[MCDRV_DNG_ITEM_HP] = MCDRV_DNG_ATTACK_100,
247                 .abRelease[MCDRV_DNG_ITEM_HP] = MCDRV_DNG_RELEASE_940,
248                 .abTarget[MCDRV_DNG_ITEM_HP] = MCDRV_DNG_TARGET_MUTE,
249
250                 .abOnOff[MCDRV_DNG_ITEM_SP] = MCDRV_DNG_ON,
251                 .abThreshold[MCDRV_DNG_ITEM_SP] = MCDRV_DNG_THRES_60,
252                 .abHold[MCDRV_DNG_ITEM_SP] = MCDRV_DNG_HOLD_500,
253                 .abAttack[MCDRV_DNG_ITEM_SP] = MCDRV_DNG_ATTACK_100,
254                 .abRelease[MCDRV_DNG_ITEM_SP] = MCDRV_DNG_RELEASE_940,
255                 .abTarget[MCDRV_DNG_ITEM_SP] = MCDRV_DNG_TARGET_MUTE,
256
257                 .abOnOff[MCDRV_DNG_ITEM_RC] = MCDRV_DNG_ON,
258                 .abThreshold[MCDRV_DNG_ITEM_RC] = MCDRV_DNG_THRES_60,
259                 .abHold[MCDRV_DNG_ITEM_RC] = MCDRV_DNG_HOLD_500,
260                 .abAttack[MCDRV_DNG_ITEM_RC] = MCDRV_DNG_ATTACK_100,
261                 .abRelease[MCDRV_DNG_ITEM_RC] = MCDRV_DNG_RELEASE_940,
262                 .abTarget[MCDRV_DNG_ITEM_RC] = MCDRV_DNG_TARGET_MUTE,
263         },
264
265         .syseq_info = {
266                 .bOnOff = MCDRV_SYSEQ_OFF,
267                 .abParam = {
268                         0x10, 0xc4, 0x50, 0x12, 0xc4,
269                         0x40, 0x02, 0xa9, 0x60, 0xed,
270                         0x3b, 0xc0, 0xfc, 0x92, 0x40
271                 },
272         },
273 };
274
275 struct yamaha_mc1n2_audio_params_route galaxys2_params_routes[] = {
276         {
277                 .device = AUDIO_DEVICE_OUT_SPEAKER,
278                 .mode = AUDIO_MODE_NORMAL,
279
280                 .ae_info = {
281                         .bOnOff = 0,
282                         .abBex = { 0 },
283                         .abWide = { 0 },
284                         .abDrc = { 0 },
285                         .abEq5 = { 0 },
286                         .abEq3 = { 0 },
287                 },
288
289                 .path_info.asHpOut[0].abSrcOnOff = { 0 },
290                 .path_info.asHpOut[1].abSrcOnOff = { 0 },
291                 .path_info.asSpOut[0].abSrcOnOff = { 0 },
292                 .path_info.asSpOut[1].abSrcOnOff = { 0 },
293                 .path_info.asRcOut[0].abSrcOnOff = { 0 },
294                 .path_info.asLout1[0].abSrcOnOff = { 0 },
295                 .path_info.asLout1[1].abSrcOnOff = { 0 },
296                 .path_info.asLout2[0].abSrcOnOff = { 0 },
297                 .path_info.asLout2[1].abSrcOnOff = { 0 },
298                 .path_info.asPeak[0].abSrcOnOff = { 0 },
299                 .path_info.asDit0[0].abSrcOnOff = { 0 },
300                 .path_info.asDit1[0].abSrcOnOff = { 0 },
301                 .path_info.asDit2[0].abSrcOnOff = { 0 },
302                 .path_info.asDac[0].abSrcOnOff = { 0 },
303                 .path_info.asDac[1].abSrcOnOff = { 0 },
304                 .path_info.asAe[0].abSrcOnOff = { 0 },
305                 .path_info.asCdsp[0].abSrcOnOff = { 0 },
306                 .path_info.asCdsp[1].abSrcOnOff = { 0 },
307                 .path_info.asCdsp[2].abSrcOnOff = { 0 },
308                 .path_info.asCdsp[3].abSrcOnOff = { 0 },
309                 .path_info.asAdc0[0].abSrcOnOff = { 0 },
310                 .path_info.asAdc0[1].abSrcOnOff = { 0 },
311                 .path_info.asAdc1[0].abSrcOnOff = { 0 },
312                 .path_info.asMix[0].abSrcOnOff = { 0 },
313                 .path_info.asBias[0].abSrcOnOff = { 0 },
314
315                 .path_info.asSpOut[0].abSrcOnOff[5] = MCDRV_SRC5_DAC_M_ON,
316                 .path_info.asDac[0].abSrcOnOff[6] = MCDRV_SRC6_MIX_ON,
317                 .path_info.asMix[0].abSrcOnOff[3] = MCDRV_SRC3_DIR0_ON,
318
319                 .dac_info = {
320                         .bMasterSwap = 0,
321                         .bVoiceSwap = 0,
322                         .bDcCut = 0,
323                 },
324         },
325         {
326                 .device = AUDIO_DEVICE_OUT_WIRED_HEADPHONE,
327                 .mode = AUDIO_MODE_NORMAL,
328
329                 .ae_info = {
330                         .bOnOff = 0x00,
331                         .abBex = { 0x00 },
332                         .abWide = { 0x00 },
333                         .abDrc = { 0x00 },
334                         .abEq5 = { 0x00 },
335                         .abEq3 = { 0x00 },
336                 },
337
338                 .path_info.asHpOut[0].abSrcOnOff = { 0 },
339                 .path_info.asHpOut[1].abSrcOnOff = { 0 },
340                 .path_info.asSpOut[0].abSrcOnOff = { 0 },
341                 .path_info.asSpOut[1].abSrcOnOff = { 0 },
342                 .path_info.asRcOut[0].abSrcOnOff = { 0 },
343                 .path_info.asLout1[0].abSrcOnOff = { 0 },
344                 .path_info.asLout1[1].abSrcOnOff = { 0 },
345                 .path_info.asLout2[0].abSrcOnOff = { 0 },
346                 .path_info.asLout2[1].abSrcOnOff = { 0 },
347                 .path_info.asPeak[0].abSrcOnOff = { 0 },
348                 .path_info.asDit0[0].abSrcOnOff = { 0 },
349                 .path_info.asDit1[0].abSrcOnOff = { 0 },
350                 .path_info.asDit2[0].abSrcOnOff = { 0 },
351                 .path_info.asDac[0].abSrcOnOff = { 0 },
352                 .path_info.asDac[1].abSrcOnOff = { 0 },
353                 .path_info.asAe[0].abSrcOnOff = { 0 },
354                 .path_info.asCdsp[0].abSrcOnOff = { 0 },
355                 .path_info.asCdsp[1].abSrcOnOff = { 0 },
356                 .path_info.asCdsp[2].abSrcOnOff = { 0 },
357                 .path_info.asCdsp[3].abSrcOnOff = { 0 },
358                 .path_info.asAdc0[0].abSrcOnOff = { 0 },
359                 .path_info.asAdc0[1].abSrcOnOff = { 0 },
360                 .path_info.asAdc1[0].abSrcOnOff = { 0 },
361                 .path_info.asMix[0].abSrcOnOff = { 0 },
362                 .path_info.asBias[0].abSrcOnOff = { 0 },
363
364                 .path_info.asHpOut[0].abSrcOnOff[5] = MCDRV_SRC5_DAC_L_ON,
365                 .path_info.asHpOut[1].abSrcOnOff[5] = MCDRV_SRC5_DAC_R_ON,
366                 .path_info.asDac[0].abSrcOnOff[6] = MCDRV_SRC6_MIX_ON,
367                 .path_info.asMix[0].abSrcOnOff[3] = MCDRV_SRC3_DIR0_ON,
368
369                 .dac_info = {
370                         .bMasterSwap = 0,
371                         .bVoiceSwap = 0,
372                         .bDcCut = 0,
373                 },
374         },
375         {
376                 .device = AUDIO_DEVICE_OUT_WIRED_HEADSET,
377                 .mode = AUDIO_MODE_NORMAL,
378
379                 .ae_info = {
380                         .bOnOff = 0x00,
381                         .abBex = { 0x00 },
382                         .abWide = { 0x00 },
383                         .abDrc = { 0x00 },
384                         .abEq5 = { 0x00 },
385                         .abEq3 = { 0x00 },
386                 },
387
388                 .path_info.asHpOut[0].abSrcOnOff = { 0 },
389                 .path_info.asHpOut[1].abSrcOnOff = { 0 },
390                 .path_info.asSpOut[0].abSrcOnOff = { 0 },
391                 .path_info.asSpOut[1].abSrcOnOff = { 0 },
392                 .path_info.asRcOut[0].abSrcOnOff = { 0 },
393                 .path_info.asLout1[0].abSrcOnOff = { 0 },
394                 .path_info.asLout1[1].abSrcOnOff = { 0 },
395                 .path_info.asLout2[0].abSrcOnOff = { 0 },
396                 .path_info.asLout2[1].abSrcOnOff = { 0 },
397                 .path_info.asPeak[0].abSrcOnOff = { 0 },
398                 .path_info.asDit0[0].abSrcOnOff = { 0 },
399                 .path_info.asDit1[0].abSrcOnOff = { 0 },
400                 .path_info.asDit2[0].abSrcOnOff = { 0 },
401                 .path_info.asDac[0].abSrcOnOff = { 0 },
402                 .path_info.asDac[1].abSrcOnOff = { 0 },
403                 .path_info.asAe[0].abSrcOnOff = { 0 },
404                 .path_info.asCdsp[0].abSrcOnOff = { 0 },
405                 .path_info.asCdsp[1].abSrcOnOff = { 0 },
406                 .path_info.asCdsp[2].abSrcOnOff = { 0 },
407                 .path_info.asCdsp[3].abSrcOnOff = { 0 },
408                 .path_info.asAdc0[0].abSrcOnOff = { 0 },
409                 .path_info.asAdc0[1].abSrcOnOff = { 0 },
410                 .path_info.asAdc1[0].abSrcOnOff = { 0 },
411                 .path_info.asMix[0].abSrcOnOff = { 0 },
412                 .path_info.asBias[0].abSrcOnOff = { 0 },
413
414                 .path_info.asHpOut[0].abSrcOnOff[5] = MCDRV_SRC5_DAC_L_ON,
415                 .path_info.asHpOut[1].abSrcOnOff[5] = MCDRV_SRC5_DAC_R_ON,
416                 .path_info.asDac[0].abSrcOnOff[6] = MCDRV_SRC6_MIX_ON,
417                 .path_info.asMix[0].abSrcOnOff[3] = MCDRV_SRC3_DIR0_ON,
418
419                 .dac_info = {
420                         .bMasterSwap = 0,
421                         .bVoiceSwap = 0,
422                         .bDcCut = 0,
423                 },
424         },
425         {
426                 .device = AUDIO_DEVICE_IN_BUILTIN_MIC,
427                 .mode = AUDIO_MODE_NORMAL,
428
429                 .ae_info = {
430                         .bOnOff = 0x00,
431                         .abBex = { 0x00 },
432                         .abWide = { 0x00 },
433                         .abDrc = { 0x00 },
434                         .abEq5 = { 0x00 },
435                         .abEq3 = { 0x00 },
436                 },
437
438                 .path_info.asHpOut[0].abSrcOnOff = { 0 },
439                 .path_info.asHpOut[1].abSrcOnOff = { 0 },
440                 .path_info.asSpOut[0].abSrcOnOff = { 0 },
441                 .path_info.asSpOut[1].abSrcOnOff = { 0 },
442                 .path_info.asRcOut[0].abSrcOnOff = { 0 },
443                 .path_info.asLout1[0].abSrcOnOff = { 0 },
444                 .path_info.asLout1[1].abSrcOnOff = { 0 },
445                 .path_info.asLout2[0].abSrcOnOff = { 0 },
446                 .path_info.asLout2[1].abSrcOnOff = { 0 },
447                 .path_info.asPeak[0].abSrcOnOff = { 0 },
448                 .path_info.asDit0[0].abSrcOnOff = { 0 },
449                 .path_info.asDit1[0].abSrcOnOff = { 0 },
450                 .path_info.asDit2[0].abSrcOnOff = { 0 },
451                 .path_info.asDac[0].abSrcOnOff = { 0 },
452                 .path_info.asDac[1].abSrcOnOff = { 0 },
453                 .path_info.asAe[0].abSrcOnOff = { 0 },
454                 .path_info.asCdsp[0].abSrcOnOff = { 0 },
455                 .path_info.asCdsp[1].abSrcOnOff = { 0 },
456                 .path_info.asCdsp[2].abSrcOnOff = { 0 },
457                 .path_info.asCdsp[3].abSrcOnOff = { 0 },
458                 .path_info.asAdc0[0].abSrcOnOff = { 0 },
459                 .path_info.asAdc0[1].abSrcOnOff = { 0 },
460                 .path_info.asAdc1[0].abSrcOnOff = { 0 },
461                 .path_info.asMix[0].abSrcOnOff = { 0 },
462                 .path_info.asBias[0].abSrcOnOff = { 0 },
463
464                 .path_info.asDit0[0].abSrcOnOff[0] = MCDRV_SRC0_MIC3_OFF | MCDRV_SRC0_MIC2_OFF | MCDRV_SRC0_MIC1_OFF,
465                 .path_info.asDit0[0].abSrcOnOff[1] = MCDRV_SRC1_LINE1_M_OFF | MCDRV_SRC1_LINE1_R_OFF | MCDRV_SRC1_LINE1_L_OFF,
466                 .path_info.asDit0[0].abSrcOnOff[2] = MCDRV_SRC2_LINE2_M_OFF | MCDRV_SRC2_LINE2_R_OFF | MCDRV_SRC2_LINE2_L_OFF,
467                 .path_info.asDit0[0].abSrcOnOff[3] = MCDRV_SRC3_DIR2_DIRECT_OFF | MCDRV_SRC3_DIR2_OFF | MCDRV_SRC3_DIR1_OFF | MCDRV_SRC3_DIR0_OFF,
468                 .path_info.asDit0[0].abSrcOnOff[4] = MCDRV_SRC4_ADC1_OFF | MCDRV_SRC4_ADC0_ON | MCDRV_SRC4_PDM_OFF | MCDRV_SRC4_DTMF_OFF,
469                 .path_info.asDit0[0].abSrcOnOff[5] = MCDRV_SRC5_DAC_M_OFF | MCDRV_SRC5_DAC_R_OFF | MCDRV_SRC5_DAC_L_OFF,
470                 .path_info.asDit0[0].abSrcOnOff[6] = MCDRV_SRC6_CDSP_DIRECT_OFF | MCDRV_SRC6_CDSP_OFF | MCDRV_SRC6_AE_OFF | MCDRV_SRC6_MIX_OFF,
471                 .path_info.asAdc0[0].abSrcOnOff[0] = MCDRV_SRC0_MIC1_ON,
472                 .path_info.asAdc0[1].abSrcOnOff[0] = MCDRV_SRC0_MIC1_ON,
473
474                 .dac_info = {
475                         .bMasterSwap = 0,
476                         .bVoiceSwap = 0,
477                         .bDcCut = 0,
478                 },
479         },
480         {
481                 .device = AUDIO_DEVICE_IN_WIRED_HEADSET,
482                 .mode = AUDIO_MODE_NORMAL,
483
484                 .ae_info = {
485                         .bOnOff = 0x00,
486                         .abBex = { 0x00 },
487                         .abWide = { 0x00 },
488                         .abDrc = { 0x00 },
489                         .abEq5 = { 0x00 },
490                         .abEq3 = { 0x00 },
491                 },
492
493                 .path_info.asHpOut[0].abSrcOnOff = { 0 },
494                 .path_info.asHpOut[1].abSrcOnOff = { 0 },
495                 .path_info.asSpOut[0].abSrcOnOff = { 0 },
496                 .path_info.asSpOut[1].abSrcOnOff = { 0 },
497                 .path_info.asRcOut[0].abSrcOnOff = { 0 },
498                 .path_info.asLout1[0].abSrcOnOff = { 0 },
499                 .path_info.asLout1[1].abSrcOnOff = { 0 },
500                 .path_info.asLout2[0].abSrcOnOff = { 0 },
501                 .path_info.asLout2[1].abSrcOnOff = { 0 },
502                 .path_info.asPeak[0].abSrcOnOff = { 0 },
503                 .path_info.asDit0[0].abSrcOnOff = { 0 },
504                 .path_info.asDit1[0].abSrcOnOff = { 0 },
505                 .path_info.asDit2[0].abSrcOnOff = { 0 },
506                 .path_info.asDac[0].abSrcOnOff = { 0 },
507                 .path_info.asDac[1].abSrcOnOff = { 0 },
508                 .path_info.asAe[0].abSrcOnOff = { 0 },
509                 .path_info.asCdsp[0].abSrcOnOff = { 0 },
510                 .path_info.asCdsp[1].abSrcOnOff = { 0 },
511                 .path_info.asCdsp[2].abSrcOnOff = { 0 },
512                 .path_info.asCdsp[3].abSrcOnOff = { 0 },
513                 .path_info.asAdc0[0].abSrcOnOff = { 0 },
514                 .path_info.asAdc0[1].abSrcOnOff = { 0 },
515                 .path_info.asAdc1[0].abSrcOnOff = { 0 },
516                 .path_info.asMix[0].abSrcOnOff = { 0 },
517                 .path_info.asBias[0].abSrcOnOff = { 0 },
518
519                 .path_info.asDit0[0].abSrcOnOff[0] = MCDRV_SRC0_MIC3_OFF | MCDRV_SRC0_MIC2_OFF | MCDRV_SRC0_MIC1_OFF,
520                 .path_info.asDit0[0].abSrcOnOff[1] = MCDRV_SRC1_LINE1_M_OFF | MCDRV_SRC1_LINE1_R_OFF | MCDRV_SRC1_LINE1_L_OFF,
521                 .path_info.asDit0[0].abSrcOnOff[2] = MCDRV_SRC2_LINE2_M_OFF | MCDRV_SRC2_LINE2_R_OFF | MCDRV_SRC2_LINE2_L_OFF,
522                 .path_info.asDit0[0].abSrcOnOff[3] = MCDRV_SRC3_DIR2_DIRECT_OFF | MCDRV_SRC3_DIR2_OFF | MCDRV_SRC3_DIR1_OFF | MCDRV_SRC3_DIR0_OFF,
523                 .path_info.asDit0[0].abSrcOnOff[4] = MCDRV_SRC4_ADC1_OFF | MCDRV_SRC4_ADC0_ON | MCDRV_SRC4_PDM_OFF | MCDRV_SRC4_DTMF_OFF,
524                 .path_info.asDit0[0].abSrcOnOff[5] = MCDRV_SRC5_DAC_M_OFF | MCDRV_SRC5_DAC_R_OFF | MCDRV_SRC5_DAC_L_OFF,
525                 .path_info.asDit0[0].abSrcOnOff[6] = MCDRV_SRC6_CDSP_DIRECT_OFF | MCDRV_SRC6_CDSP_OFF | MCDRV_SRC6_AE_OFF | MCDRV_SRC6_MIX_OFF,
526                 .path_info.asAdc0[0].abSrcOnOff[0] = MCDRV_SRC0_MIC2_ON,
527                 .path_info.asAdc0[1].abSrcOnOff[0] = MCDRV_SRC0_MIC2_ON,
528
529                 .dac_info = {
530                         .bMasterSwap = 0,
531                         .bVoiceSwap = 0,
532                         .bDcCut = 0,
533                 },
534         },
535 };
536
537 struct yamaha_mc1n2_audio_device_ops galaxys2_ops = {
538         .hw_node = "/dev/snd/hwC0D0",
539         .params = {
540                 .init = &galaxys2_params_init,
541                 .routes = &galaxys2_params_routes,
542                 .routes_count = sizeof(galaxys2_params_routes) /
543                         sizeof(struct yamaha_mc1n2_audio_params_route),
544         },
545 };
546
547 struct yamaha_mc1n2_audio_pdata galaxys2_pdata = {
548         .name = "galaxys2",
549         .ops = &galaxys2_ops,
550 };