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;
183 psc724_set_master_switch(ice, !hp_connected);
189 kctl = snd_ctl_find_id_mixer(ice->card,
192 snd_ctl_notify(ice->card, SNDRV_CTL_EVENT_MASK_VALUE, &kctl->id);
194 kctl = snd_ctl_find_id_mixer(ice->card,
197 snd_ctl_notify(ice->card, SNDRV_CTL_EVENT_MASK_VALUE, &kctl->id);
204 struct snd_ice1712 *ice = spec->ice;
205 bool hp_connected = snd_ice1712_gpio_read(ice) & GPIO_HP_JACK;
210 psc724_set_jack_state(ice, hp_connected);
213 static void psc724_set_jack_detection(struct snd_ice1712 *ice, bool on)
215 struct psc724_spec *spec = ice->spec;
222 bool hp_connected = snd_ice1712_gpio_read(ice) & GPIO_HP_JACK;
223 psc724_set_jack_state(ice, hp_connected);
230 static bool psc724_get_jack_detection(struct snd_ice1712 *ice)
232 struct psc724_spec *spec = ice->spec;
241 void (*set)(struct snd_ice1712 *ice, bool on);
242 bool (*get)(struct snd_ice1712 *ice);
261 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
264 ucontrol->value.integer.value[0] = psc724_cont[n].get(ice);
272 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
275 psc724_cont[n].set(ice, ucontrol->value.integer.value[0]);
302 static int psc724_add_controls(struct snd_ice1712 *ice)
307 struct psc724_spec *spec = ice->spec;
347 ctl = snd_ctl_new1(&cont, ice);
350 err = snd_ctl_add(ice->card, ctl);
358 static void psc724_set_pro_rate(struct snd_ice1712 *ice, unsigned int rate)
360 struct psc724_spec *spec = ice->spec;
369 static int psc724_resume(struct snd_ice1712 *ice)
371 struct psc724_spec *spec = ice->spec;
382 static int psc724_init(struct snd_ice1712 *ice)
389 ice->spec = spec;
390 spec->ice = ice;
392 ice->num_total_dacs = 6;
393 ice->num_total_adcs = 2;
395 spec->wm8776.card = ice->card;
398 spec->wm8766.card = ice->card;
400 ice->pm_resume = psc724_resume;
401 ice->pm_suspend_enabled = 1;
406 ice->gpio.set_pro_rate = psc724_set_pro_rate;
408 psc724_set_jack_detection(ice, true);
412 static void psc724_exit(struct snd_ice1712 *ice)
414 struct psc724_spec *spec = ice->spec;