Lines Matching defs:ice
25 struct snd_ice1712 *ice;
107 struct snd_ice1712 *ice = spec->ice;
111 snd_ice1712_save_gpio_status(ice);
114 snd_ice1712_gpio_set_dir(ice, ice->gpio.direction | PSC724_SPI_MASK);
115 snd_ice1712_gpio_set_mask(ice, ice->gpio.write_mask & ~PSC724_SPI_MASK);
116 bits = snd_ice1712_gpio_read(ice) & ~PSC724_SPI_MASK;
117 snd_ice1712_gpio_write(ice, bits);
128 snd_ice1712_gpio_write(ice, bits);
132 snd_ice1712_gpio_write(ice, bits);
137 snd_ice1712_gpio_write(ice, bits);
141 snd_ice1712_gpio_write(ice, bits);
143 snd_ice1712_restore_gpio_status(ice);
150 snd_vt1724_write_i2c(spec->ice, 0x34, addr, data);
155 static void psc724_set_master_switch(struct snd_ice1712 *ice, bool on)
157 unsigned int bits = snd_ice1712_gpio_read(ice);
158 struct psc724_spec *spec = ice->spec;
165 snd_ice1712_gpio_write(ice, bits);
168 static bool psc724_get_master_switch(struct snd_ice1712 *ice)
170 struct psc724_spec *spec = ice->spec;
177 static void psc724_set_jack_state(struct snd_ice1712 *ice, bool hp_connected)
179 struct psc724_spec *spec = ice->spec;
184 psc724_set_master_switch(ice, !hp_connected);
194 kctl = snd_ctl_find_id(ice->card, &elem_id);
195 snd_ctl_notify(ice->card, SNDRV_CTL_EVENT_MASK_VALUE, &kctl->id);
199 kctl = snd_ctl_find_id(ice->card, &elem_id);
200 snd_ctl_notify(ice->card, SNDRV_CTL_EVENT_MASK_VALUE, &kctl->id);
207 struct snd_ice1712 *ice = spec->ice;
208 bool hp_connected = snd_ice1712_gpio_read(ice) & GPIO_HP_JACK;
213 psc724_set_jack_state(ice, hp_connected);
216 static void psc724_set_jack_detection(struct snd_ice1712 *ice, bool on)
218 struct psc724_spec *spec = ice->spec;
225 bool hp_connected = snd_ice1712_gpio_read(ice) & GPIO_HP_JACK;
226 psc724_set_jack_state(ice, hp_connected);
233 static bool psc724_get_jack_detection(struct snd_ice1712 *ice)
235 struct psc724_spec *spec = ice->spec;
244 void (*set)(struct snd_ice1712 *ice, bool on);
245 bool (*get)(struct snd_ice1712 *ice);
264 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
267 ucontrol->value.integer.value[0] = psc724_cont[n].get(ice);
275 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
278 psc724_cont[n].set(ice, ucontrol->value.integer.value[0]);
305 static int psc724_add_controls(struct snd_ice1712 *ice)
310 struct psc724_spec *spec = ice->spec;
350 ctl = snd_ctl_new1(&cont, ice);
353 err = snd_ctl_add(ice->card, ctl);
361 static void psc724_set_pro_rate(struct snd_ice1712 *ice, unsigned int rate)
363 struct psc724_spec *spec = ice->spec;
372 static int psc724_resume(struct snd_ice1712 *ice)
374 struct psc724_spec *spec = ice->spec;
385 static int psc724_init(struct snd_ice1712 *ice)
392 ice->spec = spec;
393 spec->ice = ice;
395 ice->num_total_dacs = 6;
396 ice->num_total_adcs = 2;
398 spec->wm8776.card = ice->card;
401 spec->wm8766.card = ice->card;
403 ice->pm_resume = psc724_resume;
404 ice->pm_suspend_enabled = 1;
409 ice->gpio.set_pro_rate = psc724_set_pro_rate;
411 psc724_set_jack_detection(ice, true);
415 static void psc724_exit(struct snd_ice1712 *ice)
417 struct psc724_spec *spec = ice->spec;