ice                26 sound/pci/ice1712/ak4xxx.c 	struct snd_ice1712 *ice = ak->private_data[0];
ice                28 sound/pci/ice1712/ak4xxx.c 	snd_ice1712_save_gpio_status(ice);
ice                33 sound/pci/ice1712/ak4xxx.c 	struct snd_ice1712 *ice = ak->private_data[0];
ice                35 sound/pci/ice1712/ak4xxx.c 	snd_ice1712_restore_gpio_status(ice);
ice                48 sound/pci/ice1712/ak4xxx.c 	struct snd_ice1712 *ice = ak->private_data[0];
ice                53 sound/pci/ice1712/ak4xxx.c 	tmp = snd_ice1712_gpio_read(ice);
ice                61 sound/pci/ice1712/ak4xxx.c 			snd_ice1712_gpio_write(ice, tmp);
ice                68 sound/pci/ice1712/ak4xxx.c 		snd_ice1712_gpio_write(ice, tmp);
ice                78 sound/pci/ice1712/ak4xxx.c 		snd_ice1712_gpio_write(ice, tmp);
ice                85 sound/pci/ice1712/ak4xxx.c 		snd_ice1712_gpio_write(ice, tmp);
ice                89 sound/pci/ice1712/ak4xxx.c 		snd_ice1712_gpio_write(ice, tmp);
ice                97 sound/pci/ice1712/ak4xxx.c 			snd_ice1712_gpio_write(ice, tmp);
ice               105 sound/pci/ice1712/ak4xxx.c 	snd_ice1712_gpio_write(ice, tmp);
ice               113 sound/pci/ice1712/ak4xxx.c 			     const struct snd_ak4xxx_private *_priv, struct snd_ice1712 *ice)
ice               126 sound/pci/ice1712/ak4xxx.c 	ak->card = ice->card;
ice               128 sound/pci/ice1712/ak4xxx.c 	ak->private_data[0] = ice;
ice               139 sound/pci/ice1712/ak4xxx.c void snd_ice1712_akm4xxx_free(struct snd_ice1712 *ice)
ice               142 sound/pci/ice1712/ak4xxx.c 	if (ice->akm == NULL)
ice               144 sound/pci/ice1712/ak4xxx.c 	for (akidx = 0; akidx < ice->akm_codecs; akidx++) {
ice               145 sound/pci/ice1712/ak4xxx.c 		struct snd_akm4xxx *ak = &ice->akm[akidx];
ice               148 sound/pci/ice1712/ak4xxx.c 	kfree(ice->akm);
ice               154 sound/pci/ice1712/ak4xxx.c int snd_ice1712_akm4xxx_build_controls(struct snd_ice1712 *ice)
ice               159 sound/pci/ice1712/ak4xxx.c 	for (akidx = 0; akidx < ice->akm_codecs; akidx++) {
ice               160 sound/pci/ice1712/ak4xxx.c 		struct snd_akm4xxx *ak = &ice->akm[akidx];
ice                19 sound/pci/ice1712/amp.c static void wm_put(struct snd_ice1712 *ice, int reg, unsigned short val)
ice                23 sound/pci/ice1712/amp.c 	snd_vt1724_write_i2c(ice, WM_DEV, cval >> 8, cval & 0xff);
ice                26 sound/pci/ice1712/amp.c static int snd_vt1724_amp_init(struct snd_ice1712 *ice)
ice                40 sound/pci/ice1712/amp.c 	ice->num_total_dacs = 6;
ice                41 sound/pci/ice1712/amp.c 	ice->num_total_adcs = 2;
ice                46 sound/pci/ice1712/amp.c 	if (ice->eeprom.subvendor == VT1724_SUBDEVICE_AV710) {
ice                48 sound/pci/ice1712/amp.c 			wm_put(ice, wm_inits[i], wm_inits[i+1]);
ice                54 sound/pci/ice1712/amp.c static int snd_vt1724_amp_add_controls(struct snd_ice1712 *ice)
ice                56 sound/pci/ice1712/amp.c 	if (ice->ac97)
ice                59 sound/pci/ice1712/amp.c 		snd_ac97_write_cache(ice->ac97, 0x5a,
ice                60 sound/pci/ice1712/amp.c 			snd_ac97_read(ice->ac97, 0x5a) & ~0x8000);
ice                97 sound/pci/ice1712/aureon.c static void aureon_pca9554_write(struct snd_ice1712 *ice, unsigned char reg,
ice               105 sound/pci/ice1712/aureon.c 	tmp = snd_ice1712_gpio_read(ice);
ice               107 sound/pci/ice1712/aureon.c 	snd_ice1712_gpio_set_mask(ice, ~(AUREON_SPI_MOSI|AUREON_SPI_CLK|
ice               115 sound/pci/ice1712/aureon.c 	snd_ice1712_gpio_write(ice, tmp);
ice               123 sound/pci/ice1712/aureon.c 	snd_ice1712_gpio_write(ice, tmp);
ice               126 sound/pci/ice1712/aureon.c 	snd_ice1712_gpio_write(ice, tmp);
ice               129 sound/pci/ice1712/aureon.c 	snd_ice1712_gpio_write(ice, tmp);
ice               132 sound/pci/ice1712/aureon.c 	snd_ice1712_gpio_write(ice, tmp);
ice               152 sound/pci/ice1712/aureon.c 			snd_ice1712_gpio_write(ice, tmp);
ice               158 sound/pci/ice1712/aureon.c 			snd_ice1712_gpio_write(ice, tmp);
ice               161 sound/pci/ice1712/aureon.c 			snd_ice1712_gpio_write(ice, tmp);
ice               165 sound/pci/ice1712/aureon.c 		snd_ice1712_gpio_write(ice, tmp);
ice               168 sound/pci/ice1712/aureon.c 		snd_ice1712_gpio_write(ice, tmp);
ice               171 sound/pci/ice1712/aureon.c 		snd_ice1712_gpio_write(ice, tmp);
ice               175 sound/pci/ice1712/aureon.c 	snd_ice1712_gpio_write(ice, tmp);
ice               178 sound/pci/ice1712/aureon.c 	snd_ice1712_gpio_write(ice, tmp);
ice               181 sound/pci/ice1712/aureon.c 	snd_ice1712_gpio_write(ice, tmp);
ice               184 sound/pci/ice1712/aureon.c 	snd_ice1712_gpio_write(ice, tmp);
ice               200 sound/pci/ice1712/aureon.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               201 sound/pci/ice1712/aureon.c 	struct aureon_spec *spec = ice->spec;
ice               209 sound/pci/ice1712/aureon.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               210 sound/pci/ice1712/aureon.c 	struct aureon_spec *spec = ice->spec;
ice               217 sound/pci/ice1712/aureon.c 	snd_ice1712_save_gpio_status(ice);
ice               221 sound/pci/ice1712/aureon.c 		aureon_pca9554_write(ice, PCA9554_OUT, nval);
ice               224 sound/pci/ice1712/aureon.c 	snd_ice1712_restore_gpio_status(ice);
ice               229 sound/pci/ice1712/aureon.c static void aureon_ac97_write(struct snd_ice1712 *ice, unsigned short reg,
ice               232 sound/pci/ice1712/aureon.c 	struct aureon_spec *spec = ice->spec;
ice               236 sound/pci/ice1712/aureon.c 	tmp = (snd_ice1712_gpio_read(ice) & ~0xFF) | (reg & 0x7F);
ice               237 sound/pci/ice1712/aureon.c 	snd_ice1712_gpio_write(ice, tmp);
ice               240 sound/pci/ice1712/aureon.c 	snd_ice1712_gpio_write(ice, tmp);
ice               243 sound/pci/ice1712/aureon.c 	snd_ice1712_gpio_write(ice, tmp);
ice               249 sound/pci/ice1712/aureon.c 	snd_ice1712_gpio_write(ice, tmp);
ice               252 sound/pci/ice1712/aureon.c 	snd_ice1712_gpio_write(ice, tmp);
ice               255 sound/pci/ice1712/aureon.c 	snd_ice1712_gpio_write(ice, tmp);
ice               262 sound/pci/ice1712/aureon.c 	snd_ice1712_gpio_write(ice, tmp);
ice               265 sound/pci/ice1712/aureon.c 	snd_ice1712_gpio_write(ice, tmp);
ice               268 sound/pci/ice1712/aureon.c 	snd_ice1712_gpio_write(ice, tmp);
ice               273 sound/pci/ice1712/aureon.c 	snd_ice1712_gpio_write(ice, tmp);
ice               276 sound/pci/ice1712/aureon.c 	snd_ice1712_gpio_write(ice, tmp);
ice               283 sound/pci/ice1712/aureon.c static unsigned short aureon_ac97_read(struct snd_ice1712 *ice, unsigned short reg)
ice               285 sound/pci/ice1712/aureon.c 	struct aureon_spec *spec = ice->spec;
ice               292 sound/pci/ice1712/aureon.c static int aureon_ac97_init(struct snd_ice1712 *ice)
ice               294 sound/pci/ice1712/aureon.c 	struct aureon_spec *spec = ice->spec;
ice               320 sound/pci/ice1712/aureon.c 	tmp = (snd_ice1712_gpio_read(ice) | AUREON_AC97_RESET) & ~AUREON_AC97_DATA_MASK;
ice               321 sound/pci/ice1712/aureon.c 	snd_ice1712_gpio_write(ice, tmp);
ice               325 sound/pci/ice1712/aureon.c 	snd_ice1712_gpio_write(ice, tmp);
ice               329 sound/pci/ice1712/aureon.c 	snd_ice1712_gpio_write(ice, tmp);
ice               337 sound/pci/ice1712/aureon.c 	aureon_ac97_write(ice, AC97_MASTER, 0x0000);
ice               358 sound/pci/ice1712/aureon.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               361 sound/pci/ice1712/aureon.c 	mutex_lock(&ice->gpio_mutex);
ice               363 sound/pci/ice1712/aureon.c 	vol = aureon_ac97_read(ice, kcontrol->private_value & 0x7F);
ice               368 sound/pci/ice1712/aureon.c 	mutex_unlock(&ice->gpio_mutex);
ice               374 sound/pci/ice1712/aureon.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               378 sound/pci/ice1712/aureon.c 	snd_ice1712_save_gpio_status(ice);
ice               380 sound/pci/ice1712/aureon.c 	ovol = aureon_ac97_read(ice, kcontrol->private_value & 0x7F);
ice               388 sound/pci/ice1712/aureon.c 		aureon_ac97_write(ice, kcontrol->private_value & 0x7F, nvol);
ice               390 sound/pci/ice1712/aureon.c 	snd_ice1712_restore_gpio_status(ice);
ice               402 sound/pci/ice1712/aureon.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               404 sound/pci/ice1712/aureon.c 	mutex_lock(&ice->gpio_mutex);
ice               406 sound/pci/ice1712/aureon.c 	ucontrol->value.integer.value[0] = aureon_ac97_read(ice,
ice               409 sound/pci/ice1712/aureon.c 	mutex_unlock(&ice->gpio_mutex);
ice               415 sound/pci/ice1712/aureon.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               419 sound/pci/ice1712/aureon.c 	snd_ice1712_save_gpio_status(ice);
ice               421 sound/pci/ice1712/aureon.c 	ovol = aureon_ac97_read(ice, kcontrol->private_value & 0x7F);
ice               426 sound/pci/ice1712/aureon.c 		aureon_ac97_write(ice, kcontrol->private_value & 0x7F, nvol);
ice               428 sound/pci/ice1712/aureon.c 	snd_ice1712_restore_gpio_status(ice);
ice               440 sound/pci/ice1712/aureon.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               442 sound/pci/ice1712/aureon.c 	mutex_lock(&ice->gpio_mutex);
ice               444 sound/pci/ice1712/aureon.c 	ucontrol->value.integer.value[0] = aureon_ac97_read(ice, AC97_MIC) & 0x0020 ? 0 : 1;
ice               446 sound/pci/ice1712/aureon.c 	mutex_unlock(&ice->gpio_mutex);
ice               452 sound/pci/ice1712/aureon.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               456 sound/pci/ice1712/aureon.c 	snd_ice1712_save_gpio_status(ice);
ice               458 sound/pci/ice1712/aureon.c 	ovol = aureon_ac97_read(ice, AC97_MIC);
ice               463 sound/pci/ice1712/aureon.c 		aureon_ac97_write(ice, AC97_MIC, nvol);
ice               465 sound/pci/ice1712/aureon.c 	snd_ice1712_restore_gpio_status(ice);
ice               473 sound/pci/ice1712/aureon.c static void aureon_spi_write(struct snd_ice1712 *ice, unsigned int cs, unsigned int data, int bits)
ice               479 sound/pci/ice1712/aureon.c 	tmp = snd_ice1712_gpio_read(ice);
ice               481 sound/pci/ice1712/aureon.c 	if (ice->eeprom.subvendor == VT1724_SUBDEVICE_PRODIGY71LT ||
ice               482 sound/pci/ice1712/aureon.c 	    ice->eeprom.subvendor == VT1724_SUBDEVICE_PRODIGY71XT) {
ice               483 sound/pci/ice1712/aureon.c 		snd_ice1712_gpio_set_mask(ice, ~(PRODIGY_SPI_MOSI|PRODIGY_SPI_CLK|PRODIGY_WM_CS));
ice               487 sound/pci/ice1712/aureon.c 		snd_ice1712_gpio_set_mask(ice, ~(AUREON_WM_RW|AUREON_SPI_MOSI|AUREON_SPI_CLK|
ice               496 sound/pci/ice1712/aureon.c 	snd_ice1712_gpio_write(ice, tmp);
ice               501 sound/pci/ice1712/aureon.c 		snd_ice1712_gpio_write(ice, tmp);
ice               507 sound/pci/ice1712/aureon.c 		snd_ice1712_gpio_write(ice, tmp);
ice               510 sound/pci/ice1712/aureon.c 		snd_ice1712_gpio_write(ice, tmp);
ice               516 sound/pci/ice1712/aureon.c 	snd_ice1712_gpio_write(ice, tmp);
ice               519 sound/pci/ice1712/aureon.c 	snd_ice1712_gpio_write(ice, tmp);
ice               526 sound/pci/ice1712/aureon.c static void aureon_spi_read(struct snd_ice1712 *ice, unsigned int cs,
ice               532 sound/pci/ice1712/aureon.c 	tmp = (snd_ice1712_gpio_read(ice) & ~AUREON_SPI_CLK) | AUREON_CS8415_CS|AUREON_WM_CS;
ice               533 sound/pci/ice1712/aureon.c 	snd_ice1712_gpio_write(ice, tmp);
ice               535 sound/pci/ice1712/aureon.c 	snd_ice1712_gpio_write(ice, tmp);
ice               543 sound/pci/ice1712/aureon.c 		snd_ice1712_gpio_write(ice, tmp);
ice               547 sound/pci/ice1712/aureon.c 		snd_ice1712_gpio_write(ice, tmp);
ice               551 sound/pci/ice1712/aureon.c 		snd_ice1712_gpio_write(ice, tmp);
ice               558 sound/pci/ice1712/aureon.c 			tmp = snd_ice1712_gpio_read(ice);
ice               564 sound/pci/ice1712/aureon.c 			snd_ice1712_gpio_write(ice, tmp);
ice               568 sound/pci/ice1712/aureon.c 			snd_ice1712_gpio_write(ice, tmp);
ice               575 sound/pci/ice1712/aureon.c 	snd_ice1712_gpio_write(ice, tmp);
ice               578 sound/pci/ice1712/aureon.c static unsigned char aureon_cs8415_get(struct snd_ice1712 *ice, int reg)
ice               581 sound/pci/ice1712/aureon.c 	aureon_spi_write(ice, AUREON_CS8415_CS, 0x2000 | reg, 16);
ice               582 sound/pci/ice1712/aureon.c 	aureon_spi_read(ice, AUREON_CS8415_CS, 0x21, 8, &val, 1);
ice               586 sound/pci/ice1712/aureon.c static void aureon_cs8415_read(struct snd_ice1712 *ice, int reg,
ice               589 sound/pci/ice1712/aureon.c 	aureon_spi_write(ice, AUREON_CS8415_CS, 0x2000 | reg, 16);
ice               590 sound/pci/ice1712/aureon.c 	aureon_spi_read(ice, AUREON_CS8415_CS, 0x21, 8, buffer, size);
ice               593 sound/pci/ice1712/aureon.c static void aureon_cs8415_put(struct snd_ice1712 *ice, int reg,
ice               596 sound/pci/ice1712/aureon.c 	aureon_spi_write(ice, AUREON_CS8415_CS, 0x200000 | (reg << 8) | val, 24);
ice               602 sound/pci/ice1712/aureon.c static unsigned short wm_get(struct snd_ice1712 *ice, int reg)
ice               605 sound/pci/ice1712/aureon.c 	return ((unsigned short)ice->akm[0].images[reg] << 8) |
ice               606 sound/pci/ice1712/aureon.c 		ice->akm[0].images[reg + 1];
ice               612 sound/pci/ice1712/aureon.c static void wm_put_nocache(struct snd_ice1712 *ice, int reg, unsigned short val)
ice               614 sound/pci/ice1712/aureon.c 	aureon_spi_write(ice,
ice               615 sound/pci/ice1712/aureon.c 			 ((ice->eeprom.subvendor == VT1724_SUBDEVICE_PRODIGY71LT ||
ice               616 sound/pci/ice1712/aureon.c 			   ice->eeprom.subvendor == VT1724_SUBDEVICE_PRODIGY71XT) ?
ice               624 sound/pci/ice1712/aureon.c static void wm_put(struct snd_ice1712 *ice, int reg, unsigned short val)
ice               626 sound/pci/ice1712/aureon.c 	wm_put_nocache(ice, reg, val);
ice               628 sound/pci/ice1712/aureon.c 	ice->akm[0].images[reg] = val >> 8;
ice               629 sound/pci/ice1712/aureon.c 	ice->akm[0].images[reg + 1] = val;
ice               643 sound/pci/ice1712/aureon.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               645 sound/pci/ice1712/aureon.c 	mutex_lock(&ice->gpio_mutex);
ice               647 sound/pci/ice1712/aureon.c 	ucontrol->value.integer.value[0] = (wm_get(ice, WM_OUT_MUX1) >> 1) & 0x01;
ice               649 sound/pci/ice1712/aureon.c 	mutex_unlock(&ice->gpio_mutex);
ice               655 sound/pci/ice1712/aureon.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               659 sound/pci/ice1712/aureon.c 	snd_ice1712_save_gpio_status(ice);
ice               661 sound/pci/ice1712/aureon.c 	ovol = wm_get(ice, WM_OUT_MUX1);
ice               665 sound/pci/ice1712/aureon.c 		wm_put(ice, WM_OUT_MUX1, nvol);
ice               667 sound/pci/ice1712/aureon.c 	snd_ice1712_restore_gpio_status(ice);
ice               682 sound/pci/ice1712/aureon.c static void wm_set_vol(struct snd_ice1712 *ice, unsigned int index, unsigned short vol, unsigned short master)
ice               694 sound/pci/ice1712/aureon.c 	wm_put(ice, index, nvol);
ice               695 sound/pci/ice1712/aureon.c 	wm_put_nocache(ice, index, 0x180 | nvol);
ice               705 sound/pci/ice1712/aureon.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               707 sound/pci/ice1712/aureon.c 	mutex_lock(&ice->gpio_mutex);
ice               708 sound/pci/ice1712/aureon.c 	ucontrol->value.integer.value[0] = (wm_get(ice, WM_MUTE) & 0x10) ? 0 : 1;
ice               709 sound/pci/ice1712/aureon.c 	mutex_unlock(&ice->gpio_mutex);
ice               715 sound/pci/ice1712/aureon.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               719 sound/pci/ice1712/aureon.c 	snd_ice1712_save_gpio_status(ice);
ice               720 sound/pci/ice1712/aureon.c 	oval = wm_get(ice, WM_MUTE);
ice               724 sound/pci/ice1712/aureon.c 		wm_put(ice, WM_MUTE, nval);
ice               725 sound/pci/ice1712/aureon.c 	snd_ice1712_restore_gpio_status(ice);
ice               744 sound/pci/ice1712/aureon.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               745 sound/pci/ice1712/aureon.c 	struct aureon_spec *spec = ice->spec;
ice               755 sound/pci/ice1712/aureon.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               756 sound/pci/ice1712/aureon.c 	struct aureon_spec *spec = ice->spec;
ice               759 sound/pci/ice1712/aureon.c 	snd_ice1712_save_gpio_status(ice);
ice               768 sound/pci/ice1712/aureon.c 			for (dac = 0; dac < ice->num_total_dacs; dac += 2)
ice               769 sound/pci/ice1712/aureon.c 				wm_set_vol(ice, WM_DAC_ATTEN + dac + ch,
ice               775 sound/pci/ice1712/aureon.c 	snd_ice1712_restore_gpio_status(ice);
ice               794 sound/pci/ice1712/aureon.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               795 sound/pci/ice1712/aureon.c 	struct aureon_spec *spec = ice->spec;
ice               808 sound/pci/ice1712/aureon.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               809 sound/pci/ice1712/aureon.c 	struct aureon_spec *spec = ice->spec;
ice               815 sound/pci/ice1712/aureon.c 	snd_ice1712_save_gpio_status(ice);
ice               824 sound/pci/ice1712/aureon.c 			wm_set_vol(ice, idx, spec->vol[ofs + i],
ice               829 sound/pci/ice1712/aureon.c 	snd_ice1712_restore_gpio_status(ice);
ice               847 sound/pci/ice1712/aureon.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               848 sound/pci/ice1712/aureon.c 	struct aureon_spec *spec = ice->spec;
ice               862 sound/pci/ice1712/aureon.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               863 sound/pci/ice1712/aureon.c 	struct aureon_spec *spec = ice->spec;
ice               869 sound/pci/ice1712/aureon.c 	snd_ice1712_save_gpio_status(ice);
ice               876 sound/pci/ice1712/aureon.c 			wm_set_vol(ice, ofs + i, spec->vol[ofs + i],
ice               881 sound/pci/ice1712/aureon.c 	snd_ice1712_restore_gpio_status(ice);
ice               893 sound/pci/ice1712/aureon.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               894 sound/pci/ice1712/aureon.c 	struct aureon_spec *spec = ice->spec;
ice               905 sound/pci/ice1712/aureon.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               906 sound/pci/ice1712/aureon.c 	struct aureon_spec *spec = ice->spec;
ice               909 sound/pci/ice1712/aureon.c 	snd_ice1712_save_gpio_status(ice);
ice               917 sound/pci/ice1712/aureon.c 			for (dac = 0; dac < ice->num_total_dacs; dac += 2)
ice               918 sound/pci/ice1712/aureon.c 				wm_set_vol(ice, WM_DAC_ATTEN + dac + i,
ice               924 sound/pci/ice1712/aureon.c 	snd_ice1712_restore_gpio_status(ice);
ice               944 sound/pci/ice1712/aureon.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               947 sound/pci/ice1712/aureon.c 	mutex_lock(&ice->gpio_mutex);
ice               948 sound/pci/ice1712/aureon.c 	val = wm_get(ice, WM_DAC_DIG_MASTER_ATTEN) & 0xff;
ice               951 sound/pci/ice1712/aureon.c 	mutex_unlock(&ice->gpio_mutex);
ice               957 sound/pci/ice1712/aureon.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               964 sound/pci/ice1712/aureon.c 	snd_ice1712_save_gpio_status(ice);
ice               966 sound/pci/ice1712/aureon.c 	ovol = wm_get(ice, WM_DAC_DIG_MASTER_ATTEN) & 0xff;
ice               968 sound/pci/ice1712/aureon.c 		wm_put(ice, WM_DAC_DIG_MASTER_ATTEN, nvol); /* prelatch */
ice               969 sound/pci/ice1712/aureon.c 		wm_put_nocache(ice, WM_DAC_DIG_MASTER_ATTEN, nvol | 0x100); /* update */
ice               972 sound/pci/ice1712/aureon.c 	snd_ice1712_restore_gpio_status(ice);
ice               983 sound/pci/ice1712/aureon.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               987 sound/pci/ice1712/aureon.c 	mutex_lock(&ice->gpio_mutex);
ice               989 sound/pci/ice1712/aureon.c 		val = wm_get(ice, WM_ADC_GAIN + i);
ice               992 sound/pci/ice1712/aureon.c 	mutex_unlock(&ice->gpio_mutex);
ice               998 sound/pci/ice1712/aureon.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice              1002 sound/pci/ice1712/aureon.c 	snd_ice1712_save_gpio_status(ice);
ice              1004 sound/pci/ice1712/aureon.c 		old = wm_get(ice, WM_ADC_GAIN + i);
ice              1007 sound/pci/ice1712/aureon.c 			wm_put(ice, WM_ADC_GAIN + i, new);
ice              1011 sound/pci/ice1712/aureon.c 	snd_ice1712_restore_gpio_status(ice);
ice              1030 sound/pci/ice1712/aureon.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice              1034 sound/pci/ice1712/aureon.c 	mutex_lock(&ice->gpio_mutex);
ice              1037 sound/pci/ice1712/aureon.c 		vol = wm_get(ice, idx) & 0x1f;
ice              1040 sound/pci/ice1712/aureon.c 	mutex_unlock(&ice->gpio_mutex);
ice              1046 sound/pci/ice1712/aureon.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice              1051 sound/pci/ice1712/aureon.c 	snd_ice1712_save_gpio_status(ice);
ice              1055 sound/pci/ice1712/aureon.c 		ovol = wm_get(ice, idx);
ice              1057 sound/pci/ice1712/aureon.c 			wm_put(ice, idx, nvol | (ovol & ~0x1f));
ice              1061 sound/pci/ice1712/aureon.c 	snd_ice1712_restore_gpio_status(ice);
ice              1087 sound/pci/ice1712/aureon.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice              1089 sound/pci/ice1712/aureon.c 	if (ice->eeprom.subvendor == VT1724_SUBDEVICE_AUREON71_UNIVERSE)
ice              1097 sound/pci/ice1712/aureon.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice              1100 sound/pci/ice1712/aureon.c 	mutex_lock(&ice->gpio_mutex);
ice              1101 sound/pci/ice1712/aureon.c 	val = wm_get(ice, WM_ADC_MUX);
ice              1104 sound/pci/ice1712/aureon.c 	mutex_unlock(&ice->gpio_mutex);
ice              1110 sound/pci/ice1712/aureon.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice              1114 sound/pci/ice1712/aureon.c 	snd_ice1712_save_gpio_status(ice);
ice              1115 sound/pci/ice1712/aureon.c 	oval = wm_get(ice, WM_ADC_MUX);
ice              1121 sound/pci/ice1712/aureon.c 		wm_put(ice, WM_ADC_MUX, nval);
ice              1122 sound/pci/ice1712/aureon.c 	snd_ice1712_restore_gpio_status(ice);
ice              1131 sound/pci/ice1712/aureon.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice              1140 sound/pci/ice1712/aureon.c 	if (ice->eeprom.subvendor == VT1724_SUBDEVICE_PRODIGY71)
ice              1148 sound/pci/ice1712/aureon.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice              1149 sound/pci/ice1712/aureon.c 	struct aureon_spec *spec = ice->spec;
ice              1160 sound/pci/ice1712/aureon.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice              1161 sound/pci/ice1712/aureon.c 	struct aureon_spec *spec = ice->spec;
ice              1165 sound/pci/ice1712/aureon.c 	snd_ice1712_save_gpio_status(ice);
ice              1166 sound/pci/ice1712/aureon.c 	oval = aureon_cs8415_get(ice, CS8415_CTRL2);
ice              1171 sound/pci/ice1712/aureon.c 		aureon_cs8415_put(ice, CS8415_CTRL2, nval);
ice              1172 sound/pci/ice1712/aureon.c 	snd_ice1712_restore_gpio_status(ice);
ice              1188 sound/pci/ice1712/aureon.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice              1190 sound/pci/ice1712/aureon.c 	ratio = aureon_cs8415_get(ice, CS8415_RATIO);
ice              1202 sound/pci/ice1712/aureon.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice              1203 sound/pci/ice1712/aureon.c 	snd_ice1712_save_gpio_status(ice);
ice              1204 sound/pci/ice1712/aureon.c 	ucontrol->value.integer.value[0] = (aureon_cs8415_get(ice, CS8415_CTRL1) & 0x20) ? 0 : 1;
ice              1205 sound/pci/ice1712/aureon.c 	snd_ice1712_restore_gpio_status(ice);
ice              1211 sound/pci/ice1712/aureon.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice              1214 sound/pci/ice1712/aureon.c 	snd_ice1712_save_gpio_status(ice);
ice              1215 sound/pci/ice1712/aureon.c 	oval = aureon_cs8415_get(ice, CS8415_CTRL1);
ice              1222 sound/pci/ice1712/aureon.c 		aureon_cs8415_put(ice, CS8415_CTRL1, nval);
ice              1223 sound/pci/ice1712/aureon.c 	snd_ice1712_restore_gpio_status(ice);
ice              1239 sound/pci/ice1712/aureon.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice              1241 sound/pci/ice1712/aureon.c 	snd_ice1712_save_gpio_status(ice);
ice              1242 sound/pci/ice1712/aureon.c 	aureon_cs8415_read(ice, CS8415_QSUB, ucontrol->value.bytes.data, 10);
ice              1243 sound/pci/ice1712/aureon.c 	snd_ice1712_restore_gpio_status(ice);
ice              1263 sound/pci/ice1712/aureon.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice              1265 sound/pci/ice1712/aureon.c 	snd_ice1712_save_gpio_status(ice);
ice              1266 sound/pci/ice1712/aureon.c 	aureon_cs8415_read(ice, CS8415_C_BUFFER, ucontrol->value.iec958.status, 24);
ice              1267 sound/pci/ice1712/aureon.c 	snd_ice1712_restore_gpio_status(ice);
ice              1274 sound/pci/ice1712/aureon.c static int aureon_set_headphone_amp(struct snd_ice1712 *ice, int enable)
ice              1278 sound/pci/ice1712/aureon.c 	tmp2 = tmp = snd_ice1712_gpio_read(ice);
ice              1280 sound/pci/ice1712/aureon.c 		if (ice->eeprom.subvendor != VT1724_SUBDEVICE_PRODIGY71LT &&
ice              1281 sound/pci/ice1712/aureon.c 		    ice->eeprom.subvendor != VT1724_SUBDEVICE_PRODIGY71XT)
ice              1286 sound/pci/ice1712/aureon.c 		if (ice->eeprom.subvendor != VT1724_SUBDEVICE_PRODIGY71LT &&
ice              1287 sound/pci/ice1712/aureon.c 		    ice->eeprom.subvendor != VT1724_SUBDEVICE_PRODIGY71XT)
ice              1292 sound/pci/ice1712/aureon.c 		snd_ice1712_gpio_write(ice, tmp);
ice              1298 sound/pci/ice1712/aureon.c static int aureon_get_headphone_amp(struct snd_ice1712 *ice)
ice              1300 sound/pci/ice1712/aureon.c 	unsigned int tmp = snd_ice1712_gpio_read(ice);
ice              1309 sound/pci/ice1712/aureon.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice              1311 sound/pci/ice1712/aureon.c 	ucontrol->value.integer.value[0] = aureon_get_headphone_amp(ice);
ice              1318 sound/pci/ice1712/aureon.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice              1320 sound/pci/ice1712/aureon.c 	return aureon_set_headphone_amp(ice, ucontrol->value.integer.value[0]);
ice              1331 sound/pci/ice1712/aureon.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice              1332 sound/pci/ice1712/aureon.c 	ucontrol->value.integer.value[0] = (wm_get(ice, WM_DAC_CTRL2) & 0xf) == 0xf;
ice              1338 sound/pci/ice1712/aureon.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice              1340 sound/pci/ice1712/aureon.c 	temp2 = temp = wm_get(ice, WM_DAC_CTRL2);
ice              1346 sound/pci/ice1712/aureon.c 		wm_put(ice, WM_DAC_CTRL2, temp);
ice              1364 sound/pci/ice1712/aureon.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice              1365 sound/pci/ice1712/aureon.c 	ucontrol->value.enumerated.item[0] = (wm_get(ice, WM_MASTER) & 0x8) == 0x8;
ice              1372 sound/pci/ice1712/aureon.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice              1374 sound/pci/ice1712/aureon.c 	temp2 = temp = wm_get(ice, WM_MASTER);
ice              1382 sound/pci/ice1712/aureon.c 		wm_put(ice, WM_MASTER, temp);
ice              1855 sound/pci/ice1712/aureon.c static int aureon_add_controls(struct snd_ice1712 *ice)
ice              1861 sound/pci/ice1712/aureon.c 	if (ice->eeprom.subvendor == VT1724_SUBDEVICE_AUREON51_SKY)
ice              1864 sound/pci/ice1712/aureon.c 		err = snd_ctl_add(ice->card, snd_ctl_new1(&aureon_dac_controls[i], ice));
ice              1870 sound/pci/ice1712/aureon.c 		err = snd_ctl_add(ice->card, snd_ctl_new1(&wm_controls[i], ice));
ice              1875 sound/pci/ice1712/aureon.c 	if (ice->eeprom.subvendor == VT1724_SUBDEVICE_AUREON71_UNIVERSE) {
ice              1877 sound/pci/ice1712/aureon.c 			err = snd_ctl_add(ice->card, snd_ctl_new1(&universe_ac97_controls[i], ice));
ice              1881 sound/pci/ice1712/aureon.c 	} else if (ice->eeprom.subvendor != VT1724_SUBDEVICE_PRODIGY71LT &&
ice              1882 sound/pci/ice1712/aureon.c 		 ice->eeprom.subvendor != VT1724_SUBDEVICE_PRODIGY71XT) {
ice              1884 sound/pci/ice1712/aureon.c 			err = snd_ctl_add(ice->card, snd_ctl_new1(&ac97_controls[i], ice));
ice              1890 sound/pci/ice1712/aureon.c 	if (ice->eeprom.subvendor != VT1724_SUBDEVICE_PRODIGY71LT &&
ice              1891 sound/pci/ice1712/aureon.c 	    ice->eeprom.subvendor != VT1724_SUBDEVICE_PRODIGY71XT) {
ice              1893 sound/pci/ice1712/aureon.c 		snd_ice1712_save_gpio_status(ice);
ice              1894 sound/pci/ice1712/aureon.c 		id = aureon_cs8415_get(ice, CS8415_ID);
ice              1896 sound/pci/ice1712/aureon.c 			dev_info(ice->card->dev,
ice              1899 sound/pci/ice1712/aureon.c 			dev_info(ice->card->dev,
ice              1905 sound/pci/ice1712/aureon.c 				err = snd_ctl_add(ice->card, (kctl = snd_ctl_new1(&cs8415_controls[i], ice)));
ice              1909 sound/pci/ice1712/aureon.c 					kctl->id.device = ice->pcm->device;
ice              1912 sound/pci/ice1712/aureon.c 		snd_ice1712_restore_gpio_status(ice);
ice              1921 sound/pci/ice1712/aureon.c static int aureon_reset(struct snd_ice1712 *ice)
ice              2011 sound/pci/ice1712/aureon.c 	struct aureon_spec *spec = ice->spec;
ice              2013 sound/pci/ice1712/aureon.c 	err = aureon_ac97_init(ice);
ice              2017 sound/pci/ice1712/aureon.c 	snd_ice1712_gpio_set_dir(ice, 0x5fffff); /* fix this for the time being */
ice              2020 sound/pci/ice1712/aureon.c 	snd_ice1712_save_gpio_status(ice);
ice              2021 sound/pci/ice1712/aureon.c 	snd_ice1712_gpio_set_mask(ice, ~(AUREON_WM_RESET|AUREON_WM_CS|AUREON_CS8415_CS|AUREON_HP_SEL));
ice              2023 sound/pci/ice1712/aureon.c 	tmp = snd_ice1712_gpio_read(ice);
ice              2025 sound/pci/ice1712/aureon.c 	snd_ice1712_gpio_write(ice, tmp);
ice              2028 sound/pci/ice1712/aureon.c 	snd_ice1712_gpio_write(ice, tmp);
ice              2031 sound/pci/ice1712/aureon.c 	snd_ice1712_gpio_write(ice, tmp);
ice              2035 sound/pci/ice1712/aureon.c 	if (ice->eeprom.subvendor == VT1724_SUBDEVICE_PRODIGY71 ||
ice              2036 sound/pci/ice1712/aureon.c 		ice->eeprom.subvendor == VT1724_SUBDEVICE_PRODIGY71LT ||
ice              2037 sound/pci/ice1712/aureon.c 		ice->eeprom.subvendor == VT1724_SUBDEVICE_PRODIGY71XT)
ice              2042 sound/pci/ice1712/aureon.c 		wm_put(ice, p[0], p[1]);
ice              2045 sound/pci/ice1712/aureon.c 	if (ice->eeprom.subvendor != VT1724_SUBDEVICE_PRODIGY71LT &&
ice              2046 sound/pci/ice1712/aureon.c 	    ice->eeprom.subvendor != VT1724_SUBDEVICE_PRODIGY71XT) {
ice              2048 sound/pci/ice1712/aureon.c 			aureon_spi_write(ice, AUREON_CS8415_CS, *p | 0x200000, 24);
ice              2051 sound/pci/ice1712/aureon.c 		aureon_set_headphone_amp(ice, 1);
ice              2054 sound/pci/ice1712/aureon.c 	snd_ice1712_restore_gpio_status(ice);
ice              2057 sound/pci/ice1712/aureon.c 	aureon_pca9554_write(ice, PCA9554_DIR, 0x00);
ice              2058 sound/pci/ice1712/aureon.c 	aureon_pca9554_write(ice, PCA9554_OUT, 0x00);   /* internal AUX */
ice              2066 sound/pci/ice1712/aureon.c static int aureon_resume(struct snd_ice1712 *ice)
ice              2068 sound/pci/ice1712/aureon.c 	struct aureon_spec *spec = ice->spec;
ice              2071 sound/pci/ice1712/aureon.c 	err = aureon_reset(ice);
ice              2077 sound/pci/ice1712/aureon.c 	for (i = 0; i < ice->num_total_dacs; i++)
ice              2078 sound/pci/ice1712/aureon.c 		wm_set_vol(ice, i, spec->vol[i], spec->master[i % 2]);
ice              2086 sound/pci/ice1712/aureon.c static int aureon_init(struct snd_ice1712 *ice)
ice              2094 sound/pci/ice1712/aureon.c 	ice->spec = spec;
ice              2096 sound/pci/ice1712/aureon.c 	if (ice->eeprom.subvendor == VT1724_SUBDEVICE_AUREON51_SKY) {
ice              2097 sound/pci/ice1712/aureon.c 		ice->num_total_dacs = 6;
ice              2098 sound/pci/ice1712/aureon.c 		ice->num_total_adcs = 2;
ice              2101 sound/pci/ice1712/aureon.c 		ice->num_total_dacs = 8;
ice              2102 sound/pci/ice1712/aureon.c 		ice->num_total_adcs = 2;
ice              2106 sound/pci/ice1712/aureon.c 	ice->akm = kzalloc(sizeof(struct snd_akm4xxx), GFP_KERNEL);
ice              2107 sound/pci/ice1712/aureon.c 	if (!ice->akm)
ice              2109 sound/pci/ice1712/aureon.c 	ice->akm_codecs = 1;
ice              2111 sound/pci/ice1712/aureon.c 	err = aureon_reset(ice);
ice              2117 sound/pci/ice1712/aureon.c 	for (i = 0; i < ice->num_total_dacs; i++) {
ice              2119 sound/pci/ice1712/aureon.c 		wm_set_vol(ice, i, spec->vol[i], spec->master[i % 2]);
ice              2123 sound/pci/ice1712/aureon.c 	ice->pm_resume = aureon_resume;
ice              2124 sound/pci/ice1712/aureon.c 	ice->pm_suspend_enabled = 1;
ice                33 sound/pci/ice1712/delta.c static void ap_cs8427_write_byte(struct snd_ice1712 *ice, unsigned char data, unsigned char tmp)
ice                41 sound/pci/ice1712/delta.c 		snd_ice1712_write(ice, ICE1712_IREG_GPIO_DATA, tmp);
ice                44 sound/pci/ice1712/delta.c 		snd_ice1712_write(ice, ICE1712_IREG_GPIO_DATA, tmp);
ice                50 sound/pci/ice1712/delta.c static unsigned char ap_cs8427_read_byte(struct snd_ice1712 *ice, unsigned char tmp)
ice                57 sound/pci/ice1712/delta.c 		snd_ice1712_write(ice, ICE1712_IREG_GPIO_DATA, tmp);
ice                59 sound/pci/ice1712/delta.c 		if (snd_ice1712_read(ice, ICE1712_IREG_GPIO_DATA) & ICE1712_DELTA_AP_DIN)
ice                62 sound/pci/ice1712/delta.c 		snd_ice1712_write(ice, ICE1712_IREG_GPIO_DATA, tmp);
ice                69 sound/pci/ice1712/delta.c static unsigned char ap_cs8427_codec_select(struct snd_ice1712 *ice)
ice                72 sound/pci/ice1712/delta.c 	tmp = snd_ice1712_read(ice, ICE1712_IREG_GPIO_DATA);
ice                73 sound/pci/ice1712/delta.c 	switch (ice->eeprom.subvendor) {
ice                94 sound/pci/ice1712/delta.c 	snd_ice1712_write(ice, ICE1712_IREG_GPIO_DATA, tmp);
ice               100 sound/pci/ice1712/delta.c static void ap_cs8427_codec_deassert(struct snd_ice1712 *ice, unsigned char tmp)
ice               102 sound/pci/ice1712/delta.c 	switch (ice->eeprom.subvendor) {
ice               119 sound/pci/ice1712/delta.c 	snd_ice1712_write(ice, ICE1712_IREG_GPIO_DATA, tmp);
ice               125 sound/pci/ice1712/delta.c 	struct snd_ice1712 *ice = device->bus->private_data;
ice               129 sound/pci/ice1712/delta.c 	mutex_lock(&ice->gpio_mutex);
ice               130 sound/pci/ice1712/delta.c 	tmp = ap_cs8427_codec_select(ice);
ice               131 sound/pci/ice1712/delta.c 	ap_cs8427_write_byte(ice, (device->addr << 1) | 0, tmp); /* address + write mode */
ice               133 sound/pci/ice1712/delta.c 		ap_cs8427_write_byte(ice, *bytes++, tmp);
ice               134 sound/pci/ice1712/delta.c 	ap_cs8427_codec_deassert(ice, tmp);
ice               135 sound/pci/ice1712/delta.c 	mutex_unlock(&ice->gpio_mutex);
ice               142 sound/pci/ice1712/delta.c 	struct snd_ice1712 *ice = device->bus->private_data;
ice               146 sound/pci/ice1712/delta.c 	mutex_lock(&ice->gpio_mutex);
ice               147 sound/pci/ice1712/delta.c 	tmp = ap_cs8427_codec_select(ice);
ice               148 sound/pci/ice1712/delta.c 	ap_cs8427_write_byte(ice, (device->addr << 1) | 1, tmp); /* address + read mode */
ice               150 sound/pci/ice1712/delta.c 		*bytes++ = ap_cs8427_read_byte(ice, tmp);
ice               151 sound/pci/ice1712/delta.c 	ap_cs8427_codec_deassert(ice, tmp);
ice               152 sound/pci/ice1712/delta.c 	mutex_unlock(&ice->gpio_mutex);
ice               172 sound/pci/ice1712/delta.c static void snd_ice1712_delta_cs8403_spdif_write(struct snd_ice1712 *ice, unsigned char bits)
ice               179 sound/pci/ice1712/delta.c 	mutex_lock(&ice->gpio_mutex);
ice               180 sound/pci/ice1712/delta.c 	tmp = snd_ice1712_read(ice, ICE1712_IREG_GPIO_DATA);
ice               185 sound/pci/ice1712/delta.c 		snd_ice1712_write(ice, ICE1712_IREG_GPIO_DATA, tmp);
ice               188 sound/pci/ice1712/delta.c 		snd_ice1712_write(ice, ICE1712_IREG_GPIO_DATA, tmp);
ice               192 sound/pci/ice1712/delta.c 	snd_ice1712_write(ice, ICE1712_IREG_GPIO_DATA, tmp);
ice               193 sound/pci/ice1712/delta.c 	mutex_unlock(&ice->gpio_mutex);
ice               197 sound/pci/ice1712/delta.c static void delta_spdif_default_get(struct snd_ice1712 *ice, struct snd_ctl_elem_value *ucontrol)
ice               199 sound/pci/ice1712/delta.c 	snd_cs8403_decode_spdif_bits(&ucontrol->value.iec958, ice->spdif.cs8403_bits);
ice               202 sound/pci/ice1712/delta.c static int delta_spdif_default_put(struct snd_ice1712 *ice, struct snd_ctl_elem_value *ucontrol)
ice               208 sound/pci/ice1712/delta.c 	spin_lock_irq(&ice->reg_lock);
ice               209 sound/pci/ice1712/delta.c 	change = ice->spdif.cs8403_bits != val;
ice               210 sound/pci/ice1712/delta.c 	ice->spdif.cs8403_bits = val;
ice               211 sound/pci/ice1712/delta.c 	if (change && ice->playback_pro_substream == NULL) {
ice               212 sound/pci/ice1712/delta.c 		spin_unlock_irq(&ice->reg_lock);
ice               213 sound/pci/ice1712/delta.c 		snd_ice1712_delta_cs8403_spdif_write(ice, val);
ice               215 sound/pci/ice1712/delta.c 		spin_unlock_irq(&ice->reg_lock);
ice               220 sound/pci/ice1712/delta.c static void delta_spdif_stream_get(struct snd_ice1712 *ice, struct snd_ctl_elem_value *ucontrol)
ice               222 sound/pci/ice1712/delta.c 	snd_cs8403_decode_spdif_bits(&ucontrol->value.iec958, ice->spdif.cs8403_stream_bits);
ice               225 sound/pci/ice1712/delta.c static int delta_spdif_stream_put(struct snd_ice1712 *ice, struct snd_ctl_elem_value *ucontrol)
ice               231 sound/pci/ice1712/delta.c 	spin_lock_irq(&ice->reg_lock);
ice               232 sound/pci/ice1712/delta.c 	change = ice->spdif.cs8403_stream_bits != val;
ice               233 sound/pci/ice1712/delta.c 	ice->spdif.cs8403_stream_bits = val;
ice               234 sound/pci/ice1712/delta.c 	if (change && ice->playback_pro_substream != NULL) {
ice               235 sound/pci/ice1712/delta.c 		spin_unlock_irq(&ice->reg_lock);
ice               236 sound/pci/ice1712/delta.c 		snd_ice1712_delta_cs8403_spdif_write(ice, val);
ice               238 sound/pci/ice1712/delta.c 		spin_unlock_irq(&ice->reg_lock);
ice               250 sound/pci/ice1712/delta.c         struct snd_ice1712 *ice = ak->private_data[0];
ice               252 sound/pci/ice1712/delta.c 	snd_ice1712_save_gpio_status(ice);
ice               264 sound/pci/ice1712/delta.c         struct snd_ice1712 *ice = ak->private_data[0];
ice               266 sound/pci/ice1712/delta.c 	snd_ice1712_save_gpio_status(ice);
ice               277 sound/pci/ice1712/delta.c 	struct snd_ice1712 *ice = ak->private_data[0];
ice               279 sound/pci/ice1712/delta.c 	snd_ice1712_save_gpio_status(ice);
ice               291 sound/pci/ice1712/delta.c         struct snd_ice1712 *ice = ak->private_data[0];
ice               293 sound/pci/ice1712/delta.c 	snd_ice1712_save_gpio_status(ice);
ice               302 sound/pci/ice1712/delta.c static void delta_1010_set_rate_val(struct snd_ice1712 *ice, unsigned int rate)
ice               309 sound/pci/ice1712/delta.c 	mutex_lock(&ice->gpio_mutex);
ice               310 sound/pci/ice1712/delta.c 	tmp = snd_ice1712_read(ice, ICE1712_IREG_GPIO_DATA);
ice               315 sound/pci/ice1712/delta.c 		snd_ice1712_write(ice, ICE1712_IREG_GPIO_DATA, tmp2);
ice               316 sound/pci/ice1712/delta.c 	mutex_unlock(&ice->gpio_mutex);
ice               325 sound/pci/ice1712/delta.c 	struct snd_ice1712 *ice = ak->private_data[0];
ice               331 sound/pci/ice1712/delta.c 	mutex_lock(&ice->gpio_mutex);
ice               332 sound/pci/ice1712/delta.c 	tmp = snd_ice1712_read(ice, ICE1712_IREG_GPIO_DATA);
ice               333 sound/pci/ice1712/delta.c 	mutex_unlock(&ice->gpio_mutex);
ice               342 sound/pci/ice1712/delta.c 	mutex_lock(&ice->gpio_mutex);
ice               343 sound/pci/ice1712/delta.c 	tmp = snd_ice1712_read(ice, ICE1712_IREG_GPIO_DATA) & ~ICE1712_DELTA_DFS;
ice               346 sound/pci/ice1712/delta.c 	snd_ice1712_write(ice, ICE1712_IREG_GPIO_DATA, tmp);
ice               347 sound/pci/ice1712/delta.c 	mutex_unlock(&ice->gpio_mutex);
ice               374 sound/pci/ice1712/delta.c static void delta_open_spdif(struct snd_ice1712 *ice, struct snd_pcm_substream *substream)
ice               376 sound/pci/ice1712/delta.c 	ice->spdif.cs8403_stream_bits = ice->spdif.cs8403_bits;
ice               380 sound/pci/ice1712/delta.c static void delta_setup_spdif(struct snd_ice1712 *ice, int rate)
ice               386 sound/pci/ice1712/delta.c 	spin_lock_irqsave(&ice->reg_lock, flags);
ice               387 sound/pci/ice1712/delta.c 	tmp = ice->spdif.cs8403_stream_bits;
ice               396 sound/pci/ice1712/delta.c 	change = ice->spdif.cs8403_stream_bits != tmp;
ice               397 sound/pci/ice1712/delta.c 	ice->spdif.cs8403_stream_bits = tmp;
ice               398 sound/pci/ice1712/delta.c 	spin_unlock_irqrestore(&ice->reg_lock, flags);
ice               400 sound/pci/ice1712/delta.c 		snd_ctl_notify(ice->card, SNDRV_CTL_EVENT_MASK_VALUE, &ice->spdif.stream_ctl->id);
ice               401 sound/pci/ice1712/delta.c 	snd_ice1712_delta_cs8403_spdif_write(ice, tmp);
ice               411 sound/pci/ice1712/delta.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               413 sound/pci/ice1712/delta.c 	if (snd_i2c_sendbytes(ice->cs8427, &reg, 1) != 1)
ice               414 sound/pci/ice1712/delta.c 		dev_err(ice->card->dev,
ice               416 sound/pci/ice1712/delta.c 	snd_i2c_readbytes(ice->cs8427, &reg, 1);
ice               566 sound/pci/ice1712/delta.c static int snd_ice1712_delta_resume(struct snd_ice1712 *ice)
ice               572 sound/pci/ice1712/delta.c 	switch (ice->eeprom.subvendor) {
ice               579 sound/pci/ice1712/delta.c 		snd_cs8427_init(ice->i2c, ice->cs8427);
ice               588 sound/pci/ice1712/delta.c 		snd_ice1712_delta_cs8403_spdif_write(ice, ice->spdif.cs8403_bits);
ice               593 sound/pci/ice1712/delta.c 	if (ice->akm_codecs) {
ice               594 sound/pci/ice1712/delta.c 		memcpy(akm_img_bak, ice->akm->images, sizeof(akm_img_bak));
ice               595 sound/pci/ice1712/delta.c 		memcpy(akm_vol_bak, ice->akm->volumes, sizeof(akm_vol_bak));
ice               596 sound/pci/ice1712/delta.c 		snd_akm4xxx_init(ice->akm);
ice               597 sound/pci/ice1712/delta.c 		memcpy(ice->akm->images, akm_img_bak, sizeof(akm_img_bak));
ice               598 sound/pci/ice1712/delta.c 		memcpy(ice->akm->volumes, akm_vol_bak, sizeof(akm_vol_bak));
ice               599 sound/pci/ice1712/delta.c 		snd_akm4xxx_reset(ice->akm, 0);
ice               605 sound/pci/ice1712/delta.c static int snd_ice1712_delta_suspend(struct snd_ice1712 *ice)
ice               607 sound/pci/ice1712/delta.c 	if (ice->akm_codecs) /* reset & mute codec */
ice               608 sound/pci/ice1712/delta.c 		snd_akm4xxx_reset(ice->akm, 1);
ice               614 sound/pci/ice1712/delta.c static int snd_ice1712_delta_init(struct snd_ice1712 *ice)
ice               620 sound/pci/ice1712/delta.c 	if (ice->eeprom.subvendor == ICE1712_SUBDEVICE_DELTA1010 &&
ice               621 sound/pci/ice1712/delta.c 	    ice->eeprom.gpiodir == 0x7b)
ice               622 sound/pci/ice1712/delta.c 		ice->eeprom.subvendor = ICE1712_SUBDEVICE_DELTA1010E;
ice               624 sound/pci/ice1712/delta.c 	if (ice->eeprom.subvendor == ICE1712_SUBDEVICE_DELTA66 &&
ice               625 sound/pci/ice1712/delta.c 	    ice->eeprom.gpiodir == 0xfb)
ice               626 sound/pci/ice1712/delta.c 	    	ice->eeprom.subvendor = ICE1712_SUBDEVICE_DELTA66E;
ice               629 sound/pci/ice1712/delta.c 	switch (ice->eeprom.subvendor) {
ice               631 sound/pci/ice1712/delta.c 		ice->num_total_dacs = 2;
ice               632 sound/pci/ice1712/delta.c 		ice->num_total_adcs = 2;
ice               635 sound/pci/ice1712/delta.c 		ice->num_total_dacs = 8;
ice               636 sound/pci/ice1712/delta.c 		ice->num_total_adcs = 2;
ice               640 sound/pci/ice1712/delta.c 		ice->num_total_dacs = ice->omni ? 8 : 4;
ice               641 sound/pci/ice1712/delta.c 		ice->num_total_adcs = ice->omni ? 8 : 4;
ice               648 sound/pci/ice1712/delta.c 		ice->num_total_dacs = 8;
ice               649 sound/pci/ice1712/delta.c 		ice->num_total_adcs = 8;
ice               652 sound/pci/ice1712/delta.c 		ice->num_total_dacs = 4;	/* two AK4324 codecs */
ice               656 sound/pci/ice1712/delta.c 		ice->num_total_dacs = 4;
ice               657 sound/pci/ice1712/delta.c 		ice->num_total_adcs = 4;
ice               661 sound/pci/ice1712/delta.c 	ice->pm_resume = snd_ice1712_delta_resume;
ice               662 sound/pci/ice1712/delta.c 	ice->pm_suspend = snd_ice1712_delta_suspend;
ice               663 sound/pci/ice1712/delta.c 	ice->pm_suspend_enabled = 1;
ice               666 sound/pci/ice1712/delta.c 	tmp = snd_ice1712_read(ice, ICE1712_IREG_GPIO_DATA);
ice               668 sound/pci/ice1712/delta.c 	snd_ice1712_write(ice, ICE1712_IREG_GPIO_DATA, tmp);
ice               672 sound/pci/ice1712/delta.c 	switch (ice->eeprom.subvendor) {
ice               679 sound/pci/ice1712/delta.c 		if ((err = snd_i2c_bus_create(ice->card, "ICE1712 GPIO 1", NULL, &ice->i2c)) < 0) {
ice               680 sound/pci/ice1712/delta.c 			dev_err(ice->card->dev, "unable to create I2C bus\n");
ice               683 sound/pci/ice1712/delta.c 		ice->i2c->private_data = ice;
ice               684 sound/pci/ice1712/delta.c 		ice->i2c->ops = &ap_cs8427_i2c_ops;
ice               685 sound/pci/ice1712/delta.c 		if ((err = snd_ice1712_init_cs8427(ice, CS8427_BASE_ADDR)) < 0)
ice               690 sound/pci/ice1712/delta.c 		ice->gpio.set_pro_rate = delta_1010_set_rate_val;
ice               693 sound/pci/ice1712/delta.c 		ice->gpio.set_pro_rate = delta_1010_set_rate_val;
ice               696 sound/pci/ice1712/delta.c 		ice->spdif.ops.open = delta_open_spdif;
ice               697 sound/pci/ice1712/delta.c 		ice->spdif.ops.setup_rate = delta_setup_spdif;
ice               698 sound/pci/ice1712/delta.c 		ice->spdif.ops.default_get = delta_spdif_default_get;
ice               699 sound/pci/ice1712/delta.c 		ice->spdif.ops.default_put = delta_spdif_default_put;
ice               700 sound/pci/ice1712/delta.c 		ice->spdif.ops.stream_get = delta_spdif_stream_get;
ice               701 sound/pci/ice1712/delta.c 		ice->spdif.ops.stream_put = delta_spdif_stream_put;
ice               703 sound/pci/ice1712/delta.c 		snd_ice1712_delta_cs8403_spdif_write(ice, ice->spdif.cs8403_bits);
ice               708 sound/pci/ice1712/delta.c 	switch (ice->eeprom.subvendor) {
ice               717 sound/pci/ice1712/delta.c 	ak = ice->akm = kmalloc(sizeof(struct snd_akm4xxx), GFP_KERNEL);
ice               720 sound/pci/ice1712/delta.c 	ice->akm_codecs = 1;
ice               722 sound/pci/ice1712/delta.c 	switch (ice->eeprom.subvendor) {
ice               724 sound/pci/ice1712/delta.c 		err = snd_ice1712_akm4xxx_init(ak, &akm_audiophile, &akm_audiophile_priv, ice);
ice               727 sound/pci/ice1712/delta.c 		err = snd_ice1712_akm4xxx_init(ak, &akm_delta410, &akm_delta410_priv, ice);
ice               731 sound/pci/ice1712/delta.c 		err = snd_ice1712_akm4xxx_init(ak, &akm_delta1010lt, &akm_delta1010lt_priv, ice);
ice               735 sound/pci/ice1712/delta.c 		err = snd_ice1712_akm4xxx_init(ak, &akm_delta44, &akm_delta44_priv, ice);
ice               738 sound/pci/ice1712/delta.c 		err = snd_ice1712_akm4xxx_init(ak, &akm_vx442, &akm_vx442_priv, ice);
ice               741 sound/pci/ice1712/delta.c 		err = snd_ice1712_akm4xxx_init(ak, &akm_delta66e, &akm_delta66e_priv, ice);
ice               768 sound/pci/ice1712/delta.c static int snd_ice1712_delta_add_controls(struct snd_ice1712 *ice)
ice               773 sound/pci/ice1712/delta.c 	switch (ice->eeprom.subvendor) {
ice               776 sound/pci/ice1712/delta.c 		err = snd_ctl_add(ice->card, snd_ctl_new1(&snd_ice1712_delta1010_wordclock_select, ice));
ice               779 sound/pci/ice1712/delta.c 		err = snd_ctl_add(ice->card, snd_ctl_new1(&snd_ice1712_delta1010_wordclock_status, ice));
ice               784 sound/pci/ice1712/delta.c 		err = snd_ctl_add(ice->card, snd_ctl_new1(&snd_ice1712_deltadio2496_spdif_in_select, ice));
ice               790 sound/pci/ice1712/delta.c 		err = snd_ctl_add(ice->card, snd_ctl_new1(&snd_ice1712_delta1010lt_wordclock_select, ice));
ice               793 sound/pci/ice1712/delta.c 		err = snd_ctl_add(ice->card, snd_ctl_new1(&snd_ice1712_delta1010lt_wordclock_status, ice));
ice               800 sound/pci/ice1712/delta.c 	switch (ice->eeprom.subvendor) {
ice               805 sound/pci/ice1712/delta.c 		err = snd_ice1712_spdif_build_controls(ice);
ice               812 sound/pci/ice1712/delta.c 	switch (ice->eeprom.subvendor) {
ice               817 sound/pci/ice1712/delta.c 		err = snd_ctl_add(ice->card, snd_ctl_new1(&snd_ice1712_delta_spdif_in_status, ice));
ice               824 sound/pci/ice1712/delta.c 	switch (ice->eeprom.subvendor) {
ice               833 sound/pci/ice1712/delta.c 		err = snd_ice1712_akm4xxx_build_controls(ice);
ice                39 sound/pci/ice1712/envy24ht.h #define ICEREG1724(ice, x) ((ice)->port + VT1724_REG_##x)
ice               117 sound/pci/ice1712/envy24ht.h #define ICEMT1724(ice, x) ((ice)->profi_port + VT1724_MT_##x)
ice               203 sound/pci/ice1712/envy24ht.h unsigned char snd_vt1724_read_i2c(struct snd_ice1712 *ice, unsigned char dev, unsigned char addr);
ice               204 sound/pci/ice1712/envy24ht.h void snd_vt1724_write_i2c(struct snd_ice1712 *ice, unsigned char dev, unsigned char addr, unsigned char data);
ice                44 sound/pci/ice1712/ews.c 	struct snd_ice1712 *ice = bus->private_data;
ice                50 sound/pci/ice1712/ews.c 	snd_ice1712_write(ice, ICE1712_IREG_GPIO_DATA, tmp);
ice                56 sound/pci/ice1712/ews.c 	struct snd_ice1712 *ice = bus->private_data;
ice                57 sound/pci/ice1712/ews.c 	return snd_ice1712_read(ice, ICE1712_IREG_GPIO_DATA) & ICE1712_EWX2496_SERIAL_CLOCK ? 1 : 0;
ice                62 sound/pci/ice1712/ews.c 	struct snd_ice1712 *ice = bus->private_data;
ice                65 sound/pci/ice1712/ews.c 	snd_ice1712_write(ice, ICE1712_IREG_GPIO_WRITE_MASK, ~ICE1712_EWX2496_RW);
ice                66 sound/pci/ice1712/ews.c 	snd_ice1712_write(ice, ICE1712_IREG_GPIO_DATA, 0);
ice                69 sound/pci/ice1712/ews.c 	bit = snd_ice1712_read(ice, ICE1712_IREG_GPIO_DATA) & ICE1712_EWX2496_SERIAL_DATA ? 1 : 0;
ice                71 sound/pci/ice1712/ews.c 	snd_ice1712_write(ice, ICE1712_IREG_GPIO_DATA, ICE1712_EWX2496_RW);
ice                73 sound/pci/ice1712/ews.c 	snd_ice1712_write(ice, ICE1712_IREG_GPIO_WRITE_MASK, ~ICE1712_EWX2496_SERIAL_CLOCK);
ice                79 sound/pci/ice1712/ews.c 	struct snd_ice1712 *ice = bus->private_data;
ice                82 sound/pci/ice1712/ews.c 	snd_ice1712_save_gpio_status(ice);
ice                85 sound/pci/ice1712/ews.c 	switch (ice->eeprom.subvendor) {
ice                93 sound/pci/ice1712/ews.c 	snd_ice1712_gpio_write_bits(ice, mask, mask);
ice                98 sound/pci/ice1712/ews.c 	struct snd_ice1712 *ice = bus->private_data;
ice                99 sound/pci/ice1712/ews.c 	snd_ice1712_restore_gpio_status(ice);
ice               104 sound/pci/ice1712/ews.c 	struct snd_ice1712 *ice = bus->private_data;
ice               111 sound/pci/ice1712/ews.c 	ice->gpio.direction &= ~(ICE1712_EWX2496_SERIAL_CLOCK|ICE1712_EWX2496_SERIAL_DATA);
ice               112 sound/pci/ice1712/ews.c 	ice->gpio.direction |= mask;
ice               113 sound/pci/ice1712/ews.c 	snd_ice1712_write(ice, ICE1712_IREG_GPIO_DIRECTION, ice->gpio.direction);
ice               114 sound/pci/ice1712/ews.c 	snd_ice1712_write(ice, ICE1712_IREG_GPIO_WRITE_MASK, ~mask);
ice               132 sound/pci/ice1712/ews.c static int snd_ice1712_ews88mt_chip_select(struct snd_ice1712 *ice, int chip_mask)
ice               134 sound/pci/ice1712/ews.c 	struct ews_spec *spec = ice->spec;
ice               139 sound/pci/ice1712/ews.c 	snd_i2c_lock(ice->i2c);
ice               147 sound/pci/ice1712/ews.c 	snd_i2c_unlock(ice->i2c);
ice               151 sound/pci/ice1712/ews.c 	snd_i2c_unlock(ice->i2c);
ice               152 sound/pci/ice1712/ews.c 	dev_err(ice->card->dev,
ice               160 sound/pci/ice1712/ews.c 	struct snd_ice1712 *ice = ak->private_data[0];
ice               163 sound/pci/ice1712/ews.c 	if (snd_ice1712_ews88mt_chip_select(ice, ~(1 << chip) & 0x0f) < 0)
ice               164 sound/pci/ice1712/ews.c 		dev_err(ice->card->dev, "fatal error (ews88mt chip select)\n");
ice               165 sound/pci/ice1712/ews.c 	snd_ice1712_save_gpio_status(ice);
ice               169 sound/pci/ice1712/ews.c 	snd_ice1712_write(ice, ICE1712_IREG_GPIO_DIRECTION,
ice               170 sound/pci/ice1712/ews.c 			  ice->gpio.direction | tmp);
ice               171 sound/pci/ice1712/ews.c 	snd_ice1712_write(ice, ICE1712_IREG_GPIO_WRITE_MASK, ~tmp);
ice               177 sound/pci/ice1712/ews.c 	struct snd_ice1712 *ice = ak->private_data[0];
ice               178 sound/pci/ice1712/ews.c 	snd_ice1712_restore_gpio_status(ice);
ice               180 sound/pci/ice1712/ews.c 	snd_ice1712_ews88mt_chip_select(ice, 0x0f);
ice               186 sound/pci/ice1712/ews.c 	struct snd_ice1712 *ice = ak->private_data[0];
ice               188 sound/pci/ice1712/ews.c 	snd_ice1712_save_gpio_status(ice);
ice               193 sound/pci/ice1712/ews.c 	snd_ice1712_write(ice, ICE1712_IREG_GPIO_DIRECTION,
ice               194 sound/pci/ice1712/ews.c 			  ice->gpio.direction | tmp);
ice               195 sound/pci/ice1712/ews.c 	snd_ice1712_write(ice, ICE1712_IREG_GPIO_WRITE_MASK, ~tmp);
ice               202 sound/pci/ice1712/ews.c 	struct snd_ice1712 *ice = ak->private_data[0];
ice               204 sound/pci/ice1712/ews.c 	snd_ice1712_save_gpio_status(ice);
ice               209 sound/pci/ice1712/ews.c 	snd_ice1712_write(ice, ICE1712_IREG_GPIO_DIRECTION,
ice               210 sound/pci/ice1712/ews.c 			  ice->gpio.direction | tmp);
ice               211 sound/pci/ice1712/ews.c 	snd_ice1712_write(ice, ICE1712_IREG_GPIO_WRITE_MASK, ~tmp);
ice               218 sound/pci/ice1712/ews.c static void snd_ice1712_ews_cs8404_spdif_write(struct snd_ice1712 *ice, unsigned char bits)
ice               220 sound/pci/ice1712/ews.c 	struct ews_spec *spec = ice->spec;
ice               223 sound/pci/ice1712/ews.c 	snd_i2c_lock(ice->i2c);
ice               224 sound/pci/ice1712/ews.c 	switch (ice->eeprom.subvendor) {
ice               246 sound/pci/ice1712/ews.c 	snd_i2c_unlock(ice->i2c);
ice               252 sound/pci/ice1712/ews.c static void ews88_spdif_default_get(struct snd_ice1712 *ice, struct snd_ctl_elem_value *ucontrol)
ice               254 sound/pci/ice1712/ews.c 	snd_cs8404_decode_spdif_bits(&ucontrol->value.iec958, ice->spdif.cs8403_bits);
ice               257 sound/pci/ice1712/ews.c static int ews88_spdif_default_put(struct snd_ice1712 *ice, struct snd_ctl_elem_value *ucontrol)
ice               263 sound/pci/ice1712/ews.c 	spin_lock_irq(&ice->reg_lock);
ice               264 sound/pci/ice1712/ews.c 	change = ice->spdif.cs8403_bits != val;
ice               265 sound/pci/ice1712/ews.c 	ice->spdif.cs8403_bits = val;
ice               266 sound/pci/ice1712/ews.c 	if (change && ice->playback_pro_substream == NULL) {
ice               267 sound/pci/ice1712/ews.c 		spin_unlock_irq(&ice->reg_lock);
ice               268 sound/pci/ice1712/ews.c 		snd_ice1712_ews_cs8404_spdif_write(ice, val);
ice               270 sound/pci/ice1712/ews.c 		spin_unlock_irq(&ice->reg_lock);
ice               275 sound/pci/ice1712/ews.c static void ews88_spdif_stream_get(struct snd_ice1712 *ice, struct snd_ctl_elem_value *ucontrol)
ice               277 sound/pci/ice1712/ews.c 	snd_cs8404_decode_spdif_bits(&ucontrol->value.iec958, ice->spdif.cs8403_stream_bits);
ice               280 sound/pci/ice1712/ews.c static int ews88_spdif_stream_put(struct snd_ice1712 *ice, struct snd_ctl_elem_value *ucontrol)
ice               286 sound/pci/ice1712/ews.c 	spin_lock_irq(&ice->reg_lock);
ice               287 sound/pci/ice1712/ews.c 	change = ice->spdif.cs8403_stream_bits != val;
ice               288 sound/pci/ice1712/ews.c 	ice->spdif.cs8403_stream_bits = val;
ice               289 sound/pci/ice1712/ews.c 	if (change && ice->playback_pro_substream != NULL) {
ice               290 sound/pci/ice1712/ews.c 		spin_unlock_irq(&ice->reg_lock);
ice               291 sound/pci/ice1712/ews.c 		snd_ice1712_ews_cs8404_spdif_write(ice, val);
ice               293 sound/pci/ice1712/ews.c 		spin_unlock_irq(&ice->reg_lock);
ice               300 sound/pci/ice1712/ews.c static void ews88_open_spdif(struct snd_ice1712 *ice, struct snd_pcm_substream *substream)
ice               302 sound/pci/ice1712/ews.c 	ice->spdif.cs8403_stream_bits = ice->spdif.cs8403_bits;
ice               306 sound/pci/ice1712/ews.c static void ews88_setup_spdif(struct snd_ice1712 *ice, int rate)
ice               312 sound/pci/ice1712/ews.c 	spin_lock_irqsave(&ice->reg_lock, flags);
ice               313 sound/pci/ice1712/ews.c 	tmp = ice->spdif.cs8403_stream_bits;
ice               322 sound/pci/ice1712/ews.c 	change = ice->spdif.cs8403_stream_bits != tmp;
ice               323 sound/pci/ice1712/ews.c 	ice->spdif.cs8403_stream_bits = tmp;
ice               324 sound/pci/ice1712/ews.c 	spin_unlock_irqrestore(&ice->reg_lock, flags);
ice               326 sound/pci/ice1712/ews.c 		snd_ctl_notify(ice->card, SNDRV_CTL_EVENT_MASK_VALUE, &ice->spdif.stream_ctl->id);
ice               327 sound/pci/ice1712/ews.c 	snd_ice1712_ews_cs8404_spdif_write(ice, tmp);
ice               407 sound/pci/ice1712/ews.c static int snd_ice1712_6fire_write_pca(struct snd_ice1712 *ice, unsigned char reg, unsigned char data);
ice               409 sound/pci/ice1712/ews.c static int snd_ice1712_ews_init(struct snd_ice1712 *ice)
ice               416 sound/pci/ice1712/ews.c 	switch (ice->eeprom.subvendor) {
ice               418 sound/pci/ice1712/ews.c 		ice->num_total_dacs = 2;
ice               419 sound/pci/ice1712/ews.c 		ice->num_total_adcs = 2;
ice               425 sound/pci/ice1712/ews.c 		ice->num_total_dacs = 8;
ice               426 sound/pci/ice1712/ews.c 		ice->num_total_adcs = 8;
ice               430 sound/pci/ice1712/ews.c 		ice->num_total_dacs = 8;
ice               431 sound/pci/ice1712/ews.c 		ice->num_total_adcs = 8;
ice               434 sound/pci/ice1712/ews.c 		ice->num_total_dacs = 6;
ice               435 sound/pci/ice1712/ews.c 		ice->num_total_adcs = 6;
ice               442 sound/pci/ice1712/ews.c 	ice->spec = spec;
ice               445 sound/pci/ice1712/ews.c 	if ((err = snd_i2c_bus_create(ice->card, "ICE1712 GPIO 1", NULL, &ice->i2c)) < 0) {
ice               446 sound/pci/ice1712/ews.c 		dev_err(ice->card->dev, "unable to create I2C bus\n");
ice               449 sound/pci/ice1712/ews.c 	ice->i2c->private_data = ice;
ice               450 sound/pci/ice1712/ews.c 	ice->i2c->hw_ops.bit = &snd_ice1712_ewx_cs8427_bit_ops;
ice               453 sound/pci/ice1712/ews.c 	switch (ice->eeprom.subvendor) {
ice               455 sound/pci/ice1712/ews.c 		err = snd_i2c_device_create(ice->i2c, "PCF9554",
ice               459 sound/pci/ice1712/ews.c 			dev_err(ice->card->dev,
ice               463 sound/pci/ice1712/ews.c 		snd_ice1712_6fire_write_pca(ice, PCF9554_REG_CONFIG, 0x80);
ice               470 sound/pci/ice1712/ews.c 		err = snd_i2c_device_create(ice->i2c, "CS8404",
ice               475 sound/pci/ice1712/ews.c 		err = snd_i2c_device_create(ice->i2c, "PCF8574 (1st)",
ice               480 sound/pci/ice1712/ews.c 		err = snd_i2c_device_create(ice->i2c, "PCF8574 (2nd)",
ice               486 sound/pci/ice1712/ews.c 		if ((err = snd_ice1712_ews88mt_chip_select(ice, 0x0f)) < 0)
ice               490 sound/pci/ice1712/ews.c 		err = snd_i2c_device_create(ice->i2c, "PCF8575",
ice               499 sound/pci/ice1712/ews.c 	switch (ice->eeprom.subvendor) {
ice               501 sound/pci/ice1712/ews.c 		if ((err = snd_ice1712_init_cs8427(ice, CS8427_BASE_ADDR)) < 0)
ice               503 sound/pci/ice1712/ews.c 		snd_cs8427_reg_write(ice->cs8427, CS8427_REG_RECVERRMASK, CS8427_UNLOCK | CS8427_CONF | CS8427_BIP | CS8427_PAR);
ice               506 sound/pci/ice1712/ews.c 		if ((err = snd_ice1712_init_cs8427(ice, ICE1712_6FIRE_CS8427_ADDR)) < 0)
ice               508 sound/pci/ice1712/ews.c 		snd_cs8427_reg_write(ice->cs8427, CS8427_REG_RECVERRMASK, CS8427_UNLOCK | CS8427_CONF | CS8427_BIP | CS8427_PAR);
ice               516 sound/pci/ice1712/ews.c 		ice->spdif.ops.open = ews88_open_spdif;
ice               517 sound/pci/ice1712/ews.c 		ice->spdif.ops.setup_rate = ews88_setup_spdif;
ice               518 sound/pci/ice1712/ews.c 		ice->spdif.ops.default_get = ews88_spdif_default_get;
ice               519 sound/pci/ice1712/ews.c 		ice->spdif.ops.default_put = ews88_spdif_default_put;
ice               520 sound/pci/ice1712/ews.c 		ice->spdif.ops.stream_get = ews88_spdif_stream_get;
ice               521 sound/pci/ice1712/ews.c 		ice->spdif.ops.stream_put = ews88_spdif_stream_put;
ice               523 sound/pci/ice1712/ews.c 		snd_ice1712_ews_cs8404_spdif_write(ice, ice->spdif.cs8403_bits);
ice               528 sound/pci/ice1712/ews.c 	switch (ice->eeprom.subvendor) {
ice               534 sound/pci/ice1712/ews.c 	ak = ice->akm = kzalloc(sizeof(struct snd_akm4xxx), GFP_KERNEL);
ice               537 sound/pci/ice1712/ews.c 	ice->akm_codecs = 1;
ice               539 sound/pci/ice1712/ews.c 	switch (ice->eeprom.subvendor) {
ice               544 sound/pci/ice1712/ews.c 		err = snd_ice1712_akm4xxx_init(ak, &akm_ews88mt, &akm_ews88mt_priv, ice);
ice               547 sound/pci/ice1712/ews.c 		err = snd_ice1712_akm4xxx_init(ak, &akm_ewx2496, &akm_ewx2496_priv, ice);
ice               550 sound/pci/ice1712/ews.c 		err = snd_ice1712_akm4xxx_init(ak, &akm_6fire, &akm_6fire_priv, ice);
ice               574 sound/pci/ice1712/ews.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               577 sound/pci/ice1712/ews.c 	snd_ice1712_save_gpio_status(ice);
ice               578 sound/pci/ice1712/ews.c 	ucontrol->value.enumerated.item[0] = snd_ice1712_read(ice, ICE1712_IREG_GPIO_DATA) & mask ? 1 : 0;
ice               579 sound/pci/ice1712/ews.c 	snd_ice1712_restore_gpio_status(ice);
ice               585 sound/pci/ice1712/ews.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               592 sound/pci/ice1712/ews.c 	snd_ice1712_save_gpio_status(ice);
ice               593 sound/pci/ice1712/ews.c 	val = snd_ice1712_read(ice, ICE1712_IREG_GPIO_DATA);
ice               595 sound/pci/ice1712/ews.c 	snd_ice1712_write(ice, ICE1712_IREG_GPIO_DATA, nval);
ice               596 sound/pci/ice1712/ews.c 	snd_ice1712_restore_gpio_status(ice);
ice               626 sound/pci/ice1712/ews.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               627 sound/pci/ice1712/ews.c 	struct ews_spec *spec = ice->spec;
ice               630 sound/pci/ice1712/ews.c 	snd_i2c_lock(ice->i2c);
ice               632 sound/pci/ice1712/ews.c 		snd_i2c_unlock(ice->i2c);
ice               635 sound/pci/ice1712/ews.c 	snd_i2c_unlock(ice->i2c);
ice               643 sound/pci/ice1712/ews.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               644 sound/pci/ice1712/ews.c 	struct ews_spec *spec = ice->spec;
ice               647 sound/pci/ice1712/ews.c 	snd_i2c_lock(ice->i2c);
ice               649 sound/pci/ice1712/ews.c 		snd_i2c_unlock(ice->i2c);
ice               655 sound/pci/ice1712/ews.c 		snd_i2c_unlock(ice->i2c);
ice               658 sound/pci/ice1712/ews.c 	snd_i2c_unlock(ice->i2c);
ice               665 sound/pci/ice1712/ews.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               666 sound/pci/ice1712/ews.c 	struct ews_spec *spec = ice->spec;
ice               672 sound/pci/ice1712/ews.c 	snd_i2c_lock(ice->i2c);
ice               674 sound/pci/ice1712/ews.c 		snd_i2c_unlock(ice->i2c);
ice               679 sound/pci/ice1712/ews.c 	snd_i2c_unlock(ice->i2c);
ice               686 sound/pci/ice1712/ews.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               687 sound/pci/ice1712/ews.c 	struct ews_spec *spec = ice->spec;
ice               693 sound/pci/ice1712/ews.c 	snd_i2c_lock(ice->i2c);
ice               695 sound/pci/ice1712/ews.c 		snd_i2c_unlock(ice->i2c);
ice               701 sound/pci/ice1712/ews.c 		snd_i2c_unlock(ice->i2c);
ice               704 sound/pci/ice1712/ews.c 	snd_i2c_unlock(ice->i2c);
ice               734 sound/pci/ice1712/ews.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               735 sound/pci/ice1712/ews.c 	struct ews_spec *spec = ice->spec;
ice               740 sound/pci/ice1712/ews.c 	snd_i2c_lock(ice->i2c);
ice               742 sound/pci/ice1712/ews.c 		snd_i2c_unlock(ice->i2c);
ice               745 sound/pci/ice1712/ews.c 	snd_i2c_unlock(ice->i2c);
ice               755 sound/pci/ice1712/ews.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               756 sound/pci/ice1712/ews.c 	struct ews_spec *spec = ice->spec;
ice               762 sound/pci/ice1712/ews.c 	snd_i2c_lock(ice->i2c);
ice               764 sound/pci/ice1712/ews.c 		snd_i2c_unlock(ice->i2c);
ice               778 sound/pci/ice1712/ews.c 		snd_i2c_unlock(ice->i2c);
ice               781 sound/pci/ice1712/ews.c 	snd_i2c_unlock(ice->i2c);
ice               808 sound/pci/ice1712/ews.c static int snd_ice1712_6fire_read_pca(struct snd_ice1712 *ice, unsigned char reg)
ice               811 sound/pci/ice1712/ews.c 	struct ews_spec *spec = ice->spec;
ice               813 sound/pci/ice1712/ews.c 	snd_i2c_lock(ice->i2c);
ice               816 sound/pci/ice1712/ews.c 		snd_i2c_unlock(ice->i2c);
ice               817 sound/pci/ice1712/ews.c 		dev_err(ice->card->dev, "cannot send pca\n");
ice               823 sound/pci/ice1712/ews.c 		snd_i2c_unlock(ice->i2c);
ice               824 sound/pci/ice1712/ews.c 		dev_err(ice->card->dev, "cannot read pca\n");
ice               827 sound/pci/ice1712/ews.c 	snd_i2c_unlock(ice->i2c);
ice               831 sound/pci/ice1712/ews.c static int snd_ice1712_6fire_write_pca(struct snd_ice1712 *ice, unsigned char reg, unsigned char data)
ice               834 sound/pci/ice1712/ews.c 	struct ews_spec *spec = ice->spec;
ice               836 sound/pci/ice1712/ews.c 	snd_i2c_lock(ice->i2c);
ice               840 sound/pci/ice1712/ews.c 		snd_i2c_unlock(ice->i2c);
ice               843 sound/pci/ice1712/ews.c 	snd_i2c_unlock(ice->i2c);
ice               851 sound/pci/ice1712/ews.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               856 sound/pci/ice1712/ews.c 	if ((data = snd_ice1712_6fire_read_pca(ice, PCF9554_REG_OUTPUT)) < 0)
ice               867 sound/pci/ice1712/ews.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               872 sound/pci/ice1712/ews.c 	if ((data = snd_ice1712_6fire_read_pca(ice, PCF9554_REG_OUTPUT)) < 0)
ice               880 sound/pci/ice1712/ews.c 		snd_ice1712_6fire_write_pca(ice, PCF9554_REG_OUTPUT, (unsigned char)ndata);
ice               896 sound/pci/ice1712/ews.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               899 sound/pci/ice1712/ews.c 	if ((data = snd_ice1712_6fire_read_pca(ice, PCF9554_REG_OUTPUT)) < 0)
ice               907 sound/pci/ice1712/ews.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               910 sound/pci/ice1712/ews.c 	if ((data = snd_ice1712_6fire_read_pca(ice, PCF9554_REG_OUTPUT)) < 0)
ice               915 sound/pci/ice1712/ews.c 		snd_ice1712_6fire_write_pca(ice, PCF9554_REG_OUTPUT, (unsigned char)ndata);
ice               947 sound/pci/ice1712/ews.c static int snd_ice1712_ews_add_controls(struct snd_ice1712 *ice)
ice               953 sound/pci/ice1712/ews.c 	if (ice->cs8427 == NULL) {
ice               954 sound/pci/ice1712/ews.c 		err = snd_ice1712_spdif_build_controls(ice);
ice               960 sound/pci/ice1712/ews.c 	switch (ice->eeprom.subvendor) {
ice               967 sound/pci/ice1712/ews.c 		err = snd_ice1712_akm4xxx_build_controls(ice);
ice               974 sound/pci/ice1712/ews.c 	switch (ice->eeprom.subvendor) {
ice               977 sound/pci/ice1712/ews.c 			err = snd_ctl_add(ice->card, snd_ctl_new1(&snd_ice1712_ewx2496_controls[idx], ice));
ice               986 sound/pci/ice1712/ews.c 		err = snd_ctl_add(ice->card, snd_ctl_new1(&snd_ice1712_ews88mt_input_sense, ice));
ice               989 sound/pci/ice1712/ews.c 		err = snd_ctl_add(ice->card, snd_ctl_new1(&snd_ice1712_ews88mt_output_sense, ice));
ice               995 sound/pci/ice1712/ews.c 			err = snd_ctl_add(ice->card, snd_ctl_new1(&snd_ice1712_ews88d_controls[idx], ice));
ice              1002 sound/pci/ice1712/ews.c 			err = snd_ctl_add(ice->card, snd_ctl_new1(&snd_ice1712_6fire_controls[idx], ice));
ice                28 sound/pci/ice1712/hoontech.c static void snd_ice1712_stdsp24_gpio_write(struct snd_ice1712 *ice, unsigned char byte)
ice                32 sound/pci/ice1712/hoontech.c 	snd_ice1712_write(ice, ICE1712_IREG_GPIO_DATA, byte);
ice                35 sound/pci/ice1712/hoontech.c 	snd_ice1712_write(ice, ICE1712_IREG_GPIO_DATA, byte);
ice                38 sound/pci/ice1712/hoontech.c 	snd_ice1712_write(ice, ICE1712_IREG_GPIO_DATA, byte);
ice                41 sound/pci/ice1712/hoontech.c static void snd_ice1712_stdsp24_darear(struct snd_ice1712 *ice, int activate)
ice                43 sound/pci/ice1712/hoontech.c 	struct hoontech_spec *spec = ice->spec;
ice                44 sound/pci/ice1712/hoontech.c 	mutex_lock(&ice->gpio_mutex);
ice                46 sound/pci/ice1712/hoontech.c 	snd_ice1712_stdsp24_gpio_write(ice, spec->boxbits[0]);
ice                47 sound/pci/ice1712/hoontech.c 	mutex_unlock(&ice->gpio_mutex);
ice                50 sound/pci/ice1712/hoontech.c static void snd_ice1712_stdsp24_mute(struct snd_ice1712 *ice, int activate)
ice                52 sound/pci/ice1712/hoontech.c 	struct hoontech_spec *spec = ice->spec;
ice                53 sound/pci/ice1712/hoontech.c 	mutex_lock(&ice->gpio_mutex);
ice                55 sound/pci/ice1712/hoontech.c 	snd_ice1712_stdsp24_gpio_write(ice, spec->boxbits[3]);
ice                56 sound/pci/ice1712/hoontech.c 	mutex_unlock(&ice->gpio_mutex);
ice                59 sound/pci/ice1712/hoontech.c static void snd_ice1712_stdsp24_insel(struct snd_ice1712 *ice, int activate)
ice                61 sound/pci/ice1712/hoontech.c 	struct hoontech_spec *spec = ice->spec;
ice                62 sound/pci/ice1712/hoontech.c 	mutex_lock(&ice->gpio_mutex);
ice                64 sound/pci/ice1712/hoontech.c 	snd_ice1712_stdsp24_gpio_write(ice, spec->boxbits[3]);
ice                65 sound/pci/ice1712/hoontech.c 	mutex_unlock(&ice->gpio_mutex);
ice                68 sound/pci/ice1712/hoontech.c static void snd_ice1712_stdsp24_box_channel(struct snd_ice1712 *ice, int box, int chn, int activate)
ice                70 sound/pci/ice1712/hoontech.c 	struct hoontech_spec *spec = ice->spec;
ice                72 sound/pci/ice1712/hoontech.c 	mutex_lock(&ice->gpio_mutex);
ice                76 sound/pci/ice1712/hoontech.c 	snd_ice1712_stdsp24_gpio_write(ice, spec->boxbits[0]);
ice                82 sound/pci/ice1712/hoontech.c 	snd_ice1712_stdsp24_gpio_write(ice, spec->boxbits[2]);
ice                83 sound/pci/ice1712/hoontech.c 	snd_ice1712_stdsp24_gpio_write(ice, spec->boxbits[3]);
ice                89 sound/pci/ice1712/hoontech.c 	snd_ice1712_stdsp24_gpio_write(ice, spec->boxbits[1]);
ice                90 sound/pci/ice1712/hoontech.c 	snd_ice1712_stdsp24_gpio_write(ice, spec->boxbits[2]);
ice                94 sound/pci/ice1712/hoontech.c 		snd_ice1712_stdsp24_gpio_write(ice, spec->boxbits[2]);
ice               101 sound/pci/ice1712/hoontech.c 		snd_ice1712_stdsp24_gpio_write(ice, spec->boxbits[1]);
ice               108 sound/pci/ice1712/hoontech.c 	snd_ice1712_stdsp24_gpio_write(ice, spec->boxbits[1]);
ice               109 sound/pci/ice1712/hoontech.c 	snd_ice1712_stdsp24_gpio_write(ice, spec->boxbits[2]);
ice               113 sound/pci/ice1712/hoontech.c 	snd_ice1712_stdsp24_gpio_write(ice, spec->boxbits[2]);
ice               115 sound/pci/ice1712/hoontech.c 	mutex_unlock(&ice->gpio_mutex);
ice               118 sound/pci/ice1712/hoontech.c static void snd_ice1712_stdsp24_box_midi(struct snd_ice1712 *ice, int box, int master)
ice               120 sound/pci/ice1712/hoontech.c 	struct hoontech_spec *spec = ice->spec;
ice               122 sound/pci/ice1712/hoontech.c 	mutex_lock(&ice->gpio_mutex);
ice               126 sound/pci/ice1712/hoontech.c 	snd_ice1712_stdsp24_gpio_write(ice, spec->boxbits[0]);
ice               130 sound/pci/ice1712/hoontech.c 	snd_ice1712_stdsp24_gpio_write(ice, spec->boxbits[2]);
ice               131 sound/pci/ice1712/hoontech.c 	snd_ice1712_stdsp24_gpio_write(ice, spec->boxbits[3]);
ice               136 sound/pci/ice1712/hoontech.c 	snd_ice1712_stdsp24_gpio_write(ice, spec->boxbits[2]);
ice               141 sound/pci/ice1712/hoontech.c 	snd_ice1712_stdsp24_gpio_write(ice, spec->boxbits[2]);
ice               143 sound/pci/ice1712/hoontech.c 	mutex_unlock(&ice->gpio_mutex);
ice               146 sound/pci/ice1712/hoontech.c static void snd_ice1712_stdsp24_midi2(struct snd_ice1712 *ice, int activate)
ice               148 sound/pci/ice1712/hoontech.c 	struct hoontech_spec *spec = ice->spec;
ice               149 sound/pci/ice1712/hoontech.c 	mutex_lock(&ice->gpio_mutex);
ice               151 sound/pci/ice1712/hoontech.c 	snd_ice1712_stdsp24_gpio_write(ice, spec->boxbits[3]);
ice               152 sound/pci/ice1712/hoontech.c 	mutex_unlock(&ice->gpio_mutex);
ice               155 sound/pci/ice1712/hoontech.c static int hoontech_init(struct snd_ice1712 *ice, bool staudio)
ice               160 sound/pci/ice1712/hoontech.c 	ice->num_total_dacs = 8;
ice               161 sound/pci/ice1712/hoontech.c 	ice->num_total_adcs = 8;
ice               166 sound/pci/ice1712/hoontech.c 	ice->spec = spec;
ice               228 sound/pci/ice1712/hoontech.c 	snd_ice1712_stdsp24_darear(ice,
ice               230 sound/pci/ice1712/hoontech.c 	snd_ice1712_stdsp24_mute(ice,
ice               232 sound/pci/ice1712/hoontech.c 	snd_ice1712_stdsp24_insel(ice,
ice               236 sound/pci/ice1712/hoontech.c                         snd_ice1712_stdsp24_midi2(ice, 1);
ice               238 sound/pci/ice1712/hoontech.c 			snd_ice1712_stdsp24_box_channel(ice, box, chn,
ice               241 sound/pci/ice1712/hoontech.c 			snd_ice1712_stdsp24_box_midi(ice, box, 1);
ice               247 sound/pci/ice1712/hoontech.c static int snd_ice1712_hoontech_init(struct snd_ice1712 *ice)
ice               249 sound/pci/ice1712/hoontech.c 	return hoontech_init(ice, false);
ice               252 sound/pci/ice1712/hoontech.c static int snd_ice1712_staudio_init(struct snd_ice1712 *ice)
ice               254 sound/pci/ice1712/hoontech.c 	return hoontech_init(ice, true);
ice               264 sound/pci/ice1712/hoontech.c 	struct snd_ice1712 *ice = ak->private_data[0];
ice               266 sound/pci/ice1712/hoontech.c 	snd_ice1712_save_gpio_status(ice);
ice               270 sound/pci/ice1712/hoontech.c 	snd_ice1712_write(ice, ICE1712_IREG_GPIO_DIRECTION,
ice               271 sound/pci/ice1712/hoontech.c 			  ice->gpio.direction | tmp);
ice               272 sound/pci/ice1712/hoontech.c 	snd_ice1712_write(ice, ICE1712_IREG_GPIO_WRITE_MASK, ~tmp);
ice               275 sound/pci/ice1712/hoontech.c static int snd_ice1712_value_init(struct snd_ice1712 *ice)
ice               302 sound/pci/ice1712/hoontech.c 	ice->num_total_dacs = 2;
ice               305 sound/pci/ice1712/hoontech.c 	ice->num_total_adcs = 2;
ice               308 sound/pci/ice1712/hoontech.c 	ak = ice->akm = kmalloc(sizeof(struct snd_akm4xxx), GFP_KERNEL);
ice               311 sound/pci/ice1712/hoontech.c 	ice->akm_codecs = 1;
ice               313 sound/pci/ice1712/hoontech.c 	err = snd_ice1712_akm4xxx_init(ak, &akm_stdsp24_mv, &akm_stdsp24_mv_priv, ice);
ice               318 sound/pci/ice1712/hoontech.c 	return snd_ice1712_akm4xxx_build_controls(ice);
ice               321 sound/pci/ice1712/hoontech.c static int snd_ice1712_ez8_init(struct snd_ice1712 *ice)
ice               323 sound/pci/ice1712/hoontech.c 	ice->gpio.write_mask = ice->eeprom.gpiomask;
ice               324 sound/pci/ice1712/hoontech.c 	ice->gpio.direction = ice->eeprom.gpiodir;
ice               325 sound/pci/ice1712/hoontech.c 	snd_ice1712_write(ice, ICE1712_IREG_GPIO_WRITE_MASK, ice->eeprom.gpiomask);
ice               326 sound/pci/ice1712/hoontech.c 	snd_ice1712_write(ice, ICE1712_IREG_GPIO_DIRECTION, ice->eeprom.gpiodir);
ice               327 sound/pci/ice1712/hoontech.c 	snd_ice1712_write(ice, ICE1712_IREG_GPIO_DATA, ice->eeprom.gpiostate);
ice               101 sound/pci/ice1712/ice1712.c static int snd_ice1712_build_pro_mixer(struct snd_ice1712 *ice);
ice               102 sound/pci/ice1712/ice1712.c static int snd_ice1712_build_controls(struct snd_ice1712 *ice);
ice               113 sound/pci/ice1712/ice1712.c static inline int is_spdif_master(struct snd_ice1712 *ice)
ice               115 sound/pci/ice1712/ice1712.c 	return (inb(ICEMT(ice, RATE)) & ICE1712_SPDIF_MASTER) ? 1 : 0;
ice               118 sound/pci/ice1712/ice1712.c static inline int is_pro_rate_locked(struct snd_ice1712 *ice)
ice               120 sound/pci/ice1712/ice1712.c 	return is_spdif_master(ice) || PRO_RATE_LOCKED;
ice               123 sound/pci/ice1712/ice1712.c static inline void snd_ice1712_ds_write(struct snd_ice1712 *ice, u8 channel, u8 addr, u32 data)
ice               125 sound/pci/ice1712/ice1712.c 	outb((channel << 4) | addr, ICEDS(ice, INDEX));
ice               126 sound/pci/ice1712/ice1712.c 	outl(data, ICEDS(ice, DATA));
ice               129 sound/pci/ice1712/ice1712.c static inline u32 snd_ice1712_ds_read(struct snd_ice1712 *ice, u8 channel, u8 addr)
ice               131 sound/pci/ice1712/ice1712.c 	outb((channel << 4) | addr, ICEDS(ice, INDEX));
ice               132 sound/pci/ice1712/ice1712.c 	return inl(ICEDS(ice, DATA));
ice               139 sound/pci/ice1712/ice1712.c 	struct snd_ice1712 *ice = ac97->private_data;
ice               144 sound/pci/ice1712/ice1712.c 		old_cmd = inb(ICEREG(ice, AC97_CMD));
ice               151 sound/pci/ice1712/ice1712.c 	outb(reg, ICEREG(ice, AC97_INDEX));
ice               152 sound/pci/ice1712/ice1712.c 	outw(val, ICEREG(ice, AC97_DATA));
ice               154 sound/pci/ice1712/ice1712.c 	outb(old_cmd | ICE1712_AC97_WRITE, ICEREG(ice, AC97_CMD));
ice               156 sound/pci/ice1712/ice1712.c 		if ((inb(ICEREG(ice, AC97_CMD)) & ICE1712_AC97_WRITE) == 0)
ice               163 sound/pci/ice1712/ice1712.c 	struct snd_ice1712 *ice = ac97->private_data;
ice               168 sound/pci/ice1712/ice1712.c 		old_cmd = inb(ICEREG(ice, AC97_CMD));
ice               175 sound/pci/ice1712/ice1712.c 	outb(reg, ICEREG(ice, AC97_INDEX));
ice               176 sound/pci/ice1712/ice1712.c 	outb(old_cmd | ICE1712_AC97_READ, ICEREG(ice, AC97_CMD));
ice               178 sound/pci/ice1712/ice1712.c 		if ((inb(ICEREG(ice, AC97_CMD)) & ICE1712_AC97_READ) == 0)
ice               182 sound/pci/ice1712/ice1712.c 	return inw(ICEREG(ice, AC97_DATA));
ice               193 sound/pci/ice1712/ice1712.c 	struct snd_ice1712 *ice = ac97->private_data;
ice               198 sound/pci/ice1712/ice1712.c 		old_cmd = inb(ICEMT(ice, AC97_CMD));
ice               205 sound/pci/ice1712/ice1712.c 	outb(reg, ICEMT(ice, AC97_INDEX));
ice               206 sound/pci/ice1712/ice1712.c 	outw(val, ICEMT(ice, AC97_DATA));
ice               208 sound/pci/ice1712/ice1712.c 	outb(old_cmd | ICE1712_AC97_WRITE, ICEMT(ice, AC97_CMD));
ice               210 sound/pci/ice1712/ice1712.c 		if ((inb(ICEMT(ice, AC97_CMD)) & ICE1712_AC97_WRITE) == 0)
ice               218 sound/pci/ice1712/ice1712.c 	struct snd_ice1712 *ice = ac97->private_data;
ice               223 sound/pci/ice1712/ice1712.c 		old_cmd = inb(ICEMT(ice, AC97_CMD));
ice               230 sound/pci/ice1712/ice1712.c 	outb(reg, ICEMT(ice, AC97_INDEX));
ice               231 sound/pci/ice1712/ice1712.c 	outb(old_cmd | ICE1712_AC97_READ, ICEMT(ice, AC97_CMD));
ice               233 sound/pci/ice1712/ice1712.c 		if ((inb(ICEMT(ice, AC97_CMD)) & ICE1712_AC97_READ) == 0)
ice               237 sound/pci/ice1712/ice1712.c 	return inw(ICEMT(ice, AC97_DATA));
ice               247 sound/pci/ice1712/ice1712.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               249 sound/pci/ice1712/ice1712.c 	ucontrol->value.integer.value[0] = inb(ICEMT(ice, MONITOR_ROUTECTRL)) & ICE1712_ROUTE_AC97 ? 1 : 0;
ice               255 sound/pci/ice1712/ice1712.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               258 sound/pci/ice1712/ice1712.c 	spin_lock_irq(&ice->reg_lock);
ice               259 sound/pci/ice1712/ice1712.c 	val = inb(ICEMT(ice, MONITOR_ROUTECTRL));
ice               263 sound/pci/ice1712/ice1712.c 	outb(nval, ICEMT(ice, MONITOR_ROUTECTRL));
ice               264 sound/pci/ice1712/ice1712.c 	spin_unlock_irq(&ice->reg_lock);
ice               280 sound/pci/ice1712/ice1712.c static void snd_ice1712_set_gpio_dir(struct snd_ice1712 *ice, unsigned int data)
ice               282 sound/pci/ice1712/ice1712.c 	snd_ice1712_write(ice, ICE1712_IREG_GPIO_DIRECTION, data);
ice               283 sound/pci/ice1712/ice1712.c 	inb(ICEREG(ice, DATA)); /* dummy read for pci-posting */
ice               286 sound/pci/ice1712/ice1712.c static unsigned int snd_ice1712_get_gpio_dir(struct snd_ice1712 *ice)
ice               288 sound/pci/ice1712/ice1712.c 	return snd_ice1712_read(ice, ICE1712_IREG_GPIO_DIRECTION);
ice               291 sound/pci/ice1712/ice1712.c static unsigned int snd_ice1712_get_gpio_mask(struct snd_ice1712 *ice)
ice               293 sound/pci/ice1712/ice1712.c 	return snd_ice1712_read(ice, ICE1712_IREG_GPIO_WRITE_MASK);
ice               296 sound/pci/ice1712/ice1712.c static void snd_ice1712_set_gpio_mask(struct snd_ice1712 *ice, unsigned int data)
ice               298 sound/pci/ice1712/ice1712.c 	snd_ice1712_write(ice, ICE1712_IREG_GPIO_WRITE_MASK, data);
ice               299 sound/pci/ice1712/ice1712.c 	inb(ICEREG(ice, DATA)); /* dummy read for pci-posting */
ice               302 sound/pci/ice1712/ice1712.c static unsigned int snd_ice1712_get_gpio_data(struct snd_ice1712 *ice)
ice               304 sound/pci/ice1712/ice1712.c 	return snd_ice1712_read(ice, ICE1712_IREG_GPIO_DATA);
ice               307 sound/pci/ice1712/ice1712.c static void snd_ice1712_set_gpio_data(struct snd_ice1712 *ice, unsigned int val)
ice               309 sound/pci/ice1712/ice1712.c 	snd_ice1712_write(ice, ICE1712_IREG_GPIO_DATA, val);
ice               310 sound/pci/ice1712/ice1712.c 	inb(ICEREG(ice, DATA)); /* dummy read for pci-posting */
ice               323 sound/pci/ice1712/ice1712.c static int snd_ice1712_cs8427_set_input_clock(struct snd_ice1712 *ice, int spdif_clock)
ice               329 sound/pci/ice1712/ice1712.c 	snd_i2c_lock(ice->i2c);
ice               330 sound/pci/ice1712/ice1712.c 	if (snd_i2c_sendbytes(ice->cs8427, reg, 1) != 1) {
ice               331 sound/pci/ice1712/ice1712.c 		snd_i2c_unlock(ice->i2c);
ice               334 sound/pci/ice1712/ice1712.c 	if (snd_i2c_readbytes(ice->cs8427, &val, 1) != 1) {
ice               335 sound/pci/ice1712/ice1712.c 		snd_i2c_unlock(ice->i2c);
ice               345 sound/pci/ice1712/ice1712.c 		if (snd_i2c_sendbytes(ice->cs8427, reg, 2) != 2) {
ice               351 sound/pci/ice1712/ice1712.c 	snd_i2c_unlock(ice->i2c);
ice               358 sound/pci/ice1712/ice1712.c static void open_cs8427(struct snd_ice1712 *ice, struct snd_pcm_substream *substream)
ice               360 sound/pci/ice1712/ice1712.c 	snd_cs8427_iec958_active(ice->cs8427, 1);
ice               363 sound/pci/ice1712/ice1712.c static void close_cs8427(struct snd_ice1712 *ice, struct snd_pcm_substream *substream)
ice               365 sound/pci/ice1712/ice1712.c 	snd_cs8427_iec958_active(ice->cs8427, 0);
ice               368 sound/pci/ice1712/ice1712.c static void setup_cs8427(struct snd_ice1712 *ice, int rate)
ice               370 sound/pci/ice1712/ice1712.c 	snd_cs8427_iec958_pcm(ice->cs8427, rate);
ice               376 sound/pci/ice1712/ice1712.c int snd_ice1712_init_cs8427(struct snd_ice1712 *ice, int addr)
ice               380 sound/pci/ice1712/ice1712.c 	err = snd_cs8427_create(ice->i2c, addr,
ice               381 sound/pci/ice1712/ice1712.c 		(ice->cs8427_timeout * HZ) / 1000, &ice->cs8427);
ice               383 sound/pci/ice1712/ice1712.c 		dev_err(ice->card->dev, "CS8427 initialization failed\n");
ice               386 sound/pci/ice1712/ice1712.c 	ice->spdif.ops.open = open_cs8427;
ice               387 sound/pci/ice1712/ice1712.c 	ice->spdif.ops.close = close_cs8427;
ice               388 sound/pci/ice1712/ice1712.c 	ice->spdif.ops.setup_rate = setup_cs8427;
ice               392 sound/pci/ice1712/ice1712.c static void snd_ice1712_set_input_clock_source(struct snd_ice1712 *ice, int spdif_is_master)
ice               395 sound/pci/ice1712/ice1712.c 	if (ice->cs8427)
ice               396 sound/pci/ice1712/ice1712.c 		snd_ice1712_cs8427_set_input_clock(ice, spdif_is_master);
ice               400 sound/pci/ice1712/ice1712.c 		for (i = 0; i < ice->akm_codecs; i++) {
ice               401 sound/pci/ice1712/ice1712.c 			if (ice->akm[i].ops.set_rate_val)
ice               402 sound/pci/ice1712/ice1712.c 				ice->akm[i].ops.set_rate_val(&ice->akm[i], 0);
ice               413 sound/pci/ice1712/ice1712.c 	struct snd_ice1712 *ice = dev_id;
ice               418 sound/pci/ice1712/ice1712.c 		status = inb(ICEREG(ice, IRQSTAT));
ice               423 sound/pci/ice1712/ice1712.c 			if (ice->rmidi[0])
ice               424 sound/pci/ice1712/ice1712.c 				snd_mpu401_uart_interrupt(irq, ice->rmidi[0]->private_data);
ice               425 sound/pci/ice1712/ice1712.c 			outb(ICE1712_IRQ_MPU1, ICEREG(ice, IRQSTAT));
ice               429 sound/pci/ice1712/ice1712.c 			outb(ICE1712_IRQ_TIMER, ICEREG(ice, IRQSTAT));
ice               431 sound/pci/ice1712/ice1712.c 			if (ice->rmidi[1])
ice               432 sound/pci/ice1712/ice1712.c 				snd_mpu401_uart_interrupt(irq, ice->rmidi[1]->private_data);
ice               433 sound/pci/ice1712/ice1712.c 			outb(ICE1712_IRQ_MPU2, ICEREG(ice, IRQSTAT));
ice               437 sound/pci/ice1712/ice1712.c 			unsigned char mtstat = inb(ICEMT(ice, IRQ));
ice               439 sound/pci/ice1712/ice1712.c 				if (ice->playback_pro_substream)
ice               440 sound/pci/ice1712/ice1712.c 					snd_pcm_period_elapsed(ice->playback_pro_substream);
ice               441 sound/pci/ice1712/ice1712.c 				outb(ICE1712_MULTI_PBKSTATUS, ICEMT(ice, IRQ));
ice               444 sound/pci/ice1712/ice1712.c 				if (ice->capture_pro_substream)
ice               445 sound/pci/ice1712/ice1712.c 					snd_pcm_period_elapsed(ice->capture_pro_substream);
ice               446 sound/pci/ice1712/ice1712.c 				outb(ICE1712_MULTI_CAPSTATUS, ICEMT(ice, IRQ));
ice               450 sound/pci/ice1712/ice1712.c 			outb(ICE1712_IRQ_FM, ICEREG(ice, IRQSTAT));
ice               455 sound/pci/ice1712/ice1712.c 			pbkstatus = inw(ICEDS(ice, INTSTAT));
ice               460 sound/pci/ice1712/ice1712.c 				substream = ice->playback_con_substream_ds[idx];
ice               463 sound/pci/ice1712/ice1712.c 				outw(3 << (idx * 2), ICEDS(ice, INTSTAT));
ice               465 sound/pci/ice1712/ice1712.c 			outb(ICE1712_IRQ_PBKDS, ICEREG(ice, IRQSTAT));
ice               468 sound/pci/ice1712/ice1712.c 			if (ice->capture_con_substream)
ice               469 sound/pci/ice1712/ice1712.c 				snd_pcm_period_elapsed(ice->capture_con_substream);
ice               470 sound/pci/ice1712/ice1712.c 			outb(ICE1712_IRQ_CONCAP, ICEREG(ice, IRQSTAT));
ice               473 sound/pci/ice1712/ice1712.c 			if (ice->playback_con_substream)
ice               474 sound/pci/ice1712/ice1712.c 				snd_pcm_period_elapsed(ice->playback_con_substream);
ice               475 sound/pci/ice1712/ice1712.c 			outb(ICE1712_IRQ_CONPBK, ICEREG(ice, IRQSTAT));
ice               504 sound/pci/ice1712/ice1712.c 	struct snd_ice1712 *ice = snd_pcm_substream_chip(substream);
ice               508 sound/pci/ice1712/ice1712.c 	spin_lock(&ice->reg_lock);
ice               509 sound/pci/ice1712/ice1712.c 	tmp = snd_ice1712_read(ice, ICE1712_IREG_PBK_CTRL);
ice               521 sound/pci/ice1712/ice1712.c 	snd_ice1712_write(ice, ICE1712_IREG_PBK_CTRL, tmp);
ice               522 sound/pci/ice1712/ice1712.c 	spin_unlock(&ice->reg_lock);
ice               529 sound/pci/ice1712/ice1712.c 	struct snd_ice1712 *ice = snd_pcm_substream_chip(substream);
ice               533 sound/pci/ice1712/ice1712.c 	spin_lock(&ice->reg_lock);
ice               534 sound/pci/ice1712/ice1712.c 	tmp = snd_ice1712_ds_read(ice, substream->number * 2, ICE1712_DSC_CONTROL);
ice               546 sound/pci/ice1712/ice1712.c 	snd_ice1712_ds_write(ice, substream->number * 2, ICE1712_DSC_CONTROL, tmp);
ice               547 sound/pci/ice1712/ice1712.c 	spin_unlock(&ice->reg_lock);
ice               554 sound/pci/ice1712/ice1712.c 	struct snd_ice1712 *ice = snd_pcm_substream_chip(substream);
ice               558 sound/pci/ice1712/ice1712.c 	spin_lock(&ice->reg_lock);
ice               559 sound/pci/ice1712/ice1712.c 	tmp = snd_ice1712_read(ice, ICE1712_IREG_CAP_CTRL);
ice               567 sound/pci/ice1712/ice1712.c 	snd_ice1712_write(ice, ICE1712_IREG_CAP_CTRL, tmp);
ice               568 sound/pci/ice1712/ice1712.c 	spin_unlock(&ice->reg_lock);
ice               574 sound/pci/ice1712/ice1712.c 	struct snd_ice1712 *ice = snd_pcm_substream_chip(substream);
ice               588 sound/pci/ice1712/ice1712.c 	spin_lock_irq(&ice->reg_lock);
ice               589 sound/pci/ice1712/ice1712.c 	outb(0, ice->ddma_port + 15);
ice               590 sound/pci/ice1712/ice1712.c 	outb(ICE1712_DMA_MODE_WRITE | ICE1712_DMA_AUTOINIT, ice->ddma_port + 0x0b);
ice               591 sound/pci/ice1712/ice1712.c 	outl(runtime->dma_addr, ice->ddma_port + 0);
ice               592 sound/pci/ice1712/ice1712.c 	outw(buf_size, ice->ddma_port + 4);
ice               593 sound/pci/ice1712/ice1712.c 	snd_ice1712_write(ice, ICE1712_IREG_PBK_RATE_LO, rate & 0xff);
ice               594 sound/pci/ice1712/ice1712.c 	snd_ice1712_write(ice, ICE1712_IREG_PBK_RATE_MID, (rate >> 8) & 0xff);
ice               595 sound/pci/ice1712/ice1712.c 	snd_ice1712_write(ice, ICE1712_IREG_PBK_RATE_HI, (rate >> 16) & 0xff);
ice               596 sound/pci/ice1712/ice1712.c 	snd_ice1712_write(ice, ICE1712_IREG_PBK_CTRL, tmp);
ice               597 sound/pci/ice1712/ice1712.c 	snd_ice1712_write(ice, ICE1712_IREG_PBK_COUNT_LO, period_size & 0xff);
ice               598 sound/pci/ice1712/ice1712.c 	snd_ice1712_write(ice, ICE1712_IREG_PBK_COUNT_HI, period_size >> 8);
ice               599 sound/pci/ice1712/ice1712.c 	snd_ice1712_write(ice, ICE1712_IREG_PBK_LEFT, 0);
ice               600 sound/pci/ice1712/ice1712.c 	snd_ice1712_write(ice, ICE1712_IREG_PBK_RIGHT, 0);
ice               601 sound/pci/ice1712/ice1712.c 	spin_unlock_irq(&ice->reg_lock);
ice               607 sound/pci/ice1712/ice1712.c 	struct snd_ice1712 *ice = snd_pcm_substream_chip(substream);
ice               620 sound/pci/ice1712/ice1712.c 	ice->playback_con_active_buf[substream->number] = 0;
ice               621 sound/pci/ice1712/ice1712.c 	ice->playback_con_virt_addr[substream->number] = runtime->dma_addr;
ice               623 sound/pci/ice1712/ice1712.c 	spin_lock_irq(&ice->reg_lock);
ice               624 sound/pci/ice1712/ice1712.c 	snd_ice1712_ds_write(ice, chn, ICE1712_DSC_ADDR0, runtime->dma_addr);
ice               625 sound/pci/ice1712/ice1712.c 	snd_ice1712_ds_write(ice, chn, ICE1712_DSC_COUNT0, period_size);
ice               626 sound/pci/ice1712/ice1712.c 	snd_ice1712_ds_write(ice, chn, ICE1712_DSC_ADDR1, runtime->dma_addr + (runtime->periods > 1 ? period_size + 1 : 0));
ice               627 sound/pci/ice1712/ice1712.c 	snd_ice1712_ds_write(ice, chn, ICE1712_DSC_COUNT1, period_size);
ice               628 sound/pci/ice1712/ice1712.c 	snd_ice1712_ds_write(ice, chn, ICE1712_DSC_RATE, rate);
ice               629 sound/pci/ice1712/ice1712.c 	snd_ice1712_ds_write(ice, chn, ICE1712_DSC_VOLUME, 0);
ice               630 sound/pci/ice1712/ice1712.c 	snd_ice1712_ds_write(ice, chn, ICE1712_DSC_CONTROL, tmp);
ice               632 sound/pci/ice1712/ice1712.c 		snd_ice1712_ds_write(ice, chn + 1, ICE1712_DSC_RATE, rate);
ice               633 sound/pci/ice1712/ice1712.c 		snd_ice1712_ds_write(ice, chn + 1, ICE1712_DSC_VOLUME, 0);
ice               635 sound/pci/ice1712/ice1712.c 	spin_unlock_irq(&ice->reg_lock);
ice               641 sound/pci/ice1712/ice1712.c 	struct snd_ice1712 *ice = snd_pcm_substream_chip(substream);
ice               653 sound/pci/ice1712/ice1712.c 	spin_lock_irq(&ice->reg_lock);
ice               654 sound/pci/ice1712/ice1712.c 	outl(ice->capture_con_virt_addr = runtime->dma_addr, ICEREG(ice, CONCAP_ADDR));
ice               655 sound/pci/ice1712/ice1712.c 	outw(buf_size, ICEREG(ice, CONCAP_COUNT));
ice               656 sound/pci/ice1712/ice1712.c 	snd_ice1712_write(ice, ICE1712_IREG_CAP_COUNT_HI, period_size >> 8);
ice               657 sound/pci/ice1712/ice1712.c 	snd_ice1712_write(ice, ICE1712_IREG_CAP_COUNT_LO, period_size & 0xff);
ice               658 sound/pci/ice1712/ice1712.c 	snd_ice1712_write(ice, ICE1712_IREG_CAP_CTRL, tmp);
ice               659 sound/pci/ice1712/ice1712.c 	spin_unlock_irq(&ice->reg_lock);
ice               660 sound/pci/ice1712/ice1712.c 	snd_ac97_set_rate(ice->ac97, AC97_PCM_LR_ADC_RATE, runtime->rate);
ice               666 sound/pci/ice1712/ice1712.c 	struct snd_ice1712 *ice = snd_pcm_substream_chip(substream);
ice               670 sound/pci/ice1712/ice1712.c 	if (!(snd_ice1712_read(ice, ICE1712_IREG_PBK_CTRL) & 1))
ice               672 sound/pci/ice1712/ice1712.c 	ptr = runtime->buffer_size - inw(ice->ddma_port + 4);
ice               681 sound/pci/ice1712/ice1712.c 	struct snd_ice1712 *ice = snd_pcm_substream_chip(substream);
ice               685 sound/pci/ice1712/ice1712.c 	if (!(snd_ice1712_ds_read(ice, substream->number * 2, ICE1712_DSC_CONTROL) & 1))
ice               687 sound/pci/ice1712/ice1712.c 	if (ice->playback_con_active_buf[substream->number])
ice               691 sound/pci/ice1712/ice1712.c 	ptr = snd_ice1712_ds_read(ice, substream->number * 2, addr) -
ice               692 sound/pci/ice1712/ice1712.c 		ice->playback_con_virt_addr[substream->number];
ice               701 sound/pci/ice1712/ice1712.c 	struct snd_ice1712 *ice = snd_pcm_substream_chip(substream);
ice               704 sound/pci/ice1712/ice1712.c 	if (!(snd_ice1712_read(ice, ICE1712_IREG_CAP_CTRL) & 1))
ice               706 sound/pci/ice1712/ice1712.c 	ptr = inl(ICEREG(ice, CONCAP_ADDR)) - ice->capture_con_virt_addr;
ice               772 sound/pci/ice1712/ice1712.c 	struct snd_ice1712 *ice = snd_pcm_substream_chip(substream);
ice               774 sound/pci/ice1712/ice1712.c 	ice->playback_con_substream = substream;
ice               782 sound/pci/ice1712/ice1712.c 	struct snd_ice1712 *ice = snd_pcm_substream_chip(substream);
ice               785 sound/pci/ice1712/ice1712.c 	ice->playback_con_substream_ds[substream->number] = substream;
ice               787 sound/pci/ice1712/ice1712.c 	spin_lock_irq(&ice->reg_lock);
ice               788 sound/pci/ice1712/ice1712.c 	tmp = inw(ICEDS(ice, INTMASK)) & ~(1 << (substream->number * 2));
ice               789 sound/pci/ice1712/ice1712.c 	outw(tmp, ICEDS(ice, INTMASK));
ice               790 sound/pci/ice1712/ice1712.c 	spin_unlock_irq(&ice->reg_lock);
ice               797 sound/pci/ice1712/ice1712.c 	struct snd_ice1712 *ice = snd_pcm_substream_chip(substream);
ice               799 sound/pci/ice1712/ice1712.c 	ice->capture_con_substream = substream;
ice               801 sound/pci/ice1712/ice1712.c 	runtime->hw.rates = ice->ac97->rates[AC97_RATES_ADC];
ice               809 sound/pci/ice1712/ice1712.c 	struct snd_ice1712 *ice = snd_pcm_substream_chip(substream);
ice               811 sound/pci/ice1712/ice1712.c 	ice->playback_con_substream = NULL;
ice               817 sound/pci/ice1712/ice1712.c 	struct snd_ice1712 *ice = snd_pcm_substream_chip(substream);
ice               820 sound/pci/ice1712/ice1712.c 	spin_lock_irq(&ice->reg_lock);
ice               821 sound/pci/ice1712/ice1712.c 	tmp = inw(ICEDS(ice, INTMASK)) | (3 << (substream->number * 2));
ice               822 sound/pci/ice1712/ice1712.c 	outw(tmp, ICEDS(ice, INTMASK));
ice               823 sound/pci/ice1712/ice1712.c 	spin_unlock_irq(&ice->reg_lock);
ice               824 sound/pci/ice1712/ice1712.c 	ice->playback_con_substream_ds[substream->number] = NULL;
ice               830 sound/pci/ice1712/ice1712.c 	struct snd_ice1712 *ice = snd_pcm_substream_chip(substream);
ice               832 sound/pci/ice1712/ice1712.c 	ice->capture_con_substream = NULL;
ice               869 sound/pci/ice1712/ice1712.c static int snd_ice1712_pcm(struct snd_ice1712 *ice, int device)
ice               874 sound/pci/ice1712/ice1712.c 	err = snd_pcm_new(ice->card, "ICE1712 consumer", device, 1, 1, &pcm);
ice               881 sound/pci/ice1712/ice1712.c 	pcm->private_data = ice;
ice               884 sound/pci/ice1712/ice1712.c 	ice->pcm = pcm;
ice               887 sound/pci/ice1712/ice1712.c 					      snd_dma_pci_data(ice->pci), 64*1024, 64*1024);
ice               889 sound/pci/ice1712/ice1712.c 	dev_warn(ice->card->dev,
ice               895 sound/pci/ice1712/ice1712.c static int snd_ice1712_pcm_ds(struct snd_ice1712 *ice, int device)
ice               900 sound/pci/ice1712/ice1712.c 	err = snd_pcm_new(ice->card, "ICE1712 consumer (DS)", device, 6, 0, &pcm);
ice               906 sound/pci/ice1712/ice1712.c 	pcm->private_data = ice;
ice               909 sound/pci/ice1712/ice1712.c 	ice->pcm_ds = pcm;
ice               912 sound/pci/ice1712/ice1712.c 					      snd_dma_pci_data(ice->pci), 64*1024, 128*1024);
ice               933 sound/pci/ice1712/ice1712.c 	struct snd_ice1712 *ice = snd_pcm_substream_chip(substream);
ice               944 sound/pci/ice1712/ice1712.c 		spin_lock(&ice->reg_lock);
ice               945 sound/pci/ice1712/ice1712.c 		old = inl(ICEMT(ice, PLAYBACK_CONTROL));
ice               950 sound/pci/ice1712/ice1712.c 		outl(old, ICEMT(ice, PLAYBACK_CONTROL));
ice               951 sound/pci/ice1712/ice1712.c 		spin_unlock(&ice->reg_lock);
ice               962 sound/pci/ice1712/ice1712.c 			if (s == ice->playback_pro_substream) {
ice               965 sound/pci/ice1712/ice1712.c 			} else if (s == ice->capture_pro_substream) {
ice               970 sound/pci/ice1712/ice1712.c 		spin_lock(&ice->reg_lock);
ice               971 sound/pci/ice1712/ice1712.c 		old = inl(ICEMT(ice, PLAYBACK_CONTROL));
ice               976 sound/pci/ice1712/ice1712.c 		outl(old, ICEMT(ice, PLAYBACK_CONTROL));
ice               977 sound/pci/ice1712/ice1712.c 		spin_unlock(&ice->reg_lock);
ice               988 sound/pci/ice1712/ice1712.c static void snd_ice1712_set_pro_rate(struct snd_ice1712 *ice, unsigned int rate, int force)
ice              1015 sound/pci/ice1712/ice1712.c 	spin_lock_irqsave(&ice->reg_lock, flags);
ice              1016 sound/pci/ice1712/ice1712.c 	if (inb(ICEMT(ice, PLAYBACK_CONTROL)) & (ICE1712_CAPTURE_START_SHADOW|
ice              1020 sound/pci/ice1712/ice1712.c 		spin_unlock_irqrestore(&ice->reg_lock, flags);
ice              1023 sound/pci/ice1712/ice1712.c 	if (!force && is_pro_rate_locked(ice))
ice              1026 sound/pci/ice1712/ice1712.c 	old = inb(ICEMT(ice, RATE));
ice              1030 sound/pci/ice1712/ice1712.c 	ice->cur_rate = rate;
ice              1031 sound/pci/ice1712/ice1712.c 	outb(val, ICEMT(ice, RATE));
ice              1032 sound/pci/ice1712/ice1712.c 	spin_unlock_irqrestore(&ice->reg_lock, flags);
ice              1034 sound/pci/ice1712/ice1712.c 	if (ice->gpio.set_pro_rate)
ice              1035 sound/pci/ice1712/ice1712.c 		ice->gpio.set_pro_rate(ice, rate);
ice              1036 sound/pci/ice1712/ice1712.c 	for (i = 0; i < ice->akm_codecs; i++) {
ice              1037 sound/pci/ice1712/ice1712.c 		if (ice->akm[i].ops.set_rate_val)
ice              1038 sound/pci/ice1712/ice1712.c 			ice->akm[i].ops.set_rate_val(&ice->akm[i], rate);
ice              1040 sound/pci/ice1712/ice1712.c 	if (ice->spdif.ops.setup_rate)
ice              1041 sound/pci/ice1712/ice1712.c 		ice->spdif.ops.setup_rate(ice, rate);
ice              1046 sound/pci/ice1712/ice1712.c 	struct snd_ice1712 *ice = snd_pcm_substream_chip(substream);
ice              1048 sound/pci/ice1712/ice1712.c 	ice->playback_pro_size = snd_pcm_lib_buffer_bytes(substream);
ice              1049 sound/pci/ice1712/ice1712.c 	spin_lock_irq(&ice->reg_lock);
ice              1050 sound/pci/ice1712/ice1712.c 	outl(substream->runtime->dma_addr, ICEMT(ice, PLAYBACK_ADDR));
ice              1051 sound/pci/ice1712/ice1712.c 	outw((ice->playback_pro_size >> 2) - 1, ICEMT(ice, PLAYBACK_SIZE));
ice              1052 sound/pci/ice1712/ice1712.c 	outw((snd_pcm_lib_period_bytes(substream) >> 2) - 1, ICEMT(ice, PLAYBACK_COUNT));
ice              1053 sound/pci/ice1712/ice1712.c 	spin_unlock_irq(&ice->reg_lock);
ice              1061 sound/pci/ice1712/ice1712.c 	struct snd_ice1712 *ice = snd_pcm_substream_chip(substream);
ice              1063 sound/pci/ice1712/ice1712.c 	snd_ice1712_set_pro_rate(ice, params_rate(hw_params), 0);
ice              1069 sound/pci/ice1712/ice1712.c 	struct snd_ice1712 *ice = snd_pcm_substream_chip(substream);
ice              1071 sound/pci/ice1712/ice1712.c 	ice->capture_pro_size = snd_pcm_lib_buffer_bytes(substream);
ice              1072 sound/pci/ice1712/ice1712.c 	spin_lock_irq(&ice->reg_lock);
ice              1073 sound/pci/ice1712/ice1712.c 	outl(substream->runtime->dma_addr, ICEMT(ice, CAPTURE_ADDR));
ice              1074 sound/pci/ice1712/ice1712.c 	outw((ice->capture_pro_size >> 2) - 1, ICEMT(ice, CAPTURE_SIZE));
ice              1075 sound/pci/ice1712/ice1712.c 	outw((snd_pcm_lib_period_bytes(substream) >> 2) - 1, ICEMT(ice, CAPTURE_COUNT));
ice              1076 sound/pci/ice1712/ice1712.c 	spin_unlock_irq(&ice->reg_lock);
ice              1083 sound/pci/ice1712/ice1712.c 	struct snd_ice1712 *ice = snd_pcm_substream_chip(substream);
ice              1085 sound/pci/ice1712/ice1712.c 	snd_ice1712_set_pro_rate(ice, params_rate(hw_params), 0);
ice              1091 sound/pci/ice1712/ice1712.c 	struct snd_ice1712 *ice = snd_pcm_substream_chip(substream);
ice              1094 sound/pci/ice1712/ice1712.c 	if (!(inl(ICEMT(ice, PLAYBACK_CONTROL)) & ICE1712_PLAYBACK_START))
ice              1096 sound/pci/ice1712/ice1712.c 	ptr = ice->playback_pro_size - (inw(ICEMT(ice, PLAYBACK_SIZE)) << 2);
ice              1105 sound/pci/ice1712/ice1712.c 	struct snd_ice1712 *ice = snd_pcm_substream_chip(substream);
ice              1108 sound/pci/ice1712/ice1712.c 	if (!(inl(ICEMT(ice, PLAYBACK_CONTROL)) & ICE1712_CAPTURE_START_SHADOW))
ice              1110 sound/pci/ice1712/ice1712.c 	ptr = ice->capture_pro_size - (inw(ICEMT(ice, CAPTURE_SIZE)) << 2);
ice              1158 sound/pci/ice1712/ice1712.c 	struct snd_ice1712 *ice = snd_pcm_substream_chip(substream);
ice              1160 sound/pci/ice1712/ice1712.c 	ice->playback_pro_substream = substream;
ice              1165 sound/pci/ice1712/ice1712.c 	if (is_pro_rate_locked(ice)) {
ice              1170 sound/pci/ice1712/ice1712.c 	if (ice->spdif.ops.open)
ice              1171 sound/pci/ice1712/ice1712.c 		ice->spdif.ops.open(ice, substream);
ice              1178 sound/pci/ice1712/ice1712.c 	struct snd_ice1712 *ice = snd_pcm_substream_chip(substream);
ice              1181 sound/pci/ice1712/ice1712.c 	ice->capture_pro_substream = substream;
ice              1186 sound/pci/ice1712/ice1712.c 	if (is_pro_rate_locked(ice)) {
ice              1196 sound/pci/ice1712/ice1712.c 	struct snd_ice1712 *ice = snd_pcm_substream_chip(substream);
ice              1199 sound/pci/ice1712/ice1712.c 		snd_ice1712_set_pro_rate(ice, PRO_RATE_DEFAULT, 0);
ice              1200 sound/pci/ice1712/ice1712.c 	ice->playback_pro_substream = NULL;
ice              1201 sound/pci/ice1712/ice1712.c 	if (ice->spdif.ops.close)
ice              1202 sound/pci/ice1712/ice1712.c 		ice->spdif.ops.close(ice, substream);
ice              1209 sound/pci/ice1712/ice1712.c 	struct snd_ice1712 *ice = snd_pcm_substream_chip(substream);
ice              1212 sound/pci/ice1712/ice1712.c 		snd_ice1712_set_pro_rate(ice, PRO_RATE_DEFAULT, 0);
ice              1213 sound/pci/ice1712/ice1712.c 	ice->capture_pro_substream = NULL;
ice              1239 sound/pci/ice1712/ice1712.c static int snd_ice1712_pcm_profi(struct snd_ice1712 *ice, int device)
ice              1244 sound/pci/ice1712/ice1712.c 	err = snd_pcm_new(ice->card, "ICE1712 multi", device, 1, 1, &pcm);
ice              1251 sound/pci/ice1712/ice1712.c 	pcm->private_data = ice;
ice              1256 sound/pci/ice1712/ice1712.c 					      snd_dma_pci_data(ice->pci), 256*1024, 256*1024);
ice              1258 sound/pci/ice1712/ice1712.c 	ice->pcm_pro = pcm;
ice              1260 sound/pci/ice1712/ice1712.c 	if (ice->cs8427) {
ice              1262 sound/pci/ice1712/ice1712.c 		err = snd_cs8427_iec958_build(ice->cs8427,
ice              1269 sound/pci/ice1712/ice1712.c 	return snd_ice1712_build_pro_mixer(ice);
ice              1276 sound/pci/ice1712/ice1712.c static void snd_ice1712_update_volume(struct snd_ice1712 *ice, int index)
ice              1278 sound/pci/ice1712/ice1712.c 	unsigned int vol = ice->pro_volumes[index];
ice              1283 sound/pci/ice1712/ice1712.c 	outb(index, ICEMT(ice, MONITOR_INDEX));
ice              1284 sound/pci/ice1712/ice1712.c 	outw(val, ICEMT(ice, MONITOR_VOLUME));
ice              1291 sound/pci/ice1712/ice1712.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice              1295 sound/pci/ice1712/ice1712.c 	spin_lock_irq(&ice->reg_lock);
ice              1297 sound/pci/ice1712/ice1712.c 		!((ice->pro_volumes[priv_idx] >> 15) & 1);
ice              1299 sound/pci/ice1712/ice1712.c 		!((ice->pro_volumes[priv_idx] >> 31) & 1);
ice              1300 sound/pci/ice1712/ice1712.c 	spin_unlock_irq(&ice->reg_lock);
ice              1306 sound/pci/ice1712/ice1712.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice              1313 sound/pci/ice1712/ice1712.c 	spin_lock_irq(&ice->reg_lock);
ice              1314 sound/pci/ice1712/ice1712.c 	nval |= ice->pro_volumes[priv_idx] & ~0x80008000;
ice              1315 sound/pci/ice1712/ice1712.c 	change = nval != ice->pro_volumes[priv_idx];
ice              1316 sound/pci/ice1712/ice1712.c 	ice->pro_volumes[priv_idx] = nval;
ice              1317 sound/pci/ice1712/ice1712.c 	snd_ice1712_update_volume(ice, priv_idx);
ice              1318 sound/pci/ice1712/ice1712.c 	spin_unlock_irq(&ice->reg_lock);
ice              1333 sound/pci/ice1712/ice1712.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice              1337 sound/pci/ice1712/ice1712.c 	spin_lock_irq(&ice->reg_lock);
ice              1339 sound/pci/ice1712/ice1712.c 		(ice->pro_volumes[priv_idx] >> 0) & 127;
ice              1341 sound/pci/ice1712/ice1712.c 		(ice->pro_volumes[priv_idx] >> 16) & 127;
ice              1342 sound/pci/ice1712/ice1712.c 	spin_unlock_irq(&ice->reg_lock);
ice              1348 sound/pci/ice1712/ice1712.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice              1355 sound/pci/ice1712/ice1712.c 	spin_lock_irq(&ice->reg_lock);
ice              1356 sound/pci/ice1712/ice1712.c 	nval |= ice->pro_volumes[priv_idx] & ~0x007f007f;
ice              1357 sound/pci/ice1712/ice1712.c 	change = nval != ice->pro_volumes[priv_idx];
ice              1358 sound/pci/ice1712/ice1712.c 	ice->pro_volumes[priv_idx] = nval;
ice              1359 sound/pci/ice1712/ice1712.c 	snd_ice1712_update_volume(ice, priv_idx);
ice              1360 sound/pci/ice1712/ice1712.c 	spin_unlock_irq(&ice->reg_lock);
ice              1431 sound/pci/ice1712/ice1712.c static int snd_ice1712_build_pro_mixer(struct snd_ice1712 *ice)
ice              1433 sound/pci/ice1712/ice1712.c 	struct snd_card *card = ice->card;
ice              1439 sound/pci/ice1712/ice1712.c 		err = snd_ctl_add(card, snd_ctl_new1(&snd_ice1712_multi_playback_ctrls[idx], ice));
ice              1444 sound/pci/ice1712/ice1712.c 	if (ice->num_total_adcs > 0) {
ice              1446 sound/pci/ice1712/ice1712.c 		tmp.count = ice->num_total_adcs;
ice              1447 sound/pci/ice1712/ice1712.c 		err = snd_ctl_add(card, snd_ctl_new1(&tmp, ice));
ice              1452 sound/pci/ice1712/ice1712.c 	err = snd_ctl_add(card, snd_ctl_new1(&snd_ice1712_multi_capture_spdif_switch, ice));
ice              1456 sound/pci/ice1712/ice1712.c 	if (ice->num_total_adcs > 0) {
ice              1458 sound/pci/ice1712/ice1712.c 		tmp.count = ice->num_total_adcs;
ice              1459 sound/pci/ice1712/ice1712.c 		err = snd_ctl_add(card, snd_ctl_new1(&tmp, ice));
ice              1464 sound/pci/ice1712/ice1712.c 	err = snd_ctl_add(card, snd_ctl_new1(&snd_ice1712_multi_capture_spdif_volume, ice));
ice              1470 sound/pci/ice1712/ice1712.c 		ice->pro_volumes[idx] = 0x80008000;	/* mute */
ice              1471 sound/pci/ice1712/ice1712.c 		snd_ice1712_update_volume(ice, idx);
ice              1473 sound/pci/ice1712/ice1712.c 	for (idx = 10; idx < 10 + ice->num_total_adcs; idx++) {
ice              1474 sound/pci/ice1712/ice1712.c 		ice->pro_volumes[idx] = 0x80008000;	/* mute */
ice              1475 sound/pci/ice1712/ice1712.c 		snd_ice1712_update_volume(ice, idx);
ice              1478 sound/pci/ice1712/ice1712.c 		ice->pro_volumes[idx] = 0x80008000;	/* mute */
ice              1479 sound/pci/ice1712/ice1712.c 		snd_ice1712_update_volume(ice, idx);
ice              1486 sound/pci/ice1712/ice1712.c 	struct snd_ice1712 *ice = ac97->private_data;
ice              1487 sound/pci/ice1712/ice1712.c 	ice->ac97 = NULL;
ice              1490 sound/pci/ice1712/ice1712.c static int snd_ice1712_ac97_mixer(struct snd_ice1712 *ice)
ice              1504 sound/pci/ice1712/ice1712.c 	if (ice_has_con_ac97(ice)) {
ice              1505 sound/pci/ice1712/ice1712.c 		err = snd_ac97_bus(ice->card, bus_num++, &con_ops, NULL, &pbus);
ice              1509 sound/pci/ice1712/ice1712.c 		ac97.private_data = ice;
ice              1511 sound/pci/ice1712/ice1712.c 		err = snd_ac97_mixer(pbus, &ac97, &ice->ac97);
ice              1513 sound/pci/ice1712/ice1712.c 			dev_warn(ice->card->dev,
ice              1516 sound/pci/ice1712/ice1712.c 			return snd_ctl_add(ice->card,
ice              1518 sound/pci/ice1712/ice1712.c 				     ice));
ice              1522 sound/pci/ice1712/ice1712.c 	if (!(ice->eeprom.data[ICE_EEP1_ACLINK] & ICE1712_CFG_PRO_I2S)) {
ice              1523 sound/pci/ice1712/ice1712.c 		err = snd_ac97_bus(ice->card, bus_num, &pro_ops, NULL, &pbus);
ice              1527 sound/pci/ice1712/ice1712.c 		ac97.private_data = ice;
ice              1529 sound/pci/ice1712/ice1712.c 		err = snd_ac97_mixer(pbus, &ac97, &ice->ac97);
ice              1531 sound/pci/ice1712/ice1712.c 			dev_warn(ice->card->dev,
ice              1537 sound/pci/ice1712/ice1712.c 	strcat(ice->card->mixername, "ICE1712 - multitrack");
ice              1545 sound/pci/ice1712/ice1712.c static inline unsigned int eeprom_double(struct snd_ice1712 *ice, int idx)
ice              1547 sound/pci/ice1712/ice1712.c 	return (unsigned int)ice->eeprom.data[idx] | ((unsigned int)ice->eeprom.data[idx + 1] << 8);
ice              1553 sound/pci/ice1712/ice1712.c 	struct snd_ice1712 *ice = entry->private_data;
ice              1556 sound/pci/ice1712/ice1712.c 	snd_iprintf(buffer, "%s\n\n", ice->card->longname);
ice              1559 sound/pci/ice1712/ice1712.c 	snd_iprintf(buffer, "  Subvendor        : 0x%x\n", ice->eeprom.subvendor);
ice              1560 sound/pci/ice1712/ice1712.c 	snd_iprintf(buffer, "  Size             : %i bytes\n", ice->eeprom.size);
ice              1561 sound/pci/ice1712/ice1712.c 	snd_iprintf(buffer, "  Version          : %i\n", ice->eeprom.version);
ice              1562 sound/pci/ice1712/ice1712.c 	snd_iprintf(buffer, "  Codec            : 0x%x\n", ice->eeprom.data[ICE_EEP1_CODEC]);
ice              1563 sound/pci/ice1712/ice1712.c 	snd_iprintf(buffer, "  ACLink           : 0x%x\n", ice->eeprom.data[ICE_EEP1_ACLINK]);
ice              1564 sound/pci/ice1712/ice1712.c 	snd_iprintf(buffer, "  I2S ID           : 0x%x\n", ice->eeprom.data[ICE_EEP1_I2SID]);
ice              1565 sound/pci/ice1712/ice1712.c 	snd_iprintf(buffer, "  S/PDIF           : 0x%x\n", ice->eeprom.data[ICE_EEP1_SPDIF]);
ice              1566 sound/pci/ice1712/ice1712.c 	snd_iprintf(buffer, "  GPIO mask        : 0x%x\n", ice->eeprom.gpiomask);
ice              1567 sound/pci/ice1712/ice1712.c 	snd_iprintf(buffer, "  GPIO state       : 0x%x\n", ice->eeprom.gpiostate);
ice              1568 sound/pci/ice1712/ice1712.c 	snd_iprintf(buffer, "  GPIO direction   : 0x%x\n", ice->eeprom.gpiodir);
ice              1569 sound/pci/ice1712/ice1712.c 	snd_iprintf(buffer, "  AC'97 main       : 0x%x\n", eeprom_double(ice, ICE_EEP1_AC97_MAIN_LO));
ice              1570 sound/pci/ice1712/ice1712.c 	snd_iprintf(buffer, "  AC'97 pcm        : 0x%x\n", eeprom_double(ice, ICE_EEP1_AC97_PCM_LO));
ice              1571 sound/pci/ice1712/ice1712.c 	snd_iprintf(buffer, "  AC'97 record     : 0x%x\n", eeprom_double(ice, ICE_EEP1_AC97_REC_LO));
ice              1572 sound/pci/ice1712/ice1712.c 	snd_iprintf(buffer, "  AC'97 record src : 0x%x\n", ice->eeprom.data[ICE_EEP1_AC97_RECSRC]);
ice              1574 sound/pci/ice1712/ice1712.c 		snd_iprintf(buffer, "  DAC ID #%i        : 0x%x\n", idx, ice->eeprom.data[ICE_EEP1_DAC_ID + idx]);
ice              1576 sound/pci/ice1712/ice1712.c 		snd_iprintf(buffer, "  ADC ID #%i        : 0x%x\n", idx, ice->eeprom.data[ICE_EEP1_ADC_ID + idx]);
ice              1577 sound/pci/ice1712/ice1712.c 	for (idx = 0x1c; idx < ice->eeprom.size; idx++)
ice              1578 sound/pci/ice1712/ice1712.c 		snd_iprintf(buffer, "  Extra #%02i        : 0x%x\n", idx, ice->eeprom.data[idx]);
ice              1581 sound/pci/ice1712/ice1712.c 	snd_iprintf(buffer, "  PSDOUT03         : 0x%04x\n", (unsigned)inw(ICEMT(ice, ROUTE_PSDOUT03)));
ice              1582 sound/pci/ice1712/ice1712.c 	snd_iprintf(buffer, "  CAPTURE          : 0x%08x\n", inl(ICEMT(ice, ROUTE_CAPTURE)));
ice              1583 sound/pci/ice1712/ice1712.c 	snd_iprintf(buffer, "  SPDOUT           : 0x%04x\n", (unsigned)inw(ICEMT(ice, ROUTE_SPDOUT)));
ice              1584 sound/pci/ice1712/ice1712.c 	snd_iprintf(buffer, "  RATE             : 0x%02x\n", (unsigned)inb(ICEMT(ice, RATE)));
ice              1585 sound/pci/ice1712/ice1712.c 	snd_iprintf(buffer, "  GPIO_DATA        : 0x%02x\n", (unsigned)snd_ice1712_get_gpio_data(ice));
ice              1586 sound/pci/ice1712/ice1712.c 	snd_iprintf(buffer, "  GPIO_WRITE_MASK  : 0x%02x\n", (unsigned)snd_ice1712_read(ice, ICE1712_IREG_GPIO_WRITE_MASK));
ice              1587 sound/pci/ice1712/ice1712.c 	snd_iprintf(buffer, "  GPIO_DIRECTION   : 0x%02x\n", (unsigned)snd_ice1712_read(ice, ICE1712_IREG_GPIO_DIRECTION));
ice              1590 sound/pci/ice1712/ice1712.c static void snd_ice1712_proc_init(struct snd_ice1712 *ice)
ice              1592 sound/pci/ice1712/ice1712.c 	snd_card_ro_proc_new(ice->card, "ice1712", ice, snd_ice1712_proc_read);
ice              1610 sound/pci/ice1712/ice1712.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice              1612 sound/pci/ice1712/ice1712.c 	memcpy(ucontrol->value.bytes.data, &ice->eeprom, sizeof(ice->eeprom));
ice              1637 sound/pci/ice1712/ice1712.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice              1638 sound/pci/ice1712/ice1712.c 	if (ice->spdif.ops.default_get)
ice              1639 sound/pci/ice1712/ice1712.c 		ice->spdif.ops.default_get(ice, ucontrol);
ice              1646 sound/pci/ice1712/ice1712.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice              1647 sound/pci/ice1712/ice1712.c 	if (ice->spdif.ops.default_put)
ice              1648 sound/pci/ice1712/ice1712.c 		return ice->spdif.ops.default_put(ice, ucontrol);
ice              1664 sound/pci/ice1712/ice1712.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice              1665 sound/pci/ice1712/ice1712.c 	if (ice->spdif.ops.default_get) {
ice              1686 sound/pci/ice1712/ice1712.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice              1687 sound/pci/ice1712/ice1712.c 	if (ice->spdif.ops.default_get) {
ice              1724 sound/pci/ice1712/ice1712.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice              1725 sound/pci/ice1712/ice1712.c 	if (ice->spdif.ops.stream_get)
ice              1726 sound/pci/ice1712/ice1712.c 		ice->spdif.ops.stream_get(ice, ucontrol);
ice              1733 sound/pci/ice1712/ice1712.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice              1734 sound/pci/ice1712/ice1712.c 	if (ice->spdif.ops.stream_put)
ice              1735 sound/pci/ice1712/ice1712.c 		return ice->spdif.ops.stream_put(ice, ucontrol);
ice              1753 sound/pci/ice1712/ice1712.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice              1757 sound/pci/ice1712/ice1712.c 	snd_ice1712_save_gpio_status(ice);
ice              1759 sound/pci/ice1712/ice1712.c 		(snd_ice1712_gpio_read(ice) & mask ? 1 : 0) ^ invert;
ice              1760 sound/pci/ice1712/ice1712.c 	snd_ice1712_restore_gpio_status(ice);
ice              1767 sound/pci/ice1712/ice1712.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice              1775 sound/pci/ice1712/ice1712.c 	snd_ice1712_save_gpio_status(ice);
ice              1776 sound/pci/ice1712/ice1712.c 	val = snd_ice1712_gpio_read(ice);
ice              1779 sound/pci/ice1712/ice1712.c 		snd_ice1712_gpio_write(ice, nval);
ice              1780 sound/pci/ice1712/ice1712.c 	snd_ice1712_restore_gpio_status(ice);
ice              1812 sound/pci/ice1712/ice1712.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice              1818 sound/pci/ice1712/ice1712.c 	spin_lock_irq(&ice->reg_lock);
ice              1819 sound/pci/ice1712/ice1712.c 	if (is_spdif_master(ice)) {
ice              1822 sound/pci/ice1712/ice1712.c 		val = xlate[inb(ICEMT(ice, RATE)) & 15];
ice              1829 sound/pci/ice1712/ice1712.c 	spin_unlock_irq(&ice->reg_lock);
ice              1836 sound/pci/ice1712/ice1712.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice              1844 sound/pci/ice1712/ice1712.c 	spin_lock_irq(&ice->reg_lock);
ice              1845 sound/pci/ice1712/ice1712.c 	oval = inb(ICEMT(ice, RATE));
ice              1847 sound/pci/ice1712/ice1712.c 		outb(oval | ICE1712_SPDIF_MASTER, ICEMT(ice, RATE));
ice              1850 sound/pci/ice1712/ice1712.c 		spin_unlock_irq(&ice->reg_lock);
ice              1851 sound/pci/ice1712/ice1712.c 		snd_ice1712_set_pro_rate(ice, PRO_RATE_DEFAULT, 1);
ice              1852 sound/pci/ice1712/ice1712.c 		spin_lock_irq(&ice->reg_lock);
ice              1854 sound/pci/ice1712/ice1712.c 	change = inb(ICEMT(ice, RATE)) != oval;
ice              1855 sound/pci/ice1712/ice1712.c 	spin_unlock_irq(&ice->reg_lock);
ice              1858 sound/pci/ice1712/ice1712.c 	    (inb(ICEMT(ice, RATE)) & ICE1712_SPDIF_MASTER))
ice              1859 sound/pci/ice1712/ice1712.c 		snd_ice1712_set_input_clock_source(ice, is_spdif_master(ice));
ice              1949 sound/pci/ice1712/ice1712.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice              1953 sound/pci/ice1712/ice1712.c 	spin_lock_irq(&ice->reg_lock);
ice              1956 sound/pci/ice1712/ice1712.c 	spin_unlock_irq(&ice->reg_lock);
ice              1980 sound/pci/ice1712/ice1712.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice              1984 sound/pci/ice1712/ice1712.c 	spin_lock_irq(&ice->reg_lock);
ice              1987 sound/pci/ice1712/ice1712.c 	spin_unlock_irq(&ice->reg_lock);
ice              2019 sound/pci/ice1712/ice1712.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice              2023 sound/pci/ice1712/ice1712.c 	spin_lock_irq(&ice->reg_lock);
ice              2024 sound/pci/ice1712/ice1712.c 	val = inw(ICEMT(ice, ROUTE_PSDOUT03));
ice              2025 sound/pci/ice1712/ice1712.c 	cval = inl(ICEMT(ice, ROUTE_CAPTURE));
ice              2026 sound/pci/ice1712/ice1712.c 	spin_unlock_irq(&ice->reg_lock);
ice              2045 sound/pci/ice1712/ice1712.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice              2060 sound/pci/ice1712/ice1712.c 	spin_lock_irq(&ice->reg_lock);
ice              2061 sound/pci/ice1712/ice1712.c 	val = old_val = inw(ICEMT(ice, ROUTE_PSDOUT03));
ice              2066 sound/pci/ice1712/ice1712.c 		outw(val, ICEMT(ice, ROUTE_PSDOUT03));
ice              2067 sound/pci/ice1712/ice1712.c 	spin_unlock_irq(&ice->reg_lock);
ice              2072 sound/pci/ice1712/ice1712.c 	spin_lock_irq(&ice->reg_lock);
ice              2073 sound/pci/ice1712/ice1712.c 	val = old_val = inl(ICEMT(ice, ROUTE_CAPTURE));
ice              2086 sound/pci/ice1712/ice1712.c 		outl(val, ICEMT(ice, ROUTE_CAPTURE));
ice              2088 sound/pci/ice1712/ice1712.c 	spin_unlock_irq(&ice->reg_lock);
ice              2095 sound/pci/ice1712/ice1712.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice              2098 sound/pci/ice1712/ice1712.c 	val = inw(ICEMT(ice, ROUTE_SPDOUT));
ice              2115 sound/pci/ice1712/ice1712.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice              2121 sound/pci/ice1712/ice1712.c 	spin_lock_irq(&ice->reg_lock);
ice              2122 sound/pci/ice1712/ice1712.c 	val = old_val = inw(ICEMT(ice, ROUTE_SPDOUT));
ice              2146 sound/pci/ice1712/ice1712.c 		outw(val, ICEMT(ice, ROUTE_SPDOUT));
ice              2147 sound/pci/ice1712/ice1712.c 	spin_unlock_irq(&ice->reg_lock);
ice              2182 sound/pci/ice1712/ice1712.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice              2184 sound/pci/ice1712/ice1712.c 	ucontrol->value.integer.value[0] = inb(ICEMT(ice, MONITOR_RATE));
ice              2191 sound/pci/ice1712/ice1712.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice              2194 sound/pci/ice1712/ice1712.c 	spin_lock_irq(&ice->reg_lock);
ice              2195 sound/pci/ice1712/ice1712.c 	change = inb(ICEMT(ice, MONITOR_RATE)) != ucontrol->value.integer.value[0];
ice              2196 sound/pci/ice1712/ice1712.c 	outb(ucontrol->value.integer.value[0], ICEMT(ice, MONITOR_RATE));
ice              2197 sound/pci/ice1712/ice1712.c 	spin_unlock_irq(&ice->reg_lock);
ice              2222 sound/pci/ice1712/ice1712.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice              2225 sound/pci/ice1712/ice1712.c 	spin_lock_irq(&ice->reg_lock);
ice              2227 sound/pci/ice1712/ice1712.c 		outb(idx, ICEMT(ice, MONITOR_PEAKINDEX));
ice              2228 sound/pci/ice1712/ice1712.c 		ucontrol->value.integer.value[idx] = inb(ICEMT(ice, MONITOR_PEAKDATA));
ice              2230 sound/pci/ice1712/ice1712.c 	spin_unlock_irq(&ice->reg_lock);
ice              2256 sound/pci/ice1712/ice1712.c static unsigned char snd_ice1712_read_i2c(struct snd_ice1712 *ice,
ice              2262 sound/pci/ice1712/ice1712.c 	outb(addr, ICEREG(ice, I2C_BYTE_ADDR));
ice              2263 sound/pci/ice1712/ice1712.c 	outb(dev & ~ICE1712_I2C_WRITE, ICEREG(ice, I2C_DEV_ADDR));
ice              2264 sound/pci/ice1712/ice1712.c 	while (t-- > 0 && (inb(ICEREG(ice, I2C_CTRL)) & ICE1712_I2C_BUSY)) ;
ice              2265 sound/pci/ice1712/ice1712.c 	return inb(ICEREG(ice, I2C_DATA));
ice              2268 sound/pci/ice1712/ice1712.c static int snd_ice1712_read_eeprom(struct snd_ice1712 *ice,
ice              2276 sound/pci/ice1712/ice1712.c 		ice->eeprom.subvendor = 0;
ice              2277 sound/pci/ice1712/ice1712.c 		if ((inb(ICEREG(ice, I2C_CTRL)) & ICE1712_I2C_EEPROM) != 0)
ice              2278 sound/pci/ice1712/ice1712.c 			ice->eeprom.subvendor = (snd_ice1712_read_i2c(ice, dev, 0x00) << 0) |
ice              2279 sound/pci/ice1712/ice1712.c 				(snd_ice1712_read_i2c(ice, dev, 0x01) << 8) |
ice              2280 sound/pci/ice1712/ice1712.c 				(snd_ice1712_read_i2c(ice, dev, 0x02) << 16) |
ice              2281 sound/pci/ice1712/ice1712.c 				(snd_ice1712_read_i2c(ice, dev, 0x03) << 24);
ice              2282 sound/pci/ice1712/ice1712.c 		if (ice->eeprom.subvendor == 0 ||
ice              2283 sound/pci/ice1712/ice1712.c 		    ice->eeprom.subvendor == (unsigned int)-1) {
ice              2286 sound/pci/ice1712/ice1712.c 			pci_read_config_word(ice->pci, PCI_SUBSYSTEM_VENDOR_ID, &vendor);
ice              2287 sound/pci/ice1712/ice1712.c 			pci_read_config_word(ice->pci, PCI_SUBSYSTEM_ID, &device);
ice              2288 sound/pci/ice1712/ice1712.c 			ice->eeprom.subvendor = ((unsigned int)swab16(vendor) << 16) | swab16(device);
ice              2289 sound/pci/ice1712/ice1712.c 			if (ice->eeprom.subvendor == 0 || ice->eeprom.subvendor == (unsigned int)-1) {
ice              2290 sound/pci/ice1712/ice1712.c 				dev_err(ice->card->dev,
ice              2299 sound/pci/ice1712/ice1712.c 				dev_info(ice->card->dev,
ice              2301 sound/pci/ice1712/ice1712.c 				ice->eeprom.subvendor = c->subvendor;
ice              2302 sound/pci/ice1712/ice1712.c 			} else if (c->subvendor != ice->eeprom.subvendor)
ice              2307 sound/pci/ice1712/ice1712.c 			dev_dbg(ice->card->dev, "using the defined eeprom..\n");
ice              2308 sound/pci/ice1712/ice1712.c 			ice->eeprom.version = 1;
ice              2309 sound/pci/ice1712/ice1712.c 			ice->eeprom.size = c->eeprom_size + 6;
ice              2310 sound/pci/ice1712/ice1712.c 			memcpy(ice->eeprom.data, c->eeprom_data, c->eeprom_size);
ice              2314 sound/pci/ice1712/ice1712.c 	dev_warn(ice->card->dev, "No matching model found for ID 0x%x\n",
ice              2315 sound/pci/ice1712/ice1712.c 	       ice->eeprom.subvendor);
ice              2318 sound/pci/ice1712/ice1712.c 	ice->eeprom.size = snd_ice1712_read_i2c(ice, dev, 0x04);
ice              2319 sound/pci/ice1712/ice1712.c 	if (ice->eeprom.size < 6)
ice              2320 sound/pci/ice1712/ice1712.c 		ice->eeprom.size = 32; /* FIXME: any cards without the correct size? */
ice              2321 sound/pci/ice1712/ice1712.c 	else if (ice->eeprom.size > 32) {
ice              2322 sound/pci/ice1712/ice1712.c 		dev_err(ice->card->dev,
ice              2323 sound/pci/ice1712/ice1712.c 			"invalid EEPROM (size = %i)\n", ice->eeprom.size);
ice              2326 sound/pci/ice1712/ice1712.c 	ice->eeprom.version = snd_ice1712_read_i2c(ice, dev, 0x05);
ice              2327 sound/pci/ice1712/ice1712.c 	if (ice->eeprom.version != 1) {
ice              2328 sound/pci/ice1712/ice1712.c 		dev_err(ice->card->dev, "invalid EEPROM version %i\n",
ice              2329 sound/pci/ice1712/ice1712.c 			   ice->eeprom.version);
ice              2332 sound/pci/ice1712/ice1712.c 	size = ice->eeprom.size - 6;
ice              2334 sound/pci/ice1712/ice1712.c 		ice->eeprom.data[i] = snd_ice1712_read_i2c(ice, dev, i + 6);
ice              2337 sound/pci/ice1712/ice1712.c 	ice->eeprom.gpiomask = ice->eeprom.data[ICE_EEP1_GPIO_MASK];
ice              2338 sound/pci/ice1712/ice1712.c 	ice->eeprom.gpiostate = ice->eeprom.data[ICE_EEP1_GPIO_STATE];
ice              2339 sound/pci/ice1712/ice1712.c 	ice->eeprom.gpiodir = ice->eeprom.data[ICE_EEP1_GPIO_DIR];
ice              2346 sound/pci/ice1712/ice1712.c static int snd_ice1712_chip_init(struct snd_ice1712 *ice)
ice              2348 sound/pci/ice1712/ice1712.c 	outb(ICE1712_RESET | ICE1712_NATIVE, ICEREG(ice, CONTROL));
ice              2350 sound/pci/ice1712/ice1712.c 	outb(ICE1712_NATIVE, ICEREG(ice, CONTROL));
ice              2352 sound/pci/ice1712/ice1712.c 	if (ice->eeprom.subvendor == ICE1712_SUBDEVICE_DMX6FIRE &&
ice              2353 sound/pci/ice1712/ice1712.c 	    !ice->dxr_enable)
ice              2358 sound/pci/ice1712/ice1712.c 		ice->eeprom.data[ICE_EEP1_CODEC] = 0x3a;
ice              2359 sound/pci/ice1712/ice1712.c 	pci_write_config_byte(ice->pci, 0x60, ice->eeprom.data[ICE_EEP1_CODEC]);
ice              2360 sound/pci/ice1712/ice1712.c 	pci_write_config_byte(ice->pci, 0x61, ice->eeprom.data[ICE_EEP1_ACLINK]);
ice              2361 sound/pci/ice1712/ice1712.c 	pci_write_config_byte(ice->pci, 0x62, ice->eeprom.data[ICE_EEP1_I2SID]);
ice              2362 sound/pci/ice1712/ice1712.c 	pci_write_config_byte(ice->pci, 0x63, ice->eeprom.data[ICE_EEP1_SPDIF]);
ice              2363 sound/pci/ice1712/ice1712.c 	if (ice->eeprom.subvendor != ICE1712_SUBDEVICE_STDSP24 &&
ice              2364 sound/pci/ice1712/ice1712.c 	    ice->eeprom.subvendor != ICE1712_SUBDEVICE_STAUDIO_ADCIII) {
ice              2365 sound/pci/ice1712/ice1712.c 		ice->gpio.write_mask = ice->eeprom.gpiomask;
ice              2366 sound/pci/ice1712/ice1712.c 		ice->gpio.direction = ice->eeprom.gpiodir;
ice              2367 sound/pci/ice1712/ice1712.c 		snd_ice1712_write(ice, ICE1712_IREG_GPIO_WRITE_MASK,
ice              2368 sound/pci/ice1712/ice1712.c 				  ice->eeprom.gpiomask);
ice              2369 sound/pci/ice1712/ice1712.c 		snd_ice1712_write(ice, ICE1712_IREG_GPIO_DIRECTION,
ice              2370 sound/pci/ice1712/ice1712.c 				  ice->eeprom.gpiodir);
ice              2371 sound/pci/ice1712/ice1712.c 		snd_ice1712_write(ice, ICE1712_IREG_GPIO_DATA,
ice              2372 sound/pci/ice1712/ice1712.c 				  ice->eeprom.gpiostate);
ice              2374 sound/pci/ice1712/ice1712.c 		ice->gpio.write_mask = 0xc0;
ice              2375 sound/pci/ice1712/ice1712.c 		ice->gpio.direction = 0xff;
ice              2376 sound/pci/ice1712/ice1712.c 		snd_ice1712_write(ice, ICE1712_IREG_GPIO_WRITE_MASK, 0xc0);
ice              2377 sound/pci/ice1712/ice1712.c 		snd_ice1712_write(ice, ICE1712_IREG_GPIO_DIRECTION, 0xff);
ice              2378 sound/pci/ice1712/ice1712.c 		snd_ice1712_write(ice, ICE1712_IREG_GPIO_DATA,
ice              2381 sound/pci/ice1712/ice1712.c 	snd_ice1712_write(ice, ICE1712_IREG_PRO_POWERDOWN, 0);
ice              2382 sound/pci/ice1712/ice1712.c 	if (!(ice->eeprom.data[ICE_EEP1_CODEC] & ICE1712_CFG_NO_CON_AC97)) {
ice              2383 sound/pci/ice1712/ice1712.c 		outb(ICE1712_AC97_WARM, ICEREG(ice, AC97_CMD));
ice              2385 sound/pci/ice1712/ice1712.c 		outb(0, ICEREG(ice, AC97_CMD));
ice              2387 sound/pci/ice1712/ice1712.c 		snd_ice1712_write(ice, ICE1712_IREG_CONSUMER_POWERDOWN, 0);
ice              2389 sound/pci/ice1712/ice1712.c 	snd_ice1712_set_pro_rate(ice, 48000, 1);
ice              2391 sound/pci/ice1712/ice1712.c 	outb(((ice->eeprom.data[ICE_EEP1_CODEC] & ICE1712_CFG_2xMPU401) == 0 ?
ice              2393 sound/pci/ice1712/ice1712.c 	     ((ice->eeprom.data[ICE_EEP1_CODEC] & ICE1712_CFG_NO_CON_AC97) ?
ice              2395 sound/pci/ice1712/ice1712.c 	     ICEREG(ice, IRQMASK));
ice              2396 sound/pci/ice1712/ice1712.c 	outb(0x00, ICEMT(ice, IRQ));
ice              2401 sound/pci/ice1712/ice1712.c int snd_ice1712_spdif_build_controls(struct snd_ice1712 *ice)
ice              2406 sound/pci/ice1712/ice1712.c 	if (snd_BUG_ON(!ice->pcm_pro))
ice              2408 sound/pci/ice1712/ice1712.c 	err = snd_ctl_add(ice->card, kctl = snd_ctl_new1(&snd_ice1712_spdif_default, ice));
ice              2411 sound/pci/ice1712/ice1712.c 	kctl->id.device = ice->pcm_pro->device;
ice              2412 sound/pci/ice1712/ice1712.c 	err = snd_ctl_add(ice->card, kctl = snd_ctl_new1(&snd_ice1712_spdif_maskc, ice));
ice              2415 sound/pci/ice1712/ice1712.c 	kctl->id.device = ice->pcm_pro->device;
ice              2416 sound/pci/ice1712/ice1712.c 	err = snd_ctl_add(ice->card, kctl = snd_ctl_new1(&snd_ice1712_spdif_maskp, ice));
ice              2419 sound/pci/ice1712/ice1712.c 	kctl->id.device = ice->pcm_pro->device;
ice              2420 sound/pci/ice1712/ice1712.c 	err = snd_ctl_add(ice->card, kctl = snd_ctl_new1(&snd_ice1712_spdif_stream, ice));
ice              2423 sound/pci/ice1712/ice1712.c 	kctl->id.device = ice->pcm_pro->device;
ice              2424 sound/pci/ice1712/ice1712.c 	ice->spdif.stream_ctl = kctl;
ice              2429 sound/pci/ice1712/ice1712.c static int snd_ice1712_build_controls(struct snd_ice1712 *ice)
ice              2433 sound/pci/ice1712/ice1712.c 	err = snd_ctl_add(ice->card, snd_ctl_new1(&snd_ice1712_eeprom, ice));
ice              2436 sound/pci/ice1712/ice1712.c 	err = snd_ctl_add(ice->card, snd_ctl_new1(&snd_ice1712_pro_internal_clock, ice));
ice              2439 sound/pci/ice1712/ice1712.c 	err = snd_ctl_add(ice->card, snd_ctl_new1(&snd_ice1712_pro_internal_clock_default, ice));
ice              2443 sound/pci/ice1712/ice1712.c 	err = snd_ctl_add(ice->card, snd_ctl_new1(&snd_ice1712_pro_rate_locking, ice));
ice              2446 sound/pci/ice1712/ice1712.c 	err = snd_ctl_add(ice->card, snd_ctl_new1(&snd_ice1712_pro_rate_reset, ice));
ice              2450 sound/pci/ice1712/ice1712.c 	if (ice->num_total_dacs > 0) {
ice              2452 sound/pci/ice1712/ice1712.c 		tmp.count = ice->num_total_dacs;
ice              2453 sound/pci/ice1712/ice1712.c 		err = snd_ctl_add(ice->card, snd_ctl_new1(&tmp, ice));
ice              2458 sound/pci/ice1712/ice1712.c 	err = snd_ctl_add(ice->card, snd_ctl_new1(&snd_ice1712_mixer_pro_spdif_route, ice));
ice              2462 sound/pci/ice1712/ice1712.c 	err = snd_ctl_add(ice->card, snd_ctl_new1(&snd_ice1712_mixer_pro_volume_rate, ice));
ice              2465 sound/pci/ice1712/ice1712.c 	return snd_ctl_add(ice->card,
ice              2466 sound/pci/ice1712/ice1712.c 			   snd_ctl_new1(&snd_ice1712_mixer_pro_peak, ice));
ice              2469 sound/pci/ice1712/ice1712.c static int snd_ice1712_free(struct snd_ice1712 *ice)
ice              2471 sound/pci/ice1712/ice1712.c 	if (!ice->port)
ice              2474 sound/pci/ice1712/ice1712.c 	outb(ICE1712_MULTI_CAPTURE | ICE1712_MULTI_PLAYBACK, ICEMT(ice, IRQ));
ice              2475 sound/pci/ice1712/ice1712.c 	outb(0xff, ICEREG(ice, IRQMASK));
ice              2478 sound/pci/ice1712/ice1712.c 	if (ice->irq >= 0)
ice              2479 sound/pci/ice1712/ice1712.c 		free_irq(ice->irq, ice);
ice              2481 sound/pci/ice1712/ice1712.c 	if (ice->port)
ice              2482 sound/pci/ice1712/ice1712.c 		pci_release_regions(ice->pci);
ice              2483 sound/pci/ice1712/ice1712.c 	snd_ice1712_akm4xxx_free(ice);
ice              2484 sound/pci/ice1712/ice1712.c 	pci_disable_device(ice->pci);
ice              2485 sound/pci/ice1712/ice1712.c 	kfree(ice->spec);
ice              2486 sound/pci/ice1712/ice1712.c 	kfree(ice);
ice              2492 sound/pci/ice1712/ice1712.c 	struct snd_ice1712 *ice = device->device_data;
ice              2493 sound/pci/ice1712/ice1712.c 	return snd_ice1712_free(ice);
ice              2504 sound/pci/ice1712/ice1712.c 	struct snd_ice1712 *ice;
ice              2525 sound/pci/ice1712/ice1712.c 	ice = kzalloc(sizeof(*ice), GFP_KERNEL);
ice              2526 sound/pci/ice1712/ice1712.c 	if (ice == NULL) {
ice              2530 sound/pci/ice1712/ice1712.c 	ice->omni = omni ? 1 : 0;
ice              2535 sound/pci/ice1712/ice1712.c 	ice->cs8427_timeout = cs8427_timeout;
ice              2536 sound/pci/ice1712/ice1712.c 	ice->dxr_enable = dxr_enable;
ice              2537 sound/pci/ice1712/ice1712.c 	spin_lock_init(&ice->reg_lock);
ice              2538 sound/pci/ice1712/ice1712.c 	mutex_init(&ice->gpio_mutex);
ice              2539 sound/pci/ice1712/ice1712.c 	mutex_init(&ice->i2c_mutex);
ice              2540 sound/pci/ice1712/ice1712.c 	mutex_init(&ice->open_mutex);
ice              2541 sound/pci/ice1712/ice1712.c 	ice->gpio.set_mask = snd_ice1712_set_gpio_mask;
ice              2542 sound/pci/ice1712/ice1712.c 	ice->gpio.get_mask = snd_ice1712_get_gpio_mask;
ice              2543 sound/pci/ice1712/ice1712.c 	ice->gpio.set_dir = snd_ice1712_set_gpio_dir;
ice              2544 sound/pci/ice1712/ice1712.c 	ice->gpio.get_dir = snd_ice1712_get_gpio_dir;
ice              2545 sound/pci/ice1712/ice1712.c 	ice->gpio.set_data = snd_ice1712_set_gpio_data;
ice              2546 sound/pci/ice1712/ice1712.c 	ice->gpio.get_data = snd_ice1712_get_gpio_data;
ice              2548 sound/pci/ice1712/ice1712.c 	ice->spdif.cs8403_bits =
ice              2549 sound/pci/ice1712/ice1712.c 		ice->spdif.cs8403_stream_bits = (0x01 |	/* consumer format */
ice              2552 sound/pci/ice1712/ice1712.c 	ice->card = card;
ice              2553 sound/pci/ice1712/ice1712.c 	ice->pci = pci;
ice              2554 sound/pci/ice1712/ice1712.c 	ice->irq = -1;
ice              2557 sound/pci/ice1712/ice1712.c 	pci_write_config_word(ice->pci, 0x40, 0x807f);
ice              2558 sound/pci/ice1712/ice1712.c 	pci_write_config_word(ice->pci, 0x42, 0x0006);
ice              2559 sound/pci/ice1712/ice1712.c 	snd_ice1712_proc_init(ice);
ice              2562 sound/pci/ice1712/ice1712.c 	card->private_data = ice;
ice              2566 sound/pci/ice1712/ice1712.c 		kfree(ice);
ice              2570 sound/pci/ice1712/ice1712.c 	ice->port = pci_resource_start(pci, 0);
ice              2571 sound/pci/ice1712/ice1712.c 	ice->ddma_port = pci_resource_start(pci, 1);
ice              2572 sound/pci/ice1712/ice1712.c 	ice->dmapath_port = pci_resource_start(pci, 2);
ice              2573 sound/pci/ice1712/ice1712.c 	ice->profi_port = pci_resource_start(pci, 3);
ice              2576 sound/pci/ice1712/ice1712.c 			KBUILD_MODNAME, ice)) {
ice              2578 sound/pci/ice1712/ice1712.c 		snd_ice1712_free(ice);
ice              2582 sound/pci/ice1712/ice1712.c 	ice->irq = pci->irq;
ice              2584 sound/pci/ice1712/ice1712.c 	if (snd_ice1712_read_eeprom(ice, modelname) < 0) {
ice              2585 sound/pci/ice1712/ice1712.c 		snd_ice1712_free(ice);
ice              2588 sound/pci/ice1712/ice1712.c 	if (snd_ice1712_chip_init(ice) < 0) {
ice              2589 sound/pci/ice1712/ice1712.c 		snd_ice1712_free(ice);
ice              2593 sound/pci/ice1712/ice1712.c 	err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, ice, &ops);
ice              2595 sound/pci/ice1712/ice1712.c 		snd_ice1712_free(ice);
ice              2599 sound/pci/ice1712/ice1712.c 	*r_ice1712 = ice;
ice              2617 sound/pci/ice1712/ice1712.c 	struct snd_ice1712 *ice;
ice              2637 sound/pci/ice1712/ice1712.c 		cs8427_timeout[dev], dxr_enable[dev], &ice);
ice              2645 sound/pci/ice1712/ice1712.c 			if (c->subvendor == ice->eeprom.subvendor) {
ice              2646 sound/pci/ice1712/ice1712.c 				ice->card_info = c;
ice              2651 sound/pci/ice1712/ice1712.c 					err = c->chip_init(ice);
ice              2664 sound/pci/ice1712/ice1712.c 	err = snd_ice1712_pcm_profi(ice, pcm_dev++);
ice              2670 sound/pci/ice1712/ice1712.c 	if (ice_has_con_ac97(ice)) {
ice              2671 sound/pci/ice1712/ice1712.c 		err = snd_ice1712_pcm(ice, pcm_dev++);
ice              2678 sound/pci/ice1712/ice1712.c 	err = snd_ice1712_ac97_mixer(ice);
ice              2684 sound/pci/ice1712/ice1712.c 	err = snd_ice1712_build_controls(ice);
ice              2691 sound/pci/ice1712/ice1712.c 		err = c->build_controls(ice);
ice              2698 sound/pci/ice1712/ice1712.c 	if (ice_has_con_ac97(ice)) {
ice              2699 sound/pci/ice1712/ice1712.c 		err = snd_ice1712_pcm_ds(ice, pcm_dev++);
ice              2708 sound/pci/ice1712/ice1712.c 			ICEREG(ice, MPU1_CTRL),
ice              2711 sound/pci/ice1712/ice1712.c 			-1, &ice->rmidi[0]);
ice              2718 sound/pci/ice1712/ice1712.c 			snprintf(ice->rmidi[0]->name,
ice              2719 sound/pci/ice1712/ice1712.c 				 sizeof(ice->rmidi[0]->name),
ice              2722 sound/pci/ice1712/ice1712.c 		if (ice->eeprom.data[ICE_EEP1_CODEC] & ICE1712_CFG_2xMPU401) {
ice              2725 sound/pci/ice1712/ice1712.c 				ICEREG(ice, MPU2_CTRL),
ice              2728 sound/pci/ice1712/ice1712.c 				-1, &ice->rmidi[1]);
ice              2736 sound/pci/ice1712/ice1712.c 				snprintf(ice->rmidi[1]->name,
ice              2737 sound/pci/ice1712/ice1712.c 					 sizeof(ice->rmidi[1]->name),
ice              2743 sound/pci/ice1712/ice1712.c 	snd_ice1712_set_input_clock_source(ice, 0);
ice              2746 sound/pci/ice1712/ice1712.c 		card->shortname, ice->port, ice->irq);
ice              2761 sound/pci/ice1712/ice1712.c 	struct snd_ice1712 *ice = card->private_data;
ice              2763 sound/pci/ice1712/ice1712.c 	if (ice->card_info && ice->card_info->chip_exit)
ice              2764 sound/pci/ice1712/ice1712.c 		ice->card_info->chip_exit(ice);
ice              2772 sound/pci/ice1712/ice1712.c 	struct snd_ice1712 *ice = card->private_data;
ice              2774 sound/pci/ice1712/ice1712.c 	if (!ice->pm_suspend_enabled)
ice              2779 sound/pci/ice1712/ice1712.c 	snd_ac97_suspend(ice->ac97);
ice              2781 sound/pci/ice1712/ice1712.c 	spin_lock_irq(&ice->reg_lock);
ice              2782 sound/pci/ice1712/ice1712.c 	ice->pm_saved_is_spdif_master = is_spdif_master(ice);
ice              2783 sound/pci/ice1712/ice1712.c 	ice->pm_saved_spdif_ctrl = inw(ICEMT(ice, ROUTE_SPDOUT));
ice              2784 sound/pci/ice1712/ice1712.c 	ice->pm_saved_route = inw(ICEMT(ice, ROUTE_PSDOUT03));
ice              2785 sound/pci/ice1712/ice1712.c 	spin_unlock_irq(&ice->reg_lock);
ice              2787 sound/pci/ice1712/ice1712.c 	if (ice->pm_suspend)
ice              2788 sound/pci/ice1712/ice1712.c 		ice->pm_suspend(ice);
ice              2795 sound/pci/ice1712/ice1712.c 	struct snd_ice1712 *ice = card->private_data;
ice              2798 sound/pci/ice1712/ice1712.c 	if (!ice->pm_suspend_enabled)
ice              2801 sound/pci/ice1712/ice1712.c 	if (ice->cur_rate)
ice              2802 sound/pci/ice1712/ice1712.c 		rate = ice->cur_rate;
ice              2806 sound/pci/ice1712/ice1712.c 	if (snd_ice1712_chip_init(ice) < 0) {
ice              2811 sound/pci/ice1712/ice1712.c 	ice->cur_rate = rate;
ice              2813 sound/pci/ice1712/ice1712.c 	if (ice->pm_resume)
ice              2814 sound/pci/ice1712/ice1712.c 		ice->pm_resume(ice);
ice              2816 sound/pci/ice1712/ice1712.c 	if (ice->pm_saved_is_spdif_master) {
ice              2818 sound/pci/ice1712/ice1712.c 		spin_lock_irq(&ice->reg_lock);
ice              2819 sound/pci/ice1712/ice1712.c 		outb(inb(ICEMT(ice, RATE)) | ICE1712_SPDIF_MASTER,
ice              2820 sound/pci/ice1712/ice1712.c 			ICEMT(ice, RATE));
ice              2821 sound/pci/ice1712/ice1712.c 		spin_unlock_irq(&ice->reg_lock);
ice              2822 sound/pci/ice1712/ice1712.c 		snd_ice1712_set_input_clock_source(ice, 1);
ice              2825 sound/pci/ice1712/ice1712.c 		snd_ice1712_set_pro_rate(ice, rate, 1);
ice              2826 sound/pci/ice1712/ice1712.c 		snd_ice1712_set_input_clock_source(ice, 0);
ice              2829 sound/pci/ice1712/ice1712.c 	outw(ice->pm_saved_spdif_ctrl, ICEMT(ice, ROUTE_SPDOUT));
ice              2830 sound/pci/ice1712/ice1712.c 	outw(ice->pm_saved_route, ICEMT(ice, ROUTE_PSDOUT03));
ice              2832 sound/pci/ice1712/ice1712.c 	snd_ac97_resume(ice->ac97);
ice                27 sound/pci/ice1712/ice1712.h #define ICEREG(ice, x) ((ice)->port + ICE1712_REG_##x)
ice               104 sound/pci/ice1712/ice1712.h #define ICEDS(ice, x) ((ice)->dmapath_port + ICE1712_DS_##x)
ice               135 sound/pci/ice1712/ice1712.h #define ICEMT(ice, x) ((ice)->profi_port + ICE1712_MT_##x)
ice               248 sound/pci/ice1712/ice1712.h #define ice_has_con_ac97(ice)	(!((ice)->eeprom.data[ICE_EEP1_CODEC] & ICE1712_CFG_NO_CON_AC97))
ice               354 sound/pci/ice1712/ice1712.h 		void (*set_mask)(struct snd_ice1712 *ice, unsigned int data);
ice               355 sound/pci/ice1712/ice1712.h 		unsigned int (*get_mask)(struct snd_ice1712 *ice);
ice               356 sound/pci/ice1712/ice1712.h 		void (*set_dir)(struct snd_ice1712 *ice, unsigned int data);
ice               357 sound/pci/ice1712/ice1712.h 		unsigned int (*get_dir)(struct snd_ice1712 *ice);
ice               358 sound/pci/ice1712/ice1712.h 		void (*set_data)(struct snd_ice1712 *ice, unsigned int data);
ice               359 sound/pci/ice1712/ice1712.h 		unsigned int (*get_data)(struct snd_ice1712 *ice);
ice               361 sound/pci/ice1712/ice1712.h 		void (*set_pro_rate)(struct snd_ice1712 *ice, unsigned int rate);
ice               362 sound/pci/ice1712/ice1712.h 		void (*i2s_mclk_changed)(struct snd_ice1712 *ice);
ice               371 sound/pci/ice1712/ice1712.h 	int (*is_spdif_master)(struct snd_ice1712 *ice);
ice               372 sound/pci/ice1712/ice1712.h 	unsigned int (*get_rate)(struct snd_ice1712 *ice);
ice               373 sound/pci/ice1712/ice1712.h 	void (*set_rate)(struct snd_ice1712 *ice, unsigned int rate);
ice               374 sound/pci/ice1712/ice1712.h 	unsigned char (*set_mclk)(struct snd_ice1712 *ice, unsigned int rate);
ice               375 sound/pci/ice1712/ice1712.h 	int (*set_spdif_clock)(struct snd_ice1712 *ice, int type);
ice               376 sound/pci/ice1712/ice1712.h 	int (*get_spdif_master_type)(struct snd_ice1712 *ice);
ice               395 sound/pci/ice1712/ice1712.h static inline void snd_ice1712_gpio_set_dir(struct snd_ice1712 *ice, unsigned int bits)
ice               397 sound/pci/ice1712/ice1712.h 	ice->gpio.set_dir(ice, bits);
ice               400 sound/pci/ice1712/ice1712.h static inline unsigned int snd_ice1712_gpio_get_dir(struct snd_ice1712 *ice)
ice               402 sound/pci/ice1712/ice1712.h 	return ice->gpio.get_dir(ice);
ice               405 sound/pci/ice1712/ice1712.h static inline void snd_ice1712_gpio_set_mask(struct snd_ice1712 *ice, unsigned int bits)
ice               407 sound/pci/ice1712/ice1712.h 	ice->gpio.set_mask(ice, bits);
ice               410 sound/pci/ice1712/ice1712.h static inline void snd_ice1712_gpio_write(struct snd_ice1712 *ice, unsigned int val)
ice               412 sound/pci/ice1712/ice1712.h 	ice->gpio.set_data(ice, val);
ice               415 sound/pci/ice1712/ice1712.h static inline unsigned int snd_ice1712_gpio_read(struct snd_ice1712 *ice)
ice               417 sound/pci/ice1712/ice1712.h 	return ice->gpio.get_data(ice);
ice               425 sound/pci/ice1712/ice1712.h static inline void snd_ice1712_save_gpio_status(struct snd_ice1712 *ice)
ice               427 sound/pci/ice1712/ice1712.h 	mutex_lock(&ice->gpio_mutex);
ice               428 sound/pci/ice1712/ice1712.h 	ice->gpio.saved[0] = ice->gpio.direction;
ice               429 sound/pci/ice1712/ice1712.h 	ice->gpio.saved[1] = ice->gpio.write_mask;
ice               432 sound/pci/ice1712/ice1712.h static inline void snd_ice1712_restore_gpio_status(struct snd_ice1712 *ice)
ice               434 sound/pci/ice1712/ice1712.h 	ice->gpio.set_dir(ice, ice->gpio.saved[0]);
ice               435 sound/pci/ice1712/ice1712.h 	ice->gpio.set_mask(ice, ice->gpio.saved[1]);
ice               436 sound/pci/ice1712/ice1712.h 	ice->gpio.direction = ice->gpio.saved[0];
ice               437 sound/pci/ice1712/ice1712.h 	ice->gpio.write_mask = ice->gpio.saved[1];
ice               438 sound/pci/ice1712/ice1712.h 	mutex_unlock(&ice->gpio_mutex);
ice               453 sound/pci/ice1712/ice1712.h static inline void snd_ice1712_gpio_write_bits(struct snd_ice1712 *ice,
ice               458 sound/pci/ice1712/ice1712.h 	ice->gpio.direction |= mask;
ice               459 sound/pci/ice1712/ice1712.h 	snd_ice1712_gpio_set_dir(ice, ice->gpio.direction);
ice               460 sound/pci/ice1712/ice1712.h 	val = snd_ice1712_gpio_read(ice);
ice               463 sound/pci/ice1712/ice1712.h 	snd_ice1712_gpio_write(ice, val);
ice               466 sound/pci/ice1712/ice1712.h static inline int snd_ice1712_gpio_read_bits(struct snd_ice1712 *ice,
ice               469 sound/pci/ice1712/ice1712.h 	ice->gpio.direction &= ~mask;
ice               470 sound/pci/ice1712/ice1712.h 	snd_ice1712_gpio_set_dir(ice, ice->gpio.direction);
ice               471 sound/pci/ice1712/ice1712.h 	return  snd_ice1712_gpio_read(ice) & mask;
ice               475 sound/pci/ice1712/ice1712.h int snd_ice1724_get_route_val(struct snd_ice1712 *ice, int shift);
ice               476 sound/pci/ice1712/ice1712.h int snd_ice1724_put_route_val(struct snd_ice1712 *ice, unsigned int val,
ice               479 sound/pci/ice1712/ice1712.h int snd_ice1712_spdif_build_controls(struct snd_ice1712 *ice);
ice               484 sound/pci/ice1712/ice1712.h 			     struct snd_ice1712 *ice);
ice               485 sound/pci/ice1712/ice1712.h void snd_ice1712_akm4xxx_free(struct snd_ice1712 *ice);
ice               486 sound/pci/ice1712/ice1712.h int snd_ice1712_akm4xxx_build_controls(struct snd_ice1712 *ice);
ice               488 sound/pci/ice1712/ice1712.h int snd_ice1712_init_cs8427(struct snd_ice1712 *ice, int addr);
ice               490 sound/pci/ice1712/ice1712.h static inline void snd_ice1712_write(struct snd_ice1712 *ice, u8 addr, u8 data)
ice               492 sound/pci/ice1712/ice1712.h 	outb(addr, ICEREG(ice, INDEX));
ice               493 sound/pci/ice1712/ice1712.h 	outb(data, ICEREG(ice, DATA));
ice               496 sound/pci/ice1712/ice1712.h static inline u8 snd_ice1712_read(struct snd_ice1712 *ice, u8 addr)
ice               498 sound/pci/ice1712/ice1712.h 	outb(addr, ICEREG(ice, INDEX));
ice               499 sound/pci/ice1712/ice1712.h 	return inb(ICEREG(ice, DATA));
ice               106 sound/pci/ice1712/ice1724.c static inline int stdclock_is_spdif_master(struct snd_ice1712 *ice)
ice               108 sound/pci/ice1712/ice1724.c 	return (inb(ICEMT1724(ice, RATE)) & VT1724_SPDIF_MASTER) ? 1 : 0;
ice               114 sound/pci/ice1712/ice1724.c static inline int is_pro_rate_locked(struct snd_ice1712 *ice)
ice               116 sound/pci/ice1712/ice1724.c 	return (!ice->is_spdif_master(ice)) && PRO_RATE_LOCKED;
ice               123 sound/pci/ice1712/ice1724.c static unsigned char snd_vt1724_ac97_ready(struct snd_ice1712 *ice)
ice               128 sound/pci/ice1712/ice1724.c 		old_cmd = inb(ICEMT1724(ice, AC97_CMD));
ice               135 sound/pci/ice1712/ice1724.c 	dev_dbg(ice->card->dev, "snd_vt1724_ac97_ready: timeout\n");
ice               139 sound/pci/ice1712/ice1724.c static int snd_vt1724_ac97_wait_bit(struct snd_ice1712 *ice, unsigned char bit)
ice               143 sound/pci/ice1712/ice1724.c 		if ((inb(ICEMT1724(ice, AC97_CMD)) & bit) == 0)
ice               145 sound/pci/ice1712/ice1724.c 	dev_dbg(ice->card->dev, "snd_vt1724_ac97_wait_bit: timeout\n");
ice               153 sound/pci/ice1712/ice1724.c 	struct snd_ice1712 *ice = ac97->private_data;
ice               156 sound/pci/ice1712/ice1724.c 	old_cmd = snd_vt1724_ac97_ready(ice);
ice               159 sound/pci/ice1712/ice1724.c 	outb(reg, ICEMT1724(ice, AC97_INDEX));
ice               160 sound/pci/ice1712/ice1724.c 	outw(val, ICEMT1724(ice, AC97_DATA));
ice               161 sound/pci/ice1712/ice1724.c 	outb(old_cmd | VT1724_AC97_WRITE, ICEMT1724(ice, AC97_CMD));
ice               162 sound/pci/ice1712/ice1724.c 	snd_vt1724_ac97_wait_bit(ice, VT1724_AC97_WRITE);
ice               167 sound/pci/ice1712/ice1724.c 	struct snd_ice1712 *ice = ac97->private_data;
ice               170 sound/pci/ice1712/ice1724.c 	old_cmd = snd_vt1724_ac97_ready(ice);
ice               173 sound/pci/ice1712/ice1724.c 	outb(reg, ICEMT1724(ice, AC97_INDEX));
ice               174 sound/pci/ice1712/ice1724.c 	outb(old_cmd | VT1724_AC97_READ, ICEMT1724(ice, AC97_CMD));
ice               175 sound/pci/ice1712/ice1724.c 	if (snd_vt1724_ac97_wait_bit(ice, VT1724_AC97_READ) < 0)
ice               177 sound/pci/ice1712/ice1724.c 	return inw(ICEMT1724(ice, AC97_DATA));
ice               186 sound/pci/ice1712/ice1724.c static void snd_vt1724_set_gpio_dir(struct snd_ice1712 *ice, unsigned int data)
ice               188 sound/pci/ice1712/ice1724.c 	outl(data, ICEREG1724(ice, GPIO_DIRECTION));
ice               189 sound/pci/ice1712/ice1724.c 	inw(ICEREG1724(ice, GPIO_DIRECTION)); /* dummy read for pci-posting */
ice               193 sound/pci/ice1712/ice1724.c static unsigned int snd_vt1724_get_gpio_dir(struct snd_ice1712 *ice)
ice               195 sound/pci/ice1712/ice1724.c 	return inl(ICEREG1724(ice, GPIO_DIRECTION));
ice               199 sound/pci/ice1712/ice1724.c static void snd_vt1724_set_gpio_mask(struct snd_ice1712 *ice, unsigned int data)
ice               201 sound/pci/ice1712/ice1724.c 	outw(data, ICEREG1724(ice, GPIO_WRITE_MASK));
ice               202 sound/pci/ice1712/ice1724.c 	if (!ice->vt1720) /* VT1720 supports only 16 GPIO bits */
ice               203 sound/pci/ice1712/ice1724.c 		outb((data >> 16) & 0xff, ICEREG1724(ice, GPIO_WRITE_MASK_22));
ice               204 sound/pci/ice1712/ice1724.c 	inw(ICEREG1724(ice, GPIO_WRITE_MASK)); /* dummy read for pci-posting */
ice               207 sound/pci/ice1712/ice1724.c static unsigned int snd_vt1724_get_gpio_mask(struct snd_ice1712 *ice)
ice               210 sound/pci/ice1712/ice1724.c 	if (!ice->vt1720)
ice               211 sound/pci/ice1712/ice1724.c 		mask = (unsigned int)inb(ICEREG1724(ice, GPIO_WRITE_MASK_22));
ice               214 sound/pci/ice1712/ice1724.c 	mask = (mask << 16) | inw(ICEREG1724(ice, GPIO_WRITE_MASK));
ice               218 sound/pci/ice1712/ice1724.c static void snd_vt1724_set_gpio_data(struct snd_ice1712 *ice, unsigned int data)
ice               220 sound/pci/ice1712/ice1724.c 	outw(data, ICEREG1724(ice, GPIO_DATA));
ice               221 sound/pci/ice1712/ice1724.c 	if (!ice->vt1720)
ice               222 sound/pci/ice1712/ice1724.c 		outb(data >> 16, ICEREG1724(ice, GPIO_DATA_22));
ice               223 sound/pci/ice1712/ice1724.c 	inw(ICEREG1724(ice, GPIO_DATA)); /* dummy read for pci-posting */
ice               226 sound/pci/ice1712/ice1724.c static unsigned int snd_vt1724_get_gpio_data(struct snd_ice1712 *ice)
ice               229 sound/pci/ice1712/ice1724.c 	if (!ice->vt1720)
ice               230 sound/pci/ice1712/ice1724.c 		data = (unsigned int)inb(ICEREG1724(ice, GPIO_DATA_22));
ice               233 sound/pci/ice1712/ice1724.c 	data = (data << 16) | inw(ICEREG1724(ice, GPIO_DATA));
ice               241 sound/pci/ice1712/ice1724.c static void vt1724_midi_clear_rx(struct snd_ice1712 *ice)
ice               245 sound/pci/ice1712/ice1724.c 	for (count = inb(ICEREG1724(ice, MPU_RXFIFO)); count > 0; --count)
ice               246 sound/pci/ice1712/ice1724.c 		inb(ICEREG1724(ice, MPU_DATA));
ice               250 sound/pci/ice1712/ice1724.c get_rawmidi_substream(struct snd_ice1712 *ice, unsigned int stream)
ice               252 sound/pci/ice1712/ice1724.c 	return list_first_entry(&ice->rmidi[0]->streams[stream].substreams,
ice               256 sound/pci/ice1712/ice1724.c static void enable_midi_irq(struct snd_ice1712 *ice, u8 flag, int enable);
ice               258 sound/pci/ice1712/ice1724.c static void vt1724_midi_write(struct snd_ice1712 *ice)
ice               264 sound/pci/ice1712/ice1724.c 	s = get_rawmidi_substream(ice, SNDRV_RAWMIDI_STREAM_OUTPUT);
ice               265 sound/pci/ice1712/ice1724.c 	count = 31 - inb(ICEREG1724(ice, MPU_TXFIFO));
ice               269 sound/pci/ice1712/ice1724.c 			outb(buffer[i], ICEREG1724(ice, MPU_DATA));
ice               274 sound/pci/ice1712/ice1724.c 	enable_midi_irq(ice, VT1724_IRQ_MPU_TX,
ice               278 sound/pci/ice1712/ice1724.c static void vt1724_midi_read(struct snd_ice1712 *ice)
ice               284 sound/pci/ice1712/ice1724.c 	s = get_rawmidi_substream(ice, SNDRV_RAWMIDI_STREAM_INPUT);
ice               285 sound/pci/ice1712/ice1724.c 	count = inb(ICEREG1724(ice, MPU_RXFIFO));
ice               289 sound/pci/ice1712/ice1724.c 			buffer[i] = inb(ICEREG1724(ice, MPU_DATA));
ice               295 sound/pci/ice1712/ice1724.c static void enable_midi_irq(struct snd_ice1712 *ice, u8 flag, int enable)
ice               297 sound/pci/ice1712/ice1724.c 	u8 mask = inb(ICEREG1724(ice, IRQMASK));
ice               302 sound/pci/ice1712/ice1724.c 	outb(mask, ICEREG1724(ice, IRQMASK));
ice               308 sound/pci/ice1712/ice1724.c 	struct snd_ice1712 *ice = substream->rmidi->private_data;
ice               310 sound/pci/ice1712/ice1724.c 	spin_lock_irq(&ice->reg_lock);
ice               311 sound/pci/ice1712/ice1724.c 	enable_midi_irq(ice, flag, enable);
ice               312 sound/pci/ice1712/ice1724.c 	spin_unlock_irq(&ice->reg_lock);
ice               327 sound/pci/ice1712/ice1724.c 	struct snd_ice1712 *ice = s->rmidi->private_data;
ice               330 sound/pci/ice1712/ice1724.c 	spin_lock_irqsave(&ice->reg_lock, flags);
ice               332 sound/pci/ice1712/ice1724.c 		ice->midi_output = 1;
ice               333 sound/pci/ice1712/ice1724.c 		vt1724_midi_write(ice);
ice               335 sound/pci/ice1712/ice1724.c 		ice->midi_output = 0;
ice               336 sound/pci/ice1712/ice1724.c 		enable_midi_irq(ice, VT1724_IRQ_MPU_TX, 0);
ice               338 sound/pci/ice1712/ice1724.c 	spin_unlock_irqrestore(&ice->reg_lock, flags);
ice               343 sound/pci/ice1712/ice1724.c 	struct snd_ice1712 *ice = s->rmidi->private_data;
ice               350 sound/pci/ice1712/ice1724.c 		if (inb(ICEREG1724(ice, MPU_CTRL)) & VT1724_MPU_TX_EMPTY)
ice               378 sound/pci/ice1712/ice1724.c 	struct snd_ice1712 *ice = s->rmidi->private_data;
ice               381 sound/pci/ice1712/ice1724.c 	spin_lock_irqsave(&ice->reg_lock, flags);
ice               383 sound/pci/ice1712/ice1724.c 		ice->midi_input = 1;
ice               384 sound/pci/ice1712/ice1724.c 		vt1724_midi_read(ice);
ice               386 sound/pci/ice1712/ice1724.c 		ice->midi_input = 0;
ice               388 sound/pci/ice1712/ice1724.c 	spin_unlock_irqrestore(&ice->reg_lock, flags);
ice               404 sound/pci/ice1712/ice1724.c 	struct snd_ice1712 *ice = dev_id;
ice               412 sound/pci/ice1712/ice1724.c 		status = inb(ICEREG1724(ice, IRQSTAT));
ice               416 sound/pci/ice1712/ice1724.c 		spin_lock(&ice->reg_lock);
ice               418 sound/pci/ice1712/ice1724.c 			status = inb(ICEREG1724(ice, IRQSTAT));
ice               419 sound/pci/ice1712/ice1724.c 			dev_err(ice->card->dev,
ice               422 sound/pci/ice1712/ice1724.c 				dev_err(ice->card->dev, "Disabling MPU_TX\n");
ice               423 sound/pci/ice1712/ice1724.c 				enable_midi_irq(ice, VT1724_IRQ_MPU_TX, 0);
ice               425 sound/pci/ice1712/ice1724.c 			spin_unlock(&ice->reg_lock);
ice               430 sound/pci/ice1712/ice1724.c 			if (ice->midi_output)
ice               431 sound/pci/ice1712/ice1724.c 				vt1724_midi_write(ice);
ice               433 sound/pci/ice1712/ice1724.c 				enable_midi_irq(ice, VT1724_IRQ_MPU_TX, 0);
ice               442 sound/pci/ice1712/ice1724.c 			if (ice->midi_input)
ice               443 sound/pci/ice1712/ice1724.c 				vt1724_midi_read(ice);
ice               445 sound/pci/ice1712/ice1724.c 				vt1724_midi_clear_rx(ice);
ice               448 sound/pci/ice1712/ice1724.c 		outb(status, ICEREG1724(ice, IRQSTAT));
ice               449 sound/pci/ice1712/ice1724.c 		spin_unlock(&ice->reg_lock);
ice               462 sound/pci/ice1712/ice1724.c 			unsigned char mtstat = inb(ICEMT1724(ice, IRQ));
ice               464 sound/pci/ice1712/ice1724.c 				if (ice->playback_pro_substream)
ice               465 sound/pci/ice1712/ice1724.c 					snd_pcm_period_elapsed(ice->playback_pro_substream);
ice               468 sound/pci/ice1712/ice1724.c 				if (ice->capture_pro_substream)
ice               469 sound/pci/ice1712/ice1724.c 					snd_pcm_period_elapsed(ice->capture_pro_substream);
ice               472 sound/pci/ice1712/ice1724.c 				if (ice->playback_con_substream_ds[0])
ice               473 sound/pci/ice1712/ice1724.c 					snd_pcm_period_elapsed(ice->playback_con_substream_ds[0]);
ice               476 sound/pci/ice1712/ice1724.c 				if (ice->playback_con_substream_ds[1])
ice               477 sound/pci/ice1712/ice1724.c 					snd_pcm_period_elapsed(ice->playback_con_substream_ds[1]);
ice               480 sound/pci/ice1712/ice1724.c 				if (ice->playback_con_substream_ds[2])
ice               481 sound/pci/ice1712/ice1724.c 					snd_pcm_period_elapsed(ice->playback_con_substream_ds[2]);
ice               484 sound/pci/ice1712/ice1724.c 				if (ice->playback_con_substream)
ice               485 sound/pci/ice1712/ice1724.c 					snd_pcm_period_elapsed(ice->playback_con_substream);
ice               488 sound/pci/ice1712/ice1724.c 				if (ice->capture_con_substream)
ice               489 sound/pci/ice1712/ice1724.c 					snd_pcm_period_elapsed(ice->capture_con_substream);
ice               492 sound/pci/ice1712/ice1724.c 			outb(mtstat, ICEMT1724(ice, IRQ));
ice               495 sound/pci/ice1712/ice1724.c 				unsigned char fstat = inb(ICEMT1724(ice, DMA_FIFO_ERR));
ice               496 sound/pci/ice1712/ice1724.c 				outb(fstat, ICEMT1724(ice, DMA_FIFO_ERR));
ice               497 sound/pci/ice1712/ice1724.c 				outb(VT1724_MULTI_FIFO_ERR | inb(ICEMT1724(ice, DMA_INT_MASK)), ICEMT1724(ice, DMA_INT_MASK));
ice               543 sound/pci/ice1712/ice1724.c 	struct snd_ice1712 *ice = snd_pcm_substream_chip(substream);
ice               550 sound/pci/ice1712/ice1724.c 		if (snd_pcm_substream_chip(s) == ice) {
ice               561 sound/pci/ice1712/ice1724.c 		spin_lock(&ice->reg_lock);
ice               562 sound/pci/ice1712/ice1724.c 		old = inb(ICEMT1724(ice, DMA_PAUSE));
ice               567 sound/pci/ice1712/ice1724.c 		outb(old, ICEMT1724(ice, DMA_PAUSE));
ice               568 sound/pci/ice1712/ice1724.c 		spin_unlock(&ice->reg_lock);
ice               574 sound/pci/ice1712/ice1724.c 		spin_lock(&ice->reg_lock);
ice               575 sound/pci/ice1712/ice1724.c 		old = inb(ICEMT1724(ice, DMA_CONTROL));
ice               580 sound/pci/ice1712/ice1724.c 		outb(old, ICEMT1724(ice, DMA_CONTROL));
ice               581 sound/pci/ice1712/ice1724.c 		spin_unlock(&ice->reg_lock);
ice               607 sound/pci/ice1712/ice1724.c static unsigned int stdclock_get_rate(struct snd_ice1712 *ice)
ice               609 sound/pci/ice1712/ice1724.c 	return stdclock_rate_list[inb(ICEMT1724(ice, RATE)) & 15];
ice               612 sound/pci/ice1712/ice1724.c static void stdclock_set_rate(struct snd_ice1712 *ice, unsigned int rate)
ice               617 sound/pci/ice1712/ice1724.c 			outb(i, ICEMT1724(ice, RATE));
ice               623 sound/pci/ice1712/ice1724.c static unsigned char stdclock_set_mclk(struct snd_ice1712 *ice,
ice               628 sound/pci/ice1712/ice1724.c 	if (ice->eeprom.data[ICE_EEP2_ACLINK] & VT1724_CFG_PRO_I2S) {
ice               629 sound/pci/ice1712/ice1724.c 		val = old = inb(ICEMT1724(ice, I2S_FORMAT));
ice               635 sound/pci/ice1712/ice1724.c 			outb(val, ICEMT1724(ice, I2S_FORMAT));
ice               644 sound/pci/ice1712/ice1724.c static int snd_vt1724_set_pro_rate(struct snd_ice1712 *ice, unsigned int rate,
ice               652 sound/pci/ice1712/ice1724.c 	if (rate > ice->hw_rates->list[ice->hw_rates->count - 1])
ice               655 sound/pci/ice1712/ice1724.c 	spin_lock_irqsave(&ice->reg_lock, flags);
ice               656 sound/pci/ice1712/ice1724.c 	if ((inb(ICEMT1724(ice, DMA_CONTROL)) & DMA_STARTS) ||
ice               657 sound/pci/ice1712/ice1724.c 	    (inb(ICEMT1724(ice, DMA_PAUSE)) & DMA_PAUSES)) {
ice               659 sound/pci/ice1712/ice1724.c 		spin_unlock_irqrestore(&ice->reg_lock, flags);
ice               660 sound/pci/ice1712/ice1724.c 		return ((rate == ice->cur_rate) && !force) ? 0 : -EBUSY;
ice               662 sound/pci/ice1712/ice1724.c 	if (!force && is_pro_rate_locked(ice)) {
ice               665 sound/pci/ice1712/ice1724.c 		spin_unlock_irqrestore(&ice->reg_lock, flags);
ice               666 sound/pci/ice1712/ice1724.c 		return (rate == ice->cur_rate) ? 0 : -EBUSY;
ice               669 sound/pci/ice1712/ice1724.c 	if (force || !ice->is_spdif_master(ice)) {
ice               672 sound/pci/ice1712/ice1724.c 		old_rate = ice->get_rate(ice);
ice               675 sound/pci/ice1712/ice1724.c 		else if (rate == ice->cur_rate) {
ice               676 sound/pci/ice1712/ice1724.c 			spin_unlock_irqrestore(&ice->reg_lock, flags);
ice               681 sound/pci/ice1712/ice1724.c 	ice->cur_rate = rate;
ice               682 sound/pci/ice1712/ice1724.c 	spin_unlock_irqrestore(&ice->reg_lock, flags);
ice               685 sound/pci/ice1712/ice1724.c 		ice->set_rate(ice, rate);
ice               688 sound/pci/ice1712/ice1724.c 	mclk_change = ice->set_mclk(ice, rate);
ice               690 sound/pci/ice1712/ice1724.c 	if (mclk_change && ice->gpio.i2s_mclk_changed)
ice               691 sound/pci/ice1712/ice1724.c 		ice->gpio.i2s_mclk_changed(ice);
ice               692 sound/pci/ice1712/ice1724.c 	if (ice->gpio.set_pro_rate)
ice               693 sound/pci/ice1712/ice1724.c 		ice->gpio.set_pro_rate(ice, rate);
ice               696 sound/pci/ice1712/ice1724.c 	for (i = 0; i < ice->akm_codecs; i++) {
ice               697 sound/pci/ice1712/ice1724.c 		if (ice->akm[i].ops.set_rate_val)
ice               698 sound/pci/ice1712/ice1724.c 			ice->akm[i].ops.set_rate_val(&ice->akm[i], rate);
ice               700 sound/pci/ice1712/ice1724.c 	if (ice->spdif.ops.setup_rate)
ice               701 sound/pci/ice1712/ice1724.c 		ice->spdif.ops.setup_rate(ice, rate);
ice               709 sound/pci/ice1712/ice1724.c 	struct snd_ice1712 *ice = snd_pcm_substream_chip(substream);
ice               713 sound/pci/ice1712/ice1724.c 	mutex_lock(&ice->open_mutex);
ice               715 sound/pci/ice1712/ice1724.c 	if (substream == ice->playback_pro_substream) {
ice               719 sound/pci/ice1712/ice1724.c 			if (ice->pcm_reserved[i] &&
ice               720 sound/pci/ice1712/ice1724.c 			    ice->pcm_reserved[i] != substream) {
ice               721 sound/pci/ice1712/ice1724.c 				mutex_unlock(&ice->open_mutex);
ice               724 sound/pci/ice1712/ice1724.c 			ice->pcm_reserved[i] = substream;
ice               727 sound/pci/ice1712/ice1724.c 			if (ice->pcm_reserved[i] == substream)
ice               728 sound/pci/ice1712/ice1724.c 				ice->pcm_reserved[i] = NULL;
ice               733 sound/pci/ice1712/ice1724.c 			if (ice->playback_con_substream_ds[i] == substream) {
ice               734 sound/pci/ice1712/ice1724.c 				if (ice->pcm_reserved[i] &&
ice               735 sound/pci/ice1712/ice1724.c 				    ice->pcm_reserved[i] != substream) {
ice               736 sound/pci/ice1712/ice1724.c 					mutex_unlock(&ice->open_mutex);
ice               739 sound/pci/ice1712/ice1724.c 				ice->pcm_reserved[i] = substream;
ice               744 sound/pci/ice1712/ice1724.c 	mutex_unlock(&ice->open_mutex);
ice               746 sound/pci/ice1712/ice1724.c 	err = snd_vt1724_set_pro_rate(ice, params_rate(hw_params), 0);
ice               755 sound/pci/ice1712/ice1724.c 	struct snd_ice1712 *ice = snd_pcm_substream_chip(substream);
ice               758 sound/pci/ice1712/ice1724.c 	mutex_lock(&ice->open_mutex);
ice               761 sound/pci/ice1712/ice1724.c 		if (ice->pcm_reserved[i] == substream)
ice               762 sound/pci/ice1712/ice1724.c 			ice->pcm_reserved[i] = NULL;
ice               763 sound/pci/ice1712/ice1724.c 	mutex_unlock(&ice->open_mutex);
ice               769 sound/pci/ice1712/ice1724.c 	struct snd_ice1712 *ice = snd_pcm_substream_chip(substream);
ice               773 sound/pci/ice1712/ice1724.c 	spin_lock_irq(&ice->reg_lock);
ice               775 sound/pci/ice1712/ice1724.c 	outb(val, ICEMT1724(ice, BURST));
ice               777 sound/pci/ice1712/ice1724.c 	outl(substream->runtime->dma_addr, ICEMT1724(ice, PLAYBACK_ADDR));
ice               781 sound/pci/ice1712/ice1724.c 	outw(size, ICEMT1724(ice, PLAYBACK_SIZE));
ice               782 sound/pci/ice1712/ice1724.c 	outb(size >> 16, ICEMT1724(ice, PLAYBACK_SIZE) + 2);
ice               785 sound/pci/ice1712/ice1724.c 	outw(size, ICEMT1724(ice, PLAYBACK_COUNT));
ice               786 sound/pci/ice1712/ice1724.c 	outb(size >> 16, ICEMT1724(ice, PLAYBACK_COUNT) + 2);
ice               788 sound/pci/ice1712/ice1724.c 	spin_unlock_irq(&ice->reg_lock);
ice               803 sound/pci/ice1712/ice1724.c 	struct snd_ice1712 *ice = snd_pcm_substream_chip(substream);
ice               806 sound/pci/ice1712/ice1724.c 	if (!(inl(ICEMT1724(ice, DMA_CONTROL)) & VT1724_PDMA0_START))
ice               809 sound/pci/ice1712/ice1724.c 	ptr = inl(ICEMT1724(ice, PLAYBACK_ADDR));
ice               811 sound/pci/ice1712/ice1724.c 		dev_dbg(ice->card->dev, "invalid negative ptr\n");
ice               817 sound/pci/ice1712/ice1724.c 		dev_dbg(ice->card->dev, "invalid ptr %d (size=%d)\n",
ice               822 sound/pci/ice1712/ice1724.c 	ptr = inl(ICEMT1724(ice, PLAYBACK_SIZE)) & 0xffffff;
ice               830 sound/pci/ice1712/ice1724.c 		dev_dbg(ice->card->dev, "invalid ptr %d (size=%d)\n",
ice               840 sound/pci/ice1712/ice1724.c 	struct snd_ice1712 *ice = snd_pcm_substream_chip(substream);
ice               843 sound/pci/ice1712/ice1724.c 	spin_lock_irq(&ice->reg_lock);
ice               844 sound/pci/ice1712/ice1724.c 	outl(substream->runtime->dma_addr, ice->profi_port + reg->addr);
ice               846 sound/pci/ice1712/ice1724.c 	     ice->profi_port + reg->size);
ice               848 sound/pci/ice1712/ice1724.c 	     ice->profi_port + reg->count);
ice               849 sound/pci/ice1712/ice1724.c 	spin_unlock_irq(&ice->reg_lock);
ice               855 sound/pci/ice1712/ice1724.c 	struct snd_ice1712 *ice = snd_pcm_substream_chip(substream);
ice               859 sound/pci/ice1712/ice1724.c 	if (!(inl(ICEMT1724(ice, DMA_CONTROL)) & reg->start))
ice               862 sound/pci/ice1712/ice1724.c 	ptr = inl(ice->profi_port + reg->addr);
ice               866 sound/pci/ice1712/ice1724.c 	ptr = inw(ice->profi_port + reg->size);
ice               874 sound/pci/ice1712/ice1724.c 		dev_dbg(ice->card->dev, "invalid ptr %d (size=%d)\n",
ice               975 sound/pci/ice1712/ice1724.c static void set_std_hw_rates(struct snd_ice1712 *ice)
ice               977 sound/pci/ice1712/ice1724.c 	if (ice->eeprom.data[ICE_EEP2_ACLINK] & VT1724_CFG_PRO_I2S) {
ice               980 sound/pci/ice1712/ice1724.c 		if ((ice->eeprom.data[ICE_EEP2_I2S] & 0x08) && !ice->vt1720)
ice               981 sound/pci/ice1712/ice1724.c 			ice->hw_rates = &hw_constraints_rates_192;
ice               983 sound/pci/ice1712/ice1724.c 			ice->hw_rates = &hw_constraints_rates_96;
ice               986 sound/pci/ice1712/ice1724.c 		ice->hw_rates = &hw_constraints_rates_48;
ice               990 sound/pci/ice1712/ice1724.c static int set_rate_constraints(struct snd_ice1712 *ice,
ice               995 sound/pci/ice1712/ice1724.c 	runtime->hw.rate_min = ice->hw_rates->list[0];
ice               996 sound/pci/ice1712/ice1724.c 	runtime->hw.rate_max = ice->hw_rates->list[ice->hw_rates->count - 1];
ice              1000 sound/pci/ice1712/ice1724.c 					  ice->hw_rates);
ice              1008 sound/pci/ice1712/ice1724.c 	struct snd_ice1712 *ice = snd_pcm_substream_chip(substream);
ice              1011 sound/pci/ice1712/ice1724.c 	if (is_pro_rate_locked(ice)) {
ice              1012 sound/pci/ice1712/ice1724.c 		rate = ice->get_rate(ice);
ice              1030 sound/pci/ice1712/ice1724.c 	struct snd_ice1712 *ice = snd_pcm_substream_chip(substream);
ice              1034 sound/pci/ice1712/ice1724.c 	ice->playback_pro_substream = substream;
ice              1038 sound/pci/ice1712/ice1724.c 	set_rate_constraints(ice, substream);
ice              1039 sound/pci/ice1712/ice1724.c 	mutex_lock(&ice->open_mutex);
ice              1041 sound/pci/ice1712/ice1724.c 	num_indeps = ice->num_total_dacs / 2 - 1;
ice              1043 sound/pci/ice1712/ice1724.c 		if (ice->pcm_reserved[chs])
ice              1050 sound/pci/ice1712/ice1724.c 	mutex_unlock(&ice->open_mutex);
ice              1056 sound/pci/ice1712/ice1724.c 	if (ice->pro_open)
ice              1057 sound/pci/ice1712/ice1724.c 		ice->pro_open(ice, substream);
ice              1063 sound/pci/ice1712/ice1724.c 	struct snd_ice1712 *ice = snd_pcm_substream_chip(substream);
ice              1067 sound/pci/ice1712/ice1724.c 	ice->capture_pro_substream = substream;
ice              1071 sound/pci/ice1712/ice1724.c 	set_rate_constraints(ice, substream);
ice              1077 sound/pci/ice1712/ice1724.c 	if (ice->pro_open)
ice              1078 sound/pci/ice1712/ice1724.c 		ice->pro_open(ice, substream);
ice              1084 sound/pci/ice1712/ice1724.c 	struct snd_ice1712 *ice = snd_pcm_substream_chip(substream);
ice              1087 sound/pci/ice1712/ice1724.c 		snd_vt1724_set_pro_rate(ice, ice->pro_rate_default, 0);
ice              1088 sound/pci/ice1712/ice1724.c 	ice->playback_pro_substream = NULL;
ice              1095 sound/pci/ice1712/ice1724.c 	struct snd_ice1712 *ice = snd_pcm_substream_chip(substream);
ice              1098 sound/pci/ice1712/ice1724.c 		snd_vt1724_set_pro_rate(ice, ice->pro_rate_default, 0);
ice              1099 sound/pci/ice1712/ice1724.c 	ice->capture_pro_substream = NULL;
ice              1125 sound/pci/ice1712/ice1724.c static int snd_vt1724_pcm_profi(struct snd_ice1712 *ice, int device)
ice              1130 sound/pci/ice1712/ice1724.c 	if ((ice->eeprom.data[ICE_EEP2_SYSCONF] & VT1724_CFG_ADC_MASK) ==
ice              1135 sound/pci/ice1712/ice1724.c 	err = snd_pcm_new(ice->card, "ICE1724", device, 1, capt, &pcm);
ice              1144 sound/pci/ice1712/ice1724.c 	pcm->private_data = ice;
ice              1149 sound/pci/ice1712/ice1724.c 					      snd_dma_pci_data(ice->pci),
ice              1152 sound/pci/ice1712/ice1724.c 	ice->pcm_pro = pcm;
ice              1163 sound/pci/ice1712/ice1724.c static void update_spdif_bits(struct snd_ice1712 *ice, unsigned int val)
ice              1167 sound/pci/ice1712/ice1724.c 	cbit = inb(ICEREG1724(ice, SPDIF_CFG));
ice              1170 sound/pci/ice1712/ice1724.c 		outb(disabled, ICEREG1724(ice, SPDIF_CFG));
ice              1171 sound/pci/ice1712/ice1724.c 	outw(val, ICEMT1724(ice, SPDIF_CTRL));
ice              1173 sound/pci/ice1712/ice1724.c 		outb(cbit, ICEREG1724(ice, SPDIF_CFG));
ice              1174 sound/pci/ice1712/ice1724.c 	outw(val, ICEMT1724(ice, SPDIF_CTRL));
ice              1178 sound/pci/ice1712/ice1724.c static void update_spdif_rate(struct snd_ice1712 *ice, unsigned int rate)
ice              1183 sound/pci/ice1712/ice1724.c 	spin_lock_irqsave(&ice->reg_lock, flags);
ice              1184 sound/pci/ice1712/ice1724.c 	nval = val = inw(ICEMT1724(ice, SPDIF_CTRL));
ice              1196 sound/pci/ice1712/ice1724.c 		update_spdif_bits(ice, nval);
ice              1197 sound/pci/ice1712/ice1724.c 	spin_unlock_irqrestore(&ice->reg_lock, flags);
ice              1202 sound/pci/ice1712/ice1724.c 	struct snd_ice1712 *ice = snd_pcm_substream_chip(substream);
ice              1203 sound/pci/ice1712/ice1724.c 	if (!ice->force_pdma4)
ice              1204 sound/pci/ice1712/ice1724.c 		update_spdif_rate(ice, substream->runtime->rate);
ice              1210 sound/pci/ice1712/ice1724.c 	struct snd_ice1712 *ice = snd_pcm_substream_chip(substream);
ice              1214 sound/pci/ice1712/ice1724.c 	ice->playback_con_substream = substream;
ice              1215 sound/pci/ice1712/ice1724.c 	if (ice->force_pdma4) {
ice              1217 sound/pci/ice1712/ice1724.c 		set_rate_constraints(ice, substream);
ice              1227 sound/pci/ice1712/ice1724.c 	if (ice->spdif.ops.open)
ice              1228 sound/pci/ice1712/ice1724.c 		ice->spdif.ops.open(ice, substream);
ice              1234 sound/pci/ice1712/ice1724.c 	struct snd_ice1712 *ice = snd_pcm_substream_chip(substream);
ice              1237 sound/pci/ice1712/ice1724.c 		snd_vt1724_set_pro_rate(ice, ice->pro_rate_default, 0);
ice              1238 sound/pci/ice1712/ice1724.c 	ice->playback_con_substream = NULL;
ice              1239 sound/pci/ice1712/ice1724.c 	if (ice->spdif.ops.close)
ice              1240 sound/pci/ice1712/ice1724.c 		ice->spdif.ops.close(ice, substream);
ice              1247 sound/pci/ice1712/ice1724.c 	struct snd_ice1712 *ice = snd_pcm_substream_chip(substream);
ice              1251 sound/pci/ice1712/ice1724.c 	ice->capture_con_substream = substream;
ice              1252 sound/pci/ice1712/ice1724.c 	if (ice->force_rdma1) {
ice              1254 sound/pci/ice1712/ice1724.c 		set_rate_constraints(ice, substream);
ice              1264 sound/pci/ice1712/ice1724.c 	if (ice->spdif.ops.open)
ice              1265 sound/pci/ice1712/ice1724.c 		ice->spdif.ops.open(ice, substream);
ice              1271 sound/pci/ice1712/ice1724.c 	struct snd_ice1712 *ice = snd_pcm_substream_chip(substream);
ice              1274 sound/pci/ice1712/ice1724.c 		snd_vt1724_set_pro_rate(ice, ice->pro_rate_default, 0);
ice              1275 sound/pci/ice1712/ice1724.c 	ice->capture_con_substream = NULL;
ice              1276 sound/pci/ice1712/ice1724.c 	if (ice->spdif.ops.close)
ice              1277 sound/pci/ice1712/ice1724.c 		ice->spdif.ops.close(ice, substream);
ice              1305 sound/pci/ice1712/ice1724.c static int snd_vt1724_pcm_spdif(struct snd_ice1712 *ice, int device)
ice              1312 sound/pci/ice1712/ice1724.c 	if (ice->force_pdma4 ||
ice              1313 sound/pci/ice1712/ice1724.c 	    (ice->eeprom.data[ICE_EEP2_SPDIF] & VT1724_CFG_SPDIF_OUT_INT)) {
ice              1315 sound/pci/ice1712/ice1724.c 		ice->has_spdif = 1;
ice              1318 sound/pci/ice1712/ice1724.c 	if (ice->force_rdma1 ||
ice              1319 sound/pci/ice1712/ice1724.c 	    (ice->eeprom.data[ICE_EEP2_SPDIF] & VT1724_CFG_SPDIF_IN)) {
ice              1321 sound/pci/ice1712/ice1724.c 		ice->has_spdif = 1;
ice              1327 sound/pci/ice1712/ice1724.c 	if (ice->force_pdma4 || ice->force_rdma1)
ice              1331 sound/pci/ice1712/ice1724.c 	err = snd_pcm_new(ice->card, name, device, play, capt, &pcm);
ice              1342 sound/pci/ice1712/ice1724.c 	pcm->private_data = ice;
ice              1347 sound/pci/ice1712/ice1724.c 					      snd_dma_pci_data(ice->pci),
ice              1350 sound/pci/ice1712/ice1724.c 	ice->pcm = pcm;
ice              1383 sound/pci/ice1712/ice1724.c 	struct snd_ice1712 *ice = snd_pcm_substream_chip(substream);
ice              1386 sound/pci/ice1712/ice1724.c 	spin_lock_irq(&ice->reg_lock);
ice              1388 sound/pci/ice1712/ice1724.c 	if (inb(ICEMT1724(ice, BURST)) < val)
ice              1389 sound/pci/ice1712/ice1724.c 		outb(val, ICEMT1724(ice, BURST));
ice              1390 sound/pci/ice1712/ice1724.c 	spin_unlock_irq(&ice->reg_lock);
ice              1396 sound/pci/ice1712/ice1724.c 	struct snd_ice1712 *ice = snd_pcm_substream_chip(substream);
ice              1399 sound/pci/ice1712/ice1724.c 	mutex_lock(&ice->open_mutex);
ice              1401 sound/pci/ice1712/ice1724.c 	if (ice->pcm_reserved[substream->number]) {
ice              1402 sound/pci/ice1712/ice1724.c 		mutex_unlock(&ice->open_mutex);
ice              1405 sound/pci/ice1712/ice1724.c 	mutex_unlock(&ice->open_mutex);
ice              1407 sound/pci/ice1712/ice1724.c 	ice->playback_con_substream_ds[substream->number] = substream;
ice              1411 sound/pci/ice1712/ice1724.c 	set_rate_constraints(ice, substream);
ice              1417 sound/pci/ice1712/ice1724.c 	struct snd_ice1712 *ice = snd_pcm_substream_chip(substream);
ice              1420 sound/pci/ice1712/ice1724.c 		snd_vt1724_set_pro_rate(ice, ice->pro_rate_default, 0);
ice              1421 sound/pci/ice1712/ice1724.c 	ice->playback_con_substream_ds[substream->number] = NULL;
ice              1422 sound/pci/ice1712/ice1724.c 	ice->pcm_reserved[substream->number] = NULL;
ice              1439 sound/pci/ice1712/ice1724.c static int snd_vt1724_pcm_indep(struct snd_ice1712 *ice, int device)
ice              1445 sound/pci/ice1712/ice1724.c 	play = ice->num_total_dacs / 2 - 1;
ice              1449 sound/pci/ice1712/ice1724.c 	err = snd_pcm_new(ice->card, "ICE1724 Surrounds", device, play, 0, &pcm);
ice              1456 sound/pci/ice1712/ice1724.c 	pcm->private_data = ice;
ice              1461 sound/pci/ice1712/ice1724.c 					      snd_dma_pci_data(ice->pci),
ice              1464 sound/pci/ice1712/ice1724.c 	ice->pcm_ds = pcm;
ice              1474 sound/pci/ice1712/ice1724.c static int snd_vt1724_ac97_mixer(struct snd_ice1712 *ice)
ice              1478 sound/pci/ice1712/ice1724.c 	if (!(ice->eeprom.data[ICE_EEP2_ACLINK] & VT1724_CFG_PRO_I2S)) {
ice              1487 sound/pci/ice1712/ice1724.c 		outb(inb(ICEMT1724(ice, AC97_CMD)) | 0x80, ICEMT1724(ice, AC97_CMD));
ice              1489 sound/pci/ice1712/ice1724.c 		outb(inb(ICEMT1724(ice, AC97_CMD)) & ~0x80, ICEMT1724(ice, AC97_CMD));
ice              1491 sound/pci/ice1712/ice1724.c 		err = snd_ac97_bus(ice->card, 0, &ops, NULL, &pbus);
ice              1495 sound/pci/ice1712/ice1724.c 		ac97.private_data = ice;
ice              1496 sound/pci/ice1712/ice1724.c 		err = snd_ac97_mixer(pbus, &ac97, &ice->ac97);
ice              1498 sound/pci/ice1712/ice1724.c 			dev_warn(ice->card->dev,
ice              1504 sound/pci/ice1712/ice1724.c 	strcat(ice->card->mixername, "ICE1724 - multitrack");
ice              1512 sound/pci/ice1712/ice1724.c static inline unsigned int eeprom_triple(struct snd_ice1712 *ice, int idx)
ice              1514 sound/pci/ice1712/ice1724.c 	return (unsigned int)ice->eeprom.data[idx] | \
ice              1515 sound/pci/ice1712/ice1724.c 		((unsigned int)ice->eeprom.data[idx + 1] << 8) | \
ice              1516 sound/pci/ice1712/ice1724.c 		((unsigned int)ice->eeprom.data[idx + 2] << 16);
ice              1522 sound/pci/ice1712/ice1724.c 	struct snd_ice1712 *ice = entry->private_data;
ice              1525 sound/pci/ice1712/ice1724.c 	snd_iprintf(buffer, "%s\n\n", ice->card->longname);
ice              1528 sound/pci/ice1712/ice1724.c 	snd_iprintf(buffer, "  Subvendor        : 0x%x\n", ice->eeprom.subvendor);
ice              1529 sound/pci/ice1712/ice1724.c 	snd_iprintf(buffer, "  Size             : %i bytes\n", ice->eeprom.size);
ice              1530 sound/pci/ice1712/ice1724.c 	snd_iprintf(buffer, "  Version          : %i\n", ice->eeprom.version);
ice              1532 sound/pci/ice1712/ice1724.c 		    ice->eeprom.data[ICE_EEP2_SYSCONF]);
ice              1534 sound/pci/ice1712/ice1724.c 		    ice->eeprom.data[ICE_EEP2_ACLINK]);
ice              1536 sound/pci/ice1712/ice1724.c 		    ice->eeprom.data[ICE_EEP2_I2S]);
ice              1538 sound/pci/ice1712/ice1724.c 		    ice->eeprom.data[ICE_EEP2_SPDIF]);
ice              1540 sound/pci/ice1712/ice1724.c 		    ice->eeprom.gpiodir);
ice              1542 sound/pci/ice1712/ice1724.c 		    ice->eeprom.gpiomask);
ice              1544 sound/pci/ice1712/ice1724.c 		    ice->eeprom.gpiostate);
ice              1545 sound/pci/ice1712/ice1724.c 	for (idx = 0x12; idx < ice->eeprom.size; idx++)
ice              1547 sound/pci/ice1712/ice1724.c 			    idx, ice->eeprom.data[idx]);
ice              1552 sound/pci/ice1712/ice1724.c 		    (unsigned)inl(ICEMT1724(ice, ROUTE_PLAYBACK)));
ice              1555 sound/pci/ice1712/ice1724.c 			    idx, inb(ice->port+idx));
ice              1558 sound/pci/ice1712/ice1724.c 			    idx, inb(ice->profi_port+idx));
ice              1561 sound/pci/ice1712/ice1724.c static void snd_vt1724_proc_init(struct snd_ice1712 *ice)
ice              1563 sound/pci/ice1712/ice1724.c 	snd_card_ro_proc_new(ice->card, "ice1724", ice, snd_vt1724_proc_read);
ice              1581 sound/pci/ice1712/ice1724.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice              1583 sound/pci/ice1712/ice1724.c 	memcpy(ucontrol->value.bytes.data, &ice->eeprom, sizeof(ice->eeprom));
ice              1678 sound/pci/ice1712/ice1724.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice              1680 sound/pci/ice1712/ice1724.c 	val = inw(ICEMT1724(ice, SPDIF_CTRL));
ice              1688 sound/pci/ice1712/ice1724.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice              1692 sound/pci/ice1712/ice1724.c 	spin_lock_irq(&ice->reg_lock);
ice              1693 sound/pci/ice1712/ice1724.c 	old = inw(ICEMT1724(ice, SPDIF_CTRL));
ice              1695 sound/pci/ice1712/ice1724.c 		update_spdif_bits(ice, val);
ice              1696 sound/pci/ice1712/ice1724.c 	spin_unlock_irq(&ice->reg_lock);
ice              1755 sound/pci/ice1712/ice1724.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice              1756 sound/pci/ice1712/ice1724.c 	ucontrol->value.integer.value[0] = inb(ICEREG1724(ice, SPDIF_CFG)) &
ice              1764 sound/pci/ice1712/ice1724.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice              1767 sound/pci/ice1712/ice1724.c 	spin_lock_irq(&ice->reg_lock);
ice              1768 sound/pci/ice1712/ice1724.c 	old = val = inb(ICEREG1724(ice, SPDIF_CFG));
ice              1773 sound/pci/ice1712/ice1724.c 		outb(val, ICEREG1724(ice, SPDIF_CFG));
ice              1774 sound/pci/ice1712/ice1724.c 	spin_unlock_irq(&ice->reg_lock);
ice              1800 sound/pci/ice1712/ice1724.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice              1804 sound/pci/ice1712/ice1724.c 	snd_ice1712_save_gpio_status(ice);
ice              1806 sound/pci/ice1712/ice1724.c 		(snd_ice1712_gpio_read(ice) & (1 << shift) ? 1 : 0) ^ invert;
ice              1807 sound/pci/ice1712/ice1724.c 	snd_ice1712_restore_gpio_status(ice);
ice              1814 sound/pci/ice1712/ice1724.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice              1822 sound/pci/ice1712/ice1724.c 	snd_ice1712_save_gpio_status(ice);
ice              1823 sound/pci/ice1712/ice1724.c 	val = snd_ice1712_gpio_read(ice);
ice              1826 sound/pci/ice1712/ice1724.c 		snd_ice1712_gpio_write(ice, nval);
ice              1827 sound/pci/ice1712/ice1724.c 	snd_ice1712_restore_gpio_status(ice);
ice              1838 sound/pci/ice1712/ice1724.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice              1839 sound/pci/ice1712/ice1724.c 	int hw_rates_count = ice->hw_rates->count;
ice              1846 sound/pci/ice1712/ice1724.c 	if (ice->force_rdma1 ||
ice              1847 sound/pci/ice1712/ice1724.c 	    (ice->eeprom.data[ICE_EEP2_SPDIF] & VT1724_CFG_SPDIF_IN))
ice              1848 sound/pci/ice1712/ice1724.c 		uinfo->value.enumerated.items += ice->ext_clock_count;
ice              1855 sound/pci/ice1712/ice1724.c 				ice->ext_clock_names[
ice              1860 sound/pci/ice1712/ice1724.c 			ice->hw_rates->list[uinfo->value.enumerated.item]);
ice              1867 sound/pci/ice1712/ice1724.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice              1870 sound/pci/ice1712/ice1724.c 	spin_lock_irq(&ice->reg_lock);
ice              1871 sound/pci/ice1712/ice1724.c 	if (ice->is_spdif_master(ice)) {
ice              1872 sound/pci/ice1712/ice1724.c 		ucontrol->value.enumerated.item[0] = ice->hw_rates->count +
ice              1873 sound/pci/ice1712/ice1724.c 			ice->get_spdif_master_type(ice);
ice              1875 sound/pci/ice1712/ice1724.c 		rate = ice->get_rate(ice);
ice              1877 sound/pci/ice1712/ice1724.c 		for (i = 0; i < ice->hw_rates->count; i++) {
ice              1878 sound/pci/ice1712/ice1724.c 			if (ice->hw_rates->list[i] == rate) {
ice              1884 sound/pci/ice1712/ice1724.c 	spin_unlock_irq(&ice->reg_lock);
ice              1888 sound/pci/ice1712/ice1724.c static int stdclock_get_spdif_master_type(struct snd_ice1712 *ice)
ice              1895 sound/pci/ice1712/ice1724.c static int stdclock_set_spdif_clock(struct snd_ice1712 *ice, int type)
ice              1899 sound/pci/ice1712/ice1724.c 	oval = inb(ICEMT1724(ice, RATE));
ice              1900 sound/pci/ice1712/ice1724.c 	outb(oval | VT1724_SPDIF_MASTER, ICEMT1724(ice, RATE));
ice              1902 sound/pci/ice1712/ice1724.c 	i2s_oval = inb(ICEMT1724(ice, I2S_FORMAT));
ice              1903 sound/pci/ice1712/ice1724.c 	outb(i2s_oval & ~VT1724_MT_I2S_MCLK_128X, ICEMT1724(ice, I2S_FORMAT));
ice              1911 sound/pci/ice1712/ice1724.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice              1914 sound/pci/ice1712/ice1724.c 	unsigned int first_ext_clock = ice->hw_rates->count;
ice              1916 sound/pci/ice1712/ice1724.c 	if (item >  first_ext_clock + ice->ext_clock_count - 1)
ice              1920 sound/pci/ice1712/ice1724.c 	spin_lock_irq(&ice->reg_lock);
ice              1921 sound/pci/ice1712/ice1724.c 	if (ice->is_spdif_master(ice))
ice              1924 sound/pci/ice1712/ice1724.c 		old_rate = ice->get_rate(ice);
ice              1927 sound/pci/ice1712/ice1724.c 		ice->set_spdif_clock(ice, item - first_ext_clock);
ice              1931 sound/pci/ice1712/ice1724.c 		new_rate = ice->hw_rates->list[item];
ice              1932 sound/pci/ice1712/ice1724.c 		ice->pro_rate_default = new_rate;
ice              1933 sound/pci/ice1712/ice1724.c 		spin_unlock_irq(&ice->reg_lock);
ice              1934 sound/pci/ice1712/ice1724.c 		snd_vt1724_set_pro_rate(ice, ice->pro_rate_default, 1);
ice              1935 sound/pci/ice1712/ice1724.c 		spin_lock_irq(&ice->reg_lock);
ice              1937 sound/pci/ice1712/ice1724.c 	spin_unlock_irq(&ice->reg_lock);
ice              1943 sound/pci/ice1712/ice1724.c 		if (ice->gpio.set_pro_rate)
ice              1944 sound/pci/ice1712/ice1724.c 			ice->gpio.set_pro_rate(ice, 0);
ice              1945 sound/pci/ice1712/ice1724.c 		for (i = 0; i < ice->akm_codecs; i++) {
ice              1946 sound/pci/ice1712/ice1724.c 			if (ice->akm[i].ops.set_rate_val)
ice              1947 sound/pci/ice1712/ice1724.c 				ice->akm[i].ops.set_rate_val(&ice->akm[i], 0);
ice              1973 sound/pci/ice1712/ice1724.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice              1977 sound/pci/ice1712/ice1724.c 	spin_lock_irq(&ice->reg_lock);
ice              1980 sound/pci/ice1712/ice1724.c 	spin_unlock_irq(&ice->reg_lock);
ice              2004 sound/pci/ice1712/ice1724.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice              2008 sound/pci/ice1712/ice1724.c 	spin_lock_irq(&ice->reg_lock);
ice              2011 sound/pci/ice1712/ice1724.c 	spin_unlock_irq(&ice->reg_lock);
ice              2049 sound/pci/ice1712/ice1724.c int snd_ice1724_get_route_val(struct snd_ice1712 *ice, int shift)
ice              2057 sound/pci/ice1712/ice1724.c 	val = inl(ICEMT1724(ice, ROUTE_PLAYBACK));
ice              2068 sound/pci/ice1712/ice1724.c int snd_ice1724_put_route_val(struct snd_ice1712 *ice, unsigned int val,
ice              2082 sound/pci/ice1712/ice1724.c 	val = old_val = inl(ICEMT1724(ice, ROUTE_PLAYBACK));
ice              2087 sound/pci/ice1712/ice1724.c 		outl(val, ICEMT1724(ice, ROUTE_PLAYBACK));
ice              2094 sound/pci/ice1712/ice1724.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice              2097 sound/pci/ice1712/ice1724.c 		snd_ice1724_get_route_val(ice, analog_route_shift(idx));
ice              2104 sound/pci/ice1712/ice1724.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice              2106 sound/pci/ice1712/ice1724.c 	return snd_ice1724_put_route_val(ice,
ice              2114 sound/pci/ice1712/ice1724.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice              2117 sound/pci/ice1712/ice1724.c 		snd_ice1724_get_route_val(ice, digital_route_shift(idx));
ice              2124 sound/pci/ice1712/ice1724.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice              2126 sound/pci/ice1712/ice1724.c 	return snd_ice1724_put_route_val(ice,
ice              2163 sound/pci/ice1712/ice1724.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice              2166 sound/pci/ice1712/ice1724.c 	spin_lock_irq(&ice->reg_lock);
ice              2168 sound/pci/ice1712/ice1724.c 		outb(idx, ICEMT1724(ice, MONITOR_PEAKINDEX));
ice              2170 sound/pci/ice1712/ice1724.c 			inb(ICEMT1724(ice, MONITOR_PEAKDATA));
ice              2172 sound/pci/ice1712/ice1724.c 	spin_unlock_irq(&ice->reg_lock);
ice              2247 sound/pci/ice1712/ice1724.c static void wait_i2c_busy(struct snd_ice1712 *ice)
ice              2250 sound/pci/ice1712/ice1724.c 	while ((inb(ICEREG1724(ice, I2C_CTRL)) & VT1724_I2C_BUSY) && t--)
ice              2253 sound/pci/ice1712/ice1724.c 		dev_err(ice->card->dev, "i2c busy timeout\n");
ice              2256 sound/pci/ice1712/ice1724.c unsigned char snd_vt1724_read_i2c(struct snd_ice1712 *ice,
ice              2261 sound/pci/ice1712/ice1724.c 	mutex_lock(&ice->i2c_mutex);
ice              2262 sound/pci/ice1712/ice1724.c 	wait_i2c_busy(ice);
ice              2263 sound/pci/ice1712/ice1724.c 	outb(addr, ICEREG1724(ice, I2C_BYTE_ADDR));
ice              2264 sound/pci/ice1712/ice1724.c 	outb(dev & ~VT1724_I2C_WRITE, ICEREG1724(ice, I2C_DEV_ADDR));
ice              2265 sound/pci/ice1712/ice1724.c 	wait_i2c_busy(ice);
ice              2266 sound/pci/ice1712/ice1724.c 	val = inb(ICEREG1724(ice, I2C_DATA));
ice              2267 sound/pci/ice1712/ice1724.c 	mutex_unlock(&ice->i2c_mutex);
ice              2274 sound/pci/ice1712/ice1724.c void snd_vt1724_write_i2c(struct snd_ice1712 *ice,
ice              2277 sound/pci/ice1712/ice1724.c 	mutex_lock(&ice->i2c_mutex);
ice              2278 sound/pci/ice1712/ice1724.c 	wait_i2c_busy(ice);
ice              2282 sound/pci/ice1712/ice1724.c 	outb(addr, ICEREG1724(ice, I2C_BYTE_ADDR));
ice              2283 sound/pci/ice1712/ice1724.c 	outb(data, ICEREG1724(ice, I2C_DATA));
ice              2284 sound/pci/ice1712/ice1724.c 	outb(dev | VT1724_I2C_WRITE, ICEREG1724(ice, I2C_DEV_ADDR));
ice              2285 sound/pci/ice1712/ice1724.c 	wait_i2c_busy(ice);
ice              2286 sound/pci/ice1712/ice1724.c 	mutex_unlock(&ice->i2c_mutex);
ice              2289 sound/pci/ice1712/ice1724.c static int snd_vt1724_read_eeprom(struct snd_ice1712 *ice,
ice              2297 sound/pci/ice1712/ice1724.c 		ice->eeprom.subvendor = 0;
ice              2298 sound/pci/ice1712/ice1724.c 		if ((inb(ICEREG1724(ice, I2C_CTRL)) & VT1724_I2C_EEPROM) != 0)
ice              2299 sound/pci/ice1712/ice1724.c 			ice->eeprom.subvendor =
ice              2300 sound/pci/ice1712/ice1724.c 				(snd_vt1724_read_i2c(ice, dev, 0x00) << 0) |
ice              2301 sound/pci/ice1712/ice1724.c 				(snd_vt1724_read_i2c(ice, dev, 0x01) << 8) |
ice              2302 sound/pci/ice1712/ice1724.c 				(snd_vt1724_read_i2c(ice, dev, 0x02) << 16) |
ice              2303 sound/pci/ice1712/ice1724.c 				(snd_vt1724_read_i2c(ice, dev, 0x03) << 24);
ice              2304 sound/pci/ice1712/ice1724.c 		if (ice->eeprom.subvendor == 0 ||
ice              2305 sound/pci/ice1712/ice1724.c 		    ice->eeprom.subvendor == (unsigned int)-1) {
ice              2310 sound/pci/ice1712/ice1724.c 			pci_read_config_word(ice->pci, PCI_SUBSYSTEM_VENDOR_ID,
ice              2312 sound/pci/ice1712/ice1724.c 			pci_read_config_word(ice->pci, PCI_SUBSYSTEM_ID, &device);
ice              2313 sound/pci/ice1712/ice1724.c 			ice->eeprom.subvendor =
ice              2315 sound/pci/ice1712/ice1724.c 			if (ice->eeprom.subvendor == 0 ||
ice              2316 sound/pci/ice1712/ice1724.c 			    ice->eeprom.subvendor == (unsigned int)-1) {
ice              2317 sound/pci/ice1712/ice1724.c 				dev_err(ice->card->dev,
ice              2327 sound/pci/ice1712/ice1724.c 				dev_info(ice->card->dev,
ice              2330 sound/pci/ice1712/ice1724.c 				ice->eeprom.subvendor = c->subvendor;
ice              2331 sound/pci/ice1712/ice1724.c 			} else if (c->subvendor != ice->eeprom.subvendor)
ice              2333 sound/pci/ice1712/ice1724.c 			ice->card_info = c;
ice              2337 sound/pci/ice1712/ice1724.c 			dev_dbg(ice->card->dev, "using the defined eeprom..\n");
ice              2338 sound/pci/ice1712/ice1724.c 			ice->eeprom.version = 2;
ice              2339 sound/pci/ice1712/ice1724.c 			ice->eeprom.size = c->eeprom_size + 6;
ice              2340 sound/pci/ice1712/ice1724.c 			memcpy(ice->eeprom.data, c->eeprom_data, c->eeprom_size);
ice              2344 sound/pci/ice1712/ice1724.c 	dev_warn(ice->card->dev, "No matching model found for ID 0x%x\n",
ice              2345 sound/pci/ice1712/ice1724.c 	       ice->eeprom.subvendor);
ice              2348 sound/pci/ice1712/ice1724.c 	ice->pm_suspend_enabled = 1;
ice              2352 sound/pci/ice1712/ice1724.c 	ice->eeprom.size = snd_vt1724_read_i2c(ice, dev, 0x04);
ice              2353 sound/pci/ice1712/ice1724.c 	if (ice->eeprom.size < 6)
ice              2354 sound/pci/ice1712/ice1724.c 		ice->eeprom.size = 32;
ice              2355 sound/pci/ice1712/ice1724.c 	else if (ice->eeprom.size > 32) {
ice              2356 sound/pci/ice1712/ice1724.c 		dev_err(ice->card->dev, "Invalid EEPROM (size = %i)\n",
ice              2357 sound/pci/ice1712/ice1724.c 		       ice->eeprom.size);
ice              2360 sound/pci/ice1712/ice1724.c 	ice->eeprom.version = snd_vt1724_read_i2c(ice, dev, 0x05);
ice              2361 sound/pci/ice1712/ice1724.c 	if (ice->eeprom.version != 1 && ice->eeprom.version != 2)
ice              2362 sound/pci/ice1712/ice1724.c 		dev_warn(ice->card->dev, "Invalid EEPROM version %i\n",
ice              2363 sound/pci/ice1712/ice1724.c 		       ice->eeprom.version);
ice              2364 sound/pci/ice1712/ice1724.c 	size = ice->eeprom.size - 6;
ice              2366 sound/pci/ice1712/ice1724.c 		ice->eeprom.data[i] = snd_vt1724_read_i2c(ice, dev, i + 6);
ice              2369 sound/pci/ice1712/ice1724.c 	ice->eeprom.gpiomask = eeprom_triple(ice, ICE_EEP2_GPIO_MASK);
ice              2370 sound/pci/ice1712/ice1724.c 	ice->eeprom.gpiostate = eeprom_triple(ice, ICE_EEP2_GPIO_STATE);
ice              2371 sound/pci/ice1712/ice1724.c 	ice->eeprom.gpiodir = eeprom_triple(ice, ICE_EEP2_GPIO_DIR);
ice              2378 sound/pci/ice1712/ice1724.c static void snd_vt1724_chip_reset(struct snd_ice1712 *ice)
ice              2380 sound/pci/ice1712/ice1724.c 	outb(VT1724_RESET , ICEREG1724(ice, CONTROL));
ice              2381 sound/pci/ice1712/ice1724.c 	inb(ICEREG1724(ice, CONTROL)); /* pci posting flush */
ice              2383 sound/pci/ice1712/ice1724.c 	outb(0, ICEREG1724(ice, CONTROL));
ice              2384 sound/pci/ice1712/ice1724.c 	inb(ICEREG1724(ice, CONTROL)); /* pci posting flush */
ice              2388 sound/pci/ice1712/ice1724.c static int snd_vt1724_chip_init(struct snd_ice1712 *ice)
ice              2390 sound/pci/ice1712/ice1724.c 	outb(ice->eeprom.data[ICE_EEP2_SYSCONF], ICEREG1724(ice, SYS_CFG));
ice              2391 sound/pci/ice1712/ice1724.c 	outb(ice->eeprom.data[ICE_EEP2_ACLINK], ICEREG1724(ice, AC97_CFG));
ice              2392 sound/pci/ice1712/ice1724.c 	outb(ice->eeprom.data[ICE_EEP2_I2S], ICEREG1724(ice, I2S_FEATURES));
ice              2393 sound/pci/ice1712/ice1724.c 	outb(ice->eeprom.data[ICE_EEP2_SPDIF], ICEREG1724(ice, SPDIF_CFG));
ice              2395 sound/pci/ice1712/ice1724.c 	ice->gpio.write_mask = ice->eeprom.gpiomask;
ice              2396 sound/pci/ice1712/ice1724.c 	ice->gpio.direction = ice->eeprom.gpiodir;
ice              2397 sound/pci/ice1712/ice1724.c 	snd_vt1724_set_gpio_mask(ice, ice->eeprom.gpiomask);
ice              2398 sound/pci/ice1712/ice1724.c 	snd_vt1724_set_gpio_dir(ice, ice->eeprom.gpiodir);
ice              2399 sound/pci/ice1712/ice1724.c 	snd_vt1724_set_gpio_data(ice, ice->eeprom.gpiostate);
ice              2401 sound/pci/ice1712/ice1724.c 	outb(0, ICEREG1724(ice, POWERDOWN));
ice              2404 sound/pci/ice1712/ice1724.c 	outb(VT1724_IRQ_MPU_RX | VT1724_IRQ_MPU_TX , ICEREG1724(ice, IRQMASK));
ice              2409 sound/pci/ice1712/ice1724.c 	outb(VT1724_MULTI_FIFO_ERR, ICEMT1724(ice, DMA_INT_MASK));
ice              2414 sound/pci/ice1712/ice1724.c static int snd_vt1724_spdif_build_controls(struct snd_ice1712 *ice)
ice              2419 sound/pci/ice1712/ice1724.c 	if (snd_BUG_ON(!ice->pcm))
ice              2422 sound/pci/ice1712/ice1724.c 	if (!ice->own_routing) {
ice              2423 sound/pci/ice1712/ice1724.c 		err = snd_ctl_add(ice->card,
ice              2424 sound/pci/ice1712/ice1724.c 			snd_ctl_new1(&snd_vt1724_mixer_pro_spdif_route, ice));
ice              2429 sound/pci/ice1712/ice1724.c 	err = snd_ctl_add(ice->card, snd_ctl_new1(&snd_vt1724_spdif_switch, ice));
ice              2433 sound/pci/ice1712/ice1724.c 	err = snd_ctl_add(ice->card, kctl = snd_ctl_new1(&snd_vt1724_spdif_default, ice));
ice              2436 sound/pci/ice1712/ice1724.c 	kctl->id.device = ice->pcm->device;
ice              2437 sound/pci/ice1712/ice1724.c 	err = snd_ctl_add(ice->card, kctl = snd_ctl_new1(&snd_vt1724_spdif_maskc, ice));
ice              2440 sound/pci/ice1712/ice1724.c 	kctl->id.device = ice->pcm->device;
ice              2441 sound/pci/ice1712/ice1724.c 	err = snd_ctl_add(ice->card, kctl = snd_ctl_new1(&snd_vt1724_spdif_maskp, ice));
ice              2444 sound/pci/ice1712/ice1724.c 	kctl->id.device = ice->pcm->device;
ice              2446 sound/pci/ice1712/ice1724.c 	err = snd_ctl_add(ice->card, kctl = snd_ctl_new1(&snd_vt1724_spdif_stream, ice));
ice              2449 sound/pci/ice1712/ice1724.c 	kctl->id.device = ice->pcm->device;
ice              2450 sound/pci/ice1712/ice1724.c 	ice->spdif.stream_ctl = kctl;
ice              2456 sound/pci/ice1712/ice1724.c static int snd_vt1724_build_controls(struct snd_ice1712 *ice)
ice              2460 sound/pci/ice1712/ice1724.c 	err = snd_ctl_add(ice->card, snd_ctl_new1(&snd_vt1724_eeprom, ice));
ice              2463 sound/pci/ice1712/ice1724.c 	err = snd_ctl_add(ice->card, snd_ctl_new1(&snd_vt1724_pro_internal_clock, ice));
ice              2467 sound/pci/ice1712/ice1724.c 	err = snd_ctl_add(ice->card, snd_ctl_new1(&snd_vt1724_pro_rate_locking, ice));
ice              2470 sound/pci/ice1712/ice1724.c 	err = snd_ctl_add(ice->card, snd_ctl_new1(&snd_vt1724_pro_rate_reset, ice));
ice              2474 sound/pci/ice1712/ice1724.c 	if (!ice->own_routing && ice->num_total_dacs > 0) {
ice              2476 sound/pci/ice1712/ice1724.c 		tmp.count = ice->num_total_dacs;
ice              2477 sound/pci/ice1712/ice1724.c 		if (ice->vt1720 && tmp.count > 2)
ice              2479 sound/pci/ice1712/ice1724.c 		err = snd_ctl_add(ice->card, snd_ctl_new1(&tmp, ice));
ice              2484 sound/pci/ice1712/ice1724.c 	return snd_ctl_add(ice->card,
ice              2485 sound/pci/ice1712/ice1724.c 			   snd_ctl_new1(&snd_vt1724_mixer_pro_peak, ice));
ice              2488 sound/pci/ice1712/ice1724.c static int snd_vt1724_free(struct snd_ice1712 *ice)
ice              2490 sound/pci/ice1712/ice1724.c 	if (!ice->port)
ice              2493 sound/pci/ice1712/ice1724.c 	outb(0xff, ICEMT1724(ice, DMA_INT_MASK));
ice              2494 sound/pci/ice1712/ice1724.c 	outb(0xff, ICEREG1724(ice, IRQMASK));
ice              2497 sound/pci/ice1712/ice1724.c 	if (ice->irq >= 0)
ice              2498 sound/pci/ice1712/ice1724.c 		free_irq(ice->irq, ice);
ice              2499 sound/pci/ice1712/ice1724.c 	pci_release_regions(ice->pci);
ice              2500 sound/pci/ice1712/ice1724.c 	snd_ice1712_akm4xxx_free(ice);
ice              2501 sound/pci/ice1712/ice1724.c 	pci_disable_device(ice->pci);
ice              2502 sound/pci/ice1712/ice1724.c 	kfree(ice->spec);
ice              2503 sound/pci/ice1712/ice1724.c 	kfree(ice);
ice              2509 sound/pci/ice1712/ice1724.c 	struct snd_ice1712 *ice = device->device_data;
ice              2510 sound/pci/ice1712/ice1724.c 	return snd_vt1724_free(ice);
ice              2518 sound/pci/ice1712/ice1724.c 	struct snd_ice1712 *ice;
ice              2531 sound/pci/ice1712/ice1724.c 	ice = kzalloc(sizeof(*ice), GFP_KERNEL);
ice              2532 sound/pci/ice1712/ice1724.c 	if (ice == NULL) {
ice              2536 sound/pci/ice1712/ice1724.c 	ice->vt1724 = 1;
ice              2537 sound/pci/ice1712/ice1724.c 	spin_lock_init(&ice->reg_lock);
ice              2538 sound/pci/ice1712/ice1724.c 	mutex_init(&ice->gpio_mutex);
ice              2539 sound/pci/ice1712/ice1724.c 	mutex_init(&ice->open_mutex);
ice              2540 sound/pci/ice1712/ice1724.c 	mutex_init(&ice->i2c_mutex);
ice              2541 sound/pci/ice1712/ice1724.c 	ice->gpio.set_mask = snd_vt1724_set_gpio_mask;
ice              2542 sound/pci/ice1712/ice1724.c 	ice->gpio.get_mask = snd_vt1724_get_gpio_mask;
ice              2543 sound/pci/ice1712/ice1724.c 	ice->gpio.set_dir = snd_vt1724_set_gpio_dir;
ice              2544 sound/pci/ice1712/ice1724.c 	ice->gpio.get_dir = snd_vt1724_get_gpio_dir;
ice              2545 sound/pci/ice1712/ice1724.c 	ice->gpio.set_data = snd_vt1724_set_gpio_data;
ice              2546 sound/pci/ice1712/ice1724.c 	ice->gpio.get_data = snd_vt1724_get_gpio_data;
ice              2547 sound/pci/ice1712/ice1724.c 	ice->card = card;
ice              2548 sound/pci/ice1712/ice1724.c 	ice->pci = pci;
ice              2549 sound/pci/ice1712/ice1724.c 	ice->irq = -1;
ice              2551 sound/pci/ice1712/ice1724.c 	snd_vt1724_proc_init(ice);
ice              2554 sound/pci/ice1712/ice1724.c 	card->private_data = ice;
ice              2558 sound/pci/ice1712/ice1724.c 		kfree(ice);
ice              2562 sound/pci/ice1712/ice1724.c 	ice->port = pci_resource_start(pci, 0);
ice              2563 sound/pci/ice1712/ice1724.c 	ice->profi_port = pci_resource_start(pci, 1);
ice              2566 sound/pci/ice1712/ice1724.c 			IRQF_SHARED, KBUILD_MODNAME, ice)) {
ice              2568 sound/pci/ice1712/ice1724.c 		snd_vt1724_free(ice);
ice              2572 sound/pci/ice1712/ice1724.c 	ice->irq = pci->irq;
ice              2574 sound/pci/ice1712/ice1724.c 	snd_vt1724_chip_reset(ice);
ice              2575 sound/pci/ice1712/ice1724.c 	if (snd_vt1724_read_eeprom(ice, modelname) < 0) {
ice              2576 sound/pci/ice1712/ice1724.c 		snd_vt1724_free(ice);
ice              2579 sound/pci/ice1712/ice1724.c 	if (snd_vt1724_chip_init(ice) < 0) {
ice              2580 sound/pci/ice1712/ice1724.c 		snd_vt1724_free(ice);
ice              2584 sound/pci/ice1712/ice1724.c 	err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, ice, &ops);
ice              2586 sound/pci/ice1712/ice1724.c 		snd_vt1724_free(ice);
ice              2590 sound/pci/ice1712/ice1724.c 	*r_ice1712 = ice;
ice              2606 sound/pci/ice1712/ice1724.c 	struct snd_ice1712 *ice;
ice              2625 sound/pci/ice1712/ice1724.c 	err = snd_vt1724_create(card, pci, model[dev], &ice);
ice              2632 sound/pci/ice1712/ice1724.c 	ice->ext_clock_count = 0;
ice              2638 sound/pci/ice1712/ice1724.c 			    (c->subvendor == ice->eeprom.subvendor)) {
ice              2643 sound/pci/ice1712/ice1724.c 					err = c->chip_init(ice);
ice              2663 sound/pci/ice1712/ice1724.c 	ice->pro_rate_default = PRO_RATE_DEFAULT;
ice              2664 sound/pci/ice1712/ice1724.c 	if (!ice->is_spdif_master)
ice              2665 sound/pci/ice1712/ice1724.c 		ice->is_spdif_master = stdclock_is_spdif_master;
ice              2666 sound/pci/ice1712/ice1724.c 	if (!ice->get_rate)
ice              2667 sound/pci/ice1712/ice1724.c 		ice->get_rate = stdclock_get_rate;
ice              2668 sound/pci/ice1712/ice1724.c 	if (!ice->set_rate)
ice              2669 sound/pci/ice1712/ice1724.c 		ice->set_rate = stdclock_set_rate;
ice              2670 sound/pci/ice1712/ice1724.c 	if (!ice->set_mclk)
ice              2671 sound/pci/ice1712/ice1724.c 		ice->set_mclk = stdclock_set_mclk;
ice              2672 sound/pci/ice1712/ice1724.c 	if (!ice->set_spdif_clock)
ice              2673 sound/pci/ice1712/ice1724.c 		ice->set_spdif_clock = stdclock_set_spdif_clock;
ice              2674 sound/pci/ice1712/ice1724.c 	if (!ice->get_spdif_master_type)
ice              2675 sound/pci/ice1712/ice1724.c 		ice->get_spdif_master_type = stdclock_get_spdif_master_type;
ice              2676 sound/pci/ice1712/ice1724.c 	if (!ice->ext_clock_names)
ice              2677 sound/pci/ice1712/ice1724.c 		ice->ext_clock_names = ext_clock_names;
ice              2678 sound/pci/ice1712/ice1724.c 	if (!ice->ext_clock_count)
ice              2679 sound/pci/ice1712/ice1724.c 		ice->ext_clock_count = ARRAY_SIZE(ext_clock_names);
ice              2681 sound/pci/ice1712/ice1724.c 	if (!ice->hw_rates)
ice              2682 sound/pci/ice1712/ice1724.c 		set_std_hw_rates(ice);
ice              2684 sound/pci/ice1712/ice1724.c 	err = snd_vt1724_pcm_profi(ice, pcm_dev++);
ice              2690 sound/pci/ice1712/ice1724.c 	err = snd_vt1724_pcm_spdif(ice, pcm_dev++);
ice              2696 sound/pci/ice1712/ice1724.c 	err = snd_vt1724_pcm_indep(ice, pcm_dev++);
ice              2702 sound/pci/ice1712/ice1724.c 	err = snd_vt1724_ac97_mixer(ice);
ice              2708 sound/pci/ice1712/ice1724.c 	err = snd_vt1724_build_controls(ice);
ice              2714 sound/pci/ice1712/ice1724.c 	if (ice->pcm && ice->has_spdif) { /* has SPDIF I/O */
ice              2715 sound/pci/ice1712/ice1724.c 		err = snd_vt1724_spdif_build_controls(ice);
ice              2723 sound/pci/ice1712/ice1724.c 		err = c->build_controls(ice);
ice              2731 sound/pci/ice1712/ice1724.c 		if (ice->eeprom.data[ICE_EEP2_SYSCONF] & VT1724_CFG_MPU401) {
ice              2739 sound/pci/ice1712/ice1724.c 			ice->rmidi[0] = rmidi;
ice              2740 sound/pci/ice1712/ice1724.c 			rmidi->private_data = ice;
ice              2752 sound/pci/ice1712/ice1724.c 			     ICEREG1724(ice, MPU_FIFO_WM));
ice              2753 sound/pci/ice1712/ice1724.c 			outb(0x1, ICEREG1724(ice, MPU_FIFO_WM));
ice              2755 sound/pci/ice1712/ice1724.c 			outb(VT1724_MPU_UART, ICEREG1724(ice, MPU_CTRL));
ice              2760 sound/pci/ice1712/ice1724.c 		card->shortname, ice->port, ice->irq);
ice              2775 sound/pci/ice1712/ice1724.c 	struct snd_ice1712 *ice = card->private_data;
ice              2777 sound/pci/ice1712/ice1724.c 	if (ice->card_info && ice->card_info->chip_exit)
ice              2778 sound/pci/ice1712/ice1724.c 		ice->card_info->chip_exit(ice);
ice              2786 sound/pci/ice1712/ice1724.c 	struct snd_ice1712 *ice = card->private_data;
ice              2788 sound/pci/ice1712/ice1724.c 	if (!ice->pm_suspend_enabled)
ice              2793 sound/pci/ice1712/ice1724.c 	snd_ac97_suspend(ice->ac97);
ice              2795 sound/pci/ice1712/ice1724.c 	spin_lock_irq(&ice->reg_lock);
ice              2796 sound/pci/ice1712/ice1724.c 	ice->pm_saved_is_spdif_master = ice->is_spdif_master(ice);
ice              2797 sound/pci/ice1712/ice1724.c 	ice->pm_saved_spdif_ctrl = inw(ICEMT1724(ice, SPDIF_CTRL));
ice              2798 sound/pci/ice1712/ice1724.c 	ice->pm_saved_spdif_cfg = inb(ICEREG1724(ice, SPDIF_CFG));
ice              2799 sound/pci/ice1712/ice1724.c 	ice->pm_saved_route = inl(ICEMT1724(ice, ROUTE_PLAYBACK));
ice              2800 sound/pci/ice1712/ice1724.c 	spin_unlock_irq(&ice->reg_lock);
ice              2802 sound/pci/ice1712/ice1724.c 	if (ice->pm_suspend)
ice              2803 sound/pci/ice1712/ice1724.c 		ice->pm_suspend(ice);
ice              2810 sound/pci/ice1712/ice1724.c 	struct snd_ice1712 *ice = card->private_data;
ice              2812 sound/pci/ice1712/ice1724.c 	if (!ice->pm_suspend_enabled)
ice              2815 sound/pci/ice1712/ice1724.c 	snd_vt1724_chip_reset(ice);
ice              2817 sound/pci/ice1712/ice1724.c 	if (snd_vt1724_chip_init(ice) < 0) {
ice              2822 sound/pci/ice1712/ice1724.c 	if (ice->pm_resume)
ice              2823 sound/pci/ice1712/ice1724.c 		ice->pm_resume(ice);
ice              2825 sound/pci/ice1712/ice1724.c 	if (ice->pm_saved_is_spdif_master) {
ice              2827 sound/pci/ice1712/ice1724.c 		ice->set_spdif_clock(ice, 0);
ice              2831 sound/pci/ice1712/ice1724.c 		if (ice->cur_rate)
ice              2832 sound/pci/ice1712/ice1724.c 			rate = ice->cur_rate;
ice              2834 sound/pci/ice1712/ice1724.c 			rate = ice->pro_rate_default;
ice              2835 sound/pci/ice1712/ice1724.c 		snd_vt1724_set_pro_rate(ice, rate, 1);
ice              2838 sound/pci/ice1712/ice1724.c 	update_spdif_bits(ice, ice->pm_saved_spdif_ctrl);
ice              2840 sound/pci/ice1712/ice1724.c 	outb(ice->pm_saved_spdif_cfg, ICEREG1724(ice, SPDIF_CFG));
ice              2841 sound/pci/ice1712/ice1724.c 	outl(ice->pm_saved_route, ICEMT1724(ice, ROUTE_PLAYBACK));
ice              2843 sound/pci/ice1712/ice1724.c 	snd_ac97_resume(ice->ac97);
ice               166 sound/pci/ice1712/juli.c static void juli_spdif_in_open(struct snd_ice1712 *ice,
ice               169 sound/pci/ice1712/juli.c 	struct juli_spec *spec = ice->spec;
ice               174 sound/pci/ice1712/juli.c 			!ice->is_spdif_master(ice))
ice               198 sound/pci/ice1712/juli.c 	struct snd_ice1712 *ice = ak->private_data[0];
ice               202 sound/pci/ice1712/juli.c 	snd_vt1724_write_i2c(ice, AK4358_ADDR, addr, data);
ice               212 sound/pci/ice1712/juli.c 	struct snd_ice1712 *ice = ak->private_data[0];
ice               213 sound/pci/ice1712/juli.c 	struct juli_spec *spec = ice->spec;
ice               231 sound/pci/ice1712/juli.c 	old_gpio = ice->gpio.get_data(ice);
ice               235 sound/pci/ice1712/juli.c 	ice->gpio.set_data(ice, new_gpio);
ice               238 sound/pci/ice1712/juli.c 	old = inb(ICEMT1724(ice, AC97_CMD));
ice               239 sound/pci/ice1712/juli.c 	outb(old | VT1724_AC97_COLD, ICEMT1724(ice, AC97_CMD));
ice               241 sound/pci/ice1712/juli.c 	outb(old & ~VT1724_AC97_COLD, ICEMT1724(ice, AC97_CMD));
ice               292 sound/pci/ice1712/juli.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               294 sound/pci/ice1712/juli.c 	val = ice->gpio.get_data(ice) & (unsigned int) kcontrol->private_value;
ice               307 sound/pci/ice1712/juli.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               309 sound/pci/ice1712/juli.c 	old_gpio = ice->gpio.get_data(ice);
ice               316 sound/pci/ice1712/juli.c 			snd_akm4xxx_write(ice->akm, 0, 0x01, 0x01);
ice               327 sound/pci/ice1712/juli.c 			snd_akm4xxx_write(ice->akm, 0, 0x01, 0x03);
ice               339 sound/pci/ice1712/juli.c 		ice->gpio.set_data(ice, new_gpio);
ice               435 sound/pci/ice1712/juli.c static int juli_add_controls(struct snd_ice1712 *ice)
ice               437 sound/pci/ice1712/juli.c 	struct juli_spec *spec = ice->spec;
ice               442 sound/pci/ice1712/juli.c 	err = snd_ice1712_akm4xxx_build_controls(ice);
ice               447 sound/pci/ice1712/juli.c 		err = snd_ctl_add(ice->card,
ice               448 sound/pci/ice1712/juli.c 				snd_ctl_new1(&juli_mute_controls[i], ice));
ice               457 sound/pci/ice1712/juli.c 	add_slaves(ice->card, vmaster, slave_vols);
ice               458 sound/pci/ice1712/juli.c 	err = snd_ctl_add(ice->card, vmaster);
ice               464 sound/pci/ice1712/juli.c 			ice->pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream);
ice               472 sound/pci/ice1712/juli.c static int juli_resume(struct snd_ice1712 *ice)
ice               474 sound/pci/ice1712/juli.c 	struct snd_akm4xxx *ak = ice->akm;
ice               475 sound/pci/ice1712/juli.c 	struct juli_spec *spec = ice->spec;
ice               483 sound/pci/ice1712/juli.c static int juli_suspend(struct snd_ice1712 *ice)
ice               485 sound/pci/ice1712/juli.c 	struct snd_akm4xxx *ak = ice->akm;
ice               486 sound/pci/ice1712/juli.c 	struct juli_spec *spec = ice->spec;
ice               498 sound/pci/ice1712/juli.c static inline int juli_is_spdif_master(struct snd_ice1712 *ice)
ice               500 sound/pci/ice1712/juli.c 	return (ice->gpio.get_data(ice) & GPIO_INTERNAL_CLOCK) ? 0 : 1;
ice               503 sound/pci/ice1712/juli.c static unsigned int juli_get_rate(struct snd_ice1712 *ice)
ice               508 sound/pci/ice1712/juli.c 	result =  ice->gpio.get_data(ice) & GPIO_RATE_MASK;
ice               516 sound/pci/ice1712/juli.c static void juli_set_rate(struct snd_ice1712 *ice, unsigned int rate)
ice               521 sound/pci/ice1712/juli.c 	old = ice->gpio.get_data(ice);
ice               527 sound/pci/ice1712/juli.c 	ice->gpio.set_data(ice, new);
ice               529 sound/pci/ice1712/juli.c 	val = inb(ICEMT1724(ice, RATE));
ice               530 sound/pci/ice1712/juli.c 	outb(val | VT1724_SPDIF_MASTER, ICEMT1724(ice, RATE));
ice               533 sound/pci/ice1712/juli.c static inline unsigned char juli_set_mclk(struct snd_ice1712 *ice,
ice               541 sound/pci/ice1712/juli.c static int juli_set_spdif_clock(struct snd_ice1712 *ice, int type)
ice               544 sound/pci/ice1712/juli.c 	old = ice->gpio.get_data(ice);
ice               546 sound/pci/ice1712/juli.c 	ice->gpio.set_data(ice, (old & ~GPIO_RATE_MASK) | GPIO_MULTI_1X |
ice               555 sound/pci/ice1712/juli.c 	struct snd_ice1712 *ice = ak4114->change_callback_private;
ice               557 sound/pci/ice1712/juli.c 	if (ice->is_spdif_master(ice) && c1) {
ice               562 sound/pci/ice1712/juli.c 		juli_akm_set_rate_val(ice->akm, rate);
ice               566 sound/pci/ice1712/juli.c static int juli_init(struct snd_ice1712 *ice)
ice               588 sound/pci/ice1712/juli.c 	ice->spec = spec;
ice               590 sound/pci/ice1712/juli.c 	err = snd_ak4114_create(ice->card,
ice               594 sound/pci/ice1712/juli.c 				ice, &spec->ak4114);
ice               599 sound/pci/ice1712/juli.c 	spec->ak4114->change_callback_private = ice;
ice               609 sound/pci/ice1712/juli.c 	spec->analog = (ice->gpio.get_data(ice) & GPIO_ANALOG_PRESENT) ? 0 : 1;
ice               615 sound/pci/ice1712/juli.c 		dev_info(ice->card->dev, "juli@: analog I/O detected\n");
ice               616 sound/pci/ice1712/juli.c 		ice->num_total_dacs = 2;
ice               617 sound/pci/ice1712/juli.c 		ice->num_total_adcs = 2;
ice               619 sound/pci/ice1712/juli.c 		ice->akm = kzalloc(sizeof(struct snd_akm4xxx), GFP_KERNEL);
ice               620 sound/pci/ice1712/juli.c 		ak = ice->akm;
ice               623 sound/pci/ice1712/juli.c 		ice->akm_codecs = 1;
ice               624 sound/pci/ice1712/juli.c 		err = snd_ice1712_akm4xxx_init(ak, &akm_juli_dac, NULL, ice);
ice               630 sound/pci/ice1712/juli.c 	ice->hw_rates = &juli_rates_info;
ice               631 sound/pci/ice1712/juli.c 	ice->is_spdif_master = juli_is_spdif_master;
ice               632 sound/pci/ice1712/juli.c 	ice->get_rate = juli_get_rate;
ice               633 sound/pci/ice1712/juli.c 	ice->set_rate = juli_set_rate;
ice               634 sound/pci/ice1712/juli.c 	ice->set_mclk = juli_set_mclk;
ice               635 sound/pci/ice1712/juli.c 	ice->set_spdif_clock = juli_set_spdif_clock;
ice               637 sound/pci/ice1712/juli.c 	ice->spdif.ops.open = juli_spdif_in_open;
ice               640 sound/pci/ice1712/juli.c 	ice->pm_resume = juli_resume;
ice               641 sound/pci/ice1712/juli.c 	ice->pm_suspend = juli_suspend;
ice               642 sound/pci/ice1712/juli.c 	ice->pm_suspend_enabled = 1;
ice                69 sound/pci/ice1712/maya44.c 	struct snd_ice1712 *ice;
ice                76 sound/pci/ice1712/maya44.c static void wm8776_write(struct snd_ice1712 *ice, struct snd_wm8776 *wm,
ice                83 sound/pci/ice1712/maya44.c 	snd_vt1724_write_i2c(ice, wm->addr,
ice                92 sound/pci/ice1712/maya44.c static int wm8776_write_bits(struct snd_ice1712 *ice, struct snd_wm8776 *wm,
ice                98 sound/pci/ice1712/maya44.c 		wm8776_write(ice, wm, reg, val);
ice               208 sound/pci/ice1712/maya44.c 		changed |= wm8776_write_bits(chip->ice, wm, vol->regs[ch],
ice               211 sound/pci/ice1712/maya44.c 			wm8776_write_bits(chip->ice, wm, WM8776_REG_ADC_MUX,
ice               260 sound/pci/ice1712/maya44.c 	changed = wm8776_write_bits(chip->ice, wm,
ice               283 sound/pci/ice1712/maya44.c static int maya_set_gpio_bits(struct snd_ice1712 *ice, unsigned int mask,
ice               287 sound/pci/ice1712/maya44.c 	data = snd_ice1712_gpio_read(ice);
ice               290 sound/pci/ice1712/maya44.c 	snd_ice1712_gpio_write(ice, (data & ~mask) | bits);
ice               303 sound/pci/ice1712/maya44.c 	val = (snd_ice1712_gpio_read(chip->ice) >> shift) & 1;
ice               324 sound/pci/ice1712/maya44.c 	changed = maya_set_gpio_bits(chip->ice, mask, val);
ice               339 sound/pci/ice1712/maya44.c 	wm8776_write_bits(chip->ice, &chip->wm[idx], WM8776_REG_ADC_MUX,
ice               357 sound/pci/ice1712/maya44.c 	if (snd_ice1712_gpio_read(chip->ice) & (1 << GPIO_MIC_RELAY))
ice               373 sound/pci/ice1712/maya44.c 	changed = maya_set_gpio_bits(chip->ice, 1 << GPIO_MIC_RELAY,
ice               408 sound/pci/ice1712/maya44.c 		snd_ice1724_get_route_val(chip->ice, maya_pb_route_shift(idx));
ice               417 sound/pci/ice1712/maya44.c 	return snd_ice1724_put_route_val(chip->ice,
ice               517 sound/pci/ice1712/maya44.c static int maya44_add_controls(struct snd_ice1712 *ice)
ice               522 sound/pci/ice1712/maya44.c 		err = snd_ctl_add(ice->card, snd_ctl_new1(&maya_controls[i],
ice               523 sound/pci/ice1712/maya44.c 							  ice->spec));
ice               534 sound/pci/ice1712/maya44.c static void wm8776_init(struct snd_ice1712 *ice,
ice               575 sound/pci/ice1712/maya44.c 		wm8776_write(ice, wm, reg, data);
ice               587 sound/pci/ice1712/maya44.c static void set_rate(struct snd_ice1712 *ice, unsigned int rate)
ice               589 sound/pci/ice1712/maya44.c 	struct snd_maya44 *chip = ice->spec;
ice               640 sound/pci/ice1712/maya44.c 		wm8776_write_bits(ice, &chip->wm[i],
ice               672 sound/pci/ice1712/maya44.c static int maya44_init(struct snd_ice1712 *ice)
ice               681 sound/pci/ice1712/maya44.c 	chip->ice = ice;
ice               682 sound/pci/ice1712/maya44.c 	ice->spec = chip;
ice               685 sound/pci/ice1712/maya44.c 	ice->num_total_dacs = 4;
ice               686 sound/pci/ice1712/maya44.c 	ice->num_total_adcs = 4;
ice               687 sound/pci/ice1712/maya44.c 	ice->akm_codecs = 0;
ice               690 sound/pci/ice1712/maya44.c 		wm8776_init(ice, &chip->wm[i], wm8776_addr[i]);
ice               695 sound/pci/ice1712/maya44.c 	ice->hw_rates = &dac_rates;
ice               698 sound/pci/ice1712/maya44.c 	ice->gpio.set_pro_rate = set_rate;
ice               701 sound/pci/ice1712/maya44.c 	ice->force_rdma1 = 1;
ice               704 sound/pci/ice1712/maya44.c 	ice->own_routing = 1;
ice               109 sound/pci/ice1712/phase.c static int phase22_init(struct snd_ice1712 *ice)
ice               115 sound/pci/ice1712/phase.c 	switch (ice->eeprom.subvendor) {
ice               118 sound/pci/ice1712/phase.c 		ice->num_total_dacs = 2;
ice               119 sound/pci/ice1712/phase.c 		ice->num_total_adcs = 2;
ice               120 sound/pci/ice1712/phase.c 		ice->vt1720 = 1; /* Envy24HT-S have 16 bit wide GPIO */
ice               128 sound/pci/ice1712/phase.c 	ice->akm = kzalloc(sizeof(struct snd_akm4xxx), GFP_KERNEL);
ice               129 sound/pci/ice1712/phase.c 	ak = ice->akm;
ice               132 sound/pci/ice1712/phase.c 	ice->akm_codecs = 1;
ice               133 sound/pci/ice1712/phase.c 	switch (ice->eeprom.subvendor) {
ice               137 sound/pci/ice1712/phase.c 						&akm_phase22_priv, ice);
ice               146 sound/pci/ice1712/phase.c static int phase22_add_controls(struct snd_ice1712 *ice)
ice               150 sound/pci/ice1712/phase.c 	switch (ice->eeprom.subvendor) {
ice               153 sound/pci/ice1712/phase.c 		err = snd_ice1712_akm4xxx_build_controls(ice);
ice               197 sound/pci/ice1712/phase.c static void phase28_spi_write(struct snd_ice1712 *ice, unsigned int cs,
ice               203 sound/pci/ice1712/phase.c 	tmp = snd_ice1712_gpio_read(ice);
ice               205 sound/pci/ice1712/phase.c 	snd_ice1712_gpio_set_mask(ice, ~(PHASE28_WM_RW|PHASE28_SPI_MOSI|
ice               209 sound/pci/ice1712/phase.c 	snd_ice1712_gpio_write(ice, tmp);
ice               214 sound/pci/ice1712/phase.c 		snd_ice1712_gpio_write(ice, tmp);
ice               220 sound/pci/ice1712/phase.c 		snd_ice1712_gpio_write(ice, tmp);
ice               223 sound/pci/ice1712/phase.c 		snd_ice1712_gpio_write(ice, tmp);
ice               229 sound/pci/ice1712/phase.c 	snd_ice1712_gpio_write(ice, tmp);
ice               232 sound/pci/ice1712/phase.c 	snd_ice1712_gpio_write(ice, tmp);
ice               239 sound/pci/ice1712/phase.c static unsigned short wm_get(struct snd_ice1712 *ice, int reg)
ice               242 sound/pci/ice1712/phase.c 	return ((unsigned short)ice->akm[0].images[reg] << 8) |
ice               243 sound/pci/ice1712/phase.c 		ice->akm[0].images[reg + 1];
ice               249 sound/pci/ice1712/phase.c static void wm_put_nocache(struct snd_ice1712 *ice, int reg, unsigned short val)
ice               251 sound/pci/ice1712/phase.c 	phase28_spi_write(ice, PHASE28_WM_CS, (reg << 9) | (val & 0x1ff), 16);
ice               257 sound/pci/ice1712/phase.c static void wm_put(struct snd_ice1712 *ice, int reg, unsigned short val)
ice               259 sound/pci/ice1712/phase.c 	wm_put_nocache(ice, reg, val);
ice               261 sound/pci/ice1712/phase.c 	ice->akm[0].images[reg] = val >> 8;
ice               262 sound/pci/ice1712/phase.c 	ice->akm[0].images[reg + 1] = val;
ice               265 sound/pci/ice1712/phase.c static void wm_set_vol(struct snd_ice1712 *ice, unsigned int index,
ice               276 sound/pci/ice1712/phase.c 	wm_put(ice, index, nvol);
ice               277 sound/pci/ice1712/phase.c 	wm_put_nocache(ice, index, 0x180 | nvol);
ice               288 sound/pci/ice1712/phase.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               290 sound/pci/ice1712/phase.c 	mutex_lock(&ice->gpio_mutex);
ice               291 sound/pci/ice1712/phase.c 	ucontrol->value.integer.value[0] = (wm_get(ice, WM_MUTE) & 0x10) ?
ice               293 sound/pci/ice1712/phase.c 	mutex_unlock(&ice->gpio_mutex);
ice               300 sound/pci/ice1712/phase.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               304 sound/pci/ice1712/phase.c 	snd_ice1712_save_gpio_status(ice);
ice               305 sound/pci/ice1712/phase.c 	oval = wm_get(ice, WM_MUTE);
ice               309 sound/pci/ice1712/phase.c 		wm_put(ice, WM_MUTE, nval);
ice               310 sound/pci/ice1712/phase.c 	snd_ice1712_restore_gpio_status(ice);
ice               331 sound/pci/ice1712/phase.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               332 sound/pci/ice1712/phase.c 	struct phase28_spec *spec = ice->spec;
ice               343 sound/pci/ice1712/phase.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               344 sound/pci/ice1712/phase.c 	struct phase28_spec *spec = ice->spec;
ice               347 sound/pci/ice1712/phase.c 	snd_ice1712_save_gpio_status(ice);
ice               356 sound/pci/ice1712/phase.c 			for (dac = 0; dac < ice->num_total_dacs; dac += 2)
ice               357 sound/pci/ice1712/phase.c 				wm_set_vol(ice, WM_DAC_ATTEN + dac + ch,
ice               363 sound/pci/ice1712/phase.c 	snd_ice1712_restore_gpio_status(ice);
ice               367 sound/pci/ice1712/phase.c static int phase28_init(struct snd_ice1712 *ice)
ice               412 sound/pci/ice1712/phase.c 	ice->num_total_dacs = 8;
ice               413 sound/pci/ice1712/phase.c 	ice->num_total_adcs = 2;
ice               418 sound/pci/ice1712/phase.c 	ice->spec = spec;
ice               421 sound/pci/ice1712/phase.c 	ice->akm = kzalloc(sizeof(struct snd_akm4xxx), GFP_KERNEL);
ice               422 sound/pci/ice1712/phase.c 	ak = ice->akm;
ice               425 sound/pci/ice1712/phase.c 	ice->akm_codecs = 1;
ice               427 sound/pci/ice1712/phase.c 	snd_ice1712_gpio_set_dir(ice, 0x5fffff); /* fix this for time being */
ice               430 sound/pci/ice1712/phase.c 	snd_ice1712_save_gpio_status(ice);
ice               431 sound/pci/ice1712/phase.c 	snd_ice1712_gpio_set_mask(ice, ~(PHASE28_WM_RESET|PHASE28_WM_CS|
ice               434 sound/pci/ice1712/phase.c 	tmp = snd_ice1712_gpio_read(ice);
ice               436 sound/pci/ice1712/phase.c 	snd_ice1712_gpio_write(ice, tmp);
ice               439 sound/pci/ice1712/phase.c 	snd_ice1712_gpio_write(ice, tmp);
ice               442 sound/pci/ice1712/phase.c 	snd_ice1712_gpio_write(ice, tmp);
ice               447 sound/pci/ice1712/phase.c 		wm_put(ice, p[0], p[1]);
ice               449 sound/pci/ice1712/phase.c 	snd_ice1712_restore_gpio_status(ice);
ice               453 sound/pci/ice1712/phase.c 	for (i = 0; i < ice->num_total_dacs; i++) {
ice               455 sound/pci/ice1712/phase.c 		wm_set_vol(ice, i, spec->vol[i], spec->master[i % 2]);
ice               478 sound/pci/ice1712/phase.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               479 sound/pci/ice1712/phase.c 	struct phase28_spec *spec = ice->spec;
ice               493 sound/pci/ice1712/phase.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               494 sound/pci/ice1712/phase.c 	struct phase28_spec *spec = ice->spec;
ice               500 sound/pci/ice1712/phase.c 	snd_ice1712_save_gpio_status(ice);
ice               510 sound/pci/ice1712/phase.c 			wm_set_vol(ice, idx, spec->vol[ofs+i],
ice               515 sound/pci/ice1712/phase.c 	snd_ice1712_restore_gpio_status(ice);
ice               534 sound/pci/ice1712/phase.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               535 sound/pci/ice1712/phase.c 	struct phase28_spec *spec = ice->spec;
ice               550 sound/pci/ice1712/phase.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               551 sound/pci/ice1712/phase.c 	struct phase28_spec *spec = ice->spec;
ice               557 sound/pci/ice1712/phase.c 	snd_ice1712_save_gpio_status(ice);
ice               565 sound/pci/ice1712/phase.c 			wm_set_vol(ice, ofs + i, spec->vol[ofs + i],
ice               570 sound/pci/ice1712/phase.c 	snd_ice1712_restore_gpio_status(ice);
ice               583 sound/pci/ice1712/phase.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               584 sound/pci/ice1712/phase.c 	struct phase28_spec *spec = ice->spec;
ice               596 sound/pci/ice1712/phase.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               597 sound/pci/ice1712/phase.c 	struct phase28_spec *spec = ice->spec;
ice               600 sound/pci/ice1712/phase.c 	snd_ice1712_save_gpio_status(ice);
ice               609 sound/pci/ice1712/phase.c 			for (dac = 0; dac < ice->num_total_dacs; dac += 2)
ice               610 sound/pci/ice1712/phase.c 				wm_set_vol(ice, WM_DAC_ATTEN + dac + i,
ice               616 sound/pci/ice1712/phase.c 	snd_ice1712_restore_gpio_status(ice);
ice               638 sound/pci/ice1712/phase.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               641 sound/pci/ice1712/phase.c 	mutex_lock(&ice->gpio_mutex);
ice               642 sound/pci/ice1712/phase.c 	val = wm_get(ice, WM_DAC_DIG_MASTER_ATTEN) & 0xff;
ice               645 sound/pci/ice1712/phase.c 	mutex_unlock(&ice->gpio_mutex);
ice               652 sound/pci/ice1712/phase.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               659 sound/pci/ice1712/phase.c 	snd_ice1712_save_gpio_status(ice);
ice               661 sound/pci/ice1712/phase.c 	ovol = wm_get(ice, WM_DAC_DIG_MASTER_ATTEN) & 0xff;
ice               663 sound/pci/ice1712/phase.c 		wm_put(ice, WM_DAC_DIG_MASTER_ATTEN, nvol); /* prelatch */
ice               665 sound/pci/ice1712/phase.c 		wm_put_nocache(ice, WM_DAC_DIG_MASTER_ATTEN, nvol | 0x100);
ice               668 sound/pci/ice1712/phase.c 	snd_ice1712_restore_gpio_status(ice);
ice               680 sound/pci/ice1712/phase.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               681 sound/pci/ice1712/phase.c 	ucontrol->value.integer.value[0] = (wm_get(ice, WM_DAC_CTRL2) & 0xf) ==
ice               689 sound/pci/ice1712/phase.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               691 sound/pci/ice1712/phase.c 	temp = wm_get(ice, WM_DAC_CTRL2);
ice               698 sound/pci/ice1712/phase.c 		wm_put(ice, WM_DAC_CTRL2, temp);
ice               718 sound/pci/ice1712/phase.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               719 sound/pci/ice1712/phase.c 	ucontrol->value.enumerated.item[0] = (wm_get(ice, WM_MASTER) & 0x8) ==
ice               728 sound/pci/ice1712/phase.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               730 sound/pci/ice1712/phase.c 	temp = wm_get(ice, WM_MASTER);
ice               739 sound/pci/ice1712/phase.c 		wm_put(ice, WM_MASTER, temp);
ice               897 sound/pci/ice1712/phase.c static int phase28_add_controls(struct snd_ice1712 *ice)
ice               904 sound/pci/ice1712/phase.c 		err = snd_ctl_add(ice->card,
ice               906 sound/pci/ice1712/phase.c 							ice));
ice               912 sound/pci/ice1712/phase.c 		err = snd_ctl_add(ice->card,
ice               913 sound/pci/ice1712/phase.c 					snd_ctl_new1(&wm_controls[i], ice));
ice                67 sound/pci/ice1712/pontis.c static unsigned short wm_get(struct snd_ice1712 *ice, int reg)
ice                70 sound/pci/ice1712/pontis.c 	return ((unsigned short)ice->akm[0].images[reg] << 8) |
ice                71 sound/pci/ice1712/pontis.c 		ice->akm[0].images[reg + 1];
ice                77 sound/pci/ice1712/pontis.c static void wm_put_nocache(struct snd_ice1712 *ice, int reg, unsigned short val)
ice                81 sound/pci/ice1712/pontis.c 	snd_vt1724_write_i2c(ice, WM_DEV, cval >> 8, cval & 0xff);
ice                84 sound/pci/ice1712/pontis.c static void wm_put(struct snd_ice1712 *ice, int reg, unsigned short val)
ice                86 sound/pci/ice1712/pontis.c 	wm_put_nocache(ice, reg, val);
ice                88 sound/pci/ice1712/pontis.c 	ice->akm[0].images[reg] = val >> 8;
ice                89 sound/pci/ice1712/pontis.c 	ice->akm[0].images[reg + 1] = val;
ice               111 sound/pci/ice1712/pontis.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               115 sound/pci/ice1712/pontis.c 	mutex_lock(&ice->gpio_mutex);
ice               117 sound/pci/ice1712/pontis.c 		val = wm_get(ice, WM_DAC_ATTEN_L + i) & 0xff;
ice               121 sound/pci/ice1712/pontis.c 	mutex_unlock(&ice->gpio_mutex);
ice               127 sound/pci/ice1712/pontis.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               131 sound/pci/ice1712/pontis.c 	mutex_lock(&ice->gpio_mutex);
ice               136 sound/pci/ice1712/pontis.c 		oval = wm_get(ice, idx) & 0xff;
ice               138 sound/pci/ice1712/pontis.c 			wm_put(ice, idx, nval);
ice               139 sound/pci/ice1712/pontis.c 			wm_put_nocache(ice, idx, nval | 0x100);
ice               143 sound/pci/ice1712/pontis.c 	mutex_unlock(&ice->gpio_mutex);
ice               166 sound/pci/ice1712/pontis.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               170 sound/pci/ice1712/pontis.c 	mutex_lock(&ice->gpio_mutex);
ice               172 sound/pci/ice1712/pontis.c 		val = wm_get(ice, WM_ADC_ATTEN_L + i) & 0xff;
ice               176 sound/pci/ice1712/pontis.c 	mutex_unlock(&ice->gpio_mutex);
ice               182 sound/pci/ice1712/pontis.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               186 sound/pci/ice1712/pontis.c 	mutex_lock(&ice->gpio_mutex);
ice               191 sound/pci/ice1712/pontis.c 		ovol = wm_get(ice, idx) & 0xff;
ice               193 sound/pci/ice1712/pontis.c 			wm_put(ice, idx, nvol);
ice               197 sound/pci/ice1712/pontis.c 	mutex_unlock(&ice->gpio_mutex);
ice               208 sound/pci/ice1712/pontis.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               211 sound/pci/ice1712/pontis.c 	mutex_lock(&ice->gpio_mutex);
ice               212 sound/pci/ice1712/pontis.c 	ucontrol->value.integer.value[0] = (wm_get(ice, WM_ADC_MUX) & (1 << bit)) ? 1 : 0;
ice               213 sound/pci/ice1712/pontis.c 	mutex_unlock(&ice->gpio_mutex);
ice               219 sound/pci/ice1712/pontis.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               224 sound/pci/ice1712/pontis.c 	mutex_lock(&ice->gpio_mutex);
ice               225 sound/pci/ice1712/pontis.c 	nval = oval = wm_get(ice, WM_ADC_MUX);
ice               232 sound/pci/ice1712/pontis.c 		wm_put(ice, WM_ADC_MUX, nval);
ice               234 sound/pci/ice1712/pontis.c 	mutex_unlock(&ice->gpio_mutex);
ice               245 sound/pci/ice1712/pontis.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               247 sound/pci/ice1712/pontis.c 	mutex_lock(&ice->gpio_mutex);
ice               248 sound/pci/ice1712/pontis.c 	ucontrol->value.integer.value[0] = (wm_get(ice, WM_OUT_MUX) & 0x04) ? 1 : 0;
ice               249 sound/pci/ice1712/pontis.c 	mutex_unlock(&ice->gpio_mutex);
ice               255 sound/pci/ice1712/pontis.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               259 sound/pci/ice1712/pontis.c 	mutex_lock(&ice->gpio_mutex);
ice               260 sound/pci/ice1712/pontis.c 	val = oval = wm_get(ice, WM_OUT_MUX);
ice               266 sound/pci/ice1712/pontis.c 		wm_put(ice, WM_OUT_MUX, val);
ice               269 sound/pci/ice1712/pontis.c 	mutex_unlock(&ice->gpio_mutex);
ice               280 sound/pci/ice1712/pontis.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               282 sound/pci/ice1712/pontis.c 	mutex_lock(&ice->gpio_mutex);
ice               283 sound/pci/ice1712/pontis.c 	ucontrol->value.integer.value[0] = (wm_get(ice, WM_DAC_CTRL1) & 0xf0) != 0x90;
ice               284 sound/pci/ice1712/pontis.c 	mutex_unlock(&ice->gpio_mutex);
ice               290 sound/pci/ice1712/pontis.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               294 sound/pci/ice1712/pontis.c 	mutex_lock(&ice->gpio_mutex);
ice               295 sound/pci/ice1712/pontis.c 	oval = wm_get(ice, WM_DAC_CTRL1);
ice               302 sound/pci/ice1712/pontis.c 		wm_put(ice, WM_DAC_CTRL1, val);
ice               303 sound/pci/ice1712/pontis.c 		wm_put_nocache(ice, WM_DAC_CTRL1, val);
ice               306 sound/pci/ice1712/pontis.c 	mutex_unlock(&ice->gpio_mutex);
ice               313 sound/pci/ice1712/pontis.c static void set_gpio_bit(struct snd_ice1712 *ice, unsigned int bit, int val)
ice               315 sound/pci/ice1712/pontis.c 	unsigned int tmp = snd_ice1712_gpio_read(ice);
ice               320 sound/pci/ice1712/pontis.c 	snd_ice1712_gpio_write(ice, tmp);
ice               323 sound/pci/ice1712/pontis.c static void spi_send_byte(struct snd_ice1712 *ice, unsigned char data)
ice               327 sound/pci/ice1712/pontis.c 		set_gpio_bit(ice, PONTIS_CS_CLK, 0);
ice               329 sound/pci/ice1712/pontis.c 		set_gpio_bit(ice, PONTIS_CS_WDATA, data & 0x80);
ice               331 sound/pci/ice1712/pontis.c 		set_gpio_bit(ice, PONTIS_CS_CLK, 1);
ice               337 sound/pci/ice1712/pontis.c static unsigned int spi_read_byte(struct snd_ice1712 *ice)
ice               344 sound/pci/ice1712/pontis.c 		set_gpio_bit(ice, PONTIS_CS_CLK, 0);
ice               346 sound/pci/ice1712/pontis.c 		if (snd_ice1712_gpio_read(ice) & PONTIS_CS_RDATA)
ice               349 sound/pci/ice1712/pontis.c 		set_gpio_bit(ice, PONTIS_CS_CLK, 1);
ice               356 sound/pci/ice1712/pontis.c static void spi_write(struct snd_ice1712 *ice, unsigned int dev, unsigned int reg, unsigned int data)
ice               358 sound/pci/ice1712/pontis.c 	snd_ice1712_gpio_set_dir(ice, PONTIS_CS_CS|PONTIS_CS_WDATA|PONTIS_CS_CLK);
ice               359 sound/pci/ice1712/pontis.c 	snd_ice1712_gpio_set_mask(ice, ~(PONTIS_CS_CS|PONTIS_CS_WDATA|PONTIS_CS_CLK));
ice               360 sound/pci/ice1712/pontis.c 	set_gpio_bit(ice, PONTIS_CS_CS, 0);
ice               361 sound/pci/ice1712/pontis.c 	spi_send_byte(ice, dev & ~1); /* WRITE */
ice               362 sound/pci/ice1712/pontis.c 	spi_send_byte(ice, reg); /* MAP */
ice               363 sound/pci/ice1712/pontis.c 	spi_send_byte(ice, data); /* DATA */
ice               365 sound/pci/ice1712/pontis.c 	set_gpio_bit(ice, PONTIS_CS_CS, 1);
ice               368 sound/pci/ice1712/pontis.c 	snd_ice1712_gpio_set_mask(ice, ice->gpio.write_mask);
ice               369 sound/pci/ice1712/pontis.c 	snd_ice1712_gpio_set_dir(ice, ice->gpio.direction);
ice               372 sound/pci/ice1712/pontis.c static unsigned int spi_read(struct snd_ice1712 *ice, unsigned int dev, unsigned int reg)
ice               375 sound/pci/ice1712/pontis.c 	snd_ice1712_gpio_set_dir(ice, PONTIS_CS_CS|PONTIS_CS_WDATA|PONTIS_CS_CLK);
ice               376 sound/pci/ice1712/pontis.c 	snd_ice1712_gpio_set_mask(ice, ~(PONTIS_CS_CS|PONTIS_CS_WDATA|PONTIS_CS_CLK));
ice               377 sound/pci/ice1712/pontis.c 	set_gpio_bit(ice, PONTIS_CS_CS, 0);
ice               378 sound/pci/ice1712/pontis.c 	spi_send_byte(ice, dev & ~1); /* WRITE */
ice               379 sound/pci/ice1712/pontis.c 	spi_send_byte(ice, reg); /* MAP */
ice               381 sound/pci/ice1712/pontis.c 	set_gpio_bit(ice, PONTIS_CS_CS, 1);
ice               383 sound/pci/ice1712/pontis.c 	set_gpio_bit(ice, PONTIS_CS_CS, 0);
ice               384 sound/pci/ice1712/pontis.c 	spi_send_byte(ice, dev | 1); /* READ */
ice               385 sound/pci/ice1712/pontis.c 	val = spi_read_byte(ice);
ice               387 sound/pci/ice1712/pontis.c 	set_gpio_bit(ice, PONTIS_CS_CS, 1);
ice               390 sound/pci/ice1712/pontis.c 	snd_ice1712_gpio_set_mask(ice, ice->gpio.write_mask);
ice               391 sound/pci/ice1712/pontis.c 	snd_ice1712_gpio_set_dir(ice, ice->gpio.direction);
ice               411 sound/pci/ice1712/pontis.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               413 sound/pci/ice1712/pontis.c 	mutex_lock(&ice->gpio_mutex);
ice               414 sound/pci/ice1712/pontis.c 	ucontrol->value.enumerated.item[0] = ice->gpio.saved[0];
ice               415 sound/pci/ice1712/pontis.c 	mutex_unlock(&ice->gpio_mutex);
ice               421 sound/pci/ice1712/pontis.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               425 sound/pci/ice1712/pontis.c 	mutex_lock(&ice->gpio_mutex);
ice               426 sound/pci/ice1712/pontis.c 	if (ucontrol->value.enumerated.item[0] != ice->gpio.saved[0]) {
ice               427 sound/pci/ice1712/pontis.c 		ice->gpio.saved[0] = ucontrol->value.enumerated.item[0] & 3;
ice               428 sound/pci/ice1712/pontis.c 		val = 0x80 | (ice->gpio.saved[0] << 3);
ice               429 sound/pci/ice1712/pontis.c 		spi_write(ice, CS_DEV, 0x04, val);
ice               432 sound/pci/ice1712/pontis.c 	mutex_unlock(&ice->gpio_mutex);
ice               451 sound/pci/ice1712/pontis.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               452 sound/pci/ice1712/pontis.c 	mutex_lock(&ice->gpio_mutex);
ice               454 sound/pci/ice1712/pontis.c 	ucontrol->value.integer.value[0] = (~ice->gpio.write_mask & 0xffff) | 0x00f0;
ice               455 sound/pci/ice1712/pontis.c 	mutex_unlock(&ice->gpio_mutex);
ice               461 sound/pci/ice1712/pontis.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               464 sound/pci/ice1712/pontis.c 	mutex_lock(&ice->gpio_mutex);
ice               467 sound/pci/ice1712/pontis.c 	changed = val != ice->gpio.write_mask;
ice               468 sound/pci/ice1712/pontis.c 	ice->gpio.write_mask = val;
ice               469 sound/pci/ice1712/pontis.c 	mutex_unlock(&ice->gpio_mutex);
ice               475 sound/pci/ice1712/pontis.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               476 sound/pci/ice1712/pontis.c 	mutex_lock(&ice->gpio_mutex);
ice               478 sound/pci/ice1712/pontis.c 	ucontrol->value.integer.value[0] = ice->gpio.direction & 0xff0f;
ice               479 sound/pci/ice1712/pontis.c 	mutex_unlock(&ice->gpio_mutex);
ice               485 sound/pci/ice1712/pontis.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               488 sound/pci/ice1712/pontis.c 	mutex_lock(&ice->gpio_mutex);
ice               491 sound/pci/ice1712/pontis.c 	changed = (val != ice->gpio.direction);
ice               492 sound/pci/ice1712/pontis.c 	ice->gpio.direction = val;
ice               493 sound/pci/ice1712/pontis.c 	mutex_unlock(&ice->gpio_mutex);
ice               499 sound/pci/ice1712/pontis.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               500 sound/pci/ice1712/pontis.c 	mutex_lock(&ice->gpio_mutex);
ice               501 sound/pci/ice1712/pontis.c 	snd_ice1712_gpio_set_dir(ice, ice->gpio.direction);
ice               502 sound/pci/ice1712/pontis.c 	snd_ice1712_gpio_set_mask(ice, ice->gpio.write_mask);
ice               503 sound/pci/ice1712/pontis.c 	ucontrol->value.integer.value[0] = snd_ice1712_gpio_read(ice) & 0xffff;
ice               504 sound/pci/ice1712/pontis.c 	mutex_unlock(&ice->gpio_mutex);
ice               510 sound/pci/ice1712/pontis.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               513 sound/pci/ice1712/pontis.c 	mutex_lock(&ice->gpio_mutex);
ice               514 sound/pci/ice1712/pontis.c 	snd_ice1712_gpio_set_dir(ice, ice->gpio.direction);
ice               515 sound/pci/ice1712/pontis.c 	snd_ice1712_gpio_set_mask(ice, ice->gpio.write_mask);
ice               516 sound/pci/ice1712/pontis.c 	val = snd_ice1712_gpio_read(ice) & 0xffff;
ice               519 sound/pci/ice1712/pontis.c 		snd_ice1712_gpio_write(ice, nval);
ice               522 sound/pci/ice1712/pontis.c 	mutex_unlock(&ice->gpio_mutex);
ice               620 sound/pci/ice1712/pontis.c 	struct snd_ice1712 *ice = entry->private_data;
ice               623 sound/pci/ice1712/pontis.c 	mutex_lock(&ice->gpio_mutex);
ice               628 sound/pci/ice1712/pontis.c 			wm_put(ice, reg, val);
ice               630 sound/pci/ice1712/pontis.c 	mutex_unlock(&ice->gpio_mutex);
ice               635 sound/pci/ice1712/pontis.c 	struct snd_ice1712 *ice = entry->private_data;
ice               638 sound/pci/ice1712/pontis.c 	mutex_lock(&ice->gpio_mutex);
ice               640 sound/pci/ice1712/pontis.c 		val = wm_get(ice, reg);
ice               643 sound/pci/ice1712/pontis.c 	mutex_unlock(&ice->gpio_mutex);
ice               646 sound/pci/ice1712/pontis.c static void wm_proc_init(struct snd_ice1712 *ice)
ice               648 sound/pci/ice1712/pontis.c 	snd_card_rw_proc_new(ice->card, "wm_codec", ice, wm_proc_regs_read,
ice               654 sound/pci/ice1712/pontis.c 	struct snd_ice1712 *ice = entry->private_data;
ice               657 sound/pci/ice1712/pontis.c 	mutex_lock(&ice->gpio_mutex);
ice               659 sound/pci/ice1712/pontis.c 		val = spi_read(ice, CS_DEV, reg);
ice               662 sound/pci/ice1712/pontis.c 	val = spi_read(ice, CS_DEV, 0x7f);
ice               664 sound/pci/ice1712/pontis.c 	mutex_unlock(&ice->gpio_mutex);
ice               667 sound/pci/ice1712/pontis.c static void cs_proc_init(struct snd_ice1712 *ice)
ice               669 sound/pci/ice1712/pontis.c 	snd_card_ro_proc_new(ice->card, "cs_codec", ice, cs_proc_regs_read);
ice               673 sound/pci/ice1712/pontis.c static int pontis_add_controls(struct snd_ice1712 *ice)
ice               679 sound/pci/ice1712/pontis.c 		err = snd_ctl_add(ice->card, snd_ctl_new1(&pontis_controls[i], ice));
ice               684 sound/pci/ice1712/pontis.c 	wm_proc_init(ice);
ice               685 sound/pci/ice1712/pontis.c 	cs_proc_init(ice);
ice               694 sound/pci/ice1712/pontis.c static int pontis_init(struct snd_ice1712 *ice)
ice               740 sound/pci/ice1712/pontis.c 	ice->vt1720 = 1;
ice               741 sound/pci/ice1712/pontis.c 	ice->num_total_dacs = 2;
ice               742 sound/pci/ice1712/pontis.c 	ice->num_total_adcs = 2;
ice               745 sound/pci/ice1712/pontis.c 	ice->akm = kzalloc(sizeof(struct snd_akm4xxx), GFP_KERNEL);
ice               746 sound/pci/ice1712/pontis.c 	if (! ice->akm)
ice               748 sound/pci/ice1712/pontis.c 	ice->akm_codecs = 1;
ice               753 sound/pci/ice1712/pontis.c 	ice->gpio.saved[0] = 0;
ice               757 sound/pci/ice1712/pontis.c 		wm_put(ice, wm_inits[i], wm_inits[i+1]);
ice               760 sound/pci/ice1712/pontis.c 		wm_put(ice, wm_inits2[i], wm_inits2[i+1]);
ice               764 sound/pci/ice1712/pontis.c 	outb(inb(ICEMT1724(ice, AC97_CMD)) | 0x80, ICEMT1724(ice, AC97_CMD));
ice               767 sound/pci/ice1712/pontis.c 	outb(inb(ICEMT1724(ice, AC97_CMD)) & ~0x80, ICEMT1724(ice, AC97_CMD));
ice               770 sound/pci/ice1712/pontis.c 		spi_write(ice, CS_DEV, cs_inits[i], cs_inits[i+1]);
ice                61 sound/pci/ice1712/prodigy192.c static inline void stac9460_put(struct snd_ice1712 *ice, int reg, unsigned char val)
ice                63 sound/pci/ice1712/prodigy192.c 	snd_vt1724_write_i2c(ice, PRODIGY192_STAC9460_ADDR, reg, val);
ice                66 sound/pci/ice1712/prodigy192.c static inline unsigned char stac9460_get(struct snd_ice1712 *ice, int reg)
ice                68 sound/pci/ice1712/prodigy192.c 	return snd_vt1724_read_i2c(ice, PRODIGY192_STAC9460_ADDR, reg);
ice                78 sound/pci/ice1712/prodigy192.c static int stac9460_dac_mute(struct snd_ice1712 *ice, int idx,
ice                83 sound/pci/ice1712/prodigy192.c 	old = stac9460_get(ice, idx);
ice                88 sound/pci/ice1712/prodigy192.c 		stac9460_put(ice, idx, new);
ice                96 sound/pci/ice1712/prodigy192.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               104 sound/pci/ice1712/prodigy192.c 	val = stac9460_get(ice, idx);
ice               111 sound/pci/ice1712/prodigy192.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               112 sound/pci/ice1712/prodigy192.c 	struct prodigy192_spec *spec = ice->spec;
ice               125 sound/pci/ice1712/prodigy192.c 	change = stac9460_dac_mute(ice, idx, ucontrol->value.integer.value[0]);
ice               144 sound/pci/ice1712/prodigy192.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               152 sound/pci/ice1712/prodigy192.c 	vol = stac9460_get(ice, idx) & 0x7f;
ice               160 sound/pci/ice1712/prodigy192.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               170 sound/pci/ice1712/prodigy192.c 	tmp = stac9460_get(ice, idx);
ice               179 sound/pci/ice1712/prodigy192.c 		stac9460_put(ice, idx, (0x7f - nvol) | (tmp & 0x80));
ice               191 sound/pci/ice1712/prodigy192.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               196 sound/pci/ice1712/prodigy192.c 		val = stac9460_get(ice, STAC946X_MIC_L_VOLUME + i);
ice               205 sound/pci/ice1712/prodigy192.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               212 sound/pci/ice1712/prodigy192.c 		old = stac9460_get(ice, reg);
ice               216 sound/pci/ice1712/prodigy192.c 			stac9460_put(ice, reg, new);
ice               236 sound/pci/ice1712/prodigy192.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               242 sound/pci/ice1712/prodigy192.c 		vol = stac9460_get(ice, reg) & 0x0f;
ice               251 sound/pci/ice1712/prodigy192.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               259 sound/pci/ice1712/prodigy192.c 		ovol = 0x0f - stac9460_get(ice, reg);
ice               262 sound/pci/ice1712/prodigy192.c 			stac9460_put(ice, reg, (0x0f - nvol) | (ovol & ~0x0f));
ice               280 sound/pci/ice1712/prodigy192.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               283 sound/pci/ice1712/prodigy192.c 	val = stac9460_get(ice, STAC946X_GENERAL_PURPOSE);
ice               291 sound/pci/ice1712/prodigy192.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               294 sound/pci/ice1712/prodigy192.c 	old = stac9460_get(ice, STAC946X_GENERAL_PURPOSE);
ice               298 sound/pci/ice1712/prodigy192.c 		stac9460_put(ice, STAC946X_GENERAL_PURPOSE, new);
ice               304 sound/pci/ice1712/prodigy192.c static void stac9460_set_rate_val(struct snd_ice1712 *ice, unsigned int rate)
ice               309 sound/pci/ice1712/prodigy192.c 	struct prodigy192_spec *spec = ice->spec;
ice               319 sound/pci/ice1712/prodigy192.c 	old = stac9460_get(ice, STAC946X_MASTER_CLOCKING);
ice               327 sound/pci/ice1712/prodigy192.c 		changed[idx] = stac9460_dac_mute(ice,
ice               330 sound/pci/ice1712/prodigy192.c 	stac9460_put(ice, STAC946X_MASTER_CLOCKING, new);
ice               336 sound/pci/ice1712/prodigy192.c 			stac9460_dac_mute(ice, STAC946X_MASTER_VOLUME + idx, 1);
ice               432 sound/pci/ice1712/prodigy192.c static void write_data(struct snd_ice1712 *ice, unsigned int gpio,
ice               438 sound/pci/ice1712/prodigy192.c 		snd_ice1712_gpio_write(ice, gpio);
ice               445 sound/pci/ice1712/prodigy192.c 		snd_ice1712_gpio_write(ice, gpio);
ice               449 sound/pci/ice1712/prodigy192.c 		snd_ice1712_gpio_write(ice, gpio);
ice               457 sound/pci/ice1712/prodigy192.c static unsigned char read_data(struct snd_ice1712 *ice, unsigned int gpio,
ice               465 sound/pci/ice1712/prodigy192.c 		snd_ice1712_gpio_write(ice, gpio);
ice               468 sound/pci/ice1712/prodigy192.c 		if (snd_ice1712_gpio_read(ice) & VT1724_PRODIGY192_CDIN)
ice               473 sound/pci/ice1712/prodigy192.c 		snd_ice1712_gpio_write(ice, gpio);
ice               481 sound/pci/ice1712/prodigy192.c static unsigned int prodigy192_4wire_start(struct snd_ice1712 *ice)
ice               485 sound/pci/ice1712/prodigy192.c 	snd_ice1712_save_gpio_status(ice);
ice               486 sound/pci/ice1712/prodigy192.c 	tmp = snd_ice1712_gpio_read(ice);
ice               490 sound/pci/ice1712/prodigy192.c 	snd_ice1712_gpio_write(ice, tmp);
ice               498 sound/pci/ice1712/prodigy192.c static void prodigy192_4wire_finish(struct snd_ice1712 *ice, unsigned int tmp)
ice               501 sound/pci/ice1712/prodigy192.c 	snd_ice1712_gpio_write(ice, tmp);
ice               503 sound/pci/ice1712/prodigy192.c 	snd_ice1712_restore_gpio_status(ice);
ice               512 sound/pci/ice1712/prodigy192.c 	struct snd_ice1712 *ice = private_data;
ice               514 sound/pci/ice1712/prodigy192.c 	tmp = prodigy192_4wire_start(ice);
ice               517 sound/pci/ice1712/prodigy192.c 	write_data(ice, tmp, addrdata, 15);
ice               518 sound/pci/ice1712/prodigy192.c 	prodigy192_4wire_finish(ice, tmp);
ice               527 sound/pci/ice1712/prodigy192.c 	struct snd_ice1712 *ice = private_data;
ice               531 sound/pci/ice1712/prodigy192.c 	tmp = prodigy192_4wire_start(ice);
ice               532 sound/pci/ice1712/prodigy192.c 	write_data(ice, tmp, (AK4114_ADDR << 6) | (addr & 0x1f), 7);
ice               533 sound/pci/ice1712/prodigy192.c 	data = read_data(ice, tmp, 7);
ice               534 sound/pci/ice1712/prodigy192.c 	prodigy192_4wire_finish(ice, tmp);
ice               551 sound/pci/ice1712/prodigy192.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               554 sound/pci/ice1712/prodigy192.c 	val = prodigy192_ak4114_read(ice, AK4114_REG_IO1);
ice               565 sound/pci/ice1712/prodigy192.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               569 sound/pci/ice1712/prodigy192.c 	old = prodigy192_ak4114_read(ice, AK4114_REG_IO1);
ice               576 sound/pci/ice1712/prodigy192.c 		prodigy192_ak4114_write(ice, AK4114_REG_IO1, new);
ice               593 sound/pci/ice1712/prodigy192.c static int prodigy192_ak4114_init(struct snd_ice1712 *ice)
ice               609 sound/pci/ice1712/prodigy192.c 	struct prodigy192_spec *spec = ice->spec;
ice               612 sound/pci/ice1712/prodigy192.c 	err = snd_ak4114_create(ice->card,
ice               616 sound/pci/ice1712/prodigy192.c 				 ice, &spec->ak4114);
ice               628 sound/pci/ice1712/prodigy192.c 	struct snd_ice1712 *ice = entry->private_data;
ice               632 sound/pci/ice1712/prodigy192.c 		val = stac9460_get(ice, reg);
ice               638 sound/pci/ice1712/prodigy192.c static void stac9460_proc_init(struct snd_ice1712 *ice)
ice               640 sound/pci/ice1712/prodigy192.c 	snd_card_ro_proc_new(ice->card, "stac9460_codec", ice,
ice               645 sound/pci/ice1712/prodigy192.c static int prodigy192_add_controls(struct snd_ice1712 *ice)
ice               647 sound/pci/ice1712/prodigy192.c 	struct prodigy192_spec *spec = ice->spec;
ice               652 sound/pci/ice1712/prodigy192.c 		err = snd_ctl_add(ice->card,
ice               653 sound/pci/ice1712/prodigy192.c 				  snd_ctl_new1(&stac_controls[i], ice));
ice               660 sound/pci/ice1712/prodigy192.c 			err = snd_ctl_add(ice->card,
ice               662 sound/pci/ice1712/prodigy192.c 						       ice));
ice               668 sound/pci/ice1712/prodigy192.c 				ice->pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream);
ice               672 sound/pci/ice1712/prodigy192.c 	stac9460_proc_init(ice);
ice               679 sound/pci/ice1712/prodigy192.c static int prodigy192_miodio_exists(struct snd_ice1712 *ice)
ice               687 sound/pci/ice1712/prodigy192.c 	orig_value = prodigy192_ak4114_read(ice, addr);
ice               688 sound/pci/ice1712/prodigy192.c 	prodigy192_ak4114_write(ice, addr, test_data);
ice               689 sound/pci/ice1712/prodigy192.c 	if (prodigy192_ak4114_read(ice, addr) == test_data) {
ice               692 sound/pci/ice1712/prodigy192.c 		prodigy192_ak4114_write(ice, addr, orig_value);
ice               701 sound/pci/ice1712/prodigy192.c static int prodigy192_init(struct snd_ice1712 *ice)
ice               720 sound/pci/ice1712/prodigy192.c 	ice->num_total_dacs = 6;
ice               721 sound/pci/ice1712/prodigy192.c 	ice->num_total_adcs = 2;
ice               722 sound/pci/ice1712/prodigy192.c 	ice->vt1720 = 0;  /* ice1724, e.g. 23 GPIOs */
ice               727 sound/pci/ice1712/prodigy192.c 	ice->spec = spec;
ice               733 sound/pci/ice1712/prodigy192.c 		stac9460_put(ice, p[0], p[1]);
ice               734 sound/pci/ice1712/prodigy192.c 	ice->gpio.set_pro_rate = stac9460_set_rate_val;
ice               737 sound/pci/ice1712/prodigy192.c 	if (prodigy192_miodio_exists(ice)) {
ice               738 sound/pci/ice1712/prodigy192.c 		err = prodigy192_ak4114_init(ice);
ice               742 sound/pci/ice1712/prodigy192.c 		dev_dbg(ice->card->dev,
ice               745 sound/pci/ice1712/prodigy192.c 		dev_dbg(ice->card->dev, "AK4114 not found\n");
ice               113 sound/pci/ice1712/prodigy_hifi.c static unsigned short wm_get(struct snd_ice1712 *ice, int reg)
ice               116 sound/pci/ice1712/prodigy_hifi.c 	return ((unsigned short)ice->akm[0].images[reg] << 8) |
ice               117 sound/pci/ice1712/prodigy_hifi.c 		ice->akm[0].images[reg + 1];
ice               123 sound/pci/ice1712/prodigy_hifi.c static void wm_put_nocache(struct snd_ice1712 *ice, int reg, unsigned short val)
ice               127 sound/pci/ice1712/prodigy_hifi.c 	snd_vt1724_write_i2c(ice, WM_DEV, cval >> 8, cval & 0xff);
ice               130 sound/pci/ice1712/prodigy_hifi.c static void wm_put(struct snd_ice1712 *ice, int reg, unsigned short val)
ice               132 sound/pci/ice1712/prodigy_hifi.c 	wm_put_nocache(ice, reg, val);
ice               134 sound/pci/ice1712/prodigy_hifi.c 	ice->akm[0].images[reg] = val >> 8;
ice               135 sound/pci/ice1712/prodigy_hifi.c 	ice->akm[0].images[reg + 1] = val;
ice               142 sound/pci/ice1712/prodigy_hifi.c static void set_gpio_bit(struct snd_ice1712 *ice, unsigned int bit, int val)
ice               144 sound/pci/ice1712/prodigy_hifi.c 	unsigned int tmp = snd_ice1712_gpio_read(ice);
ice               149 sound/pci/ice1712/prodigy_hifi.c 	snd_ice1712_gpio_write(ice, tmp);
ice               156 sound/pci/ice1712/prodigy_hifi.c static void wm8766_spi_send_word(struct snd_ice1712 *ice, unsigned int data)
ice               160 sound/pci/ice1712/prodigy_hifi.c 		set_gpio_bit(ice, WM8766_SPI_CLK, 0);
ice               162 sound/pci/ice1712/prodigy_hifi.c 		set_gpio_bit(ice, WM8766_SPI_MD, data & 0x8000);
ice               164 sound/pci/ice1712/prodigy_hifi.c 		set_gpio_bit(ice, WM8766_SPI_CLK, 1);
ice               170 sound/pci/ice1712/prodigy_hifi.c static void wm8766_spi_write(struct snd_ice1712 *ice, unsigned int reg,
ice               175 sound/pci/ice1712/prodigy_hifi.c 	snd_ice1712_gpio_set_dir(ice, WM8766_SPI_MD|
ice               177 sound/pci/ice1712/prodigy_hifi.c 	snd_ice1712_gpio_set_mask(ice, ~(WM8766_SPI_MD|
ice               180 sound/pci/ice1712/prodigy_hifi.c 	set_gpio_bit(ice, WM8766_SPI_ML, 0);
ice               182 sound/pci/ice1712/prodigy_hifi.c 	wm8766_spi_send_word(ice, block); /* REGISTER ADDRESS */
ice               184 sound/pci/ice1712/prodigy_hifi.c 	set_gpio_bit(ice, WM8766_SPI_ML, 1);
ice               187 sound/pci/ice1712/prodigy_hifi.c 	snd_ice1712_gpio_set_mask(ice, ice->gpio.write_mask);
ice               188 sound/pci/ice1712/prodigy_hifi.c 	snd_ice1712_gpio_set_dir(ice, ice->gpio.direction);
ice               196 sound/pci/ice1712/prodigy_hifi.c static void ak4396_send_word(struct snd_ice1712 *ice, unsigned int data)
ice               200 sound/pci/ice1712/prodigy_hifi.c 		set_gpio_bit(ice, AK4396_CCLK, 0);
ice               202 sound/pci/ice1712/prodigy_hifi.c 		set_gpio_bit(ice, AK4396_CDTI, data & 0x8000);
ice               204 sound/pci/ice1712/prodigy_hifi.c 		set_gpio_bit(ice, AK4396_CCLK, 1);
ice               210 sound/pci/ice1712/prodigy_hifi.c static void ak4396_write(struct snd_ice1712 *ice, unsigned int reg,
ice               215 sound/pci/ice1712/prodigy_hifi.c 	snd_ice1712_gpio_set_dir(ice, AK4396_CSN|AK4396_CCLK|AK4396_CDTI);
ice               216 sound/pci/ice1712/prodigy_hifi.c 	snd_ice1712_gpio_set_mask(ice, ~(AK4396_CSN|AK4396_CCLK|AK4396_CDTI));
ice               218 sound/pci/ice1712/prodigy_hifi.c 	set_gpio_bit(ice, AK4396_CSN, 0); 
ice               221 sound/pci/ice1712/prodigy_hifi.c 	ak4396_send_word(ice, block); /* REGISTER ADDRESS */
ice               223 sound/pci/ice1712/prodigy_hifi.c 	set_gpio_bit(ice, AK4396_CSN, 1);
ice               226 sound/pci/ice1712/prodigy_hifi.c 	snd_ice1712_gpio_set_mask(ice, ice->gpio.write_mask);
ice               227 sound/pci/ice1712/prodigy_hifi.c 	snd_ice1712_gpio_set_dir(ice, ice->gpio.direction);
ice               254 sound/pci/ice1712/prodigy_hifi.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               255 sound/pci/ice1712/prodigy_hifi.c 	struct prodigy_hifi_spec *spec = ice->spec;
ice               266 sound/pci/ice1712/prodigy_hifi.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               267 sound/pci/ice1712/prodigy_hifi.c 	struct prodigy_hifi_spec *spec = ice->spec;
ice               271 sound/pci/ice1712/prodigy_hifi.c 	mutex_lock(&ice->gpio_mutex);
ice               275 sound/pci/ice1712/prodigy_hifi.c 			ak4396_write(ice, AK4396_LCH_ATT + i,
ice               280 sound/pci/ice1712/prodigy_hifi.c 	mutex_unlock(&ice->gpio_mutex);
ice               312 sound/pci/ice1712/prodigy_hifi.c static void wm_set_vol(struct snd_ice1712 *ice, unsigned int index,
ice               325 sound/pci/ice1712/prodigy_hifi.c 	wm_put(ice, index, nvol);
ice               326 sound/pci/ice1712/prodigy_hifi.c 	wm_put_nocache(ice, index, 0x100 | nvol);
ice               329 sound/pci/ice1712/prodigy_hifi.c static void wm8766_set_vol(struct snd_ice1712 *ice, unsigned int index,
ice               342 sound/pci/ice1712/prodigy_hifi.c 	wm8766_spi_write(ice, index, (0x0100 | nvol));
ice               363 sound/pci/ice1712/prodigy_hifi.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               364 sound/pci/ice1712/prodigy_hifi.c 	struct prodigy_hifi_spec *spec = ice->spec;
ice               375 sound/pci/ice1712/prodigy_hifi.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               376 sound/pci/ice1712/prodigy_hifi.c 	struct prodigy_hifi_spec *spec = ice->spec;
ice               379 sound/pci/ice1712/prodigy_hifi.c 	mutex_lock(&ice->gpio_mutex);
ice               385 sound/pci/ice1712/prodigy_hifi.c 			wm_set_vol(ice, idx, spec->vol[2 + i], spec->master[i]);
ice               389 sound/pci/ice1712/prodigy_hifi.c 	mutex_unlock(&ice->gpio_mutex);
ice               411 sound/pci/ice1712/prodigy_hifi.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               412 sound/pci/ice1712/prodigy_hifi.c 	struct prodigy_hifi_spec *spec = ice->spec;
ice               424 sound/pci/ice1712/prodigy_hifi.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               425 sound/pci/ice1712/prodigy_hifi.c 	struct prodigy_hifi_spec *spec = ice->spec;
ice               431 sound/pci/ice1712/prodigy_hifi.c 	mutex_lock(&ice->gpio_mutex);
ice               437 sound/pci/ice1712/prodigy_hifi.c 			wm8766_set_vol(ice, idx,
ice               442 sound/pci/ice1712/prodigy_hifi.c 	mutex_unlock(&ice->gpio_mutex);
ice               462 sound/pci/ice1712/prodigy_hifi.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               463 sound/pci/ice1712/prodigy_hifi.c 	struct prodigy_hifi_spec *spec = ice->spec;
ice               473 sound/pci/ice1712/prodigy_hifi.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               474 sound/pci/ice1712/prodigy_hifi.c 	struct prodigy_hifi_spec *spec = ice->spec;
ice               477 sound/pci/ice1712/prodigy_hifi.c 	mutex_lock(&ice->gpio_mutex);
ice               483 sound/pci/ice1712/prodigy_hifi.c 			wm_set_vol(ice, WM_DAC_ATTEN_L + ch,
ice               486 sound/pci/ice1712/prodigy_hifi.c 			wm8766_set_vol(ice, WM8766_LDA1 + ch,
ice               489 sound/pci/ice1712/prodigy_hifi.c 			wm8766_set_vol(ice, WM8766_LDA2 + ch,
ice               492 sound/pci/ice1712/prodigy_hifi.c 			wm8766_set_vol(ice, WM8766_LDA3 + ch,
ice               497 sound/pci/ice1712/prodigy_hifi.c 	mutex_unlock(&ice->gpio_mutex);	
ice               536 sound/pci/ice1712/prodigy_hifi.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               538 sound/pci/ice1712/prodigy_hifi.c 	mutex_lock(&ice->gpio_mutex);
ice               539 sound/pci/ice1712/prodigy_hifi.c 	ucontrol->value.enumerated.item[0] = wm_get(ice, WM_ADC_MUX) & 0x1f;
ice               540 sound/pci/ice1712/prodigy_hifi.c 	mutex_unlock(&ice->gpio_mutex);
ice               547 sound/pci/ice1712/prodigy_hifi.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               551 sound/pci/ice1712/prodigy_hifi.c 	mutex_lock(&ice->gpio_mutex);
ice               552 sound/pci/ice1712/prodigy_hifi.c 	oval = wm_get(ice, WM_ADC_MUX);
ice               555 sound/pci/ice1712/prodigy_hifi.c 		wm_put(ice, WM_ADC_MUX, nval);
ice               558 sound/pci/ice1712/prodigy_hifi.c 	mutex_unlock(&ice->gpio_mutex);
ice               585 sound/pci/ice1712/prodigy_hifi.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               589 sound/pci/ice1712/prodigy_hifi.c 	mutex_lock(&ice->gpio_mutex);
ice               591 sound/pci/ice1712/prodigy_hifi.c 		val = wm_get(ice, WM_ADC_ATTEN_L + i) & 0xff;
ice               595 sound/pci/ice1712/prodigy_hifi.c 	mutex_unlock(&ice->gpio_mutex);
ice               602 sound/pci/ice1712/prodigy_hifi.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               606 sound/pci/ice1712/prodigy_hifi.c 	mutex_lock(&ice->gpio_mutex);
ice               611 sound/pci/ice1712/prodigy_hifi.c 		ovol = wm_get(ice, idx) & 0xff;
ice               613 sound/pci/ice1712/prodigy_hifi.c 			wm_put(ice, idx, nvol);
ice               617 sound/pci/ice1712/prodigy_hifi.c 	mutex_unlock(&ice->gpio_mutex);
ice               629 sound/pci/ice1712/prodigy_hifi.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               632 sound/pci/ice1712/prodigy_hifi.c 	mutex_lock(&ice->gpio_mutex);
ice               634 sound/pci/ice1712/prodigy_hifi.c 		(wm_get(ice, WM_ADC_MUX) & (1 << bit)) ? 1 : 0;
ice               635 sound/pci/ice1712/prodigy_hifi.c 	mutex_unlock(&ice->gpio_mutex);
ice               642 sound/pci/ice1712/prodigy_hifi.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               647 sound/pci/ice1712/prodigy_hifi.c 	mutex_lock(&ice->gpio_mutex);
ice               648 sound/pci/ice1712/prodigy_hifi.c 	nval = oval = wm_get(ice, WM_ADC_MUX);
ice               655 sound/pci/ice1712/prodigy_hifi.c 		wm_put(ice, WM_ADC_MUX, nval);
ice               657 sound/pci/ice1712/prodigy_hifi.c 	mutex_unlock(&ice->gpio_mutex);
ice               669 sound/pci/ice1712/prodigy_hifi.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               671 sound/pci/ice1712/prodigy_hifi.c 	mutex_lock(&ice->gpio_mutex);
ice               673 sound/pci/ice1712/prodigy_hifi.c 		(wm_get(ice, WM_OUT_MUX) & 0x04) ? 1 : 0;
ice               674 sound/pci/ice1712/prodigy_hifi.c 	mutex_unlock(&ice->gpio_mutex);
ice               681 sound/pci/ice1712/prodigy_hifi.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               685 sound/pci/ice1712/prodigy_hifi.c 	mutex_lock(&ice->gpio_mutex);
ice               686 sound/pci/ice1712/prodigy_hifi.c 	val = oval = wm_get(ice, WM_OUT_MUX);
ice               692 sound/pci/ice1712/prodigy_hifi.c 		wm_put(ice, WM_OUT_MUX, val);
ice               695 sound/pci/ice1712/prodigy_hifi.c 	mutex_unlock(&ice->gpio_mutex);
ice               707 sound/pci/ice1712/prodigy_hifi.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               709 sound/pci/ice1712/prodigy_hifi.c 	mutex_lock(&ice->gpio_mutex);
ice               711 sound/pci/ice1712/prodigy_hifi.c 			(wm_get(ice, WM_DAC_CTRL1) & 0xf0) != 0x90;
ice               712 sound/pci/ice1712/prodigy_hifi.c 	mutex_unlock(&ice->gpio_mutex);
ice               719 sound/pci/ice1712/prodigy_hifi.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               723 sound/pci/ice1712/prodigy_hifi.c 	mutex_lock(&ice->gpio_mutex);
ice               724 sound/pci/ice1712/prodigy_hifi.c 	oval = wm_get(ice, WM_DAC_CTRL1);
ice               731 sound/pci/ice1712/prodigy_hifi.c 		wm_put(ice, WM_DAC_CTRL1, val);
ice               732 sound/pci/ice1712/prodigy_hifi.c 		wm_put_nocache(ice, WM_DAC_CTRL1, val);
ice               735 sound/pci/ice1712/prodigy_hifi.c 	mutex_unlock(&ice->gpio_mutex);
ice               864 sound/pci/ice1712/prodigy_hifi.c 	struct snd_ice1712 *ice = entry->private_data;
ice               867 sound/pci/ice1712/prodigy_hifi.c 	mutex_lock(&ice->gpio_mutex);
ice               872 sound/pci/ice1712/prodigy_hifi.c 			wm_put(ice, reg, val);
ice               874 sound/pci/ice1712/prodigy_hifi.c 	mutex_unlock(&ice->gpio_mutex);
ice               880 sound/pci/ice1712/prodigy_hifi.c 	struct snd_ice1712 *ice = entry->private_data;
ice               883 sound/pci/ice1712/prodigy_hifi.c 	mutex_lock(&ice->gpio_mutex);
ice               885 sound/pci/ice1712/prodigy_hifi.c 		val = wm_get(ice, reg);
ice               888 sound/pci/ice1712/prodigy_hifi.c 	mutex_unlock(&ice->gpio_mutex);
ice               891 sound/pci/ice1712/prodigy_hifi.c static void wm_proc_init(struct snd_ice1712 *ice)
ice               893 sound/pci/ice1712/prodigy_hifi.c 	snd_card_rw_proc_new(ice->card, "wm_codec", ice, wm_proc_regs_read,
ice               897 sound/pci/ice1712/prodigy_hifi.c static int prodigy_hifi_add_controls(struct snd_ice1712 *ice)
ice               903 sound/pci/ice1712/prodigy_hifi.c 		err = snd_ctl_add(ice->card,
ice               904 sound/pci/ice1712/prodigy_hifi.c 				  snd_ctl_new1(&prodigy_hifi_controls[i], ice));
ice               909 sound/pci/ice1712/prodigy_hifi.c 	wm_proc_init(ice);
ice               914 sound/pci/ice1712/prodigy_hifi.c static int prodigy_hd2_add_controls(struct snd_ice1712 *ice)
ice               920 sound/pci/ice1712/prodigy_hifi.c 		err = snd_ctl_add(ice->card,
ice               921 sound/pci/ice1712/prodigy_hifi.c 				  snd_ctl_new1(&prodigy_hd2_controls[i], ice));
ice               926 sound/pci/ice1712/prodigy_hifi.c 	wm_proc_init(ice);
ice               931 sound/pci/ice1712/prodigy_hifi.c static void wm8766_init(struct snd_ice1712 *ice)
ice               951 sound/pci/ice1712/prodigy_hifi.c 		wm8766_spi_write(ice, wm8766_inits[i], wm8766_inits[i + 1]);
ice               954 sound/pci/ice1712/prodigy_hifi.c static void wm8776_init(struct snd_ice1712 *ice)
ice               970 sound/pci/ice1712/prodigy_hifi.c 		wm_put(ice, wm8776_inits[i], wm8776_inits[i + 1]);
ice               974 sound/pci/ice1712/prodigy_hifi.c static int prodigy_hifi_resume(struct snd_ice1712 *ice)
ice               994 sound/pci/ice1712/prodigy_hifi.c 	struct prodigy_hifi_spec *spec = ice->spec;
ice               997 sound/pci/ice1712/prodigy_hifi.c 	mutex_lock(&ice->gpio_mutex);
ice              1000 sound/pci/ice1712/prodigy_hifi.c 	wm8776_init(ice);
ice              1003 sound/pci/ice1712/prodigy_hifi.c 		wm_put(ice, wm8776_reinit_registers[i],
ice              1004 sound/pci/ice1712/prodigy_hifi.c 		       wm_get(ice, wm8776_reinit_registers[i]));
ice              1007 sound/pci/ice1712/prodigy_hifi.c 	wm8766_init(ice);
ice              1009 sound/pci/ice1712/prodigy_hifi.c 		wm_set_vol(ice, WM_DAC_ATTEN_L + ch,
ice              1012 sound/pci/ice1712/prodigy_hifi.c 		wm8766_set_vol(ice, WM8766_LDA1 + ch,
ice              1015 sound/pci/ice1712/prodigy_hifi.c 		wm8766_set_vol(ice, WM8766_LDA2 + ch,
ice              1018 sound/pci/ice1712/prodigy_hifi.c 		wm8766_set_vol(ice, WM8766_LDA3 + ch,
ice              1023 sound/pci/ice1712/prodigy_hifi.c 	wm_put(ice, WM_DAC_MUTE, 0x00);
ice              1024 sound/pci/ice1712/prodigy_hifi.c 	wm_put(ice, WM_DAC_CTRL1, 0x90);
ice              1026 sound/pci/ice1712/prodigy_hifi.c 	mutex_unlock(&ice->gpio_mutex);
ice              1034 sound/pci/ice1712/prodigy_hifi.c static int prodigy_hifi_init(struct snd_ice1712 *ice)
ice              1067 sound/pci/ice1712/prodigy_hifi.c 	ice->vt1720 = 0;
ice              1068 sound/pci/ice1712/prodigy_hifi.c 	ice->vt1724 = 1;
ice              1070 sound/pci/ice1712/prodigy_hifi.c 	ice->num_total_dacs = 8;
ice              1071 sound/pci/ice1712/prodigy_hifi.c 	ice->num_total_adcs = 1;
ice              1076 sound/pci/ice1712/prodigy_hifi.c 	ice->gpio.saved[0] = 0;
ice              1079 sound/pci/ice1712/prodigy_hifi.c 	ice->akm = kzalloc(sizeof(struct snd_akm4xxx), GFP_KERNEL);
ice              1080 sound/pci/ice1712/prodigy_hifi.c 	if (! ice->akm)
ice              1082 sound/pci/ice1712/prodigy_hifi.c 	ice->akm_codecs = 1;
ice              1087 sound/pci/ice1712/prodigy_hifi.c 	ice->spec = spec;
ice              1090 sound/pci/ice1712/prodigy_hifi.c 	wm8776_init(ice);
ice              1093 sound/pci/ice1712/prodigy_hifi.c 		wm_put(ice, wm8776_defaults[i], wm8776_defaults[i + 1]);
ice              1095 sound/pci/ice1712/prodigy_hifi.c 	wm8766_init(ice);
ice              1098 sound/pci/ice1712/prodigy_hifi.c 	ice->pm_resume = &prodigy_hifi_resume;
ice              1099 sound/pci/ice1712/prodigy_hifi.c 	ice->pm_suspend_enabled = 1;
ice              1109 sound/pci/ice1712/prodigy_hifi.c static void ak4396_init(struct snd_ice1712 *ice)
ice              1123 sound/pci/ice1712/prodigy_hifi.c 	ak4396_write(ice, AK4396_CTRL1, 0x86);
ice              1125 sound/pci/ice1712/prodigy_hifi.c 	ak4396_write(ice, AK4396_CTRL1, 0x87);
ice              1128 sound/pci/ice1712/prodigy_hifi.c 		ak4396_write(ice, ak4396_inits[i], ak4396_inits[i+1]);
ice              1132 sound/pci/ice1712/prodigy_hifi.c static int prodigy_hd2_resume(struct snd_ice1712 *ice)
ice              1135 sound/pci/ice1712/prodigy_hifi.c 	struct prodigy_hifi_spec *spec = ice->spec;
ice              1137 sound/pci/ice1712/prodigy_hifi.c 	mutex_lock(&ice->gpio_mutex);
ice              1138 sound/pci/ice1712/prodigy_hifi.c 	ak4396_init(ice);
ice              1140 sound/pci/ice1712/prodigy_hifi.c 		ak4396_write(ice, AK4396_LCH_ATT + i, spec->vol[i] & 0xff);
ice              1141 sound/pci/ice1712/prodigy_hifi.c 	mutex_unlock(&ice->gpio_mutex);
ice              1146 sound/pci/ice1712/prodigy_hifi.c static int prodigy_hd2_init(struct snd_ice1712 *ice)
ice              1150 sound/pci/ice1712/prodigy_hifi.c 	ice->vt1720 = 0;
ice              1151 sound/pci/ice1712/prodigy_hifi.c 	ice->vt1724 = 1;
ice              1153 sound/pci/ice1712/prodigy_hifi.c 	ice->num_total_dacs = 1;
ice              1154 sound/pci/ice1712/prodigy_hifi.c 	ice->num_total_adcs = 1;
ice              1159 sound/pci/ice1712/prodigy_hifi.c 	ice->gpio.saved[0] = 0;
ice              1162 sound/pci/ice1712/prodigy_hifi.c 	ice->akm = kzalloc(sizeof(struct snd_akm4xxx), GFP_KERNEL);
ice              1163 sound/pci/ice1712/prodigy_hifi.c 	if (! ice->akm)
ice              1165 sound/pci/ice1712/prodigy_hifi.c 	ice->akm_codecs = 1;
ice              1170 sound/pci/ice1712/prodigy_hifi.c 	ice->spec = spec;
ice              1173 sound/pci/ice1712/prodigy_hifi.c 	ice->pm_resume = &prodigy_hd2_resume;
ice              1174 sound/pci/ice1712/prodigy_hifi.c 	ice->pm_suspend_enabled = 1;
ice              1177 sound/pci/ice1712/prodigy_hifi.c 	ak4396_init(ice);
ice                25 sound/pci/ice1712/psc724.c 	struct snd_ice1712 *ice;
ice               107 sound/pci/ice1712/psc724.c 	struct snd_ice1712 *ice = spec->ice;
ice               111 sound/pci/ice1712/psc724.c 	snd_ice1712_save_gpio_status(ice);
ice               114 sound/pci/ice1712/psc724.c 	snd_ice1712_gpio_set_dir(ice, ice->gpio.direction | PSC724_SPI_MASK);
ice               115 sound/pci/ice1712/psc724.c 	snd_ice1712_gpio_set_mask(ice, ice->gpio.write_mask & ~PSC724_SPI_MASK);
ice               116 sound/pci/ice1712/psc724.c 	bits = snd_ice1712_gpio_read(ice) & ~PSC724_SPI_MASK;
ice               117 sound/pci/ice1712/psc724.c 	snd_ice1712_gpio_write(ice, bits);
ice               128 sound/pci/ice1712/psc724.c 		snd_ice1712_gpio_write(ice, bits);
ice               132 sound/pci/ice1712/psc724.c 		snd_ice1712_gpio_write(ice, bits);
ice               137 sound/pci/ice1712/psc724.c 	snd_ice1712_gpio_write(ice, bits);
ice               141 sound/pci/ice1712/psc724.c 	snd_ice1712_gpio_write(ice, bits);
ice               143 sound/pci/ice1712/psc724.c 	snd_ice1712_restore_gpio_status(ice);
ice               150 sound/pci/ice1712/psc724.c 	snd_vt1724_write_i2c(spec->ice, 0x34, addr, data);
ice               155 sound/pci/ice1712/psc724.c static void psc724_set_master_switch(struct snd_ice1712 *ice, bool on)
ice               157 sound/pci/ice1712/psc724.c 	unsigned int bits = snd_ice1712_gpio_read(ice);
ice               158 sound/pci/ice1712/psc724.c 	struct psc724_spec *spec = ice->spec;
ice               165 sound/pci/ice1712/psc724.c 	snd_ice1712_gpio_write(ice, bits);
ice               168 sound/pci/ice1712/psc724.c static bool psc724_get_master_switch(struct snd_ice1712 *ice)
ice               170 sound/pci/ice1712/psc724.c 	struct psc724_spec *spec = ice->spec;
ice               177 sound/pci/ice1712/psc724.c static void psc724_set_jack_state(struct snd_ice1712 *ice, bool hp_connected)
ice               179 sound/pci/ice1712/psc724.c 	struct psc724_spec *spec = ice->spec;
ice               184 sound/pci/ice1712/psc724.c 	psc724_set_master_switch(ice, !hp_connected);
ice               194 sound/pci/ice1712/psc724.c 	kctl = snd_ctl_find_id(ice->card, &elem_id);
ice               195 sound/pci/ice1712/psc724.c 	snd_ctl_notify(ice->card, SNDRV_CTL_EVENT_MASK_VALUE, &kctl->id);
ice               199 sound/pci/ice1712/psc724.c 	kctl = snd_ctl_find_id(ice->card, &elem_id);
ice               200 sound/pci/ice1712/psc724.c 	snd_ctl_notify(ice->card, SNDRV_CTL_EVENT_MASK_VALUE, &kctl->id);
ice               207 sound/pci/ice1712/psc724.c 	struct snd_ice1712 *ice = spec->ice;
ice               208 sound/pci/ice1712/psc724.c 	bool hp_connected = snd_ice1712_gpio_read(ice) & GPIO_HP_JACK;
ice               213 sound/pci/ice1712/psc724.c 	psc724_set_jack_state(ice, hp_connected);
ice               216 sound/pci/ice1712/psc724.c static void psc724_set_jack_detection(struct snd_ice1712 *ice, bool on)
ice               218 sound/pci/ice1712/psc724.c 	struct psc724_spec *spec = ice->spec;
ice               225 sound/pci/ice1712/psc724.c 		bool hp_connected = snd_ice1712_gpio_read(ice) & GPIO_HP_JACK;
ice               226 sound/pci/ice1712/psc724.c 		psc724_set_jack_state(ice, hp_connected);
ice               233 sound/pci/ice1712/psc724.c static bool psc724_get_jack_detection(struct snd_ice1712 *ice)
ice               235 sound/pci/ice1712/psc724.c 	struct psc724_spec *spec = ice->spec;
ice               244 sound/pci/ice1712/psc724.c 	void (*set)(struct snd_ice1712 *ice, bool on);
ice               245 sound/pci/ice1712/psc724.c 	bool (*get)(struct snd_ice1712 *ice);
ice               264 sound/pci/ice1712/psc724.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               267 sound/pci/ice1712/psc724.c 	ucontrol->value.integer.value[0] = psc724_cont[n].get(ice);
ice               275 sound/pci/ice1712/psc724.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               278 sound/pci/ice1712/psc724.c 	psc724_cont[n].set(ice, ucontrol->value.integer.value[0]);
ice               305 sound/pci/ice1712/psc724.c static int psc724_add_controls(struct snd_ice1712 *ice)
ice               310 sound/pci/ice1712/psc724.c 	struct psc724_spec *spec = ice->spec;
ice               350 sound/pci/ice1712/psc724.c 		ctl = snd_ctl_new1(&cont, ice);
ice               353 sound/pci/ice1712/psc724.c 		err = snd_ctl_add(ice->card, ctl);
ice               361 sound/pci/ice1712/psc724.c static void psc724_set_pro_rate(struct snd_ice1712 *ice, unsigned int rate)
ice               363 sound/pci/ice1712/psc724.c 	struct psc724_spec *spec = ice->spec;
ice               372 sound/pci/ice1712/psc724.c static int psc724_resume(struct snd_ice1712 *ice)
ice               374 sound/pci/ice1712/psc724.c 	struct psc724_spec *spec = ice->spec;
ice               385 sound/pci/ice1712/psc724.c static int psc724_init(struct snd_ice1712 *ice)
ice               392 sound/pci/ice1712/psc724.c 	ice->spec = spec;
ice               393 sound/pci/ice1712/psc724.c 	spec->ice = ice;
ice               395 sound/pci/ice1712/psc724.c 	ice->num_total_dacs = 6;
ice               396 sound/pci/ice1712/psc724.c 	ice->num_total_adcs = 2;
ice               398 sound/pci/ice1712/psc724.c 	spec->wm8776.card = ice->card;
ice               401 sound/pci/ice1712/psc724.c 	spec->wm8766.card = ice->card;
ice               403 sound/pci/ice1712/psc724.c 	ice->pm_resume = psc724_resume;
ice               404 sound/pci/ice1712/psc724.c 	ice->pm_suspend_enabled = 1;
ice               409 sound/pci/ice1712/psc724.c 	ice->gpio.set_pro_rate = psc724_set_pro_rate;
ice               411 sound/pci/ice1712/psc724.c 	psc724_set_jack_detection(ice, true);
ice               415 sound/pci/ice1712/psc724.c static void psc724_exit(struct snd_ice1712 *ice)
ice               417 sound/pci/ice1712/psc724.c 	struct psc724_spec *spec = ice->spec;
ice                33 sound/pci/ice1712/quartet.c 	void (*set_register)(struct snd_ice1712 *ice, unsigned int val);
ice                34 sound/pci/ice1712/quartet.c 	unsigned int (*get_register)(struct snd_ice1712 *ice);
ice               263 sound/pci/ice1712/quartet.c 	struct snd_ice1712 *ice = ak->private_data[0];
ice               269 sound/pci/ice1712/quartet.c 	orig_dir = ice->gpio.get_dir(ice);
ice               270 sound/pci/ice1712/quartet.c 	ice->gpio.set_dir(ice, orig_dir | GPIO_SPI_ALL);
ice               272 sound/pci/ice1712/quartet.c 	ice->gpio.set_mask(ice, ~GPIO_SPI_ALL);
ice               274 sound/pci/ice1712/quartet.c 	tmp = ice->gpio.get_data(ice);
ice               277 sound/pci/ice1712/quartet.c 	ice->gpio.set_data(ice, tmp);
ice               285 sound/pci/ice1712/quartet.c 	ice->gpio.set_data(ice, tmp);
ice               294 sound/pci/ice1712/quartet.c 		ice->gpio.set_data(ice, tmp);
ice               301 sound/pci/ice1712/quartet.c 		ice->gpio.set_data(ice, tmp);
ice               305 sound/pci/ice1712/quartet.c 		ice->gpio.set_data(ice, tmp);
ice               310 sound/pci/ice1712/quartet.c 	ice->gpio.set_data(ice, tmp);
ice               314 sound/pci/ice1712/quartet.c 	ice->gpio.set_mask(ice, 0xffffff);
ice               316 sound/pci/ice1712/quartet.c 	ice->gpio.set_dir(ice, orig_dir);
ice               394 sound/pci/ice1712/quartet.c static void reg_write(struct snd_ice1712 *ice, unsigned int reg,
ice               399 sound/pci/ice1712/quartet.c 	mutex_lock(&ice->gpio_mutex);
ice               403 sound/pci/ice1712/quartet.c 	ice->gpio.set_dir(ice, tmp);
ice               405 sound/pci/ice1712/quartet.c 	ice->gpio.set_mask(ice, ~(tmp));
ice               407 sound/pci/ice1712/quartet.c 	tmp = ice->gpio.get_data(ice);
ice               410 sound/pci/ice1712/quartet.c 	ice->gpio.set_data(ice, tmp);
ice               414 sound/pci/ice1712/quartet.c 	ice->gpio.set_data(ice, tmp);
ice               418 sound/pci/ice1712/quartet.c 	ice->gpio.set_data(ice, tmp);
ice               422 sound/pci/ice1712/quartet.c 	ice->gpio.set_data(ice, tmp);
ice               427 sound/pci/ice1712/quartet.c 	ice->gpio.set_data(ice, tmp);
ice               429 sound/pci/ice1712/quartet.c 	ice->gpio.set_mask(ice, 0xffffff);
ice               431 sound/pci/ice1712/quartet.c 	ice->gpio.set_dir(ice, 0x00ff00);
ice               432 sound/pci/ice1712/quartet.c 	mutex_unlock(&ice->gpio_mutex);
ice               435 sound/pci/ice1712/quartet.c static unsigned int get_scr(struct snd_ice1712 *ice)
ice               437 sound/pci/ice1712/quartet.c 	struct qtet_spec *spec = ice->spec;
ice               441 sound/pci/ice1712/quartet.c static unsigned int get_mcr(struct snd_ice1712 *ice)
ice               443 sound/pci/ice1712/quartet.c 	struct qtet_spec *spec = ice->spec;
ice               447 sound/pci/ice1712/quartet.c static unsigned int get_cpld(struct snd_ice1712 *ice)
ice               449 sound/pci/ice1712/quartet.c 	struct qtet_spec *spec = ice->spec;
ice               453 sound/pci/ice1712/quartet.c static void set_scr(struct snd_ice1712 *ice, unsigned int val)
ice               455 sound/pci/ice1712/quartet.c 	struct qtet_spec *spec = ice->spec;
ice               456 sound/pci/ice1712/quartet.c 	reg_write(ice, GPIO_SCR, val);
ice               460 sound/pci/ice1712/quartet.c static void set_mcr(struct snd_ice1712 *ice, unsigned int val)
ice               462 sound/pci/ice1712/quartet.c 	struct qtet_spec *spec = ice->spec;
ice               463 sound/pci/ice1712/quartet.c 	reg_write(ice, GPIO_MCR, val);
ice               467 sound/pci/ice1712/quartet.c static void set_cpld(struct snd_ice1712 *ice, unsigned int val)
ice               469 sound/pci/ice1712/quartet.c 	struct qtet_spec *spec = ice->spec;
ice               470 sound/pci/ice1712/quartet.c 	reg_write(ice, GPIO_CPLD_CSN, val);
ice               477 sound/pci/ice1712/quartet.c 	struct snd_ice1712 *ice = entry->private_data;
ice               481 sound/pci/ice1712/quartet.c 				get_scr(ice)));
ice               483 sound/pci/ice1712/quartet.c 				get_mcr(ice)));
ice               485 sound/pci/ice1712/quartet.c 				get_cpld(ice)));
ice               488 sound/pci/ice1712/quartet.c static void proc_init(struct snd_ice1712 *ice)
ice               490 sound/pci/ice1712/quartet.c 	snd_card_ro_proc_new(ice->card, "quartet", ice, proc_regs_read);
ice               496 sound/pci/ice1712/quartet.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               498 sound/pci/ice1712/quartet.c 	val = get_scr(ice) & SCR_MUTE;
ice               506 sound/pci/ice1712/quartet.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               508 sound/pci/ice1712/quartet.c 	old = get_scr(ice) & SCR_MUTE;
ice               521 sound/pci/ice1712/quartet.c 		struct snd_akm4xxx *ak = ice->akm;
ice               522 sound/pci/ice1712/quartet.c 		set_scr(ice, (get_scr(ice) & ~SCR_MUTE) | new);
ice               542 sound/pci/ice1712/quartet.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               544 sound/pci/ice1712/quartet.c 	val = get_scr(ice) & (SCR_AIN12_SEL1 | SCR_AIN12_SEL0);
ice               567 sound/pci/ice1712/quartet.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               569 sound/pci/ice1712/quartet.c 	old = new = get_scr(ice);
ice               580 sound/pci/ice1712/quartet.c 			set_scr(ice, new);
ice               583 sound/pci/ice1712/quartet.c 			set_scr(ice, new);
ice               588 sound/pci/ice1712/quartet.c 			set_scr(ice, new);
ice               590 sound/pci/ice1712/quartet.c 			set_scr(ice, new);
ice               595 sound/pci/ice1712/quartet.c 			set_scr(ice, new);
ice               597 sound/pci/ice1712/quartet.c 			set_scr(ice, new);
ice               611 sound/pci/ice1712/quartet.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               614 sound/pci/ice1712/quartet.c 	val = get_scr(ice) & SCR_PHP_V;
ice               622 sound/pci/ice1712/quartet.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               624 sound/pci/ice1712/quartet.c 	old = new = get_scr(ice);
ice               630 sound/pci/ice1712/quartet.c 		set_scr(ice, new);
ice               633 sound/pci/ice1712/quartet.c 		set_scr(ice, new);
ice               639 sound/pci/ice1712/quartet.c 		set_scr(ice, new);
ice               642 sound/pci/ice1712/quartet.c 		set_scr(ice, new);
ice               687 sound/pci/ice1712/quartet.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               689 sound/pci/ice1712/quartet.c 		(private.get_register(ice) & private.bit) ? 1 : 0;
ice               698 sound/pci/ice1712/quartet.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               700 sound/pci/ice1712/quartet.c 	old = private.get_register(ice);
ice               706 sound/pci/ice1712/quartet.c 		private.set_register(ice, new);
ice               789 sound/pci/ice1712/quartet.c static int qtet_add_controls(struct snd_ice1712 *ice)
ice               791 sound/pci/ice1712/quartet.c 	struct qtet_spec *spec = ice->spec;
ice               794 sound/pci/ice1712/quartet.c 	err = snd_ice1712_akm4xxx_build_controls(ice);
ice               798 sound/pci/ice1712/quartet.c 		err = snd_ctl_add(ice->card,
ice               799 sound/pci/ice1712/quartet.c 				snd_ctl_new1(&qtet_controls[i], ice));
ice               809 sound/pci/ice1712/quartet.c 	add_slaves(ice->card, vmaster, slave_vols);
ice               810 sound/pci/ice1712/quartet.c 	err = snd_ctl_add(ice->card, vmaster);
ice               815 sound/pci/ice1712/quartet.c 			ice->pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream);
ice               818 sound/pci/ice1712/quartet.c static inline int qtet_is_spdif_master(struct snd_ice1712 *ice)
ice               821 sound/pci/ice1712/quartet.c 	return (get_cpld(ice) & CPLD_SYNC_SEL) ? 1 : 0;
ice               824 sound/pci/ice1712/quartet.c static unsigned int qtet_get_rate(struct snd_ice1712 *ice)
ice               829 sound/pci/ice1712/quartet.c 	result =  get_cpld(ice) & CPLD_CKS_MASK;
ice               846 sound/pci/ice1712/quartet.c static void qtet_set_rate(struct snd_ice1712 *ice, unsigned int rate)
ice               851 sound/pci/ice1712/quartet.c 	val = inb(ICEMT1724(ice, RATE));
ice               852 sound/pci/ice1712/quartet.c 	outb(val | VT1724_SPDIF_MASTER, ICEMT1724(ice, RATE));
ice               854 sound/pci/ice1712/quartet.c 	new =  (get_cpld(ice) & ~CPLD_CKS_MASK) | get_cks_val(rate);
ice               859 sound/pci/ice1712/quartet.c 	set_cpld(ice, new);
ice               862 sound/pci/ice1712/quartet.c static inline unsigned char qtet_set_mclk(struct snd_ice1712 *ice,
ice               870 sound/pci/ice1712/quartet.c static int qtet_set_spdif_clock(struct snd_ice1712 *ice, int type)
ice               874 sound/pci/ice1712/quartet.c 	old = new = get_cpld(ice);
ice               890 sound/pci/ice1712/quartet.c 		set_cpld(ice, new);
ice               897 sound/pci/ice1712/quartet.c static int qtet_get_spdif_master_type(struct snd_ice1712 *ice)
ice               901 sound/pci/ice1712/quartet.c 	val = get_cpld(ice);
ice               931 sound/pci/ice1712/quartet.c 	struct snd_ice1712 *ice = ak4113->change_callback_private;
ice               933 sound/pci/ice1712/quartet.c 	if ((qtet_get_spdif_master_type(ice) == EXT_SPDIF_TYPE) &&
ice               939 sound/pci/ice1712/quartet.c 		qtet_akm_set_rate_val(ice->akm, rate);
ice               947 sound/pci/ice1712/quartet.c static void qtet_spdif_in_open(struct snd_ice1712 *ice,
ice               950 sound/pci/ice1712/quartet.c 	struct qtet_spec *spec = ice->spec;
ice               954 sound/pci/ice1712/quartet.c 	if (qtet_get_spdif_master_type(ice) != EXT_SPDIF_TYPE)
ice               968 sound/pci/ice1712/quartet.c static int qtet_init(struct snd_ice1712 *ice)
ice               988 sound/pci/ice1712/quartet.c 	val = inb(ICEMT1724(ice, RATE));
ice               989 sound/pci/ice1712/quartet.c 	outb(val | VT1724_SPDIF_MASTER, ICEMT1724(ice, RATE));
ice               995 sound/pci/ice1712/quartet.c 	ice->hw_rates = &qtet_rates_info;
ice               996 sound/pci/ice1712/quartet.c 	ice->is_spdif_master = qtet_is_spdif_master;
ice               997 sound/pci/ice1712/quartet.c 	ice->get_rate = qtet_get_rate;
ice               998 sound/pci/ice1712/quartet.c 	ice->set_rate = qtet_set_rate;
ice               999 sound/pci/ice1712/quartet.c 	ice->set_mclk = qtet_set_mclk;
ice              1000 sound/pci/ice1712/quartet.c 	ice->set_spdif_clock = qtet_set_spdif_clock;
ice              1001 sound/pci/ice1712/quartet.c 	ice->get_spdif_master_type = qtet_get_spdif_master_type;
ice              1002 sound/pci/ice1712/quartet.c 	ice->ext_clock_names = ext_clock_names;
ice              1003 sound/pci/ice1712/quartet.c 	ice->ext_clock_count = ARRAY_SIZE(ext_clock_names);
ice              1006 sound/pci/ice1712/quartet.c 	ice->spdif.ops.open = ice->pro_open = qtet_spdif_in_open;
ice              1007 sound/pci/ice1712/quartet.c 	ice->spec = spec;
ice              1012 sound/pci/ice1712/quartet.c 	set_scr(ice, SCR_PHP);
ice              1015 sound/pci/ice1712/quartet.c 	set_scr(ice, SCR_PHP | SCR_CODEC_PDN);
ice              1018 sound/pci/ice1712/quartet.c 	set_mcr(ice, 0);
ice              1021 sound/pci/ice1712/quartet.c 	set_cpld(ice, 0);
ice              1024 sound/pci/ice1712/quartet.c 	ice->num_total_dacs = 2;
ice              1025 sound/pci/ice1712/quartet.c 	ice->num_total_adcs = 2;
ice              1027 sound/pci/ice1712/quartet.c 	ice->akm = kcalloc(2, sizeof(struct snd_akm4xxx), GFP_KERNEL);
ice              1028 sound/pci/ice1712/quartet.c 	ak = ice->akm;
ice              1032 sound/pci/ice1712/quartet.c 	ice->akm_codecs = 1;
ice              1033 sound/pci/ice1712/quartet.c 	err = snd_ice1712_akm4xxx_init(ak, &akm_qtet_dac, NULL, ice);
ice              1036 sound/pci/ice1712/quartet.c 	err = snd_ak4113_create(ice->card,
ice              1040 sound/pci/ice1712/quartet.c 			ice, &spec->ak4113);
ice              1045 sound/pci/ice1712/quartet.c 	spec->ak4113->change_callback_private = ice;
ice              1050 sound/pci/ice1712/quartet.c 	proc_init(ice);
ice              1052 sound/pci/ice1712/quartet.c 	qtet_set_rate(ice, 44100);
ice                27 sound/pci/ice1712/revo.c static void revo_i2s_mclk_changed(struct snd_ice1712 *ice)
ice                30 sound/pci/ice1712/revo.c 	outb(inb(ICEMT1724(ice, AC97_CMD)) | 0x80, ICEMT1724(ice, AC97_CMD));
ice                33 sound/pci/ice1712/revo.c 	outb(inb(ICEMT1724(ice, AC97_CMD)) & ~0x80, ICEMT1724(ice, AC97_CMD));
ice                83 sound/pci/ice1712/revo.c 	struct snd_ice1712 *ice = bus->private_data;
ice                84 sound/pci/ice1712/revo.c 	snd_ice1712_save_gpio_status(ice);
ice                89 sound/pci/ice1712/revo.c 	struct snd_ice1712 *ice = bus->private_data;
ice                90 sound/pci/ice1712/revo.c 	snd_ice1712_restore_gpio_status(ice);
ice                95 sound/pci/ice1712/revo.c 	struct snd_ice1712 *ice = bus->private_data;
ice               104 sound/pci/ice1712/revo.c 	ice->gpio.direction &= ~mask;
ice               105 sound/pci/ice1712/revo.c 	ice->gpio.direction |= val;
ice               106 sound/pci/ice1712/revo.c 	snd_ice1712_gpio_set_dir(ice, ice->gpio.direction);
ice               107 sound/pci/ice1712/revo.c 	snd_ice1712_gpio_set_mask(ice, ~mask);
ice               112 sound/pci/ice1712/revo.c 	struct snd_ice1712 *ice = bus->private_data;
ice               119 sound/pci/ice1712/revo.c 	snd_ice1712_gpio_write_bits(ice,
ice               127 sound/pci/ice1712/revo.c 	struct snd_ice1712 *ice = bus->private_data;
ice               132 sound/pci/ice1712/revo.c 	bit = snd_ice1712_gpio_read_bits(ice, VT1724_REVO_I2C_DATA) ? 1 : 0;
ice               144 sound/pci/ice1712/revo.c static int revo51_i2c_init(struct snd_ice1712 *ice,
ice               153 sound/pci/ice1712/revo.c 	ice->spec = spec;
ice               156 sound/pci/ice1712/revo.c 	err = snd_i2c_bus_create(ice->card, "ICE1724 GPIO6", NULL, &ice->i2c);
ice               160 sound/pci/ice1712/revo.c 	ice->i2c->private_data = ice;
ice               161 sound/pci/ice1712/revo.c 	ice->i2c->hw_ops.bit = &revo51_bit_ops;
ice               164 sound/pci/ice1712/revo.c 	err = snd_i2c_device_create(ice->i2c, "PT2258", 0x40, &spec->dev);
ice               168 sound/pci/ice1712/revo.c 	pt->card = ice->card;
ice               169 sound/pci/ice1712/revo.c 	pt->i2c_bus = ice->i2c;
ice               311 sound/pci/ice1712/revo.c 	struct snd_ice1712 *ice = ak->private_data[0];
ice               317 sound/pci/ice1712/revo.c 	snd_ice1712_gpio_write_bits(ice, 1 << 8, rate > 96000 ? 1 << 8 : 0);
ice               325 sound/pci/ice1712/revo.c 	snd_ice1712_gpio_write_bits(ice, 3 << 9, dfs << 9);
ice               327 sound/pci/ice1712/revo.c 	snd_ice1712_gpio_write_bits(ice, 1 << 11, 0);
ice               328 sound/pci/ice1712/revo.c 	snd_ice1712_gpio_write_bits(ice, 1 << 11, 1 << 11);
ice               364 sound/pci/ice1712/revo.c static void write_data(struct snd_ice1712 *ice, unsigned int gpio,
ice               370 sound/pci/ice1712/revo.c 		snd_ice1712_gpio_write(ice, gpio);
ice               377 sound/pci/ice1712/revo.c 		snd_ice1712_gpio_write(ice, gpio);
ice               381 sound/pci/ice1712/revo.c 		snd_ice1712_gpio_write(ice, gpio);
ice               386 sound/pci/ice1712/revo.c static unsigned char read_data(struct snd_ice1712 *ice, unsigned int gpio,
ice               394 sound/pci/ice1712/revo.c 		snd_ice1712_gpio_write(ice, gpio);
ice               397 sound/pci/ice1712/revo.c 		if (snd_ice1712_gpio_read(ice) & VT1724_REVO_CDIN)
ice               402 sound/pci/ice1712/revo.c 		snd_ice1712_gpio_write(ice, gpio);
ice               408 sound/pci/ice1712/revo.c static unsigned int ap192_4wire_start(struct snd_ice1712 *ice)
ice               412 sound/pci/ice1712/revo.c 	snd_ice1712_save_gpio_status(ice);
ice               413 sound/pci/ice1712/revo.c 	tmp = snd_ice1712_gpio_read(ice);
ice               417 sound/pci/ice1712/revo.c 	snd_ice1712_gpio_write(ice, tmp);
ice               422 sound/pci/ice1712/revo.c static void ap192_4wire_finish(struct snd_ice1712 *ice, unsigned int tmp)
ice               426 sound/pci/ice1712/revo.c 	snd_ice1712_gpio_write(ice, tmp);
ice               428 sound/pci/ice1712/revo.c 	snd_ice1712_restore_gpio_status(ice);
ice               434 sound/pci/ice1712/revo.c 	struct snd_ice1712 *ice = private_data;
ice               437 sound/pci/ice1712/revo.c 	tmp = ap192_4wire_start(ice);
ice               440 sound/pci/ice1712/revo.c 	write_data(ice, tmp, addrdata, 15);
ice               441 sound/pci/ice1712/revo.c 	ap192_4wire_finish(ice, tmp);
ice               446 sound/pci/ice1712/revo.c 	struct snd_ice1712 *ice = private_data;
ice               450 sound/pci/ice1712/revo.c 	tmp = ap192_4wire_start(ice);
ice               451 sound/pci/ice1712/revo.c 	write_data(ice, tmp, (AK4114_ADDR << 6) | (addr & 0x1f), 7);
ice               452 sound/pci/ice1712/revo.c 	data = read_data(ice, tmp, 7);
ice               453 sound/pci/ice1712/revo.c 	ap192_4wire_finish(ice, tmp);
ice               457 sound/pci/ice1712/revo.c static int ap192_ak4114_init(struct snd_ice1712 *ice)
ice               476 sound/pci/ice1712/revo.c 	ice->spec = spec;
ice               478 sound/pci/ice1712/revo.c 	err = snd_ak4114_create(ice->card,
ice               482 sound/pci/ice1712/revo.c 				 ice, &spec->ak4114);
ice               492 sound/pci/ice1712/revo.c static int revo_init(struct snd_ice1712 *ice)
ice               498 sound/pci/ice1712/revo.c 	switch (ice->eeprom.subvendor) {
ice               500 sound/pci/ice1712/revo.c 		ice->num_total_dacs = 8;
ice               501 sound/pci/ice1712/revo.c 		ice->num_total_adcs = 2;
ice               502 sound/pci/ice1712/revo.c 		ice->gpio.i2s_mclk_changed = revo_i2s_mclk_changed;
ice               505 sound/pci/ice1712/revo.c 		ice->num_total_dacs = 8;
ice               506 sound/pci/ice1712/revo.c 		ice->num_total_adcs = 2;
ice               509 sound/pci/ice1712/revo.c 		ice->num_total_dacs = 2;
ice               510 sound/pci/ice1712/revo.c 		ice->num_total_adcs = 2;
ice               518 sound/pci/ice1712/revo.c 	ak = ice->akm = kcalloc(2, sizeof(struct snd_akm4xxx), GFP_KERNEL);
ice               521 sound/pci/ice1712/revo.c 	switch (ice->eeprom.subvendor) {
ice               523 sound/pci/ice1712/revo.c 		ice->akm_codecs = 2;
ice               525 sound/pci/ice1712/revo.c 						&akm_revo_front_priv, ice);
ice               529 sound/pci/ice1712/revo.c 						&akm_revo_surround_priv, ice);
ice               533 sound/pci/ice1712/revo.c 		snd_ice1712_gpio_write_bits(ice, VT1724_REVO_MUTE,
ice               537 sound/pci/ice1712/revo.c 		ice->akm_codecs = 2;
ice               539 sound/pci/ice1712/revo.c 					       &akm_revo51_priv, ice);
ice               543 sound/pci/ice1712/revo.c 					       &akm_revo51_adc_priv, ice);
ice               546 sound/pci/ice1712/revo.c 		err = revo51_i2c_init(ice, &ptc_revo51_volume);
ice               550 sound/pci/ice1712/revo.c 		snd_ice1712_gpio_write_bits(ice, VT1724_REVO_MUTE,
ice               554 sound/pci/ice1712/revo.c 		ice->akm_codecs = 1;
ice               556 sound/pci/ice1712/revo.c 					       ice);
ice               559 sound/pci/ice1712/revo.c 		err = ap192_ak4114_init(ice);
ice               564 sound/pci/ice1712/revo.c 		snd_ice1712_gpio_write_bits(ice, VT1724_REVO_MUTE,
ice               573 sound/pci/ice1712/revo.c static int revo_add_controls(struct snd_ice1712 *ice)
ice               575 sound/pci/ice1712/revo.c 	struct revo51_spec *spec = ice->spec;
ice               578 sound/pci/ice1712/revo.c 	switch (ice->eeprom.subvendor) {
ice               580 sound/pci/ice1712/revo.c 		err = snd_ice1712_akm4xxx_build_controls(ice);
ice               585 sound/pci/ice1712/revo.c 		err = snd_ice1712_akm4xxx_build_controls(ice);
ice               588 sound/pci/ice1712/revo.c 		spec = ice->spec;
ice               594 sound/pci/ice1712/revo.c 		err = snd_ice1712_akm4xxx_build_controls(ice);
ice               599 sound/pci/ice1712/revo.c 		   ice->pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream);
ice               102 sound/pci/ice1712/se.c static void se200pci_WM8740_init(struct snd_ice1712 *ice)
ice               108 sound/pci/ice1712/se.c static void se200pci_WM8740_set_pro_rate(struct snd_ice1712 *ice,
ice               119 sound/pci/ice1712/se.c static void se200pci_WM8766_write(struct snd_ice1712 *ice,
ice               130 sound/pci/ice1712/se.c 	snd_ice1712_save_gpio_status(ice);
ice               133 sound/pci/ice1712/se.c 	snd_ice1712_gpio_set_dir(ice, ice->gpio.direction | ALL_MASK);
ice               134 sound/pci/ice1712/se.c 	snd_ice1712_gpio_set_mask(ice, ice->gpio.write_mask & ~ALL_MASK);
ice               135 sound/pci/ice1712/se.c 	bits = snd_ice1712_gpio_read(ice) & ~ALL_MASK;
ice               137 sound/pci/ice1712/se.c 	snd_ice1712_gpio_write(ice, bits);
ice               147 sound/pci/ice1712/se.c 		snd_ice1712_gpio_write(ice, bits);
ice               151 sound/pci/ice1712/se.c 		snd_ice1712_gpio_write(ice, bits);
ice               156 sound/pci/ice1712/se.c 	snd_ice1712_gpio_write(ice, bits);
ice               160 sound/pci/ice1712/se.c 	snd_ice1712_gpio_write(ice, bits);
ice               162 sound/pci/ice1712/se.c 	snd_ice1712_restore_gpio_status(ice);
ice               165 sound/pci/ice1712/se.c static void se200pci_WM8766_set_volume(struct snd_ice1712 *ice, int ch,
ice               170 sound/pci/ice1712/se.c 		se200pci_WM8766_write(ice, 0x000, vol1);
ice               171 sound/pci/ice1712/se.c 		se200pci_WM8766_write(ice, 0x001, vol2 | 0x100);
ice               174 sound/pci/ice1712/se.c 		se200pci_WM8766_write(ice, 0x004, vol1);
ice               175 sound/pci/ice1712/se.c 		se200pci_WM8766_write(ice, 0x005, vol2 | 0x100);
ice               178 sound/pci/ice1712/se.c 		se200pci_WM8766_write(ice, 0x006, vol1);
ice               179 sound/pci/ice1712/se.c 		se200pci_WM8766_write(ice, 0x007, vol2 | 0x100);
ice               184 sound/pci/ice1712/se.c static void se200pci_WM8766_init(struct snd_ice1712 *ice)
ice               186 sound/pci/ice1712/se.c 	se200pci_WM8766_write(ice, 0x1f, 0x000); /* RESET ALL */
ice               189 sound/pci/ice1712/se.c 	se200pci_WM8766_set_volume(ice, 0, 0, 0); /* volume L=0 R=0 */
ice               190 sound/pci/ice1712/se.c 	se200pci_WM8766_set_volume(ice, 1, 0, 0); /* volume L=0 R=0 */
ice               191 sound/pci/ice1712/se.c 	se200pci_WM8766_set_volume(ice, 2, 0, 0); /* volume L=0 R=0 */
ice               193 sound/pci/ice1712/se.c 	se200pci_WM8766_write(ice, 0x03, 0x022); /* serial mode I2S-24bits */
ice               194 sound/pci/ice1712/se.c 	se200pci_WM8766_write(ice, 0x0a, 0x080); /* MCLK=256fs */
ice               195 sound/pci/ice1712/se.c 	se200pci_WM8766_write(ice, 0x12, 0x000); /* MDP=0 */
ice               196 sound/pci/ice1712/se.c 	se200pci_WM8766_write(ice, 0x15, 0x000); /* MDP=0 */
ice               197 sound/pci/ice1712/se.c 	se200pci_WM8766_write(ice, 0x09, 0x000); /* demp=off mute=off */
ice               199 sound/pci/ice1712/se.c 	se200pci_WM8766_write(ice, 0x02, 0x124); /* ch-assign L=L R=R RESET */
ice               200 sound/pci/ice1712/se.c 	se200pci_WM8766_write(ice, 0x02, 0x120); /* ch-assign L=L R=R */
ice               203 sound/pci/ice1712/se.c static void se200pci_WM8766_set_pro_rate(struct snd_ice1712 *ice,
ice               207 sound/pci/ice1712/se.c 		se200pci_WM8766_write(ice, 0x0a, 0x000); /* MCLK=128fs */
ice               209 sound/pci/ice1712/se.c 		se200pci_WM8766_write(ice, 0x0a, 0x080); /* MCLK=256fs */
ice               217 sound/pci/ice1712/se.c static void se200pci_WM8776_write(struct snd_ice1712 *ice,
ice               223 sound/pci/ice1712/se.c 	snd_vt1724_write_i2c(ice, 0x34, val >> 8, val & 0xff);
ice               227 sound/pci/ice1712/se.c static void se200pci_WM8776_set_output_volume(struct snd_ice1712 *ice,
ice               230 sound/pci/ice1712/se.c 	se200pci_WM8776_write(ice, 0x03, vol1);
ice               231 sound/pci/ice1712/se.c 	se200pci_WM8776_write(ice, 0x04, vol2 | 0x100);
ice               234 sound/pci/ice1712/se.c static void se200pci_WM8776_set_input_volume(struct snd_ice1712 *ice,
ice               237 sound/pci/ice1712/se.c 	se200pci_WM8776_write(ice, 0x0e, vol1);
ice               238 sound/pci/ice1712/se.c 	se200pci_WM8776_write(ice, 0x0f, vol2 | 0x100);
ice               245 sound/pci/ice1712/se.c static void se200pci_WM8776_set_input_selector(struct snd_ice1712 *ice,
ice               254 sound/pci/ice1712/se.c 	se200pci_WM8776_write(ice, 0x15, vals[sel]);
ice               257 sound/pci/ice1712/se.c static void se200pci_WM8776_set_afl(struct snd_ice1712 *ice, unsigned int afl)
ice               261 sound/pci/ice1712/se.c 		se200pci_WM8776_write(ice, 0x16, 0x005);
ice               263 sound/pci/ice1712/se.c 		se200pci_WM8776_write(ice, 0x16, 0x001);
ice               270 sound/pci/ice1712/se.c static void se200pci_WM8776_set_agc(struct snd_ice1712 *ice, unsigned int agc)
ice               275 sound/pci/ice1712/se.c 		se200pci_WM8776_write(ice, 0x11, 0x000); /* Off */
ice               278 sound/pci/ice1712/se.c 		se200pci_WM8776_write(ice, 0x10, 0x07b);
ice               279 sound/pci/ice1712/se.c 		se200pci_WM8776_write(ice, 0x11, 0x100); /* LimiterMode */
ice               282 sound/pci/ice1712/se.c 		se200pci_WM8776_write(ice, 0x10, 0x1fb);
ice               283 sound/pci/ice1712/se.c 		se200pci_WM8776_write(ice, 0x11, 0x100); /* ALCMode */
ice               288 sound/pci/ice1712/se.c static void se200pci_WM8776_init(struct snd_ice1712 *ice)
ice               300 sound/pci/ice1712/se.c 	se200pci_WM8776_write(ice, 0x17, 0x000); /* reset all */
ice               306 sound/pci/ice1712/se.c 		se200pci_WM8776_write(ice, i, default_values[i]);
ice               308 sound/pci/ice1712/se.c 	se200pci_WM8776_set_input_selector(ice, 0);
ice               309 sound/pci/ice1712/se.c 	se200pci_WM8776_set_afl(ice, 0);
ice               310 sound/pci/ice1712/se.c 	se200pci_WM8776_set_agc(ice, 0);
ice               311 sound/pci/ice1712/se.c 	se200pci_WM8776_set_input_volume(ice, 0, 0);
ice               312 sound/pci/ice1712/se.c 	se200pci_WM8776_set_output_volume(ice, 0, 0);
ice               315 sound/pci/ice1712/se.c 	se200pci_WM8776_write(ice, 0x00, 0);
ice               316 sound/pci/ice1712/se.c 	se200pci_WM8776_write(ice, 0x01, 0);
ice               317 sound/pci/ice1712/se.c 	se200pci_WM8776_write(ice, 0x02, 0x100);
ice               318 sound/pci/ice1712/se.c 	se200pci_WM8776_write(ice, 0x0d, 0x080);
ice               321 sound/pci/ice1712/se.c static void se200pci_WM8776_set_pro_rate(struct snd_ice1712 *ice,
ice               332 sound/pci/ice1712/se.c static void se200pci_set_pro_rate(struct snd_ice1712 *ice, unsigned int rate)
ice               334 sound/pci/ice1712/se.c 	se200pci_WM8740_set_pro_rate(ice, rate);
ice               335 sound/pci/ice1712/se.c 	se200pci_WM8766_set_pro_rate(ice, rate);
ice               336 sound/pci/ice1712/se.c 	se200pci_WM8776_set_pro_rate(ice, rate);
ice               447 sound/pci/ice1712/se.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kc);
ice               448 sound/pci/ice1712/se.c 	struct se_spec *spec = ice->spec;
ice               458 sound/pci/ice1712/se.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kc);
ice               459 sound/pci/ice1712/se.c 	struct se_spec *spec = ice->spec;
ice               468 sound/pci/ice1712/se.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kc);
ice               469 sound/pci/ice1712/se.c 	struct se_spec *spec = ice->spec;
ice               475 sound/pci/ice1712/se.c static void se200pci_cont_update(struct snd_ice1712 *ice, int n)
ice               477 sound/pci/ice1712/se.c 	struct se_spec *spec = ice->spec;
ice               480 sound/pci/ice1712/se.c 		se200pci_WM8766_set_volume(ice,
ice               487 sound/pci/ice1712/se.c 		se200pci_WM8776_set_input_volume(ice,
ice               493 sound/pci/ice1712/se.c 		se200pci_WM8776_set_output_volume(ice,
ice               499 sound/pci/ice1712/se.c 		se200pci_WM8776_set_input_selector(ice,
ice               504 sound/pci/ice1712/se.c 		se200pci_WM8776_set_agc(ice, spec->vol[n].ch1);
ice               508 sound/pci/ice1712/se.c 		se200pci_WM8776_set_afl(ice, spec->vol[n].ch1);
ice               519 sound/pci/ice1712/se.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kc);
ice               520 sound/pci/ice1712/se.c 	struct se_spec *spec = ice->spec;
ice               537 sound/pci/ice1712/se.c 		se200pci_cont_update(ice, n);
ice               545 sound/pci/ice1712/se.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kc);
ice               546 sound/pci/ice1712/se.c 	struct se_spec *spec = ice->spec;
ice               553 sound/pci/ice1712/se.c 		se200pci_cont_update(ice, n);
ice               562 sound/pci/ice1712/se.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kc);
ice               563 sound/pci/ice1712/se.c 	struct se_spec *spec = ice->spec;
ice               572 sound/pci/ice1712/se.c 		se200pci_cont_update(ice, n);
ice               581 sound/pci/ice1712/se.c static int se200pci_add_controls(struct snd_ice1712 *ice)
ice               620 sound/pci/ice1712/se.c 		err = snd_ctl_add(ice->card, snd_ctl_new1(&cont, ice));
ice               659 sound/pci/ice1712/se.c static int se_init(struct snd_ice1712 *ice)
ice               666 sound/pci/ice1712/se.c 	ice->spec = spec;
ice               668 sound/pci/ice1712/se.c 	if (ice->eeprom.subvendor == VT1724_SUBDEVICE_SE90PCI) {
ice               669 sound/pci/ice1712/se.c 		ice->num_total_dacs = 2;
ice               670 sound/pci/ice1712/se.c 		ice->num_total_adcs = 0;
ice               671 sound/pci/ice1712/se.c 		ice->vt1720 = 1;
ice               674 sound/pci/ice1712/se.c 	} else if (ice->eeprom.subvendor == VT1724_SUBDEVICE_SE200PCI) {
ice               675 sound/pci/ice1712/se.c 		ice->num_total_dacs = 8;
ice               676 sound/pci/ice1712/se.c 		ice->num_total_adcs = 2;
ice               677 sound/pci/ice1712/se.c 		se200pci_WM8740_init(ice);
ice               678 sound/pci/ice1712/se.c 		se200pci_WM8766_init(ice);
ice               679 sound/pci/ice1712/se.c 		se200pci_WM8776_init(ice);
ice               680 sound/pci/ice1712/se.c 		ice->gpio.set_pro_rate = se200pci_set_pro_rate;
ice               687 sound/pci/ice1712/se.c static int se_add_controls(struct snd_ice1712 *ice)
ice               693 sound/pci/ice1712/se.c 	if (ice->eeprom.subvendor == VT1724_SUBDEVICE_SE200PCI)
ice               694 sound/pci/ice1712/se.c 		err = se200pci_add_controls(ice);
ice                20 sound/pci/ice1712/vt1720_mobo.c static int k8x800_init(struct snd_ice1712 *ice)
ice                22 sound/pci/ice1712/vt1720_mobo.c 	ice->vt1720 = 1;
ice                25 sound/pci/ice1712/vt1720_mobo.c 	ice->num_total_dacs = 6;
ice                26 sound/pci/ice1712/vt1720_mobo.c 	ice->num_total_adcs = 2;
ice                34 sound/pci/ice1712/vt1720_mobo.c static int k8x800_add_controls(struct snd_ice1712 *ice)
ice                35 sound/pci/ice1712/wtm.c static inline void stac9460_put(struct snd_ice1712 *ice, int reg,
ice                38 sound/pci/ice1712/wtm.c 	snd_vt1724_write_i2c(ice, STAC9460_I2C_ADDR, reg, val);
ice                41 sound/pci/ice1712/wtm.c static inline unsigned char stac9460_get(struct snd_ice1712 *ice, int reg)
ice                43 sound/pci/ice1712/wtm.c 	return snd_vt1724_read_i2c(ice, STAC9460_I2C_ADDR, reg);
ice                49 sound/pci/ice1712/wtm.c static inline void stac9460_2_put(struct snd_ice1712 *ice, int reg,
ice                52 sound/pci/ice1712/wtm.c 	snd_vt1724_write_i2c(ice, STAC9460_2_I2C_ADDR, reg, val);
ice                55 sound/pci/ice1712/wtm.c static inline unsigned char stac9460_2_get(struct snd_ice1712 *ice, int reg)
ice                57 sound/pci/ice1712/wtm.c 	return snd_vt1724_read_i2c(ice, STAC9460_2_I2C_ADDR, reg);
ice                64 sound/pci/ice1712/wtm.c static void stac9460_dac_mute_all(struct snd_ice1712 *ice, unsigned char mute,
ice                77 sound/pci/ice1712/wtm.c 			old = stac9460_get(ice, idx);
ice                81 sound/pci/ice1712/wtm.c 				stac9460_put(ice, idx, new);
ice                96 sound/pci/ice1712/wtm.c 			old = stac9460_2_get(ice, idx);
ice               100 sound/pci/ice1712/wtm.c 				stac9460_2_put(ice, idx, new);
ice               116 sound/pci/ice1712/wtm.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               117 sound/pci/ice1712/wtm.c 	struct wtm_spec *spec = ice->spec;
ice               131 sound/pci/ice1712/wtm.c 		val = stac9460_get(ice, idx);
ice               133 sound/pci/ice1712/wtm.c 		val = stac9460_2_get(ice, idx - 6);
ice               143 sound/pci/ice1712/wtm.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               150 sound/pci/ice1712/wtm.c 		old = stac9460_get(ice, idx);
ice               155 sound/pci/ice1712/wtm.c 			stac9460_put(ice, idx, new);
ice               156 sound/pci/ice1712/wtm.c 			stac9460_2_put(ice, idx, new);
ice               162 sound/pci/ice1712/wtm.c 			old = stac9460_get(ice, idx);
ice               164 sound/pci/ice1712/wtm.c 			old = stac9460_2_get(ice, idx - 6);
ice               170 sound/pci/ice1712/wtm.c 				stac9460_put(ice, idx, new);
ice               172 sound/pci/ice1712/wtm.c 				stac9460_2_put(ice, idx - 6, new);
ice               194 sound/pci/ice1712/wtm.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               206 sound/pci/ice1712/wtm.c 		vol = stac9460_get(ice, idx) & 0x7f;
ice               208 sound/pci/ice1712/wtm.c 		vol = stac9460_2_get(ice, idx - 6) & 0x7f;
ice               216 sound/pci/ice1712/wtm.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               224 sound/pci/ice1712/wtm.c 		tmp = stac9460_get(ice, idx);
ice               228 sound/pci/ice1712/wtm.c 			stac9460_put(ice, idx, (0x7f - nvol) | (tmp & 0x80));
ice               229 sound/pci/ice1712/wtm.c 			stac9460_2_put(ice, idx, (0x7f - nvol) | (tmp & 0x80));
ice               236 sound/pci/ice1712/wtm.c 			tmp = stac9460_get(ice, idx);
ice               238 sound/pci/ice1712/wtm.c 			tmp = stac9460_2_get(ice, idx - 6);
ice               243 sound/pci/ice1712/wtm.c 				stac9460_put(ice, idx, (0x7f - nvol) |
ice               246 sound/pci/ice1712/wtm.c 				stac9460_2_put(ice, idx-6, (0x7f - nvol) |
ice               261 sound/pci/ice1712/wtm.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               268 sound/pci/ice1712/wtm.c 			val = stac9460_get(ice, STAC946X_MIC_L_VOLUME + i);
ice               273 sound/pci/ice1712/wtm.c 			val = stac9460_2_get(ice, STAC946X_MIC_L_VOLUME + i);
ice               283 sound/pci/ice1712/wtm.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               292 sound/pci/ice1712/wtm.c 			old = stac9460_get(ice, reg);
ice               297 sound/pci/ice1712/wtm.c 				stac9460_put(ice, reg, new);
ice               302 sound/pci/ice1712/wtm.c 			old = stac9460_2_get(ice, reg);
ice               307 sound/pci/ice1712/wtm.c 				stac9460_2_put(ice, reg, new);
ice               329 sound/pci/ice1712/wtm.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               337 sound/pci/ice1712/wtm.c 			vol = stac9460_get(ice, reg) & 0x0f;
ice               343 sound/pci/ice1712/wtm.c 			vol = stac9460_2_get(ice, reg) & 0x0f;
ice               353 sound/pci/ice1712/wtm.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               363 sound/pci/ice1712/wtm.c 			ovol = 0x0f - stac9460_get(ice, reg);
ice               366 sound/pci/ice1712/wtm.c 				stac9460_put(ice, reg, (0x0f - nvol) |
ice               373 sound/pci/ice1712/wtm.c 			ovol = 0x0f - stac9460_2_get(ice, reg);
ice               376 sound/pci/ice1712/wtm.c 				stac9460_2_put(ice, reg, (0x0f - nvol) |
ice               398 sound/pci/ice1712/wtm.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               404 sound/pci/ice1712/wtm.c 		val = stac9460_get(ice, STAC946X_GENERAL_PURPOSE);
ice               406 sound/pci/ice1712/wtm.c 		val = stac9460_2_get(ice, STAC946X_GENERAL_PURPOSE);
ice               414 sound/pci/ice1712/wtm.c 	struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
ice               420 sound/pci/ice1712/wtm.c 		old = stac9460_get(ice, STAC946X_GENERAL_PURPOSE);
ice               422 sound/pci/ice1712/wtm.c 		old = stac9460_2_get(ice, STAC946X_GENERAL_PURPOSE);
ice               427 sound/pci/ice1712/wtm.c 			stac9460_put(ice, STAC946X_GENERAL_PURPOSE, new);
ice               429 sound/pci/ice1712/wtm.c 			stac9460_2_put(ice, STAC946X_GENERAL_PURPOSE, new);
ice               438 sound/pci/ice1712/wtm.c static void stac9460_set_rate_val(struct snd_ice1712 *ice, unsigned int rate)
ice               442 sound/pci/ice1712/wtm.c 	struct wtm_spec *spec = ice->spec;
ice               453 sound/pci/ice1712/wtm.c 	old = stac9460_get(ice, STAC946X_MASTER_CLOCKING);
ice               461 sound/pci/ice1712/wtm.c 	stac9460_dac_mute_all(ice, 0, &changed);
ice               463 sound/pci/ice1712/wtm.c 	stac9460_put(ice, STAC946X_MASTER_CLOCKING, new);
ice               464 sound/pci/ice1712/wtm.c 	stac9460_2_put(ice, STAC946X_MASTER_CLOCKING, new);
ice               468 sound/pci/ice1712/wtm.c 	stac9460_dac_mute_all(ice, 1, &changed);
ice               554 sound/pci/ice1712/wtm.c static int wtm_add_controls(struct snd_ice1712 *ice)
ice               560 sound/pci/ice1712/wtm.c 		err = snd_ctl_add(ice->card,
ice               561 sound/pci/ice1712/wtm.c 				snd_ctl_new1(&stac9640_controls[i], ice));
ice               568 sound/pci/ice1712/wtm.c static int wtm_init(struct snd_ice1712 *ice)
ice               579 sound/pci/ice1712/wtm.c 	ice->num_total_dacs = 8;
ice               580 sound/pci/ice1712/wtm.c 	ice->num_total_adcs = 4;
ice               581 sound/pci/ice1712/wtm.c 	ice->force_rdma1 = 1;
ice               587 sound/pci/ice1712/wtm.c 	ice->spec = spec;
ice               594 sound/pci/ice1712/wtm.c 		stac9460_put(ice, p[0], p[1]);
ice               595 sound/pci/ice1712/wtm.c 		stac9460_2_put(ice, p[0], p[1]);
ice               597 sound/pci/ice1712/wtm.c 	ice->gpio.set_pro_rate = stac9460_set_rate_val;