Lines Matching refs:ice
116 static void se200pci_WM8740_init(struct snd_ice1712 *ice) in se200pci_WM8740_init() argument
122 static void se200pci_WM8740_set_pro_rate(struct snd_ice1712 *ice, in se200pci_WM8740_set_pro_rate() argument
133 static void se200pci_WM8766_write(struct snd_ice1712 *ice, in se200pci_WM8766_write() argument
144 snd_ice1712_save_gpio_status(ice); in se200pci_WM8766_write()
147 snd_ice1712_gpio_set_dir(ice, ice->gpio.direction | ALL_MASK); in se200pci_WM8766_write()
148 snd_ice1712_gpio_set_mask(ice, ice->gpio.write_mask & ~ALL_MASK); in se200pci_WM8766_write()
149 bits = snd_ice1712_gpio_read(ice) & ~ALL_MASK; in se200pci_WM8766_write()
151 snd_ice1712_gpio_write(ice, bits); in se200pci_WM8766_write()
161 snd_ice1712_gpio_write(ice, bits); in se200pci_WM8766_write()
165 snd_ice1712_gpio_write(ice, bits); in se200pci_WM8766_write()
170 snd_ice1712_gpio_write(ice, bits); in se200pci_WM8766_write()
174 snd_ice1712_gpio_write(ice, bits); in se200pci_WM8766_write()
176 snd_ice1712_restore_gpio_status(ice); in se200pci_WM8766_write()
179 static void se200pci_WM8766_set_volume(struct snd_ice1712 *ice, int ch, in se200pci_WM8766_set_volume() argument
184 se200pci_WM8766_write(ice, 0x000, vol1); in se200pci_WM8766_set_volume()
185 se200pci_WM8766_write(ice, 0x001, vol2 | 0x100); in se200pci_WM8766_set_volume()
188 se200pci_WM8766_write(ice, 0x004, vol1); in se200pci_WM8766_set_volume()
189 se200pci_WM8766_write(ice, 0x005, vol2 | 0x100); in se200pci_WM8766_set_volume()
192 se200pci_WM8766_write(ice, 0x006, vol1); in se200pci_WM8766_set_volume()
193 se200pci_WM8766_write(ice, 0x007, vol2 | 0x100); in se200pci_WM8766_set_volume()
198 static void se200pci_WM8766_init(struct snd_ice1712 *ice) in se200pci_WM8766_init() argument
200 se200pci_WM8766_write(ice, 0x1f, 0x000); /* RESET ALL */ in se200pci_WM8766_init()
203 se200pci_WM8766_set_volume(ice, 0, 0, 0); /* volume L=0 R=0 */ in se200pci_WM8766_init()
204 se200pci_WM8766_set_volume(ice, 1, 0, 0); /* volume L=0 R=0 */ in se200pci_WM8766_init()
205 se200pci_WM8766_set_volume(ice, 2, 0, 0); /* volume L=0 R=0 */ in se200pci_WM8766_init()
207 se200pci_WM8766_write(ice, 0x03, 0x022); /* serial mode I2S-24bits */ in se200pci_WM8766_init()
208 se200pci_WM8766_write(ice, 0x0a, 0x080); /* MCLK=256fs */ in se200pci_WM8766_init()
209 se200pci_WM8766_write(ice, 0x12, 0x000); /* MDP=0 */ in se200pci_WM8766_init()
210 se200pci_WM8766_write(ice, 0x15, 0x000); /* MDP=0 */ in se200pci_WM8766_init()
211 se200pci_WM8766_write(ice, 0x09, 0x000); /* demp=off mute=off */ in se200pci_WM8766_init()
213 se200pci_WM8766_write(ice, 0x02, 0x124); /* ch-assign L=L R=R RESET */ in se200pci_WM8766_init()
214 se200pci_WM8766_write(ice, 0x02, 0x120); /* ch-assign L=L R=R */ in se200pci_WM8766_init()
217 static void se200pci_WM8766_set_pro_rate(struct snd_ice1712 *ice, in se200pci_WM8766_set_pro_rate() argument
221 se200pci_WM8766_write(ice, 0x0a, 0x000); /* MCLK=128fs */ in se200pci_WM8766_set_pro_rate()
223 se200pci_WM8766_write(ice, 0x0a, 0x080); /* MCLK=256fs */ in se200pci_WM8766_set_pro_rate()
231 static void se200pci_WM8776_write(struct snd_ice1712 *ice, in se200pci_WM8776_write() argument
237 snd_vt1724_write_i2c(ice, 0x34, val >> 8, val & 0xff); in se200pci_WM8776_write()
241 static void se200pci_WM8776_set_output_volume(struct snd_ice1712 *ice, in se200pci_WM8776_set_output_volume() argument
244 se200pci_WM8776_write(ice, 0x03, vol1); in se200pci_WM8776_set_output_volume()
245 se200pci_WM8776_write(ice, 0x04, vol2 | 0x100); in se200pci_WM8776_set_output_volume()
248 static void se200pci_WM8776_set_input_volume(struct snd_ice1712 *ice, in se200pci_WM8776_set_input_volume() argument
251 se200pci_WM8776_write(ice, 0x0e, vol1); in se200pci_WM8776_set_input_volume()
252 se200pci_WM8776_write(ice, 0x0f, vol2 | 0x100); in se200pci_WM8776_set_input_volume()
259 static void se200pci_WM8776_set_input_selector(struct snd_ice1712 *ice, in se200pci_WM8776_set_input_selector() argument
268 se200pci_WM8776_write(ice, 0x15, vals[sel]); in se200pci_WM8776_set_input_selector()
271 static void se200pci_WM8776_set_afl(struct snd_ice1712 *ice, unsigned int afl) in se200pci_WM8776_set_afl() argument
275 se200pci_WM8776_write(ice, 0x16, 0x005); in se200pci_WM8776_set_afl()
277 se200pci_WM8776_write(ice, 0x16, 0x001); in se200pci_WM8776_set_afl()
284 static void se200pci_WM8776_set_agc(struct snd_ice1712 *ice, unsigned int agc) in se200pci_WM8776_set_agc() argument
289 se200pci_WM8776_write(ice, 0x11, 0x000); /* Off */ in se200pci_WM8776_set_agc()
292 se200pci_WM8776_write(ice, 0x10, 0x07b); in se200pci_WM8776_set_agc()
293 se200pci_WM8776_write(ice, 0x11, 0x100); /* LimiterMode */ in se200pci_WM8776_set_agc()
296 se200pci_WM8776_write(ice, 0x10, 0x1fb); in se200pci_WM8776_set_agc()
297 se200pci_WM8776_write(ice, 0x11, 0x100); /* ALCMode */ in se200pci_WM8776_set_agc()
302 static void se200pci_WM8776_init(struct snd_ice1712 *ice) in se200pci_WM8776_init() argument
314 se200pci_WM8776_write(ice, 0x17, 0x000); /* reset all */ in se200pci_WM8776_init()
320 se200pci_WM8776_write(ice, i, default_values[i]); in se200pci_WM8776_init()
322 se200pci_WM8776_set_input_selector(ice, 0); in se200pci_WM8776_init()
323 se200pci_WM8776_set_afl(ice, 0); in se200pci_WM8776_init()
324 se200pci_WM8776_set_agc(ice, 0); in se200pci_WM8776_init()
325 se200pci_WM8776_set_input_volume(ice, 0, 0); in se200pci_WM8776_init()
326 se200pci_WM8776_set_output_volume(ice, 0, 0); in se200pci_WM8776_init()
329 se200pci_WM8776_write(ice, 0x00, 0); in se200pci_WM8776_init()
330 se200pci_WM8776_write(ice, 0x01, 0); in se200pci_WM8776_init()
331 se200pci_WM8776_write(ice, 0x02, 0x100); in se200pci_WM8776_init()
332 se200pci_WM8776_write(ice, 0x0d, 0x080); in se200pci_WM8776_init()
335 static void se200pci_WM8776_set_pro_rate(struct snd_ice1712 *ice, in se200pci_WM8776_set_pro_rate() argument
346 static void se200pci_set_pro_rate(struct snd_ice1712 *ice, unsigned int rate) in se200pci_set_pro_rate() argument
348 se200pci_WM8740_set_pro_rate(ice, rate); in se200pci_set_pro_rate()
349 se200pci_WM8766_set_pro_rate(ice, rate); in se200pci_set_pro_rate()
350 se200pci_WM8776_set_pro_rate(ice, rate); in se200pci_set_pro_rate()
461 struct snd_ice1712 *ice = snd_kcontrol_chip(kc); in se200pci_cont_volume_get() local
462 struct se_spec *spec = ice->spec; in se200pci_cont_volume_get()
472 struct snd_ice1712 *ice = snd_kcontrol_chip(kc); in se200pci_cont_boolean_get() local
473 struct se_spec *spec = ice->spec; in se200pci_cont_boolean_get()
482 struct snd_ice1712 *ice = snd_kcontrol_chip(kc); in se200pci_cont_enum_get() local
483 struct se_spec *spec = ice->spec; in se200pci_cont_enum_get()
489 static void se200pci_cont_update(struct snd_ice1712 *ice, int n) in se200pci_cont_update() argument
491 struct se_spec *spec = ice->spec; in se200pci_cont_update()
494 se200pci_WM8766_set_volume(ice, in se200pci_cont_update()
501 se200pci_WM8776_set_input_volume(ice, in se200pci_cont_update()
507 se200pci_WM8776_set_output_volume(ice, in se200pci_cont_update()
513 se200pci_WM8776_set_input_selector(ice, in se200pci_cont_update()
518 se200pci_WM8776_set_agc(ice, spec->vol[n].ch1); in se200pci_cont_update()
522 se200pci_WM8776_set_afl(ice, spec->vol[n].ch1); in se200pci_cont_update()
533 struct snd_ice1712 *ice = snd_kcontrol_chip(kc); in se200pci_cont_volume_put() local
534 struct se_spec *spec = ice->spec; in se200pci_cont_volume_put()
551 se200pci_cont_update(ice, n); in se200pci_cont_volume_put()
559 struct snd_ice1712 *ice = snd_kcontrol_chip(kc); in se200pci_cont_boolean_put() local
560 struct se_spec *spec = ice->spec; in se200pci_cont_boolean_put()
567 se200pci_cont_update(ice, n); in se200pci_cont_boolean_put()
576 struct snd_ice1712 *ice = snd_kcontrol_chip(kc); in se200pci_cont_enum_put() local
577 struct se_spec *spec = ice->spec; in se200pci_cont_enum_put()
586 se200pci_cont_update(ice, n); in se200pci_cont_enum_put()
595 static int se200pci_add_controls(struct snd_ice1712 *ice) in se200pci_add_controls() argument
634 err = snd_ctl_add(ice->card, snd_ctl_new1(&cont, ice)); in se200pci_add_controls()
673 static int se_init(struct snd_ice1712 *ice) in se_init() argument
680 ice->spec = spec; in se_init()
682 if (ice->eeprom.subvendor == VT1724_SUBDEVICE_SE90PCI) { in se_init()
683 ice->num_total_dacs = 2; in se_init()
684 ice->num_total_adcs = 0; in se_init()
685 ice->vt1720 = 1; in se_init()
688 } else if (ice->eeprom.subvendor == VT1724_SUBDEVICE_SE200PCI) { in se_init()
689 ice->num_total_dacs = 8; in se_init()
690 ice->num_total_adcs = 2; in se_init()
691 se200pci_WM8740_init(ice); in se_init()
692 se200pci_WM8766_init(ice); in se_init()
693 se200pci_WM8776_init(ice); in se_init()
694 ice->gpio.set_pro_rate = se200pci_set_pro_rate; in se_init()
701 static int se_add_controls(struct snd_ice1712 *ice) in se_add_controls() argument
707 if (ice->eeprom.subvendor == VT1724_SUBDEVICE_SE200PCI) in se_add_controls()
708 err = se200pci_add_controls(ice); in se_add_controls()