Lines Matching defs:ice
181 static void juli_spdif_in_open(struct snd_ice1712 *ice,
184 struct juli_spec *spec = ice->spec;
189 !ice->is_spdif_master(ice))
213 struct snd_ice1712 *ice = ak->private_data[0];
217 snd_vt1724_write_i2c(ice, AK4358_ADDR, addr, data);
227 struct snd_ice1712 *ice = ak->private_data[0];
228 struct juli_spec *spec = ice->spec;
246 old_gpio = ice->gpio.get_data(ice);
250 ice->gpio.set_data(ice, new_gpio);
253 old = inb(ICEMT1724(ice, AC97_CMD));
254 outb(old | VT1724_AC97_COLD, ICEMT1724(ice, AC97_CMD));
256 outb(old & ~VT1724_AC97_COLD, ICEMT1724(ice, AC97_CMD));
307 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
309 val = ice->gpio.get_data(ice) & (unsigned int) kcontrol->private_value;
322 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
324 old_gpio = ice->gpio.get_data(ice);
331 snd_akm4xxx_write(ice->akm, 0, 0x01, 0x01);
342 snd_akm4xxx_write(ice->akm, 0, 0x01, 0x03);
354 ice->gpio.set_data(ice, new_gpio);
449 static int __devinit juli_add_controls(struct snd_ice1712 *ice)
451 struct juli_spec *spec = ice->spec;
456 err = snd_ice1712_akm4xxx_build_controls(ice);
461 err = snd_ctl_add(ice->card,
462 snd_ctl_new1(&juli_mute_controls[i], ice));
471 add_slaves(ice->card, vmaster, slave_vols);
472 err = snd_ctl_add(ice->card, vmaster);
478 ice->pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream);
489 static int juli_resume(struct snd_ice1712 *ice)
491 struct snd_akm4xxx *ak = ice->akm;
492 struct juli_spec *spec = ice->spec;
500 static int juli_suspend(struct snd_ice1712 *ice)
502 struct snd_akm4xxx *ak = ice->akm;
513 static inline int juli_is_spdif_master(struct snd_ice1712 *ice)
515 return (ice->gpio.get_data(ice) & GPIO_INTERNAL_CLOCK) ? 0 : 1;
518 static unsigned int juli_get_rate(struct snd_ice1712 *ice)
523 result = ice->gpio.get_data(ice) & GPIO_RATE_MASK;
531 static void juli_set_rate(struct snd_ice1712 *ice, unsigned int rate)
536 old = ice->gpio.get_data(ice);
542 ice->gpio.set_data(ice, new);
544 val = inb(ICEMT1724(ice, RATE));
545 outb(val | VT1724_SPDIF_MASTER, ICEMT1724(ice, RATE));
548 static inline unsigned char juli_set_mclk(struct snd_ice1712 *ice,
556 static int juli_set_spdif_clock(struct snd_ice1712 *ice, int type)
559 old = ice->gpio.get_data(ice);
561 ice->gpio.set_data(ice, (old & ~GPIO_RATE_MASK) | GPIO_MULTI_1X |
570 struct snd_ice1712 *ice = ak4114->change_callback_private;
572 if (ice->is_spdif_master(ice) && c1) {
577 juli_akm_set_rate_val(ice->akm, rate);
581 static int __devinit juli_init(struct snd_ice1712 *ice)
603 ice->spec = spec;
605 err = snd_ak4114_create(ice->card,
609 ice, &spec->ak4114);
614 spec->ak4114->change_callback_private = ice;
622 ice->num_total_dacs = 2;
623 ice->num_total_adcs = 2;
625 ice->akm = kzalloc(sizeof(struct snd_akm4xxx), GFP_KERNEL);
626 ak = ice->akm;
629 ice->akm_codecs = 1;
630 err = snd_ice1712_akm4xxx_init(ak, &akm_juli_dac, NULL, ice);
636 ice->hw_rates = &juli_rates_info;
637 ice->is_spdif_master = juli_is_spdif_master;
638 ice->get_rate = juli_get_rate;
639 ice->set_rate = juli_set_rate;
640 ice->set_mclk = juli_set_mclk;
641 ice->set_spdif_clock = juli_set_spdif_clock;
643 ice->spdif.ops.open = juli_spdif_in_open;
646 ice->pm_resume = juli_resume;
647 ice->pm_suspend = juli_suspend;
648 ice->pm_suspend_enabled = 1;