/sound/pci/ac97/ |
D | ac97_patch.c | 33 static struct snd_kcontrol *snd_ac97_find_mixer_ctl(struct snd_ac97 *ac97, 35 static int snd_ac97_add_vmaster(struct snd_ac97 *ac97, char *name, 43 static int patch_build_controls(struct snd_ac97 * ac97, const struct snd_kcontrol_new *controls, in… in patch_build_controls() argument 48 if ((err = snd_ctl_add(ac97->bus->card, snd_ac97_cnew(&controls[idx], ac97))) < 0) in patch_build_controls() 54 static void reset_tlv(struct snd_ac97 *ac97, const char *name, in reset_tlv() argument 62 kctl = snd_ctl_find_id(ac97->bus->card, &sid); in reset_tlv() 68 static int ac97_update_bits_page(struct snd_ac97 *ac97, unsigned short reg, unsigned short mask, un… in ac97_update_bits_page() argument 73 mutex_lock(&ac97->page_mutex); in ac97_update_bits_page() 74 page_save = snd_ac97_read(ac97, AC97_INT_PAGING) & AC97_PAGE_MASK; in ac97_update_bits_page() 75 snd_ac97_update_bits(ac97, AC97_INT_PAGING, AC97_PAGE_MASK, page); in ac97_update_bits_page() [all …]
|
D | ac97_codec.c | 64 int (*patch)(struct snd_ac97 *ac97); 65 int (*mpatch)(struct snd_ac97 *ac97); 210 static void update_power_regs(struct snd_ac97 *ac97); 212 #define ac97_is_power_save_mode(ac97) \ argument 213 ((ac97->scaps & AC97_SCAP_POWER_SAVE) && power_save) 215 #define ac97_is_power_save_mode(ac97) 0 argument 218 #define ac97_err(ac97, fmt, args...) \ argument 219 dev_err((ac97)->bus->card->dev, fmt, ##args) 220 #define ac97_warn(ac97, fmt, args...) \ argument 221 dev_warn((ac97)->bus->card->dev, fmt, ##args) [all …]
|
D | ac97_proc.c | 37 static void snd_ac97_proc_read_functions(struct snd_ac97 *ac97, struct snd_info_buffer *buffer) in snd_ac97_proc_read_functions() argument 52 snd_ac97_write(ac97, AC97_FUNC_SELECT, function << 1); in snd_ac97_proc_read_functions() 53 info = snd_ac97_read(ac97, AC97_FUNC_INFO); in snd_ac97_proc_read_functions() 60 sense_info = snd_ac97_read(ac97, AC97_SENSE_INFO); in snd_ac97_proc_read_functions() 107 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 116 snd_ac97_get_name(NULL, ac97->id, name, 0); in snd_ac97_proc_read_main() 117 snd_iprintf(buffer, "%d-%d/%d: %s\n\n", ac97->addr, ac97->num, subidx, name); in snd_ac97_proc_read_main() 119 if ((ac97->scaps & AC97_SCAP_AUDIO) == 0) in snd_ac97_proc_read_main() 123 ac97->subsystem_vendor); in snd_ac97_proc_read_main() 125 ac97->subsystem_device); in snd_ac97_proc_read_main() [all …]
|
D | ac97_pcm.c | 174 static int set_spdif_rate(struct snd_ac97 *ac97, unsigned short rate) in set_spdif_rate() argument 179 if (! (ac97->ext_id & AC97_EI_SPDIF)) in set_spdif_rate() 183 if (ac97->flags & AC97_CS_SPDIF) { in set_spdif_rate() 188 snd_ac97_update_bits(ac97, AC97_EXTENDED_STATUS, AC97_EA_SPDIF, 0); in set_spdif_rate() 194 if (ac97->id == AC97_ID_CM9739 && rate != 48000) { in set_spdif_rate() 195 snd_ac97_update_bits(ac97, AC97_EXTENDED_STATUS, AC97_EA_SPDIF, 0); in set_spdif_rate() 203 snd_ac97_update_bits(ac97, AC97_EXTENDED_STATUS, AC97_EA_SPDIF, 0); in set_spdif_rate() 210 mutex_lock(&ac97->reg_mutex); in set_spdif_rate() 211 old = snd_ac97_read(ac97, reg) & mask; in set_spdif_rate() 213 snd_ac97_update_bits_nolock(ac97, AC97_EXTENDED_STATUS, AC97_EA_SPDIF, 0); in set_spdif_rate() [all …]
|
D | ac97_local.h | 25 void snd_ac97_get_name(struct snd_ac97 *ac97, unsigned int id, char *name, 27 int snd_ac97_update_bits_nolock(struct snd_ac97 *ac97, unsigned short reg, 32 void snd_ac97_bus_proc_init(struct snd_ac97_bus * ac97); 33 void snd_ac97_bus_proc_done(struct snd_ac97_bus * ac97); 34 void snd_ac97_proc_init(struct snd_ac97 * ac97); 35 void snd_ac97_proc_done(struct snd_ac97 * ac97);
|
D | ac97_patch.h | 70 struct snd_ac97 * ac97); 77 static int snd_ac97_try_bit(struct snd_ac97 * ac97, int reg, int bit); 78 static int snd_ac97_remove_ctl(struct snd_ac97 *ac97, const char *name, 80 static int snd_ac97_rename_ctl(struct snd_ac97 *ac97, const char *src, 82 static int snd_ac97_swap_ctl(struct snd_ac97 *ac97, const char *s1, 84 static void snd_ac97_rename_vol_ctl(struct snd_ac97 *ac97, const char *src, 87 static void snd_ac97_restore_status(struct snd_ac97 *ac97); 88 static void snd_ac97_restore_iec958(struct snd_ac97 *ac97);
|
/sound/soc/tegra/ |
D | tegra20_ac97.c | 46 static void tegra20_ac97_codec_reset(struct snd_ac97 *ac97) in tegra20_ac97_codec_reset() argument 68 static void tegra20_ac97_codec_warm_reset(struct snd_ac97 *ac97) in tegra20_ac97_codec_warm_reset() argument 151 static inline void tegra20_ac97_start_playback(struct tegra20_ac97 *ac97) in tegra20_ac97_start_playback() argument 153 regmap_update_bits(ac97->regmap, TEGRA20_AC97_FIFO1_SCR, in tegra20_ac97_start_playback() 157 regmap_update_bits(ac97->regmap, TEGRA20_AC97_CTRL, in tegra20_ac97_start_playback() 164 static inline void tegra20_ac97_stop_playback(struct tegra20_ac97 *ac97) in tegra20_ac97_stop_playback() argument 166 regmap_update_bits(ac97->regmap, TEGRA20_AC97_FIFO1_SCR, in tegra20_ac97_stop_playback() 169 regmap_update_bits(ac97->regmap, TEGRA20_AC97_CTRL, in tegra20_ac97_stop_playback() 173 static inline void tegra20_ac97_start_capture(struct tegra20_ac97 *ac97) in tegra20_ac97_start_capture() argument 175 regmap_update_bits(ac97->regmap, TEGRA20_AC97_FIFO1_SCR, in tegra20_ac97_start_capture() [all …]
|
/sound/ |
D | ac97_bus.c | 30 static bool snd_ac97_check_id(struct snd_ac97 *ac97, unsigned int id, in snd_ac97_check_id() argument 33 ac97->id = ac97->bus->ops->read(ac97, AC97_VENDOR_ID1) << 16; in snd_ac97_check_id() 34 ac97->id |= ac97->bus->ops->read(ac97, AC97_VENDOR_ID2); in snd_ac97_check_id() 36 if (ac97->id == 0x0 || ac97->id == 0xffffffff) in snd_ac97_check_id() 39 if (id != 0 && id != (ac97->id & id_mask)) in snd_ac97_check_id() 59 int snd_ac97_reset(struct snd_ac97 *ac97, bool try_warm, unsigned int id, in snd_ac97_reset() argument 62 struct snd_ac97_bus_ops *ops = ac97->bus->ops; in snd_ac97_reset() 65 ops->warm_reset(ac97); in snd_ac97_reset() 66 if (snd_ac97_check_id(ac97, id, id_mask)) in snd_ac97_reset() 71 ops->reset(ac97); in snd_ac97_reset() [all …]
|
/sound/soc/ |
D | soc-ac97.c | 130 static int snd_soc_ac97_init_gpio(struct snd_ac97 *ac97, in snd_soc_ac97_init_gpio() argument 139 ac97->gpio_priv = gpio_priv; in snd_soc_ac97_init_gpio() 152 static void snd_soc_ac97_free_gpio(struct snd_ac97 *ac97) in snd_soc_ac97_free_gpio() argument 154 gpiochip_remove(&ac97->gpio_priv->gpio_chip); in snd_soc_ac97_free_gpio() 157 static int snd_soc_ac97_init_gpio(struct snd_ac97 *ac97, in snd_soc_ac97_init_gpio() argument 163 static void snd_soc_ac97_free_gpio(struct snd_ac97 *ac97) in snd_soc_ac97_free_gpio() argument 180 struct snd_ac97 *ac97; in snd_soc_alloc_ac97_codec() local 182 ac97 = kzalloc(sizeof(struct snd_ac97), GFP_KERNEL); in snd_soc_alloc_ac97_codec() 183 if (ac97 == NULL) in snd_soc_alloc_ac97_codec() 186 ac97->bus = &soc_ac97_bus; in snd_soc_alloc_ac97_codec() [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 | 28 void olpc_analog_input(struct snd_ac97 *ac97, int on) in olpc_analog_input() argument 36 err = snd_ac97_update_bits(ac97, AC97_AD_TEST2, in olpc_analog_input() 39 dev_err(ac97->bus->card->dev, in olpc_analog_input() 51 void olpc_mic_bias(struct snd_ac97 *ac97, int on) in olpc_mic_bias() argument 59 err = snd_ac97_update_bits(ac97, AC97_AD_MISC, in olpc_mic_bias() 62 dev_err(ac97->bus->card->dev, "setting MIC Bias - %d\n", err); in olpc_mic_bias() 85 olpc_analog_input(cs5535au->ac97, v->value.integer.value[0]); in olpc_dc_put() 102 struct snd_ac97 *ac97 = cs5535au->ac97; in olpc_mic_get() local 105 i = (snd_ac97_read(ac97, AC97_AD_MISC) >> AC97_AD_VREFD_SHIFT) & 0x1; in olpc_mic_get() 114 olpc_mic_bias(cs5535au->ac97, v->value.integer.value[0]); in olpc_mic_put() [all …]
|
D | cs5535audio.c | 135 static void snd_cs5535audio_ac97_codec_write(struct snd_ac97 *ac97, in snd_cs5535audio_ac97_codec_write() argument 138 struct cs5535audio *cs5535au = ac97->private_data; in snd_cs5535audio_ac97_codec_write() 142 static unsigned short snd_cs5535audio_ac97_codec_read(struct snd_ac97 *ac97, in snd_cs5535audio_ac97_codec_read() argument 145 struct cs5535audio *cs5535au = ac97->private_data; in snd_cs5535audio_ac97_codec_read() 153 struct snd_ac97_template ac97; in snd_cs5535audio_mixer() local 163 memset(&ac97, 0, sizeof(ac97)); in snd_cs5535audio_mixer() 164 ac97.scaps = AC97_SCAP_AUDIO | AC97_SCAP_SKIP_MODEM in snd_cs5535audio_mixer() 166 ac97.private_data = cs5535au; in snd_cs5535audio_mixer() 167 ac97.pci = cs5535au->pci; in snd_cs5535audio_mixer() 170 olpc_prequirks(card, &ac97); in snd_cs5535audio_mixer() [all …]
|
/sound/soc/codecs/ |
D | ac97.c | 40 struct snd_ac97 *ac97 = snd_soc_codec_get_drvdata(codec); in ac97_prepare() local 44 return snd_ac97_set_rate(ac97, reg, substream->runtime->rate); in ac97_prepare() 70 struct snd_ac97 *ac97; in ac97_soc_probe() local 82 ret = snd_ac97_mixer(ac97_bus, &ac97_template, &ac97); in ac97_soc_probe() 86 snd_soc_codec_set_drvdata(codec, ac97); in ac97_soc_probe() 94 struct snd_ac97 *ac97 = snd_soc_codec_get_drvdata(codec); in ac97_soc_suspend() local 96 snd_ac97_suspend(ac97); in ac97_soc_suspend() 104 struct snd_ac97 *ac97 = snd_soc_codec_get_drvdata(codec); in ac97_soc_resume() local 106 snd_ac97_resume(ac97); in ac97_soc_resume()
|
D | ad1980.c | 210 struct snd_ac97 *ac97 = snd_soc_codec_get_drvdata(codec); in ad1980_reset() local 215 ret = snd_ac97_reset(ac97, true, AD1980_VENDOR_ID, in ad1980_reset() 237 struct snd_ac97 *ac97; in ad1980_soc_probe() local 243 ac97 = snd_soc_new_ac97_codec(codec, 0, 0); in ad1980_soc_probe() 244 if (IS_ERR(ac97)) { in ad1980_soc_probe() 245 ret = PTR_ERR(ac97); in ad1980_soc_probe() 250 regmap = regmap_init_ac97(ac97, &ad1980_regmap_config); in ad1980_soc_probe() 257 snd_soc_codec_set_drvdata(codec, ac97); in ad1980_soc_probe() 285 snd_soc_free_ac97_codec(ac97); in ad1980_soc_probe() 291 struct snd_ac97 *ac97 = snd_soc_codec_get_drvdata(codec); in ad1980_soc_remove() local [all …]
|
D | stac9766.c | 222 struct snd_ac97 *ac97 = snd_soc_codec_get_drvdata(codec); in stac9766_codec_resume() local 224 return snd_ac97_reset(ac97, true, STAC9766_VENDOR_ID, in stac9766_codec_resume() 277 struct snd_ac97 *ac97; in stac9766_codec_probe() local 281 ac97 = snd_soc_new_ac97_codec(codec, STAC9766_VENDOR_ID, in stac9766_codec_probe() 283 if (IS_ERR(ac97)) in stac9766_codec_probe() 284 return PTR_ERR(ac97); in stac9766_codec_probe() 286 regmap = regmap_init_ac97(ac97, &stac9766_regmap_config); in stac9766_codec_probe() 293 snd_soc_codec_set_drvdata(codec, ac97); in stac9766_codec_probe() 297 snd_soc_free_ac97_codec(ac97); in stac9766_codec_probe() 303 struct snd_ac97 *ac97 = snd_soc_codec_get_drvdata(codec); in stac9766_codec_remove() local [all …]
|
D | wm9705.c | 295 struct snd_ac97 *ac97 = snd_soc_codec_get_drvdata(codec); in wm9705_soc_resume() local 298 ret = snd_ac97_reset(ac97, true, WM9705_VENDOR_ID, in wm9705_soc_resume() 314 struct snd_ac97 *ac97; in wm9705_soc_probe() local 318 ac97 = snd_soc_new_ac97_codec(codec, WM9705_VENDOR_ID, in wm9705_soc_probe() 320 if (IS_ERR(ac97)) { in wm9705_soc_probe() 322 return PTR_ERR(ac97); in wm9705_soc_probe() 325 regmap = regmap_init_ac97(ac97, &wm9705_regmap_config); in wm9705_soc_probe() 331 snd_soc_codec_set_drvdata(codec, ac97); in wm9705_soc_probe() 336 snd_soc_free_ac97_codec(ac97); in wm9705_soc_probe() 342 struct snd_ac97 *ac97 = snd_soc_codec_get_drvdata(codec); in wm9705_soc_remove() local [all …]
|
/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 | 190 struct snd_ac97 *ac97; member 211 struct snd_ac97 *ac97; member 345 static void snd_intel8x0m_codec_write(struct snd_ac97 *ac97, in snd_intel8x0m_codec_write() argument 349 struct intel8x0m *chip = ac97->private_data; in snd_intel8x0m_codec_write() 351 if (snd_intel8x0m_codec_semaphore(chip, ac97->num) < 0) { in snd_intel8x0m_codec_write() 355 ac97->num, reg); in snd_intel8x0m_codec_write() 357 iaputword(chip, reg + ac97->num * 0x80, val); in snd_intel8x0m_codec_write() 360 static unsigned short snd_intel8x0m_codec_read(struct snd_ac97 *ac97, in snd_intel8x0m_codec_read() argument 363 struct intel8x0m *chip = ac97->private_data; in snd_intel8x0m_codec_read() 367 if (snd_intel8x0m_codec_semaphore(chip, ac97->num) < 0) { in snd_intel8x0m_codec_read() [all …]
|
D | via82xx_modem.c | 255 struct snd_ac97 *ac97; member 408 static void snd_via82xx_codec_wait(struct snd_ac97 *ac97) in snd_via82xx_codec_wait() argument 410 struct via82xx_modem *chip = ac97->private_data; in snd_via82xx_codec_wait() 412 err = snd_via82xx_codec_ready(chip, ac97->num); in snd_via82xx_codec_wait() 417 static void snd_via82xx_codec_write(struct snd_ac97 *ac97, in snd_via82xx_codec_write() argument 421 struct via82xx_modem *chip = ac97->private_data; in snd_via82xx_codec_write() 427 xval = !ac97->num ? VIA_REG_AC97_CODEC_ID_PRIMARY : VIA_REG_AC97_CODEC_ID_SECONDARY; in snd_via82xx_codec_write() 432 snd_via82xx_codec_ready(chip, ac97->num); in snd_via82xx_codec_write() 435 static unsigned short snd_via82xx_codec_read(struct snd_ac97 *ac97, unsigned short reg) in snd_via82xx_codec_read() argument 437 struct via82xx_modem *chip = ac97->private_data; in snd_via82xx_codec_read() [all …]
|
D | sis7019.c | 121 struct snd_ac97 *ac97[3]; member 695 runtime->hw.rates = sis->ac97[0]->rates[AC97_RATES_ADC]; in sis_capture_open() 711 rc = snd_ac97_set_rate(sis->ac97[0], AC97_PCM_LR_ADC_RATE, in sis_capture_hw_params() 993 static void sis_ac97_write(struct snd_ac97 *ac97, unsigned short reg, in sis_ac97_write() argument 1001 sis_ac97_rw(ac97->private_data, ac97->num, in sis_ac97_write() 1002 (val << 16) | (reg << 8) | cmd[ac97->num]); in sis_ac97_write() 1005 static unsigned short sis_ac97_read(struct snd_ac97 *ac97, unsigned short reg) in sis_ac97_read() argument 1012 return sis_ac97_rw(ac97->private_data, ac97->num, in sis_ac97_read() 1013 (reg << 8) | cmd[ac97->num]); in sis_ac97_read() 1019 struct snd_ac97_template ac97; in sis_mixer_create() local [all …]
|
D | via82xx.c | 395 struct snd_ac97 *ac97; member 554 static void snd_via82xx_codec_wait(struct snd_ac97 *ac97) in snd_via82xx_codec_wait() argument 556 struct via82xx *chip = ac97->private_data; in snd_via82xx_codec_wait() 558 err = snd_via82xx_codec_ready(chip, ac97->num); in snd_via82xx_codec_wait() 564 static void snd_via82xx_codec_write(struct snd_ac97 *ac97, in snd_via82xx_codec_write() argument 568 struct via82xx *chip = ac97->private_data; in snd_via82xx_codec_write() 571 xval = !ac97->num ? VIA_REG_AC97_CODEC_ID_PRIMARY : VIA_REG_AC97_CODEC_ID_SECONDARY; in snd_via82xx_codec_write() 576 snd_via82xx_codec_ready(chip, ac97->num); in snd_via82xx_codec_write() 579 static unsigned short snd_via82xx_codec_read(struct snd_ac97 *ac97, unsigned short reg) in snd_via82xx_codec_read() argument 581 struct via82xx *chip = ac97->private_data; in snd_via82xx_codec_read() [all …]
|
/sound/arm/ |
D | pxa2xx-ac97-lib.c | 49 unsigned short pxa2xx_ac97_read(struct snd_ac97 *ac97, unsigned short reg) in pxa2xx_ac97_read() argument 58 reg_addr = ac97->num ? &SMC_REG_BASE : &PMC_REG_BASE; in pxa2xx_ac97_read() 60 reg_addr = ac97->num ? &SAC_REG_BASE : &PAC_REG_BASE; in pxa2xx_ac97_read() 89 void pxa2xx_ac97_write(struct snd_ac97 *ac97, unsigned short reg, in pxa2xx_ac97_write() argument 98 reg_addr = ac97->num ? &SMC_REG_BASE : &PMC_REG_BASE; in pxa2xx_ac97_write() 100 reg_addr = ac97->num ? &SAC_REG_BASE : &PAC_REG_BASE; in pxa2xx_ac97_write() 191 bool pxa2xx_ac97_try_warm_reset(struct snd_ac97 *ac97) in pxa2xx_ac97_try_warm_reset() argument 228 bool pxa2xx_ac97_try_cold_reset(struct snd_ac97 *ac97) in pxa2xx_ac97_try_cold_reset() argument 266 void pxa2xx_ac97_finish_reset(struct snd_ac97 *ac97) in pxa2xx_ac97_finish_reset() argument
|
D | Makefile | 14 snd-pxa2xx-lib-$(CONFIG_SND_PXA2XX_LIB_AC97) += pxa2xx-ac97-lib.o 16 obj-$(CONFIG_SND_PXA2XX_AC97) += snd-pxa2xx-ac97.o 17 snd-pxa2xx-ac97-objs := pxa2xx-ac97.o
|
/sound/soc/txx9/ |
D | txx9aclc-ac97.c | 48 static unsigned short txx9aclc_ac97_read(struct snd_ac97 *ac97, in txx9aclc_ac97_read() argument 55 if (!(__raw_readl(base + ACINTSTS) & ACINT_CODECRDY(ac97->num))) in txx9aclc_ac97_read() 57 reg |= ac97->num << 7; in txx9aclc_ac97_read() 81 static void txx9aclc_ac97_write(struct snd_ac97 *ac97, unsigned short reg, in txx9aclc_ac97_write() argument 87 __raw_writel(((reg | (ac97->num << 7)) << ACREGACC_REG_SHIFT) | in txx9aclc_ac97_write() 98 static void txx9aclc_ac97_cold_reset(struct snd_ac97 *ac97) in txx9aclc_ac97_cold_reset() argument 102 u32 ready = ACINT_CODECRDY(ac97->num) | ACINT_REGACCRDY; in txx9aclc_ac97_cold_reset() 113 dev_err(&ac97->dev, "primary codec is not ready " in txx9aclc_ac97_cold_reset()
|
/sound/soc/blackfin/ |
D | Makefile | 3 snd-bf5xx-ac97-objs := bf5xx-ac97-pcm.o 7 snd-soc-bf5xx-ac97-objs := bf5xx-ac97.o 11 obj-$(CONFIG_SND_BF5XX_AC97) += snd-bf5xx-ac97.o 15 obj-$(CONFIG_SND_BF5XX_SOC_AC97) += snd-soc-bf5xx-ac97.o
|