ac97               89 arch/arm/mach-dove/common.c 	struct clk *nand, *camera, *i2s0, *i2s1, *crypto, *ac97, *pdma;
ac97              106 arch/arm/mach-dove/common.c 	ac97 = dove_register_gate("ac97", "tclk", CLOCK_GATING_BIT_AC97);
ac97              131 arch/arm/mach-dove/common.c 	orion_clkdev_add(NULL, "dove-ac97", ac97);
ac97              198 arch/arm/mach-imx/mach-pca100.c static void pca100_ac97_warm_reset(struct snd_ac97 *ac97)
ac97              208 arch/arm/mach-imx/mach-pca100.c static void pca100_ac97_cold_reset(struct snd_ac97 *ac97)
ac97              210 arch/arm/mach-imx/mach-pcm043.c static void pcm043_ac97_warm_reset(struct snd_ac97 *ac97)
ac97              233 arch/arm/mach-imx/mach-pcm043.c static void pcm043_ac97_cold_reset(struct snd_ac97 *ac97)
ac97               47 drivers/base/regmap/regmap-ac97.c 	struct snd_ac97 *ac97 = context;
ac97               49 drivers/base/regmap/regmap-ac97.c 	*val = ac97->bus->ops->read(ac97, reg);
ac97               57 drivers/base/regmap/regmap-ac97.c 	struct snd_ac97 *ac97 = context;
ac97               59 drivers/base/regmap/regmap-ac97.c 	ac97->bus->ops->write(ac97, reg, val);
ac97               69 drivers/base/regmap/regmap-ac97.c struct regmap *__regmap_init_ac97(struct snd_ac97 *ac97,
ac97               74 drivers/base/regmap/regmap-ac97.c 	return __regmap_init(&ac97->dev, &ac97_regmap_bus, ac97, config,
ac97               79 drivers/base/regmap/regmap-ac97.c struct regmap *__devm_regmap_init_ac97(struct snd_ac97 *ac97,
ac97               84 drivers/base/regmap/regmap-ac97.c 	return __devm_regmap_init(&ac97->dev, &ac97_regmap_bus, ac97, config,
ac97               15 drivers/gpio/gpio-ucb1400.c 	ucb1400_gpio_set_direction(gpio->ac97, off, 0);
ac97               23 drivers/gpio/gpio-ucb1400.c 	ucb1400_gpio_set_direction(gpio->ac97, off, 1);
ac97               24 drivers/gpio/gpio-ucb1400.c 	ucb1400_gpio_set_value(gpio->ac97, off, val);
ac97               33 drivers/gpio/gpio-ucb1400.c 	return !!ucb1400_gpio_get_value(gpio->ac97, off);
ac97               40 drivers/gpio/gpio-ucb1400.c 	ucb1400_gpio_set_value(gpio->ac97, off, val);
ac97              177 drivers/input/touchscreen/mainstone-wm97xx.c 	if (wm->ac97 == NULL)
ac97               36 drivers/input/touchscreen/ucb1400_ts.c 	ucb1400_reg_write(ucb->ac97, UCB_TS_CR,
ac97               48 drivers/input/touchscreen/ucb1400_ts.c 	ucb1400_reg_write(ucb->ac97, UCB_TS_CR,
ac97               55 drivers/input/touchscreen/ucb1400_ts.c 	return ucb1400_adc_read(ucb->ac97, UCB_ADC_INP_TSPY, adcsync);
ac97               66 drivers/input/touchscreen/ucb1400_ts.c 	ucb1400_reg_write(ucb->ac97, UCB_TS_CR,
ac97               69 drivers/input/touchscreen/ucb1400_ts.c 	ucb1400_reg_write(ucb->ac97, UCB_TS_CR,
ac97               72 drivers/input/touchscreen/ucb1400_ts.c 	ucb1400_reg_write(ucb->ac97, UCB_TS_CR,
ac97               78 drivers/input/touchscreen/ucb1400_ts.c 	return ucb1400_adc_read(ucb->ac97, UCB_ADC_INP_TSPY, adcsync);
ac97               89 drivers/input/touchscreen/ucb1400_ts.c 	ucb1400_reg_write(ucb->ac97, UCB_TS_CR,
ac97               92 drivers/input/touchscreen/ucb1400_ts.c 	ucb1400_reg_write(ucb->ac97, UCB_TS_CR,
ac97               95 drivers/input/touchscreen/ucb1400_ts.c 	ucb1400_reg_write(ucb->ac97, UCB_TS_CR,
ac97              101 drivers/input/touchscreen/ucb1400_ts.c 	return ucb1400_adc_read(ucb->ac97, UCB_ADC_INP_TSPX, adcsync);
ac97              110 drivers/input/touchscreen/ucb1400_ts.c 	ucb1400_reg_write(ucb->ac97, UCB_TS_CR,
ac97              113 drivers/input/touchscreen/ucb1400_ts.c 	return ucb1400_adc_read(ucb->ac97, 0, adcsync);
ac97              122 drivers/input/touchscreen/ucb1400_ts.c 	ucb1400_reg_write(ucb->ac97, UCB_TS_CR,
ac97              125 drivers/input/touchscreen/ucb1400_ts.c 	return ucb1400_adc_read(ucb->ac97, 0, adcsync);
ac97              130 drivers/input/touchscreen/ucb1400_ts.c 	unsigned short val = ucb1400_reg_read(ucb->ac97, UCB_TS_CR);
ac97              137 drivers/input/touchscreen/ucb1400_ts.c 	ucb1400_reg_write(ucb->ac97, UCB_IE_CLEAR, UCB_IE_TSPX);
ac97              138 drivers/input/touchscreen/ucb1400_ts.c 	ucb1400_reg_write(ucb->ac97, UCB_IE_CLEAR, 0);
ac97              139 drivers/input/touchscreen/ucb1400_ts.c 	ucb1400_reg_write(ucb->ac97, UCB_IE_FAL, UCB_IE_TSPX);
ac97              144 drivers/input/touchscreen/ucb1400_ts.c 	ucb1400_reg_write(ucb->ac97, UCB_IE_FAL, 0);
ac97              167 drivers/input/touchscreen/ucb1400_ts.c 	isr = ucb1400_reg_read(ucb->ac97, UCB_IE_STATUS);
ac97              168 drivers/input/touchscreen/ucb1400_ts.c 	ucb1400_reg_write(ucb->ac97, UCB_IE_CLEAR, isr);
ac97              169 drivers/input/touchscreen/ucb1400_ts.c 	ucb1400_reg_write(ucb->ac97, UCB_IE_CLEAR, 0);
ac97              201 drivers/input/touchscreen/ucb1400_ts.c 		ucb1400_adc_enable(ucb->ac97);
ac97              205 drivers/input/touchscreen/ucb1400_ts.c 		ucb1400_adc_disable(ucb->ac97);
ac97              233 drivers/input/touchscreen/ucb1400_ts.c 	ucb1400_reg_write(ucb->ac97, UCB_TS_CR, 0);
ac97              281 drivers/input/touchscreen/ucb1400_ts.c 	ucb1400_reg_write(ucb->ac97, UCB_IE_RIS, UCB_IE_ADC);
ac97              282 drivers/input/touchscreen/ucb1400_ts.c 	ucb1400_reg_write(ucb->ac97, UCB_IE_FAL, UCB_IE_ADC);
ac97              283 drivers/input/touchscreen/ucb1400_ts.c 	ucb1400_reg_write(ucb->ac97, UCB_IE_CLEAR, 0xffff);
ac97              284 drivers/input/touchscreen/ucb1400_ts.c 	ucb1400_reg_write(ucb->ac97, UCB_IE_CLEAR, 0);
ac97              287 drivers/input/touchscreen/ucb1400_ts.c 	ucb1400_reg_write(ucb->ac97, UCB_ADC_CR, UCB_ADC_ENA);
ac97              288 drivers/input/touchscreen/ucb1400_ts.c 	ucb1400_reg_write(ucb->ac97, UCB_ADC_CR, UCB_ADC_ENA | UCB_ADC_START);
ac97              292 drivers/input/touchscreen/ucb1400_ts.c 	while (!(ucb1400_reg_read(ucb->ac97, UCB_ADC_DATA) &
ac97              301 drivers/input/touchscreen/ucb1400_ts.c 	ucb1400_reg_write(ucb->ac97, UCB_ADC_CR, 0);
ac97              304 drivers/input/touchscreen/ucb1400_ts.c 	ucb1400_reg_write(ucb->ac97, UCB_IE_RIS, 0);
ac97              305 drivers/input/touchscreen/ucb1400_ts.c 	ucb1400_reg_write(ucb->ac97, UCB_IE_FAL, 0);
ac97              306 drivers/input/touchscreen/ucb1400_ts.c 	ucb1400_reg_write(ucb->ac97, UCB_IE_CLEAR, 0xffff);
ac97              307 drivers/input/touchscreen/ucb1400_ts.c 	ucb1400_reg_write(ucb->ac97, UCB_IE_CLEAR, 0);
ac97              345 drivers/input/touchscreen/ucb1400_ts.c 	ucb->ts_idev->id.vendor		= ucb1400_reg_read(ucb->ac97,
ac97              358 drivers/input/touchscreen/ucb1400_ts.c 	fcsr = ucb1400_reg_read(ucb->ac97, UCB_FCSR);
ac97              359 drivers/input/touchscreen/ucb1400_ts.c 	ucb1400_reg_write(ucb->ac97, UCB_FCSR, fcsr | UCB_FCSR_AVE);
ac97              361 drivers/input/touchscreen/ucb1400_ts.c 	ucb1400_adc_enable(ucb->ac97);
ac97              364 drivers/input/touchscreen/ucb1400_ts.c 	ucb1400_adc_disable(ucb->ac97);
ac97               86 drivers/input/touchscreen/wm97xx-core.c 	if (wm->ac97)
ac97               87 drivers/input/touchscreen/wm97xx-core.c 		return wm->ac97->bus->ops->read(wm->ac97, reg);
ac97              107 drivers/input/touchscreen/wm97xx-core.c 	if (wm->ac97)
ac97              108 drivers/input/touchscreen/wm97xx-core.c 		wm->ac97->bus->ops->write(wm->ac97, reg, val);
ac97              738 drivers/input/touchscreen/wm97xx-core.c 	wm->ac97 = to_ac97_t(dev);
ac97              776 drivers/input/touchscreen/wm97xx-core.c 	wm->ac97 = mfd_pdata->ac97;
ac97              817 drivers/input/touchscreen/wm97xx-core.c 	wm->ac97->bus->ops->write(wm->ac97, AC97_WM97XX_DIGITISER2, reg);
ac97              144 drivers/input/touchscreen/zylonite-wm97xx.c 	if (wm->ac97 == NULL)
ac97              950 drivers/media/usb/em28xx/em28xx-audio.c 	if (dev->audio_mode.ac97 != EM28XX_NO_AC97) {
ac97              401 drivers/media/usb/em28xx/em28xx-core.c 	switch (dev->audio_mode.ac97) {
ac97              436 drivers/media/usb/em28xx/em28xx-core.c 	if (dev->audio_mode.ac97 != EM28XX_NO_AC97) {
ac97              460 drivers/media/usb/em28xx/em28xx-core.c 	if (dev->audio_mode.ac97 != EM28XX_NO_AC97) {
ac97              544 drivers/media/usb/em28xx/em28xx-core.c 		dev->audio_mode.ac97 = EM28XX_NO_AC97;
ac97              550 drivers/media/usb/em28xx/em28xx-core.c 	dev->audio_mode.ac97 = EM28XX_AC97_OTHER;
ac97              561 drivers/media/usb/em28xx/em28xx-core.c 		dev->audio_mode.ac97 = EM28XX_NO_AC97;
ac97              583 drivers/media/usb/em28xx/em28xx-core.c 		dev->audio_mode.ac97 = EM28XX_AC97_EM202;
ac97              585 drivers/media/usb/em28xx/em28xx-core.c 		dev->audio_mode.ac97 = EM28XX_AC97_SIGMATEL;
ac97              589 drivers/media/usb/em28xx/em28xx-core.c 	switch (dev->audio_mode.ac97) {
ac97             2646 drivers/media/usb/em28xx/em28xx-video.c 	if (dev->audio_mode.ac97 != EM28XX_NO_AC97) {
ac97              318 drivers/media/usb/em28xx/em28xx.h 	enum em28xx_ac97_mode ac97;
ac97               25 drivers/mfd/ucb1400_core.c unsigned int ucb1400_adc_read(struct snd_ac97 *ac97, u16 adc_channel,
ac97               33 drivers/mfd/ucb1400_core.c 	ucb1400_reg_write(ac97, UCB_ADC_CR, UCB_ADC_ENA | adc_channel);
ac97               34 drivers/mfd/ucb1400_core.c 	ucb1400_reg_write(ac97, UCB_ADC_CR, UCB_ADC_ENA | adc_channel |
ac97               37 drivers/mfd/ucb1400_core.c 	while (!((val = ucb1400_reg_read(ac97, UCB_ADC_DATA))
ac97               51 drivers/mfd/ucb1400_core.c 	struct snd_ac97 *ac97;
ac97               65 drivers/mfd/ucb1400_core.c 	ac97 = to_ac97_t(dev);
ac97               67 drivers/mfd/ucb1400_core.c 	ucb_ts.id = ucb1400_reg_read(ac97, UCB_ID);
ac97               74 drivers/mfd/ucb1400_core.c 	ucb_gpio.ac97 = ac97;
ac97               94 drivers/mfd/ucb1400_core.c 	ucb_ts.ac97 = ac97;
ac97               30 drivers/mfd/wm97xx-core.c 	struct snd_ac97 *ac97;
ac97              266 drivers/mfd/wm97xx-core.c 	wm97xx->ac97 = snd_ac97_compat_alloc(adev);
ac97              267 drivers/mfd/wm97xx-core.c 	if (IS_ERR(wm97xx->ac97))
ac97              268 drivers/mfd/wm97xx-core.c 		return PTR_ERR(wm97xx->ac97);
ac97              276 drivers/mfd/wm97xx-core.c 	codec_pdata->ac97 = wm97xx->ac97;
ac97              304 drivers/mfd/wm97xx-core.c 	codec_pdata->regmap = devm_regmap_init_ac97(wm97xx->ac97, config);
ac97              318 drivers/mfd/wm97xx-core.c 	snd_ac97_compat_release(wm97xx->ac97);
ac97              326 drivers/mfd/wm97xx-core.c 	snd_ac97_compat_release(wm97xx->ac97);
ac97               16 include/linux/mfd/wm97xx.h 	struct snd_ac97 *ac97;
ac97               17 include/linux/platform_data/asoc-imx-ssi.h 	void (*ac97_reset) (struct snd_ac97 *ac97);
ac97               18 include/linux/platform_data/asoc-imx-ssi.h 	void (*ac97_warm_reset)(struct snd_ac97 *ac97);
ac97              568 include/linux/regmap.h struct regmap *__regmap_init_ac97(struct snd_ac97 *ac97,
ac97              613 include/linux/regmap.h struct regmap *__devm_regmap_init_ac97(struct snd_ac97 *ac97,
ac97              797 include/linux/regmap.h #define regmap_init_ac97(ac97, config)					\
ac97              799 include/linux/regmap.h 				ac97, config)
ac97              956 include/linux/regmap.h #define devm_regmap_init_ac97(ac97, config)				\
ac97              958 include/linux/regmap.h 				ac97, config)
ac97               85 include/linux/ucb1400.h 	struct snd_ac97		*ac97;
ac97               95 include/linux/ucb1400.h 	struct snd_ac97		*ac97;
ac97              112 include/linux/ucb1400.h static inline u16 ucb1400_reg_read(struct snd_ac97 *ac97, u16 reg)
ac97              114 include/linux/ucb1400.h 	return ac97->bus->ops->read(ac97, reg);
ac97              117 include/linux/ucb1400.h static inline void ucb1400_reg_write(struct snd_ac97 *ac97, u16 reg, u16 val)
ac97              119 include/linux/ucb1400.h 	ac97->bus->ops->write(ac97, reg, val);
ac97              122 include/linux/ucb1400.h static inline u16 ucb1400_gpio_get_value(struct snd_ac97 *ac97, u16 gpio)
ac97              124 include/linux/ucb1400.h 	return ucb1400_reg_read(ac97, UCB_IO_DATA) & (1 << gpio);
ac97              127 include/linux/ucb1400.h static inline void ucb1400_gpio_set_value(struct snd_ac97 *ac97, u16 gpio,
ac97              130 include/linux/ucb1400.h 	ucb1400_reg_write(ac97, UCB_IO_DATA, val ?
ac97              131 include/linux/ucb1400.h 			ucb1400_reg_read(ac97, UCB_IO_DATA) | (1 << gpio) :
ac97              132 include/linux/ucb1400.h 			ucb1400_reg_read(ac97, UCB_IO_DATA) & ~(1 << gpio));
ac97              135 include/linux/ucb1400.h static inline u16 ucb1400_gpio_get_direction(struct snd_ac97 *ac97, u16 gpio)
ac97              137 include/linux/ucb1400.h 	return ucb1400_reg_read(ac97, UCB_IO_DIR) & (1 << gpio);
ac97              140 include/linux/ucb1400.h static inline void ucb1400_gpio_set_direction(struct snd_ac97 *ac97, u16 gpio,
ac97              143 include/linux/ucb1400.h 	ucb1400_reg_write(ac97, UCB_IO_DIR, dir ?
ac97              144 include/linux/ucb1400.h 			ucb1400_reg_read(ac97, UCB_IO_DIR) | (1 << gpio) :
ac97              145 include/linux/ucb1400.h 			ucb1400_reg_read(ac97, UCB_IO_DIR) & ~(1 << gpio));
ac97              148 include/linux/ucb1400.h static inline void ucb1400_adc_enable(struct snd_ac97 *ac97)
ac97              150 include/linux/ucb1400.h 	ucb1400_reg_write(ac97, UCB_ADC_CR, UCB_ADC_ENA);
ac97              153 include/linux/ucb1400.h static inline void ucb1400_adc_disable(struct snd_ac97 *ac97)
ac97              155 include/linux/ucb1400.h 	ucb1400_reg_write(ac97, UCB_ADC_CR, 0);
ac97              159 include/linux/ucb1400.h unsigned int ucb1400_adc_read(struct snd_ac97 *ac97, u16 adc_channel,
ac97              273 include/linux/wm97xx.h 	struct snd_ac97 *ac97;		/* ALSA codec access */
ac97               15 include/sound/ac97/compat.h void snd_ac97_compat_release(struct snd_ac97 *ac97);
ac97              178 include/sound/ac97_codec.h 	int (*build_3d) (struct snd_ac97 *ac97);
ac97              179 include/sound/ac97_codec.h 	int (*build_specific) (struct snd_ac97 *ac97);
ac97              180 include/sound/ac97_codec.h 	int (*build_spdif) (struct snd_ac97 *ac97);
ac97              181 include/sound/ac97_codec.h 	int (*build_post_spdif) (struct snd_ac97 *ac97);
ac97              183 include/sound/ac97_codec.h 	void (*suspend) (struct snd_ac97 *ac97);
ac97              184 include/sound/ac97_codec.h 	void (*resume) (struct snd_ac97 *ac97);
ac97              186 include/sound/ac97_codec.h 	void (*update_jacks) (struct snd_ac97 *ac97);	/* for jack-sharing */
ac97              190 include/sound/ac97_codec.h 	void (*reset) (struct snd_ac97 *ac97);
ac97              191 include/sound/ac97_codec.h 	void (*warm_reset)(struct snd_ac97 *ac97);
ac97              192 include/sound/ac97_codec.h 	void (*write) (struct snd_ac97 *ac97, unsigned short reg, unsigned short val);
ac97              193 include/sound/ac97_codec.h 	unsigned short (*read) (struct snd_ac97 *ac97, unsigned short reg);
ac97              194 include/sound/ac97_codec.h 	void (*wait) (struct snd_ac97 *ac97);
ac97              195 include/sound/ac97_codec.h 	void (*init) (struct snd_ac97 *ac97);
ac97              226 include/sound/ac97_codec.h 	void (*private_free) (struct snd_ac97 *ac97);
ac97              238 include/sound/ac97_codec.h 	void (*private_free) (struct snd_ac97 *ac97);
ac97              290 include/sound/ac97_codec.h static inline int ac97_is_audio(struct snd_ac97 * ac97)
ac97              292 include/sound/ac97_codec.h 	return (ac97->scaps & AC97_SCAP_AUDIO);
ac97              294 include/sound/ac97_codec.h static inline int ac97_is_modem(struct snd_ac97 * ac97)
ac97              296 include/sound/ac97_codec.h 	return (ac97->scaps & AC97_SCAP_MODEM);
ac97              298 include/sound/ac97_codec.h static inline int ac97_is_rev22(struct snd_ac97 * ac97)
ac97              300 include/sound/ac97_codec.h 	return (ac97->ext_id & AC97_EI_REV_MASK) >= AC97_EI_REV_22;
ac97              302 include/sound/ac97_codec.h static inline int ac97_can_amap(struct snd_ac97 * ac97)
ac97              304 include/sound/ac97_codec.h 	return (ac97->ext_id & AC97_EI_AMAP) != 0;
ac97              306 include/sound/ac97_codec.h static inline int ac97_can_spdif(struct snd_ac97 * ac97)
ac97              308 include/sound/ac97_codec.h 	return (ac97->ext_id & AC97_EI_SPDIF) != 0;
ac97              318 include/sound/ac97_codec.h const char *snd_ac97_get_short_name(struct snd_ac97 *ac97);
ac97              320 include/sound/ac97_codec.h void snd_ac97_write(struct snd_ac97 *ac97, unsigned short reg, unsigned short value);
ac97              321 include/sound/ac97_codec.h unsigned short snd_ac97_read(struct snd_ac97 *ac97, unsigned short reg);
ac97              322 include/sound/ac97_codec.h void snd_ac97_write_cache(struct snd_ac97 *ac97, unsigned short reg, unsigned short value);
ac97              323 include/sound/ac97_codec.h int snd_ac97_update(struct snd_ac97 *ac97, unsigned short reg, unsigned short value);
ac97              324 include/sound/ac97_codec.h int snd_ac97_update_bits(struct snd_ac97 *ac97, unsigned short reg, unsigned short mask, unsigned short value);
ac97              326 include/sound/ac97_codec.h int snd_ac97_update_power(struct snd_ac97 *ac97, int reg, int powerup);
ac97              328 include/sound/ac97_codec.h static inline int snd_ac97_update_power(struct snd_ac97 *ac97, int reg,
ac97              335 include/sound/ac97_codec.h void snd_ac97_suspend(struct snd_ac97 *ac97);
ac97              336 include/sound/ac97_codec.h void snd_ac97_resume(struct snd_ac97 *ac97);
ac97              338 include/sound/ac97_codec.h int snd_ac97_reset(struct snd_ac97 *ac97, bool try_warm, unsigned int id,
ac97              364 include/sound/ac97_codec.h int snd_ac97_tune_hardware(struct snd_ac97 *ac97,
ac97              367 include/sound/ac97_codec.h int snd_ac97_set_rate(struct snd_ac97 *ac97, int reg, unsigned int rate);
ac97              400 include/sound/ac97_codec.h int snd_ac97_pcm_assign(struct snd_ac97_bus *ac97,
ac97              412 include/sound/ac97_codec.h static inline void snd_ac97_dev_add_pdata(struct snd_ac97 *ac97, void *data)
ac97              414 include/sound/ac97_codec.h 	ac97->dev.platform_data = data;
ac97             1721 include/sound/emu10k1.h 	struct snd_ac97 *ac97;
ac97             1845 include/sound/emu10k1.h unsigned short snd_emu10k1_ac97_read(struct snd_ac97 *ac97, unsigned short reg);
ac97             1846 include/sound/emu10k1.h void snd_emu10k1_ac97_write(struct snd_ac97 *ac97, unsigned short reg, unsigned short data);
ac97              540 include/sound/soc.h void snd_soc_free_ac97_component(struct snd_ac97 *ac97);
ac97                6 sound/ac97/ac97_core.h unsigned int snd_ac97_bus_scan_one(struct ac97_controller *ac97,
ac97               20 sound/ac97/snd_ac97_compat.c static void compat_ac97_reset(struct snd_ac97 *ac97)
ac97               22 sound/ac97/snd_ac97_compat.c 	struct ac97_codec_device *adev = to_ac97_device(ac97->private_data);
ac97               29 sound/ac97/snd_ac97_compat.c static void compat_ac97_warm_reset(struct snd_ac97 *ac97)
ac97               31 sound/ac97/snd_ac97_compat.c 	struct ac97_codec_device *adev = to_ac97_device(ac97->private_data);
ac97               38 sound/ac97/snd_ac97_compat.c static void compat_ac97_write(struct snd_ac97 *ac97, unsigned short reg,
ac97               41 sound/ac97/snd_ac97_compat.c 	struct ac97_codec_device *adev = to_ac97_device(ac97->private_data);
ac97               44 sound/ac97/snd_ac97_compat.c 	actrl->ops->write(actrl, ac97->num, reg, val);
ac97               47 sound/ac97/snd_ac97_compat.c static unsigned short compat_ac97_read(struct snd_ac97 *ac97,
ac97               50 sound/ac97/snd_ac97_compat.c 	struct ac97_codec_device *adev = to_ac97_device(ac97->private_data);
ac97               53 sound/ac97/snd_ac97_compat.c 	return actrl->ops->read(actrl, ac97->num, reg);
ac97               69 sound/ac97/snd_ac97_compat.c 	struct snd_ac97 *ac97;
ac97               72 sound/ac97/snd_ac97_compat.c 	ac97 = kzalloc(sizeof(struct snd_ac97), GFP_KERNEL);
ac97               73 sound/ac97/snd_ac97_compat.c 	if (ac97 == NULL)
ac97               76 sound/ac97/snd_ac97_compat.c 	ac97->private_data = adev;
ac97               77 sound/ac97/snd_ac97_compat.c 	ac97->bus = &compat_soc_ac97_bus;
ac97               79 sound/ac97/snd_ac97_compat.c 	ac97->dev.parent = &adev->dev;
ac97               80 sound/ac97/snd_ac97_compat.c 	ac97->dev.release = compat_ac97_release;
ac97               81 sound/ac97/snd_ac97_compat.c 	dev_set_name(&ac97->dev, "%s-compat", dev_name(&adev->dev));
ac97               82 sound/ac97/snd_ac97_compat.c 	ret = device_register(&ac97->dev);
ac97               84 sound/ac97/snd_ac97_compat.c 		put_device(&ac97->dev);
ac97               88 sound/ac97/snd_ac97_compat.c 	return ac97;
ac97               92 sound/ac97/snd_ac97_compat.c void snd_ac97_compat_release(struct snd_ac97 *ac97)
ac97               94 sound/ac97/snd_ac97_compat.c 	device_unregister(&ac97->dev);
ac97               98 sound/ac97/snd_ac97_compat.c int snd_ac97_reset(struct snd_ac97 *ac97, bool try_warm, unsigned int id,
ac97              101 sound/ac97/snd_ac97_compat.c 	struct ac97_codec_device *adev = to_ac97_device(ac97->private_data);
ac97              106 sound/ac97/snd_ac97_compat.c 		compat_ac97_warm_reset(ac97);
ac97              112 sound/ac97/snd_ac97_compat.c 	compat_ac97_reset(ac97);
ac97              113 sound/ac97/snd_ac97_compat.c 	compat_ac97_warm_reset(ac97);
ac97               26 sound/ac97_bus.c static bool snd_ac97_check_id(struct snd_ac97 *ac97, unsigned int id,
ac97               29 sound/ac97_bus.c 	ac97->id = ac97->bus->ops->read(ac97, AC97_VENDOR_ID1) << 16;
ac97               30 sound/ac97_bus.c 	ac97->id |= ac97->bus->ops->read(ac97, AC97_VENDOR_ID2);
ac97               32 sound/ac97_bus.c 	if (ac97->id == 0x0 || ac97->id == 0xffffffff)
ac97               35 sound/ac97_bus.c 	if (id != 0 && id != (ac97->id & id_mask))
ac97               55 sound/ac97_bus.c int snd_ac97_reset(struct snd_ac97 *ac97, bool try_warm, unsigned int id,
ac97               58 sound/ac97_bus.c 	struct snd_ac97_bus_ops *ops = ac97->bus->ops;
ac97               61 sound/ac97_bus.c 		ops->warm_reset(ac97);
ac97               62 sound/ac97_bus.c 		if (snd_ac97_check_id(ac97, id, id_mask))
ac97               67 sound/ac97_bus.c 		ops->reset(ac97);
ac97               69 sound/ac97_bus.c 		ops->warm_reset(ac97);
ac97               71 sound/ac97_bus.c 	if (snd_ac97_check_id(ac97, id, id_mask))
ac97               37 sound/arm/aaci.c static void aaci_ac97_select_codec(struct aaci *aaci, struct snd_ac97 *ac97)
ac97               39 sound/arm/aaci.c 	u32 v, maincr = aaci->maincr | MAINCR_SCRA(ac97->num);
ac97               66 sound/arm/aaci.c static void aaci_ac97_write(struct snd_ac97 *ac97, unsigned short reg,
ac97               69 sound/arm/aaci.c 	struct aaci *aaci = ac97->private_data;
ac97               73 sound/arm/aaci.c 	if (ac97->num >= 4)
ac97               78 sound/arm/aaci.c 	aaci_ac97_select_codec(aaci, ac97);
ac97              107 sound/arm/aaci.c static unsigned short aaci_ac97_read(struct snd_ac97 *ac97, unsigned short reg)
ac97              109 sound/arm/aaci.c 	struct aaci *aaci = ac97->private_data;
ac97              113 sound/arm/aaci.c 	if (ac97->num >= 4)
ac97              118 sound/arm/aaci.c 	aaci_ac97_select_codec(aaci, ac97);
ac97              728 sound/arm/aaci.c 	aaci_ac97_write(aaci->ac97, AC97_EXTENDED_STATUS, 0x0001); /* VRA */
ac97              729 sound/arm/aaci.c 	aaci_ac97_write(aaci->ac97, AC97_PCM_LR_ADC_RATE, runtime->rate);
ac97              730 sound/arm/aaci.c 	aaci_ac97_write(aaci->ac97, AC97_PCM_MIC_ADC_RATE, runtime->rate);
ac97              733 sound/arm/aaci.c 	aaci_ac97_write(aaci->ac97, AC97_REC_SEL, 0x0404);
ac97              835 sound/arm/aaci.c 	struct snd_ac97 *ac97;
ac97              863 sound/arm/aaci.c 	ret = snd_ac97_mixer(ac97_bus, &ac97_template, &ac97);
ac97              866 sound/arm/aaci.c 	aaci->ac97 = ac97;
ac97              871 sound/arm/aaci.c 	if (ac97_is_audio(ac97))
ac97              872 sound/arm/aaci.c 		snd_ac97_write_cache(ac97, AC97_PC_BEEP, 0x801e);
ac97              233 sound/arm/aaci.h 	struct snd_ac97		*ac97;
ac97               27 sound/arm/pxa2xx-ac97.c static void pxa2xx_ac97_legacy_reset(struct snd_ac97 *ac97)
ac97               35 sound/arm/pxa2xx-ac97.c static unsigned short pxa2xx_ac97_legacy_read(struct snd_ac97 *ac97,
ac97               40 sound/arm/pxa2xx-ac97.c 	ret = pxa2xx_ac97_read(ac97->num, reg);
ac97               47 sound/arm/pxa2xx-ac97.c static void pxa2xx_ac97_legacy_write(struct snd_ac97 *ac97,
ac97               52 sound/arm/pxa2xx-ac97.c 	ret = pxa2xx_ac97_write(ac97->num, reg, val);
ac97               43 sound/atmel/ac97c.c 	struct snd_ac97			*ac97;
ac97              265 sound/atmel/ac97c.c 	retval = snd_ac97_set_rate(chip->ac97, AC97_PCM_FRONT_DAC_RATE,
ac97              347 sound/atmel/ac97c.c 	retval = snd_ac97_set_rate(chip->ac97, AC97_PCM_LR_ADC_RATE,
ac97              620 sound/atmel/ac97c.c 	return snd_ac97_mixer(chip->ac97_bus, &template, &chip->ac97);
ac97              623 sound/atmel/ac97c.c static void atmel_ac97c_write(struct snd_ac97 *ac97, unsigned short reg,
ac97              626 sound/atmel/ac97c.c 	struct atmel_ac97c *chip = get_chip(ac97);
ac97              643 sound/atmel/ac97c.c static unsigned short atmel_ac97c_read(struct snd_ac97 *ac97,
ac97              646 sound/atmel/ac97c.c 	struct atmel_ac97c *chip = get_chip(ac97);
ac97              268 sound/drivers/ml403-ac97cr.c static void lm4550_regfile_write_values_after_init(struct snd_ac97 *ac97)
ac97              280 sound/drivers/ml403-ac97cr.c 			snd_ac97_write(ac97, i * 2, lm4550_regfile[i].value);
ac97              345 sound/drivers/ml403-ac97cr.c 	struct snd_ac97 *ac97;
ac97              620 sound/drivers/ml403-ac97cr.c 	snd_ac97_set_rate(ml403_ac97cr->ac97, AC97_PCM_FRONT_DAC_RATE,
ac97              654 sound/drivers/ml403-ac97cr.c 	snd_ac97_set_rate(ml403_ac97cr->ac97, AC97_PCM_LR_ADC_RATE,
ac97              818 sound/drivers/ml403-ac97cr.c snd_ml403_ac97cr_codec_read(struct snd_ac97 *ac97, unsigned short reg)
ac97              820 sound/drivers/ml403-ac97cr.c 	struct snd_ml403_ac97cr *ml403_ac97cr = ac97->private_data;
ac97              939 sound/drivers/ml403-ac97cr.c snd_ml403_ac97cr_codec_write(struct snd_ac97 *ac97, unsigned short reg,
ac97              942 sound/drivers/ml403-ac97cr.c 	struct snd_ml403_ac97cr *ml403_ac97cr = ac97->private_data;
ac97             1184 sound/drivers/ml403-ac97cr.c static void snd_ml403_ac97cr_mixer_free(struct snd_ac97 *ac97)
ac97             1186 sound/drivers/ml403-ac97cr.c 	struct snd_ml403_ac97cr *ml403_ac97cr = ac97->private_data;
ac97             1188 sound/drivers/ml403-ac97cr.c 	ml403_ac97cr->ac97 = NULL;
ac97             1196 sound/drivers/ml403-ac97cr.c 	struct snd_ac97_template ac97;
ac97             1207 sound/drivers/ml403-ac97cr.c 	memset(&ac97, 0, sizeof(ac97));
ac97             1214 sound/drivers/ml403-ac97cr.c 	ac97.private_data = ml403_ac97cr;
ac97             1215 sound/drivers/ml403-ac97cr.c 	ac97.private_free = snd_ml403_ac97cr_mixer_free;
ac97             1216 sound/drivers/ml403-ac97cr.c 	ac97.scaps = AC97_SCAP_AUDIO | AC97_SCAP_SKIP_MODEM |
ac97             1218 sound/drivers/ml403-ac97cr.c 	err = snd_ac97_mixer(bus, &ac97, &ml403_ac97cr->ac97);
ac97             1220 sound/drivers/ml403-ac97cr.c 	lm4550_regfile_write_values_after_init(ml403_ac97cr->ac97);
ac97               49 sound/pci/ac97/ac97_codec.c 	int (*patch)(struct snd_ac97 *ac97);
ac97               50 sound/pci/ac97/ac97_codec.c 	int (*mpatch)(struct snd_ac97 *ac97);
ac97              195 sound/pci/ac97/ac97_codec.c static void update_power_regs(struct snd_ac97 *ac97);
ac97              197 sound/pci/ac97/ac97_codec.c #define ac97_is_power_save_mode(ac97) \
ac97              198 sound/pci/ac97/ac97_codec.c 	((ac97->scaps & AC97_SCAP_POWER_SAVE) && power_save)
ac97              200 sound/pci/ac97/ac97_codec.c #define ac97_is_power_save_mode(ac97) 0
ac97              203 sound/pci/ac97/ac97_codec.c #define ac97_err(ac97, fmt, args...)	\
ac97              204 sound/pci/ac97/ac97_codec.c 	dev_err((ac97)->bus->card->dev, fmt, ##args)
ac97              205 sound/pci/ac97/ac97_codec.c #define ac97_warn(ac97, fmt, args...)	\
ac97              206 sound/pci/ac97/ac97_codec.c 	dev_warn((ac97)->bus->card->dev, fmt, ##args)
ac97              207 sound/pci/ac97/ac97_codec.c #define ac97_dbg(ac97, fmt, args...)	\
ac97              208 sound/pci/ac97/ac97_codec.c 	dev_dbg((ac97)->bus->card->dev, fmt, ##args)
ac97              214 sound/pci/ac97/ac97_codec.c static int snd_ac97_valid_reg(struct snd_ac97 *ac97, unsigned short reg)
ac97              217 sound/pci/ac97/ac97_codec.c 	switch (ac97->id) {
ac97              272 sound/pci/ac97/ac97_codec.c void snd_ac97_write(struct snd_ac97 *ac97, unsigned short reg, unsigned short value)
ac97              274 sound/pci/ac97/ac97_codec.c 	if (!snd_ac97_valid_reg(ac97, reg))
ac97              276 sound/pci/ac97/ac97_codec.c 	if ((ac97->id & 0xffffff00) == AC97_ID_ALC100) {
ac97              279 sound/pci/ac97/ac97_codec.c 			ac97->bus->ops->write(ac97, AC97_RESET, 0);	/* reset audio codec */
ac97              281 sound/pci/ac97/ac97_codec.c 	ac97->bus->ops->write(ac97, reg, value);
ac97              297 sound/pci/ac97/ac97_codec.c unsigned short snd_ac97_read(struct snd_ac97 *ac97, unsigned short reg)
ac97              299 sound/pci/ac97/ac97_codec.c 	if (!snd_ac97_valid_reg(ac97, reg))
ac97              301 sound/pci/ac97/ac97_codec.c 	return ac97->bus->ops->read(ac97, reg);
ac97              305 sound/pci/ac97/ac97_codec.c static inline unsigned short snd_ac97_read_cache(struct snd_ac97 *ac97, unsigned short reg)
ac97              307 sound/pci/ac97/ac97_codec.c 	if (! test_bit(reg, ac97->reg_accessed)) {
ac97              308 sound/pci/ac97/ac97_codec.c 		ac97->regs[reg] = ac97->bus->ops->read(ac97, reg);
ac97              311 sound/pci/ac97/ac97_codec.c 	return ac97->regs[reg];
ac97              326 sound/pci/ac97/ac97_codec.c void snd_ac97_write_cache(struct snd_ac97 *ac97, unsigned short reg, unsigned short value)
ac97              328 sound/pci/ac97/ac97_codec.c 	if (!snd_ac97_valid_reg(ac97, reg))
ac97              330 sound/pci/ac97/ac97_codec.c 	mutex_lock(&ac97->reg_mutex);
ac97              331 sound/pci/ac97/ac97_codec.c 	ac97->regs[reg] = value;
ac97              332 sound/pci/ac97/ac97_codec.c 	ac97->bus->ops->write(ac97, reg, value);
ac97              333 sound/pci/ac97/ac97_codec.c 	set_bit(reg, ac97->reg_accessed);
ac97              334 sound/pci/ac97/ac97_codec.c 	mutex_unlock(&ac97->reg_mutex);
ac97              351 sound/pci/ac97/ac97_codec.c int snd_ac97_update(struct snd_ac97 *ac97, unsigned short reg, unsigned short value)
ac97              355 sound/pci/ac97/ac97_codec.c 	if (!snd_ac97_valid_reg(ac97, reg))
ac97              357 sound/pci/ac97/ac97_codec.c 	mutex_lock(&ac97->reg_mutex);
ac97              358 sound/pci/ac97/ac97_codec.c 	change = ac97->regs[reg] != value;
ac97              360 sound/pci/ac97/ac97_codec.c 		ac97->regs[reg] = value;
ac97              361 sound/pci/ac97/ac97_codec.c 		ac97->bus->ops->write(ac97, reg, value);
ac97              363 sound/pci/ac97/ac97_codec.c 	set_bit(reg, ac97->reg_accessed);
ac97              364 sound/pci/ac97/ac97_codec.c 	mutex_unlock(&ac97->reg_mutex);
ac97              383 sound/pci/ac97/ac97_codec.c int snd_ac97_update_bits(struct snd_ac97 *ac97, unsigned short reg, unsigned short mask, unsigned short value)
ac97              387 sound/pci/ac97/ac97_codec.c 	if (!snd_ac97_valid_reg(ac97, reg))
ac97              389 sound/pci/ac97/ac97_codec.c 	mutex_lock(&ac97->reg_mutex);
ac97              390 sound/pci/ac97/ac97_codec.c 	change = snd_ac97_update_bits_nolock(ac97, reg, mask, value);
ac97              391 sound/pci/ac97/ac97_codec.c 	mutex_unlock(&ac97->reg_mutex);
ac97              398 sound/pci/ac97/ac97_codec.c int snd_ac97_update_bits_nolock(struct snd_ac97 *ac97, unsigned short reg,
ac97              404 sound/pci/ac97/ac97_codec.c 	old = snd_ac97_read_cache(ac97, reg);
ac97              408 sound/pci/ac97/ac97_codec.c 		ac97->regs[reg] = new;
ac97              409 sound/pci/ac97/ac97_codec.c 		ac97->bus->ops->write(ac97, reg, new);
ac97              411 sound/pci/ac97/ac97_codec.c 	set_bit(reg, ac97->reg_accessed);
ac97              415 sound/pci/ac97/ac97_codec.c static int snd_ac97_ad18xx_update_pcm_bits(struct snd_ac97 *ac97, int codec, unsigned short mask, unsigned short value)
ac97              420 sound/pci/ac97/ac97_codec.c 	mutex_lock(&ac97->page_mutex);
ac97              421 sound/pci/ac97/ac97_codec.c 	old = ac97->spec.ad18xx.pcmreg[codec];
ac97              425 sound/pci/ac97/ac97_codec.c 		mutex_lock(&ac97->reg_mutex);
ac97              426 sound/pci/ac97/ac97_codec.c 		cfg = snd_ac97_read_cache(ac97, AC97_AD_SERIAL_CFG);
ac97              427 sound/pci/ac97/ac97_codec.c 		ac97->spec.ad18xx.pcmreg[codec] = new;
ac97              429 sound/pci/ac97/ac97_codec.c 		ac97->bus->ops->write(ac97, AC97_AD_SERIAL_CFG,
ac97              431 sound/pci/ac97/ac97_codec.c 				 ac97->spec.ad18xx.unchained[codec] | ac97->spec.ad18xx.chained[codec]);
ac97              433 sound/pci/ac97/ac97_codec.c 		ac97->bus->ops->write(ac97, AC97_PCM, new);
ac97              435 sound/pci/ac97/ac97_codec.c 		ac97->bus->ops->write(ac97, AC97_AD_SERIAL_CFG,
ac97              437 sound/pci/ac97/ac97_codec.c 		mutex_unlock(&ac97->reg_mutex);
ac97              439 sound/pci/ac97/ac97_codec.c 	mutex_unlock(&ac97->page_mutex);
ac97              459 sound/pci/ac97/ac97_codec.c 	struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
ac97              465 sound/pci/ac97/ac97_codec.c 	val = snd_ac97_read_cache(ac97, e->reg);
ac97              476 sound/pci/ac97/ac97_codec.c 	struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
ac97              493 sound/pci/ac97/ac97_codec.c 	return snd_ac97_update_bits(ac97, e->reg, mask, val);
ac97              497 sound/pci/ac97/ac97_codec.c static int snd_ac97_page_save(struct snd_ac97 *ac97, int reg, struct snd_kcontrol *kcontrol)
ac97              501 sound/pci/ac97/ac97_codec.c 	    (ac97->ext_id & AC97_EI_REV_MASK) >= AC97_EI_REV_23 &&
ac97              504 sound/pci/ac97/ac97_codec.c 		mutex_lock(&ac97->page_mutex); /* lock paging */
ac97              505 sound/pci/ac97/ac97_codec.c 		page_save = snd_ac97_read(ac97, AC97_INT_PAGING) & AC97_PAGE_MASK;
ac97              506 sound/pci/ac97/ac97_codec.c 		snd_ac97_update_bits(ac97, AC97_INT_PAGING, AC97_PAGE_MASK, page);
ac97              511 sound/pci/ac97/ac97_codec.c static void snd_ac97_page_restore(struct snd_ac97 *ac97, int page_save)
ac97              514 sound/pci/ac97/ac97_codec.c 		snd_ac97_update_bits(ac97, AC97_INT_PAGING, AC97_PAGE_MASK, page_save);
ac97              515 sound/pci/ac97/ac97_codec.c 		mutex_unlock(&ac97->page_mutex); /* unlock paging */
ac97              537 sound/pci/ac97/ac97_codec.c 	struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
ac97              545 sound/pci/ac97/ac97_codec.c 	page_save = snd_ac97_page_save(ac97, reg, kcontrol);
ac97              546 sound/pci/ac97/ac97_codec.c 	ucontrol->value.integer.value[0] = (snd_ac97_read_cache(ac97, reg) >> shift) & mask;
ac97              548 sound/pci/ac97/ac97_codec.c 		ucontrol->value.integer.value[1] = (snd_ac97_read_cache(ac97, reg) >> rshift) & mask;
ac97              554 sound/pci/ac97/ac97_codec.c 	snd_ac97_page_restore(ac97, page_save);
ac97              561 sound/pci/ac97/ac97_codec.c 	struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
ac97              570 sound/pci/ac97/ac97_codec.c 	page_save = snd_ac97_page_save(ac97, reg, kcontrol);
ac97              583 sound/pci/ac97/ac97_codec.c 	err = snd_ac97_update_bits(ac97, reg, val_mask, val);
ac97              584 sound/pci/ac97/ac97_codec.c 	snd_ac97_page_restore(ac97, page_save);
ac97              590 sound/pci/ac97/ac97_codec.c 			ac97->power_up &= ~(1 << (reg>>1));
ac97              592 sound/pci/ac97/ac97_codec.c 			ac97->power_up |= 1 << (reg>>1);
ac97              593 sound/pci/ac97/ac97_codec.c 		update_power_regs(ac97);
ac97              680 sound/pci/ac97/ac97_codec.c static void set_inv_eapd(struct snd_ac97 *ac97, struct snd_kcontrol *kctl)
ac97              683 sound/pci/ac97/ac97_codec.c 	snd_ac97_update_bits(ac97, AC97_POWERDOWN, (1<<15), (1<<15)); /* EAPD up */
ac97              684 sound/pci/ac97/ac97_codec.c 	ac97->scaps |= AC97_SCAP_INV_EAPD;
ac97              718 sound/pci/ac97/ac97_codec.c 	struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
ac97              720 sound/pci/ac97/ac97_codec.c 	mutex_lock(&ac97->reg_mutex);
ac97              721 sound/pci/ac97/ac97_codec.c 	ucontrol->value.iec958.status[0] = ac97->spdif_status & 0xff;
ac97              722 sound/pci/ac97/ac97_codec.c 	ucontrol->value.iec958.status[1] = (ac97->spdif_status >> 8) & 0xff;
ac97              723 sound/pci/ac97/ac97_codec.c 	ucontrol->value.iec958.status[2] = (ac97->spdif_status >> 16) & 0xff;
ac97              724 sound/pci/ac97/ac97_codec.c 	ucontrol->value.iec958.status[3] = (ac97->spdif_status >> 24) & 0xff;
ac97              725 sound/pci/ac97/ac97_codec.c 	mutex_unlock(&ac97->reg_mutex);
ac97              731 sound/pci/ac97/ac97_codec.c 	struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
ac97              764 sound/pci/ac97/ac97_codec.c 	mutex_lock(&ac97->reg_mutex);
ac97              765 sound/pci/ac97/ac97_codec.c 	change = ac97->spdif_status != new;
ac97              766 sound/pci/ac97/ac97_codec.c 	ac97->spdif_status = new;
ac97              768 sound/pci/ac97/ac97_codec.c 	if (ac97->flags & AC97_CS_SPDIF) {
ac97              775 sound/pci/ac97/ac97_codec.c 		change |= snd_ac97_update_bits_nolock(ac97, AC97_CSR_SPDIF, 0x3fff, ((val & 0xcfff) | (x << 12)));
ac97              776 sound/pci/ac97/ac97_codec.c 	} else if (ac97->flags & AC97_CX_SPDIF) {
ac97              780 sound/pci/ac97/ac97_codec.c 		change |= snd_ac97_update_bits_nolock(ac97, AC97_CXR_AUDIO_MISC, 
ac97              783 sound/pci/ac97/ac97_codec.c 	} else if (ac97->id == AC97_ID_YMF743) {
ac97              784 sound/pci/ac97/ac97_codec.c 		change |= snd_ac97_update_bits_nolock(ac97,
ac97              790 sound/pci/ac97/ac97_codec.c 		unsigned short extst = snd_ac97_read_cache(ac97, AC97_EXTENDED_STATUS);
ac97              791 sound/pci/ac97/ac97_codec.c 		snd_ac97_update_bits_nolock(ac97, AC97_EXTENDED_STATUS, AC97_EA_SPDIF, 0); /* turn off */
ac97              793 sound/pci/ac97/ac97_codec.c 		change |= snd_ac97_update_bits_nolock(ac97, AC97_SPDIF, 0x3fff, val);
ac97              795 sound/pci/ac97/ac97_codec.c 			snd_ac97_update_bits_nolock(ac97, AC97_EXTENDED_STATUS, AC97_EA_SPDIF, AC97_EA_SPDIF); /* turn on again */
ac97              798 sound/pci/ac97/ac97_codec.c 	mutex_unlock(&ac97->reg_mutex);
ac97              805 sound/pci/ac97/ac97_codec.c 	struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
ac97              815 sound/pci/ac97/ac97_codec.c 	mutex_lock(&ac97->reg_mutex);
ac97              818 sound/pci/ac97/ac97_codec.c 	old = snd_ac97_read_cache(ac97, reg);
ac97              823 sound/pci/ac97/ac97_codec.c 		unsigned short extst = snd_ac97_read_cache(ac97, AC97_EXTENDED_STATUS);
ac97              824 sound/pci/ac97/ac97_codec.c 		snd_ac97_update_bits_nolock(ac97, AC97_EXTENDED_STATUS, AC97_EA_SPDIF, 0); /* turn off */
ac97              825 sound/pci/ac97/ac97_codec.c 		change = snd_ac97_update_bits_nolock(ac97, reg, mask, value);
ac97              827 sound/pci/ac97/ac97_codec.c 			snd_ac97_update_bits_nolock(ac97, AC97_EXTENDED_STATUS, AC97_EA_SPDIF, AC97_EA_SPDIF); /* turn on again */
ac97              829 sound/pci/ac97/ac97_codec.c 	mutex_unlock(&ac97->reg_mutex);
ac97              874 sound/pci/ac97/ac97_codec.c 	struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
ac97              880 sound/pci/ac97/ac97_codec.c 	if (lshift != rshift && (ac97->flags & AC97_STEREO_MUTES))
ac97              891 sound/pci/ac97/ac97_codec.c 	struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
ac97              897 sound/pci/ac97/ac97_codec.c 	ucontrol->value.integer.value[0] = mask - ((ac97->spec.ad18xx.pcmreg[codec] >> lshift) & mask);
ac97              898 sound/pci/ac97/ac97_codec.c 	if (lshift != rshift && (ac97->flags & AC97_STEREO_MUTES))
ac97              899 sound/pci/ac97/ac97_codec.c 		ucontrol->value.integer.value[1] = mask - ((ac97->spec.ad18xx.pcmreg[codec] >> rshift) & mask);
ac97              905 sound/pci/ac97/ac97_codec.c 	struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
ac97              914 sound/pci/ac97/ac97_codec.c 	if (lshift != rshift && (ac97->flags & AC97_STEREO_MUTES)) {
ac97              918 sound/pci/ac97/ac97_codec.c 	return snd_ac97_ad18xx_update_pcm_bits(ac97, codec, valmask, val);
ac97              937 sound/pci/ac97/ac97_codec.c 	struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
ac97              940 sound/pci/ac97/ac97_codec.c 	mutex_lock(&ac97->page_mutex);
ac97              941 sound/pci/ac97/ac97_codec.c 	ucontrol->value.integer.value[0] = 31 - ((ac97->spec.ad18xx.pcmreg[codec] >> 0) & 31);
ac97              942 sound/pci/ac97/ac97_codec.c 	ucontrol->value.integer.value[1] = 31 - ((ac97->spec.ad18xx.pcmreg[codec] >> 8) & 31);
ac97              943 sound/pci/ac97/ac97_codec.c 	mutex_unlock(&ac97->page_mutex);
ac97              949 sound/pci/ac97/ac97_codec.c 	struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
ac97              955 sound/pci/ac97/ac97_codec.c 	return snd_ac97_ad18xx_update_pcm_bits(ac97, codec, 0x1f1f, (val1 << 8) | val2);
ac97              982 sound/pci/ac97/ac97_codec.c static void snd_ac97_powerdown(struct snd_ac97 *ac97);
ac97             1002 sound/pci/ac97/ac97_codec.c static int snd_ac97_free(struct snd_ac97 *ac97)
ac97             1004 sound/pci/ac97/ac97_codec.c 	if (ac97) {
ac97             1006 sound/pci/ac97/ac97_codec.c 		cancel_delayed_work_sync(&ac97->power_work);
ac97             1008 sound/pci/ac97/ac97_codec.c 		snd_ac97_proc_done(ac97);
ac97             1009 sound/pci/ac97/ac97_codec.c 		if (ac97->bus)
ac97             1010 sound/pci/ac97/ac97_codec.c 			ac97->bus->codec[ac97->num] = NULL;
ac97             1011 sound/pci/ac97/ac97_codec.c 		if (ac97->private_free)
ac97             1012 sound/pci/ac97/ac97_codec.c 			ac97->private_free(ac97);
ac97             1013 sound/pci/ac97/ac97_codec.c 		kfree(ac97);
ac97             1020 sound/pci/ac97/ac97_codec.c 	struct snd_ac97 *ac97 = device->device_data;
ac97             1021 sound/pci/ac97/ac97_codec.c 	snd_ac97_powerdown(ac97); /* for avoiding click noises during shut down */
ac97             1022 sound/pci/ac97/ac97_codec.c 	return snd_ac97_free(ac97);
ac97             1025 sound/pci/ac97/ac97_codec.c static int snd_ac97_try_volume_mix(struct snd_ac97 * ac97, int reg)
ac97             1029 sound/pci/ac97/ac97_codec.c 	if (! snd_ac97_valid_reg(ac97, reg))
ac97             1034 sound/pci/ac97/ac97_codec.c 		return ac97->caps & AC97_BC_BASS_TREBLE ? 1 : 0;
ac97             1036 sound/pci/ac97/ac97_codec.c 		return ac97->caps & AC97_BC_HEADPHONE ? 1 : 0;
ac97             1038 sound/pci/ac97/ac97_codec.c 		return ac97->caps & AC97_BC_DEDICATED_MIC ? 1 : 0;
ac97             1040 sound/pci/ac97/ac97_codec.c 		if (ac97->caps & AC97_BC_3D_TECH_ID_MASK) {
ac97             1041 sound/pci/ac97/ac97_codec.c 			val = snd_ac97_read(ac97, reg);
ac97             1047 sound/pci/ac97/ac97_codec.c 		if ((ac97->ext_id & AC97_EI_CDAC) == 0)
ac97             1051 sound/pci/ac97/ac97_codec.c 		if ((ac97->ext_id & AC97_EI_LDAC) == 0)
ac97             1057 sound/pci/ac97/ac97_codec.c 		if ((ac97->ext_id & AC97_EI_SDAC) == 0)
ac97             1062 sound/pci/ac97/ac97_codec.c 	val = snd_ac97_read(ac97, reg);
ac97             1066 sound/pci/ac97/ac97_codec.c 		snd_ac97_write_cache(ac97, reg, val | mask);
ac97             1067 sound/pci/ac97/ac97_codec.c 		val = snd_ac97_read(ac97, reg);
ac97             1068 sound/pci/ac97/ac97_codec.c 		val = snd_ac97_read(ac97, reg);
ac97             1075 sound/pci/ac97/ac97_codec.c static void check_volume_resolution(struct snd_ac97 *ac97, int reg, unsigned char *lo_max, unsigned char *hi_max)
ac97             1082 sound/pci/ac97/ac97_codec.c 	if (ac97->res_table) {
ac97             1084 sound/pci/ac97/ac97_codec.c 		for (tbl = ac97->res_table; tbl->reg; tbl++) {
ac97             1097 sound/pci/ac97/ac97_codec.c 			ac97, reg,
ac97             1104 sound/pci/ac97/ac97_codec.c 		val = snd_ac97_read(ac97, reg);
ac97             1105 sound/pci/ac97/ac97_codec.c 		val = snd_ac97_read(ac97, reg);
ac97             1115 sound/pci/ac97/ac97_codec.c static int snd_ac97_try_bit(struct snd_ac97 * ac97, int reg, int bit)
ac97             1120 sound/pci/ac97/ac97_codec.c 	orig = snd_ac97_read(ac97, reg);
ac97             1122 sound/pci/ac97/ac97_codec.c 	snd_ac97_write(ac97, reg, val);
ac97             1123 sound/pci/ac97/ac97_codec.c 	res = snd_ac97_read(ac97, reg);
ac97             1124 sound/pci/ac97/ac97_codec.c 	snd_ac97_write_cache(ac97, reg, orig);
ac97             1129 sound/pci/ac97/ac97_codec.c static void snd_ac97_change_volume_params2(struct snd_ac97 * ac97, int reg, int shift, unsigned char *max)
ac97             1135 sound/pci/ac97/ac97_codec.c 	snd_ac97_write(ac97, reg, val);
ac97             1136 sound/pci/ac97/ac97_codec.c 	val1 = snd_ac97_read(ac97, reg);
ac97             1141 sound/pci/ac97/ac97_codec.c 	snd_ac97_write_cache(ac97, reg, AC97_MUTE_MASK_STEREO);
ac97             1156 sound/pci/ac97/ac97_codec.c 					  struct snd_ac97 * ac97)
ac97             1160 sound/pci/ac97/ac97_codec.c 	template.index = ac97->num;
ac97             1161 sound/pci/ac97/ac97_codec.c 	return snd_ctl_new1(&template, ac97);
ac97             1169 sound/pci/ac97/ac97_codec.c 				     struct snd_ac97 *ac97)
ac97             1175 sound/pci/ac97/ac97_codec.c 	if (! snd_ac97_valid_reg(ac97, reg))
ac97             1179 sound/pci/ac97/ac97_codec.c 	val = snd_ac97_read(ac97, reg);
ac97             1180 sound/pci/ac97/ac97_codec.c 	if (check_stereo || (ac97->flags & AC97_STEREO_MUTES)) {
ac97             1183 sound/pci/ac97/ac97_codec.c 		snd_ac97_write(ac97, reg, val1);
ac97             1184 sound/pci/ac97/ac97_codec.c 		if (val1 == snd_ac97_read(ac97, reg))
ac97             1191 sound/pci/ac97/ac97_codec.c 		tmp.index = ac97->num;
ac97             1192 sound/pci/ac97/ac97_codec.c 		kctl = snd_ctl_new1(&tmp, ac97);
ac97             1197 sound/pci/ac97/ac97_codec.c 		tmp.index = ac97->num;
ac97             1198 sound/pci/ac97/ac97_codec.c 		kctl = snd_ctl_new1(&tmp, ac97);
ac97             1204 sound/pci/ac97/ac97_codec.c 	snd_ac97_write_cache(ac97, reg, val | mute_mask);
ac97             1238 sound/pci/ac97/ac97_codec.c 			     unsigned int hi_max, struct snd_ac97 *ac97)
ac97             1243 sound/pci/ac97/ac97_codec.c 	if (! snd_ac97_valid_reg(ac97, reg))
ac97             1248 sound/pci/ac97/ac97_codec.c 		tmp.index = ac97->num;
ac97             1249 sound/pci/ac97/ac97_codec.c 		kctl = snd_ctl_new1(&tmp, ac97);
ac97             1253 sound/pci/ac97/ac97_codec.c 		tmp.index = ac97->num;
ac97             1254 sound/pci/ac97/ac97_codec.c 		kctl = snd_ctl_new1(&tmp, ac97);
ac97             1266 sound/pci/ac97/ac97_codec.c 		ac97, reg,
ac97             1267 sound/pci/ac97/ac97_codec.c 		(snd_ac97_read(ac97, reg) & AC97_MUTE_MASK_STEREO)
ac97             1278 sound/pci/ac97/ac97_codec.c 				    struct snd_ac97 *ac97)
ac97             1284 sound/pci/ac97/ac97_codec.c 	if (! snd_ac97_valid_reg(ac97, reg))
ac97             1287 sound/pci/ac97/ac97_codec.c 	if (snd_ac97_try_bit(ac97, reg, 15)) {
ac97             1291 sound/pci/ac97/ac97_codec.c 						     ac97)) < 0)
ac97             1294 sound/pci/ac97/ac97_codec.c 	check_volume_resolution(ac97, reg, &lo_max, &hi_max);
ac97             1297 sound/pci/ac97/ac97_codec.c 		if ((err = snd_ac97_cvol_new(card, name, reg, lo_max, hi_max, ac97)) < 0)
ac97             1303 sound/pci/ac97/ac97_codec.c #define snd_ac97_cmix_new(card, pfx, reg, acheck, ac97) \
ac97             1304 sound/pci/ac97/ac97_codec.c 	snd_ac97_cmix_new_stereo(card, pfx, reg, 0, acheck, ac97)
ac97             1305 sound/pci/ac97/ac97_codec.c #define snd_ac97_cmute_new(card, name, reg, acheck, ac97) \
ac97             1306 sound/pci/ac97/ac97_codec.c 	snd_ac97_cmute_new_stereo(card, name, reg, 0, acheck, ac97)
ac97             1308 sound/pci/ac97/ac97_codec.c static unsigned int snd_ac97_determine_spdif_rates(struct snd_ac97 *ac97);
ac97             1310 sound/pci/ac97/ac97_codec.c static int snd_ac97_mixer_build(struct snd_ac97 * ac97)
ac97             1312 sound/pci/ac97/ac97_codec.c 	struct snd_card *card = ac97->bus->card;
ac97             1320 sound/pci/ac97/ac97_codec.c 	if (snd_ac97_try_volume_mix(ac97, AC97_MASTER)) {
ac97             1321 sound/pci/ac97/ac97_codec.c 		if (ac97->flags & AC97_HAS_NO_MASTER_VOL)
ac97             1323 sound/pci/ac97/ac97_codec.c 						 AC97_MASTER, 0, ac97);
ac97             1326 sound/pci/ac97/ac97_codec.c 						AC97_MASTER, 0, ac97);
ac97             1331 sound/pci/ac97/ac97_codec.c 	ac97->regs[AC97_CENTER_LFE_MASTER] = AC97_MUTE_MASK_STEREO;
ac97             1334 sound/pci/ac97/ac97_codec.c 	if ((snd_ac97_try_volume_mix(ac97, AC97_CENTER_LFE_MASTER)) 
ac97             1335 sound/pci/ac97/ac97_codec.c 		&& !(ac97->flags & AC97_AD_MULTI)) {
ac97             1336 sound/pci/ac97/ac97_codec.c 		if ((err = snd_ctl_add(card, snd_ac97_cnew(&snd_ac97_controls_center[0], ac97))) < 0)
ac97             1338 sound/pci/ac97/ac97_codec.c 		if ((err = snd_ctl_add(card, kctl = snd_ac97_cnew(&snd_ac97_controls_center[1], ac97))) < 0)
ac97             1340 sound/pci/ac97/ac97_codec.c 		snd_ac97_change_volume_params2(ac97, AC97_CENTER_LFE_MASTER, 0, &max);
ac97             1344 sound/pci/ac97/ac97_codec.c 		snd_ac97_write_cache(ac97, AC97_CENTER_LFE_MASTER, ac97->regs[AC97_CENTER_LFE_MASTER] | max);
ac97             1348 sound/pci/ac97/ac97_codec.c 	if ((snd_ac97_try_volume_mix(ac97, AC97_CENTER_LFE_MASTER+1))
ac97             1349 sound/pci/ac97/ac97_codec.c 		&& !(ac97->flags & AC97_AD_MULTI)) {
ac97             1350 sound/pci/ac97/ac97_codec.c 		if ((err = snd_ctl_add(card, snd_ac97_cnew(&snd_ac97_controls_lfe[0], ac97))) < 0)
ac97             1352 sound/pci/ac97/ac97_codec.c 		if ((err = snd_ctl_add(card, kctl = snd_ac97_cnew(&snd_ac97_controls_lfe[1], ac97))) < 0)
ac97             1354 sound/pci/ac97/ac97_codec.c 		snd_ac97_change_volume_params2(ac97, AC97_CENTER_LFE_MASTER, 8, &max);
ac97             1358 sound/pci/ac97/ac97_codec.c 		snd_ac97_write_cache(ac97, AC97_CENTER_LFE_MASTER, ac97->regs[AC97_CENTER_LFE_MASTER] | max << 8);
ac97             1362 sound/pci/ac97/ac97_codec.c 	if ((snd_ac97_try_volume_mix(ac97, AC97_SURROUND_MASTER)) 
ac97             1363 sound/pci/ac97/ac97_codec.c 		&& !(ac97->flags & AC97_AD_MULTI)) {
ac97             1367 sound/pci/ac97/ac97_codec.c 						    ac97)) < 0)
ac97             1372 sound/pci/ac97/ac97_codec.c 	if (snd_ac97_try_volume_mix(ac97, AC97_HEADPHONE)) {
ac97             1374 sound/pci/ac97/ac97_codec.c 					     AC97_HEADPHONE, 0, ac97)) < 0)
ac97             1379 sound/pci/ac97/ac97_codec.c 	if (snd_ac97_try_volume_mix(ac97, AC97_MASTER_MONO)) {
ac97             1381 sound/pci/ac97/ac97_codec.c 					     AC97_MASTER_MONO, 0, ac97)) < 0)
ac97             1386 sound/pci/ac97/ac97_codec.c 	if (!(ac97->flags & AC97_HAS_NO_TONE)) {
ac97             1387 sound/pci/ac97/ac97_codec.c 		if (snd_ac97_try_volume_mix(ac97, AC97_MASTER_TONE)) {
ac97             1389 sound/pci/ac97/ac97_codec.c 				if ((err = snd_ctl_add(card, kctl = snd_ac97_cnew(&snd_ac97_controls_tone[idx], ac97))) < 0)
ac97             1391 sound/pci/ac97/ac97_codec.c 				if (ac97->id == AC97_ID_YMF743 ||
ac97             1392 sound/pci/ac97/ac97_codec.c 				    ac97->id == AC97_ID_YMF753) {
ac97             1397 sound/pci/ac97/ac97_codec.c 			snd_ac97_write_cache(ac97, AC97_MASTER_TONE, 0x0f0f);
ac97             1402 sound/pci/ac97/ac97_codec.c 	if (!(ac97->flags & AC97_HAS_NO_PC_BEEP) && 
ac97             1403 sound/pci/ac97/ac97_codec.c 		((ac97->flags & AC97_HAS_PC_BEEP) ||
ac97             1404 sound/pci/ac97/ac97_codec.c 	    snd_ac97_try_volume_mix(ac97, AC97_PC_BEEP))) {
ac97             1406 sound/pci/ac97/ac97_codec.c 			if ((err = snd_ctl_add(card, kctl = snd_ac97_cnew(&snd_ac97_controls_pc_beep[idx], ac97))) < 0)
ac97             1410 sound/pci/ac97/ac97_codec.c 			ac97,
ac97             1412 sound/pci/ac97/ac97_codec.c 			(snd_ac97_read(ac97, AC97_PC_BEEP)
ac97             1418 sound/pci/ac97/ac97_codec.c 	if (!(ac97->flags & AC97_HAS_NO_PHONE)) {
ac97             1419 sound/pci/ac97/ac97_codec.c 		if (snd_ac97_try_volume_mix(ac97, AC97_PHONE)) {
ac97             1421 sound/pci/ac97/ac97_codec.c 						     AC97_PHONE, 1, ac97)) < 0)
ac97             1427 sound/pci/ac97/ac97_codec.c 	if (!(ac97->flags & AC97_HAS_NO_MIC)) {
ac97             1428 sound/pci/ac97/ac97_codec.c 		if (snd_ac97_try_volume_mix(ac97, AC97_MIC)) {
ac97             1430 sound/pci/ac97/ac97_codec.c 						     AC97_MIC, 1, ac97)) < 0)
ac97             1432 sound/pci/ac97/ac97_codec.c 			if ((err = snd_ctl_add(card, snd_ac97_cnew(&snd_ac97_controls_mic_boost, ac97))) < 0)
ac97             1438 sound/pci/ac97/ac97_codec.c 	if (snd_ac97_try_volume_mix(ac97, AC97_LINE)) {
ac97             1440 sound/pci/ac97/ac97_codec.c 					     AC97_LINE, 1, ac97)) < 0)
ac97             1445 sound/pci/ac97/ac97_codec.c 	if (!(ac97->flags & AC97_HAS_NO_CD)) {
ac97             1446 sound/pci/ac97/ac97_codec.c 		if (snd_ac97_try_volume_mix(ac97, AC97_CD)) {
ac97             1448 sound/pci/ac97/ac97_codec.c 						     AC97_CD, 1, ac97)) < 0)
ac97             1454 sound/pci/ac97/ac97_codec.c 	if (!(ac97->flags & AC97_HAS_NO_VIDEO)) {
ac97             1455 sound/pci/ac97/ac97_codec.c 		if (snd_ac97_try_volume_mix(ac97, AC97_VIDEO)) {
ac97             1457 sound/pci/ac97/ac97_codec.c 						     AC97_VIDEO, 1, ac97)) < 0)
ac97             1463 sound/pci/ac97/ac97_codec.c 	if (!(ac97->flags & AC97_HAS_NO_AUX)) {
ac97             1464 sound/pci/ac97/ac97_codec.c 		if (snd_ac97_try_volume_mix(ac97, AC97_AUX)) {
ac97             1466 sound/pci/ac97/ac97_codec.c 						     AC97_AUX, 1, ac97)) < 0)
ac97             1472 sound/pci/ac97/ac97_codec.c 	if (ac97->flags & AC97_AD_MULTI) {
ac97             1474 sound/pci/ac97/ac97_codec.c 		if (ac97->flags & AC97_STEREO_MUTES)
ac97             1479 sound/pci/ac97/ac97_codec.c 			if ((err = snd_ctl_add(card, kctl = snd_ac97_cnew(&snd_ac97_controls_ad18xx_pcm[idx], ac97))) < 0)
ac97             1482 sound/pci/ac97/ac97_codec.c 		ac97->spec.ad18xx.pcmreg[0] = init_val;
ac97             1483 sound/pci/ac97/ac97_codec.c 		if (ac97->scaps & AC97_SCAP_SURROUND_DAC) {
ac97             1485 sound/pci/ac97/ac97_codec.c 				if ((err = snd_ctl_add(card, kctl = snd_ac97_cnew(&snd_ac97_controls_ad18xx_surround[idx], ac97))) < 0)
ac97             1488 sound/pci/ac97/ac97_codec.c 			ac97->spec.ad18xx.pcmreg[1] = init_val;
ac97             1490 sound/pci/ac97/ac97_codec.c 		if (ac97->scaps & AC97_SCAP_CENTER_LFE_DAC) {
ac97             1492 sound/pci/ac97/ac97_codec.c 				if ((err = snd_ctl_add(card, kctl = snd_ac97_cnew(&snd_ac97_controls_ad18xx_center[idx], ac97))) < 0)
ac97             1496 sound/pci/ac97/ac97_codec.c 				if ((err = snd_ctl_add(card, kctl = snd_ac97_cnew(&snd_ac97_controls_ad18xx_lfe[idx], ac97))) < 0)
ac97             1499 sound/pci/ac97/ac97_codec.c 			ac97->spec.ad18xx.pcmreg[2] = init_val;
ac97             1501 sound/pci/ac97/ac97_codec.c 		snd_ac97_write_cache(ac97, AC97_PCM, init_val);
ac97             1503 sound/pci/ac97/ac97_codec.c 		if (!(ac97->flags & AC97_HAS_NO_STD_PCM)) {
ac97             1504 sound/pci/ac97/ac97_codec.c 			if (ac97->flags & AC97_HAS_NO_PCM_VOL)
ac97             1507 sound/pci/ac97/ac97_codec.c 							 AC97_PCM, 0, ac97);
ac97             1510 sound/pci/ac97/ac97_codec.c 							AC97_PCM, 0, ac97);
ac97             1517 sound/pci/ac97/ac97_codec.c 	if (!(ac97->flags & AC97_HAS_NO_REC_GAIN)) {
ac97             1518 sound/pci/ac97/ac97_codec.c 		if ((err = snd_ctl_add(card, snd_ac97_cnew(&snd_ac97_control_capture_src, ac97))) < 0)
ac97             1520 sound/pci/ac97/ac97_codec.c 		if (snd_ac97_try_bit(ac97, AC97_REC_GAIN, 15)) {
ac97             1522 sound/pci/ac97/ac97_codec.c 						 AC97_REC_GAIN, 0, ac97);
ac97             1526 sound/pci/ac97/ac97_codec.c 		if ((err = snd_ctl_add(card, kctl = snd_ac97_cnew(&snd_ac97_control_capture_vol, ac97))) < 0)
ac97             1529 sound/pci/ac97/ac97_codec.c 		snd_ac97_write_cache(ac97, AC97_REC_SEL, 0x0000);
ac97             1530 sound/pci/ac97/ac97_codec.c 		snd_ac97_write_cache(ac97, AC97_REC_GAIN, 0x0000);
ac97             1533 sound/pci/ac97/ac97_codec.c 	if (snd_ac97_try_volume_mix(ac97, AC97_REC_GAIN_MIC)) {
ac97             1535 sound/pci/ac97/ac97_codec.c 			if ((err = snd_ctl_add(card, kctl = snd_ac97_cnew(&snd_ac97_controls_mic_capture[idx], ac97))) < 0)
ac97             1538 sound/pci/ac97/ac97_codec.c 		snd_ac97_write_cache(ac97, AC97_REC_GAIN_MIC, 0x0000);
ac97             1542 sound/pci/ac97/ac97_codec.c 	if (snd_ac97_try_bit(ac97, AC97_GENERAL_PURPOSE, 15)) {
ac97             1543 sound/pci/ac97/ac97_codec.c 		if ((err = snd_ctl_add(card, snd_ac97_cnew(&snd_ac97_controls_general[AC97_GENERAL_PCM_OUT], ac97))) < 0)
ac97             1548 sound/pci/ac97/ac97_codec.c 	if (ac97->caps & AC97_BC_SIM_STEREO) {
ac97             1549 sound/pci/ac97/ac97_codec.c 		if ((err = snd_ctl_add(card, snd_ac97_cnew(&snd_ac97_controls_general[AC97_GENERAL_STEREO_ENHANCEMENT], ac97))) < 0)
ac97             1554 sound/pci/ac97/ac97_codec.c 	if (snd_ac97_try_bit(ac97, AC97_GENERAL_PURPOSE, 13)) {
ac97             1555 sound/pci/ac97/ac97_codec.c 		if ((err = snd_ctl_add(card, snd_ac97_cnew(&snd_ac97_controls_general[AC97_GENERAL_3D], ac97))) < 0)
ac97             1560 sound/pci/ac97/ac97_codec.c 	if (ac97->caps & AC97_BC_LOUDNESS) {
ac97             1561 sound/pci/ac97/ac97_codec.c 		if ((err = snd_ctl_add(card, snd_ac97_cnew(&snd_ac97_controls_general[AC97_GENERAL_LOUDNESS], ac97))) < 0)
ac97             1566 sound/pci/ac97/ac97_codec.c 	if (snd_ac97_try_bit(ac97, AC97_GENERAL_PURPOSE, 9)) {
ac97             1567 sound/pci/ac97/ac97_codec.c 		if ((err = snd_ctl_add(card, snd_ac97_cnew(&snd_ac97_controls_general[AC97_GENERAL_MONO], ac97))) < 0)
ac97             1572 sound/pci/ac97/ac97_codec.c 	if (snd_ac97_try_bit(ac97, AC97_GENERAL_PURPOSE, 8)) {
ac97             1573 sound/pci/ac97/ac97_codec.c 		if ((err = snd_ctl_add(card, snd_ac97_cnew(&snd_ac97_controls_general[AC97_GENERAL_MIC], ac97))) < 0)
ac97             1578 sound/pci/ac97/ac97_codec.c 	if (enable_loopback && snd_ac97_try_bit(ac97, AC97_GENERAL_PURPOSE, 7)) {
ac97             1579 sound/pci/ac97/ac97_codec.c 		if ((err = snd_ctl_add(card, snd_ac97_cnew(&snd_ac97_controls_general[AC97_GENERAL_LOOPBACK], ac97))) < 0)
ac97             1583 sound/pci/ac97/ac97_codec.c 	snd_ac97_update_bits(ac97, AC97_GENERAL_PURPOSE, ~AC97_GP_DRSS_MASK, 0x0000);
ac97             1586 sound/pci/ac97/ac97_codec.c 	if (ac97->build_ops->build_3d) {
ac97             1587 sound/pci/ac97/ac97_codec.c 		ac97->build_ops->build_3d(ac97);
ac97             1589 sound/pci/ac97/ac97_codec.c 		if (snd_ac97_try_volume_mix(ac97, AC97_3D_CONTROL)) {
ac97             1592 sound/pci/ac97/ac97_codec.c 			snd_ac97_write(ac97, AC97_3D_CONTROL, val);
ac97             1593 sound/pci/ac97/ac97_codec.c 			val = snd_ac97_read(ac97, AC97_3D_CONTROL);
ac97             1595 sound/pci/ac97/ac97_codec.c 			if ((err = snd_ctl_add(card, kctl = snd_ac97_cnew(&snd_ac97_controls_3d[0], ac97))) < 0)
ac97             1599 sound/pci/ac97/ac97_codec.c 			if ((err = snd_ctl_add(card, kctl = snd_ac97_cnew(&snd_ac97_controls_3d[1], ac97))) < 0)
ac97             1603 sound/pci/ac97/ac97_codec.c 			snd_ac97_write_cache(ac97, AC97_3D_CONTROL, 0x0000);
ac97             1610 sound/pci/ac97/ac97_codec.c 	if (ac97->subsystem_vendor == 0x1043 &&
ac97             1611 sound/pci/ac97/ac97_codec.c 	    ac97->subsystem_device == 0x810f)
ac97             1612 sound/pci/ac97/ac97_codec.c 		ac97->ext_id |= AC97_EI_SPDIF;
ac97             1614 sound/pci/ac97/ac97_codec.c 	if ((ac97->ext_id & AC97_EI_SPDIF) && !(ac97->scaps & AC97_SCAP_NO_SPDIF)) {
ac97             1615 sound/pci/ac97/ac97_codec.c 		if (ac97->build_ops->build_spdif) {
ac97             1616 sound/pci/ac97/ac97_codec.c 			if ((err = ac97->build_ops->build_spdif(ac97)) < 0)
ac97             1620 sound/pci/ac97/ac97_codec.c 				if ((err = snd_ctl_add(card, snd_ac97_cnew(&snd_ac97_controls_spdif[idx], ac97))) < 0)
ac97             1622 sound/pci/ac97/ac97_codec.c 			if (ac97->build_ops->build_post_spdif) {
ac97             1623 sound/pci/ac97/ac97_codec.c 				if ((err = ac97->build_ops->build_post_spdif(ac97)) < 0)
ac97             1628 sound/pci/ac97/ac97_codec.c 			snd_ac97_write_cache(ac97, AC97_SPDIF, 0x2a20);
ac97             1629 sound/pci/ac97/ac97_codec.c 			ac97->rates[AC97_RATES_SPDIF] = snd_ac97_determine_spdif_rates(ac97);
ac97             1631 sound/pci/ac97/ac97_codec.c 		ac97->spdif_status = SNDRV_PCM_DEFAULT_CON_SPDIF;
ac97             1635 sound/pci/ac97/ac97_codec.c 	if (ac97->build_ops->build_specific)
ac97             1636 sound/pci/ac97/ac97_codec.c 		if ((err = ac97->build_ops->build_specific(ac97)) < 0)
ac97             1639 sound/pci/ac97/ac97_codec.c 	if (snd_ac97_try_bit(ac97, AC97_POWERDOWN, 15)) {
ac97             1640 sound/pci/ac97/ac97_codec.c 		kctl = snd_ac97_cnew(&snd_ac97_control_eapd, ac97);
ac97             1643 sound/pci/ac97/ac97_codec.c 		if (ac97->scaps & AC97_SCAP_INV_EAPD)
ac97             1644 sound/pci/ac97/ac97_codec.c 			set_inv_eapd(ac97, kctl);
ac97             1652 sound/pci/ac97/ac97_codec.c static int snd_ac97_modem_build(struct snd_card *card, struct snd_ac97 * ac97)
ac97             1660 sound/pci/ac97/ac97_codec.c 	snd_ac97_write(ac97, AC97_GPIO_CFG, 0xffff & ~(AC97_GPIO_LINE1_OH));
ac97             1661 sound/pci/ac97/ac97_codec.c 	snd_ac97_write(ac97, AC97_GPIO_POLARITY, 0xffff & ~(AC97_GPIO_LINE1_OH));
ac97             1662 sound/pci/ac97/ac97_codec.c 	snd_ac97_write(ac97, AC97_GPIO_STICKY, 0xffff);
ac97             1663 sound/pci/ac97/ac97_codec.c 	snd_ac97_write(ac97, AC97_GPIO_WAKEUP, 0x0);
ac97             1664 sound/pci/ac97/ac97_codec.c 	snd_ac97_write(ac97, AC97_MISC_AFE, 0x0);
ac97             1668 sound/pci/ac97/ac97_codec.c 		if ((err = snd_ctl_add(card, snd_ctl_new1(&snd_ac97_controls_modem_switches[idx], ac97))) < 0)
ac97             1672 sound/pci/ac97/ac97_codec.c 	if (ac97->build_ops->build_specific)
ac97             1673 sound/pci/ac97/ac97_codec.c 		if ((err = ac97->build_ops->build_specific(ac97)) < 0)
ac97             1679 sound/pci/ac97/ac97_codec.c static int snd_ac97_test_rate(struct snd_ac97 *ac97, int reg, int shadow_reg, int rate)
ac97             1684 sound/pci/ac97/ac97_codec.c 	tmp = ((unsigned int)rate * ac97->bus->clock) / 48000;
ac97             1685 sound/pci/ac97/ac97_codec.c 	snd_ac97_write_cache(ac97, reg, tmp & 0xffff);
ac97             1687 sound/pci/ac97/ac97_codec.c 		snd_ac97_write_cache(ac97, shadow_reg, tmp & 0xffff);
ac97             1688 sound/pci/ac97/ac97_codec.c 	val = snd_ac97_read(ac97, reg);
ac97             1692 sound/pci/ac97/ac97_codec.c static void snd_ac97_determine_rates(struct snd_ac97 *ac97, int reg, int shadow_reg, unsigned int *r_result)
ac97             1697 sound/pci/ac97/ac97_codec.c 	if (ac97->bus->no_vra) {
ac97             1699 sound/pci/ac97/ac97_codec.c 		if ((ac97->flags & AC97_DOUBLE_RATE) &&
ac97             1705 sound/pci/ac97/ac97_codec.c 	saved = snd_ac97_read(ac97, reg);
ac97             1706 sound/pci/ac97/ac97_codec.c 	if ((ac97->ext_id & AC97_EI_DRA) && reg == AC97_PCM_FRONT_DAC_RATE)
ac97             1707 sound/pci/ac97/ac97_codec.c 		snd_ac97_update_bits(ac97, AC97_EXTENDED_STATUS,
ac97             1710 sound/pci/ac97/ac97_codec.c 	if (snd_ac97_test_rate(ac97, reg, shadow_reg, 11000))
ac97             1713 sound/pci/ac97/ac97_codec.c 	if (snd_ac97_test_rate(ac97, reg, shadow_reg, 8000))
ac97             1715 sound/pci/ac97/ac97_codec.c 	if (snd_ac97_test_rate(ac97, reg, shadow_reg, 11025))
ac97             1717 sound/pci/ac97/ac97_codec.c 	if (snd_ac97_test_rate(ac97, reg, shadow_reg, 16000))
ac97             1719 sound/pci/ac97/ac97_codec.c 	if (snd_ac97_test_rate(ac97, reg, shadow_reg, 22050))
ac97             1721 sound/pci/ac97/ac97_codec.c 	if (snd_ac97_test_rate(ac97, reg, shadow_reg, 32000))
ac97             1723 sound/pci/ac97/ac97_codec.c 	if (snd_ac97_test_rate(ac97, reg, shadow_reg, 44100))
ac97             1725 sound/pci/ac97/ac97_codec.c 	if (snd_ac97_test_rate(ac97, reg, shadow_reg, 48000))
ac97             1727 sound/pci/ac97/ac97_codec.c 	if ((ac97->flags & AC97_DOUBLE_RATE) &&
ac97             1730 sound/pci/ac97/ac97_codec.c 		snd_ac97_update_bits(ac97, AC97_EXTENDED_STATUS,
ac97             1732 sound/pci/ac97/ac97_codec.c 		if (snd_ac97_test_rate(ac97, reg, shadow_reg, 64000 / 2))
ac97             1734 sound/pci/ac97/ac97_codec.c 		if (snd_ac97_test_rate(ac97, reg, shadow_reg, 88200 / 2))
ac97             1736 sound/pci/ac97/ac97_codec.c 		if (snd_ac97_test_rate(ac97, reg, shadow_reg, 96000 / 2))
ac97             1739 sound/pci/ac97/ac97_codec.c 		if (!snd_ac97_test_rate(ac97, reg, shadow_reg, 76100 / 2))
ac97             1741 sound/pci/ac97/ac97_codec.c 		snd_ac97_update_bits(ac97, AC97_EXTENDED_STATUS,
ac97             1745 sound/pci/ac97/ac97_codec.c 	snd_ac97_write_cache(ac97, reg, saved);
ac97             1747 sound/pci/ac97/ac97_codec.c 		snd_ac97_write_cache(ac97, shadow_reg, saved);
ac97             1752 sound/pci/ac97/ac97_codec.c static unsigned int snd_ac97_determine_spdif_rates(struct snd_ac97 *ac97)
ac97             1764 sound/pci/ac97/ac97_codec.c 		snd_ac97_update_bits(ac97, AC97_SPDIF, AC97_SC_SPSR_MASK, ctl_bits[i]);
ac97             1765 sound/pci/ac97/ac97_codec.c 		if ((snd_ac97_read(ac97, AC97_SPDIF) & AC97_SC_SPSR_MASK) == ctl_bits[i])
ac97             1783 sound/pci/ac97/ac97_codec.c void snd_ac97_get_name(struct snd_ac97 *ac97, unsigned int id, char *name, int modem)
ac97             1796 sound/pci/ac97/ac97_codec.c 	if (ac97 && pid->patch) {
ac97             1799 sound/pci/ac97/ac97_codec.c 			pid->patch(ac97);
ac97             1808 sound/pci/ac97/ac97_codec.c 		if (ac97 && pid->patch) {
ac97             1811 sound/pci/ac97/ac97_codec.c 				pid->patch(ac97);
ac97             1823 sound/pci/ac97/ac97_codec.c const char *snd_ac97_get_short_name(struct snd_ac97 *ac97)
ac97             1828 sound/pci/ac97/ac97_codec.c 		if (pid->id == (ac97->id & pid->mask))
ac97             1838 sound/pci/ac97/ac97_codec.c static int ac97_reset_wait(struct snd_ac97 *ac97, int timeout, int with_modem)
ac97             1847 sound/pci/ac97/ac97_codec.c 		snd_ac97_read(ac97, AC97_RESET);
ac97             1848 sound/pci/ac97/ac97_codec.c 		snd_ac97_read(ac97, AC97_VENDOR_ID1);
ac97             1849 sound/pci/ac97/ac97_codec.c 		snd_ac97_read(ac97, AC97_VENDOR_ID2);
ac97             1852 sound/pci/ac97/ac97_codec.c 			val = snd_ac97_read(ac97, AC97_EXTENDED_MID);
ac97             1856 sound/pci/ac97/ac97_codec.c 		if (ac97->scaps & AC97_SCAP_DETECT_BY_VENDOR) {
ac97             1858 sound/pci/ac97/ac97_codec.c 			val = snd_ac97_read(ac97, AC97_VENDOR_ID1);
ac97             1866 sound/pci/ac97/ac97_codec.c 			snd_ac97_write_cache(ac97, AC97_REC_GAIN, 0x8a05);
ac97             1867 sound/pci/ac97/ac97_codec.c 			if ((snd_ac97_read(ac97, AC97_REC_GAIN) & 0x7fff) == 0x0a05)
ac97             1937 sound/pci/ac97/ac97_codec.c 	struct snd_ac97 *ac97 = device->device_data;
ac97             1940 sound/pci/ac97/ac97_codec.c 	ac97->dev.bus = &ac97_bus_type;
ac97             1941 sound/pci/ac97/ac97_codec.c 	ac97->dev.parent = ac97->bus->card->dev;
ac97             1942 sound/pci/ac97/ac97_codec.c 	ac97->dev.release = ac97_device_release;
ac97             1943 sound/pci/ac97/ac97_codec.c 	dev_set_name(&ac97->dev, "%d-%d:%s",
ac97             1944 sound/pci/ac97/ac97_codec.c 		     ac97->bus->card->number, ac97->num,
ac97             1945 sound/pci/ac97/ac97_codec.c 		     snd_ac97_get_short_name(ac97));
ac97             1946 sound/pci/ac97/ac97_codec.c 	if ((err = device_register(&ac97->dev)) < 0) {
ac97             1947 sound/pci/ac97/ac97_codec.c 		ac97_err(ac97, "Can't register ac97 bus\n");
ac97             1948 sound/pci/ac97/ac97_codec.c 		ac97->dev.bus = NULL;
ac97             1957 sound/pci/ac97/ac97_codec.c 	struct snd_ac97 *ac97 = device->device_data;
ac97             1958 sound/pci/ac97/ac97_codec.c 	if (ac97->dev.bus)
ac97             1959 sound/pci/ac97/ac97_codec.c 		device_unregister(&ac97->dev);
ac97             1996 sound/pci/ac97/ac97_codec.c 	struct snd_ac97 *ac97;
ac97             2018 sound/pci/ac97/ac97_codec.c 	ac97 = kzalloc(sizeof(*ac97), GFP_KERNEL);
ac97             2019 sound/pci/ac97/ac97_codec.c 	if (ac97 == NULL)
ac97             2021 sound/pci/ac97/ac97_codec.c 	ac97->private_data = template->private_data;
ac97             2022 sound/pci/ac97/ac97_codec.c 	ac97->private_free = template->private_free;
ac97             2023 sound/pci/ac97/ac97_codec.c 	ac97->bus = bus;
ac97             2024 sound/pci/ac97/ac97_codec.c 	ac97->pci = template->pci;
ac97             2025 sound/pci/ac97/ac97_codec.c 	ac97->num = template->num;
ac97             2026 sound/pci/ac97/ac97_codec.c 	ac97->addr = template->addr;
ac97             2027 sound/pci/ac97/ac97_codec.c 	ac97->scaps = template->scaps;
ac97             2028 sound/pci/ac97/ac97_codec.c 	ac97->res_table = template->res_table;
ac97             2029 sound/pci/ac97/ac97_codec.c 	bus->codec[ac97->num] = ac97;
ac97             2030 sound/pci/ac97/ac97_codec.c 	mutex_init(&ac97->reg_mutex);
ac97             2031 sound/pci/ac97/ac97_codec.c 	mutex_init(&ac97->page_mutex);
ac97             2033 sound/pci/ac97/ac97_codec.c 	INIT_DELAYED_WORK(&ac97->power_work, do_update_power);
ac97             2037 sound/pci/ac97/ac97_codec.c 	if (ac97->pci) {
ac97             2038 sound/pci/ac97/ac97_codec.c 		pci_read_config_word(ac97->pci, PCI_SUBSYSTEM_VENDOR_ID, &ac97->subsystem_vendor);
ac97             2039 sound/pci/ac97/ac97_codec.c 		pci_read_config_word(ac97->pci, PCI_SUBSYSTEM_ID, &ac97->subsystem_device);
ac97             2043 sound/pci/ac97/ac97_codec.c 		bus->ops->reset(ac97);
ac97             2047 sound/pci/ac97/ac97_codec.c 	ac97->id = snd_ac97_read(ac97, AC97_VENDOR_ID1) << 16;
ac97             2048 sound/pci/ac97/ac97_codec.c 	ac97->id |= snd_ac97_read(ac97, AC97_VENDOR_ID2);
ac97             2049 sound/pci/ac97/ac97_codec.c 	if (ac97->id && ac97->id != (unsigned int)-1) {
ac97             2050 sound/pci/ac97/ac97_codec.c 		pid = look_for_codec_id(snd_ac97_codec_ids, ac97->id);
ac97             2056 sound/pci/ac97/ac97_codec.c 	if (!(ac97->scaps & AC97_SCAP_SKIP_AUDIO))
ac97             2057 sound/pci/ac97/ac97_codec.c 		snd_ac97_write(ac97, AC97_RESET, 0);
ac97             2058 sound/pci/ac97/ac97_codec.c 	if (!(ac97->scaps & AC97_SCAP_SKIP_MODEM))
ac97             2059 sound/pci/ac97/ac97_codec.c 		snd_ac97_write(ac97, AC97_EXTENDED_MID, 0);
ac97             2061 sound/pci/ac97/ac97_codec.c 		bus->ops->wait(ac97);
ac97             2064 sound/pci/ac97/ac97_codec.c 		if (ac97->scaps & AC97_SCAP_SKIP_AUDIO)
ac97             2065 sound/pci/ac97/ac97_codec.c 			err = ac97_reset_wait(ac97, msecs_to_jiffies(500), 1);
ac97             2067 sound/pci/ac97/ac97_codec.c 			err = ac97_reset_wait(ac97, msecs_to_jiffies(500), 0);
ac97             2069 sound/pci/ac97/ac97_codec.c 				err = ac97_reset_wait(ac97,
ac97             2073 sound/pci/ac97/ac97_codec.c 			ac97_warn(ac97, "AC'97 %d does not respond - RESET\n",
ac97             2074 sound/pci/ac97/ac97_codec.c 				 ac97->num);
ac97             2079 sound/pci/ac97/ac97_codec.c 	ac97->id = snd_ac97_read(ac97, AC97_VENDOR_ID1) << 16;
ac97             2080 sound/pci/ac97/ac97_codec.c 	ac97->id |= snd_ac97_read(ac97, AC97_VENDOR_ID2);
ac97             2081 sound/pci/ac97/ac97_codec.c 	if (! (ac97->scaps & AC97_SCAP_DETECT_BY_VENDOR) &&
ac97             2082 sound/pci/ac97/ac97_codec.c 	    (ac97->id == 0x00000000 || ac97->id == 0xffffffff)) {
ac97             2083 sound/pci/ac97/ac97_codec.c 		ac97_err(ac97,
ac97             2085 sound/pci/ac97/ac97_codec.c 			 ac97->num, ac97->id);
ac97             2086 sound/pci/ac97/ac97_codec.c 		snd_ac97_free(ac97);
ac97             2089 sound/pci/ac97/ac97_codec.c 	pid = look_for_codec_id(snd_ac97_codec_ids, ac97->id);
ac97             2091 sound/pci/ac97/ac97_codec.c 		ac97->flags |= pid->flags;
ac97             2094 sound/pci/ac97/ac97_codec.c 	if (!(ac97->scaps & AC97_SCAP_SKIP_AUDIO) && !(ac97->scaps & AC97_SCAP_AUDIO)) {
ac97             2096 sound/pci/ac97/ac97_codec.c 		snd_ac97_write_cache(ac97, AC97_REC_GAIN, 0x8a06);
ac97             2097 sound/pci/ac97/ac97_codec.c 		if (((err = snd_ac97_read(ac97, AC97_REC_GAIN)) & 0x7fff) == 0x0a06)
ac97             2098 sound/pci/ac97/ac97_codec.c 			ac97->scaps |= AC97_SCAP_AUDIO;
ac97             2100 sound/pci/ac97/ac97_codec.c 	if (ac97->scaps & AC97_SCAP_AUDIO) {
ac97             2101 sound/pci/ac97/ac97_codec.c 		ac97->caps = snd_ac97_read(ac97, AC97_RESET);
ac97             2102 sound/pci/ac97/ac97_codec.c 		ac97->ext_id = snd_ac97_read(ac97, AC97_EXTENDED_ID);
ac97             2103 sound/pci/ac97/ac97_codec.c 		if (ac97->ext_id == 0xffff)	/* invalid combination */
ac97             2104 sound/pci/ac97/ac97_codec.c 			ac97->ext_id = 0;
ac97             2108 sound/pci/ac97/ac97_codec.c 	if (!(ac97->scaps & AC97_SCAP_SKIP_MODEM) && !(ac97->scaps & AC97_SCAP_MODEM)) {
ac97             2109 sound/pci/ac97/ac97_codec.c 		ac97->ext_mid = snd_ac97_read(ac97, AC97_EXTENDED_MID);
ac97             2110 sound/pci/ac97/ac97_codec.c 		if (ac97->ext_mid == 0xffff)	/* invalid combination */
ac97             2111 sound/pci/ac97/ac97_codec.c 			ac97->ext_mid = 0;
ac97             2112 sound/pci/ac97/ac97_codec.c 		if (ac97->ext_mid & 1)
ac97             2113 sound/pci/ac97/ac97_codec.c 			ac97->scaps |= AC97_SCAP_MODEM;
ac97             2116 sound/pci/ac97/ac97_codec.c 	if (!ac97_is_audio(ac97) && !ac97_is_modem(ac97)) {
ac97             2117 sound/pci/ac97/ac97_codec.c 		if (!(ac97->scaps & (AC97_SCAP_SKIP_AUDIO|AC97_SCAP_SKIP_MODEM)))
ac97             2118 sound/pci/ac97/ac97_codec.c 			ac97_err(ac97,
ac97             2120 sound/pci/ac97/ac97_codec.c 				 ac97->num);
ac97             2121 sound/pci/ac97/ac97_codec.c 		snd_ac97_free(ac97);
ac97             2129 sound/pci/ac97/ac97_codec.c 	if (ac97_is_audio(ac97)) {
ac97             2131 sound/pci/ac97/ac97_codec.c 		snd_ac97_write_cache(ac97, AC97_POWERDOWN, 0);
ac97             2132 sound/pci/ac97/ac97_codec.c 		if (! (ac97->flags & AC97_DEFAULT_POWER_OFF)) {
ac97             2133 sound/pci/ac97/ac97_codec.c 			snd_ac97_write_cache(ac97, AC97_RESET, 0); /* reset to defaults */
ac97             2135 sound/pci/ac97/ac97_codec.c 			snd_ac97_write_cache(ac97, AC97_POWERDOWN, 0);
ac97             2138 sound/pci/ac97/ac97_codec.c 		snd_ac97_write_cache(ac97, AC97_GENERAL_PURPOSE, 0);
ac97             2141 sound/pci/ac97/ac97_codec.c 			if ((snd_ac97_read(ac97, AC97_POWERDOWN) & 0x0f) == 0x0f)
ac97             2145 sound/pci/ac97/ac97_codec.c 		ac97_warn(ac97,
ac97             2146 sound/pci/ac97/ac97_codec.c 			  "AC'97 %d analog subsections not ready\n", ac97->num);
ac97             2150 sound/pci/ac97/ac97_codec.c 	if (ac97_is_modem(ac97)) {
ac97             2156 sound/pci/ac97/ac97_codec.c 		if (ac97->ext_mid & AC97_MEI_LINE1) {
ac97             2157 sound/pci/ac97/ac97_codec.c 			snd_ac97_write_cache(ac97, AC97_LINE1_RATE, 8000);
ac97             2160 sound/pci/ac97/ac97_codec.c 		if (ac97->ext_mid & AC97_MEI_LINE2) {
ac97             2161 sound/pci/ac97/ac97_codec.c 			snd_ac97_write_cache(ac97, AC97_LINE2_RATE, 8000);
ac97             2164 sound/pci/ac97/ac97_codec.c 		if (ac97->ext_mid & AC97_MEI_HANDSET) {
ac97             2165 sound/pci/ac97/ac97_codec.c 			snd_ac97_write_cache(ac97, AC97_HANDSET_RATE, 8000);
ac97             2168 sound/pci/ac97/ac97_codec.c 		snd_ac97_write_cache(ac97, AC97_EXTENDED_MSTATUS, 0);
ac97             2171 sound/pci/ac97/ac97_codec.c 		snd_ac97_write_cache(ac97, AC97_EXTENDED_MSTATUS, 0);
ac97             2174 sound/pci/ac97/ac97_codec.c 			if ((snd_ac97_read(ac97, AC97_EXTENDED_MSTATUS) & tmp) == tmp)
ac97             2178 sound/pci/ac97/ac97_codec.c 		ac97_warn(ac97,
ac97             2180 sound/pci/ac97/ac97_codec.c 			  ac97->num,
ac97             2181 sound/pci/ac97/ac97_codec.c 			  snd_ac97_read(ac97, AC97_EXTENDED_MSTATUS));
ac97             2185 sound/pci/ac97/ac97_codec.c 	if (ac97_is_audio(ac97))
ac97             2186 sound/pci/ac97/ac97_codec.c 		ac97->addr = (ac97->ext_id & AC97_EI_ADDR_MASK) >> AC97_EI_ADDR_SHIFT;
ac97             2188 sound/pci/ac97/ac97_codec.c 		ac97->addr = (ac97->ext_mid & AC97_MEI_ADDR_MASK) >> AC97_MEI_ADDR_SHIFT;
ac97             2189 sound/pci/ac97/ac97_codec.c 	if (ac97->ext_id & 0x01c9) {	/* L/R, MIC, SDAC, LDAC VRA support */
ac97             2190 sound/pci/ac97/ac97_codec.c 		reg = snd_ac97_read(ac97, AC97_EXTENDED_STATUS);
ac97             2191 sound/pci/ac97/ac97_codec.c 		reg |= ac97->ext_id & 0x01c0; /* LDAC/SDAC/CDAC */
ac97             2193 sound/pci/ac97/ac97_codec.c 			reg |= ac97->ext_id & 0x0009; /* VRA/VRM */
ac97             2194 sound/pci/ac97/ac97_codec.c 		snd_ac97_write_cache(ac97, AC97_EXTENDED_STATUS, reg);
ac97             2196 sound/pci/ac97/ac97_codec.c 	if ((ac97->ext_id & AC97_EI_DRA) && bus->dra) {
ac97             2199 sound/pci/ac97/ac97_codec.c 		snd_ac97_update_bits(ac97, AC97_GENERAL_PURPOSE, AC97_GP_DRSS_MASK, AC97_GP_DRSS_78);
ac97             2200 sound/pci/ac97/ac97_codec.c 		if ((snd_ac97_read(ac97, AC97_GENERAL_PURPOSE) & AC97_GP_DRSS_MASK) == AC97_GP_DRSS_78)
ac97             2201 sound/pci/ac97/ac97_codec.c 			ac97->flags |= AC97_DOUBLE_RATE;
ac97             2203 sound/pci/ac97/ac97_codec.c 		snd_ac97_update_bits(ac97, AC97_GENERAL_PURPOSE, AC97_GP_DRSS_MASK, 0);
ac97             2205 sound/pci/ac97/ac97_codec.c 	if (ac97->ext_id & AC97_EI_VRA) {	/* VRA support */
ac97             2206 sound/pci/ac97/ac97_codec.c 		snd_ac97_determine_rates(ac97, AC97_PCM_FRONT_DAC_RATE, 0, &ac97->rates[AC97_RATES_FRONT_DAC]);
ac97             2207 sound/pci/ac97/ac97_codec.c 		snd_ac97_determine_rates(ac97, AC97_PCM_LR_ADC_RATE, 0, &ac97->rates[AC97_RATES_ADC]);
ac97             2209 sound/pci/ac97/ac97_codec.c 		ac97->rates[AC97_RATES_FRONT_DAC] = SNDRV_PCM_RATE_48000;
ac97             2210 sound/pci/ac97/ac97_codec.c 		if (ac97->flags & AC97_DOUBLE_RATE)
ac97             2211 sound/pci/ac97/ac97_codec.c 			ac97->rates[AC97_RATES_FRONT_DAC] |= SNDRV_PCM_RATE_96000;
ac97             2212 sound/pci/ac97/ac97_codec.c 		ac97->rates[AC97_RATES_ADC] = SNDRV_PCM_RATE_48000;
ac97             2214 sound/pci/ac97/ac97_codec.c 	if (ac97->ext_id & AC97_EI_SPDIF) {
ac97             2216 sound/pci/ac97/ac97_codec.c 		ac97->rates[AC97_RATES_SPDIF] = SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_32000;
ac97             2218 sound/pci/ac97/ac97_codec.c 	if (ac97->ext_id & AC97_EI_VRM) {	/* MIC VRA support */
ac97             2219 sound/pci/ac97/ac97_codec.c 		snd_ac97_determine_rates(ac97, AC97_PCM_MIC_ADC_RATE, 0, &ac97->rates[AC97_RATES_MIC_ADC]);
ac97             2221 sound/pci/ac97/ac97_codec.c 		ac97->rates[AC97_RATES_MIC_ADC] = SNDRV_PCM_RATE_48000;
ac97             2223 sound/pci/ac97/ac97_codec.c 	if (ac97->ext_id & AC97_EI_SDAC) {	/* SDAC support */
ac97             2224 sound/pci/ac97/ac97_codec.c 		snd_ac97_determine_rates(ac97, AC97_PCM_SURR_DAC_RATE, AC97_PCM_FRONT_DAC_RATE, &ac97->rates[AC97_RATES_SURR_DAC]);
ac97             2225 sound/pci/ac97/ac97_codec.c 		ac97->scaps |= AC97_SCAP_SURROUND_DAC;
ac97             2227 sound/pci/ac97/ac97_codec.c 	if (ac97->ext_id & AC97_EI_LDAC) {	/* LDAC support */
ac97             2228 sound/pci/ac97/ac97_codec.c 		snd_ac97_determine_rates(ac97, AC97_PCM_LFE_DAC_RATE, AC97_PCM_FRONT_DAC_RATE, &ac97->rates[AC97_RATES_LFE_DAC]);
ac97             2229 sound/pci/ac97/ac97_codec.c 		ac97->scaps |= AC97_SCAP_CENTER_LFE_DAC;
ac97             2233 sound/pci/ac97/ac97_codec.c 		bus->ops->init(ac97);
ac97             2234 sound/pci/ac97/ac97_codec.c 	snd_ac97_get_name(ac97, ac97->id, name, !ac97_is_audio(ac97));
ac97             2235 sound/pci/ac97/ac97_codec.c 	snd_ac97_get_name(NULL, ac97->id, name, !ac97_is_audio(ac97));  // ac97->id might be changed in the special setup code
ac97             2236 sound/pci/ac97/ac97_codec.c 	if (! ac97->build_ops)
ac97             2237 sound/pci/ac97/ac97_codec.c 		ac97->build_ops = &null_build_ops;
ac97             2239 sound/pci/ac97/ac97_codec.c 	if (ac97_is_audio(ac97)) {
ac97             2249 sound/pci/ac97/ac97_codec.c 		sprintf(comp, "AC97a:%08x", ac97->id);
ac97             2251 sound/pci/ac97/ac97_codec.c 			snd_ac97_free(ac97);
ac97             2254 sound/pci/ac97/ac97_codec.c 		if (snd_ac97_mixer_build(ac97) < 0) {
ac97             2255 sound/pci/ac97/ac97_codec.c 			snd_ac97_free(ac97);
ac97             2259 sound/pci/ac97/ac97_codec.c 	if (ac97_is_modem(ac97)) {
ac97             2269 sound/pci/ac97/ac97_codec.c 		sprintf(comp, "AC97m:%08x", ac97->id);
ac97             2271 sound/pci/ac97/ac97_codec.c 			snd_ac97_free(ac97);
ac97             2274 sound/pci/ac97/ac97_codec.c 		if (snd_ac97_modem_build(card, ac97) < 0) {
ac97             2275 sound/pci/ac97/ac97_codec.c 			snd_ac97_free(ac97);
ac97             2279 sound/pci/ac97/ac97_codec.c 	if (ac97_is_audio(ac97))
ac97             2280 sound/pci/ac97/ac97_codec.c 		update_power_regs(ac97);
ac97             2281 sound/pci/ac97/ac97_codec.c 	snd_ac97_proc_init(ac97);
ac97             2282 sound/pci/ac97/ac97_codec.c 	if ((err = snd_device_new(card, SNDRV_DEV_CODEC, ac97, &ops)) < 0) {
ac97             2283 sound/pci/ac97/ac97_codec.c 		snd_ac97_free(ac97);
ac97             2286 sound/pci/ac97/ac97_codec.c 	*rac97 = ac97;
ac97             2298 sound/pci/ac97/ac97_codec.c static void snd_ac97_powerdown(struct snd_ac97 *ac97)
ac97             2302 sound/pci/ac97/ac97_codec.c 	if (ac97_is_audio(ac97)) {
ac97             2304 sound/pci/ac97/ac97_codec.c 		snd_ac97_write(ac97, AC97_MASTER, 0x9f9f);
ac97             2305 sound/pci/ac97/ac97_codec.c 		snd_ac97_write(ac97, AC97_HEADPHONE, 0x9f9f);
ac97             2309 sound/pci/ac97/ac97_codec.c 	power = ac97->regs[AC97_EXTENDED_STATUS];
ac97             2310 sound/pci/ac97/ac97_codec.c 	if (ac97->scaps & AC97_SCAP_SURROUND_DAC)
ac97             2312 sound/pci/ac97/ac97_codec.c 	if (ac97->scaps & AC97_SCAP_CENTER_LFE_DAC)
ac97             2315 sound/pci/ac97/ac97_codec.c 	snd_ac97_write(ac97, AC97_EXTENDED_STATUS, power);
ac97             2318 sound/pci/ac97/ac97_codec.c 	if (ac97->scaps & AC97_SCAP_INV_EAPD)
ac97             2319 sound/pci/ac97/ac97_codec.c 		power = ac97->regs[AC97_POWERDOWN] & ~AC97_PD_EAPD;
ac97             2320 sound/pci/ac97/ac97_codec.c 	else if (! (ac97->scaps & AC97_SCAP_EAPD_LED))
ac97             2321 sound/pci/ac97/ac97_codec.c 		power = ac97->regs[AC97_POWERDOWN] | AC97_PD_EAPD;
ac97             2324 sound/pci/ac97/ac97_codec.c 	snd_ac97_write(ac97, AC97_POWERDOWN, power);
ac97             2327 sound/pci/ac97/ac97_codec.c 	snd_ac97_write(ac97, AC97_POWERDOWN, power);
ac97             2328 sound/pci/ac97/ac97_codec.c 	if (ac97_is_power_save_mode(ac97)) {
ac97             2330 sound/pci/ac97/ac97_codec.c 		snd_ac97_write(ac97, AC97_POWERDOWN, power);
ac97             2335 sound/pci/ac97/ac97_codec.c 		snd_ac97_write(ac97, AC97_POWERDOWN, power);
ac97             2370 sound/pci/ac97/ac97_codec.c int snd_ac97_update_power(struct snd_ac97 *ac97, int reg, int powerup)
ac97             2374 sound/pci/ac97/ac97_codec.c 	if (! ac97)
ac97             2384 sound/pci/ac97/ac97_codec.c 					ac97->power_up |= (1 << i);
ac97             2386 sound/pci/ac97/ac97_codec.c 					ac97->power_up &= ~(1 << i);
ac97             2392 sound/pci/ac97/ac97_codec.c 	if (ac97_is_power_save_mode(ac97) && !powerup)
ac97             2397 sound/pci/ac97/ac97_codec.c 		schedule_delayed_work(&ac97->power_work,
ac97             2400 sound/pci/ac97/ac97_codec.c 		cancel_delayed_work(&ac97->power_work);
ac97             2401 sound/pci/ac97/ac97_codec.c 		update_power_regs(ac97);
ac97             2410 sound/pci/ac97/ac97_codec.c static void update_power_regs(struct snd_ac97 *ac97)
ac97             2417 sound/pci/ac97/ac97_codec.c 	if (ac97->scaps & AC97_SCAP_SURROUND_DAC)
ac97             2419 sound/pci/ac97/ac97_codec.c 	if (ac97->scaps & AC97_SCAP_CENTER_LFE_DAC)
ac97             2422 sound/pci/ac97/ac97_codec.c 	if (ac97_is_power_save_mode(ac97))
ac97             2423 sound/pci/ac97/ac97_codec.c 		power_up = ac97->power_up;
ac97             2426 sound/pci/ac97/ac97_codec.c 		if (ac97->regs[AC97_POWERDOWN] & AC97_PD_PR2) {
ac97             2428 sound/pci/ac97/ac97_codec.c 			snd_ac97_update_bits(ac97, AC97_POWERDOWN,
ac97             2431 sound/pci/ac97/ac97_codec.c 			snd_ac97_update_bits(ac97, AC97_POWERDOWN,
ac97             2440 sound/pci/ac97/ac97_codec.c 		snd_ac97_update_bits(ac97, power_regs[i].power_reg,
ac97             2444 sound/pci/ac97/ac97_codec.c 		if (! (ac97->regs[AC97_POWERDOWN] & AC97_PD_PR2)) {
ac97             2446 sound/pci/ac97/ac97_codec.c 			snd_ac97_update_bits(ac97, AC97_POWERDOWN,
ac97             2448 sound/pci/ac97/ac97_codec.c 			snd_ac97_update_bits(ac97, AC97_POWERDOWN,
ac97             2462 sound/pci/ac97/ac97_codec.c void snd_ac97_suspend(struct snd_ac97 *ac97)
ac97             2464 sound/pci/ac97/ac97_codec.c 	if (! ac97)
ac97             2466 sound/pci/ac97/ac97_codec.c 	if (ac97->build_ops->suspend)
ac97             2467 sound/pci/ac97/ac97_codec.c 		ac97->build_ops->suspend(ac97);
ac97             2469 sound/pci/ac97/ac97_codec.c 	cancel_delayed_work_sync(&ac97->power_work);
ac97             2471 sound/pci/ac97/ac97_codec.c 	snd_ac97_powerdown(ac97);
ac97             2479 sound/pci/ac97/ac97_codec.c static void snd_ac97_restore_status(struct snd_ac97 *ac97)
ac97             2490 sound/pci/ac97/ac97_codec.c 		if (test_bit(i, ac97->reg_accessed)) {
ac97             2491 sound/pci/ac97/ac97_codec.c 			snd_ac97_write(ac97, i, ac97->regs[i]);
ac97             2492 sound/pci/ac97/ac97_codec.c 			snd_ac97_read(ac97, i);
ac97             2500 sound/pci/ac97/ac97_codec.c static void snd_ac97_restore_iec958(struct snd_ac97 *ac97)
ac97             2502 sound/pci/ac97/ac97_codec.c 	if (ac97->ext_id & AC97_EI_SPDIF) {
ac97             2503 sound/pci/ac97/ac97_codec.c 		if (ac97->regs[AC97_EXTENDED_STATUS] & AC97_EA_SPDIF) {
ac97             2505 sound/pci/ac97/ac97_codec.c 			snd_ac97_update_bits(ac97, AC97_EXTENDED_STATUS, AC97_EA_SPDIF, 0);
ac97             2506 sound/pci/ac97/ac97_codec.c 			snd_ac97_write(ac97, AC97_EXTENDED_STATUS, ac97->regs[AC97_EXTENDED_STATUS]);
ac97             2507 sound/pci/ac97/ac97_codec.c 			if (ac97->flags & AC97_CS_SPDIF)
ac97             2508 sound/pci/ac97/ac97_codec.c 				snd_ac97_write(ac97, AC97_CSR_SPDIF, ac97->regs[AC97_CSR_SPDIF]);
ac97             2510 sound/pci/ac97/ac97_codec.c 				snd_ac97_write(ac97, AC97_SPDIF, ac97->regs[AC97_SPDIF]);
ac97             2511 sound/pci/ac97/ac97_codec.c 			snd_ac97_update_bits(ac97, AC97_EXTENDED_STATUS, AC97_EA_SPDIF, AC97_EA_SPDIF); /* turn on again */
ac97             2523 sound/pci/ac97/ac97_codec.c void snd_ac97_resume(struct snd_ac97 *ac97)
ac97             2527 sound/pci/ac97/ac97_codec.c 	if (! ac97)
ac97             2530 sound/pci/ac97/ac97_codec.c 	if (ac97->bus->ops->reset) {
ac97             2531 sound/pci/ac97/ac97_codec.c 		ac97->bus->ops->reset(ac97);
ac97             2535 sound/pci/ac97/ac97_codec.c 	snd_ac97_write(ac97, AC97_POWERDOWN, 0);
ac97             2536 sound/pci/ac97/ac97_codec.c 	if (! (ac97->flags & AC97_DEFAULT_POWER_OFF)) {
ac97             2537 sound/pci/ac97/ac97_codec.c 		if (!(ac97->scaps & AC97_SCAP_SKIP_AUDIO))
ac97             2538 sound/pci/ac97/ac97_codec.c 			snd_ac97_write(ac97, AC97_RESET, 0);
ac97             2539 sound/pci/ac97/ac97_codec.c 		else if (!(ac97->scaps & AC97_SCAP_SKIP_MODEM))
ac97             2540 sound/pci/ac97/ac97_codec.c 			snd_ac97_write(ac97, AC97_EXTENDED_MID, 0);
ac97             2542 sound/pci/ac97/ac97_codec.c 		snd_ac97_write(ac97, AC97_POWERDOWN, 0);
ac97             2544 sound/pci/ac97/ac97_codec.c 	snd_ac97_write(ac97, AC97_GENERAL_PURPOSE, 0);
ac97             2546 sound/pci/ac97/ac97_codec.c 	snd_ac97_write(ac97, AC97_POWERDOWN, ac97->regs[AC97_POWERDOWN]);
ac97             2547 sound/pci/ac97/ac97_codec.c 	if (ac97_is_audio(ac97)) {
ac97             2548 sound/pci/ac97/ac97_codec.c 		ac97->bus->ops->write(ac97, AC97_MASTER, 0x8101);
ac97             2551 sound/pci/ac97/ac97_codec.c 			if (snd_ac97_read(ac97, AC97_MASTER) == 0x8101)
ac97             2556 sound/pci/ac97/ac97_codec.c 		ac97->bus->ops->write(ac97, AC97_MASTER, AC97_MUTE_MASK_MONO);
ac97             2557 sound/pci/ac97/ac97_codec.c 		if (snd_ac97_read(ac97, AC97_MASTER) != AC97_MUTE_MASK_MONO)
ac97             2562 sound/pci/ac97/ac97_codec.c 			unsigned short val = snd_ac97_read(ac97, AC97_EXTENDED_MID);
ac97             2570 sound/pci/ac97/ac97_codec.c 	if (ac97->bus->ops->init)
ac97             2571 sound/pci/ac97/ac97_codec.c 		ac97->bus->ops->init(ac97);
ac97             2573 sound/pci/ac97/ac97_codec.c 	if (ac97->build_ops->resume)
ac97             2574 sound/pci/ac97/ac97_codec.c 		ac97->build_ops->resume(ac97);
ac97             2576 sound/pci/ac97/ac97_codec.c 		snd_ac97_restore_status(ac97);
ac97             2577 sound/pci/ac97/ac97_codec.c 		snd_ac97_restore_iec958(ac97);
ac97             2597 sound/pci/ac97/ac97_codec.c static int snd_ac97_remove_ctl(struct snd_ac97 *ac97, const char *name,
ac97             2604 sound/pci/ac97/ac97_codec.c 	return snd_ctl_remove_id(ac97->bus->card, &id);
ac97             2607 sound/pci/ac97/ac97_codec.c static struct snd_kcontrol *ctl_find(struct snd_ac97 *ac97, const char *name, const char *suffix)
ac97             2613 sound/pci/ac97/ac97_codec.c 	return snd_ctl_find_id(ac97->bus->card, &sid);
ac97             2617 sound/pci/ac97/ac97_codec.c static int snd_ac97_rename_ctl(struct snd_ac97 *ac97, const char *src,
ac97             2620 sound/pci/ac97/ac97_codec.c 	struct snd_kcontrol *kctl = ctl_find(ac97, src, suffix);
ac97             2629 sound/pci/ac97/ac97_codec.c static void snd_ac97_rename_vol_ctl(struct snd_ac97 *ac97, const char *src,
ac97             2632 sound/pci/ac97/ac97_codec.c 	snd_ac97_rename_ctl(ac97, src, dst, "Switch");
ac97             2633 sound/pci/ac97/ac97_codec.c 	snd_ac97_rename_ctl(ac97, src, dst, "Volume");
ac97             2637 sound/pci/ac97/ac97_codec.c static int snd_ac97_swap_ctl(struct snd_ac97 *ac97, const char *s1,
ac97             2641 sound/pci/ac97/ac97_codec.c 	kctl1 = ctl_find(ac97, s1, suffix);
ac97             2642 sound/pci/ac97/ac97_codec.c 	kctl2 = ctl_find(ac97, s2, suffix);
ac97             2666 sound/pci/ac97/ac97_codec.c static int tune_hp_only(struct snd_ac97 *ac97)
ac97             2668 sound/pci/ac97/ac97_codec.c 	struct snd_kcontrol *msw = ctl_find(ac97, "Master Playback Switch", NULL);
ac97             2669 sound/pci/ac97/ac97_codec.c 	struct snd_kcontrol *mvol = ctl_find(ac97, "Master Playback Volume", NULL);
ac97             2674 sound/pci/ac97/ac97_codec.c 	snd_ac97_remove_ctl(ac97, "Headphone Playback", "Switch");
ac97             2675 sound/pci/ac97/ac97_codec.c 	snd_ac97_remove_ctl(ac97, "Headphone Playback", "Volume");
ac97             2681 sound/pci/ac97/ac97_codec.c static int tune_hp_only(struct snd_ac97 *ac97)
ac97             2683 sound/pci/ac97/ac97_codec.c 	if (ctl_find(ac97, "Headphone Playback Switch", NULL) == NULL)
ac97             2685 sound/pci/ac97/ac97_codec.c 	snd_ac97_remove_ctl(ac97, "Master Playback", "Switch");
ac97             2686 sound/pci/ac97/ac97_codec.c 	snd_ac97_remove_ctl(ac97, "Master Playback", "Volume");
ac97             2687 sound/pci/ac97/ac97_codec.c 	snd_ac97_rename_vol_ctl(ac97, "Headphone Playback", "Master Playback");
ac97             2693 sound/pci/ac97/ac97_codec.c static int tune_swap_hp(struct snd_ac97 *ac97)
ac97             2695 sound/pci/ac97/ac97_codec.c 	if (ctl_find(ac97, "Headphone Playback Switch", NULL) == NULL)
ac97             2697 sound/pci/ac97/ac97_codec.c 	snd_ac97_rename_vol_ctl(ac97, "Master Playback", "Line-Out Playback");
ac97             2698 sound/pci/ac97/ac97_codec.c 	snd_ac97_rename_vol_ctl(ac97, "Headphone Playback", "Master Playback");
ac97             2703 sound/pci/ac97/ac97_codec.c static int tune_swap_surround(struct snd_ac97 *ac97)
ac97             2705 sound/pci/ac97/ac97_codec.c 	if (snd_ac97_swap_ctl(ac97, "Master Playback", "Surround Playback", "Switch") ||
ac97             2706 sound/pci/ac97/ac97_codec.c 	    snd_ac97_swap_ctl(ac97, "Master Playback", "Surround Playback", "Volume"))
ac97             2712 sound/pci/ac97/ac97_codec.c static int tune_ad_sharing(struct snd_ac97 *ac97)
ac97             2715 sound/pci/ac97/ac97_codec.c 	if ((ac97->id & 0xffffff00) != 0x41445300) {
ac97             2716 sound/pci/ac97/ac97_codec.c 		ac97_err(ac97, "ac97_quirk AD_SHARING is only for AD codecs\n");
ac97             2720 sound/pci/ac97/ac97_codec.c 	scfg = snd_ac97_read(ac97, AC97_AD_SERIAL_CFG);
ac97             2721 sound/pci/ac97/ac97_codec.c 	snd_ac97_write_cache(ac97, AC97_AD_SERIAL_CFG, scfg | 0x0200);
ac97             2729 sound/pci/ac97/ac97_codec.c static int tune_alc_jack(struct snd_ac97 *ac97)
ac97             2731 sound/pci/ac97/ac97_codec.c 	if ((ac97->id & 0xffffff00) != 0x414c4700) {
ac97             2732 sound/pci/ac97/ac97_codec.c 		ac97_err(ac97,
ac97             2736 sound/pci/ac97/ac97_codec.c 	snd_ac97_update_bits(ac97, 0x7a, 0x20, 0x20); /* select jack detect function */
ac97             2737 sound/pci/ac97/ac97_codec.c 	snd_ac97_update_bits(ac97, 0x7a, 0x01, 0x01); /* Line-out auto mute */
ac97             2738 sound/pci/ac97/ac97_codec.c 	if (ac97->id == AC97_ID_ALC658D)
ac97             2739 sound/pci/ac97/ac97_codec.c 		snd_ac97_update_bits(ac97, 0x74, 0x0800, 0x0800);
ac97             2740 sound/pci/ac97/ac97_codec.c 	return snd_ctl_add(ac97->bus->card, snd_ac97_cnew(&snd_ac97_alc_jack_detect, ac97));
ac97             2744 sound/pci/ac97/ac97_codec.c static int tune_inv_eapd(struct snd_ac97 *ac97)
ac97             2746 sound/pci/ac97/ac97_codec.c 	struct snd_kcontrol *kctl = ctl_find(ac97, "External Amplifier", NULL);
ac97             2749 sound/pci/ac97/ac97_codec.c 	set_inv_eapd(ac97, kctl);
ac97             2757 sound/pci/ac97/ac97_codec.c 		struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
ac97             2765 sound/pci/ac97/ac97_codec.c 		snd_ac97_update_bits(ac97, AC97_POWERDOWN, AC97_PD_EAPD,
ac97             2766 sound/pci/ac97/ac97_codec.c 				     (ac97->regs[AC97_MASTER] & mask) == mask ?
ac97             2773 sound/pci/ac97/ac97_codec.c static int tune_mute_led(struct snd_ac97 *ac97)
ac97             2775 sound/pci/ac97/ac97_codec.c 	struct snd_kcontrol *msw = ctl_find(ac97, "Master Playback Switch", NULL);
ac97             2779 sound/pci/ac97/ac97_codec.c 	snd_ac97_remove_ctl(ac97, "External Amplifier", NULL);
ac97             2781 sound/pci/ac97/ac97_codec.c 		ac97, AC97_POWERDOWN,
ac97             2784 sound/pci/ac97/ac97_codec.c 	ac97->scaps |= AC97_SCAP_EAPD_LED;
ac97             2793 sound/pci/ac97/ac97_codec.c 		struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
ac97             2801 sound/pci/ac97/ac97_codec.c 		snd_ac97_update_bits(ac97, AC97_POWERDOWN, AC97_PD_EAPD,
ac97             2802 sound/pci/ac97/ac97_codec.c 				     (ac97->regs[AC97_MASTER] & mask) == mask ?
ac97             2808 sound/pci/ac97/ac97_codec.c static int tune_hp_mute_led(struct snd_ac97 *ac97)
ac97             2810 sound/pci/ac97/ac97_codec.c 	struct snd_kcontrol *msw = ctl_find(ac97, "Master Playback Switch", NULL);
ac97             2811 sound/pci/ac97/ac97_codec.c 	struct snd_kcontrol *mvol = ctl_find(ac97, "Master Playback Volume", NULL);
ac97             2816 sound/pci/ac97/ac97_codec.c 	snd_ac97_remove_ctl(ac97, "External Amplifier", NULL);
ac97             2817 sound/pci/ac97/ac97_codec.c 	snd_ac97_remove_ctl(ac97, "Headphone Playback", "Switch");
ac97             2818 sound/pci/ac97/ac97_codec.c 	snd_ac97_remove_ctl(ac97, "Headphone Playback", "Volume");
ac97             2820 sound/pci/ac97/ac97_codec.c 		ac97, AC97_POWERDOWN,
ac97             2844 sound/pci/ac97/ac97_codec.c static int apply_quirk(struct snd_ac97 *ac97, int type)
ac97             2851 sound/pci/ac97/ac97_codec.c 		return applicable_quirks[type].func(ac97);
ac97             2856 sound/pci/ac97/ac97_codec.c static int apply_quirk_str(struct snd_ac97 *ac97, const char *typestr)
ac97             2864 sound/pci/ac97/ac97_codec.c 			return apply_quirk(ac97, i);
ac97             2868 sound/pci/ac97/ac97_codec.c 		return apply_quirk(ac97, (int)simple_strtoul(typestr, NULL, 10));
ac97             2885 sound/pci/ac97/ac97_codec.c int snd_ac97_tune_hardware(struct snd_ac97 *ac97,
ac97             2892 sound/pci/ac97/ac97_codec.c 		result = apply_quirk_str(ac97, override);
ac97             2894 sound/pci/ac97/ac97_codec.c 			ac97_err(ac97, "applying quirk type %s failed (%d)\n",
ac97             2903 sound/pci/ac97/ac97_codec.c 		if (quirk->subvendor != ac97->subsystem_vendor)
ac97             2905 sound/pci/ac97/ac97_codec.c 		if ((! quirk->mask && quirk->subdevice == ac97->subsystem_device) ||
ac97             2906 sound/pci/ac97/ac97_codec.c 		    quirk->subdevice == (quirk->mask & ac97->subsystem_device)) {
ac97             2907 sound/pci/ac97/ac97_codec.c 			if (quirk->codec_id && quirk->codec_id != ac97->id)
ac97             2909 sound/pci/ac97/ac97_codec.c 			ac97_dbg(ac97, "ac97 quirk for %s (%04x:%04x)\n",
ac97             2910 sound/pci/ac97/ac97_codec.c 				 quirk->name, ac97->subsystem_vendor,
ac97             2911 sound/pci/ac97/ac97_codec.c 				 ac97->subsystem_device);
ac97             2912 sound/pci/ac97/ac97_codec.c 			result = apply_quirk(ac97, quirk->type);
ac97             2914 sound/pci/ac97/ac97_codec.c 				ac97_err(ac97,
ac97               10 sound/pci/ac97/ac97_local.h void snd_ac97_get_name(struct snd_ac97 *ac97, unsigned int id, char *name,
ac97               12 sound/pci/ac97/ac97_local.h int snd_ac97_update_bits_nolock(struct snd_ac97 *ac97, unsigned short reg,
ac97               17 sound/pci/ac97/ac97_local.h void snd_ac97_bus_proc_init(struct snd_ac97_bus * ac97);
ac97               18 sound/pci/ac97/ac97_local.h void snd_ac97_bus_proc_done(struct snd_ac97_bus * ac97);
ac97               19 sound/pci/ac97/ac97_local.h void snd_ac97_proc_init(struct snd_ac97 * ac97);
ac97               20 sound/pci/ac97/ac97_local.h void snd_ac97_proc_done(struct snd_ac97 * ac97);
ac97               18 sound/pci/ac97/ac97_patch.c static struct snd_kcontrol *snd_ac97_find_mixer_ctl(struct snd_ac97 *ac97,
ac97               20 sound/pci/ac97/ac97_patch.c static int snd_ac97_add_vmaster(struct snd_ac97 *ac97, char *name,
ac97               28 sound/pci/ac97/ac97_patch.c static int patch_build_controls(struct snd_ac97 * ac97, const struct snd_kcontrol_new *controls, int count)
ac97               33 sound/pci/ac97/ac97_patch.c 		if ((err = snd_ctl_add(ac97->bus->card, snd_ac97_cnew(&controls[idx], ac97))) < 0)
ac97               39 sound/pci/ac97/ac97_patch.c static void reset_tlv(struct snd_ac97 *ac97, const char *name,
ac97               47 sound/pci/ac97/ac97_patch.c 	kctl = snd_ctl_find_id(ac97->bus->card, &sid);
ac97               53 sound/pci/ac97/ac97_patch.c static int ac97_update_bits_page(struct snd_ac97 *ac97, unsigned short reg, unsigned short mask, unsigned short value, unsigned short page)
ac97               58 sound/pci/ac97/ac97_patch.c 	mutex_lock(&ac97->page_mutex);
ac97               59 sound/pci/ac97/ac97_patch.c 	page_save = snd_ac97_read(ac97, AC97_INT_PAGING) & AC97_PAGE_MASK;
ac97               60 sound/pci/ac97/ac97_patch.c 	snd_ac97_update_bits(ac97, AC97_INT_PAGING, AC97_PAGE_MASK, page);
ac97               61 sound/pci/ac97/ac97_patch.c 	ret = snd_ac97_update_bits(ac97, reg, mask, value);
ac97               62 sound/pci/ac97/ac97_patch.c 	snd_ac97_update_bits(ac97, AC97_INT_PAGING, AC97_PAGE_MASK, page_save);
ac97               63 sound/pci/ac97/ac97_patch.c 	mutex_unlock(&ac97->page_mutex); /* unlock paging */
ac97               79 sound/pci/ac97/ac97_patch.c 	struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
ac97               81 sound/pci/ac97/ac97_patch.c 	ucontrol->value.enumerated.item[0] = ac97->indep_surround;
ac97               87 sound/pci/ac97/ac97_patch.c 	struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
ac97               90 sound/pci/ac97/ac97_patch.c 	if (indep != ac97->indep_surround) {
ac97               91 sound/pci/ac97/ac97_patch.c 		ac97->indep_surround = indep;
ac97               92 sound/pci/ac97/ac97_patch.c 		if (ac97->build_ops->update_jacks)
ac97               93 sound/pci/ac97/ac97_patch.c 			ac97->build_ops->update_jacks(ac97);
ac97              108 sound/pci/ac97/ac97_patch.c 	struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
ac97              110 sound/pci/ac97/ac97_patch.c 	ucontrol->value.enumerated.item[0] = ac97->channel_mode;
ac97              116 sound/pci/ac97/ac97_patch.c 	struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
ac97              122 sound/pci/ac97/ac97_patch.c 	if (mode != ac97->channel_mode) {
ac97              123 sound/pci/ac97/ac97_patch.c 		ac97->channel_mode = mode;
ac97              124 sound/pci/ac97/ac97_patch.c 		if (ac97->build_ops->update_jacks)
ac97              125 sound/pci/ac97/ac97_patch.c 			ac97->build_ops->update_jacks(ac97);
ac97              170 sound/pci/ac97/ac97_patch.c static inline int is_surround_on(struct snd_ac97 *ac97)
ac97              172 sound/pci/ac97/ac97_patch.c 	return ac97->channel_mode >= 1;
ac97              175 sound/pci/ac97/ac97_patch.c static inline int is_clfe_on(struct snd_ac97 *ac97)
ac97              177 sound/pci/ac97/ac97_patch.c 	return ac97->channel_mode >= 2;
ac97              181 sound/pci/ac97/ac97_patch.c static inline int is_shared_surrout(struct snd_ac97 *ac97)
ac97              183 sound/pci/ac97/ac97_patch.c 	return !ac97->indep_surround && is_surround_on(ac97);
ac97              187 sound/pci/ac97/ac97_patch.c static inline int is_shared_clfeout(struct snd_ac97 *ac97)
ac97              189 sound/pci/ac97/ac97_patch.c 	return !ac97->indep_surround && is_clfe_on(ac97);
ac97              193 sound/pci/ac97/ac97_patch.c static inline int is_shared_linein(struct snd_ac97 *ac97)
ac97              195 sound/pci/ac97/ac97_patch.c 	return !ac97->indep_surround && !is_surround_on(ac97);
ac97              199 sound/pci/ac97/ac97_patch.c static inline int is_shared_micin(struct snd_ac97 *ac97)
ac97              201 sound/pci/ac97/ac97_patch.c 	return !ac97->indep_surround && !is_clfe_on(ac97);
ac97              204 sound/pci/ac97/ac97_patch.c static inline int alc850_is_aux_back_surround(struct snd_ac97 *ac97)
ac97              206 sound/pci/ac97/ac97_patch.c 	return is_surround_on(ac97);
ac97              228 sound/pci/ac97/ac97_patch.c 	struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
ac97              231 sound/pci/ac97/ac97_patch.c 	val = ac97->regs[AC97_YMF7X3_3D_MODE_SEL];
ac97              242 sound/pci/ac97/ac97_patch.c 	struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
ac97              248 sound/pci/ac97/ac97_patch.c 	return snd_ac97_update(ac97, AC97_YMF7X3_3D_MODE_SEL, val);
ac97              273 sound/pci/ac97/ac97_patch.c 	struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
ac97              276 sound/pci/ac97/ac97_patch.c 	val = ac97->regs[AC97_YMF7X3_DIT_CTRL];
ac97              284 sound/pci/ac97/ac97_patch.c 	struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
ac97              290 sound/pci/ac97/ac97_patch.c 	return snd_ac97_update_bits(ac97, AC97_YMF7X3_DIT_CTRL, 0x0002, val);
ac97              293 sound/pci/ac97/ac97_patch.c static int patch_yamaha_ymf7x3_3d(struct snd_ac97 *ac97)
ac97              298 sound/pci/ac97/ac97_patch.c 	kctl = snd_ac97_cnew(&snd_ac97_controls_3d[0], ac97);
ac97              299 sound/pci/ac97/ac97_patch.c 	err = snd_ctl_add(ac97->bus->card, kctl);
ac97              304 sound/pci/ac97/ac97_patch.c 	snd_ac97_write_cache(ac97, AC97_3D_CONTROL, 0x0000);
ac97              305 sound/pci/ac97/ac97_patch.c 	err = snd_ctl_add(ac97->bus->card,
ac97              307 sound/pci/ac97/ac97_patch.c 					ac97));
ac97              310 sound/pci/ac97/ac97_patch.c 	snd_ac97_write_cache(ac97, AC97_YMF7X3_3D_MODE_SEL, 0x0c00);
ac97              329 sound/pci/ac97/ac97_patch.c static int patch_yamaha_ymf743_build_spdif(struct snd_ac97 *ac97)
ac97              333 sound/pci/ac97/ac97_patch.c 	err = patch_build_controls(ac97, &snd_ac97_controls_spdif[0], 3);
ac97              336 sound/pci/ac97/ac97_patch.c 	err = patch_build_controls(ac97,
ac97              342 sound/pci/ac97/ac97_patch.c 	snd_ac97_write_cache(ac97, AC97_YMF7X3_DIT_CTRL, 0xa201);
ac97              351 sound/pci/ac97/ac97_patch.c static int patch_yamaha_ymf743(struct snd_ac97 *ac97)
ac97              353 sound/pci/ac97/ac97_patch.c 	ac97->build_ops = &patch_yamaha_ymf743_ops;
ac97              354 sound/pci/ac97/ac97_patch.c 	ac97->caps |= AC97_BC_BASS_TREBLE;
ac97              355 sound/pci/ac97/ac97_patch.c 	ac97->caps |= 0x04 << 10; /* Yamaha 3D enhancement */
ac97              356 sound/pci/ac97/ac97_patch.c 	ac97->rates[AC97_RATES_SPDIF] = SNDRV_PCM_RATE_48000; /* 48k only */
ac97              357 sound/pci/ac97/ac97_patch.c 	ac97->ext_id |= AC97_EI_SPDIF; /* force the detection of spdif */
ac97              374 sound/pci/ac97/ac97_patch.c 	struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
ac97              377 sound/pci/ac97/ac97_patch.c 	val = ac97->regs[AC97_YMF7X3_DIT_CTRL];
ac97              384 sound/pci/ac97/ac97_patch.c 	struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
ac97              391 sound/pci/ac97/ac97_patch.c 	return snd_ac97_update_bits(ac97, AC97_YMF7X3_DIT_CTRL, 0x0028, val);
ac97              415 sound/pci/ac97/ac97_patch.c static int patch_yamaha_ymf753_post_spdif(struct snd_ac97 * ac97)
ac97              419 sound/pci/ac97/ac97_patch.c 	if ((err = patch_build_controls(ac97, snd_ac97_ymf753_controls_spdif, ARRAY_SIZE(snd_ac97_ymf753_controls_spdif))) < 0)
ac97              429 sound/pci/ac97/ac97_patch.c static int patch_yamaha_ymf753(struct snd_ac97 * ac97)
ac97              438 sound/pci/ac97/ac97_patch.c 	ac97->build_ops = &patch_yamaha_ymf753_ops;
ac97              439 sound/pci/ac97/ac97_patch.c 	ac97->caps |= AC97_BC_BASS_TREBLE;
ac97              440 sound/pci/ac97/ac97_patch.c 	ac97->caps |= 0x04 << 10; /* Yamaha 3D enhancement */
ac97              455 sound/pci/ac97/ac97_patch.c static int patch_wolfson_wm9703_specific(struct snd_ac97 * ac97)
ac97              464 sound/pci/ac97/ac97_patch.c 		if ((err = snd_ctl_add(ac97->bus->card, snd_ac97_cnew(&wm97xx_snd_ac97_controls[i], ac97))) < 0)
ac97              467 sound/pci/ac97/ac97_patch.c 	snd_ac97_write_cache(ac97,  AC97_WM97XX_FMIXER_VOL, 0x0808);
ac97              475 sound/pci/ac97/ac97_patch.c static int patch_wolfson03(struct snd_ac97 * ac97)
ac97              477 sound/pci/ac97/ac97_patch.c 	ac97->build_ops = &patch_wolfson_wm9703_ops;
ac97              490 sound/pci/ac97/ac97_patch.c static int patch_wolfson_wm9704_specific(struct snd_ac97 * ac97)
ac97              494 sound/pci/ac97/ac97_patch.c 		if ((err = snd_ctl_add(ac97->bus->card, snd_ac97_cnew(&wm9704_snd_ac97_controls[i], ac97))) < 0)
ac97              498 sound/pci/ac97/ac97_patch.c 	snd_ac97_write_cache(ac97, AC97_WM9704_TEST, 0x0200);
ac97              506 sound/pci/ac97/ac97_patch.c static int patch_wolfson04(struct snd_ac97 * ac97)
ac97              509 sound/pci/ac97/ac97_patch.c 	ac97->build_ops = &patch_wolfson_wm9704_ops;
ac97              513 sound/pci/ac97/ac97_patch.c static int patch_wolfson05(struct snd_ac97 * ac97)
ac97              516 sound/pci/ac97/ac97_patch.c 	ac97->build_ops = &patch_wolfson_wm9703_ops;
ac97              519 sound/pci/ac97/ac97_patch.c 	ac97->flags |= AC97_HAS_NO_VIDEO | AC97_HAS_NO_AUX;
ac97              629 sound/pci/ac97/ac97_patch.c static int patch_wolfson_wm9711_specific(struct snd_ac97 * ac97)
ac97              634 sound/pci/ac97/ac97_patch.c 		if ((err = snd_ctl_add(ac97->bus->card, snd_ac97_cnew(&wm9711_snd_ac97_controls[i], ac97))) < 0)
ac97              637 sound/pci/ac97/ac97_patch.c 	snd_ac97_write_cache(ac97,  AC97_CODEC_CLASS_REV, 0x0808);
ac97              638 sound/pci/ac97/ac97_patch.c 	snd_ac97_write_cache(ac97,  AC97_PCI_SVID, 0x0808);
ac97              639 sound/pci/ac97/ac97_patch.c 	snd_ac97_write_cache(ac97,  AC97_VIDEO, 0x0808);
ac97              640 sound/pci/ac97/ac97_patch.c 	snd_ac97_write_cache(ac97,  AC97_AUX, 0x0808);
ac97              641 sound/pci/ac97/ac97_patch.c 	snd_ac97_write_cache(ac97,  AC97_PC_BEEP, 0x0808);
ac97              642 sound/pci/ac97/ac97_patch.c 	snd_ac97_write_cache(ac97,  AC97_CD, 0x0000);
ac97              650 sound/pci/ac97/ac97_patch.c static int patch_wolfson11(struct snd_ac97 * ac97)
ac97              653 sound/pci/ac97/ac97_patch.c 	ac97->build_ops = &patch_wolfson_wm9711_ops;
ac97              655 sound/pci/ac97/ac97_patch.c 	ac97->flags |= AC97_HAS_NO_REC_GAIN | AC97_STEREO_MUTES | AC97_HAS_NO_MIC |
ac97              796 sound/pci/ac97/ac97_patch.c static int patch_wolfson_wm9713_3d (struct snd_ac97 * ac97)
ac97              801 sound/pci/ac97/ac97_patch.c 		if ((err = snd_ctl_add(ac97->bus->card, snd_ac97_cnew(&wm13_snd_ac97_controls_3d[i], ac97))) < 0)
ac97              807 sound/pci/ac97/ac97_patch.c static int patch_wolfson_wm9713_specific(struct snd_ac97 * ac97)
ac97              812 sound/pci/ac97/ac97_patch.c 		if ((err = snd_ctl_add(ac97->bus->card, snd_ac97_cnew(&wm13_snd_ac97_controls[i], ac97))) < 0)
ac97              815 sound/pci/ac97/ac97_patch.c 	snd_ac97_write_cache(ac97, AC97_PC_BEEP, 0x0808);
ac97              816 sound/pci/ac97/ac97_patch.c 	snd_ac97_write_cache(ac97, AC97_PHONE, 0x0808);
ac97              817 sound/pci/ac97/ac97_patch.c 	snd_ac97_write_cache(ac97, AC97_MIC, 0x0808);
ac97              818 sound/pci/ac97/ac97_patch.c 	snd_ac97_write_cache(ac97, AC97_LINE, 0x00da);
ac97              819 sound/pci/ac97/ac97_patch.c 	snd_ac97_write_cache(ac97, AC97_CD, 0x0808);
ac97              820 sound/pci/ac97/ac97_patch.c 	snd_ac97_write_cache(ac97, AC97_VIDEO, 0xd612);
ac97              821 sound/pci/ac97/ac97_patch.c 	snd_ac97_write_cache(ac97, AC97_REC_GAIN, 0x1ba0);
ac97              826 sound/pci/ac97/ac97_patch.c static void patch_wolfson_wm9713_suspend (struct snd_ac97 * ac97)
ac97              828 sound/pci/ac97/ac97_patch.c 	snd_ac97_write_cache(ac97, AC97_EXTENDED_MID, 0xfeff);
ac97              829 sound/pci/ac97/ac97_patch.c 	snd_ac97_write_cache(ac97, AC97_EXTENDED_MSTATUS, 0xffff);
ac97              832 sound/pci/ac97/ac97_patch.c static void patch_wolfson_wm9713_resume (struct snd_ac97 * ac97)
ac97              834 sound/pci/ac97/ac97_patch.c 	snd_ac97_write_cache(ac97, AC97_EXTENDED_MID, 0xda00);
ac97              835 sound/pci/ac97/ac97_patch.c 	snd_ac97_write_cache(ac97, AC97_EXTENDED_MSTATUS, 0x3810);
ac97              836 sound/pci/ac97/ac97_patch.c 	snd_ac97_write_cache(ac97, AC97_POWERDOWN, 0x0);
ac97              849 sound/pci/ac97/ac97_patch.c static int patch_wolfson13(struct snd_ac97 * ac97)
ac97              852 sound/pci/ac97/ac97_patch.c 	ac97->build_ops = &patch_wolfson_wm9713_ops;
ac97              854 sound/pci/ac97/ac97_patch.c 	ac97->flags |= AC97_HAS_NO_REC_GAIN | AC97_STEREO_MUTES | AC97_HAS_NO_PHONE |
ac97              857 sound/pci/ac97/ac97_patch.c     	ac97->scaps &= ~AC97_SCAP_MODEM;
ac97              859 sound/pci/ac97/ac97_patch.c 	snd_ac97_write_cache(ac97, AC97_EXTENDED_MID, 0xda00);
ac97              860 sound/pci/ac97/ac97_patch.c 	snd_ac97_write_cache(ac97, AC97_EXTENDED_MSTATUS, 0x3810);
ac97              861 sound/pci/ac97/ac97_patch.c 	snd_ac97_write_cache(ac97, AC97_POWERDOWN, 0x0);
ac97              869 sound/pci/ac97/ac97_patch.c static int patch_tritech_tr28028(struct snd_ac97 * ac97)
ac97              871 sound/pci/ac97/ac97_patch.c 	snd_ac97_write_cache(ac97, 0x26, 0x0300);
ac97              872 sound/pci/ac97/ac97_patch.c 	snd_ac97_write_cache(ac97, 0x26, 0x0000);
ac97              873 sound/pci/ac97/ac97_patch.c 	snd_ac97_write_cache(ac97, AC97_SURROUND_MASTER, 0x0000);
ac97              874 sound/pci/ac97/ac97_patch.c 	snd_ac97_write_cache(ac97, AC97_SPDIF, 0x0000);
ac97              881 sound/pci/ac97/ac97_patch.c static int patch_sigmatel_stac9700_3d(struct snd_ac97 * ac97)
ac97              886 sound/pci/ac97/ac97_patch.c 	if ((err = snd_ctl_add(ac97->bus->card, kctl = snd_ac97_cnew(&snd_ac97_controls_3d[0], ac97))) < 0)
ac97              890 sound/pci/ac97/ac97_patch.c 	snd_ac97_write_cache(ac97, AC97_3D_CONTROL, 0x0000);
ac97              894 sound/pci/ac97/ac97_patch.c static int patch_sigmatel_stac9708_3d(struct snd_ac97 * ac97)
ac97              899 sound/pci/ac97/ac97_patch.c 	if ((err = snd_ctl_add(ac97->bus->card, kctl = snd_ac97_cnew(&snd_ac97_controls_3d[0], ac97))) < 0)
ac97              903 sound/pci/ac97/ac97_patch.c 	if ((err = snd_ctl_add(ac97->bus->card, kctl = snd_ac97_cnew(&snd_ac97_controls_3d[0], ac97))) < 0)
ac97              907 sound/pci/ac97/ac97_patch.c 	snd_ac97_write_cache(ac97, AC97_3D_CONTROL, 0x0000);
ac97              925 sound/pci/ac97/ac97_patch.c static int patch_sigmatel_stac97xx_specific(struct snd_ac97 * ac97)
ac97              929 sound/pci/ac97/ac97_patch.c 	snd_ac97_write_cache(ac97, AC97_SIGMATEL_ANALOG, snd_ac97_read(ac97, AC97_SIGMATEL_ANALOG) & ~0x0003);
ac97              930 sound/pci/ac97/ac97_patch.c 	if (snd_ac97_try_bit(ac97, AC97_SIGMATEL_ANALOG, 1))
ac97              931 sound/pci/ac97/ac97_patch.c 		if ((err = patch_build_controls(ac97, &snd_ac97_sigmatel_controls[0], 1)) < 0)
ac97              933 sound/pci/ac97/ac97_patch.c 	if (snd_ac97_try_bit(ac97, AC97_SIGMATEL_ANALOG, 0))
ac97              934 sound/pci/ac97/ac97_patch.c 		if ((err = patch_build_controls(ac97, &snd_ac97_sigmatel_controls[1], 1)) < 0)
ac97              936 sound/pci/ac97/ac97_patch.c 	if (snd_ac97_try_bit(ac97, AC97_SIGMATEL_DAC2INVERT, 2))
ac97              937 sound/pci/ac97/ac97_patch.c 		if ((err = patch_build_controls(ac97, &snd_ac97_sigmatel_4speaker, 1)) < 0)
ac97              939 sound/pci/ac97/ac97_patch.c 	if (snd_ac97_try_bit(ac97, AC97_SIGMATEL_DAC2INVERT, 3))
ac97              940 sound/pci/ac97/ac97_patch.c 		if ((err = patch_build_controls(ac97, &snd_ac97_sigmatel_phaseinvert, 1)) < 0)
ac97              950 sound/pci/ac97/ac97_patch.c static int patch_sigmatel_stac9700(struct snd_ac97 * ac97)
ac97              952 sound/pci/ac97/ac97_patch.c 	ac97->build_ops = &patch_sigmatel_stac9700_ops;
ac97              958 sound/pci/ac97/ac97_patch.c 	struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
ac97              961 sound/pci/ac97/ac97_patch.c 	mutex_lock(&ac97->page_mutex);
ac97              962 sound/pci/ac97/ac97_patch.c 	snd_ac97_write(ac97, AC97_SIGMATEL_BIAS1, 0xabba);
ac97              963 sound/pci/ac97/ac97_patch.c 	err = snd_ac97_update_bits(ac97, AC97_SIGMATEL_BIAS2, 0x0010,
ac97              965 sound/pci/ac97/ac97_patch.c 	snd_ac97_write(ac97, AC97_SIGMATEL_BIAS1, 0);
ac97              966 sound/pci/ac97/ac97_patch.c 	mutex_unlock(&ac97->page_mutex);
ac97              979 sound/pci/ac97/ac97_patch.c static int patch_sigmatel_stac9708_specific(struct snd_ac97 *ac97)
ac97              984 sound/pci/ac97/ac97_patch.c 	snd_ac97_remove_ctl(ac97, "PCM Out Path & Mute", NULL);
ac97              986 sound/pci/ac97/ac97_patch.c 	snd_ac97_rename_vol_ctl(ac97, "Headphone Playback", "Sigmatel Surround Playback");
ac97              987 sound/pci/ac97/ac97_patch.c 	if ((err = patch_build_controls(ac97, &snd_ac97_stac9708_bias_control, 1)) < 0)
ac97              989 sound/pci/ac97/ac97_patch.c 	return patch_sigmatel_stac97xx_specific(ac97);
ac97              997 sound/pci/ac97/ac97_patch.c static int patch_sigmatel_stac9708(struct snd_ac97 * ac97)
ac97             1001 sound/pci/ac97/ac97_patch.c 	ac97->build_ops = &patch_sigmatel_stac9708_ops;
ac97             1002 sound/pci/ac97/ac97_patch.c 	ac97->caps |= 0x10;	/* HP (sigmatel surround) support */
ac97             1004 sound/pci/ac97/ac97_patch.c 	codec72 = snd_ac97_read(ac97, AC97_SIGMATEL_BIAS2) & 0x8000;
ac97             1005 sound/pci/ac97/ac97_patch.c 	codec6c = snd_ac97_read(ac97, AC97_SIGMATEL_ANALOG);
ac97             1008 sound/pci/ac97/ac97_patch.c 		snd_ac97_write_cache(ac97, AC97_SIGMATEL_CIC1, 0xabba);
ac97             1009 sound/pci/ac97/ac97_patch.c 		snd_ac97_write_cache(ac97, AC97_SIGMATEL_CIC2, 0x1000);
ac97             1010 sound/pci/ac97/ac97_patch.c 		snd_ac97_write_cache(ac97, AC97_SIGMATEL_BIAS1, 0xabba);
ac97             1011 sound/pci/ac97/ac97_patch.c 		snd_ac97_write_cache(ac97, AC97_SIGMATEL_BIAS2, 0x0007);
ac97             1013 sound/pci/ac97/ac97_patch.c 		snd_ac97_write_cache(ac97, AC97_SIGMATEL_CIC1, 0xabba);
ac97             1014 sound/pci/ac97/ac97_patch.c 		snd_ac97_write_cache(ac97, AC97_SIGMATEL_CIC2, 0x1001);
ac97             1015 sound/pci/ac97/ac97_patch.c 		snd_ac97_write_cache(ac97, AC97_SIGMATEL_DAC2INVERT, 0x0008);
ac97             1019 sound/pci/ac97/ac97_patch.c 	snd_ac97_write_cache(ac97, AC97_SIGMATEL_MULTICHN, 0x0000);
ac97             1023 sound/pci/ac97/ac97_patch.c static int patch_sigmatel_stac9721(struct snd_ac97 * ac97)
ac97             1025 sound/pci/ac97/ac97_patch.c 	ac97->build_ops = &patch_sigmatel_stac9700_ops;
ac97             1026 sound/pci/ac97/ac97_patch.c 	if (snd_ac97_read(ac97, AC97_SIGMATEL_ANALOG) == 0) {
ac97             1028 sound/pci/ac97/ac97_patch.c 		snd_ac97_write_cache(ac97, AC97_SIGMATEL_CIC1, 0xabba);
ac97             1029 sound/pci/ac97/ac97_patch.c 		snd_ac97_write_cache(ac97, AC97_SIGMATEL_CIC2, 0x4000);
ac97             1030 sound/pci/ac97/ac97_patch.c 		snd_ac97_write_cache(ac97, AC97_SIGMATEL_BIAS1, 0xabba);
ac97             1031 sound/pci/ac97/ac97_patch.c 		snd_ac97_write_cache(ac97, AC97_SIGMATEL_BIAS2, 0x0002);
ac97             1033 sound/pci/ac97/ac97_patch.c 	snd_ac97_write_cache(ac97, AC97_SIGMATEL_MULTICHN, 0x0000);
ac97             1037 sound/pci/ac97/ac97_patch.c static int patch_sigmatel_stac9744(struct snd_ac97 * ac97)
ac97             1040 sound/pci/ac97/ac97_patch.c 	ac97->build_ops = &patch_sigmatel_stac9700_ops;
ac97             1041 sound/pci/ac97/ac97_patch.c 	snd_ac97_write_cache(ac97, AC97_SIGMATEL_CIC1, 0xabba);
ac97             1042 sound/pci/ac97/ac97_patch.c 	snd_ac97_write_cache(ac97, AC97_SIGMATEL_CIC2, 0x0000);	/* is this correct? --jk */
ac97             1043 sound/pci/ac97/ac97_patch.c 	snd_ac97_write_cache(ac97, AC97_SIGMATEL_BIAS1, 0xabba);
ac97             1044 sound/pci/ac97/ac97_patch.c 	snd_ac97_write_cache(ac97, AC97_SIGMATEL_BIAS2, 0x0002);
ac97             1045 sound/pci/ac97/ac97_patch.c 	snd_ac97_write_cache(ac97, AC97_SIGMATEL_MULTICHN, 0x0000);
ac97             1049 sound/pci/ac97/ac97_patch.c static int patch_sigmatel_stac9756(struct snd_ac97 * ac97)
ac97             1052 sound/pci/ac97/ac97_patch.c 	ac97->build_ops = &patch_sigmatel_stac9700_ops;
ac97             1053 sound/pci/ac97/ac97_patch.c 	snd_ac97_write_cache(ac97, AC97_SIGMATEL_CIC1, 0xabba);
ac97             1054 sound/pci/ac97/ac97_patch.c 	snd_ac97_write_cache(ac97, AC97_SIGMATEL_CIC2, 0x0000);	/* is this correct? --jk */
ac97             1055 sound/pci/ac97/ac97_patch.c 	snd_ac97_write_cache(ac97, AC97_SIGMATEL_BIAS1, 0xabba);
ac97             1056 sound/pci/ac97/ac97_patch.c 	snd_ac97_write_cache(ac97, AC97_SIGMATEL_BIAS2, 0x0002);
ac97             1057 sound/pci/ac97/ac97_patch.c 	snd_ac97_write_cache(ac97, AC97_SIGMATEL_MULTICHN, 0x0000);
ac97             1072 sound/pci/ac97/ac97_patch.c 	struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
ac97             1076 sound/pci/ac97/ac97_patch.c 	val = ac97->regs[AC97_SIGMATEL_OUTSEL] >> shift;
ac97             1086 sound/pci/ac97/ac97_patch.c 	struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
ac97             1096 sound/pci/ac97/ac97_patch.c 	return ac97_update_bits_page(ac97, AC97_SIGMATEL_OUTSEL,
ac97             1111 sound/pci/ac97/ac97_patch.c 	struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
ac97             1115 sound/pci/ac97/ac97_patch.c 	val = ac97->regs[AC97_SIGMATEL_INSEL];
ac97             1122 sound/pci/ac97/ac97_patch.c 	struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
ac97             1125 sound/pci/ac97/ac97_patch.c 	return ac97_update_bits_page(ac97, AC97_SIGMATEL_INSEL, 7 << shift,
ac97             1140 sound/pci/ac97/ac97_patch.c 	struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
ac97             1142 sound/pci/ac97/ac97_patch.c 	ucontrol->value.enumerated.item[0] = ac97->regs[AC97_SIGMATEL_IOMISC] & 3;
ac97             1148 sound/pci/ac97/ac97_patch.c 	struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
ac97             1150 sound/pci/ac97/ac97_patch.c 	return ac97_update_bits_page(ac97, AC97_SIGMATEL_IOMISC, 3,
ac97             1185 sound/pci/ac97/ac97_patch.c static int patch_sigmatel_stac9758_specific(struct snd_ac97 *ac97)
ac97             1189 sound/pci/ac97/ac97_patch.c 	err = patch_sigmatel_stac97xx_specific(ac97);
ac97             1192 sound/pci/ac97/ac97_patch.c 	err = patch_build_controls(ac97, snd_ac97_sigmatel_stac9758_controls,
ac97             1197 sound/pci/ac97/ac97_patch.c 	snd_ac97_rename_vol_ctl(ac97, "Headphone Playback", "Front Playback");
ac97             1201 sound/pci/ac97/ac97_patch.c 	snd_ac97_rename_vol_ctl(ac97, "Video Playback", "Surround Mix Playback");
ac97             1212 sound/pci/ac97/ac97_patch.c static int patch_sigmatel_stac9758(struct snd_ac97 * ac97)
ac97             1236 sound/pci/ac97/ac97_patch.c 	if (ac97->pci && 
ac97             1237 sound/pci/ac97/ac97_patch.c 	    ac97->subsystem_vendor == 0x107b &&
ac97             1238 sound/pci/ac97/ac97_patch.c 	    ac97->subsystem_device == 0x0601)
ac97             1242 sound/pci/ac97/ac97_patch.c 	ac97->build_ops = &patch_sigmatel_stac9758_ops;
ac97             1244 sound/pci/ac97/ac97_patch.c 	snd_ac97_update_bits(ac97, AC97_INT_PAGING, AC97_PAGE_MASK, AC97_PAGE_VENDOR);
ac97             1246 sound/pci/ac97/ac97_patch.c 		snd_ac97_write_cache(ac97, regs[i], pregs[i]);
ac97             1248 sound/pci/ac97/ac97_patch.c 	ac97->flags |= AC97_STEREO_MUTES;
ac97             1260 sound/pci/ac97/ac97_patch.c static int patch_cirrus_build_spdif(struct snd_ac97 * ac97)
ac97             1265 sound/pci/ac97/ac97_patch.c 	if ((err = patch_build_controls(ac97, &snd_ac97_controls_spdif[0], 3)) < 0)
ac97             1268 sound/pci/ac97/ac97_patch.c 	if ((err = patch_build_controls(ac97, &snd_ac97_cirrus_controls_spdif[0], 1)) < 0)
ac97             1270 sound/pci/ac97/ac97_patch.c 	switch (ac97->id & AC97_ID_CS_MASK) {
ac97             1272 sound/pci/ac97/ac97_patch.c 		if ((err = patch_build_controls(ac97, &snd_ac97_cirrus_controls_spdif[1], 1)) < 0)
ac97             1278 sound/pci/ac97/ac97_patch.c 	snd_ac97_write_cache(ac97, AC97_CSR_SPDIF, 0x0a20);
ac97             1286 sound/pci/ac97/ac97_patch.c static int patch_cirrus_spdif(struct snd_ac97 * ac97)
ac97             1299 sound/pci/ac97/ac97_patch.c 	ac97->build_ops = &patch_cirrus_ops;
ac97             1300 sound/pci/ac97/ac97_patch.c 	ac97->flags |= AC97_CS_SPDIF; 
ac97             1301 sound/pci/ac97/ac97_patch.c 	ac97->rates[AC97_RATES_SPDIF] &= ~SNDRV_PCM_RATE_32000;
ac97             1302 sound/pci/ac97/ac97_patch.c         ac97->ext_id |= AC97_EI_SPDIF;	/* force the detection of spdif */
ac97             1303 sound/pci/ac97/ac97_patch.c 	snd_ac97_write_cache(ac97, AC97_CSR_ACMODE, 0x0080);
ac97             1307 sound/pci/ac97/ac97_patch.c static int patch_cirrus_cs4299(struct snd_ac97 * ac97)
ac97             1310 sound/pci/ac97/ac97_patch.c 	ac97->flags |= AC97_HAS_PC_BEEP;
ac97             1312 sound/pci/ac97/ac97_patch.c 	return patch_cirrus_spdif(ac97);
ac97             1322 sound/pci/ac97/ac97_patch.c static int patch_conexant_build_spdif(struct snd_ac97 * ac97)
ac97             1327 sound/pci/ac97/ac97_patch.c 	if ((err = patch_build_controls(ac97, &snd_ac97_controls_spdif[0], 3)) < 0)
ac97             1330 sound/pci/ac97/ac97_patch.c 	if ((err = patch_build_controls(ac97, &snd_ac97_conexant_controls_spdif[0], 1)) < 0)
ac97             1334 sound/pci/ac97/ac97_patch.c 	snd_ac97_write_cache(ac97, AC97_CXR_AUDIO_MISC,
ac97             1335 sound/pci/ac97/ac97_patch.c 			     snd_ac97_read(ac97, AC97_CXR_AUDIO_MISC) & ~(AC97_CXR_SPDIFEN|AC97_CXR_COPYRGT|AC97_CXR_SPDIF_MASK));
ac97             1343 sound/pci/ac97/ac97_patch.c static int patch_conexant(struct snd_ac97 * ac97)
ac97             1345 sound/pci/ac97/ac97_patch.c 	ac97->build_ops = &patch_conexant_ops;
ac97             1346 sound/pci/ac97/ac97_patch.c 	ac97->flags |= AC97_CX_SPDIF;
ac97             1347 sound/pci/ac97/ac97_patch.c         ac97->ext_id |= AC97_EI_SPDIF;	/* force the detection of spdif */
ac97             1348 sound/pci/ac97/ac97_patch.c 	ac97->rates[AC97_RATES_SPDIF] = SNDRV_PCM_RATE_48000; /* 48k only */
ac97             1352 sound/pci/ac97/ac97_patch.c static int patch_cx20551(struct snd_ac97 *ac97)
ac97             1354 sound/pci/ac97/ac97_patch.c 	snd_ac97_update_bits(ac97, 0x5c, 0x01, 0x01);
ac97             1362 sound/pci/ac97/ac97_patch.c static void ad18xx_resume(struct snd_ac97 *ac97)
ac97             1371 sound/pci/ac97/ac97_patch.c 		if (test_bit(reg, ac97->reg_accessed)) {
ac97             1372 sound/pci/ac97/ac97_patch.c 			snd_ac97_write(ac97, reg, ac97->regs[reg]);
ac97             1373 sound/pci/ac97/ac97_patch.c 			snd_ac97_read(ac97, reg);
ac97             1377 sound/pci/ac97/ac97_patch.c 	if (! (ac97->flags & AC97_AD_MULTI))
ac97             1379 sound/pci/ac97/ac97_patch.c 		snd_ac97_restore_status(ac97);
ac97             1383 sound/pci/ac97/ac97_patch.c 			if (! ac97->spec.ad18xx.id[codec])
ac97             1386 sound/pci/ac97/ac97_patch.c 			snd_ac97_update_bits(ac97, AC97_AD_SERIAL_CFG, 0x7000,
ac97             1387 sound/pci/ac97/ac97_patch.c 					     ac97->spec.ad18xx.unchained[codec] | ac97->spec.ad18xx.chained[codec]);
ac97             1388 sound/pci/ac97/ac97_patch.c 			ac97->bus->ops->write(ac97, AC97_AD_CODEC_CFG, ac97->spec.ad18xx.codec_cfg[codec]);
ac97             1391 sound/pci/ac97/ac97_patch.c 		snd_ac97_update_bits(ac97, AC97_AD_SERIAL_CFG, 0x7000, 0x7000);
ac97             1397 sound/pci/ac97/ac97_patch.c 			if (test_bit(i, ac97->reg_accessed)) {
ac97             1401 sound/pci/ac97/ac97_patch.c 						if (! ac97->spec.ad18xx.id[codec])
ac97             1404 sound/pci/ac97/ac97_patch.c 						snd_ac97_update_bits(ac97, AC97_AD_SERIAL_CFG, 0x7000,
ac97             1405 sound/pci/ac97/ac97_patch.c 								     ac97->spec.ad18xx.unchained[codec] | ac97->spec.ad18xx.chained[codec]);
ac97             1407 sound/pci/ac97/ac97_patch.c 						ac97->bus->ops->write(ac97, AC97_PCM, ac97->spec.ad18xx.pcmreg[codec]);
ac97             1410 sound/pci/ac97/ac97_patch.c 					snd_ac97_update_bits(ac97, AC97_AD_SERIAL_CFG, 0x7000, 0x7000);
ac97             1417 sound/pci/ac97/ac97_patch.c 			snd_ac97_write(ac97, i, ac97->regs[i]);
ac97             1418 sound/pci/ac97/ac97_patch.c 			snd_ac97_read(ac97, i);
ac97             1422 sound/pci/ac97/ac97_patch.c 	snd_ac97_restore_iec958(ac97);
ac97             1425 sound/pci/ac97/ac97_patch.c static void ad1888_resume(struct snd_ac97 *ac97)
ac97             1427 sound/pci/ac97/ac97_patch.c 	ad18xx_resume(ac97);
ac97             1428 sound/pci/ac97/ac97_patch.c 	snd_ac97_write_cache(ac97, AC97_CODEC_CLASS_REV, 0x8080);
ac97             1444 sound/pci/ac97/ac97_patch.c static int patch_ad1819(struct snd_ac97 * ac97)
ac97             1449 sound/pci/ac97/ac97_patch.c 	scfg = snd_ac97_read(ac97, AC97_AD_SERIAL_CFG);
ac97             1450 sound/pci/ac97/ac97_patch.c 	snd_ac97_write_cache(ac97, AC97_AD_SERIAL_CFG, scfg | 0x7000); /* select all codecs */
ac97             1451 sound/pci/ac97/ac97_patch.c 	ac97->res_table = ad1819_restbl;
ac97             1455 sound/pci/ac97/ac97_patch.c static unsigned short patch_ad1881_unchained(struct snd_ac97 * ac97, int idx, unsigned short mask)
ac97             1460 sound/pci/ac97/ac97_patch.c 	snd_ac97_update_bits(ac97, AC97_AD_SERIAL_CFG, 0x7000, mask);
ac97             1461 sound/pci/ac97/ac97_patch.c 	snd_ac97_write_cache(ac97, AC97_AD_CODEC_CFG, 0x0000);	/* ID0C, ID1C, SDIE = off */
ac97             1462 sound/pci/ac97/ac97_patch.c 	val = snd_ac97_read(ac97, AC97_VENDOR_ID2);
ac97             1465 sound/pci/ac97/ac97_patch.c 	ac97->spec.ad18xx.unchained[idx] = mask;
ac97             1466 sound/pci/ac97/ac97_patch.c 	ac97->spec.ad18xx.id[idx] = val;
ac97             1467 sound/pci/ac97/ac97_patch.c 	ac97->spec.ad18xx.codec_cfg[idx] = 0x0000;
ac97             1471 sound/pci/ac97/ac97_patch.c static int patch_ad1881_chained1(struct snd_ac97 * ac97, int idx, unsigned short codec_bits)
ac97             1476 sound/pci/ac97/ac97_patch.c 	snd_ac97_update_bits(ac97, AC97_AD_SERIAL_CFG, 0x7000, cfg_bits[idx]);
ac97             1477 sound/pci/ac97/ac97_patch.c 	snd_ac97_write_cache(ac97, AC97_AD_CODEC_CFG, 0x0004);	// SDIE
ac97             1478 sound/pci/ac97/ac97_patch.c 	val = snd_ac97_read(ac97, AC97_VENDOR_ID2);
ac97             1482 sound/pci/ac97/ac97_patch.c 		snd_ac97_write_cache(ac97, AC97_AD_CODEC_CFG, codec_bits);
ac97             1483 sound/pci/ac97/ac97_patch.c 	ac97->spec.ad18xx.chained[idx] = cfg_bits[idx];
ac97             1484 sound/pci/ac97/ac97_patch.c 	ac97->spec.ad18xx.id[idx] = val;
ac97             1485 sound/pci/ac97/ac97_patch.c 	ac97->spec.ad18xx.codec_cfg[idx] = codec_bits ? codec_bits : 0x0004;
ac97             1489 sound/pci/ac97/ac97_patch.c static void patch_ad1881_chained(struct snd_ac97 * ac97, int unchained_idx, int cidx1, int cidx2)
ac97             1492 sound/pci/ac97/ac97_patch.c 	if (ac97->spec.ad18xx.unchained[cidx1] || ac97->spec.ad18xx.chained[cidx1])
ac97             1494 sound/pci/ac97/ac97_patch.c 	if (ac97->spec.ad18xx.unchained[cidx2] || ac97->spec.ad18xx.chained[cidx2])
ac97             1499 sound/pci/ac97/ac97_patch.c 	snd_ac97_update_bits(ac97, AC97_AD_SERIAL_CFG, 0x7000,
ac97             1500 sound/pci/ac97/ac97_patch.c 			     ac97->spec.ad18xx.unchained[unchained_idx]);
ac97             1501 sound/pci/ac97/ac97_patch.c 	snd_ac97_write_cache(ac97, AC97_AD_CODEC_CFG, 0x0002);		// ID1C
ac97             1502 sound/pci/ac97/ac97_patch.c 	ac97->spec.ad18xx.codec_cfg[unchained_idx] = 0x0002;
ac97             1505 sound/pci/ac97/ac97_patch.c 			patch_ad1881_chained1(ac97, cidx1, 0);
ac97             1506 sound/pci/ac97/ac97_patch.c 		else if (patch_ad1881_chained1(ac97, cidx1, 0x0006))	// SDIE | ID1C
ac97             1507 sound/pci/ac97/ac97_patch.c 			patch_ad1881_chained1(ac97, cidx2, 0);
ac97             1508 sound/pci/ac97/ac97_patch.c 		else if (patch_ad1881_chained1(ac97, cidx2, 0x0006))	// SDIE | ID1C
ac97             1509 sound/pci/ac97/ac97_patch.c 			patch_ad1881_chained1(ac97, cidx1, 0);
ac97             1511 sound/pci/ac97/ac97_patch.c 		patch_ad1881_chained1(ac97, cidx2, 0);
ac97             1521 sound/pci/ac97/ac97_patch.c static int patch_ad1881(struct snd_ac97 * ac97)
ac97             1534 sound/pci/ac97/ac97_patch.c 	val = snd_ac97_read(ac97, AC97_AD_SERIAL_CFG);
ac97             1535 sound/pci/ac97/ac97_patch.c 	snd_ac97_write_cache(ac97, AC97_AD_SERIAL_CFG, val);
ac97             1536 sound/pci/ac97/ac97_patch.c 	codecs[0] = patch_ad1881_unchained(ac97, 0, (1<<12));
ac97             1537 sound/pci/ac97/ac97_patch.c 	codecs[1] = patch_ad1881_unchained(ac97, 1, (1<<14));
ac97             1538 sound/pci/ac97/ac97_patch.c 	codecs[2] = patch_ad1881_unchained(ac97, 2, (1<<13));
ac97             1544 sound/pci/ac97/ac97_patch.c 		if (ac97->spec.ad18xx.unchained[idx])
ac97             1545 sound/pci/ac97/ac97_patch.c 			patch_ad1881_chained(ac97, idx, cfg_idxs[idx][0], cfg_idxs[idx][1]);
ac97             1547 sound/pci/ac97/ac97_patch.c 	if (ac97->spec.ad18xx.id[1]) {
ac97             1548 sound/pci/ac97/ac97_patch.c 		ac97->flags |= AC97_AD_MULTI;
ac97             1549 sound/pci/ac97/ac97_patch.c 		ac97->scaps |= AC97_SCAP_SURROUND_DAC;
ac97             1551 sound/pci/ac97/ac97_patch.c 	if (ac97->spec.ad18xx.id[2]) {
ac97             1552 sound/pci/ac97/ac97_patch.c 		ac97->flags |= AC97_AD_MULTI;
ac97             1553 sound/pci/ac97/ac97_patch.c 		ac97->scaps |= AC97_SCAP_CENTER_LFE_DAC;
ac97             1558 sound/pci/ac97/ac97_patch.c 	snd_ac97_update_bits(ac97, AC97_AD_SERIAL_CFG, 0x7000, 0x7000);
ac97             1561 sound/pci/ac97/ac97_patch.c 		if (ac97->spec.ad18xx.id[idx])
ac97             1565 sound/pci/ac97/ac97_patch.c 		snd_ac97_write_cache(ac97, AC97_AD_CODEC_CFG, 0x0000);
ac97             1566 sound/pci/ac97/ac97_patch.c 		ac97->spec.ad18xx.codec_cfg[0] = 
ac97             1567 sound/pci/ac97/ac97_patch.c 			ac97->spec.ad18xx.codec_cfg[1] = 
ac97             1568 sound/pci/ac97/ac97_patch.c 			ac97->spec.ad18xx.codec_cfg[2] = 0x0000;
ac97             1571 sound/pci/ac97/ac97_patch.c 	ac97->ext_id = snd_ac97_read(ac97, AC97_EXTENDED_ID);
ac97             1572 sound/pci/ac97/ac97_patch.c 	if (ac97->spec.ad18xx.id[0]) {
ac97             1573 sound/pci/ac97/ac97_patch.c 		ac97->id &= 0xffff0000;
ac97             1574 sound/pci/ac97/ac97_patch.c 		ac97->id |= ac97->spec.ad18xx.id[0];
ac97             1576 sound/pci/ac97/ac97_patch.c 	ac97->build_ops = &patch_ad1881_build_ops;
ac97             1591 sound/pci/ac97/ac97_patch.c static int patch_ad1885_specific(struct snd_ac97 * ac97)
ac97             1595 sound/pci/ac97/ac97_patch.c 	if ((err = patch_build_controls(ac97, snd_ac97_controls_ad1885, ARRAY_SIZE(snd_ac97_controls_ad1885))) < 0)
ac97             1597 sound/pci/ac97/ac97_patch.c 	reset_tlv(ac97, "Headphone Playback Volume",
ac97             1609 sound/pci/ac97/ac97_patch.c static int patch_ad1885(struct snd_ac97 * ac97)
ac97             1611 sound/pci/ac97/ac97_patch.c 	patch_ad1881(ac97);
ac97             1616 sound/pci/ac97/ac97_patch.c 	snd_ac97_write_cache(ac97, AC97_AD_MISC, 0x0404);
ac97             1618 sound/pci/ac97/ac97_patch.c 	ac97->build_ops = &patch_ad1885_build_ops;
ac97             1622 sound/pci/ac97/ac97_patch.c static int patch_ad1886_specific(struct snd_ac97 * ac97)
ac97             1624 sound/pci/ac97/ac97_patch.c 	reset_tlv(ac97, "Headphone Playback Volume",
ac97             1636 sound/pci/ac97/ac97_patch.c static int patch_ad1886(struct snd_ac97 * ac97)
ac97             1638 sound/pci/ac97/ac97_patch.c 	patch_ad1881(ac97);
ac97             1641 sound/pci/ac97/ac97_patch.c 	snd_ac97_write_cache(ac97, AC97_AD_JACK_SPDIF, 0x0010);
ac97             1642 sound/pci/ac97/ac97_patch.c 	ac97->build_ops = &patch_ad1886_build_ops;
ac97             1757 sound/pci/ac97/ac97_patch.c 	struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
ac97             1760 sound/pci/ac97/ac97_patch.c 	val = ac97->regs[AC97_AD_SERIAL_CFG];
ac97             1767 sound/pci/ac97/ac97_patch.c 	struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
ac97             1773 sound/pci/ac97/ac97_patch.c 	return snd_ac97_update_bits(ac97, AC97_AD_SERIAL_CFG, 0x0004, val);
ac97             1784 sound/pci/ac97/ac97_patch.c static int patch_ad198x_post_spdif(struct snd_ac97 * ac97)
ac97             1786 sound/pci/ac97/ac97_patch.c  	return patch_build_controls(ac97, &snd_ac97_ad198x_spdif_source, 1);
ac97             1813 sound/pci/ac97/ac97_patch.c static int check_list(struct snd_ac97 *ac97, const unsigned int *list)
ac97             1815 sound/pci/ac97/ac97_patch.c 	u32 subid = ((u32)ac97->subsystem_vendor << 16) | ac97->subsystem_device;
ac97             1822 sound/pci/ac97/ac97_patch.c static int patch_ad1981a_specific(struct snd_ac97 * ac97)
ac97             1824 sound/pci/ac97/ac97_patch.c 	if (check_list(ac97, ad1981_jacks_blacklist))
ac97             1826 sound/pci/ac97/ac97_patch.c 	return patch_build_controls(ac97, snd_ac97_ad1981x_jack_sense,
ac97             1854 sound/pci/ac97/ac97_patch.c static void check_ad1981_hp_jack_sense(struct snd_ac97 *ac97)
ac97             1856 sound/pci/ac97/ac97_patch.c 	if (check_list(ac97, ad1981_jacks_whitelist))
ac97             1858 sound/pci/ac97/ac97_patch.c 		snd_ac97_update_bits(ac97, AC97_AD_JACK_SPDIF, 1<<11, 1<<11);
ac97             1861 sound/pci/ac97/ac97_patch.c static int patch_ad1981a(struct snd_ac97 *ac97)
ac97             1863 sound/pci/ac97/ac97_patch.c 	patch_ad1881(ac97);
ac97             1864 sound/pci/ac97/ac97_patch.c 	ac97->build_ops = &patch_ad1981a_build_ops;
ac97             1865 sound/pci/ac97/ac97_patch.c 	snd_ac97_update_bits(ac97, AC97_AD_MISC, AC97_AD198X_MSPLT, AC97_AD198X_MSPLT);
ac97             1866 sound/pci/ac97/ac97_patch.c 	ac97->flags |= AC97_STEREO_MUTES;
ac97             1867 sound/pci/ac97/ac97_patch.c 	check_ad1981_hp_jack_sense(ac97);
ac97             1874 sound/pci/ac97/ac97_patch.c static int patch_ad1981b_specific(struct snd_ac97 *ac97)
ac97             1878 sound/pci/ac97/ac97_patch.c 	if ((err = patch_build_controls(ac97, &snd_ac97_ad198x_2cmic, 1)) < 0)
ac97             1880 sound/pci/ac97/ac97_patch.c 	if (check_list(ac97, ad1981_jacks_blacklist))
ac97             1882 sound/pci/ac97/ac97_patch.c 	return patch_build_controls(ac97, snd_ac97_ad1981x_jack_sense,
ac97             1894 sound/pci/ac97/ac97_patch.c static int patch_ad1981b(struct snd_ac97 *ac97)
ac97             1896 sound/pci/ac97/ac97_patch.c 	patch_ad1881(ac97);
ac97             1897 sound/pci/ac97/ac97_patch.c 	ac97->build_ops = &patch_ad1981b_build_ops;
ac97             1898 sound/pci/ac97/ac97_patch.c 	snd_ac97_update_bits(ac97, AC97_AD_MISC, AC97_AD198X_MSPLT, AC97_AD198X_MSPLT);
ac97             1899 sound/pci/ac97/ac97_patch.c 	ac97->flags |= AC97_STEREO_MUTES;
ac97             1900 sound/pci/ac97/ac97_patch.c 	check_ad1981_hp_jack_sense(ac97);
ac97             1908 sound/pci/ac97/ac97_patch.c 	struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
ac97             1911 sound/pci/ac97/ac97_patch.c 	val = ac97->regs[AC97_AD_MISC];
ac97             1913 sound/pci/ac97/ac97_patch.c 	if (ac97->spec.ad18xx.lo_as_master)
ac97             1921 sound/pci/ac97/ac97_patch.c 	struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
ac97             1925 sound/pci/ac97/ac97_patch.c 	if (ac97->spec.ad18xx.lo_as_master)
ac97             1928 sound/pci/ac97/ac97_patch.c 	return snd_ac97_update_bits(ac97, AC97_AD_MISC,
ac97             1941 sound/pci/ac97/ac97_patch.c 	struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
ac97             1944 sound/pci/ac97/ac97_patch.c 	val = ac97->regs[AC97_AD_MISC];
ac97             1954 sound/pci/ac97/ac97_patch.c 	struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
ac97             1964 sound/pci/ac97/ac97_patch.c 	return snd_ac97_update_bits(ac97, AC97_AD_MISC,
ac97             1968 sound/pci/ac97/ac97_patch.c static void ad1888_update_jacks(struct snd_ac97 *ac97)
ac97             1972 sound/pci/ac97/ac97_patch.c 	if (!ac97->spec.ad18xx.lo_as_master && is_shared_linein(ac97))
ac97             1975 sound/pci/ac97/ac97_patch.c 	if (is_shared_micin(ac97))
ac97             1978 sound/pci/ac97/ac97_patch.c 	snd_ac97_update_bits(ac97, AC97_AD_MISC, (1 << 11) | (1 << 12), val);
ac97             2007 sound/pci/ac97/ac97_patch.c static int patch_ad1888_specific(struct snd_ac97 *ac97)
ac97             2009 sound/pci/ac97/ac97_patch.c 	if (!ac97->spec.ad18xx.lo_as_master) {
ac97             2011 sound/pci/ac97/ac97_patch.c 		snd_ac97_rename_vol_ctl(ac97, "Master Playback",
ac97             2013 sound/pci/ac97/ac97_patch.c 		snd_ac97_rename_vol_ctl(ac97, "Headphone Playback",
ac97             2016 sound/pci/ac97/ac97_patch.c 	return patch_build_controls(ac97, snd_ac97_ad1888_controls, ARRAY_SIZE(snd_ac97_ad1888_controls));
ac97             2028 sound/pci/ac97/ac97_patch.c static int patch_ad1888(struct snd_ac97 * ac97)
ac97             2032 sound/pci/ac97/ac97_patch.c 	patch_ad1881(ac97);
ac97             2033 sound/pci/ac97/ac97_patch.c 	ac97->build_ops = &patch_ad1888_build_ops;
ac97             2039 sound/pci/ac97/ac97_patch.c 	if (ac97->subsystem_vendor == 0x1043 &&
ac97             2040 sound/pci/ac97/ac97_patch.c 	    ac97->subsystem_device == 0x1193) /* ASUS A9T laptop */
ac97             2041 sound/pci/ac97/ac97_patch.c 		ac97->spec.ad18xx.lo_as_master = 1;
ac97             2043 sound/pci/ac97/ac97_patch.c 	misc = snd_ac97_read(ac97, AC97_AD_MISC);
ac97             2047 sound/pci/ac97/ac97_patch.c 	if (!ac97->spec.ad18xx.lo_as_master)
ac97             2054 sound/pci/ac97/ac97_patch.c 	snd_ac97_write_cache(ac97, AC97_AD_MISC, misc);
ac97             2055 sound/pci/ac97/ac97_patch.c 	ac97->flags |= AC97_STEREO_MUTES;
ac97             2059 sound/pci/ac97/ac97_patch.c static int patch_ad1980_specific(struct snd_ac97 *ac97)
ac97             2063 sound/pci/ac97/ac97_patch.c 	if ((err = patch_ad1888_specific(ac97)) < 0)
ac97             2065 sound/pci/ac97/ac97_patch.c 	return patch_build_controls(ac97, &snd_ac97_ad198x_2cmic, 1);
ac97             2077 sound/pci/ac97/ac97_patch.c static int patch_ad1980(struct snd_ac97 * ac97)
ac97             2079 sound/pci/ac97/ac97_patch.c 	patch_ad1888(ac97);
ac97             2080 sound/pci/ac97/ac97_patch.c 	ac97->build_ops = &patch_ad1980_build_ops;
ac97             2098 sound/pci/ac97/ac97_patch.c 	struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
ac97             2100 sound/pci/ac97/ac97_patch.c 	val = (ac97->regs[AC97_AD_MISC] & AC97_AD198X_VREF_MASK)
ac97             2110 sound/pci/ac97/ac97_patch.c 	struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
ac97             2117 sound/pci/ac97/ac97_patch.c 	return snd_ac97_update_bits(ac97, AC97_AD_MISC,
ac97             2154 sound/pci/ac97/ac97_patch.c static void ad1985_update_jacks(struct snd_ac97 *ac97)
ac97             2156 sound/pci/ac97/ac97_patch.c 	ad1888_update_jacks(ac97);
ac97             2158 sound/pci/ac97/ac97_patch.c 	snd_ac97_update_bits(ac97, AC97_AD_SERIAL_CFG, 1 << 9,
ac97             2159 sound/pci/ac97/ac97_patch.c 			     is_shared_micin(ac97) ? 1 << 9 : 0);
ac97             2162 sound/pci/ac97/ac97_patch.c static int patch_ad1985_specific(struct snd_ac97 *ac97)
ac97             2167 sound/pci/ac97/ac97_patch.c 	snd_ac97_rename_vol_ctl(ac97, "Master Playback",
ac97             2169 sound/pci/ac97/ac97_patch.c 	snd_ac97_rename_vol_ctl(ac97, "Headphone Playback", "Master Playback");
ac97             2171 sound/pci/ac97/ac97_patch.c 	if ((err = patch_build_controls(ac97, &snd_ac97_ad198x_2cmic, 1)) < 0)
ac97             2174 sound/pci/ac97/ac97_patch.c 	return patch_build_controls(ac97, snd_ac97_ad1985_controls,
ac97             2187 sound/pci/ac97/ac97_patch.c static int patch_ad1985(struct snd_ac97 * ac97)
ac97             2191 sound/pci/ac97/ac97_patch.c 	patch_ad1881(ac97);
ac97             2192 sound/pci/ac97/ac97_patch.c 	ac97->build_ops = &patch_ad1985_build_ops;
ac97             2193 sound/pci/ac97/ac97_patch.c 	misc = snd_ac97_read(ac97, AC97_AD_MISC);
ac97             2197 sound/pci/ac97/ac97_patch.c 	snd_ac97_write_cache(ac97, AC97_AD_MISC, misc |
ac97             2202 sound/pci/ac97/ac97_patch.c 	ac97->flags |= AC97_STEREO_MUTES;
ac97             2205 sound/pci/ac97/ac97_patch.c 	ad1985_update_jacks(ac97);
ac97             2208 sound/pci/ac97/ac97_patch.c 	ac97->ext_id = (ac97->ext_id & ~AC97_EI_REV_MASK) | AC97_EI_REV_23;
ac97             2217 sound/pci/ac97/ac97_patch.c 	struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
ac97             2220 sound/pci/ac97/ac97_patch.c 	val = ac97->regs[AC97_AD_MISC3];
ac97             2228 sound/pci/ac97/ac97_patch.c 	struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
ac97             2231 sound/pci/ac97/ac97_patch.c 	int sprd = (ac97->regs[AC97_AD_MISC] & AC97_AD1986_SPRD) != 0;
ac97             2233 sound/pci/ac97/ac97_patch.c 	ret0 = snd_ac97_update_bits(ac97, AC97_AD_MISC3, AC97_AD1986_LOSEL,
ac97             2240 sound/pci/ac97/ac97_patch.c 	ret1 = snd_ac97_update_bits(ac97, AC97_AD_MISC, AC97_AD1986_SOSEL,
ac97             2253 sound/pci/ac97/ac97_patch.c 	struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
ac97             2256 sound/pci/ac97/ac97_patch.c 	val = ac97->regs[AC97_AD_MISC];
ac97             2264 sound/pci/ac97/ac97_patch.c 	struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
ac97             2267 sound/pci/ac97/ac97_patch.c 	int sprd = (ac97->regs[AC97_AD_MISC3] & AC97_AD1986_LOSEL) != 0;
ac97             2269 sound/pci/ac97/ac97_patch.c 	ret0 = snd_ac97_update_bits(ac97, AC97_AD_MISC, AC97_AD1986_SPRD,
ac97             2276 sound/pci/ac97/ac97_patch.c 	ret1 = snd_ac97_update_bits(ac97, AC97_AD_MISC, AC97_AD1986_SOSEL,
ac97             2289 sound/pci/ac97/ac97_patch.c 	struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
ac97             2291 sound/pci/ac97/ac97_patch.c 	ucontrol->value.integer.value[0] = ac97->spec.ad18xx.swap_mic_linein;
ac97             2298 sound/pci/ac97/ac97_patch.c 	struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
ac97             2301 sound/pci/ac97/ac97_patch.c 	if (swap != ac97->spec.ad18xx.swap_mic_linein) {
ac97             2302 sound/pci/ac97/ac97_patch.c 		ac97->spec.ad18xx.swap_mic_linein = swap;
ac97             2303 sound/pci/ac97/ac97_patch.c 		if (ac97->build_ops->update_jacks)
ac97             2304 sound/pci/ac97/ac97_patch.c 			ac97->build_ops->update_jacks(ac97);
ac97             2314 sound/pci/ac97/ac97_patch.c 	struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
ac97             2316 sound/pci/ac97/ac97_patch.c 	unsigned short reg = ac97->regs[AC97_AD_MISC2];
ac97             2332 sound/pci/ac97/ac97_patch.c 	struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
ac97             2366 sound/pci/ac97/ac97_patch.c 	cret = snd_ac97_update_bits(ac97, AC97_AD_MISC2,
ac97             2370 sound/pci/ac97/ac97_patch.c 	lret = snd_ac97_update_bits(ac97, AC97_AD_MISC3,
ac97             2374 sound/pci/ac97/ac97_patch.c 	mret = snd_ac97_update_bits(ac97, AC97_AD_MISC2,
ac97             2426 sound/pci/ac97/ac97_patch.c static void ad1986_update_jacks(struct snd_ac97 *ac97)
ac97             2432 sound/pci/ac97/ac97_patch.c 	if (!is_surround_on(ac97))
ac97             2434 sound/pci/ac97/ac97_patch.c 	if (!is_clfe_on(ac97))
ac97             2438 sound/pci/ac97/ac97_patch.c 	if (is_shared_linein(ac97))
ac97             2440 sound/pci/ac97/ac97_patch.c 	else if (ac97->spec.ad18xx.swap_mic_linein != 0)
ac97             2442 sound/pci/ac97/ac97_patch.c 	snd_ac97_update_bits(ac97, AC97_AD_MISC,
ac97             2448 sound/pci/ac97/ac97_patch.c 	if (is_shared_micin(ac97))
ac97             2450 sound/pci/ac97/ac97_patch.c 	else if (ac97->spec.ad18xx.swap_mic_linein != 0)
ac97             2454 sound/pci/ac97/ac97_patch.c 	snd_ac97_update_bits(ac97, AC97_AD_SERIAL_CFG,
ac97             2459 sound/pci/ac97/ac97_patch.c static int patch_ad1986_specific(struct snd_ac97 *ac97)
ac97             2463 sound/pci/ac97/ac97_patch.c 	if ((err = patch_build_controls(ac97, &snd_ac97_ad198x_2cmic, 1)) < 0)
ac97             2466 sound/pci/ac97/ac97_patch.c 	return patch_build_controls(ac97, snd_ac97_ad1986_controls,
ac97             2479 sound/pci/ac97/ac97_patch.c static int patch_ad1986(struct snd_ac97 * ac97)
ac97             2481 sound/pci/ac97/ac97_patch.c 	patch_ad1881(ac97);
ac97             2482 sound/pci/ac97/ac97_patch.c 	ac97->build_ops = &patch_ad1986_build_ops;
ac97             2483 sound/pci/ac97/ac97_patch.c 	ac97->flags |= AC97_STEREO_MUTES;
ac97             2486 sound/pci/ac97/ac97_patch.c 	ad1986_update_jacks(ac97);
ac97             2494 sound/pci/ac97/ac97_patch.c static int patch_alc203(struct snd_ac97 *ac97)
ac97             2496 sound/pci/ac97/ac97_patch.c 	snd_ac97_update_bits(ac97, 0x7a, 0x400, 0x400);
ac97             2503 sound/pci/ac97/ac97_patch.c static void alc650_update_jacks(struct snd_ac97 *ac97)
ac97             2508 sound/pci/ac97/ac97_patch.c 	shared = is_shared_surrout(ac97);
ac97             2509 sound/pci/ac97/ac97_patch.c 	snd_ac97_update_bits(ac97, AC97_ALC650_MULTICH, 1 << 9,
ac97             2512 sound/pci/ac97/ac97_patch.c 	shared = is_shared_clfeout(ac97);
ac97             2514 sound/pci/ac97/ac97_patch.c 	snd_ac97_update_bits(ac97, AC97_ALC650_CLOCK, 1 << 12,
ac97             2517 sound/pci/ac97/ac97_patch.c 	snd_ac97_update_bits(ac97, AC97_ALC650_MULTICH, 1 << 10,
ac97             2520 sound/pci/ac97/ac97_patch.c 	snd_ac97_update_bits(ac97, AC97_ALC650_GPIO_STATUS, 0x100,
ac97             2527 sound/pci/ac97/ac97_patch.c 	struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
ac97             2528 sound/pci/ac97/ac97_patch.c 	struct snd_pcm_chmap *map = ac97->chmaps[SNDRV_PCM_STREAM_PLAYBACK];
ac97             2581 sound/pci/ac97/ac97_patch.c static int patch_alc650_specific(struct snd_ac97 * ac97)
ac97             2585 sound/pci/ac97/ac97_patch.c 	if ((err = patch_build_controls(ac97, snd_ac97_controls_alc650, ARRAY_SIZE(snd_ac97_controls_alc650))) < 0)
ac97             2587 sound/pci/ac97/ac97_patch.c 	if (ac97->ext_id & AC97_EI_SPDIF) {
ac97             2588 sound/pci/ac97/ac97_patch.c 		if ((err = patch_build_controls(ac97, snd_ac97_spdif_controls_alc650, ARRAY_SIZE(snd_ac97_spdif_controls_alc650))) < 0)
ac97             2591 sound/pci/ac97/ac97_patch.c 	if (ac97->id != AC97_ID_ALC650F)
ac97             2592 sound/pci/ac97/ac97_patch.c 		reset_tlv(ac97, "Master Playback Volume",
ac97             2602 sound/pci/ac97/ac97_patch.c static int patch_alc650(struct snd_ac97 * ac97)
ac97             2606 sound/pci/ac97/ac97_patch.c 	ac97->build_ops = &patch_alc650_ops;
ac97             2609 sound/pci/ac97/ac97_patch.c 	val = snd_ac97_read(ac97, AC97_ALC650_REVISION) & 0x3f;
ac97             2611 sound/pci/ac97/ac97_patch.c 		ac97->id = 0x414c4720;          /* Old version */
ac97             2613 sound/pci/ac97/ac97_patch.c 		ac97->id = 0x414c4721;          /* D version */
ac97             2615 sound/pci/ac97/ac97_patch.c 		ac97->id = 0x414c4722;          /* E version */
ac97             2617 sound/pci/ac97/ac97_patch.c 		ac97->id = 0x414c4723;          /* F version */
ac97             2621 sound/pci/ac97/ac97_patch.c 	ac97->spec.dev_flags = (ac97->id == 0x414c4722 ||
ac97             2622 sound/pci/ac97/ac97_patch.c 				ac97->id == 0x414c4723);
ac97             2625 sound/pci/ac97/ac97_patch.c 	snd_ac97_write_cache(ac97, AC97_ALC650_GPIO_STATUS, 
ac97             2626 sound/pci/ac97/ac97_patch.c 		snd_ac97_read(ac97, AC97_ALC650_GPIO_STATUS) | 0x8000);
ac97             2629 sound/pci/ac97/ac97_patch.c 	val = snd_ac97_read(ac97, AC97_ALC650_CLOCK);
ac97             2631 sound/pci/ac97/ac97_patch.c 	if (ac97->spec.dev_flags &&
ac97             2633 sound/pci/ac97/ac97_patch.c 	    ! (ac97->subsystem_vendor == 0x1043 &&
ac97             2634 sound/pci/ac97/ac97_patch.c 	       ac97->subsystem_device == 0x1103))
ac97             2638 sound/pci/ac97/ac97_patch.c 	snd_ac97_write_cache(ac97, AC97_ALC650_CLOCK, val);
ac97             2645 sound/pci/ac97/ac97_patch.c 	snd_ac97_write_cache(ac97, AC97_ALC650_MULTICH, 0);
ac97             2649 sound/pci/ac97/ac97_patch.c 	snd_ac97_write_cache(ac97, AC97_ALC650_GPIO_SETUP,
ac97             2650 sound/pci/ac97/ac97_patch.c 			     snd_ac97_read(ac97, AC97_ALC650_GPIO_SETUP) | 0x01);
ac97             2651 sound/pci/ac97/ac97_patch.c 	snd_ac97_write_cache(ac97, AC97_ALC650_GPIO_STATUS,
ac97             2652 sound/pci/ac97/ac97_patch.c 			     (snd_ac97_read(ac97, AC97_ALC650_GPIO_STATUS) | 0x100) & ~0x10);
ac97             2655 sound/pci/ac97/ac97_patch.c 	snd_ac97_write_cache(ac97, AC97_ALC650_SURR_DAC_VOL, 0x0808);
ac97             2656 sound/pci/ac97/ac97_patch.c 	snd_ac97_write_cache(ac97, AC97_ALC650_LFE_DAC_VOL, 0x0808);
ac97             2660 sound/pci/ac97/ac97_patch.c static void alc655_update_jacks(struct snd_ac97 *ac97)
ac97             2665 sound/pci/ac97/ac97_patch.c 	shared = is_shared_surrout(ac97);
ac97             2666 sound/pci/ac97/ac97_patch.c 	ac97_update_bits_page(ac97, AC97_ALC650_MULTICH, 1 << 9,
ac97             2669 sound/pci/ac97/ac97_patch.c 	shared = is_shared_clfeout(ac97);
ac97             2671 sound/pci/ac97/ac97_patch.c 	snd_ac97_update_bits(ac97, AC97_ALC650_CLOCK, 1 << 12,
ac97             2673 sound/pci/ac97/ac97_patch.c 	ac97_update_bits_page(ac97, AC97_ALC650_MULTICH, 1 << 10,
ac97             2691 sound/pci/ac97/ac97_patch.c 	struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
ac97             2693 sound/pci/ac97/ac97_patch.c 	if (ac97->spec.dev_flags)
ac97             2701 sound/pci/ac97/ac97_patch.c 	struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
ac97             2704 sound/pci/ac97/ac97_patch.c 	val = ac97->regs[AC97_ALC650_MULTICH];
ac97             2706 sound/pci/ac97/ac97_patch.c 	if (ac97->spec.dev_flags && val == 3)
ac97             2714 sound/pci/ac97/ac97_patch.c 	struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
ac97             2716 sound/pci/ac97/ac97_patch.c 	return ac97_update_bits_page(ac97, AC97_ALC650_MULTICH, 3 << 12,
ac97             2734 sound/pci/ac97/ac97_patch.c static int patch_alc655_specific(struct snd_ac97 * ac97)
ac97             2738 sound/pci/ac97/ac97_patch.c 	if ((err = patch_build_controls(ac97, snd_ac97_controls_alc655, ARRAY_SIZE(snd_ac97_controls_alc655))) < 0)
ac97             2740 sound/pci/ac97/ac97_patch.c 	if (ac97->ext_id & AC97_EI_SPDIF) {
ac97             2741 sound/pci/ac97/ac97_patch.c 		if ((err = patch_build_controls(ac97, snd_ac97_spdif_controls_alc655, ARRAY_SIZE(snd_ac97_spdif_controls_alc655))) < 0)
ac97             2752 sound/pci/ac97/ac97_patch.c static int patch_alc655(struct snd_ac97 * ac97)
ac97             2756 sound/pci/ac97/ac97_patch.c 	if (ac97->id == AC97_ID_ALC658) {
ac97             2757 sound/pci/ac97/ac97_patch.c 		ac97->spec.dev_flags = 1; /* ALC658 */
ac97             2758 sound/pci/ac97/ac97_patch.c 		if ((snd_ac97_read(ac97, AC97_ALC650_REVISION) & 0x3f) == 2) {
ac97             2759 sound/pci/ac97/ac97_patch.c 			ac97->id = AC97_ID_ALC658D;
ac97             2760 sound/pci/ac97/ac97_patch.c 			ac97->spec.dev_flags = 2;
ac97             2764 sound/pci/ac97/ac97_patch.c 	ac97->build_ops = &patch_alc655_ops;
ac97             2767 sound/pci/ac97/ac97_patch.c 	snd_ac97_update_bits(ac97, AC97_INT_PAGING, AC97_PAGE_MASK, AC97_PAGE_VENDOR);
ac97             2770 sound/pci/ac97/ac97_patch.c 	val = snd_ac97_read(ac97, 0x7a); /* misc control */
ac97             2771 sound/pci/ac97/ac97_patch.c 	if (ac97->spec.dev_flags) /* ALC658 */
ac97             2774 sound/pci/ac97/ac97_patch.c 		if (ac97->subsystem_vendor == 0x1462 &&
ac97             2775 sound/pci/ac97/ac97_patch.c 		    (ac97->subsystem_device == 0x0131 || /* MSI S270 laptop */
ac97             2776 sound/pci/ac97/ac97_patch.c 		     ac97->subsystem_device == 0x0161 || /* LG K1 Express */
ac97             2777 sound/pci/ac97/ac97_patch.c 		     ac97->subsystem_device == 0x0351 || /* MSI L725 laptop */
ac97             2778 sound/pci/ac97/ac97_patch.c 		     ac97->subsystem_device == 0x0471 || /* MSI L720 laptop */
ac97             2779 sound/pci/ac97/ac97_patch.c 		     ac97->subsystem_device == 0x0061))  /* MSI S250 laptop */
ac97             2784 sound/pci/ac97/ac97_patch.c 		ac97->ext_id |= AC97_EI_SPDIF;
ac97             2787 sound/pci/ac97/ac97_patch.c 	snd_ac97_write_cache(ac97, 0x7a, val);
ac97             2793 sound/pci/ac97/ac97_patch.c 	snd_ac97_write_cache(ac97, AC97_ALC650_MULTICH, 1<<15);
ac97             2796 sound/pci/ac97/ac97_patch.c 	snd_ac97_write_cache(ac97, AC97_ALC650_SURR_DAC_VOL, 0x0808);
ac97             2797 sound/pci/ac97/ac97_patch.c 	snd_ac97_write_cache(ac97, AC97_ALC650_LFE_DAC_VOL, 0x0808);
ac97             2800 sound/pci/ac97/ac97_patch.c 	if (ac97->id == AC97_ID_ALC658D)
ac97             2801 sound/pci/ac97/ac97_patch.c 		snd_ac97_update_bits(ac97, 0x74, 0x0800, 0x0800);
ac97             2811 sound/pci/ac97/ac97_patch.c static void alc850_update_jacks(struct snd_ac97 *ac97)
ac97             2817 sound/pci/ac97/ac97_patch.c 	shared = is_shared_surrout(ac97);
ac97             2819 sound/pci/ac97/ac97_patch.c 	snd_ac97_update_bits(ac97, AC97_ALC850_MISC1, (1<<4)|(1<<5),
ac97             2822 sound/pci/ac97/ac97_patch.c 	snd_ac97_update_bits(ac97, AC97_ALC850_JACK_SELECT, 7 << 12,
ac97             2825 sound/pci/ac97/ac97_patch.c 	shared = is_shared_clfeout(ac97);
ac97             2827 sound/pci/ac97/ac97_patch.c 	snd_ac97_update_bits(ac97, AC97_ALC850_MISC1, (1<<12)|(1<<13),
ac97             2830 sound/pci/ac97/ac97_patch.c 	snd_ac97_update_bits(ac97, AC97_ALC850_JACK_SELECT, 7 << 4,
ac97             2833 sound/pci/ac97/ac97_patch.c 	aux_is_back_surround = alc850_is_aux_back_surround(ac97);
ac97             2835 sound/pci/ac97/ac97_patch.c 	snd_ac97_update_bits(ac97, AC97_ALC850_MULTICH, 1 << 10,
ac97             2846 sound/pci/ac97/ac97_patch.c static int patch_alc850_specific(struct snd_ac97 *ac97)
ac97             2850 sound/pci/ac97/ac97_patch.c 	if ((err = patch_build_controls(ac97, snd_ac97_controls_alc850, ARRAY_SIZE(snd_ac97_controls_alc850))) < 0)
ac97             2852 sound/pci/ac97/ac97_patch.c 	if (ac97->ext_id & AC97_EI_SPDIF) {
ac97             2853 sound/pci/ac97/ac97_patch.c 		if ((err = patch_build_controls(ac97, snd_ac97_spdif_controls_alc655, ARRAY_SIZE(snd_ac97_spdif_controls_alc655))) < 0)
ac97             2864 sound/pci/ac97/ac97_patch.c static int patch_alc850(struct snd_ac97 *ac97)
ac97             2866 sound/pci/ac97/ac97_patch.c 	ac97->build_ops = &patch_alc850_ops;
ac97             2868 sound/pci/ac97/ac97_patch.c 	ac97->spec.dev_flags = 0; /* for IEC958 playback route - ALC655 compatible */
ac97             2869 sound/pci/ac97/ac97_patch.c 	ac97->flags |= AC97_HAS_8CH;
ac97             2872 sound/pci/ac97/ac97_patch.c 	snd_ac97_update_bits(ac97, AC97_INT_PAGING, AC97_PAGE_MASK, AC97_PAGE_VENDOR);
ac97             2881 sound/pci/ac97/ac97_patch.c 	snd_ac97_write_cache(ac97, AC97_ALC650_MULTICH, 1<<15);
ac97             2885 sound/pci/ac97/ac97_patch.c 	snd_ac97_write_cache(ac97, 0x7a, (1<<1)|(1<<4)|(0<<5)|(1<<6)|
ac97             2890 sound/pci/ac97/ac97_patch.c 	snd_ac97_write_cache(ac97, 0x76, (0<<0)|(0<<2)|(1<<4)|(1<<7)|(2<<8)|
ac97             2894 sound/pci/ac97/ac97_patch.c 	snd_ac97_write_cache(ac97, AC97_ALC650_SURR_DAC_VOL, 0x0808);
ac97             2895 sound/pci/ac97/ac97_patch.c 	snd_ac97_write_cache(ac97, AC97_ALC650_LFE_DAC_VOL, 0x0808);
ac97             2899 sound/pci/ac97/ac97_patch.c static int patch_aztech_azf3328_specific(struct snd_ac97 *ac97)
ac97             2902 sound/pci/ac97/ac97_patch.c 		snd_ac97_find_mixer_ctl(ac97, "3D Control - Center");
ac97             2904 sound/pci/ac97/ac97_patch.c 		snd_ac97_find_mixer_ctl(ac97, "3D Control - Depth");
ac97             2913 sound/pci/ac97/ac97_patch.c 		snd_ac97_rename_vol_ctl(ac97,
ac97             2923 sound/pci/ac97/ac97_patch.c 	snd_ac97_rename_vol_ctl(ac97,
ac97             2926 sound/pci/ac97/ac97_patch.c 	snd_ac97_rename_vol_ctl(ac97,
ac97             2937 sound/pci/ac97/ac97_patch.c static int patch_aztech_azf3328(struct snd_ac97 *ac97)
ac97             2939 sound/pci/ac97/ac97_patch.c 	ac97->build_ops = &patch_aztech_azf3328_ops;
ac97             2946 sound/pci/ac97/ac97_patch.c static void cm9738_update_jacks(struct snd_ac97 *ac97)
ac97             2949 sound/pci/ac97/ac97_patch.c 	snd_ac97_update_bits(ac97, AC97_CM9738_VENDOR_CTRL, 1 << 10,
ac97             2950 sound/pci/ac97/ac97_patch.c 			     is_shared_surrout(ac97) ? (1 << 10) : 0);
ac97             2959 sound/pci/ac97/ac97_patch.c static int patch_cm9738_specific(struct snd_ac97 * ac97)
ac97             2961 sound/pci/ac97/ac97_patch.c 	return patch_build_controls(ac97, snd_ac97_cm9738_controls, ARRAY_SIZE(snd_ac97_cm9738_controls));
ac97             2969 sound/pci/ac97/ac97_patch.c static int patch_cm9738(struct snd_ac97 * ac97)
ac97             2971 sound/pci/ac97/ac97_patch.c 	ac97->build_ops = &patch_cm9738_ops;
ac97             2974 sound/pci/ac97/ac97_patch.c 	ac97->flags |= AC97_HAS_NO_PCM_VOL;
ac97             2975 sound/pci/ac97/ac97_patch.c 	snd_ac97_write_cache(ac97, AC97_PCM, 0x8000);
ac97             2989 sound/pci/ac97/ac97_patch.c 	struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
ac97             2992 sound/pci/ac97/ac97_patch.c 	val = ac97->regs[AC97_CM9739_SPDIF_CTRL];
ac97             2999 sound/pci/ac97/ac97_patch.c 	struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
ac97             3001 sound/pci/ac97/ac97_patch.c 	return snd_ac97_update_bits(ac97, AC97_CM9739_SPDIF_CTRL,
ac97             3024 sound/pci/ac97/ac97_patch.c static void cm9739_update_jacks(struct snd_ac97 *ac97)
ac97             3027 sound/pci/ac97/ac97_patch.c 	snd_ac97_update_bits(ac97, AC97_CM9739_MULTI_CHAN, 1 << 10,
ac97             3028 sound/pci/ac97/ac97_patch.c 			     is_shared_surrout(ac97) ? (1 << 10) : 0);
ac97             3030 sound/pci/ac97/ac97_patch.c 	snd_ac97_update_bits(ac97, AC97_CM9739_MULTI_CHAN, 0x3000,
ac97             3031 sound/pci/ac97/ac97_patch.c 			     is_shared_clfeout(ac97) ? 0x1000 : 0x2000);
ac97             3039 sound/pci/ac97/ac97_patch.c static int patch_cm9739_specific(struct snd_ac97 * ac97)
ac97             3041 sound/pci/ac97/ac97_patch.c 	return patch_build_controls(ac97, snd_ac97_cm9739_controls, ARRAY_SIZE(snd_ac97_cm9739_controls));
ac97             3044 sound/pci/ac97/ac97_patch.c static int patch_cm9739_post_spdif(struct snd_ac97 * ac97)
ac97             3046 sound/pci/ac97/ac97_patch.c 	return patch_build_controls(ac97, snd_ac97_cm9739_controls_spdif, ARRAY_SIZE(snd_ac97_cm9739_controls_spdif));
ac97             3055 sound/pci/ac97/ac97_patch.c static int patch_cm9739(struct snd_ac97 * ac97)
ac97             3059 sound/pci/ac97/ac97_patch.c 	ac97->build_ops = &patch_cm9739_ops;
ac97             3062 sound/pci/ac97/ac97_patch.c 	ac97->flags |= AC97_HAS_NO_MASTER_VOL | AC97_HAS_NO_PCM_VOL;
ac97             3063 sound/pci/ac97/ac97_patch.c 	snd_ac97_write_cache(ac97, AC97_MASTER, 0x8000);
ac97             3064 sound/pci/ac97/ac97_patch.c 	snd_ac97_write_cache(ac97, AC97_PCM, 0x8000);
ac97             3067 sound/pci/ac97/ac97_patch.c 	val = snd_ac97_read(ac97, AC97_EXTENDED_STATUS);
ac97             3070 sound/pci/ac97/ac97_patch.c 		snd_ac97_write_cache(ac97, AC97_CM9739_SPDIF_CTRL,
ac97             3071 sound/pci/ac97/ac97_patch.c 				     snd_ac97_read(ac97, AC97_CM9739_SPDIF_CTRL) | 0x01);
ac97             3072 sound/pci/ac97/ac97_patch.c 		ac97->rates[AC97_RATES_SPDIF] = SNDRV_PCM_RATE_48000; /* 48k only */
ac97             3074 sound/pci/ac97/ac97_patch.c 		ac97->ext_id &= ~AC97_EI_SPDIF; /* disable extended-id */
ac97             3075 sound/pci/ac97/ac97_patch.c 		ac97->rates[AC97_RATES_SPDIF] = 0;
ac97             3087 sound/pci/ac97/ac97_patch.c 	val = snd_ac97_read(ac97, AC97_CM9739_MULTI_CHAN) & (1 << 4);
ac97             3090 sound/pci/ac97/ac97_patch.c 	if (! (ac97->ext_id & AC97_EI_SPDIF))
ac97             3092 sound/pci/ac97/ac97_patch.c 	snd_ac97_write_cache(ac97, AC97_CM9739_MULTI_CHAN, val);
ac97             3095 sound/pci/ac97/ac97_patch.c 	snd_ac97_write_cache(ac97, 0x70, 0x0100);
ac97             3096 sound/pci/ac97/ac97_patch.c 	snd_ac97_write_cache(ac97, 0x72, 0x0020);
ac97             3098 sound/pci/ac97/ac97_patch.c 	if (ac97->pci &&
ac97             3099 sound/pci/ac97/ac97_patch.c 	     ac97->subsystem_vendor == 0x1043 &&
ac97             3100 sound/pci/ac97/ac97_patch.c 	     ac97->subsystem_device == 0x1843) {
ac97             3101 sound/pci/ac97/ac97_patch.c 		snd_ac97_write_cache(ac97, AC97_CM9739_SPDIF_CTRL,
ac97             3102 sound/pci/ac97/ac97_patch.c 			snd_ac97_read(ac97, AC97_CM9739_SPDIF_CTRL) & ~0x01);
ac97             3103 sound/pci/ac97/ac97_patch.c 		snd_ac97_write_cache(ac97, AC97_CM9739_MULTI_CHAN,
ac97             3104 sound/pci/ac97/ac97_patch.c 			snd_ac97_read(ac97, AC97_CM9739_MULTI_CHAN) | (1 << 14));
ac97             3114 sound/pci/ac97/ac97_patch.c static void cm9761_update_jacks(struct snd_ac97 *ac97)
ac97             3141 sound/pci/ac97/ac97_patch.c 	val |= surr_on[ac97->spec.dev_flags][is_surround_on(ac97)];
ac97             3142 sound/pci/ac97/ac97_patch.c 	val |= clfe_on[ac97->spec.dev_flags][is_clfe_on(ac97)];
ac97             3143 sound/pci/ac97/ac97_patch.c 	val |= surr_shared[ac97->spec.dev_flags][is_shared_surrout(ac97)];
ac97             3144 sound/pci/ac97/ac97_patch.c 	val |= clfe_shared[ac97->spec.dev_flags][is_shared_clfeout(ac97)];
ac97             3146 sound/pci/ac97/ac97_patch.c 	snd_ac97_update_bits(ac97, AC97_CM9761_MULTI_CHAN, 0x3c88, val);
ac97             3163 sound/pci/ac97/ac97_patch.c 	struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
ac97             3165 sound/pci/ac97/ac97_patch.c 	if (ac97->regs[AC97_CM9761_FUNC] & 0x1)
ac97             3167 sound/pci/ac97/ac97_patch.c 	else if (ac97->regs[AC97_CM9761_SPDIF_CTRL] & 0x2)
ac97             3176 sound/pci/ac97/ac97_patch.c 	struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
ac97             3179 sound/pci/ac97/ac97_patch.c 		return snd_ac97_update_bits(ac97, AC97_CM9761_FUNC, 0x1, 0x1);
ac97             3180 sound/pci/ac97/ac97_patch.c 	snd_ac97_update_bits(ac97, AC97_CM9761_FUNC, 0x1, 0);
ac97             3181 sound/pci/ac97/ac97_patch.c 	return snd_ac97_update_bits(ac97, AC97_CM9761_SPDIF_CTRL, 0x2,
ac97             3209 sound/pci/ac97/ac97_patch.c static int patch_cm9761_post_spdif(struct snd_ac97 * ac97)
ac97             3211 sound/pci/ac97/ac97_patch.c 	return patch_build_controls(ac97, snd_ac97_cm9761_controls_spdif, ARRAY_SIZE(snd_ac97_cm9761_controls_spdif));
ac97             3214 sound/pci/ac97/ac97_patch.c static int patch_cm9761_specific(struct snd_ac97 * ac97)
ac97             3216 sound/pci/ac97/ac97_patch.c 	return patch_build_controls(ac97, snd_ac97_cm9761_controls, ARRAY_SIZE(snd_ac97_cm9761_controls));
ac97             3225 sound/pci/ac97/ac97_patch.c static int patch_cm9761(struct snd_ac97 *ac97)
ac97             3233 sound/pci/ac97/ac97_patch.c 	ac97->flags |= /*AC97_HAS_NO_MASTER_VOL |*/ AC97_HAS_NO_PCM_VOL;
ac97             3234 sound/pci/ac97/ac97_patch.c 	snd_ac97_write_cache(ac97, AC97_MASTER, 0x8808);
ac97             3235 sound/pci/ac97/ac97_patch.c 	snd_ac97_write_cache(ac97, AC97_PCM, 0x8808);
ac97             3237 sound/pci/ac97/ac97_patch.c 	ac97->spec.dev_flags = 0; /* 1 = model 82 revision B, 2 = model 83 */
ac97             3238 sound/pci/ac97/ac97_patch.c 	if (ac97->id == AC97_ID_CM9761_82) {
ac97             3241 sound/pci/ac97/ac97_patch.c 		val = snd_ac97_read(ac97, AC97_INT_PAGING);
ac97             3242 sound/pci/ac97/ac97_patch.c 		snd_ac97_write_cache(ac97, AC97_INT_PAGING, (val & ~0x0f) | 0x01);
ac97             3243 sound/pci/ac97/ac97_patch.c 		tmp = snd_ac97_read(ac97, 0x60);
ac97             3244 sound/pci/ac97/ac97_patch.c 		ac97->spec.dev_flags = tmp & 1; /* revision B? */
ac97             3245 sound/pci/ac97/ac97_patch.c 		snd_ac97_write_cache(ac97, AC97_INT_PAGING, val);
ac97             3246 sound/pci/ac97/ac97_patch.c 	} else if (ac97->id == AC97_ID_CM9761_83)
ac97             3247 sound/pci/ac97/ac97_patch.c 		ac97->spec.dev_flags = 2;
ac97             3249 sound/pci/ac97/ac97_patch.c 	ac97->build_ops = &patch_cm9761_ops;
ac97             3253 sound/pci/ac97/ac97_patch.c         ac97->ext_id |= AC97_EI_SPDIF;
ac97             3255 sound/pci/ac97/ac97_patch.c 	snd_ac97_write_cache(ac97, AC97_EXTENDED_STATUS, 0x05c0);
ac97             3257 sound/pci/ac97/ac97_patch.c 	snd_ac97_write_cache(ac97, AC97_CM9761_SPDIF_CTRL, 0x0001); /* enable spdif-in */
ac97             3258 sound/pci/ac97/ac97_patch.c 	ac97->rates[AC97_RATES_SPDIF] = SNDRV_PCM_RATE_48000; /* 48k only */
ac97             3279 sound/pci/ac97/ac97_patch.c 	if (ac97->spec.dev_flags)
ac97             3284 sound/pci/ac97/ac97_patch.c 	val = snd_ac97_read(ac97, AC97_CM9761_MULTI_CHAN);
ac97             3286 sound/pci/ac97/ac97_patch.c 	snd_ac97_write_cache(ac97, AC97_CM9761_MULTI_CHAN, val);
ac97             3289 sound/pci/ac97/ac97_patch.c 	snd_ac97_write_cache(ac97, 0x70, 0x0100);
ac97             3290 sound/pci/ac97/ac97_patch.c 	snd_ac97_write_cache(ac97, 0x72, 0x0020);
ac97             3312 sound/pci/ac97/ac97_patch.c static int patch_cm9780_specific(struct snd_ac97 *ac97)
ac97             3314 sound/pci/ac97/ac97_patch.c 	return patch_build_controls(ac97, cm9780_controls, ARRAY_SIZE(cm9780_controls));
ac97             3322 sound/pci/ac97/ac97_patch.c static int patch_cm9780(struct snd_ac97 *ac97)
ac97             3326 sound/pci/ac97/ac97_patch.c 	ac97->build_ops = &patch_cm9780_ops;
ac97             3329 sound/pci/ac97/ac97_patch.c 	if (ac97->ext_id & AC97_EI_SPDIF) {
ac97             3330 sound/pci/ac97/ac97_patch.c 		ac97->rates[AC97_RATES_SPDIF] = SNDRV_PCM_RATE_48000; /* 48k only */
ac97             3331 sound/pci/ac97/ac97_patch.c 		val = snd_ac97_read(ac97, AC97_CM9780_SPDIF);
ac97             3333 sound/pci/ac97/ac97_patch.c 		snd_ac97_write_cache(ac97, AC97_CM9780_SPDIF, val);
ac97             3346 sound/pci/ac97/ac97_patch.c static int patch_vt1613_specific(struct snd_ac97 *ac97)
ac97             3348 sound/pci/ac97/ac97_patch.c 	return patch_build_controls(ac97, &snd_ac97_controls_vt1613[0],
ac97             3356 sound/pci/ac97/ac97_patch.c static int patch_vt1613(struct snd_ac97 *ac97)
ac97             3358 sound/pci/ac97/ac97_patch.c 	ac97->build_ops = &patch_vt1613_ops;
ac97             3360 sound/pci/ac97/ac97_patch.c 	ac97->flags |= AC97_HAS_NO_VIDEO;
ac97             3361 sound/pci/ac97/ac97_patch.c 	ac97->caps |= AC97_BC_HEADPHONE;
ac97             3393 sound/pci/ac97/ac97_patch.c static struct snd_kcontrol *snd_ac97_find_mixer_ctl(struct snd_ac97 *ac97,
ac97             3400 sound/pci/ac97/ac97_patch.c 	return snd_ctl_find_id(ac97->bus->card, &id);
ac97             3404 sound/pci/ac97/ac97_patch.c static int snd_ac97_add_vmaster(struct snd_ac97 *ac97, char *name,
ac97             3415 sound/pci/ac97/ac97_patch.c 	err = snd_ctl_add(ac97->bus->card, kctl);
ac97             3422 sound/pci/ac97/ac97_patch.c 		sctl = snd_ac97_find_mixer_ctl(ac97, *s);
ac97             3424 sound/pci/ac97/ac97_patch.c 			dev_dbg(ac97->bus->card->dev,
ac97             3435 sound/pci/ac97/ac97_patch.c static int patch_vt1616_specific(struct snd_ac97 * ac97)
ac97             3440 sound/pci/ac97/ac97_patch.c 	if (snd_ac97_try_bit(ac97, 0x5a, 9))
ac97             3441 sound/pci/ac97/ac97_patch.c 		if ((err = patch_build_controls(ac97, &snd_ac97_controls_vt1616[0], 1)) < 0)
ac97             3443 sound/pci/ac97/ac97_patch.c 	if ((err = patch_build_controls(ac97, &snd_ac97_controls_vt1616[1], ARRAY_SIZE(snd_ac97_controls_vt1616) - 1)) < 0)
ac97             3447 sound/pci/ac97/ac97_patch.c 	kctl = snd_ac97_find_mixer_ctl(ac97, "Master Playback Volume");
ac97             3451 sound/pci/ac97/ac97_patch.c 	snd_ac97_rename_vol_ctl(ac97, "Master Playback", "Front Playback");
ac97             3453 sound/pci/ac97/ac97_patch.c 	err = snd_ac97_add_vmaster(ac97, "Master Playback Volume",
ac97             3458 sound/pci/ac97/ac97_patch.c 	err = snd_ac97_add_vmaster(ac97, "Master Playback Switch",
ac97             3470 sound/pci/ac97/ac97_patch.c static int patch_vt1616(struct snd_ac97 * ac97)
ac97             3472 sound/pci/ac97/ac97_patch.c 	ac97->build_ops = &patch_vt1616_ops;
ac97             3566 sound/pci/ac97/ac97_patch.c static int patch_vt1617a(struct snd_ac97 * ac97)
ac97             3574 sound/pci/ac97/ac97_patch.c 	err = patch_build_controls(ac97, &snd_ac97_controls_vt1617a[0],
ac97             3583 sound/pci/ac97/ac97_patch.c 	val = snd_ac97_read(ac97, 0x5c);
ac97             3585 sound/pci/ac97/ac97_patch.c 		snd_ac97_write_cache(ac97, 0x5c, 0x20);
ac97             3587 sound/pci/ac97/ac97_patch.c 	ac97->ext_id |= AC97_EI_SPDIF;	/* force the detection of spdif */
ac97             3588 sound/pci/ac97/ac97_patch.c 	ac97->rates[AC97_RATES_SPDIF] = SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000;
ac97             3589 sound/pci/ac97/ac97_patch.c 	ac97->build_ops = &patch_vt1616_ops;
ac97             3781 sound/pci/ac97/ac97_patch.c static int patch_vt1618(struct snd_ac97 *ac97)
ac97             3783 sound/pci/ac97/ac97_patch.c 	return patch_build_controls(ac97, snd_ac97_controls_vt1618,
ac97             3789 sound/pci/ac97/ac97_patch.c static void it2646_update_jacks(struct snd_ac97 *ac97)
ac97             3792 sound/pci/ac97/ac97_patch.c 	snd_ac97_update_bits(ac97, 0x76, 1 << 9,
ac97             3793 sound/pci/ac97/ac97_patch.c 			     is_shared_surrout(ac97) ? (1<<9) : 0);
ac97             3795 sound/pci/ac97/ac97_patch.c 	snd_ac97_update_bits(ac97, 0x76, 1 << 10,
ac97             3796 sound/pci/ac97/ac97_patch.c 			     is_shared_clfeout(ac97) ? (1<<10) : 0);
ac97             3810 sound/pci/ac97/ac97_patch.c static int patch_it2646_specific(struct snd_ac97 * ac97)
ac97             3813 sound/pci/ac97/ac97_patch.c 	if ((err = patch_build_controls(ac97, snd_ac97_controls_it2646, ARRAY_SIZE(snd_ac97_controls_it2646))) < 0)
ac97             3815 sound/pci/ac97/ac97_patch.c 	if ((err = patch_build_controls(ac97, snd_ac97_spdif_controls_it2646, ARRAY_SIZE(snd_ac97_spdif_controls_it2646))) < 0)
ac97             3825 sound/pci/ac97/ac97_patch.c static int patch_it2646(struct snd_ac97 * ac97)
ac97             3827 sound/pci/ac97/ac97_patch.c 	ac97->build_ops = &patch_it2646_ops;
ac97             3829 sound/pci/ac97/ac97_patch.c 	snd_ac97_write_cache(ac97, 0x5E, 0x0808);
ac97             3830 sound/pci/ac97/ac97_patch.c 	snd_ac97_write_cache(ac97, 0x7A, 0x0808);
ac97             3845 sound/pci/ac97/ac97_patch.c static int patch_si3036_specific(struct snd_ac97 * ac97)
ac97             3849 sound/pci/ac97/ac97_patch.c 		if ((err = snd_ctl_add(ac97->bus->card, snd_ctl_new1(&snd_ac97_controls_si3036[idx], ac97))) < 0)
ac97             3858 sound/pci/ac97/ac97_patch.c static int mpatch_si3036(struct snd_ac97 * ac97)
ac97             3860 sound/pci/ac97/ac97_patch.c 	ac97->build_ops = &patch_si3036_ops;
ac97             3861 sound/pci/ac97/ac97_patch.c 	snd_ac97_write_cache(ac97, 0x5c, 0xf210 );
ac97             3862 sound/pci/ac97/ac97_patch.c 	snd_ac97_write_cache(ac97, 0x68, 0);
ac97             3890 sound/pci/ac97/ac97_patch.c static int patch_lm4550(struct snd_ac97 *ac97)
ac97             3892 sound/pci/ac97/ac97_patch.c 	ac97->res_table = lm4550_restbl;
ac97             3912 sound/pci/ac97/ac97_patch.c static int patch_ucb1400_specific(struct snd_ac97 * ac97)
ac97             3916 sound/pci/ac97/ac97_patch.c 		if ((err = snd_ctl_add(ac97->bus->card, snd_ctl_new1(&snd_ac97_controls_ucb1400[idx], ac97))) < 0)
ac97             3925 sound/pci/ac97/ac97_patch.c static int patch_ucb1400(struct snd_ac97 * ac97)
ac97             3927 sound/pci/ac97/ac97_patch.c 	ac97->build_ops = &patch_ucb1400_ops;
ac97             3929 sound/pci/ac97/ac97_patch.c 	snd_ac97_write_cache(ac97, 0x6a, 0x0050);
ac97             3930 sound/pci/ac97/ac97_patch.c 	snd_ac97_write_cache(ac97, 0x6c, 0x0030);
ac97               55 sound/pci/ac97/ac97_patch.h 					  struct snd_ac97 * ac97);
ac97               62 sound/pci/ac97/ac97_patch.h static int snd_ac97_try_bit(struct snd_ac97 * ac97, int reg, int bit);
ac97               63 sound/pci/ac97/ac97_patch.h static int snd_ac97_remove_ctl(struct snd_ac97 *ac97, const char *name,
ac97               65 sound/pci/ac97/ac97_patch.h static int snd_ac97_rename_ctl(struct snd_ac97 *ac97, const char *src,
ac97               67 sound/pci/ac97/ac97_patch.h static int snd_ac97_swap_ctl(struct snd_ac97 *ac97, const char *s1,
ac97               69 sound/pci/ac97/ac97_patch.h static void snd_ac97_rename_vol_ctl(struct snd_ac97 *ac97, const char *src,
ac97               72 sound/pci/ac97/ac97_patch.h static void snd_ac97_restore_status(struct snd_ac97 *ac97);
ac97               73 sound/pci/ac97/ac97_patch.h static void snd_ac97_restore_iec958(struct snd_ac97 *ac97);
ac97              159 sound/pci/ac97/ac97_pcm.c static int set_spdif_rate(struct snd_ac97 *ac97, unsigned short rate)
ac97              164 sound/pci/ac97/ac97_pcm.c 	if (! (ac97->ext_id & AC97_EI_SPDIF))
ac97              168 sound/pci/ac97/ac97_pcm.c 	if (ac97->flags & AC97_CS_SPDIF) {
ac97              173 sound/pci/ac97/ac97_pcm.c 			snd_ac97_update_bits(ac97, AC97_EXTENDED_STATUS, AC97_EA_SPDIF, 0);
ac97              179 sound/pci/ac97/ac97_pcm.c 		if (ac97->id == AC97_ID_CM9739 && rate != 48000) {
ac97              180 sound/pci/ac97/ac97_pcm.c 			snd_ac97_update_bits(ac97, AC97_EXTENDED_STATUS, AC97_EA_SPDIF, 0);
ac97              188 sound/pci/ac97/ac97_pcm.c 			snd_ac97_update_bits(ac97, AC97_EXTENDED_STATUS, AC97_EA_SPDIF, 0);
ac97              195 sound/pci/ac97/ac97_pcm.c 	mutex_lock(&ac97->reg_mutex);
ac97              196 sound/pci/ac97/ac97_pcm.c 	old = snd_ac97_read(ac97, reg) & mask;
ac97              198 sound/pci/ac97/ac97_pcm.c 		snd_ac97_update_bits_nolock(ac97, AC97_EXTENDED_STATUS, AC97_EA_SPDIF, 0);
ac97              199 sound/pci/ac97/ac97_pcm.c 		snd_ac97_update_bits_nolock(ac97, reg, mask, bits);
ac97              201 sound/pci/ac97/ac97_pcm.c 		sbits = ac97->spdif_status;
ac97              217 sound/pci/ac97/ac97_pcm.c 		ac97->spdif_status = sbits;
ac97              219 sound/pci/ac97/ac97_pcm.c 	snd_ac97_update_bits_nolock(ac97, AC97_EXTENDED_STATUS, AC97_EA_SPDIF, AC97_EA_SPDIF);
ac97              220 sound/pci/ac97/ac97_pcm.c 	mutex_unlock(&ac97->reg_mutex);
ac97              243 sound/pci/ac97/ac97_pcm.c int snd_ac97_set_rate(struct snd_ac97 *ac97, int reg, unsigned int rate)
ac97              250 sound/pci/ac97/ac97_pcm.c 		if (!(ac97->flags & AC97_DOUBLE_RATE))
ac97              256 sound/pci/ac97/ac97_pcm.c 	snd_ac97_update_power(ac97, reg, 1);
ac97              259 sound/pci/ac97/ac97_pcm.c 		if ((ac97->regs[AC97_EXTENDED_STATUS] & AC97_EA_VRM) == 0)	/* MIC VRA */
ac97              265 sound/pci/ac97/ac97_pcm.c 		if ((ac97->regs[AC97_EXTENDED_STATUS] & AC97_EA_VRA) == 0)	/* VRA */
ac97              270 sound/pci/ac97/ac97_pcm.c 		if (! (ac97->scaps & AC97_SCAP_SURROUND_DAC))
ac97              274 sound/pci/ac97/ac97_pcm.c 		if (! (ac97->scaps & AC97_SCAP_CENTER_LFE_DAC))
ac97              279 sound/pci/ac97/ac97_pcm.c 		return set_spdif_rate(ac97, rate);
ac97              285 sound/pci/ac97/ac97_pcm.c 	tmp = (rate * ac97->bus->clock) / 48000;
ac97              288 sound/pci/ac97/ac97_pcm.c 	if ((ac97->ext_id & AC97_EI_DRA) && reg == AC97_PCM_FRONT_DAC_RATE)
ac97              289 sound/pci/ac97/ac97_pcm.c 		snd_ac97_update_bits(ac97, AC97_EXTENDED_STATUS,
ac97              291 sound/pci/ac97/ac97_pcm.c 	snd_ac97_update(ac97, reg, tmp & 0xffff);
ac97              292 sound/pci/ac97/ac97_pcm.c 	snd_ac97_read(ac97, reg);
ac97              293 sound/pci/ac97/ac97_pcm.c 	if ((ac97->ext_id & AC97_EI_DRA) && reg == AC97_PCM_FRONT_DAC_RATE) {
ac97              297 sound/pci/ac97/ac97_pcm.c 		snd_ac97_update_bits(ac97, AC97_GENERAL_PURPOSE,
ac97              300 sound/pci/ac97/ac97_pcm.c 		snd_ac97_read(ac97, AC97_GENERAL_PURPOSE);
ac97              307 sound/pci/ac97/ac97_pcm.c static unsigned short get_pslots(struct snd_ac97 *ac97, unsigned char *rate_table, unsigned short *spdif_slots)
ac97              309 sound/pci/ac97/ac97_pcm.c 	if (!ac97_is_audio(ac97))
ac97              311 sound/pci/ac97/ac97_pcm.c 	if (ac97_is_rev22(ac97) || ac97_can_amap(ac97)) {
ac97              313 sound/pci/ac97/ac97_pcm.c 		if (ac97_is_rev22(ac97)) {
ac97              316 sound/pci/ac97/ac97_pcm.c 			es = ac97->regs[AC97_EXTENDED_ID] &= ~AC97_EI_DACS_SLOT_MASK;
ac97              317 sound/pci/ac97/ac97_pcm.c 			switch (ac97->addr) {
ac97              322 sound/pci/ac97/ac97_pcm.c 			snd_ac97_write_cache(ac97, AC97_EXTENDED_ID, es);
ac97              324 sound/pci/ac97/ac97_pcm.c 		switch (ac97->addr) {
ac97              327 sound/pci/ac97/ac97_pcm.c 			if (ac97->scaps & AC97_SCAP_SURROUND_DAC)
ac97              329 sound/pci/ac97/ac97_pcm.c 			if (ac97->scaps & AC97_SCAP_CENTER_LFE_DAC)
ac97              331 sound/pci/ac97/ac97_pcm.c 			if (ac97->ext_id & AC97_EI_SPDIF) {
ac97              332 sound/pci/ac97/ac97_pcm.c 				if (!(ac97->scaps & AC97_SCAP_SURROUND_DAC))
ac97              334 sound/pci/ac97/ac97_pcm.c 				else if (!(ac97->scaps & AC97_SCAP_CENTER_LFE_DAC))
ac97              344 sound/pci/ac97/ac97_pcm.c 			if (ac97->scaps & AC97_SCAP_SURROUND_DAC)
ac97              346 sound/pci/ac97/ac97_pcm.c 			if (ac97->ext_id & AC97_EI_SPDIF) {
ac97              347 sound/pci/ac97/ac97_pcm.c 				if (!(ac97->scaps & AC97_SCAP_SURROUND_DAC))
ac97              356 sound/pci/ac97/ac97_pcm.c 			if (ac97->ext_id & AC97_EI_SPDIF)
ac97              365 sound/pci/ac97/ac97_pcm.c 		if (ac97->scaps & AC97_SCAP_SURROUND_DAC)
ac97              367 sound/pci/ac97/ac97_pcm.c 		if (ac97->scaps & AC97_SCAP_CENTER_LFE_DAC)
ac97              369 sound/pci/ac97/ac97_pcm.c 		if (ac97->ext_id & AC97_EI_SPDIF) {
ac97              370 sound/pci/ac97/ac97_pcm.c 			if (!(ac97->scaps & AC97_SCAP_SURROUND_DAC))
ac97              372 sound/pci/ac97/ac97_pcm.c 			else if (!(ac97->scaps & AC97_SCAP_CENTER_LFE_DAC))
ac97              382 sound/pci/ac97/ac97_pcm.c static unsigned short get_cslots(struct snd_ac97 *ac97)
ac97              386 sound/pci/ac97/ac97_pcm.c 	if (!ac97_is_audio(ac97))
ac97               22 sound/pci/ac97/ac97_proc.c static void snd_ac97_proc_read_functions(struct snd_ac97 *ac97, struct snd_info_buffer *buffer)
ac97               37 sound/pci/ac97/ac97_proc.c 		snd_ac97_write(ac97, AC97_FUNC_SELECT, function << 1);
ac97               38 sound/pci/ac97/ac97_proc.c 		info = snd_ac97_read(ac97, AC97_FUNC_INFO);
ac97               45 sound/pci/ac97/ac97_proc.c 		sense_info = snd_ac97_read(ac97, AC97_SENSE_INFO);
ac97               92 sound/pci/ac97/ac97_proc.c static void snd_ac97_proc_read_main(struct snd_ac97 *ac97, struct snd_info_buffer *buffer, int subidx)
ac97              101 sound/pci/ac97/ac97_proc.c 	snd_ac97_get_name(NULL, ac97->id, name, 0);
ac97              102 sound/pci/ac97/ac97_proc.c 	snd_iprintf(buffer, "%d-%d/%d: %s\n\n", ac97->addr, ac97->num, subidx, name);
ac97              104 sound/pci/ac97/ac97_proc.c 	if ((ac97->scaps & AC97_SCAP_AUDIO) == 0)
ac97              108 sound/pci/ac97/ac97_proc.c 	            ac97->subsystem_vendor);
ac97              110 sound/pci/ac97/ac97_proc.c                     ac97->subsystem_device);
ac97              112 sound/pci/ac97/ac97_proc.c 	snd_iprintf(buffer, "Flags: %x\n", ac97->flags);
ac97              114 sound/pci/ac97/ac97_proc.c 	if ((ac97->ext_id & AC97_EI_REV_MASK) >= AC97_EI_REV_23) {
ac97              115 sound/pci/ac97/ac97_proc.c 		val = snd_ac97_read(ac97, AC97_INT_PAGING);
ac97              116 sound/pci/ac97/ac97_proc.c 		snd_ac97_update_bits(ac97, AC97_INT_PAGING,
ac97              118 sound/pci/ac97/ac97_proc.c 		tmp = snd_ac97_read(ac97, AC97_CODEC_CLASS_REV);
ac97              122 sound/pci/ac97/ac97_proc.c 			    snd_ac97_read(ac97, AC97_PCI_SVID));
ac97              124 sound/pci/ac97/ac97_proc.c 			    snd_ac97_read(ac97, AC97_PCI_SID));
ac97              125 sound/pci/ac97/ac97_proc.c 		snd_ac97_update_bits(ac97, AC97_INT_PAGING,
ac97              130 sound/pci/ac97/ac97_proc.c 	val = ac97->caps;
ac97              138 sound/pci/ac97/ac97_proc.c 	tmp = ac97->caps & AC97_BC_DAC_MASK;
ac97              144 sound/pci/ac97/ac97_proc.c 	tmp = ac97->caps & AC97_BC_ADC_MASK;
ac97              153 sound/pci/ac97/ac97_proc.c 	val = snd_ac97_read(ac97, AC97_MIC);
ac97              154 sound/pci/ac97/ac97_proc.c 	snd_iprintf(buffer, "Mic gain         : %s [%s]\n", val & 0x0040 ? "+20dB" : "+0dB", ac97->regs[AC97_MIC] & 0x0040 ? "+20dB" : "+0dB");
ac97              155 sound/pci/ac97/ac97_proc.c 	val = snd_ac97_read(ac97, AC97_GENERAL_PURPOSE);
ac97              170 sound/pci/ac97/ac97_proc.c 	if (ac97->ext_id & AC97_EI_DRA)
ac97              174 sound/pci/ac97/ac97_proc.c 	ext = snd_ac97_read(ac97, AC97_EXTENDED_ID);
ac97              190 sound/pci/ac97/ac97_proc.c 	val = snd_ac97_read(ac97, AC97_EXTENDED_STATUS);
ac97              207 sound/pci/ac97/ac97_proc.c 		val = snd_ac97_read(ac97, AC97_PCM_FRONT_DAC_RATE);
ac97              210 sound/pci/ac97/ac97_proc.c 			val = snd_ac97_read(ac97, AC97_PCM_SURR_DAC_RATE);
ac97              214 sound/pci/ac97/ac97_proc.c 			val = snd_ac97_read(ac97, AC97_PCM_LFE_DAC_RATE);
ac97              217 sound/pci/ac97/ac97_proc.c 		val = snd_ac97_read(ac97, AC97_PCM_LR_ADC_RATE);
ac97              221 sound/pci/ac97/ac97_proc.c 		val = snd_ac97_read(ac97, AC97_PCM_MIC_ADC_RATE);
ac97              224 sound/pci/ac97/ac97_proc.c 	if ((ext & AC97_EI_SPDIF) || (ac97->flags & AC97_CS_SPDIF) ||
ac97              225 sound/pci/ac97/ac97_proc.c 	    (ac97->id == AC97_ID_YMF743)) {
ac97              226 sound/pci/ac97/ac97_proc.c 	        if (ac97->flags & AC97_CS_SPDIF)
ac97              227 sound/pci/ac97/ac97_proc.c 			val = snd_ac97_read(ac97, AC97_CSR_SPDIF);
ac97              228 sound/pci/ac97/ac97_proc.c 		else if (ac97->id == AC97_ID_YMF743) {
ac97              229 sound/pci/ac97/ac97_proc.c 			val = snd_ac97_read(ac97, AC97_YMF7X3_DIT_CTRL);
ac97              232 sound/pci/ac97/ac97_proc.c 			val = snd_ac97_read(ac97, AC97_SPDIF);
ac97              241 sound/pci/ac97/ac97_proc.c 			(ac97->flags & AC97_CS_SPDIF) ?
ac97              244 sound/pci/ac97/ac97_proc.c 			(ac97->flags & AC97_CS_SPDIF) ?
ac97              247 sound/pci/ac97/ac97_proc.c 			(ac97->flags & AC97_CS_SPDIF) ?
ac97              251 sound/pci/ac97/ac97_proc.c 		if ((ac97->id & 0xfffffff0) == 0x414c4720 &&
ac97              252 sound/pci/ac97/ac97_proc.c 		    (snd_ac97_read(ac97, AC97_ALC650_CLOCK) & 0x01)) {
ac97              253 sound/pci/ac97/ac97_proc.c 			val = snd_ac97_read(ac97, AC97_ALC650_SPDIF_INPUT_STATUS2);
ac97              255 sound/pci/ac97/ac97_proc.c 				val = snd_ac97_read(ac97, AC97_ALC650_SPDIF_INPUT_STATUS1);
ac97              263 sound/pci/ac97/ac97_proc.c 				val = snd_ac97_read(ac97, AC97_ALC650_SPDIF_INPUT_STATUS2);
ac97              274 sound/pci/ac97/ac97_proc.c 	if ((ac97->ext_id & AC97_EI_REV_MASK) >= AC97_EI_REV_23) {
ac97              275 sound/pci/ac97/ac97_proc.c 		val = snd_ac97_read(ac97, AC97_INT_PAGING);
ac97              276 sound/pci/ac97/ac97_proc.c 		snd_ac97_update_bits(ac97, AC97_INT_PAGING,
ac97              278 sound/pci/ac97/ac97_proc.c 		snd_ac97_proc_read_functions(ac97, buffer);
ac97              279 sound/pci/ac97/ac97_proc.c 		snd_ac97_update_bits(ac97, AC97_INT_PAGING,
ac97              285 sound/pci/ac97/ac97_proc.c 	mext = snd_ac97_read(ac97, AC97_EXTENDED_MID);
ac97              296 sound/pci/ac97/ac97_proc.c 	val = snd_ac97_read(ac97, AC97_EXTENDED_MSTATUS);
ac97              315 sound/pci/ac97/ac97_proc.c 		val = snd_ac97_read(ac97, AC97_LINE1_RATE);
ac97              319 sound/pci/ac97/ac97_proc.c 		val = snd_ac97_read(ac97, AC97_LINE2_RATE);
ac97              323 sound/pci/ac97/ac97_proc.c 		val = snd_ac97_read(ac97, AC97_HANDSET_RATE);
ac97              330 sound/pci/ac97/ac97_proc.c 	struct snd_ac97 *ac97 = entry->private_data;
ac97              332 sound/pci/ac97/ac97_proc.c 	mutex_lock(&ac97->page_mutex);
ac97              333 sound/pci/ac97/ac97_proc.c 	if ((ac97->id & 0xffffff40) == AC97_ID_AD1881) {	// Analog Devices AD1881/85/86
ac97              336 sound/pci/ac97/ac97_proc.c 			if (ac97->spec.ad18xx.id[idx]) {
ac97              338 sound/pci/ac97/ac97_proc.c 				snd_ac97_update_bits(ac97, AC97_AD_SERIAL_CFG, 0x7000,
ac97              339 sound/pci/ac97/ac97_proc.c 						     ac97->spec.ad18xx.unchained[idx] | ac97->spec.ad18xx.chained[idx]);
ac97              340 sound/pci/ac97/ac97_proc.c 				snd_ac97_proc_read_main(ac97, buffer, idx);
ac97              344 sound/pci/ac97/ac97_proc.c 		snd_ac97_update_bits(ac97, AC97_AD_SERIAL_CFG, 0x7000, 0x7000);
ac97              348 sound/pci/ac97/ac97_proc.c 			ac97->spec.ad18xx.unchained[0],
ac97              349 sound/pci/ac97/ac97_proc.c 			ac97->spec.ad18xx.unchained[1],
ac97              350 sound/pci/ac97/ac97_proc.c 			ac97->spec.ad18xx.unchained[2]);
ac97              352 sound/pci/ac97/ac97_proc.c 			ac97->spec.ad18xx.chained[0],
ac97              353 sound/pci/ac97/ac97_proc.c 			ac97->spec.ad18xx.chained[1],
ac97              354 sound/pci/ac97/ac97_proc.c 			ac97->spec.ad18xx.chained[2]);
ac97              356 sound/pci/ac97/ac97_proc.c 		snd_ac97_proc_read_main(ac97, buffer, 0);
ac97              358 sound/pci/ac97/ac97_proc.c 	mutex_unlock(&ac97->page_mutex);
ac97              365 sound/pci/ac97/ac97_proc.c 	struct snd_ac97 *ac97 = entry->private_data;
ac97              368 sound/pci/ac97/ac97_proc.c 	mutex_lock(&ac97->page_mutex);
ac97              374 sound/pci/ac97/ac97_proc.c 			snd_ac97_write_cache(ac97, reg, val);
ac97              376 sound/pci/ac97/ac97_proc.c 	mutex_unlock(&ac97->page_mutex);
ac97              380 sound/pci/ac97/ac97_proc.c static void snd_ac97_proc_regs_read_main(struct snd_ac97 *ac97, struct snd_info_buffer *buffer, int subidx)
ac97              385 sound/pci/ac97/ac97_proc.c 		val = snd_ac97_read(ac97, reg);
ac97              393 sound/pci/ac97/ac97_proc.c 	struct snd_ac97 *ac97 = entry->private_data;
ac97              395 sound/pci/ac97/ac97_proc.c 	mutex_lock(&ac97->page_mutex);
ac97              396 sound/pci/ac97/ac97_proc.c 	if ((ac97->id & 0xffffff40) == AC97_ID_AD1881) {	// Analog Devices AD1881/85/86
ac97              400 sound/pci/ac97/ac97_proc.c 			if (ac97->spec.ad18xx.id[idx]) {
ac97              402 sound/pci/ac97/ac97_proc.c 				snd_ac97_update_bits(ac97, AC97_AD_SERIAL_CFG, 0x7000,
ac97              403 sound/pci/ac97/ac97_proc.c 						     ac97->spec.ad18xx.unchained[idx] | ac97->spec.ad18xx.chained[idx]);
ac97              404 sound/pci/ac97/ac97_proc.c 				snd_ac97_proc_regs_read_main(ac97, buffer, idx);
ac97              407 sound/pci/ac97/ac97_proc.c 		snd_ac97_update_bits(ac97, AC97_AD_SERIAL_CFG, 0x7000, 0x7000);
ac97              409 sound/pci/ac97/ac97_proc.c 		snd_ac97_proc_regs_read_main(ac97, buffer, 0);
ac97              411 sound/pci/ac97/ac97_proc.c 	mutex_unlock(&ac97->page_mutex);
ac97              414 sound/pci/ac97/ac97_proc.c void snd_ac97_proc_init(struct snd_ac97 * ac97)
ac97              420 sound/pci/ac97/ac97_proc.c 	if (ac97->bus->proc == NULL)
ac97              422 sound/pci/ac97/ac97_proc.c 	prefix = ac97_is_audio(ac97) ? "ac97" : "mc97";
ac97              423 sound/pci/ac97/ac97_proc.c 	sprintf(name, "%s#%d-%d", prefix, ac97->addr, ac97->num);
ac97              424 sound/pci/ac97/ac97_proc.c 	entry = snd_info_create_card_entry(ac97->bus->card, name,
ac97              425 sound/pci/ac97/ac97_proc.c 					   ac97->bus->proc);
ac97              427 sound/pci/ac97/ac97_proc.c 		snd_info_set_text_ops(entry, ac97, snd_ac97_proc_read);
ac97              428 sound/pci/ac97/ac97_proc.c 	ac97->proc = entry;
ac97              429 sound/pci/ac97/ac97_proc.c 	sprintf(name, "%s#%d-%d+regs", prefix, ac97->addr, ac97->num);
ac97              430 sound/pci/ac97/ac97_proc.c 	entry = snd_info_create_card_entry(ac97->bus->card, name,
ac97              431 sound/pci/ac97/ac97_proc.c 					   ac97->bus->proc);
ac97              433 sound/pci/ac97/ac97_proc.c 		snd_info_set_text_ops(entry, ac97, snd_ac97_proc_regs_read);
ac97              439 sound/pci/ac97/ac97_proc.c 	ac97->proc_regs = entry;
ac97              442 sound/pci/ac97/ac97_proc.c void snd_ac97_proc_done(struct snd_ac97 * ac97)
ac97              444 sound/pci/ac97/ac97_proc.c 	snd_info_free_entry(ac97->proc_regs);
ac97              445 sound/pci/ac97/ac97_proc.c 	ac97->proc_regs = NULL;
ac97              446 sound/pci/ac97/ac97_proc.c 	snd_info_free_entry(ac97->proc);
ac97              447 sound/pci/ac97/ac97_proc.c 	ac97->proc = NULL;
ac97               82 sound/pci/ad1889.c 	struct snd_ac97 *ac97;
ac97              229 sound/pci/ad1889.c snd_ad1889_ac97_read(struct snd_ac97 *ac97, unsigned short reg)
ac97              231 sound/pci/ad1889.c 	struct snd_ad1889 *chip = ac97->private_data;
ac97              236 sound/pci/ad1889.c snd_ad1889_ac97_write(struct snd_ac97 *ac97, unsigned short reg, unsigned short val)
ac97              238 sound/pci/ad1889.c 	struct snd_ad1889 *chip = ac97->private_data;
ac97              774 sound/pci/ad1889.c snd_ad1889_ac97_free(struct snd_ac97 *ac97)
ac97              776 sound/pci/ad1889.c 	struct snd_ad1889 *chip = ac97->private_data;
ac97              777 sound/pci/ad1889.c 	chip->ac97 = NULL;
ac97              784 sound/pci/ad1889.c 	struct snd_ac97_template ac97;
ac97              799 sound/pci/ad1889.c 	memset(&ac97, 0, sizeof(ac97));
ac97              800 sound/pci/ad1889.c 	ac97.private_data = chip;
ac97              801 sound/pci/ad1889.c 	ac97.private_free = snd_ad1889_ac97_free;
ac97              802 sound/pci/ad1889.c 	ac97.pci = chip->pci;
ac97              804 sound/pci/ad1889.c 	err = snd_ac97_mixer(chip->ac97_bus, &ac97, &chip->ac97);
ac97              808 sound/pci/ad1889.c 	snd_ac97_tune_hardware(chip->ac97, ac97_quirks, quirk_override);
ac97              240 sound/pci/ali5451/ali5451.c 	struct snd_ac97 *ac97[MAX_CODECS];
ac97              390 sound/pci/ali5451/ali5451.c static void snd_ali_codec_write(struct snd_ac97 *ac97,
ac97              394 sound/pci/ali5451/ali5451.c 	struct snd_ali *codec = ac97->private_data;
ac97              402 sound/pci/ali5451/ali5451.c 	snd_ali_codec_poke(codec, ac97->num, reg, val);
ac97              407 sound/pci/ali5451/ali5451.c static unsigned short snd_ali_codec_read(struct snd_ac97 *ac97,
ac97              410 sound/pci/ali5451/ali5451.c 	struct snd_ali *codec = ac97->private_data;
ac97              413 sound/pci/ali5451/ali5451.c 	return snd_ali_codec_peek(codec, ac97->num, reg);
ac97             1557 sound/pci/ali5451/ali5451.c 	snd_ac97_write(chip->ac97[modem_num], AC97_LINE1_RATE,
ac97             1559 sound/pci/ali5451/ali5451.c 	snd_ac97_write(chip->ac97[modem_num], AC97_LINE1_LEVEL, 0);
ac97             1819 sound/pci/ali5451/ali5451.c 	struct snd_ac97_template ac97;
ac97             1831 sound/pci/ali5451/ali5451.c 	memset(&ac97, 0, sizeof(ac97));
ac97             1832 sound/pci/ali5451/ali5451.c 	ac97.private_data = codec;
ac97             1835 sound/pci/ali5451/ali5451.c 		ac97.num = i;
ac97             1836 sound/pci/ali5451/ali5451.c 		err = snd_ac97_mixer(codec->ac97_bus, &ac97, &codec->ac97[i]);
ac97             1872 sound/pci/ali5451/ali5451.c 		snd_ac97_suspend(chip->ac97[i]);
ac97             1936 sound/pci/ali5451/ali5451.c 		snd_ac97_resume(chip->ac97[i]);
ac97              112 sound/pci/als300.c 	struct snd_ac97 *ac97;
ac97              257 sound/pci/als300.c static unsigned short snd_als300_ac97_read(struct snd_ac97 *ac97,
ac97              261 sound/pci/als300.c 	struct snd_als300 *chip = ac97->private_data;
ac97              278 sound/pci/als300.c static void snd_als300_ac97_write(struct snd_ac97 *ac97,
ac97              282 sound/pci/als300.c 	struct snd_als300 *chip = ac97->private_data;
ac97              295 sound/pci/als300.c 	struct snd_ac97_template ac97;
ac97              305 sound/pci/als300.c 	memset(&ac97, 0, sizeof(ac97));
ac97              306 sound/pci/als300.c 	ac97.private_data = chip;
ac97              308 sound/pci/als300.c 	return snd_ac97_mixer(bus, &ac97, &chip->ac97);
ac97              721 sound/pci/als300.c 	snd_ac97_suspend(chip->ac97);
ac97              731 sound/pci/als300.c 	snd_ac97_resume(chip->ac97);
ac97              256 sound/pci/atiixp.c 	struct snd_ac97 *ac97[NUM_ATI_CODECS];
ac97              471 sound/pci/atiixp.c static unsigned short snd_atiixp_ac97_read(struct snd_ac97 *ac97,
ac97              474 sound/pci/atiixp.c 	struct atiixp *chip = ac97->private_data;
ac97              475 sound/pci/atiixp.c 	return snd_atiixp_codec_read(chip, ac97->num, reg);
ac97              479 sound/pci/atiixp.c static void snd_atiixp_ac97_write(struct snd_ac97 *ac97, unsigned short reg,
ac97              482 sound/pci/atiixp.c 	struct atiixp *chip = ac97->private_data;
ac97              483 sound/pci/atiixp.c 	snd_atiixp_codec_write(chip, ac97->num, reg, val);
ac97             1296 sound/pci/atiixp.c 	chip->ac97[0]->chmaps[SNDRV_PCM_STREAM_PLAYBACK] = chmap;
ac97             1325 sound/pci/atiixp.c 		if (chip->ac97[i])
ac97             1326 sound/pci/atiixp.c 			snd_ac97_update_bits(chip->ac97[i],
ac97             1412 sound/pci/atiixp.c 	struct snd_ac97_template ac97;
ac97             1437 sound/pci/atiixp.c 		memset(&ac97, 0, sizeof(ac97));
ac97             1438 sound/pci/atiixp.c 		ac97.private_data = chip;
ac97             1439 sound/pci/atiixp.c 		ac97.pci = chip->pci;
ac97             1440 sound/pci/atiixp.c 		ac97.num = i;
ac97             1441 sound/pci/atiixp.c 		ac97.scaps = AC97_SCAP_SKIP_MODEM | AC97_SCAP_POWER_SAVE;
ac97             1443 sound/pci/atiixp.c 			ac97.scaps |= AC97_SCAP_NO_SPDIF;
ac97             1444 sound/pci/atiixp.c 		if ((err = snd_ac97_mixer(pbus, &ac97, &chip->ac97[i])) < 0) {
ac97             1445 sound/pci/atiixp.c 			chip->ac97[i] = NULL; /* to be sure */
ac97             1458 sound/pci/atiixp.c 	snd_ac97_tune_hardware(chip->ac97[0], ac97_quirks, quirk_override);
ac97             1476 sound/pci/atiixp.c 		snd_ac97_suspend(chip->ac97[i]);
ac97             1492 sound/pci/atiixp.c 		snd_ac97_resume(chip->ac97[i]);
ac97             1657 sound/pci/atiixp.c 		 chip->ac97[0] ? snd_ac97_get_short_name(chip->ac97[0]) : "?",
ac97              231 sound/pci/atiixp_modem.c 	struct snd_ac97 *ac97[NUM_ATI_CODECS];
ac97              442 sound/pci/atiixp_modem.c static unsigned short snd_atiixp_ac97_read(struct snd_ac97 *ac97,
ac97              445 sound/pci/atiixp_modem.c 	struct atiixp_modem *chip = ac97->private_data;
ac97              446 sound/pci/atiixp_modem.c 	return snd_atiixp_codec_read(chip, ac97->num, reg);
ac97              450 sound/pci/atiixp_modem.c static void snd_atiixp_ac97_write(struct snd_ac97 *ac97, unsigned short reg,
ac97              453 sound/pci/atiixp_modem.c 	struct atiixp_modem *chip = ac97->private_data;
ac97              459 sound/pci/atiixp_modem.c 	snd_atiixp_codec_write(chip, ac97->num, reg, val);
ac97              800 sound/pci/atiixp_modem.c 		if (! chip->ac97[i])
ac97              802 sound/pci/atiixp_modem.c 		snd_ac97_write(chip->ac97[i], AC97_LINE1_RATE, params_rate(hw_params));
ac97              803 sound/pci/atiixp_modem.c 		snd_ac97_write(chip->ac97[i], AC97_LINE1_LEVEL, 0);
ac97             1053 sound/pci/atiixp_modem.c 	struct snd_ac97_template ac97;
ac97             1078 sound/pci/atiixp_modem.c 		memset(&ac97, 0, sizeof(ac97));
ac97             1079 sound/pci/atiixp_modem.c 		ac97.private_data = chip;
ac97             1080 sound/pci/atiixp_modem.c 		ac97.pci = chip->pci;
ac97             1081 sound/pci/atiixp_modem.c 		ac97.num = i;
ac97             1082 sound/pci/atiixp_modem.c 		ac97.scaps = AC97_SCAP_SKIP_AUDIO | AC97_SCAP_POWER_SAVE;
ac97             1083 sound/pci/atiixp_modem.c 		if ((err = snd_ac97_mixer(pbus, &ac97, &chip->ac97[i])) < 0) {
ac97             1084 sound/pci/atiixp_modem.c 			chip->ac97[i] = NULL; /* to be sure */
ac97             1115 sound/pci/atiixp_modem.c 		snd_ac97_suspend(chip->ac97[i]);
ac97             1131 sound/pci/atiixp_modem.c 		snd_ac97_resume(chip->ac97[i]);
ac97               26 sound/pci/au88x0/au88x0_mixer.c 	struct snd_ac97_template ac97;
ac97               35 sound/pci/au88x0/au88x0_mixer.c 	memset(&ac97, 0, sizeof(ac97));
ac97               37 sound/pci/au88x0/au88x0_mixer.c 	ac97.private_data = vortex;
ac97               38 sound/pci/au88x0/au88x0_mixer.c 	ac97.scaps = AC97_SCAP_NO_SPDIF;
ac97               39 sound/pci/au88x0/au88x0_mixer.c 	err = snd_ac97_mixer(pbus, &ac97, &vortex->codec);
ac97              279 sound/pci/azt3328.c 	struct snd_ac97 *ac97;
ac97              651 sound/pci/azt3328.c snd_azf3328_mixer_ac97_read(struct snd_ac97 *ac97, unsigned short reg_ac97)
ac97              653 sound/pci/azt3328.c 	const struct snd_azf3328 *chip = ac97->private_data;
ac97              710 sound/pci/azt3328.c snd_azf3328_mixer_ac97_write(struct snd_ac97 *ac97,
ac97              713 sound/pci/azt3328.c 	const struct snd_azf3328 *chip = ac97->private_data;
ac97              759 sound/pci/azt3328.c 	struct snd_ac97_template ac97;
ac97              766 sound/pci/azt3328.c 	memset(&ac97, 0, sizeof(ac97));
ac97              767 sound/pci/azt3328.c 	ac97.scaps = AC97_SCAP_SKIP_MODEM
ac97              770 sound/pci/azt3328.c 	ac97.private_data = chip;
ac97              771 sound/pci/azt3328.c 	ac97.pci = chip->pci;
ac97              781 sound/pci/azt3328.c 		rc = snd_ac97_mixer(bus, &ac97, &chip->ac97);
ac97             2651 sound/pci/azt3328.c 	snd_ac97_suspend(chip->ac97);
ac97             2666 sound/pci/azt3328.c 	snd_ac97_resume(chip->ac97);
ac97              652 sound/pci/ca0106/ca0106.h 	int ac97;	/* ac97 = 0 -> Select MIC, Line in, TAD in, AUX in.
ac97              678 sound/pci/ca0106/ca0106.h 	struct snd_ac97 *ac97;
ac97              191 sound/pci/ca0106/ca0106_main.c 	   .ac97   = 1 } , 
ac97              195 sound/pci/ca0106/ca0106_main.c 	   .ac97   = 1 } ,
ac97             1185 sound/pci/ca0106/ca0106_main.c static unsigned short snd_ca0106_ac97_read(struct snd_ac97 *ac97,
ac97             1188 sound/pci/ca0106/ca0106_main.c 	struct snd_ca0106 *emu = ac97->private_data;
ac97             1199 sound/pci/ca0106/ca0106_main.c static void snd_ca0106_ac97_write(struct snd_ac97 *ac97,
ac97             1202 sound/pci/ca0106/ca0106_main.c 	struct snd_ca0106 *emu = ac97->private_data;
ac97             1214 sound/pci/ca0106/ca0106_main.c 	struct snd_ac97_template ac97;
ac97             1225 sound/pci/ca0106/ca0106_main.c 	memset(&ac97, 0, sizeof(ac97));
ac97             1226 sound/pci/ca0106/ca0106_main.c 	ac97.private_data = chip;
ac97             1227 sound/pci/ca0106/ca0106_main.c 	ac97.scaps = AC97_SCAP_NO_SPDIF;
ac97             1228 sound/pci/ca0106/ca0106_main.c 	return snd_ac97_mixer(pbus, &ac97, &chip->ac97);
ac97             1547 sound/pci/ca0106/ca0106_main.c 	} else if (chip->details->ac97 == 1) {
ac97             1852 sound/pci/ca0106/ca0106_main.c 	if (chip->details->ac97 == 1) {
ac97             1897 sound/pci/ca0106/ca0106_main.c 	if (chip->details->ac97)
ac97             1898 sound/pci/ca0106/ca0106_main.c 		snd_ac97_suspend(chip->ac97);
ac97             1913 sound/pci/ca0106/ca0106_main.c 	if (chip->details->ac97)
ac97             1914 sound/pci/ca0106/ca0106_main.c 		snd_ac97_resume(chip->ac97);
ac97              448 sound/pci/cs4281.c 	struct snd_ac97 *ac97;
ac97              510 sound/pci/cs4281.c static void snd_cs4281_ac97_write(struct snd_ac97 *ac97,
ac97              520 sound/pci/cs4281.c 	struct cs4281 *chip = ac97->private_data;
ac97              538 sound/pci/cs4281.c 				            BA0_ACCTL_ESYN | (ac97->num ? BA0_ACCTL_TC : 0));
ac97              556 sound/pci/cs4281.c static unsigned short snd_cs4281_ac97_read(struct snd_ac97 *ac97,
ac97              559 sound/pci/cs4281.c 	struct cs4281 *chip = ac97->private_data;
ac97              564 sound/pci/cs4281.c 	volatile int ac97_num = ((volatile struct snd_ac97 *)ac97)->num;
ac97             1070 sound/pci/cs4281.c static void snd_cs4281_mixer_free_ac97(struct snd_ac97 *ac97)
ac97             1072 sound/pci/cs4281.c 	struct cs4281 *chip = ac97->private_data;
ac97             1073 sound/pci/cs4281.c 	if (ac97->num)
ac97             1076 sound/pci/cs4281.c 		chip->ac97 = NULL;
ac97             1082 sound/pci/cs4281.c 	struct snd_ac97_template ac97;
ac97             1093 sound/pci/cs4281.c 	memset(&ac97, 0, sizeof(ac97));
ac97             1094 sound/pci/cs4281.c 	ac97.private_data = chip;
ac97             1095 sound/pci/cs4281.c 	ac97.private_free = snd_cs4281_mixer_free_ac97;
ac97             1096 sound/pci/cs4281.c 	if ((err = snd_ac97_mixer(chip->ac97_bus, &ac97, &chip->ac97)) < 0)
ac97             1099 sound/pci/cs4281.c 		ac97.num = 1;
ac97             1100 sound/pci/cs4281.c 		if ((err = snd_ac97_mixer(chip->ac97_bus, &ac97, &chip->ac97_secondary)) < 0)
ac97             1988 sound/pci/cs4281.c 	snd_ac97_suspend(chip->ac97);
ac97             2039 sound/pci/cs4281.c 	snd_ac97_resume(chip->ac97);
ac97             1670 sound/pci/cs46xx/cs46xx.h 	struct snd_ac97 *ac97[MAX_NR_AC97];
ac97              201 sound/pci/cs46xx/cs46xx_lib.c static unsigned short snd_cs46xx_ac97_read(struct snd_ac97 * ac97,
ac97              204 sound/pci/cs46xx/cs46xx_lib.c 	struct snd_cs46xx *chip = ac97->private_data;
ac97              206 sound/pci/cs46xx/cs46xx_lib.c 	int codec_index = ac97->num;
ac97              285 sound/pci/cs46xx/cs46xx_lib.c static void snd_cs46xx_ac97_write(struct snd_ac97 *ac97,
ac97              289 sound/pci/cs46xx/cs46xx_lib.c 	struct snd_cs46xx *chip = ac97->private_data;
ac97              290 sound/pci/cs46xx/cs46xx_lib.c 	int codec_index = ac97->num;
ac97             1874 sound/pci/cs46xx/cs46xx_lib.c static void snd_cs46xx_mixer_free_ac97(struct snd_ac97 *ac97)
ac97             1876 sound/pci/cs46xx/cs46xx_lib.c 	struct snd_cs46xx *chip = ac97->private_data;
ac97             1878 sound/pci/cs46xx/cs46xx_lib.c 	if (snd_BUG_ON(ac97 != chip->ac97[CS46XX_PRIMARY_CODEC_INDEX] &&
ac97             1879 sound/pci/cs46xx/cs46xx_lib.c 		       ac97 != chip->ac97[CS46XX_SECONDARY_CODEC_INDEX]))
ac97             1882 sound/pci/cs46xx/cs46xx_lib.c 	if (ac97 == chip->ac97[CS46XX_PRIMARY_CODEC_INDEX]) {
ac97             1883 sound/pci/cs46xx/cs46xx_lib.c 		chip->ac97[CS46XX_PRIMARY_CODEC_INDEX] = NULL;
ac97             1887 sound/pci/cs46xx/cs46xx_lib.c 		chip->ac97[CS46XX_SECONDARY_CODEC_INDEX] = NULL;
ac97             2348 sound/pci/cs46xx/cs46xx_lib.c 	val = snd_ac97_read(chip->ac97[CS46XX_PRIMARY_CODEC_INDEX], AC97_CSR_ACMODE);
ac97             2357 sound/pci/cs46xx/cs46xx_lib.c 	return snd_ac97_update_bits(chip->ac97[CS46XX_PRIMARY_CODEC_INDEX],
ac97             2384 sound/pci/cs46xx/cs46xx_lib.c static void snd_cs46xx_codec_reset (struct snd_ac97 * ac97)
ac97             2390 sound/pci/cs46xx/cs46xx_lib.c 	snd_ac97_write(ac97, AC97_RESET, 0);	
ac97             2393 sound/pci/cs46xx/cs46xx_lib.c 	if (ac97->num == CS46XX_PRIMARY_CODEC_INDEX) {
ac97             2394 sound/pci/cs46xx/cs46xx_lib.c 		dev_dbg(ac97->bus->card->dev, "CODEC1 mode %04x\n", 0x0);
ac97             2395 sound/pci/cs46xx/cs46xx_lib.c 		snd_cs46xx_ac97_write(ac97, AC97_CSR_ACMODE, 0x0);
ac97             2396 sound/pci/cs46xx/cs46xx_lib.c 	} else if (ac97->num == CS46XX_SECONDARY_CODEC_INDEX) {
ac97             2397 sound/pci/cs46xx/cs46xx_lib.c 		dev_dbg(ac97->bus->card->dev, "CODEC2 mode %04x\n", 0x3);
ac97             2398 sound/pci/cs46xx/cs46xx_lib.c 		snd_cs46xx_ac97_write(ac97, AC97_CSR_ACMODE, 0x3);
ac97             2413 sound/pci/cs46xx/cs46xx_lib.c 		snd_ac97_read(ac97, AC97_RESET);
ac97             2414 sound/pci/cs46xx/cs46xx_lib.c 		snd_ac97_read(ac97, AC97_VENDOR_ID1);
ac97             2415 sound/pci/cs46xx/cs46xx_lib.c 		snd_ac97_read(ac97, AC97_VENDOR_ID2);
ac97             2417 sound/pci/cs46xx/cs46xx_lib.c 		ext_mid = snd_ac97_read(ac97, AC97_EXTENDED_MID);
ac97             2422 sound/pci/cs46xx/cs46xx_lib.c 		snd_ac97_write(ac97, AC97_REC_GAIN, 0x8a05);
ac97             2423 sound/pci/cs46xx/cs46xx_lib.c 		if ((err = snd_ac97_read(ac97, AC97_REC_GAIN)) == 0x8a05)
ac97             2429 sound/pci/cs46xx/cs46xx_lib.c 	dev_err(ac97->bus->card->dev,
ac97             2437 sound/pci/cs46xx/cs46xx_lib.c 	struct snd_ac97_template ac97;
ac97             2439 sound/pci/cs46xx/cs46xx_lib.c 	memset(&ac97, 0, sizeof(ac97));
ac97             2440 sound/pci/cs46xx/cs46xx_lib.c 	ac97.private_data = chip;
ac97             2441 sound/pci/cs46xx/cs46xx_lib.c 	ac97.private_free = snd_cs46xx_mixer_free_ac97;
ac97             2442 sound/pci/cs46xx/cs46xx_lib.c 	ac97.num = codec;
ac97             2444 sound/pci/cs46xx/cs46xx_lib.c 		ac97.scaps = AC97_SCAP_INV_EAPD;
ac97             2459 sound/pci/cs46xx/cs46xx_lib.c 			err = snd_ac97_mixer(chip->ac97_bus, &ac97, &chip->ac97[codec]);
ac97             2518 sound/pci/cs46xx/cs46xx_lib.c 		unsigned int id2 = chip->ac97[CS46XX_PRIMARY_CODEC_INDEX]->id & 0xffff;
ac97             2523 sound/pci/cs46xx/cs46xx_lib.c 			snd_ac97_write_cache(chip->ac97[CS46XX_PRIMARY_CODEC_INDEX],
ac97             3773 sound/pci/cs46xx/cs46xx_lib.c 	snd_ac97_suspend(chip->ac97[CS46XX_PRIMARY_CODEC_INDEX]);
ac97             3774 sound/pci/cs46xx/cs46xx_lib.c 	snd_ac97_suspend(chip->ac97[CS46XX_SECONDARY_CODEC_INDEX]);
ac97             3827 sound/pci/cs46xx/cs46xx_lib.c 	snd_ac97_resume(chip->ac97[CS46XX_PRIMARY_CODEC_INDEX]);
ac97             3828 sound/pci/cs46xx/cs46xx_lib.c 	snd_ac97_resume(chip->ac97[CS46XX_SECONDARY_CODEC_INDEX]);
ac97              121 sound/pci/cs5535audio/cs5535audio.c static void snd_cs5535audio_ac97_codec_write(struct snd_ac97 *ac97,
ac97              124 sound/pci/cs5535audio/cs5535audio.c 	struct cs5535audio *cs5535au = ac97->private_data;
ac97              128 sound/pci/cs5535audio/cs5535audio.c static unsigned short snd_cs5535audio_ac97_codec_read(struct snd_ac97 *ac97,
ac97              131 sound/pci/cs5535audio/cs5535audio.c 	struct cs5535audio *cs5535au = ac97->private_data;
ac97              139 sound/pci/cs5535audio/cs5535audio.c 	struct snd_ac97_template ac97;
ac97              149 sound/pci/cs5535audio/cs5535audio.c 	memset(&ac97, 0, sizeof(ac97));
ac97              150 sound/pci/cs5535audio/cs5535audio.c 	ac97.scaps = AC97_SCAP_AUDIO | AC97_SCAP_SKIP_MODEM
ac97              152 sound/pci/cs5535audio/cs5535audio.c 	ac97.private_data = cs5535au;
ac97              153 sound/pci/cs5535audio/cs5535audio.c 	ac97.pci = cs5535au->pci;
ac97              156 sound/pci/cs5535audio/cs5535audio.c 	olpc_prequirks(card, &ac97);
ac97              158 sound/pci/cs5535audio/cs5535audio.c 	if ((err = snd_ac97_mixer(pbus, &ac97, &cs5535au->ac97)) < 0) {
ac97              163 sound/pci/cs5535audio/cs5535audio.c 	snd_ac97_tune_hardware(cs5535au->ac97, ac97_quirks, ac97_quirk);
ac97              165 sound/pci/cs5535audio/cs5535audio.c 	err = olpc_quirks(card, cs5535au->ac97);
ac97               87 sound/pci/cs5535audio/cs5535audio.h 	struct snd_ac97 *ac97;
ac97              102 sound/pci/cs5535audio/cs5535audio.h 		    struct snd_ac97_template *ac97);
ac97              103 sound/pci/cs5535audio/cs5535audio.h int olpc_quirks(struct snd_card *card, struct snd_ac97 *ac97);
ac97              105 sound/pci/cs5535audio/cs5535audio.h void olpc_analog_input(struct snd_ac97 *ac97, int on);
ac97              106 sound/pci/cs5535audio/cs5535audio.h void olpc_mic_bias(struct snd_ac97 *ac97, int on);
ac97              108 sound/pci/cs5535audio/cs5535audio.h static inline void olpc_capture_open(struct snd_ac97 *ac97)
ac97              111 sound/pci/cs5535audio/cs5535audio.h 	olpc_analog_input(ac97, 0);
ac97              113 sound/pci/cs5535audio/cs5535audio.h 	olpc_mic_bias(ac97, 1);
ac97              116 sound/pci/cs5535audio/cs5535audio.h static inline void olpc_capture_close(struct snd_ac97 *ac97)
ac97              119 sound/pci/cs5535audio/cs5535audio.h 	olpc_analog_input(ac97, 0);
ac97              121 sound/pci/cs5535audio/cs5535audio.h 	olpc_mic_bias(ac97, 0);
ac97              125 sound/pci/cs5535audio/cs5535audio.h 		struct snd_ac97_template *ac97) { }
ac97              126 sound/pci/cs5535audio/cs5535audio.h static inline int olpc_quirks(struct snd_card *card, struct snd_ac97 *ac97)
ac97              131 sound/pci/cs5535audio/cs5535audio.h static inline void olpc_analog_input(struct snd_ac97 *ac97, int on) { }
ac97              132 sound/pci/cs5535audio/cs5535audio.h static inline void olpc_mic_bias(struct snd_ac97 *ac97, int on) { }
ac97              133 sound/pci/cs5535audio/cs5535audio.h static inline void olpc_capture_open(struct snd_ac97 *ac97) { }
ac97              134 sound/pci/cs5535audio/cs5535audio.h static inline void olpc_capture_close(struct snd_ac97 *ac97) { }
ac97               24 sound/pci/cs5535audio/cs5535audio_olpc.c void olpc_analog_input(struct snd_ac97 *ac97, int on)
ac97               32 sound/pci/cs5535audio/cs5535audio_olpc.c 	err = snd_ac97_update_bits(ac97, AC97_AD_TEST2,
ac97               35 sound/pci/cs5535audio/cs5535audio_olpc.c 		dev_err(ac97->bus->card->dev,
ac97               47 sound/pci/cs5535audio/cs5535audio_olpc.c void olpc_mic_bias(struct snd_ac97 *ac97, int on)
ac97               55 sound/pci/cs5535audio/cs5535audio_olpc.c 	err = snd_ac97_update_bits(ac97, AC97_AD_MISC,
ac97               58 sound/pci/cs5535audio/cs5535audio_olpc.c 		dev_err(ac97->bus->card->dev, "setting MIC Bias - %d\n", err);
ac97               81 sound/pci/cs5535audio/cs5535audio_olpc.c 	olpc_analog_input(cs5535au->ac97, v->value.integer.value[0]);
ac97               98 sound/pci/cs5535audio/cs5535audio_olpc.c 	struct snd_ac97 *ac97 = cs5535au->ac97;
ac97              101 sound/pci/cs5535audio/cs5535audio_olpc.c 	i = (snd_ac97_read(ac97, AC97_AD_MISC) >> AC97_AD_VREFD_SHIFT) & 0x1;
ac97              110 sound/pci/cs5535audio/cs5535audio_olpc.c 	olpc_mic_bias(cs5535au->ac97, v->value.integer.value[0]);
ac97              134 sound/pci/cs5535audio/cs5535audio_olpc.c 		    struct snd_ac97_template *ac97)
ac97              141 sound/pci/cs5535audio/cs5535audio_olpc.c 		ac97->scaps |= AC97_SCAP_INV_EAPD;
ac97              144 sound/pci/cs5535audio/cs5535audio_olpc.c int olpc_quirks(struct snd_card *card, struct snd_ac97 *ac97)
ac97              173 sound/pci/cs5535audio/cs5535audio_olpc.c 				ac97->private_data));
ac97              181 sound/pci/cs5535audio/cs5535audio_olpc.c 	olpc_mic_bias(ac97, 0);
ac97               86 sound/pci/cs5535audio/cs5535audio_pcm.c 	runtime->hw.rates = cs5535au->ac97->rates[AC97_RATES_FRONT_DAC];
ac97              262 sound/pci/cs5535audio/cs5535audio_pcm.c 			snd_ac97_update_power(cs5535au->ac97,
ac97              265 sound/pci/cs5535audio/cs5535audio_pcm.c 			snd_ac97_update_power(cs5535au->ac97,
ac97              276 sound/pci/cs5535audio/cs5535audio_pcm.c 	return snd_ac97_set_rate(cs5535au->ac97, AC97_PCM_FRONT_DAC_RATE,
ac97              345 sound/pci/cs5535audio/cs5535audio_pcm.c 	runtime->hw.rates = cs5535au->ac97->rates[AC97_RATES_ADC];
ac97              352 sound/pci/cs5535audio/cs5535audio_pcm.c 	olpc_capture_open(cs5535au->ac97);
ac97              359 sound/pci/cs5535audio/cs5535audio_pcm.c 	olpc_capture_close(cs5535au->ac97);
ac97              366 sound/pci/cs5535audio/cs5535audio_pcm.c 	return snd_ac97_set_rate(cs5535au->ac97, AC97_PCM_LR_ADC_RATE,
ac97               51 sound/pci/cs5535audio/cs5535audio_pm.c 	snd_ac97_suspend(cs5535au->ac97);
ac97               94 sound/pci/cs5535audio/cs5535audio_pm.c 	snd_ac97_resume(cs5535au->ac97);
ac97              211 sound/pci/emu10k1/emu10k1.c 	snd_ac97_suspend(emu->ac97);
ac97              229 sound/pci/emu10k1/emu10k1.c 	snd_ac97_resume(emu->ac97);
ac97              230 sound/pci/emu10k1/emu10k1x.c 	struct snd_ac97 *ac97;
ac97              694 sound/pci/emu10k1/emu10k1x.c static unsigned short snd_emu10k1x_ac97_read(struct snd_ac97 *ac97,
ac97              697 sound/pci/emu10k1/emu10k1x.c 	struct emu10k1x *emu = ac97->private_data;
ac97              708 sound/pci/emu10k1/emu10k1x.c static void snd_emu10k1x_ac97_write(struct snd_ac97 *ac97,
ac97              711 sound/pci/emu10k1/emu10k1x.c 	struct emu10k1x *emu = ac97->private_data;
ac97              723 sound/pci/emu10k1/emu10k1x.c 	struct snd_ac97_template ac97;
ac97              734 sound/pci/emu10k1/emu10k1x.c 	memset(&ac97, 0, sizeof(ac97));
ac97              735 sound/pci/emu10k1/emu10k1x.c 	ac97.private_data = chip;
ac97              736 sound/pci/emu10k1/emu10k1x.c 	ac97.scaps = AC97_SCAP_NO_SPDIF;
ac97              737 sound/pci/emu10k1/emu10k1x.c 	return snd_ac97_mixer(pbus, &ac97, &chip->ac97);
ac97             1709 sound/pci/emu10k1/emumixer.c 	val = snd_ac97_read(emu->ac97, AC97_REC_GAIN);
ac97             1724 sound/pci/emu10k1/emumixer.c 	return snd_ac97_update(emu->ac97, AC97_REC_GAIN, val);
ac97             1739 sound/pci/emu10k1/emumixer.c static void snd_emu10k1_mixer_free_ac97(struct snd_ac97 *ac97)
ac97             1741 sound/pci/emu10k1/emumixer.c 	struct snd_emu10k1 *emu = ac97->private_data;
ac97             1742 sound/pci/emu10k1/emumixer.c 	emu->ac97 = NULL;
ac97             1900 sound/pci/emu10k1/emumixer.c 		struct snd_ac97_template ac97;
ac97             1910 sound/pci/emu10k1/emumixer.c 		memset(&ac97, 0, sizeof(ac97));
ac97             1911 sound/pci/emu10k1/emumixer.c 		ac97.private_data = emu;
ac97             1912 sound/pci/emu10k1/emumixer.c 		ac97.private_free = snd_emu10k1_mixer_free_ac97;
ac97             1913 sound/pci/emu10k1/emumixer.c 		ac97.scaps = AC97_SCAP_NO_SPDIF;
ac97             1914 sound/pci/emu10k1/emumixer.c 		if ((err = snd_ac97_mixer(pbus, &ac97, &emu->ac97)) < 0) {
ac97             1926 sound/pci/emu10k1/emumixer.c 			snd_ac97_write_cache(emu->ac97, AC97_MASTER, 0x0000);
ac97             1928 sound/pci/emu10k1/emumixer.c 			snd_ac97_write_cache(emu->ac97, AC97_REC_SEL, 0x0000);
ac97             1930 sound/pci/emu10k1/emumixer.c 			snd_ac97_update_bits(emu->ac97, AC97_GENERAL_PURPOSE,
ac97             1942 sound/pci/emu10k1/emumixer.c 			if (emu->ac97->id == AC97_ID_STAC9758) {
ac97             1945 sound/pci/emu10k1/emumixer.c 				snd_ac97_write_cache(emu->ac97, AC97_HEADPHONE, 0x0202);
ac97             1950 sound/pci/emu10k1/emumixer.c 			snd_ac97_write_cache(emu->ac97, AC97_SURROUND_MASTER, 0x0202);
ac97             1951 sound/pci/emu10k1/emumixer.c 			snd_ac97_write_cache(emu->ac97, AC97_CENTER_LFE_MASTER, 0x0202);
ac97              483 sound/pci/emu10k1/io.c unsigned short snd_emu10k1_ac97_read(struct snd_ac97 *ac97, unsigned short reg)
ac97              485 sound/pci/emu10k1/io.c 	struct snd_emu10k1 *emu = ac97->private_data;
ac97              496 sound/pci/emu10k1/io.c void snd_emu10k1_ac97_write(struct snd_ac97 *ac97, unsigned short reg, unsigned short data)
ac97              498 sound/pci/emu10k1/io.c 	struct snd_emu10k1 *emu = ac97->private_data;
ac97              393 sound/pci/ens1370.c 			struct snd_ac97 *ac97;
ac97              600 sound/pci/ens1370.c static void snd_es1371_codec_write(struct snd_ac97 *ac97,
ac97              603 sound/pci/ens1370.c 	struct ensoniq *ensoniq = ac97->private_data;
ac97              642 sound/pci/ens1370.c static unsigned short snd_es1371_codec_read(struct snd_ac97 *ac97,
ac97              645 sound/pci/ens1370.c 	struct ensoniq *ensoniq = ac97->private_data;
ac97              710 sound/pci/ens1370.c static void snd_es1371_codec_wait(struct snd_ac97 *ac97)
ac97              713 sound/pci/ens1370.c 	snd_es1371_codec_read(ac97, AC97_RESET);
ac97              714 sound/pci/ens1370.c 	snd_es1371_codec_read(ac97, AC97_VENDOR_ID1);
ac97              715 sound/pci/ens1370.c 	snd_es1371_codec_read(ac97, AC97_VENDOR_ID2);
ac97             1572 sound/pci/ens1370.c static void snd_ensoniq_mixer_free_ac97(struct snd_ac97 *ac97)
ac97             1574 sound/pci/ens1370.c 	struct ensoniq *ensoniq = ac97->private_data;
ac97             1575 sound/pci/ens1370.c 	ensoniq->u.es1371.ac97 = NULL;
ac97             1617 sound/pci/ens1370.c 	struct snd_ac97_template ac97;
ac97             1628 sound/pci/ens1370.c 	memset(&ac97, 0, sizeof(ac97));
ac97             1629 sound/pci/ens1370.c 	ac97.private_data = ensoniq;
ac97             1630 sound/pci/ens1370.c 	ac97.private_free = snd_ensoniq_mixer_free_ac97;
ac97             1631 sound/pci/ens1370.c 	ac97.pci = ensoniq->pci;
ac97             1632 sound/pci/ens1370.c 	ac97.scaps = AC97_SCAP_AUDIO;
ac97             1633 sound/pci/ens1370.c 	if ((err = snd_ac97_mixer(pbus, &ac97, &ensoniq->u.es1371.ac97)) < 0)
ac97             1644 sound/pci/ens1370.c 		if (ensoniq->u.es1371.ac97->ext_id & AC97_EI_SPDIF)
ac97             1657 sound/pci/ens1370.c 	if (ensoniq->u.es1371.ac97->ext_id & AC97_EI_SDAC) {
ac97             2025 sound/pci/ens1370.c 	snd_ac97_suspend(ensoniq->u.es1371.ac97);
ac97             2047 sound/pci/ens1370.c 	snd_ac97_resume(ensoniq->u.es1371.ac97);
ac97              514 sound/pci/es1968.c 	struct snd_ac97 *ac97;
ac97              637 sound/pci/es1968.c static void snd_es1968_ac97_write(struct snd_ac97 *ac97, unsigned short reg, unsigned short val)
ac97              639 sound/pci/es1968.c 	struct es1968 *chip = ac97->private_data;
ac97              650 sound/pci/es1968.c static unsigned short snd_es1968_ac97_read(struct snd_ac97 *ac97, unsigned short reg)
ac97              653 sound/pci/es1968.c 	struct es1968 *chip = ac97->private_data;
ac97             1901 sound/pci/es1968.c 	val = snd_ac97_read(chip->ac97, AC97_MASTER);
ac97             1922 sound/pci/es1968.c 	if (snd_ac97_update(chip->ac97, AC97_MASTER, val))
ac97             2009 sound/pci/es1968.c 	struct snd_ac97_template ac97;
ac97             2023 sound/pci/es1968.c 	memset(&ac97, 0, sizeof(ac97));
ac97             2024 sound/pci/es1968.c 	ac97.private_data = chip;
ac97             2025 sound/pci/es1968.c 	if ((err = snd_ac97_mixer(pbus, &ac97, &chip->ac97)) < 0)
ac97             2381 sound/pci/es1968.c 	snd_ac97_suspend(chip->ac97);
ac97             2406 sound/pci/es1968.c 	snd_ac97_resume(chip->ac97);
ac97              181 sound/pci/fm801.c 	struct snd_ac97 *ac97;
ac97              272 sound/pci/fm801.c static void snd_fm801_codec_write(struct snd_ac97 *ac97,
ac97              276 sound/pci/fm801.c 	struct fm801 *chip = ac97->private_data;
ac97              288 sound/pci/fm801.c 	fm801_writew(chip, AC97_CMD, reg | (ac97->addr << FM801_AC97_ADDR_SHIFT));
ac97              294 sound/pci/fm801.c 		ac97->num);
ac97              297 sound/pci/fm801.c static unsigned short snd_fm801_codec_read(struct snd_ac97 *ac97, unsigned short reg)
ac97              299 sound/pci/fm801.c 	struct fm801 *chip = ac97->private_data;
ac97              311 sound/pci/fm801.c 		     reg | (ac97->addr << FM801_AC97_ADDR_SHIFT) | FM801_AC97_READ);
ac97              314 sound/pci/fm801.c 			ac97->num);
ac97              320 sound/pci/fm801.c 			"AC'97 interface #%d is not valid (2)\n", ac97->num);
ac97             1026 sound/pci/fm801.c static void snd_fm801_mixer_free_ac97(struct snd_ac97 *ac97)
ac97             1028 sound/pci/fm801.c 	struct fm801 *chip = ac97->private_data;
ac97             1029 sound/pci/fm801.c 	if (ac97->num == 0) {
ac97             1030 sound/pci/fm801.c 		chip->ac97 = NULL;
ac97             1038 sound/pci/fm801.c 	struct snd_ac97_template ac97;
ac97             1050 sound/pci/fm801.c 	memset(&ac97, 0, sizeof(ac97));
ac97             1051 sound/pci/fm801.c 	ac97.private_data = chip;
ac97             1052 sound/pci/fm801.c 	ac97.private_free = snd_fm801_mixer_free_ac97;
ac97             1053 sound/pci/fm801.c 	if ((err = snd_ac97_mixer(chip->ac97_bus, &ac97, &chip->ac97)) < 0)
ac97             1056 sound/pci/fm801.c 		ac97.num = 1;
ac97             1057 sound/pci/fm801.c 		ac97.addr = chip->secondary_addr;
ac97             1058 sound/pci/fm801.c 		if ((err = snd_ac97_mixer(chip->ac97_bus, &ac97, &chip->ac97_sec)) < 0)
ac97             1401 sound/pci/fm801.c 		snd_ac97_suspend(chip->ac97);
ac97             1420 sound/pci/fm801.c 		snd_ac97_resume(chip->ac97);
ac97               56 sound/pci/ice1712/amp.c 	if (ice->ac97)
ac97               59 sound/pci/ice1712/amp.c 		snd_ac97_write_cache(ice->ac97, 0x5a,
ac97               60 sound/pci/ice1712/amp.c 			snd_ac97_read(ice->ac97, 0x5a) & ~0x8000);
ac97              135 sound/pci/ice1712/ice1712.c static void snd_ice1712_ac97_write(struct snd_ac97 *ac97,
ac97              139 sound/pci/ice1712/ice1712.c 	struct snd_ice1712 *ice = ac97->private_data;
ac97              160 sound/pci/ice1712/ice1712.c static unsigned short snd_ice1712_ac97_read(struct snd_ac97 *ac97,
ac97              163 sound/pci/ice1712/ice1712.c 	struct snd_ice1712 *ice = ac97->private_data;
ac97              189 sound/pci/ice1712/ice1712.c static void snd_ice1712_pro_ac97_write(struct snd_ac97 *ac97,
ac97              193 sound/pci/ice1712/ice1712.c 	struct snd_ice1712 *ice = ac97->private_data;
ac97              215 sound/pci/ice1712/ice1712.c static unsigned short snd_ice1712_pro_ac97_read(struct snd_ac97 *ac97,
ac97              218 sound/pci/ice1712/ice1712.c 	struct snd_ice1712 *ice = ac97->private_data;
ac97              660 sound/pci/ice1712/ice1712.c 	snd_ac97_set_rate(ice->ac97, AC97_PCM_LR_ADC_RATE, runtime->rate);
ac97              801 sound/pci/ice1712/ice1712.c 	runtime->hw.rates = ice->ac97->rates[AC97_RATES_ADC];
ac97             1484 sound/pci/ice1712/ice1712.c static void snd_ice1712_mixer_free_ac97(struct snd_ac97 *ac97)
ac97             1486 sound/pci/ice1712/ice1712.c 	struct snd_ice1712 *ice = ac97->private_data;
ac97             1487 sound/pci/ice1712/ice1712.c 	ice->ac97 = NULL;
ac97             1493 sound/pci/ice1712/ice1712.c 	struct snd_ac97_template ac97;
ac97             1508 sound/pci/ice1712/ice1712.c 		memset(&ac97, 0, sizeof(ac97));
ac97             1509 sound/pci/ice1712/ice1712.c 		ac97.private_data = ice;
ac97             1510 sound/pci/ice1712/ice1712.c 		ac97.private_free = snd_ice1712_mixer_free_ac97;
ac97             1511 sound/pci/ice1712/ice1712.c 		err = snd_ac97_mixer(pbus, &ac97, &ice->ac97);
ac97             1526 sound/pci/ice1712/ice1712.c 		memset(&ac97, 0, sizeof(ac97));
ac97             1527 sound/pci/ice1712/ice1712.c 		ac97.private_data = ice;
ac97             1528 sound/pci/ice1712/ice1712.c 		ac97.private_free = snd_ice1712_mixer_free_ac97;
ac97             1529 sound/pci/ice1712/ice1712.c 		err = snd_ac97_mixer(pbus, &ac97, &ice->ac97);
ac97             2779 sound/pci/ice1712/ice1712.c 	snd_ac97_suspend(ice->ac97);
ac97             2832 sound/pci/ice1712/ice1712.c 	snd_ac97_resume(ice->ac97);
ac97              312 sound/pci/ice1712/ice1712.h 	struct snd_ac97 *ac97;
ac97              149 sound/pci/ice1712/ice1724.c static void snd_vt1724_ac97_write(struct snd_ac97 *ac97,
ac97              153 sound/pci/ice1712/ice1724.c 	struct snd_ice1712 *ice = ac97->private_data;
ac97              158 sound/pci/ice1712/ice1724.c 	old_cmd |= ac97->num;
ac97              165 sound/pci/ice1712/ice1724.c static unsigned short snd_vt1724_ac97_read(struct snd_ac97 *ac97, unsigned short reg)
ac97              167 sound/pci/ice1712/ice1724.c 	struct snd_ice1712 *ice = ac97->private_data;
ac97              172 sound/pci/ice1712/ice1724.c 	old_cmd |= ac97->num;
ac97             1480 sound/pci/ice1712/ice1724.c 		struct snd_ac97_template ac97;
ac97             1494 sound/pci/ice1712/ice1724.c 		memset(&ac97, 0, sizeof(ac97));
ac97             1495 sound/pci/ice1712/ice1724.c 		ac97.private_data = ice;
ac97             1496 sound/pci/ice1712/ice1724.c 		err = snd_ac97_mixer(pbus, &ac97, &ice->ac97);
ac97             2793 sound/pci/ice1712/ice1724.c 	snd_ac97_suspend(ice->ac97);
ac97             2843 sound/pci/ice1712/ice1724.c 	snd_ac97_resume(ice->ac97);
ac97              393 sound/pci/intel8x0.c 	struct snd_ac97 *ac97[3];
ac97              533 sound/pci/intel8x0.c static void snd_intel8x0_codec_write(struct snd_ac97 *ac97,
ac97              537 sound/pci/intel8x0.c 	struct intel8x0 *chip = ac97->private_data;
ac97              539 sound/pci/intel8x0.c 	if (snd_intel8x0_codec_semaphore(chip, ac97->num) < 0) {
ac97              543 sound/pci/intel8x0.c 				ac97->num, reg);
ac97              545 sound/pci/intel8x0.c 	iaputword(chip, reg + ac97->num * 0x80, val);
ac97              548 sound/pci/intel8x0.c static unsigned short snd_intel8x0_codec_read(struct snd_ac97 *ac97,
ac97              551 sound/pci/intel8x0.c 	struct intel8x0 *chip = ac97->private_data;
ac97              555 sound/pci/intel8x0.c 	if (snd_intel8x0_codec_semaphore(chip, ac97->num) < 0) {
ac97              559 sound/pci/intel8x0.c 				ac97->num, reg);
ac97              562 sound/pci/intel8x0.c 		res = iagetword(chip, reg + ac97->num * 0x80);
ac97              570 sound/pci/intel8x0.c 					ac97->num, reg);
ac97              620 sound/pci/intel8x0.c static unsigned short snd_intel8x0_ali_codec_read(struct snd_ac97 *ac97, unsigned short reg)
ac97              622 sound/pci/intel8x0.c 	struct intel8x0 *chip = ac97->private_data;
ac97              628 sound/pci/intel8x0.c 	if (ac97->num)
ac97              638 sound/pci/intel8x0.c static void snd_intel8x0_ali_codec_write(struct snd_ac97 *ac97, unsigned short reg,
ac97              641 sound/pci/intel8x0.c 	struct intel8x0 *chip = ac97->private_data;
ac97              646 sound/pci/intel8x0.c 	if (ac97->num)
ac97             1510 sound/pci/intel8x0.c 		chip->ac97[0]->chmaps[SNDRV_PCM_STREAM_PLAYBACK] = chmap;
ac97             1665 sound/pci/intel8x0.c static void snd_intel8x0_mixer_free_ac97(struct snd_ac97 *ac97)
ac97             1667 sound/pci/intel8x0.c 	struct intel8x0 *chip = ac97->private_data;
ac97             1668 sound/pci/intel8x0.c 	chip->ac97[ac97->num] = NULL;
ac97             2152 sound/pci/intel8x0.c 	struct snd_ac97_template ac97;
ac97             2183 sound/pci/intel8x0.c 	memset(&ac97, 0, sizeof(ac97));
ac97             2184 sound/pci/intel8x0.c 	ac97.private_data = chip;
ac97             2185 sound/pci/intel8x0.c 	ac97.private_free = snd_intel8x0_mixer_free_ac97;
ac97             2186 sound/pci/intel8x0.c 	ac97.scaps = AC97_SCAP_SKIP_MODEM | AC97_SCAP_POWER_SAVE;
ac97             2188 sound/pci/intel8x0.c 		ac97.scaps |= AC97_SCAP_DETECT_BY_VENDOR;
ac97             2237 sound/pci/intel8x0.c 	ac97.pci = chip->pci;
ac97             2239 sound/pci/intel8x0.c 		ac97.num = i;
ac97             2240 sound/pci/intel8x0.c 		if ((err = snd_ac97_mixer(pbus, &ac97, &chip->ac97[i])) < 0) {
ac97             2249 sound/pci/intel8x0.c 	snd_ac97_tune_hardware(chip->ac97[0], ac97_quirks, quirk_override);
ac97             2294 sound/pci/intel8x0.c 			if (chip->ac97[0]->flags & AC97_HAS_8CH)
ac97             2315 sound/pci/intel8x0.c 		snd_ac97_update_bits(chip->ac97[0], AC97_EXTENDED_STATUS, 0x03 << 4, 0x03 << 4);
ac97             2457 sound/pci/intel8x0.c 			if (chip->ac97[i])
ac97             2603 sound/pci/intel8x0.c 		snd_ac97_suspend(chip->ac97[i]);
ac97             2643 sound/pci/intel8x0.c 		snd_ac97_resume(chip->ac97[i]);
ac97             2696 sound/pci/intel8x0.c 	if (snd_ac97_set_rate(chip->ac97[0], AC97_PCM_FRONT_DAC_RATE, 48000) < 0) {
ac97             2788 sound/pci/intel8x0.c 	snd_ac97_update_power(chip->ac97[0], AC97_PCM_FRONT_DAC_RATE, 0);
ac97             3238 sound/pci/intel8x0.c 		 snd_ac97_get_short_name(chip->ac97[0]), chip->irq);
ac97              175 sound/pci/intel8x0m.c 	struct snd_ac97 *ac97;
ac97              196 sound/pci/intel8x0m.c 	struct snd_ac97 *ac97;
ac97              330 sound/pci/intel8x0m.c static void snd_intel8x0m_codec_write(struct snd_ac97 *ac97,
ac97              334 sound/pci/intel8x0m.c 	struct intel8x0m *chip = ac97->private_data;
ac97              336 sound/pci/intel8x0m.c 	if (snd_intel8x0m_codec_semaphore(chip, ac97->num) < 0) {
ac97              340 sound/pci/intel8x0m.c 				ac97->num, reg);
ac97              342 sound/pci/intel8x0m.c 	iaputword(chip, reg + ac97->num * 0x80, val);
ac97              345 sound/pci/intel8x0m.c static unsigned short snd_intel8x0m_codec_read(struct snd_ac97 *ac97,
ac97              348 sound/pci/intel8x0m.c 	struct intel8x0m *chip = ac97->private_data;
ac97              352 sound/pci/intel8x0m.c 	if (snd_intel8x0m_codec_semaphore(chip, ac97->num) < 0) {
ac97              356 sound/pci/intel8x0m.c 				ac97->num, reg);
ac97              359 sound/pci/intel8x0m.c 		res = iagetword(chip, reg + ac97->num * 0x80);
ac97              367 sound/pci/intel8x0m.c 					ac97->num, reg);
ac97              593 sound/pci/intel8x0m.c 	snd_ac97_write(ichdev->ac97, AC97_LINE1_RATE, runtime->rate);
ac97              594 sound/pci/intel8x0m.c 	snd_ac97_write(ichdev->ac97, AC97_LINE1_LEVEL, 0);
ac97              783 sound/pci/intel8x0m.c 			if (! chip->ichd[rec->ac97_idx].ac97)
ac97              807 sound/pci/intel8x0m.c static void snd_intel8x0m_mixer_free_ac97(struct snd_ac97 *ac97)
ac97              809 sound/pci/intel8x0m.c 	struct intel8x0m *chip = ac97->private_data;
ac97              810 sound/pci/intel8x0m.c 	chip->ac97 = NULL;
ac97              817 sound/pci/intel8x0m.c 	struct snd_ac97_template ac97;
ac97              828 sound/pci/intel8x0m.c 	memset(&ac97, 0, sizeof(ac97));
ac97              829 sound/pci/intel8x0m.c 	ac97.private_data = chip;
ac97              830 sound/pci/intel8x0m.c 	ac97.private_free = snd_intel8x0m_mixer_free_ac97;
ac97              831 sound/pci/intel8x0m.c 	ac97.scaps = AC97_SCAP_SKIP_AUDIO | AC97_SCAP_POWER_SAVE;
ac97              842 sound/pci/intel8x0m.c 	ac97.pci = chip->pci;
ac97              843 sound/pci/intel8x0m.c 	ac97.num = glob_sta & ICH_SCR ? 1 : 0;
ac97              844 sound/pci/intel8x0m.c 	if ((err = snd_ac97_mixer(pbus, &ac97, &x97)) < 0) {
ac97              846 sound/pci/intel8x0m.c 			"Unable to initialize codec #%d\n", ac97.num);
ac97              847 sound/pci/intel8x0m.c 		if (ac97.num == 0)
ac97              851 sound/pci/intel8x0m.c 	chip->ac97 = x97;
ac97              852 sound/pci/intel8x0m.c 	if(ac97_is_modem(x97) && !chip->ichd[ICHD_MDMIN].ac97) {
ac97              853 sound/pci/intel8x0m.c 		chip->ichd[ICHD_MDMIN].ac97 = x97;
ac97              854 sound/pci/intel8x0m.c 		chip->ichd[ICHD_MDMOUT].ac97 = x97;
ac97              936 sound/pci/intel8x0m.c 		if (chip->ac97)
ac97              937 sound/pci/intel8x0m.c 			status |= get_ich_codec_bit(chip, chip->ac97->num);
ac97             1015 sound/pci/intel8x0m.c 	snd_ac97_suspend(chip->ac97);
ac97             1038 sound/pci/intel8x0m.c 	snd_ac97_resume(chip->ac97);
ac97              733 sound/pci/maestro3.c 	struct snd_ac97 *ac97;
ac97             1561 sound/pci/maestro3.c 	val = snd_ac97_read(chip->ac97, AC97_MASTER);
ac97             1584 sound/pci/maestro3.c 	if (snd_ac97_update(chip->ac97, AC97_MASTER, val))
ac97             1893 sound/pci/maestro3.c snd_m3_ac97_read(struct snd_ac97 *ac97, unsigned short reg)
ac97             1895 sound/pci/maestro3.c 	struct snd_m3 *chip = ac97->private_data;
ac97             1909 sound/pci/maestro3.c snd_m3_ac97_write(struct snd_ac97 *ac97, unsigned short reg, unsigned short val)
ac97             1911 sound/pci/maestro3.c 	struct snd_m3 *chip = ac97->private_data;
ac97             1922 sound/pci/maestro3.c 	if (ac97->id == 0x45838308 && reg == AC97_MASTER) {
ac97             2040 sound/pci/maestro3.c 	struct snd_ac97_template ac97;
ac97             2053 sound/pci/maestro3.c 	memset(&ac97, 0, sizeof(ac97));
ac97             2054 sound/pci/maestro3.c 	ac97.private_data = chip;
ac97             2055 sound/pci/maestro3.c 	if ((err = snd_ac97_mixer(pbus, &ac97, &chip->ac97)) < 0)
ac97             2059 sound/pci/maestro3.c 	snd_ac97_write(chip->ac97, AC97_PCM, 0x8000 | (15 << 8) | 15);
ac97             2061 sound/pci/maestro3.c 	snd_ac97_write(chip->ac97, AC97_PCM, 0);
ac97             2410 sound/pci/maestro3.c 	snd_ac97_suspend(chip->ac97);
ac97             2458 sound/pci/maestro3.c 	snd_ac97_resume(chip->ac97);
ac97              230 sound/pci/nm256/nm256.c 	struct snd_ac97 *ac97;
ac97             1218 sound/pci/nm256/nm256.c snd_nm256_ac97_read(struct snd_ac97 *ac97, unsigned short reg)
ac97             1220 sound/pci/nm256/nm256.c 	struct nm256 *chip = ac97->private_data;
ac97             1231 sound/pci/nm256/nm256.c snd_nm256_ac97_write(struct snd_ac97 *ac97,
ac97             1234 sound/pci/nm256/nm256.c 	struct nm256 *chip = ac97->private_data;
ac97             1278 sound/pci/nm256/nm256.c snd_nm256_ac97_reset(struct snd_ac97 *ac97)
ac97             1280 sound/pci/nm256/nm256.c 	struct nm256 *chip = ac97->private_data;
ac97             1299 sound/pci/nm256/nm256.c 			snd_nm256_ac97_write(ac97, nm256_ac97_init_val[i].reg,
ac97             1310 sound/pci/nm256/nm256.c 	struct snd_ac97_template ac97;
ac97             1326 sound/pci/nm256/nm256.c 	memset(&ac97, 0, sizeof(ac97));
ac97             1327 sound/pci/nm256/nm256.c 	ac97.scaps = AC97_SCAP_AUDIO; /* we support audio! */
ac97             1328 sound/pci/nm256/nm256.c 	ac97.private_data = chip;
ac97             1329 sound/pci/nm256/nm256.c 	ac97.res_table = nm256_res_table;
ac97             1331 sound/pci/nm256/nm256.c 	err = snd_ac97_mixer(pbus, &ac97, &chip->ac97);
ac97             1334 sound/pci/nm256/nm256.c 	if (! (chip->ac97->id & (0xf0000000))) {
ac97             1402 sound/pci/nm256/nm256.c 	snd_ac97_suspend(chip->ac97);
ac97             1419 sound/pci/nm256/nm256.c 	snd_ac97_resume(chip->ac97);
ac97              426 sound/pci/riptide/riptide.c 	struct snd_ac97 *ac97;
ac97             1147 sound/pci/riptide/riptide.c 	snd_ac97_suspend(chip->ac97);
ac97             1157 sound/pci/riptide/riptide.c 	snd_ac97_resume(chip->ac97);
ac97             1727 sound/pci/riptide/riptide.c snd_riptide_codec_write(struct snd_ac97 *ac97, unsigned short reg,
ac97             1730 sound/pci/riptide/riptide.c 	struct snd_riptide *chip = ac97->private_data;
ac97             1747 sound/pci/riptide/riptide.c static unsigned short snd_riptide_codec_read(struct snd_ac97 *ac97,
ac97             1750 sound/pci/riptide/riptide.c 	struct snd_riptide *chip = ac97->private_data;
ac97             1969 sound/pci/riptide/riptide.c 	struct snd_ac97_template ac97;
ac97             1976 sound/pci/riptide/riptide.c 	memset(&ac97, 0, sizeof(ac97));
ac97             1977 sound/pci/riptide/riptide.c 	ac97.private_data = chip;
ac97             1978 sound/pci/riptide/riptide.c 	ac97.scaps = AC97_SCAP_SKIP_MODEM;
ac97             1984 sound/pci/riptide/riptide.c 	ac97.pci = chip->pci;
ac97             1985 sound/pci/riptide/riptide.c 	if ((err = snd_ac97_mixer(pbus, &ac97, &chip->ac97)) < 0)
ac97              109 sound/pci/sis7019.c 	struct snd_ac97 *ac97[3];
ac97              683 sound/pci/sis7019.c 	runtime->hw.rates = sis->ac97[0]->rates[AC97_RATES_ADC];
ac97              699 sound/pci/sis7019.c 	rc = snd_ac97_set_rate(sis->ac97[0], AC97_PCM_LR_ADC_RATE,
ac97              981 sound/pci/sis7019.c static void sis_ac97_write(struct snd_ac97 *ac97, unsigned short reg,
ac97              989 sound/pci/sis7019.c 	sis_ac97_rw(ac97->private_data, ac97->num,
ac97              990 sound/pci/sis7019.c 			(val << 16) | (reg << 8) | cmd[ac97->num]);
ac97              993 sound/pci/sis7019.c static unsigned short sis_ac97_read(struct snd_ac97 *ac97, unsigned short reg)
ac97             1000 sound/pci/sis7019.c 	return sis_ac97_rw(ac97->private_data, ac97->num,
ac97             1001 sound/pci/sis7019.c 					(reg << 8) | cmd[ac97->num]);
ac97             1007 sound/pci/sis7019.c 	struct snd_ac97_template ac97;
ac97             1014 sound/pci/sis7019.c 	memset(&ac97, 0, sizeof(ac97));
ac97             1015 sound/pci/sis7019.c 	ac97.private_data = sis;
ac97             1019 sound/pci/sis7019.c 		rc = snd_ac97_mixer(bus, &ac97, &sis->ac97[0]);
ac97             1020 sound/pci/sis7019.c 	ac97.num = 1;
ac97             1022 sound/pci/sis7019.c 		rc = snd_ac97_mixer(bus, &ac97, &sis->ac97[1]);
ac97             1023 sound/pci/sis7019.c 	ac97.num = 2;
ac97             1025 sound/pci/sis7019.c 		rc = snd_ac97_mixer(bus, &ac97, &sis->ac97[2]);
ac97             1206 sound/pci/sis7019.c 		snd_ac97_suspend(sis->ac97[0]);
ac97             1208 sound/pci/sis7019.c 		snd_ac97_suspend(sis->ac97[1]);
ac97             1210 sound/pci/sis7019.c 		snd_ac97_suspend(sis->ac97[2]);
ac97             1261 sound/pci/sis7019.c 		snd_ac97_resume(sis->ac97[0]);
ac97             1263 sound/pci/sis7019.c 		snd_ac97_resume(sis->ac97[1]);
ac97             1265 sound/pci/sis7019.c 		snd_ac97_resume(sis->ac97[2]);
ac97             1435 sound/pci/sis7019.c 			card->shortname, snd_ac97_get_short_name(sis->ac97[0]),
ac97              385 sound/pci/trident/trident.h 	struct snd_ac97 *ac97;
ac97              106 sound/pci/trident/trident_main.c static unsigned short snd_trident_codec_read(struct snd_ac97 *ac97, unsigned short reg)
ac97              111 sound/pci/trident/trident_main.c 	struct snd_trident *trident = ac97->private_data;
ac97              124 sound/pci/trident/trident_main.c 		treg = ac97->num == 0 ? NX_ACR2_AC97_R_PRIMARY : NX_ACR3_AC97_R_SECONDARY;
ac97              133 sound/pci/trident/trident_main.c 		if (ac97->num == 1)
ac97              168 sound/pci/trident/trident_main.c static void snd_trident_codec_write(struct snd_ac97 *ac97, unsigned short reg,
ac97              174 sound/pci/trident/trident_main.c 	struct snd_trident *trident = ac97->private_data;
ac97              198 sound/pci/trident/trident_main.c 		data |= (NX_AC97_BUSY_WRITE | (ac97->num << 8) | (reg & 0x000000ff));
ac97              209 sound/pci/trident/trident_main.c 		if (ac97->num == 1)
ac97             2970 sound/pci/trident/trident_main.c 	if ((err = snd_ac97_mixer(trident->ac97_bus, &_ac97, &trident->ac97)) < 0) {
ac97             3052 sound/pci/trident/trident_main.c 		if (trident->ac97->ext_id & AC97_EI_SPDIF)
ac97             3902 sound/pci/trident/trident_main.c 	snd_ac97_suspend(trident->ac97);
ac97             3924 sound/pci/trident/trident_main.c 	snd_ac97_resume(trident->ac97);
ac97              381 sound/pci/via82xx.c 	struct snd_ac97 *ac97;
ac97              542 sound/pci/via82xx.c static void snd_via82xx_codec_wait(struct snd_ac97 *ac97)
ac97              544 sound/pci/via82xx.c 	struct via82xx *chip = ac97->private_data;
ac97              546 sound/pci/via82xx.c 	err = snd_via82xx_codec_ready(chip, ac97->num);
ac97              552 sound/pci/via82xx.c static void snd_via82xx_codec_write(struct snd_ac97 *ac97,
ac97              556 sound/pci/via82xx.c 	struct via82xx *chip = ac97->private_data;
ac97              559 sound/pci/via82xx.c 	xval = !ac97->num ? VIA_REG_AC97_CODEC_ID_PRIMARY : VIA_REG_AC97_CODEC_ID_SECONDARY;
ac97              564 sound/pci/via82xx.c 	snd_via82xx_codec_ready(chip, ac97->num);
ac97              567 sound/pci/via82xx.c static unsigned short snd_via82xx_codec_read(struct snd_ac97 *ac97, unsigned short reg)
ac97              569 sound/pci/via82xx.c 	struct via82xx *chip = ac97->private_data;
ac97              573 sound/pci/via82xx.c 	xval = ac97->num << VIA_REG_AC97_CODEC_ID_SHIFT;
ac97              574 sound/pci/via82xx.c 	xval |= ac97->num ? VIA_REG_AC97_SECONDARY_VALID : VIA_REG_AC97_PRIMARY_VALID;
ac97              581 sound/pci/via82xx.c 				   ac97->num, snd_via82xx_codec_xread(chip));
ac97              586 sound/pci/via82xx.c 		if (snd_via82xx_codec_valid(chip, ac97->num) >= 0) {
ac97              985 sound/pci/via82xx.c 	snd_ac97_set_rate(chip->ac97, AC97_PCM_FRONT_DAC_RATE, runtime->rate);
ac97              986 sound/pci/via82xx.c 	snd_ac97_set_rate(chip->ac97, AC97_SPDIF, runtime->rate);
ac97              997 sound/pci/via82xx.c 	snd_ac97_set_rate(chip->ac97, AC97_PCM_LR_ADC_RATE, runtime->rate);
ac97             1037 sound/pci/via82xx.c 		snd_ac97_set_rate(chip->ac97, AC97_PCM_FRONT_DAC_RATE,
ac97             1040 sound/pci/via82xx.c 		snd_ac97_set_rate(chip->ac97, AC97_SPDIF, runtime->rate);
ac97             1077 sound/pci/via82xx.c 	snd_ac97_set_rate(chip->ac97, AC97_PCM_FRONT_DAC_RATE, runtime->rate);
ac97             1078 sound/pci/via82xx.c 	snd_ac97_set_rate(chip->ac97, AC97_PCM_SURR_DAC_RATE, runtime->rate);
ac97             1079 sound/pci/via82xx.c 	snd_ac97_set_rate(chip->ac97, AC97_PCM_LFE_DAC_RATE, runtime->rate);
ac97             1080 sound/pci/via82xx.c 	snd_ac97_set_rate(chip->ac97, AC97_SPDIF, runtime->rate);
ac97             1124 sound/pci/via82xx.c 	snd_ac97_set_rate(chip->ac97, AC97_PCM_LR_ADC_RATE, runtime->rate);
ac97             1182 sound/pci/via82xx.c 		runtime->hw.rates = chip->ac97->rates[AC97_RATES_SPDIF];
ac97             1197 sound/pci/via82xx.c 		runtime->hw.rates = chip->ac97->rates[idx];
ac97             1325 sound/pci/via82xx.c 			snd_ac97_update_power(chip->ac97,
ac97             1327 sound/pci/via82xx.c 			snd_ac97_update_power(chip->ac97,
ac97             1329 sound/pci/via82xx.c 			snd_ac97_update_power(chip->ac97,
ac97             1332 sound/pci/via82xx.c 			snd_ac97_update_power(chip->ac97,
ac97             1494 sound/pci/via82xx.c 	chip->ac97->chmaps[SNDRV_PCM_STREAM_PLAYBACK] = chmap;
ac97             1537 sound/pci/via82xx.c 	chip->ac97->chmaps[SNDRV_PCM_STREAM_PLAYBACK] = chmap;
ac97             1540 sound/pci/via82xx.c 	if (! ac97_can_spdif(chip->ac97))
ac97             1797 sound/pci/via82xx.c static void snd_via82xx_mixer_free_ac97(struct snd_ac97 *ac97)
ac97             1799 sound/pci/via82xx.c 	struct via82xx *chip = ac97->private_data;
ac97             1800 sound/pci/via82xx.c 	chip->ac97 = NULL;
ac97             1888 sound/pci/via82xx.c 	struct snd_ac97_template ac97;
ac97             1901 sound/pci/via82xx.c 	memset(&ac97, 0, sizeof(ac97));
ac97             1902 sound/pci/via82xx.c 	ac97.private_data = chip;
ac97             1903 sound/pci/via82xx.c 	ac97.private_free = snd_via82xx_mixer_free_ac97;
ac97             1904 sound/pci/via82xx.c 	ac97.pci = chip->pci;
ac97             1905 sound/pci/via82xx.c 	ac97.scaps = AC97_SCAP_SKIP_MODEM | AC97_SCAP_POWER_SAVE;
ac97             1906 sound/pci/via82xx.c 	if ((err = snd_ac97_mixer(chip->ac97_bus, &ac97, &chip->ac97)) < 0)
ac97             1909 sound/pci/via82xx.c 	snd_ac97_tune_hardware(chip->ac97, ac97_quirks, quirk_override);
ac97             1913 sound/pci/via82xx.c 		snd_ac97_update_bits(chip->ac97, AC97_EXTENDED_STATUS, 0x03 << 4, 0x03 << 4);
ac97             1994 sound/pci/via82xx.c 	if (ac97_can_spdif(chip->ac97)) {
ac97             2268 sound/pci/via82xx.c 	snd_ac97_suspend(chip->ac97);
ac97             2299 sound/pci/via82xx.c 	snd_ac97_resume(chip->ac97);
ac97             2601 sound/pci/via82xx.c 		 snd_ac97_get_short_name(chip->ac97), chip->port, chip->irq);
ac97              241 sound/pci/via82xx_modem.c 	struct snd_ac97 *ac97;
ac97              396 sound/pci/via82xx_modem.c static void snd_via82xx_codec_wait(struct snd_ac97 *ac97)
ac97              398 sound/pci/via82xx_modem.c 	struct via82xx_modem *chip = ac97->private_data;
ac97              400 sound/pci/via82xx_modem.c 	err = snd_via82xx_codec_ready(chip, ac97->num);
ac97              405 sound/pci/via82xx_modem.c static void snd_via82xx_codec_write(struct snd_ac97 *ac97,
ac97              409 sound/pci/via82xx_modem.c 	struct via82xx_modem *chip = ac97->private_data;
ac97              415 sound/pci/via82xx_modem.c 	xval = !ac97->num ? VIA_REG_AC97_CODEC_ID_PRIMARY : VIA_REG_AC97_CODEC_ID_SECONDARY;
ac97              420 sound/pci/via82xx_modem.c 	snd_via82xx_codec_ready(chip, ac97->num);
ac97              423 sound/pci/via82xx_modem.c static unsigned short snd_via82xx_codec_read(struct snd_ac97 *ac97, unsigned short reg)
ac97              425 sound/pci/via82xx_modem.c 	struct via82xx_modem *chip = ac97->private_data;
ac97              429 sound/pci/via82xx_modem.c 	xval = ac97->num << VIA_REG_AC97_CODEC_ID_SHIFT;
ac97              430 sound/pci/via82xx_modem.c 	xval |= ac97->num ? VIA_REG_AC97_SECONDARY_VALID : VIA_REG_AC97_PRIMARY_VALID;
ac97              437 sound/pci/via82xx_modem.c 				   ac97->num, snd_via82xx_codec_xread(chip));
ac97              442 sound/pci/via82xx_modem.c 		if (snd_via82xx_codec_valid(chip, ac97->num) >= 0) {
ac97              654 sound/pci/via82xx_modem.c 	snd_ac97_write(chip->ac97, AC97_LINE1_RATE, params_rate(hw_params));
ac97              655 sound/pci/via82xx_modem.c 	snd_ac97_write(chip->ac97, AC97_LINE1_LEVEL, 0);
ac97              872 sound/pci/via82xx_modem.c static void snd_via82xx_mixer_free_ac97(struct snd_ac97 *ac97)
ac97              874 sound/pci/via82xx_modem.c 	struct via82xx_modem *chip = ac97->private_data;
ac97              875 sound/pci/via82xx_modem.c 	chip->ac97 = NULL;
ac97              881 sound/pci/via82xx_modem.c 	struct snd_ac97_template ac97;
ac97              894 sound/pci/via82xx_modem.c 	memset(&ac97, 0, sizeof(ac97));
ac97              895 sound/pci/via82xx_modem.c 	ac97.private_data = chip;
ac97              896 sound/pci/via82xx_modem.c 	ac97.private_free = snd_via82xx_mixer_free_ac97;
ac97              897 sound/pci/via82xx_modem.c 	ac97.pci = chip->pci;
ac97              898 sound/pci/via82xx_modem.c 	ac97.scaps = AC97_SCAP_SKIP_AUDIO | AC97_SCAP_POWER_SAVE;
ac97              899 sound/pci/via82xx_modem.c 	ac97.num = chip->ac97_secondary;
ac97              901 sound/pci/via82xx_modem.c 	if ((err = snd_ac97_mixer(chip->ac97_bus, &ac97, &chip->ac97)) < 0)
ac97             1026 sound/pci/via82xx_modem.c 	snd_ac97_suspend(chip->ac97);
ac97             1038 sound/pci/via82xx_modem.c 	snd_ac97_resume(chip->ac97);
ac97              282 sound/pci/ymfpci/ymfpci.c 	if (chip->ac97->ext_id & AC97_EI_SDAC) {
ac97              316 sound/pci/ymfpci/ymfpci.h 	struct snd_ac97 *ac97;
ac97               81 sound/pci/ymfpci/ymfpci_main.c static void snd_ymfpci_codec_write(struct snd_ac97 *ac97, u16 reg, u16 val)
ac97               83 sound/pci/ymfpci/ymfpci_main.c 	struct snd_ymfpci *chip = ac97->private_data;
ac97               91 sound/pci/ymfpci/ymfpci_main.c static u16 snd_ymfpci_codec_read(struct snd_ac97 *ac97, u16 reg)
ac97               93 sound/pci/ymfpci/ymfpci_main.c 	struct snd_ymfpci *chip = ac97->private_data;
ac97             1786 sound/pci/ymfpci/ymfpci_main.c static void snd_ymfpci_mixer_free_ac97(struct snd_ac97 *ac97)
ac97             1788 sound/pci/ymfpci/ymfpci_main.c 	struct snd_ymfpci *chip = ac97->private_data;
ac97             1789 sound/pci/ymfpci/ymfpci_main.c 	chip->ac97 = NULL;
ac97             1794 sound/pci/ymfpci/ymfpci_main.c 	struct snd_ac97_template ac97;
ac97             1809 sound/pci/ymfpci/ymfpci_main.c 	memset(&ac97, 0, sizeof(ac97));
ac97             1810 sound/pci/ymfpci/ymfpci_main.c 	ac97.private_data = chip;
ac97             1811 sound/pci/ymfpci/ymfpci_main.c 	ac97.private_free = snd_ymfpci_mixer_free_ac97;
ac97             1812 sound/pci/ymfpci/ymfpci_main.c 	if ((err = snd_ac97_mixer(chip->ac97_bus, &ac97, &chip->ac97)) < 0)
ac97             1816 sound/pci/ymfpci/ymfpci_main.c 	snd_ac97_update_bits(chip->ac97, AC97_EXTENDED_STATUS,
ac97             1823 sound/pci/ymfpci/ymfpci_main.c 	if (chip->ac97->ext_id & AC97_EI_SDAC) {
ac97             2289 sound/pci/ymfpci/ymfpci_main.c 	snd_ac97_suspend(chip->ac97);
ac97             2318 sound/pci/ymfpci/ymfpci_main.c 	snd_ac97_resume(chip->ac97);
ac97               83 sound/soc/au1x/ac97c.c static unsigned short au1xac97c_ac97_read(struct snd_ac97 *ac97,
ac97               86 sound/soc/au1x/ac97c.c 	struct au1xpsc_audio_data *ctx = ac97_to_ctx(ac97);
ac97              125 sound/soc/au1x/ac97c.c static void au1xac97c_ac97_write(struct snd_ac97 *ac97, unsigned short r,
ac97              128 sound/soc/au1x/ac97c.c 	struct au1xpsc_audio_data *ctx = ac97_to_ctx(ac97);
ac97              155 sound/soc/au1x/ac97c.c static void au1xac97c_ac97_warm_reset(struct snd_ac97 *ac97)
ac97              157 sound/soc/au1x/ac97c.c 	struct au1xpsc_audio_data *ctx = ac97_to_ctx(ac97);
ac97              165 sound/soc/au1x/ac97c.c static void au1xac97c_ac97_cold_reset(struct snd_ac97 *ac97)
ac97              167 sound/soc/au1x/ac97c.c 	struct au1xpsc_audio_data *ctx = ac97_to_ctx(ac97);
ac97               71 sound/soc/au1x/psc-ac97.c static unsigned short au1xpsc_ac97_read(struct snd_ac97 *ac97,
ac97               74 sound/soc/au1x/psc-ac97.c 	struct au1xpsc_audio_data *pscdata = ac97_to_pscdata(ac97);
ac97              112 sound/soc/au1x/psc-ac97.c static void au1xpsc_ac97_write(struct snd_ac97 *ac97, unsigned short reg,
ac97              115 sound/soc/au1x/psc-ac97.c 	struct au1xpsc_audio_data *pscdata = ac97_to_pscdata(ac97);
ac97              144 sound/soc/au1x/psc-ac97.c static void au1xpsc_ac97_warm_reset(struct snd_ac97 *ac97)
ac97              146 sound/soc/au1x/psc-ac97.c 	struct au1xpsc_audio_data *pscdata = ac97_to_pscdata(ac97);
ac97              155 sound/soc/au1x/psc-ac97.c static void au1xpsc_ac97_cold_reset(struct snd_ac97 *ac97)
ac97              157 sound/soc/au1x/psc-ac97.c 	struct au1xpsc_audio_data *pscdata = ac97_to_pscdata(ac97);
ac97              130 sound/soc/cirrus/ep93xx-ac97.c static unsigned short ep93xx_ac97_read(struct snd_ac97 *ac97,
ac97              151 sound/soc/cirrus/ep93xx-ac97.c static void ep93xx_ac97_write(struct snd_ac97 *ac97,
ac97              173 sound/soc/cirrus/ep93xx-ac97.c static void ep93xx_ac97_warm_reset(struct snd_ac97 *ac97)
ac97              193 sound/soc/cirrus/ep93xx-ac97.c static void ep93xx_ac97_cold_reset(struct snd_ac97 *ac97)
ac97               36 sound/soc/codecs/ac97.c 	struct snd_ac97 *ac97 = snd_soc_component_get_drvdata(component);
ac97               40 sound/soc/codecs/ac97.c 	return snd_ac97_set_rate(ac97, reg, substream->runtime->rate);
ac97               66 sound/soc/codecs/ac97.c 	struct snd_ac97 *ac97;
ac97               78 sound/soc/codecs/ac97.c 	ret = snd_ac97_mixer(ac97_bus, &ac97_template, &ac97);
ac97               82 sound/soc/codecs/ac97.c 	snd_soc_component_set_drvdata(component, ac97);
ac97               90 sound/soc/codecs/ac97.c 	struct snd_ac97 *ac97 = snd_soc_component_get_drvdata(component);
ac97               92 sound/soc/codecs/ac97.c 	snd_ac97_suspend(ac97);
ac97              100 sound/soc/codecs/ac97.c 	struct snd_ac97 *ac97 = snd_soc_component_get_drvdata(component);
ac97              102 sound/soc/codecs/ac97.c 	snd_ac97_resume(ac97);
ac97              206 sound/soc/codecs/ad1980.c 	struct snd_ac97 *ac97 = snd_soc_component_get_drvdata(component);
ac97              211 sound/soc/codecs/ad1980.c 		ret = snd_ac97_reset(ac97, true, AD1980_VENDOR_ID,
ac97              233 sound/soc/codecs/ad1980.c 	struct snd_ac97 *ac97;
ac97              239 sound/soc/codecs/ad1980.c 	ac97 = snd_soc_new_ac97_component(component, 0, 0);
ac97              240 sound/soc/codecs/ad1980.c 	if (IS_ERR(ac97)) {
ac97              241 sound/soc/codecs/ad1980.c 		ret = PTR_ERR(ac97);
ac97              246 sound/soc/codecs/ad1980.c 	regmap = regmap_init_ac97(ac97, &ad1980_regmap_config);
ac97              253 sound/soc/codecs/ad1980.c 	snd_soc_component_set_drvdata(component, ac97);
ac97              281 sound/soc/codecs/ad1980.c 	snd_soc_free_ac97_component(ac97);
ac97              287 sound/soc/codecs/ad1980.c 	struct snd_ac97 *ac97 = snd_soc_component_get_drvdata(component);
ac97              290 sound/soc/codecs/ad1980.c 	snd_soc_free_ac97_component(ac97);
ac97              218 sound/soc/codecs/stac9766.c 	struct snd_ac97 *ac97 = snd_soc_component_get_drvdata(component);
ac97              220 sound/soc/codecs/stac9766.c 	return snd_ac97_reset(ac97, true, STAC9766_VENDOR_ID,
ac97              273 sound/soc/codecs/stac9766.c 	struct snd_ac97 *ac97;
ac97              277 sound/soc/codecs/stac9766.c 	ac97 = snd_soc_new_ac97_component(component, STAC9766_VENDOR_ID,
ac97              279 sound/soc/codecs/stac9766.c 	if (IS_ERR(ac97))
ac97              280 sound/soc/codecs/stac9766.c 		return PTR_ERR(ac97);
ac97              282 sound/soc/codecs/stac9766.c 	regmap = regmap_init_ac97(ac97, &stac9766_regmap_config);
ac97              289 sound/soc/codecs/stac9766.c 	snd_soc_component_set_drvdata(component, ac97);
ac97              293 sound/soc/codecs/stac9766.c 	snd_soc_free_ac97_component(ac97);
ac97              299 sound/soc/codecs/stac9766.c 	struct snd_ac97 *ac97 = snd_soc_component_get_drvdata(component);
ac97              302 sound/soc/codecs/stac9766.c 	snd_soc_free_ac97_component(ac97);
ac97               27 sound/soc/codecs/wm9705.c 	struct snd_ac97 *ac97;
ac97              302 sound/soc/codecs/wm9705.c 	ret = snd_ac97_reset(wm9705->ac97, true, WM9705_VENDOR_ID,
ac97              322 sound/soc/codecs/wm9705.c 		wm9705->ac97 = wm9705->mfd_pdata->ac97;
ac97              325 sound/soc/codecs/wm9705.c 		wm9705->ac97 = snd_soc_new_ac97_component(component, WM9705_VENDOR_ID,
ac97              327 sound/soc/codecs/wm9705.c 		if (IS_ERR(wm9705->ac97)) {
ac97              329 sound/soc/codecs/wm9705.c 			return PTR_ERR(wm9705->ac97);
ac97              332 sound/soc/codecs/wm9705.c 		regmap = regmap_init_ac97(wm9705->ac97, &wm9705_regmap_config);
ac97              334 sound/soc/codecs/wm9705.c 			snd_soc_free_ac97_component(wm9705->ac97);
ac97              341 sound/soc/codecs/wm9705.c 	snd_soc_component_set_drvdata(component, wm9705->ac97);
ac97              353 sound/soc/codecs/wm9705.c 		snd_soc_free_ac97_component(wm9705->ac97);
ac97               29 sound/soc/codecs/wm9712.c 	struct snd_ac97 *ac97;
ac97              620 sound/soc/codecs/wm9712.c 	ret = snd_ac97_reset(wm9712->ac97, true, WM9712_VENDOR_ID,
ac97              639 sound/soc/codecs/wm9712.c 		wm9712->ac97 = wm9712->mfd_pdata->ac97;
ac97              644 sound/soc/codecs/wm9712.c 		wm9712->ac97 = snd_soc_new_ac97_component(component, WM9712_VENDOR_ID,
ac97              646 sound/soc/codecs/wm9712.c 		if (IS_ERR(wm9712->ac97)) {
ac97              647 sound/soc/codecs/wm9712.c 			ret = PTR_ERR(wm9712->ac97);
ac97              653 sound/soc/codecs/wm9712.c 		regmap = regmap_init_ac97(wm9712->ac97, &wm9712_regmap_config);
ac97              655 sound/soc/codecs/wm9712.c 			snd_soc_free_ac97_component(wm9712->ac97);
ac97              676 sound/soc/codecs/wm9712.c 		snd_soc_free_ac97_component(wm9712->ac97);
ac97               36 sound/soc/codecs/wm9713.c 	struct snd_ac97 *ac97;
ac97             1185 sound/soc/codecs/wm9713.c 	ret = snd_ac97_reset(wm9713->ac97, true, WM9713_VENDOR_ID,
ac97             1211 sound/soc/codecs/wm9713.c 		wm9713->ac97 = wm9713->mfd_pdata->ac97;
ac97             1214 sound/soc/codecs/wm9713.c 		wm9713->ac97 = snd_soc_new_ac97_component(component, WM9713_VENDOR_ID,
ac97             1216 sound/soc/codecs/wm9713.c 		if (IS_ERR(wm9713->ac97))
ac97             1217 sound/soc/codecs/wm9713.c 			return PTR_ERR(wm9713->ac97);
ac97             1218 sound/soc/codecs/wm9713.c 		regmap = regmap_init_ac97(wm9713->ac97, &wm9713_regmap_config);
ac97             1220 sound/soc/codecs/wm9713.c 			snd_soc_free_ac97_component(wm9713->ac97);
ac97             1241 sound/soc/codecs/wm9713.c 		snd_soc_free_ac97_component(wm9713->ac97);
ac97              457 sound/soc/fsl/fsl-asoc-card.c 		struct snd_ac97 *ac97 = snd_soc_component_get_drvdata(component);
ac97              464 sound/soc/fsl/fsl-asoc-card.c 		snd_ac97_update_bits(ac97, AC97_EXTENDED_STATUS,
ac97             1162 sound/soc/fsl/fsl_ssi.c static void fsl_ssi_ac97_write(struct snd_ac97 *ac97, unsigned short reg,
ac97             1198 sound/soc/fsl/fsl_ssi.c static unsigned short fsl_ssi_ac97_read(struct snd_ac97 *ac97,
ac97              430 sound/soc/fsl/imx-ssi.c static void imx_ssi_ac97_write(struct snd_ac97 *ac97, unsigned short reg,
ac97              453 sound/soc/fsl/imx-ssi.c static unsigned short imx_ssi_ac97_read(struct snd_ac97 *ac97,
ac97              475 sound/soc/fsl/imx-ssi.c static void imx_ssi_ac97_reset(struct snd_ac97 *ac97)
ac97              480 sound/soc/fsl/imx-ssi.c 		imx_ssi->ac97_reset(ac97);
ac97              482 sound/soc/fsl/imx-ssi.c 	imx_ssi_ac97_read(ac97, 0);
ac97              485 sound/soc/fsl/imx-ssi.c static void imx_ssi_ac97_warm_reset(struct snd_ac97 *ac97)
ac97              490 sound/soc/fsl/imx-ssi.c 		imx_ssi->ac97_warm_reset(ac97);
ac97              493 sound/soc/fsl/imx-ssi.c 	imx_ssi_ac97_read(ac97, 0);
ac97              201 sound/soc/fsl/imx-ssi.h 	void (*ac97_reset) (struct snd_ac97 *ac97);
ac97              202 sound/soc/fsl/imx-ssi.h 	void (*ac97_warm_reset)(struct snd_ac97 *ac97);
ac97               30 sound/soc/fsl/mpc5200_psc_ac97.c static unsigned short psc_ac97_read(struct snd_ac97 *ac97, unsigned short reg)
ac97               74 sound/soc/fsl/mpc5200_psc_ac97.c static void psc_ac97_write(struct snd_ac97 *ac97,
ac97               96 sound/soc/fsl/mpc5200_psc_ac97.c static void psc_ac97_warm_reset(struct snd_ac97 *ac97)
ac97              109 sound/soc/fsl/mpc5200_psc_ac97.c static void psc_ac97_cold_reset(struct snd_ac97 *ac97)
ac97              127 sound/soc/fsl/mpc5200_psc_ac97.c 	psc_ac97_warm_reset(ac97);
ac97               83 sound/soc/pxa/e740_wm9705.c SND_SOC_DAILINK_DEFS(ac97,
ac97               97 sound/soc/pxa/e740_wm9705.c 		SND_SOC_DAILINK_REG(ac97),
ac97               66 sound/soc/pxa/e750_wm9705.c SND_SOC_DAILINK_DEFS(ac97,
ac97               80 sound/soc/pxa/e750_wm9705.c 		SND_SOC_DAILINK_REG(ac97),
ac97               68 sound/soc/pxa/e800_wm9712.c SND_SOC_DAILINK_DEFS(ac97,
ac97               82 sound/soc/pxa/e800_wm9712.c 		SND_SOC_DAILINK_REG(ac97),
ac97               28 sound/soc/pxa/em-x270.c SND_SOC_DAILINK_DEFS(ac97,
ac97               42 sound/soc/pxa/em-x270.c 		SND_SOC_DAILINK_REG(ac97),
ac97              133 sound/soc/pxa/mioa701_wm9713.c SND_SOC_DAILINK_DEFS(ac97,
ac97              149 sound/soc/pxa/mioa701_wm9713.c 		SND_SOC_DAILINK_REG(ac97),
ac97              180 sound/soc/pxa/tosa.c SND_SOC_DAILINK_DEFS(ac97,
ac97              195 sound/soc/pxa/tosa.c 	SND_SOC_DAILINK_REG(ac97),
ac97              125 sound/soc/pxa/zylonite.c SND_SOC_DAILINK_DEFS(ac97,
ac97              145 sound/soc/pxa/zylonite.c 	SND_SOC_DAILINK_REG(ac97),
ac97              162 sound/soc/sh/hac.c static void hac_ac97_write(struct snd_ac97 *ac97, unsigned short reg,
ac97              190 sound/soc/sh/hac.c static unsigned short hac_ac97_read(struct snd_ac97 *ac97,
ac97              198 sound/soc/sh/hac.c static void hac_ac97_warmrst(struct snd_ac97 *ac97)
ac97              216 sound/soc/sh/hac.c static void hac_ac97_coldrst(struct snd_ac97 *ac97)
ac97              225 sound/soc/sh/hac.c 	hac_ac97_warmrst(ac97);
ac97               17 sound/soc/sh/sh7760-ac97.c SND_SOC_DAILINK_DEFS(ac97,
ac97               25 sound/soc/sh/sh7760-ac97.c 	SND_SOC_DAILINK_REG(ac97),
ac97              129 sound/soc/soc-ac97.c static int snd_soc_ac97_init_gpio(struct snd_ac97 *ac97,
ac97              138 sound/soc/soc-ac97.c 	ac97->gpio_priv = gpio_priv;
ac97              151 sound/soc/soc-ac97.c static void snd_soc_ac97_free_gpio(struct snd_ac97 *ac97)
ac97              153 sound/soc/soc-ac97.c 	gpiochip_remove(&ac97->gpio_priv->gpio_chip);
ac97              156 sound/soc/soc-ac97.c static int snd_soc_ac97_init_gpio(struct snd_ac97 *ac97,
ac97              162 sound/soc/soc-ac97.c static void snd_soc_ac97_free_gpio(struct snd_ac97 *ac97)
ac97              179 sound/soc/soc-ac97.c 	struct snd_ac97 *ac97;
ac97              181 sound/soc/soc-ac97.c 	ac97 = kzalloc(sizeof(struct snd_ac97), GFP_KERNEL);
ac97              182 sound/soc/soc-ac97.c 	if (ac97 == NULL)
ac97              185 sound/soc/soc-ac97.c 	ac97->bus = &soc_ac97_bus;
ac97              186 sound/soc/soc-ac97.c 	ac97->num = 0;
ac97              188 sound/soc/soc-ac97.c 	ac97->dev.bus = &ac97_bus_type;
ac97              189 sound/soc/soc-ac97.c 	ac97->dev.parent = component->card->dev;
ac97              190 sound/soc/soc-ac97.c 	ac97->dev.release = soc_ac97_device_release;
ac97              192 sound/soc/soc-ac97.c 	dev_set_name(&ac97->dev, "%d-%d:%s",
ac97              196 sound/soc/soc-ac97.c 	device_initialize(&ac97->dev);
ac97              198 sound/soc/soc-ac97.c 	return ac97;
ac97              219 sound/soc/soc-ac97.c 	struct snd_ac97 *ac97;
ac97              222 sound/soc/soc-ac97.c 	ac97 = snd_soc_alloc_ac97_component(component);
ac97              223 sound/soc/soc-ac97.c 	if (IS_ERR(ac97))
ac97              224 sound/soc/soc-ac97.c 		return ac97;
ac97              227 sound/soc/soc-ac97.c 		ret = snd_ac97_reset(ac97, false, id, id_mask);
ac97              235 sound/soc/soc-ac97.c 	ret = device_add(&ac97->dev);
ac97              239 sound/soc/soc-ac97.c 	ret = snd_soc_ac97_init_gpio(ac97, component);
ac97              243 sound/soc/soc-ac97.c 	return ac97;
ac97              246 sound/soc/soc-ac97.c 	put_device(&ac97->dev);
ac97              257 sound/soc/soc-ac97.c void snd_soc_free_ac97_component(struct snd_ac97 *ac97)
ac97              259 sound/soc/soc-ac97.c 	snd_soc_ac97_free_gpio(ac97);
ac97              260 sound/soc/soc-ac97.c 	device_del(&ac97->dev);
ac97              261 sound/soc/soc-ac97.c 	ac97->bus = NULL;
ac97              262 sound/soc/soc-ac97.c 	put_device(&ac97->dev);
ac97              268 sound/soc/soc-ac97.c static void snd_soc_ac97_warm_reset(struct snd_ac97 *ac97)
ac97              284 sound/soc/soc-ac97.c static void snd_soc_ac97_reset(struct snd_ac97 *ac97)
ac97               37 sound/soc/tegra/tegra20_ac97.c static void tegra20_ac97_codec_reset(struct snd_ac97 *ac97)
ac97               59 sound/soc/tegra/tegra20_ac97.c static void tegra20_ac97_codec_warm_reset(struct snd_ac97 *ac97)
ac97              142 sound/soc/tegra/tegra20_ac97.c static inline void tegra20_ac97_start_playback(struct tegra20_ac97 *ac97)
ac97              144 sound/soc/tegra/tegra20_ac97.c 	regmap_update_bits(ac97->regmap, TEGRA20_AC97_FIFO1_SCR,
ac97              148 sound/soc/tegra/tegra20_ac97.c 	regmap_update_bits(ac97->regmap, TEGRA20_AC97_CTRL,
ac97              155 sound/soc/tegra/tegra20_ac97.c static inline void tegra20_ac97_stop_playback(struct tegra20_ac97 *ac97)
ac97              157 sound/soc/tegra/tegra20_ac97.c 	regmap_update_bits(ac97->regmap, TEGRA20_AC97_FIFO1_SCR,
ac97              160 sound/soc/tegra/tegra20_ac97.c 	regmap_update_bits(ac97->regmap, TEGRA20_AC97_CTRL,
ac97              164 sound/soc/tegra/tegra20_ac97.c static inline void tegra20_ac97_start_capture(struct tegra20_ac97 *ac97)
ac97              166 sound/soc/tegra/tegra20_ac97.c 	regmap_update_bits(ac97->regmap, TEGRA20_AC97_FIFO1_SCR,
ac97              171 sound/soc/tegra/tegra20_ac97.c static inline void tegra20_ac97_stop_capture(struct tegra20_ac97 *ac97)
ac97              173 sound/soc/tegra/tegra20_ac97.c 	regmap_update_bits(ac97->regmap, TEGRA20_AC97_FIFO1_SCR,
ac97              180 sound/soc/tegra/tegra20_ac97.c 	struct tegra20_ac97 *ac97 = snd_soc_dai_get_drvdata(dai);
ac97              187 sound/soc/tegra/tegra20_ac97.c 			tegra20_ac97_start_playback(ac97);
ac97              189 sound/soc/tegra/tegra20_ac97.c 			tegra20_ac97_start_capture(ac97);
ac97              195 sound/soc/tegra/tegra20_ac97.c 			tegra20_ac97_stop_playback(ac97);
ac97              197 sound/soc/tegra/tegra20_ac97.c 			tegra20_ac97_stop_capture(ac97);
ac97              212 sound/soc/tegra/tegra20_ac97.c 	struct tegra20_ac97 *ac97 = snd_soc_dai_get_drvdata(dai);
ac97              214 sound/soc/tegra/tegra20_ac97.c 	dai->capture_dma_data = &ac97->capture_dma_data;
ac97              215 sound/soc/tegra/tegra20_ac97.c 	dai->playback_dma_data = &ac97->playback_dma_data;
ac97              304 sound/soc/tegra/tegra20_ac97.c 	struct tegra20_ac97 *ac97;
ac97              309 sound/soc/tegra/tegra20_ac97.c 	ac97 = devm_kzalloc(&pdev->dev, sizeof(struct tegra20_ac97),
ac97              311 sound/soc/tegra/tegra20_ac97.c 	if (!ac97) {
ac97              315 sound/soc/tegra/tegra20_ac97.c 	dev_set_drvdata(&pdev->dev, ac97);
ac97              317 sound/soc/tegra/tegra20_ac97.c 	ac97->clk_ac97 = devm_clk_get(&pdev->dev, NULL);
ac97              318 sound/soc/tegra/tegra20_ac97.c 	if (IS_ERR(ac97->clk_ac97)) {
ac97              320 sound/soc/tegra/tegra20_ac97.c 		ret = PTR_ERR(ac97->clk_ac97);
ac97              331 sound/soc/tegra/tegra20_ac97.c 	ac97->regmap = devm_regmap_init_mmio(&pdev->dev, regs,
ac97              333 sound/soc/tegra/tegra20_ac97.c 	if (IS_ERR(ac97->regmap)) {
ac97              335 sound/soc/tegra/tegra20_ac97.c 		ret = PTR_ERR(ac97->regmap);
ac97              339 sound/soc/tegra/tegra20_ac97.c 	ac97->reset_gpio = of_get_named_gpio(pdev->dev.of_node,
ac97              341 sound/soc/tegra/tegra20_ac97.c 	if (gpio_is_valid(ac97->reset_gpio)) {
ac97              342 sound/soc/tegra/tegra20_ac97.c 		ret = devm_gpio_request_one(&pdev->dev, ac97->reset_gpio,
ac97              353 sound/soc/tegra/tegra20_ac97.c 	ac97->sync_gpio = of_get_named_gpio(pdev->dev.of_node,
ac97              355 sound/soc/tegra/tegra20_ac97.c 	if (!gpio_is_valid(ac97->sync_gpio)) {
ac97              360 sound/soc/tegra/tegra20_ac97.c 	ac97->capture_dma_data.addr = mem->start + TEGRA20_AC97_FIFO_RX1;
ac97              361 sound/soc/tegra/tegra20_ac97.c 	ac97->capture_dma_data.addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
ac97              362 sound/soc/tegra/tegra20_ac97.c 	ac97->capture_dma_data.maxburst = 4;
ac97              364 sound/soc/tegra/tegra20_ac97.c 	ac97->playback_dma_data.addr = mem->start + TEGRA20_AC97_FIFO_TX1;
ac97              365 sound/soc/tegra/tegra20_ac97.c 	ac97->playback_dma_data.addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
ac97              366 sound/soc/tegra/tegra20_ac97.c 	ac97->playback_dma_data.maxburst = 4;
ac97              368 sound/soc/tegra/tegra20_ac97.c 	ret = clk_prepare_enable(ac97->clk_ac97);
ac97              395 sound/soc/tegra/tegra20_ac97.c 	workdata = ac97;
ac97              402 sound/soc/tegra/tegra20_ac97.c 	clk_disable_unprepare(ac97->clk_ac97);
ac97              411 sound/soc/tegra/tegra20_ac97.c 	struct tegra20_ac97 *ac97 = dev_get_drvdata(&pdev->dev);
ac97              416 sound/soc/tegra/tegra20_ac97.c 	clk_disable_unprepare(ac97->clk_ac97);
ac97               45 sound/soc/txx9/txx9aclc-ac97.c static unsigned short txx9aclc_ac97_read(struct snd_ac97 *ac97,
ac97               52 sound/soc/txx9/txx9aclc-ac97.c 	if (!(__raw_readl(base + ACINTSTS) & ACINT_CODECRDY(ac97->num)))
ac97               54 sound/soc/txx9/txx9aclc-ac97.c 	reg |= ac97->num << 7;
ac97               78 sound/soc/txx9/txx9aclc-ac97.c static void txx9aclc_ac97_write(struct snd_ac97 *ac97, unsigned short reg,
ac97               84 sound/soc/txx9/txx9aclc-ac97.c 	__raw_writel(((reg | (ac97->num << 7)) << ACREGACC_REG_SHIFT) |
ac97               95 sound/soc/txx9/txx9aclc-ac97.c static void txx9aclc_ac97_cold_reset(struct snd_ac97 *ac97)
ac97               99 sound/soc/txx9/txx9aclc-ac97.c 	u32 ready = ACINT_CODECRDY(ac97->num) | ACINT_REGACCRDY;
ac97              109 sound/soc/txx9/txx9aclc-ac97.c 		dev_err(&ac97->dev, "primary codec is not ready "