Lines Matching refs:ice

28 static void snd_ice1712_stdsp24_gpio_write(struct snd_ice1712 *ice, unsigned char byte)
32 snd_ice1712_write(ice, ICE1712_IREG_GPIO_DATA, byte);
35 snd_ice1712_write(ice, ICE1712_IREG_GPIO_DATA, byte);
38 snd_ice1712_write(ice, ICE1712_IREG_GPIO_DATA, byte);
41 static void snd_ice1712_stdsp24_darear(struct snd_ice1712 *ice, int activate)
43 struct hoontech_spec *spec = ice->spec;
44 mutex_lock(&ice->gpio_mutex);
46 snd_ice1712_stdsp24_gpio_write(ice, spec->boxbits[0]);
47 mutex_unlock(&ice->gpio_mutex);
50 static void snd_ice1712_stdsp24_mute(struct snd_ice1712 *ice, int activate)
52 struct hoontech_spec *spec = ice->spec;
53 mutex_lock(&ice->gpio_mutex);
55 snd_ice1712_stdsp24_gpio_write(ice, spec->boxbits[3]);
56 mutex_unlock(&ice->gpio_mutex);
59 static void snd_ice1712_stdsp24_insel(struct snd_ice1712 *ice, int activate)
61 struct hoontech_spec *spec = ice->spec;
62 mutex_lock(&ice->gpio_mutex);
64 snd_ice1712_stdsp24_gpio_write(ice, spec->boxbits[3]);
65 mutex_unlock(&ice->gpio_mutex);
68 static void snd_ice1712_stdsp24_box_channel(struct snd_ice1712 *ice, int box, int chn, int activate)
70 struct hoontech_spec *spec = ice->spec;
72 mutex_lock(&ice->gpio_mutex);
76 snd_ice1712_stdsp24_gpio_write(ice, spec->boxbits[0]);
82 snd_ice1712_stdsp24_gpio_write(ice, spec->boxbits[2]);
83 snd_ice1712_stdsp24_gpio_write(ice, spec->boxbits[3]);
89 snd_ice1712_stdsp24_gpio_write(ice, spec->boxbits[1]);
90 snd_ice1712_stdsp24_gpio_write(ice, spec->boxbits[2]);
94 snd_ice1712_stdsp24_gpio_write(ice, spec->boxbits[2]);
101 snd_ice1712_stdsp24_gpio_write(ice, spec->boxbits[1]);
108 snd_ice1712_stdsp24_gpio_write(ice, spec->boxbits[1]);
109 snd_ice1712_stdsp24_gpio_write(ice, spec->boxbits[2]);
113 snd_ice1712_stdsp24_gpio_write(ice, spec->boxbits[2]);
115 mutex_unlock(&ice->gpio_mutex);
118 static void snd_ice1712_stdsp24_box_midi(struct snd_ice1712 *ice, int box, int master)
120 struct hoontech_spec *spec = ice->spec;
122 mutex_lock(&ice->gpio_mutex);
126 snd_ice1712_stdsp24_gpio_write(ice, spec->boxbits[0]);
130 snd_ice1712_stdsp24_gpio_write(ice, spec->boxbits[2]);
131 snd_ice1712_stdsp24_gpio_write(ice, spec->boxbits[3]);
136 snd_ice1712_stdsp24_gpio_write(ice, spec->boxbits[2]);
141 snd_ice1712_stdsp24_gpio_write(ice, spec->boxbits[2]);
143 mutex_unlock(&ice->gpio_mutex);
146 static void snd_ice1712_stdsp24_midi2(struct snd_ice1712 *ice, int activate)
148 struct hoontech_spec *spec = ice->spec;
149 mutex_lock(&ice->gpio_mutex);
151 snd_ice1712_stdsp24_gpio_write(ice, spec->boxbits[3]);
152 mutex_unlock(&ice->gpio_mutex);
155 static int hoontech_init(struct snd_ice1712 *ice, bool staudio)
160 ice->num_total_dacs = 8;
161 ice->num_total_adcs = 8;
166 ice->spec = spec;
228 snd_ice1712_stdsp24_darear(ice,
230 snd_ice1712_stdsp24_mute(ice,
232 snd_ice1712_stdsp24_insel(ice,
236 snd_ice1712_stdsp24_midi2(ice, 1);
238 snd_ice1712_stdsp24_box_channel(ice, box, chn,
241 snd_ice1712_stdsp24_box_midi(ice, box, 1);
247 static int snd_ice1712_hoontech_init(struct snd_ice1712 *ice)
249 return hoontech_init(ice, false);
252 static int snd_ice1712_staudio_init(struct snd_ice1712 *ice)
254 return hoontech_init(ice, true);
264 struct snd_ice1712 *ice = ak->private_data[0];
266 snd_ice1712_save_gpio_status(ice);
270 snd_ice1712_write(ice, ICE1712_IREG_GPIO_DIRECTION,
271 ice->gpio.direction | tmp);
272 snd_ice1712_write(ice, ICE1712_IREG_GPIO_WRITE_MASK, ~tmp);
275 static int snd_ice1712_value_init(struct snd_ice1712 *ice)
302 ice->num_total_dacs = 2;
305 ice->num_total_adcs = 2;
308 ak = ice->akm = kmalloc(sizeof(struct snd_akm4xxx), GFP_KERNEL);
311 ice->akm_codecs = 1;
313 err = snd_ice1712_akm4xxx_init(ak, &akm_stdsp24_mv, &akm_stdsp24_mv_priv, ice);
318 return snd_ice1712_akm4xxx_build_controls(ice);
321 static int snd_ice1712_ez8_init(struct snd_ice1712 *ice)
323 ice->gpio.write_mask = ice->eeprom.gpiomask;
324 ice->gpio.direction = ice->eeprom.gpiodir;
325 snd_ice1712_write(ice, ICE1712_IREG_GPIO_WRITE_MASK, ice->eeprom.gpiomask);
326 snd_ice1712_write(ice, ICE1712_IREG_GPIO_DIRECTION, ice->eeprom.gpiodir);
327 snd_ice1712_write(ice, ICE1712_IREG_GPIO_DATA, ice->eeprom.gpiostate);