Lines Matching refs:ice

102 static void se200pci_WM8740_init(struct snd_ice1712 *ice)
108 static void se200pci_WM8740_set_pro_rate(struct snd_ice1712 *ice,
119 static void se200pci_WM8766_write(struct snd_ice1712 *ice,
130 snd_ice1712_save_gpio_status(ice);
133 snd_ice1712_gpio_set_dir(ice, ice->gpio.direction | ALL_MASK);
134 snd_ice1712_gpio_set_mask(ice, ice->gpio.write_mask & ~ALL_MASK);
135 bits = snd_ice1712_gpio_read(ice) & ~ALL_MASK;
137 snd_ice1712_gpio_write(ice, bits);
147 snd_ice1712_gpio_write(ice, bits);
151 snd_ice1712_gpio_write(ice, bits);
156 snd_ice1712_gpio_write(ice, bits);
160 snd_ice1712_gpio_write(ice, bits);
162 snd_ice1712_restore_gpio_status(ice);
165 static void se200pci_WM8766_set_volume(struct snd_ice1712 *ice, int ch,
170 se200pci_WM8766_write(ice, 0x000, vol1);
171 se200pci_WM8766_write(ice, 0x001, vol2 | 0x100);
174 se200pci_WM8766_write(ice, 0x004, vol1);
175 se200pci_WM8766_write(ice, 0x005, vol2 | 0x100);
178 se200pci_WM8766_write(ice, 0x006, vol1);
179 se200pci_WM8766_write(ice, 0x007, vol2 | 0x100);
184 static void se200pci_WM8766_init(struct snd_ice1712 *ice)
186 se200pci_WM8766_write(ice, 0x1f, 0x000); /* RESET ALL */
189 se200pci_WM8766_set_volume(ice, 0, 0, 0); /* volume L=0 R=0 */
190 se200pci_WM8766_set_volume(ice, 1, 0, 0); /* volume L=0 R=0 */
191 se200pci_WM8766_set_volume(ice, 2, 0, 0); /* volume L=0 R=0 */
193 se200pci_WM8766_write(ice, 0x03, 0x022); /* serial mode I2S-24bits */
194 se200pci_WM8766_write(ice, 0x0a, 0x080); /* MCLK=256fs */
195 se200pci_WM8766_write(ice, 0x12, 0x000); /* MDP=0 */
196 se200pci_WM8766_write(ice, 0x15, 0x000); /* MDP=0 */
197 se200pci_WM8766_write(ice, 0x09, 0x000); /* demp=off mute=off */
199 se200pci_WM8766_write(ice, 0x02, 0x124); /* ch-assign L=L R=R RESET */
200 se200pci_WM8766_write(ice, 0x02, 0x120); /* ch-assign L=L R=R */
203 static void se200pci_WM8766_set_pro_rate(struct snd_ice1712 *ice,
207 se200pci_WM8766_write(ice, 0x0a, 0x000); /* MCLK=128fs */
209 se200pci_WM8766_write(ice, 0x0a, 0x080); /* MCLK=256fs */
217 static void se200pci_WM8776_write(struct snd_ice1712 *ice,
223 snd_vt1724_write_i2c(ice, 0x34, val >> 8, val & 0xff);
227 static void se200pci_WM8776_set_output_volume(struct snd_ice1712 *ice,
230 se200pci_WM8776_write(ice, 0x03, vol1);
231 se200pci_WM8776_write(ice, 0x04, vol2 | 0x100);
234 static void se200pci_WM8776_set_input_volume(struct snd_ice1712 *ice,
237 se200pci_WM8776_write(ice, 0x0e, vol1);
238 se200pci_WM8776_write(ice, 0x0f, vol2 | 0x100);
245 static void se200pci_WM8776_set_input_selector(struct snd_ice1712 *ice,
254 se200pci_WM8776_write(ice, 0x15, vals[sel]);
257 static void se200pci_WM8776_set_afl(struct snd_ice1712 *ice, unsigned int afl)
261 se200pci_WM8776_write(ice, 0x16, 0x005);
263 se200pci_WM8776_write(ice, 0x16, 0x001);
270 static void se200pci_WM8776_set_agc(struct snd_ice1712 *ice, unsigned int agc)
275 se200pci_WM8776_write(ice, 0x11, 0x000); /* Off */
278 se200pci_WM8776_write(ice, 0x10, 0x07b);
279 se200pci_WM8776_write(ice, 0x11, 0x100); /* LimiterMode */
282 se200pci_WM8776_write(ice, 0x10, 0x1fb);
283 se200pci_WM8776_write(ice, 0x11, 0x100); /* ALCMode */
288 static void se200pci_WM8776_init(struct snd_ice1712 *ice)
300 se200pci_WM8776_write(ice, 0x17, 0x000); /* reset all */
306 se200pci_WM8776_write(ice, i, default_values[i]);
308 se200pci_WM8776_set_input_selector(ice, 0);
309 se200pci_WM8776_set_afl(ice, 0);
310 se200pci_WM8776_set_agc(ice, 0);
311 se200pci_WM8776_set_input_volume(ice, 0, 0);
312 se200pci_WM8776_set_output_volume(ice, 0, 0);
315 se200pci_WM8776_write(ice, 0x00, 0);
316 se200pci_WM8776_write(ice, 0x01, 0);
317 se200pci_WM8776_write(ice, 0x02, 0x100);
318 se200pci_WM8776_write(ice, 0x0d, 0x080);
321 static void se200pci_WM8776_set_pro_rate(struct snd_ice1712 *ice,
332 static void se200pci_set_pro_rate(struct snd_ice1712 *ice, unsigned int rate)
334 se200pci_WM8740_set_pro_rate(ice, rate);
335 se200pci_WM8766_set_pro_rate(ice, rate);
336 se200pci_WM8776_set_pro_rate(ice, rate);
447 struct snd_ice1712 *ice = snd_kcontrol_chip(kc);
448 struct se_spec *spec = ice->spec;
458 struct snd_ice1712 *ice = snd_kcontrol_chip(kc);
459 struct se_spec *spec = ice->spec;
468 struct snd_ice1712 *ice = snd_kcontrol_chip(kc);
469 struct se_spec *spec = ice->spec;
475 static void se200pci_cont_update(struct snd_ice1712 *ice, int n)
477 struct se_spec *spec = ice->spec;
480 se200pci_WM8766_set_volume(ice,
487 se200pci_WM8776_set_input_volume(ice,
493 se200pci_WM8776_set_output_volume(ice,
499 se200pci_WM8776_set_input_selector(ice,
504 se200pci_WM8776_set_agc(ice, spec->vol[n].ch1);
508 se200pci_WM8776_set_afl(ice, spec->vol[n].ch1);
519 struct snd_ice1712 *ice = snd_kcontrol_chip(kc);
520 struct se_spec *spec = ice->spec;
537 se200pci_cont_update(ice, n);
545 struct snd_ice1712 *ice = snd_kcontrol_chip(kc);
546 struct se_spec *spec = ice->spec;
553 se200pci_cont_update(ice, n);
562 struct snd_ice1712 *ice = snd_kcontrol_chip(kc);
563 struct se_spec *spec = ice->spec;
572 se200pci_cont_update(ice, n);
581 static int se200pci_add_controls(struct snd_ice1712 *ice)
620 err = snd_ctl_add(ice->card, snd_ctl_new1(&cont, ice));
659 static int se_init(struct snd_ice1712 *ice)
666 ice->spec = spec;
668 if (ice->eeprom.subvendor == VT1724_SUBDEVICE_SE90PCI) {
669 ice->num_total_dacs = 2;
670 ice->num_total_adcs = 0;
671 ice->vt1720 = 1;
674 } else if (ice->eeprom.subvendor == VT1724_SUBDEVICE_SE200PCI) {
675 ice->num_total_dacs = 8;
676 ice->num_total_adcs = 2;
677 se200pci_WM8740_init(ice);
678 se200pci_WM8766_init(ice);
679 se200pci_WM8776_init(ice);
680 ice->gpio.set_pro_rate = se200pci_set_pro_rate;
687 static int se_add_controls(struct snd_ice1712 *ice)
693 if (ice->eeprom.subvendor == VT1724_SUBDEVICE_SE200PCI)
694 err = se200pci_add_controls(ice);