Lines Matching refs:ice
166 static void juli_spdif_in_open(struct snd_ice1712 *ice, in juli_spdif_in_open() argument
169 struct juli_spec *spec = ice->spec; in juli_spdif_in_open()
174 !ice->is_spdif_master(ice)) in juli_spdif_in_open()
198 struct snd_ice1712 *ice = ak->private_data[0]; in juli_akm_write() local
202 snd_vt1724_write_i2c(ice, AK4358_ADDR, addr, data); in juli_akm_write()
212 struct snd_ice1712 *ice = ak->private_data[0]; in juli_akm_set_rate_val() local
213 struct juli_spec *spec = ice->spec; in juli_akm_set_rate_val()
231 old_gpio = ice->gpio.get_data(ice); in juli_akm_set_rate_val()
235 ice->gpio.set_data(ice, new_gpio); in juli_akm_set_rate_val()
238 old = inb(ICEMT1724(ice, AC97_CMD)); in juli_akm_set_rate_val()
239 outb(old | VT1724_AC97_COLD, ICEMT1724(ice, AC97_CMD)); in juli_akm_set_rate_val()
241 outb(old & ~VT1724_AC97_COLD, ICEMT1724(ice, AC97_CMD)); in juli_akm_set_rate_val()
292 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); in juli_mute_get() local
294 val = ice->gpio.get_data(ice) & (unsigned int) kcontrol->private_value; in juli_mute_get()
307 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); in juli_mute_put() local
309 old_gpio = ice->gpio.get_data(ice); in juli_mute_put()
316 snd_akm4xxx_write(ice->akm, 0, 0x01, 0x01); in juli_mute_put()
327 snd_akm4xxx_write(ice->akm, 0, 0x01, 0x03); in juli_mute_put()
339 ice->gpio.set_data(ice, new_gpio); in juli_mute_put()
435 static int juli_add_controls(struct snd_ice1712 *ice) in juli_add_controls() argument
437 struct juli_spec *spec = ice->spec; in juli_add_controls()
442 err = snd_ice1712_akm4xxx_build_controls(ice); in juli_add_controls()
447 err = snd_ctl_add(ice->card, in juli_add_controls()
448 snd_ctl_new1(&juli_mute_controls[i], ice)); in juli_add_controls()
457 add_followers(ice->card, vmaster, follower_vols); in juli_add_controls()
458 err = snd_ctl_add(ice->card, vmaster); in juli_add_controls()
464 ice->pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream); in juli_add_controls()
472 static int juli_resume(struct snd_ice1712 *ice) in juli_resume() argument
474 struct snd_akm4xxx *ak = ice->akm; in juli_resume()
475 struct juli_spec *spec = ice->spec; in juli_resume()
483 static int juli_suspend(struct snd_ice1712 *ice) in juli_suspend() argument
485 struct snd_akm4xxx *ak = ice->akm; in juli_suspend()
486 struct juli_spec *spec = ice->spec; in juli_suspend()
498 static inline int juli_is_spdif_master(struct snd_ice1712 *ice) in juli_is_spdif_master() argument
500 return (ice->gpio.get_data(ice) & GPIO_INTERNAL_CLOCK) ? 0 : 1; in juli_is_spdif_master()
503 static unsigned int juli_get_rate(struct snd_ice1712 *ice) in juli_get_rate() argument
508 result = ice->gpio.get_data(ice) & GPIO_RATE_MASK; in juli_get_rate()
516 static void juli_set_rate(struct snd_ice1712 *ice, unsigned int rate) in juli_set_rate() argument
521 old = ice->gpio.get_data(ice); in juli_set_rate()
527 ice->gpio.set_data(ice, new); in juli_set_rate()
529 val = inb(ICEMT1724(ice, RATE)); in juli_set_rate()
530 outb(val | VT1724_SPDIF_MASTER, ICEMT1724(ice, RATE)); in juli_set_rate()
533 static inline unsigned char juli_set_mclk(struct snd_ice1712 *ice, in juli_set_mclk() argument
541 static int juli_set_spdif_clock(struct snd_ice1712 *ice, int type) in juli_set_spdif_clock() argument
544 old = ice->gpio.get_data(ice); in juli_set_spdif_clock()
546 ice->gpio.set_data(ice, (old & ~GPIO_RATE_MASK) | GPIO_MULTI_1X | in juli_set_spdif_clock()
555 struct snd_ice1712 *ice = ak4114->change_callback_private; in juli_ak4114_change() local
557 if (ice->is_spdif_master(ice) && c1) { in juli_ak4114_change()
562 juli_akm_set_rate_val(ice->akm, rate); in juli_ak4114_change()
566 static int juli_init(struct snd_ice1712 *ice) in juli_init() argument
588 ice->spec = spec; in juli_init()
590 err = snd_ak4114_create(ice->card, in juli_init()
594 ice, &spec->ak4114); in juli_init()
599 spec->ak4114->change_callback_private = ice; in juli_init()
609 spec->analog = (ice->gpio.get_data(ice) & GPIO_ANALOG_PRESENT) ? 0 : 1; in juli_init()
615 dev_info(ice->card->dev, "juli@: analog I/O detected\n"); in juli_init()
616 ice->num_total_dacs = 2; in juli_init()
617 ice->num_total_adcs = 2; in juli_init()
619 ice->akm = kzalloc(sizeof(struct snd_akm4xxx), GFP_KERNEL); in juli_init()
620 ak = ice->akm; in juli_init()
623 ice->akm_codecs = 1; in juli_init()
624 err = snd_ice1712_akm4xxx_init(ak, &akm_juli_dac, NULL, ice); in juli_init()
630 ice->hw_rates = &juli_rates_info; in juli_init()
631 ice->is_spdif_master = juli_is_spdif_master; in juli_init()
632 ice->get_rate = juli_get_rate; in juli_init()
633 ice->set_rate = juli_set_rate; in juli_init()
634 ice->set_mclk = juli_set_mclk; in juli_init()
635 ice->set_spdif_clock = juli_set_spdif_clock; in juli_init()
637 ice->spdif.ops.open = juli_spdif_in_open; in juli_init()
640 ice->pm_resume = juli_resume; in juli_init()
641 ice->pm_suspend = juli_suspend; in juli_init()
642 ice->pm_suspend_enabled = 1; in juli_init()