/sound/pci/ac97/ |
D | ac97_patch.c | 18 static struct snd_kcontrol *snd_ac97_find_mixer_ctl(struct snd_ac97 *ac97, 20 static int snd_ac97_add_vmaster(struct snd_ac97 *ac97, char *name, 28 static int patch_build_controls(struct snd_ac97 * ac97, const struct snd_kcontrol_new *controls, in… in patch_build_controls() argument 33 if ((err = snd_ctl_add(ac97->bus->card, snd_ac97_cnew(&controls[idx], ac97))) < 0) in patch_build_controls() 39 static void reset_tlv(struct snd_ac97 *ac97, const char *name, in reset_tlv() argument 47 kctl = snd_ctl_find_id(ac97->bus->card, &sid); in reset_tlv() 53 static int ac97_update_bits_page(struct snd_ac97 *ac97, unsigned short reg, unsigned short mask, un… in ac97_update_bits_page() argument 58 mutex_lock(&ac97->page_mutex); in ac97_update_bits_page() 59 page_save = snd_ac97_read(ac97, AC97_INT_PAGING) & AC97_PAGE_MASK; in ac97_update_bits_page() 60 snd_ac97_update_bits(ac97, AC97_INT_PAGING, AC97_PAGE_MASK, page); in ac97_update_bits_page() [all …]
|
D | ac97_codec.c | 49 int (*patch)(struct snd_ac97 *ac97); 50 int (*mpatch)(struct snd_ac97 *ac97); 195 static void update_power_regs(struct snd_ac97 *ac97); 197 #define ac97_is_power_save_mode(ac97) \ argument 198 ((ac97->scaps & AC97_SCAP_POWER_SAVE) && power_save) 200 #define ac97_is_power_save_mode(ac97) 0 argument 203 #define ac97_err(ac97, fmt, args...) \ argument 204 dev_err((ac97)->bus->card->dev, fmt, ##args) 205 #define ac97_warn(ac97, fmt, args...) \ argument 206 dev_warn((ac97)->bus->card->dev, fmt, ##args) [all …]
|
D | ac97_proc.c | 22 static void snd_ac97_proc_read_functions(struct snd_ac97 *ac97, struct snd_info_buffer *buffer) in snd_ac97_proc_read_functions() argument 37 snd_ac97_write(ac97, AC97_FUNC_SELECT, function << 1); in snd_ac97_proc_read_functions() 38 info = snd_ac97_read(ac97, AC97_FUNC_INFO); in snd_ac97_proc_read_functions() 45 sense_info = snd_ac97_read(ac97, AC97_SENSE_INFO); in snd_ac97_proc_read_functions() 92 static void snd_ac97_proc_read_main(struct snd_ac97 *ac97, struct snd_info_buffer *buffer, int subi… in snd_ac97_proc_read_main() argument 101 snd_ac97_get_name(NULL, ac97->id, name, 0); in snd_ac97_proc_read_main() 102 snd_iprintf(buffer, "%d-%d/%d: %s\n\n", ac97->addr, ac97->num, subidx, name); in snd_ac97_proc_read_main() 104 if ((ac97->scaps & AC97_SCAP_AUDIO) == 0) in snd_ac97_proc_read_main() 108 ac97->subsystem_vendor); in snd_ac97_proc_read_main() 110 ac97->subsystem_device); in snd_ac97_proc_read_main() [all …]
|
D | ac97_pcm.c | 159 static int set_spdif_rate(struct snd_ac97 *ac97, unsigned short rate) in set_spdif_rate() argument 164 if (! (ac97->ext_id & AC97_EI_SPDIF)) in set_spdif_rate() 168 if (ac97->flags & AC97_CS_SPDIF) { in set_spdif_rate() 173 snd_ac97_update_bits(ac97, AC97_EXTENDED_STATUS, AC97_EA_SPDIF, 0); in set_spdif_rate() 179 if (ac97->id == AC97_ID_CM9739 && rate != 48000) { in set_spdif_rate() 180 snd_ac97_update_bits(ac97, AC97_EXTENDED_STATUS, AC97_EA_SPDIF, 0); in set_spdif_rate() 188 snd_ac97_update_bits(ac97, AC97_EXTENDED_STATUS, AC97_EA_SPDIF, 0); in set_spdif_rate() 195 mutex_lock(&ac97->reg_mutex); in set_spdif_rate() 196 old = snd_ac97_read(ac97, reg) & mask; in set_spdif_rate() 198 snd_ac97_update_bits_nolock(ac97, AC97_EXTENDED_STATUS, AC97_EA_SPDIF, 0); in set_spdif_rate() [all …]
|
D | ac97_local.h | 10 void snd_ac97_get_name(struct snd_ac97 *ac97, unsigned int id, char *name, 12 int snd_ac97_update_bits_nolock(struct snd_ac97 *ac97, unsigned short reg, 17 void snd_ac97_bus_proc_init(struct snd_ac97_bus * ac97); 18 void snd_ac97_bus_proc_done(struct snd_ac97_bus * ac97); 19 void snd_ac97_proc_init(struct snd_ac97 * ac97); 20 void snd_ac97_proc_done(struct snd_ac97 * ac97);
|
D | ac97_patch.h | 55 struct snd_ac97 * ac97); 62 static int snd_ac97_try_bit(struct snd_ac97 * ac97, int reg, int bit); 63 static int snd_ac97_remove_ctl(struct snd_ac97 *ac97, const char *name, 65 static int snd_ac97_rename_ctl(struct snd_ac97 *ac97, const char *src, 67 static int snd_ac97_swap_ctl(struct snd_ac97 *ac97, const char *s1, 69 static void snd_ac97_rename_vol_ctl(struct snd_ac97 *ac97, const char *src, 72 static void snd_ac97_restore_status(struct snd_ac97 *ac97); 73 static void snd_ac97_restore_iec958(struct snd_ac97 *ac97);
|
/sound/ac97/ |
D | snd_ac97_compat.c | 20 static void compat_ac97_reset(struct snd_ac97 *ac97) in compat_ac97_reset() argument 22 struct ac97_codec_device *adev = to_ac97_device(ac97->private_data); in compat_ac97_reset() 29 static void compat_ac97_warm_reset(struct snd_ac97 *ac97) in compat_ac97_warm_reset() argument 31 struct ac97_codec_device *adev = to_ac97_device(ac97->private_data); in compat_ac97_warm_reset() 38 static void compat_ac97_write(struct snd_ac97 *ac97, unsigned short reg, in compat_ac97_write() argument 41 struct ac97_codec_device *adev = to_ac97_device(ac97->private_data); in compat_ac97_write() 44 actrl->ops->write(actrl, ac97->num, reg, val); in compat_ac97_write() 47 static unsigned short compat_ac97_read(struct snd_ac97 *ac97, in compat_ac97_read() argument 50 struct ac97_codec_device *adev = to_ac97_device(ac97->private_data); in compat_ac97_read() 53 return actrl->ops->read(actrl, ac97->num, reg); in compat_ac97_read() [all …]
|
D | Makefile | 6 obj-$(CONFIG_AC97_BUS_NEW) += ac97.o 8 ac97-y += bus.o codec.o 9 ac97-$(CONFIG_AC97_BUS_COMPAT) += snd_ac97_compat.o
|
/sound/soc/tegra/ |
D | tegra20_ac97.c | 37 static void tegra20_ac97_codec_reset(struct snd_ac97 *ac97) in tegra20_ac97_codec_reset() argument 59 static void tegra20_ac97_codec_warm_reset(struct snd_ac97 *ac97) in tegra20_ac97_codec_warm_reset() argument 142 static inline void tegra20_ac97_start_playback(struct tegra20_ac97 *ac97) in tegra20_ac97_start_playback() argument 144 regmap_update_bits(ac97->regmap, TEGRA20_AC97_FIFO1_SCR, in tegra20_ac97_start_playback() 148 regmap_update_bits(ac97->regmap, TEGRA20_AC97_CTRL, in tegra20_ac97_start_playback() 155 static inline void tegra20_ac97_stop_playback(struct tegra20_ac97 *ac97) in tegra20_ac97_stop_playback() argument 157 regmap_update_bits(ac97->regmap, TEGRA20_AC97_FIFO1_SCR, in tegra20_ac97_stop_playback() 160 regmap_update_bits(ac97->regmap, TEGRA20_AC97_CTRL, in tegra20_ac97_stop_playback() 164 static inline void tegra20_ac97_start_capture(struct tegra20_ac97 *ac97) in tegra20_ac97_start_capture() argument 166 regmap_update_bits(ac97->regmap, TEGRA20_AC97_FIFO1_SCR, in tegra20_ac97_start_capture() [all …]
|
/sound/ |
D | ac97_bus.c | 26 static bool snd_ac97_check_id(struct snd_ac97 *ac97, unsigned int id, in snd_ac97_check_id() argument 29 ac97->id = ac97->bus->ops->read(ac97, AC97_VENDOR_ID1) << 16; in snd_ac97_check_id() 30 ac97->id |= ac97->bus->ops->read(ac97, AC97_VENDOR_ID2); in snd_ac97_check_id() 32 if (ac97->id == 0x0 || ac97->id == 0xffffffff) in snd_ac97_check_id() 35 if (id != 0 && id != (ac97->id & id_mask)) in snd_ac97_check_id() 55 int snd_ac97_reset(struct snd_ac97 *ac97, bool try_warm, unsigned int id, in snd_ac97_reset() argument 58 struct snd_ac97_bus_ops *ops = ac97->bus->ops; in snd_ac97_reset() 61 ops->warm_reset(ac97); in snd_ac97_reset() 62 if (snd_ac97_check_id(ac97, id, id_mask)) in snd_ac97_reset() 67 ops->reset(ac97); in snd_ac97_reset() [all …]
|
/sound/soc/ |
D | soc-ac97.c | 129 static int snd_soc_ac97_init_gpio(struct snd_ac97 *ac97, in snd_soc_ac97_init_gpio() argument 138 ac97->gpio_priv = gpio_priv; in snd_soc_ac97_init_gpio() 151 static void snd_soc_ac97_free_gpio(struct snd_ac97 *ac97) in snd_soc_ac97_free_gpio() argument 153 gpiochip_remove(&ac97->gpio_priv->gpio_chip); in snd_soc_ac97_free_gpio() 156 static int snd_soc_ac97_init_gpio(struct snd_ac97 *ac97, in snd_soc_ac97_init_gpio() argument 162 static void snd_soc_ac97_free_gpio(struct snd_ac97 *ac97) in snd_soc_ac97_free_gpio() argument 179 struct snd_ac97 *ac97; in snd_soc_alloc_ac97_component() local 181 ac97 = kzalloc(sizeof(struct snd_ac97), GFP_KERNEL); in snd_soc_alloc_ac97_component() 182 if (ac97 == NULL) in snd_soc_alloc_ac97_component() 185 ac97->bus = &soc_ac97_bus; in snd_soc_alloc_ac97_component() [all …]
|
/sound/pci/cs5535audio/ |
D | cs5535audio.h | 87 struct snd_ac97 *ac97; member 102 struct snd_ac97_template *ac97); 103 int olpc_quirks(struct snd_card *card, struct snd_ac97 *ac97); 105 void olpc_analog_input(struct snd_ac97 *ac97, int on); 106 void olpc_mic_bias(struct snd_ac97 *ac97, int on); 108 static inline void olpc_capture_open(struct snd_ac97 *ac97) in olpc_capture_open() argument 111 olpc_analog_input(ac97, 0); in olpc_capture_open() 113 olpc_mic_bias(ac97, 1); in olpc_capture_open() 116 static inline void olpc_capture_close(struct snd_ac97 *ac97) in olpc_capture_close() argument 119 olpc_analog_input(ac97, 0); in olpc_capture_close() [all …]
|
D | cs5535audio_olpc.c | 24 void olpc_analog_input(struct snd_ac97 *ac97, int on) in olpc_analog_input() argument 32 err = snd_ac97_update_bits(ac97, AC97_AD_TEST2, in olpc_analog_input() 35 dev_err(ac97->bus->card->dev, in olpc_analog_input() 47 void olpc_mic_bias(struct snd_ac97 *ac97, int on) in olpc_mic_bias() argument 55 err = snd_ac97_update_bits(ac97, AC97_AD_MISC, in olpc_mic_bias() 58 dev_err(ac97->bus->card->dev, "setting MIC Bias - %d\n", err); in olpc_mic_bias() 81 olpc_analog_input(cs5535au->ac97, v->value.integer.value[0]); in olpc_dc_put() 98 struct snd_ac97 *ac97 = cs5535au->ac97; in olpc_mic_get() local 101 i = (snd_ac97_read(ac97, AC97_AD_MISC) >> AC97_AD_VREFD_SHIFT) & 0x1; in olpc_mic_get() 110 olpc_mic_bias(cs5535au->ac97, v->value.integer.value[0]); in olpc_mic_put() [all …]
|
D | cs5535audio.c | 121 static void snd_cs5535audio_ac97_codec_write(struct snd_ac97 *ac97, in snd_cs5535audio_ac97_codec_write() argument 124 struct cs5535audio *cs5535au = ac97->private_data; in snd_cs5535audio_ac97_codec_write() 128 static unsigned short snd_cs5535audio_ac97_codec_read(struct snd_ac97 *ac97, in snd_cs5535audio_ac97_codec_read() argument 131 struct cs5535audio *cs5535au = ac97->private_data; in snd_cs5535audio_ac97_codec_read() 139 struct snd_ac97_template ac97; in snd_cs5535audio_mixer() local 149 memset(&ac97, 0, sizeof(ac97)); in snd_cs5535audio_mixer() 150 ac97.scaps = AC97_SCAP_AUDIO | AC97_SCAP_SKIP_MODEM in snd_cs5535audio_mixer() 152 ac97.private_data = cs5535au; in snd_cs5535audio_mixer() 153 ac97.pci = cs5535au->pci; in snd_cs5535audio_mixer() 156 olpc_prequirks(card, &ac97); in snd_cs5535audio_mixer() [all …]
|
/sound/soc/codecs/ |
D | ac97.c | 36 struct snd_ac97 *ac97 = snd_soc_component_get_drvdata(component); in ac97_prepare() local 40 return snd_ac97_set_rate(ac97, reg, substream->runtime->rate); in ac97_prepare() 66 struct snd_ac97 *ac97; in ac97_soc_probe() local 78 ret = snd_ac97_mixer(ac97_bus, &ac97_template, &ac97); in ac97_soc_probe() 82 snd_soc_component_set_drvdata(component, ac97); in ac97_soc_probe() 90 struct snd_ac97 *ac97 = snd_soc_component_get_drvdata(component); in ac97_soc_suspend() local 92 snd_ac97_suspend(ac97); in ac97_soc_suspend() 100 struct snd_ac97 *ac97 = snd_soc_component_get_drvdata(component); in ac97_soc_resume() local 102 snd_ac97_resume(ac97); in ac97_soc_resume()
|
D | ad1980.c | 206 struct snd_ac97 *ac97 = snd_soc_component_get_drvdata(component); in ad1980_reset() local 211 ret = snd_ac97_reset(ac97, true, AD1980_VENDOR_ID, in ad1980_reset() 233 struct snd_ac97 *ac97; in ad1980_soc_probe() local 239 ac97 = snd_soc_new_ac97_component(component, 0, 0); in ad1980_soc_probe() 240 if (IS_ERR(ac97)) { in ad1980_soc_probe() 241 ret = PTR_ERR(ac97); in ad1980_soc_probe() 246 regmap = regmap_init_ac97(ac97, &ad1980_regmap_config); in ad1980_soc_probe() 253 snd_soc_component_set_drvdata(component, ac97); in ad1980_soc_probe() 281 snd_soc_free_ac97_component(ac97); in ad1980_soc_probe() 287 struct snd_ac97 *ac97 = snd_soc_component_get_drvdata(component); in ad1980_soc_remove() local [all …]
|
D | stac9766.c | 218 struct snd_ac97 *ac97 = snd_soc_component_get_drvdata(component); in stac9766_component_resume() local 220 return snd_ac97_reset(ac97, true, STAC9766_VENDOR_ID, in stac9766_component_resume() 273 struct snd_ac97 *ac97; in stac9766_component_probe() local 277 ac97 = snd_soc_new_ac97_component(component, STAC9766_VENDOR_ID, in stac9766_component_probe() 279 if (IS_ERR(ac97)) in stac9766_component_probe() 280 return PTR_ERR(ac97); in stac9766_component_probe() 282 regmap = regmap_init_ac97(ac97, &stac9766_regmap_config); in stac9766_component_probe() 289 snd_soc_component_set_drvdata(component, ac97); in stac9766_component_probe() 293 snd_soc_free_ac97_component(ac97); in stac9766_component_probe() 299 struct snd_ac97 *ac97 = snd_soc_component_get_drvdata(component); in stac9766_component_remove() local [all …]
|
D | wm9705.c | 27 struct snd_ac97 *ac97; member 302 ret = snd_ac97_reset(wm9705->ac97, true, WM9705_VENDOR_ID, in wm9705_soc_resume() 322 wm9705->ac97 = wm9705->mfd_pdata->ac97; in wm9705_soc_probe() 325 wm9705->ac97 = snd_soc_new_ac97_component(component, WM9705_VENDOR_ID, in wm9705_soc_probe() 327 if (IS_ERR(wm9705->ac97)) { in wm9705_soc_probe() 329 return PTR_ERR(wm9705->ac97); in wm9705_soc_probe() 332 regmap = regmap_init_ac97(wm9705->ac97, &wm9705_regmap_config); in wm9705_soc_probe() 334 snd_soc_free_ac97_component(wm9705->ac97); in wm9705_soc_probe() 341 snd_soc_component_set_drvdata(component, wm9705->ac97); in wm9705_soc_probe() 353 snd_soc_free_ac97_component(wm9705->ac97); in wm9705_soc_remove()
|
/sound/pci/au88x0/ |
D | au88x0_mixer.c | 26 struct snd_ac97_template ac97; in snd_vortex_mixer() local 35 memset(&ac97, 0, sizeof(ac97)); in snd_vortex_mixer() 37 ac97.private_data = vortex; in snd_vortex_mixer() 38 ac97.scaps = AC97_SCAP_NO_SPDIF; in snd_vortex_mixer() 39 err = snd_ac97_mixer(pbus, &ac97, &vortex->codec); in snd_vortex_mixer()
|
/sound/pci/ |
D | intel8x0m.c | 175 struct snd_ac97 *ac97; member 196 struct snd_ac97 *ac97; member 330 static void snd_intel8x0m_codec_write(struct snd_ac97 *ac97, in snd_intel8x0m_codec_write() argument 334 struct intel8x0m *chip = ac97->private_data; in snd_intel8x0m_codec_write() 336 if (snd_intel8x0m_codec_semaphore(chip, ac97->num) < 0) { in snd_intel8x0m_codec_write() 340 ac97->num, reg); in snd_intel8x0m_codec_write() 342 iaputword(chip, reg + ac97->num * 0x80, val); in snd_intel8x0m_codec_write() 345 static unsigned short snd_intel8x0m_codec_read(struct snd_ac97 *ac97, in snd_intel8x0m_codec_read() argument 348 struct intel8x0m *chip = ac97->private_data; in snd_intel8x0m_codec_read() 352 if (snd_intel8x0m_codec_semaphore(chip, ac97->num) < 0) { in snd_intel8x0m_codec_read() [all …]
|
D | via82xx_modem.c | 241 struct snd_ac97 *ac97; member 396 static void snd_via82xx_codec_wait(struct snd_ac97 *ac97) in snd_via82xx_codec_wait() argument 398 struct via82xx_modem *chip = ac97->private_data; in snd_via82xx_codec_wait() 400 err = snd_via82xx_codec_ready(chip, ac97->num); in snd_via82xx_codec_wait() 405 static void snd_via82xx_codec_write(struct snd_ac97 *ac97, in snd_via82xx_codec_write() argument 409 struct via82xx_modem *chip = ac97->private_data; in snd_via82xx_codec_write() 415 xval = !ac97->num ? VIA_REG_AC97_CODEC_ID_PRIMARY : VIA_REG_AC97_CODEC_ID_SECONDARY; in snd_via82xx_codec_write() 420 snd_via82xx_codec_ready(chip, ac97->num); in snd_via82xx_codec_write() 423 static unsigned short snd_via82xx_codec_read(struct snd_ac97 *ac97, unsigned short reg) in snd_via82xx_codec_read() argument 425 struct via82xx_modem *chip = ac97->private_data; in snd_via82xx_codec_read() [all …]
|
D | sis7019.c | 109 struct snd_ac97 *ac97[3]; member 683 runtime->hw.rates = sis->ac97[0]->rates[AC97_RATES_ADC]; in sis_capture_open() 699 rc = snd_ac97_set_rate(sis->ac97[0], AC97_PCM_LR_ADC_RATE, in sis_capture_hw_params() 981 static void sis_ac97_write(struct snd_ac97 *ac97, unsigned short reg, in sis_ac97_write() argument 989 sis_ac97_rw(ac97->private_data, ac97->num, in sis_ac97_write() 990 (val << 16) | (reg << 8) | cmd[ac97->num]); in sis_ac97_write() 993 static unsigned short sis_ac97_read(struct snd_ac97 *ac97, unsigned short reg) in sis_ac97_read() argument 1000 return sis_ac97_rw(ac97->private_data, ac97->num, in sis_ac97_read() 1001 (reg << 8) | cmd[ac97->num]); in sis_ac97_read() 1007 struct snd_ac97_template ac97; in sis_mixer_create() local [all …]
|
D | via82xx.c | 381 struct snd_ac97 *ac97; member 542 static void snd_via82xx_codec_wait(struct snd_ac97 *ac97) in snd_via82xx_codec_wait() argument 544 struct via82xx *chip = ac97->private_data; in snd_via82xx_codec_wait() 546 err = snd_via82xx_codec_ready(chip, ac97->num); in snd_via82xx_codec_wait() 552 static void snd_via82xx_codec_write(struct snd_ac97 *ac97, in snd_via82xx_codec_write() argument 556 struct via82xx *chip = ac97->private_data; in snd_via82xx_codec_write() 559 xval = !ac97->num ? VIA_REG_AC97_CODEC_ID_PRIMARY : VIA_REG_AC97_CODEC_ID_SECONDARY; in snd_via82xx_codec_write() 564 snd_via82xx_codec_ready(chip, ac97->num); in snd_via82xx_codec_write() 567 static unsigned short snd_via82xx_codec_read(struct snd_ac97 *ac97, unsigned short reg) in snd_via82xx_codec_read() argument 569 struct via82xx *chip = ac97->private_data; in snd_via82xx_codec_read() [all …]
|
/sound/arm/ |
D | Makefile | 11 snd-pxa2xx-lib-$(CONFIG_SND_PXA2XX_LIB_AC97) += pxa2xx-ac97-lib.o 13 obj-$(CONFIG_SND_PXA2XX_AC97) += snd-pxa2xx-ac97.o 14 snd-pxa2xx-ac97-objs := pxa2xx-ac97.o
|
/sound/soc/txx9/ |
D | txx9aclc-ac97.c | 45 static unsigned short txx9aclc_ac97_read(struct snd_ac97 *ac97, in txx9aclc_ac97_read() argument 52 if (!(__raw_readl(base + ACINTSTS) & ACINT_CODECRDY(ac97->num))) in txx9aclc_ac97_read() 54 reg |= ac97->num << 7; in txx9aclc_ac97_read() 78 static void txx9aclc_ac97_write(struct snd_ac97 *ac97, unsigned short reg, in txx9aclc_ac97_write() argument 84 __raw_writel(((reg | (ac97->num << 7)) << ACREGACC_REG_SHIFT) | in txx9aclc_ac97_write() 95 static void txx9aclc_ac97_cold_reset(struct snd_ac97 *ac97) in txx9aclc_ac97_cold_reset() argument 99 u32 ready = ACINT_CODECRDY(ac97->num) | ACINT_REGACCRDY; in txx9aclc_ac97_cold_reset() 109 dev_err(&ac97->dev, "primary codec is not ready " in txx9aclc_ac97_cold_reset()
|