Lines Matching refs:ice
27 static void revo_i2s_mclk_changed(struct snd_ice1712 *ice)
30 outb(inb(ICEMT1724(ice, AC97_CMD)) | 0x80, ICEMT1724(ice, AC97_CMD));
33 outb(inb(ICEMT1724(ice, AC97_CMD)) & ~0x80, ICEMT1724(ice, AC97_CMD));
83 struct snd_ice1712 *ice = bus->private_data;
84 snd_ice1712_save_gpio_status(ice);
89 struct snd_ice1712 *ice = bus->private_data;
90 snd_ice1712_restore_gpio_status(ice);
95 struct snd_ice1712 *ice = bus->private_data;
104 ice->gpio.direction &= ~mask;
105 ice->gpio.direction |= val;
106 snd_ice1712_gpio_set_dir(ice, ice->gpio.direction);
107 snd_ice1712_gpio_set_mask(ice, ~mask);
112 struct snd_ice1712 *ice = bus->private_data;
119 snd_ice1712_gpio_write_bits(ice,
127 struct snd_ice1712 *ice = bus->private_data;
132 bit = snd_ice1712_gpio_read_bits(ice, VT1724_REVO_I2C_DATA) ? 1 : 0;
144 static int revo51_i2c_init(struct snd_ice1712 *ice,
153 ice->spec = spec;
156 err = snd_i2c_bus_create(ice->card, "ICE1724 GPIO6", NULL, &ice->i2c);
160 ice->i2c->private_data = ice;
161 ice->i2c->hw_ops.bit = &revo51_bit_ops;
164 err = snd_i2c_device_create(ice->i2c, "PT2258", 0x40, &spec->dev);
168 pt->card = ice->card;
169 pt->i2c_bus = ice->i2c;
311 struct snd_ice1712 *ice = ak->private_data[0];
317 snd_ice1712_gpio_write_bits(ice, 1 << 8, rate > 96000 ? 1 << 8 : 0);
325 snd_ice1712_gpio_write_bits(ice, 3 << 9, dfs << 9);
327 snd_ice1712_gpio_write_bits(ice, 1 << 11, 0);
328 snd_ice1712_gpio_write_bits(ice, 1 << 11, 1 << 11);
364 static void write_data(struct snd_ice1712 *ice, unsigned int gpio,
370 snd_ice1712_gpio_write(ice, gpio);
377 snd_ice1712_gpio_write(ice, gpio);
381 snd_ice1712_gpio_write(ice, gpio);
386 static unsigned char read_data(struct snd_ice1712 *ice, unsigned int gpio,
394 snd_ice1712_gpio_write(ice, gpio);
397 if (snd_ice1712_gpio_read(ice) & VT1724_REVO_CDIN)
402 snd_ice1712_gpio_write(ice, gpio);
408 static unsigned int ap192_4wire_start(struct snd_ice1712 *ice)
412 snd_ice1712_save_gpio_status(ice);
413 tmp = snd_ice1712_gpio_read(ice);
417 snd_ice1712_gpio_write(ice, tmp);
422 static void ap192_4wire_finish(struct snd_ice1712 *ice, unsigned int tmp)
426 snd_ice1712_gpio_write(ice, tmp);
428 snd_ice1712_restore_gpio_status(ice);
434 struct snd_ice1712 *ice = private_data;
437 tmp = ap192_4wire_start(ice);
440 write_data(ice, tmp, addrdata, 15);
441 ap192_4wire_finish(ice, tmp);
446 struct snd_ice1712 *ice = private_data;
450 tmp = ap192_4wire_start(ice);
451 write_data(ice, tmp, (AK4114_ADDR << 6) | (addr & 0x1f), 7);
452 data = read_data(ice, tmp, 7);
453 ap192_4wire_finish(ice, tmp);
457 static int ap192_ak4114_init(struct snd_ice1712 *ice)
476 ice->spec = spec;
478 err = snd_ak4114_create(ice->card,
482 ice, &spec->ak4114);
492 static int revo_init(struct snd_ice1712 *ice)
498 switch (ice->eeprom.subvendor) {
500 ice->num_total_dacs = 8;
501 ice->num_total_adcs = 2;
502 ice->gpio.i2s_mclk_changed = revo_i2s_mclk_changed;
505 ice->num_total_dacs = 8;
506 ice->num_total_adcs = 2;
509 ice->num_total_dacs = 2;
510 ice->num_total_adcs = 2;
518 ak = ice->akm = kcalloc(2, sizeof(struct snd_akm4xxx), GFP_KERNEL);
521 switch (ice->eeprom.subvendor) {
523 ice->akm_codecs = 2;
525 &akm_revo_front_priv, ice);
529 &akm_revo_surround_priv, ice);
533 snd_ice1712_gpio_write_bits(ice, VT1724_REVO_MUTE,
537 ice->akm_codecs = 2;
539 &akm_revo51_priv, ice);
543 &akm_revo51_adc_priv, ice);
546 err = revo51_i2c_init(ice, &ptc_revo51_volume);
550 snd_ice1712_gpio_write_bits(ice, VT1724_REVO_MUTE,
554 ice->akm_codecs = 1;
556 ice);
559 err = ap192_ak4114_init(ice);
564 snd_ice1712_gpio_write_bits(ice, VT1724_REVO_MUTE,
573 static int revo_add_controls(struct snd_ice1712 *ice)
575 struct revo51_spec *spec = ice->spec;
578 switch (ice->eeprom.subvendor) {
580 err = snd_ice1712_akm4xxx_build_controls(ice);
585 err = snd_ice1712_akm4xxx_build_controls(ice);
588 spec = ice->spec;
594 err = snd_ice1712_akm4xxx_build_controls(ice);
599 ice->pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream);