Lines Matching +full:spec +full:-
1 // SPDX-License-Identifier: GPL-2.0-or-later
21 /* Hoontech-specific setting */
43 struct hoontech_spec *spec = ice->spec; in snd_ice1712_stdsp24_darear() local
44 mutex_lock(&ice->gpio_mutex); in snd_ice1712_stdsp24_darear()
45 ICE1712_STDSP24_0_DAREAR(spec->boxbits, activate); in snd_ice1712_stdsp24_darear()
46 snd_ice1712_stdsp24_gpio_write(ice, spec->boxbits[0]); in snd_ice1712_stdsp24_darear()
47 mutex_unlock(&ice->gpio_mutex); in snd_ice1712_stdsp24_darear()
52 struct hoontech_spec *spec = ice->spec; in snd_ice1712_stdsp24_mute() local
53 mutex_lock(&ice->gpio_mutex); in snd_ice1712_stdsp24_mute()
54 ICE1712_STDSP24_3_MUTE(spec->boxbits, activate); in snd_ice1712_stdsp24_mute()
55 snd_ice1712_stdsp24_gpio_write(ice, spec->boxbits[3]); in snd_ice1712_stdsp24_mute()
56 mutex_unlock(&ice->gpio_mutex); in snd_ice1712_stdsp24_mute()
61 struct hoontech_spec *spec = ice->spec; in snd_ice1712_stdsp24_insel() local
62 mutex_lock(&ice->gpio_mutex); in snd_ice1712_stdsp24_insel()
63 ICE1712_STDSP24_3_INSEL(spec->boxbits, activate); in snd_ice1712_stdsp24_insel()
64 snd_ice1712_stdsp24_gpio_write(ice, spec->boxbits[3]); in snd_ice1712_stdsp24_insel()
65 mutex_unlock(&ice->gpio_mutex); in snd_ice1712_stdsp24_insel()
70 struct hoontech_spec *spec = ice->spec; in snd_ice1712_stdsp24_box_channel() local
72 mutex_lock(&ice->gpio_mutex); in snd_ice1712_stdsp24_box_channel()
75 ICE1712_STDSP24_0_BOX(spec->boxbits, box); in snd_ice1712_stdsp24_box_channel()
76 snd_ice1712_stdsp24_gpio_write(ice, spec->boxbits[0]); in snd_ice1712_stdsp24_box_channel()
80 ICE1712_STDSP24_2_CHN4(spec->boxbits, 0); in snd_ice1712_stdsp24_box_channel()
81 ICE1712_STDSP24_2_MIDI1(spec->boxbits, activate); in snd_ice1712_stdsp24_box_channel()
82 snd_ice1712_stdsp24_gpio_write(ice, spec->boxbits[2]); in snd_ice1712_stdsp24_box_channel()
83 snd_ice1712_stdsp24_gpio_write(ice, spec->boxbits[3]); in snd_ice1712_stdsp24_box_channel()
85 ICE1712_STDSP24_1_CHN1(spec->boxbits, 1); in snd_ice1712_stdsp24_box_channel()
86 ICE1712_STDSP24_1_CHN2(spec->boxbits, 1); in snd_ice1712_stdsp24_box_channel()
87 ICE1712_STDSP24_1_CHN3(spec->boxbits, 1); in snd_ice1712_stdsp24_box_channel()
88 ICE1712_STDSP24_2_CHN4(spec->boxbits, 1); in snd_ice1712_stdsp24_box_channel()
89 snd_ice1712_stdsp24_gpio_write(ice, spec->boxbits[1]); in snd_ice1712_stdsp24_box_channel()
90 snd_ice1712_stdsp24_gpio_write(ice, spec->boxbits[2]); in snd_ice1712_stdsp24_box_channel()
93 ICE1712_STDSP24_2_CHN4(spec->boxbits, 0); in snd_ice1712_stdsp24_box_channel()
94 snd_ice1712_stdsp24_gpio_write(ice, spec->boxbits[2]); in snd_ice1712_stdsp24_box_channel()
97 case 0: ICE1712_STDSP24_1_CHN1(spec->boxbits, 0); break; in snd_ice1712_stdsp24_box_channel()
98 case 1: ICE1712_STDSP24_1_CHN2(spec->boxbits, 0); break; in snd_ice1712_stdsp24_box_channel()
99 case 2: ICE1712_STDSP24_1_CHN3(spec->boxbits, 0); break; in snd_ice1712_stdsp24_box_channel()
101 snd_ice1712_stdsp24_gpio_write(ice, spec->boxbits[1]); in snd_ice1712_stdsp24_box_channel()
104 ICE1712_STDSP24_1_CHN1(spec->boxbits, 1); in snd_ice1712_stdsp24_box_channel()
105 ICE1712_STDSP24_1_CHN2(spec->boxbits, 1); in snd_ice1712_stdsp24_box_channel()
106 ICE1712_STDSP24_1_CHN3(spec->boxbits, 1); in snd_ice1712_stdsp24_box_channel()
107 ICE1712_STDSP24_2_CHN4(spec->boxbits, 1); in snd_ice1712_stdsp24_box_channel()
108 snd_ice1712_stdsp24_gpio_write(ice, spec->boxbits[1]); in snd_ice1712_stdsp24_box_channel()
109 snd_ice1712_stdsp24_gpio_write(ice, spec->boxbits[2]); in snd_ice1712_stdsp24_box_channel()
112 ICE1712_STDSP24_2_MIDI1(spec->boxbits, 0); in snd_ice1712_stdsp24_box_channel()
113 snd_ice1712_stdsp24_gpio_write(ice, spec->boxbits[2]); in snd_ice1712_stdsp24_box_channel()
115 mutex_unlock(&ice->gpio_mutex); in snd_ice1712_stdsp24_box_channel()
120 struct hoontech_spec *spec = ice->spec; in snd_ice1712_stdsp24_box_midi() local
122 mutex_lock(&ice->gpio_mutex); in snd_ice1712_stdsp24_box_midi()
125 ICE1712_STDSP24_0_BOX(spec->boxbits, box); in snd_ice1712_stdsp24_box_midi()
126 snd_ice1712_stdsp24_gpio_write(ice, spec->boxbits[0]); in snd_ice1712_stdsp24_box_midi()
128 ICE1712_STDSP24_2_MIDIIN(spec->boxbits, 1); in snd_ice1712_stdsp24_box_midi()
129 ICE1712_STDSP24_2_MIDI1(spec->boxbits, master); in snd_ice1712_stdsp24_box_midi()
130 snd_ice1712_stdsp24_gpio_write(ice, spec->boxbits[2]); in snd_ice1712_stdsp24_box_midi()
131 snd_ice1712_stdsp24_gpio_write(ice, spec->boxbits[3]); in snd_ice1712_stdsp24_box_midi()
135 ICE1712_STDSP24_2_MIDIIN(spec->boxbits, 0); in snd_ice1712_stdsp24_box_midi()
136 snd_ice1712_stdsp24_gpio_write(ice, spec->boxbits[2]); in snd_ice1712_stdsp24_box_midi()
140 ICE1712_STDSP24_2_MIDIIN(spec->boxbits, 1); in snd_ice1712_stdsp24_box_midi()
141 snd_ice1712_stdsp24_gpio_write(ice, spec->boxbits[2]); in snd_ice1712_stdsp24_box_midi()
143 mutex_unlock(&ice->gpio_mutex); in snd_ice1712_stdsp24_box_midi()
148 struct hoontech_spec *spec = ice->spec; in snd_ice1712_stdsp24_midi2() local
149 mutex_lock(&ice->gpio_mutex); in snd_ice1712_stdsp24_midi2()
150 ICE1712_STDSP24_3_MIDI2(spec->boxbits, activate); in snd_ice1712_stdsp24_midi2()
151 snd_ice1712_stdsp24_gpio_write(ice, spec->boxbits[3]); in snd_ice1712_stdsp24_midi2()
152 mutex_unlock(&ice->gpio_mutex); in snd_ice1712_stdsp24_midi2()
157 struct hoontech_spec *spec; in hoontech_init() local
160 ice->num_total_dacs = 8; in hoontech_init()
161 ice->num_total_adcs = 8; in hoontech_init()
163 spec = kzalloc(sizeof(*spec), GFP_KERNEL); in hoontech_init()
164 if (!spec) in hoontech_init()
165 return -ENOMEM; in hoontech_init()
166 ice->spec = spec; in hoontech_init()
168 ICE1712_STDSP24_SET_ADDR(spec->boxbits, 0); in hoontech_init()
169 ICE1712_STDSP24_CLOCK(spec->boxbits, 0, 1); in hoontech_init()
170 ICE1712_STDSP24_0_BOX(spec->boxbits, 0); in hoontech_init()
171 ICE1712_STDSP24_0_DAREAR(spec->boxbits, 0); in hoontech_init()
173 ICE1712_STDSP24_SET_ADDR(spec->boxbits, 1); in hoontech_init()
174 ICE1712_STDSP24_CLOCK(spec->boxbits, 1, 1); in hoontech_init()
175 ICE1712_STDSP24_1_CHN1(spec->boxbits, 1); in hoontech_init()
176 ICE1712_STDSP24_1_CHN2(spec->boxbits, 1); in hoontech_init()
177 ICE1712_STDSP24_1_CHN3(spec->boxbits, 1); in hoontech_init()
179 ICE1712_STDSP24_SET_ADDR(spec->boxbits, 2); in hoontech_init()
180 ICE1712_STDSP24_CLOCK(spec->boxbits, 2, 1); in hoontech_init()
181 ICE1712_STDSP24_2_CHN4(spec->boxbits, 1); in hoontech_init()
182 ICE1712_STDSP24_2_MIDIIN(spec->boxbits, 1); in hoontech_init()
183 ICE1712_STDSP24_2_MIDI1(spec->boxbits, 0); in hoontech_init()
185 ICE1712_STDSP24_SET_ADDR(spec->boxbits, 3); in hoontech_init()
186 ICE1712_STDSP24_CLOCK(spec->boxbits, 3, 1); in hoontech_init()
187 ICE1712_STDSP24_3_MIDI2(spec->boxbits, 0); in hoontech_init()
188 ICE1712_STDSP24_3_MUTE(spec->boxbits, 1); in hoontech_init()
189 ICE1712_STDSP24_3_INSEL(spec->boxbits, 0); in hoontech_init()
191 /* let's go - activate only functions in first box */ in hoontech_init()
193 spec->config = ICE1712_STDSP24_MUTE; in hoontech_init()
195 spec->config = 0; in hoontech_init()
207 * on the same box connects MIDI-In to both 401 uarts; both outputs in hoontech_init()
212 spec->boxconfig[0] = ICE1712_STDSP24_BOX_CHN1 | in hoontech_init()
219 spec->boxconfig[1] = in hoontech_init()
220 spec->boxconfig[2] = in hoontech_init()
221 spec->boxconfig[3] = spec->boxconfig[0]; in hoontech_init()
223 spec->boxconfig[1] = in hoontech_init()
224 spec->boxconfig[2] = in hoontech_init()
225 spec->boxconfig[3] = 0; in hoontech_init()
229 (spec->config & ICE1712_STDSP24_DAREAR) ? 1 : 0); in hoontech_init()
231 (spec->config & ICE1712_STDSP24_MUTE) ? 1 : 0); in hoontech_init()
233 (spec->config & ICE1712_STDSP24_INSEL) ? 1 : 0); in hoontech_init()
235 if (spec->boxconfig[box] & ICE1712_STDSP24_BOX_MIDI2) in hoontech_init()
239 (spec->boxconfig[box] & (1 << chn)) ? 1 : 0); in hoontech_init()
240 if (spec->boxconfig[box] & ICE1712_STDSP24_BOX_MIDI1) in hoontech_init()
264 struct snd_ice1712 *ice = ak->private_data[0]; in stdsp24_ak4524_lock()
271 ice->gpio.direction | tmp); in stdsp24_ak4524_lock()
302 ice->num_total_dacs = 2; in snd_ice1712_value_init()
305 ice->num_total_adcs = 2; in snd_ice1712_value_init()
308 ak = ice->akm = kmalloc(sizeof(struct snd_akm4xxx), GFP_KERNEL); in snd_ice1712_value_init()
310 return -ENOMEM; in snd_ice1712_value_init()
311 ice->akm_codecs = 1; in snd_ice1712_value_init()
323 ice->gpio.write_mask = ice->eeprom.gpiomask; in snd_ice1712_ez8_init()
324 ice->gpio.direction = ice->eeprom.gpiodir; in snd_ice1712_ez8_init()
325 snd_ice1712_write(ice, ICE1712_IREG_GPIO_WRITE_MASK, ice->eeprom.gpiomask); in snd_ice1712_ez8_init()
326 snd_ice1712_write(ice, ICE1712_IREG_GPIO_DIRECTION, ice->eeprom.gpiodir); in snd_ice1712_ez8_init()
327 snd_ice1712_write(ice, ICE1712_IREG_GPIO_DATA, ice->eeprom.gpiostate); in snd_ice1712_ez8_init()
339 .mpu401_1_name = "MIDI-1 Hoontech/STA DSP24",
340 .mpu401_2_name = "MIDI-2 Hoontech/STA DSP24",