cs5535au 63 sound/pci/cs5535audio/cs5535audio.c static void wait_till_cmd_acked(struct cs5535audio *cs5535au, unsigned long timeout) cs5535au 67 sound/pci/cs5535audio/cs5535audio.c tmp = cs_readl(cs5535au, ACC_CODEC_CNTL); cs5535au 73 sound/pci/cs5535audio/cs5535audio.c dev_err(cs5535au->card->dev, cs5535au 77 sound/pci/cs5535audio/cs5535audio.c static unsigned short snd_cs5535audio_codec_read(struct cs5535audio *cs5535au, cs5535au 88 sound/pci/cs5535audio/cs5535audio.c cs_writel(cs5535au, ACC_CODEC_CNTL, regdata); cs5535au 89 sound/pci/cs5535audio/cs5535audio.c wait_till_cmd_acked(cs5535au, 50); cs5535au 93 sound/pci/cs5535audio/cs5535audio.c val = cs_readl(cs5535au, ACC_CODEC_STATUS); cs5535au 99 sound/pci/cs5535audio/cs5535audio.c dev_err(cs5535au->card->dev, cs5535au 106 sound/pci/cs5535audio/cs5535audio.c static void snd_cs5535audio_codec_write(struct cs5535audio *cs5535au, cs5535au 117 sound/pci/cs5535audio/cs5535audio.c cs_writel(cs5535au, ACC_CODEC_CNTL, regdata); cs5535au 118 sound/pci/cs5535audio/cs5535audio.c wait_till_cmd_acked(cs5535au, 50); cs5535au 124 sound/pci/cs5535audio/cs5535audio.c struct cs5535audio *cs5535au = ac97->private_data; cs5535au 125 sound/pci/cs5535audio/cs5535audio.c snd_cs5535audio_codec_write(cs5535au, reg, val); cs5535au 131 sound/pci/cs5535audio/cs5535audio.c struct cs5535audio *cs5535au = ac97->private_data; cs5535au 132 sound/pci/cs5535audio/cs5535audio.c return snd_cs5535audio_codec_read(cs5535au, reg); cs5535au 135 sound/pci/cs5535audio/cs5535audio.c static int snd_cs5535audio_mixer(struct cs5535audio *cs5535au) cs5535au 137 sound/pci/cs5535audio/cs5535audio.c struct snd_card *card = cs5535au->card; cs5535au 152 sound/pci/cs5535audio/cs5535audio.c ac97.private_data = cs5535au; cs5535au 153 sound/pci/cs5535audio/cs5535audio.c ac97.pci = cs5535au->pci; cs5535au 158 sound/pci/cs5535audio/cs5535audio.c if ((err = snd_ac97_mixer(pbus, &ac97, &cs5535au->ac97)) < 0) { cs5535au 163 sound/pci/cs5535audio/cs5535audio.c snd_ac97_tune_hardware(cs5535au->ac97, ac97_quirks, ac97_quirk); cs5535au 165 sound/pci/cs5535audio/cs5535audio.c err = olpc_quirks(card, cs5535au->ac97); cs5535au 174 sound/pci/cs5535audio/cs5535audio.c static void process_bm0_irq(struct cs5535audio *cs5535au) cs5535au 177 sound/pci/cs5535audio/cs5535audio.c spin_lock(&cs5535au->reg_lock); cs5535au 178 sound/pci/cs5535audio/cs5535audio.c bm_stat = cs_readb(cs5535au, ACC_BM0_STATUS); cs5535au 179 sound/pci/cs5535audio/cs5535audio.c spin_unlock(&cs5535au->reg_lock); cs5535au 181 sound/pci/cs5535audio/cs5535audio.c snd_pcm_period_elapsed(cs5535au->playback_substream); cs5535au 183 sound/pci/cs5535audio/cs5535audio.c dev_err(cs5535au->card->dev, cs5535au 189 sound/pci/cs5535audio/cs5535audio.c static void process_bm1_irq(struct cs5535audio *cs5535au) cs5535au 192 sound/pci/cs5535audio/cs5535audio.c spin_lock(&cs5535au->reg_lock); cs5535au 193 sound/pci/cs5535audio/cs5535audio.c bm_stat = cs_readb(cs5535au, ACC_BM1_STATUS); cs5535au 194 sound/pci/cs5535audio/cs5535audio.c spin_unlock(&cs5535au->reg_lock); cs5535au 196 sound/pci/cs5535audio/cs5535audio.c snd_pcm_period_elapsed(cs5535au->capture_substream); cs5535au 203 sound/pci/cs5535audio/cs5535audio.c struct cs5535audio *cs5535au = dev_id; cs5535au 205 sound/pci/cs5535audio/cs5535audio.c if (cs5535au == NULL) cs5535au 208 sound/pci/cs5535audio/cs5535audio.c acc_irq_stat = cs_readw(cs5535au, ACC_IRQ_STATUS); cs5535au 216 sound/pci/cs5535audio/cs5535audio.c cs_readl(cs5535au, ACC_GPIO_STATUS); cs5535au 219 sound/pci/cs5535audio/cs5535audio.c cs_readl(cs5535au, ACC_GPIO_STATUS); cs5535au 222 sound/pci/cs5535audio/cs5535audio.c process_bm0_irq(cs5535au); cs5535au 225 sound/pci/cs5535audio/cs5535audio.c process_bm1_irq(cs5535au); cs5535au 228 sound/pci/cs5535audio/cs5535audio.c dev_err(cs5535au->card->dev, cs5535au 238 sound/pci/cs5535audio/cs5535audio.c static int snd_cs5535audio_free(struct cs5535audio *cs5535au) cs5535au 240 sound/pci/cs5535audio/cs5535audio.c synchronize_irq(cs5535au->irq); cs5535au 241 sound/pci/cs5535audio/cs5535audio.c pci_set_power_state(cs5535au->pci, PCI_D3hot); cs5535au 243 sound/pci/cs5535audio/cs5535audio.c if (cs5535au->irq >= 0) cs5535au 244 sound/pci/cs5535audio/cs5535audio.c free_irq(cs5535au->irq, cs5535au); cs5535au 246 sound/pci/cs5535audio/cs5535audio.c pci_release_regions(cs5535au->pci); cs5535au 247 sound/pci/cs5535audio/cs5535audio.c pci_disable_device(cs5535au->pci); cs5535au 248 sound/pci/cs5535audio/cs5535audio.c kfree(cs5535au); cs5535au 254 sound/pci/cs5535audio/cs5535audio.c struct cs5535audio *cs5535au = device->device_data; cs5535au 255 sound/pci/cs5535audio/cs5535audio.c return snd_cs5535audio_free(cs5535au); cs5535au 262 sound/pci/cs5535audio/cs5535audio.c struct cs5535audio *cs5535au; cs5535au 280 sound/pci/cs5535audio/cs5535audio.c cs5535au = kzalloc(sizeof(*cs5535au), GFP_KERNEL); cs5535au 281 sound/pci/cs5535audio/cs5535audio.c if (cs5535au == NULL) { cs5535au 286 sound/pci/cs5535audio/cs5535audio.c spin_lock_init(&cs5535au->reg_lock); cs5535au 287 sound/pci/cs5535audio/cs5535audio.c cs5535au->card = card; cs5535au 288 sound/pci/cs5535audio/cs5535audio.c cs5535au->pci = pci; cs5535au 289 sound/pci/cs5535audio/cs5535audio.c cs5535au->irq = -1; cs5535au 292 sound/pci/cs5535audio/cs5535audio.c kfree(cs5535au); cs5535au 296 sound/pci/cs5535audio/cs5535audio.c cs5535au->port = pci_resource_start(pci, 0); cs5535au 299 sound/pci/cs5535audio/cs5535audio.c IRQF_SHARED, KBUILD_MODNAME, cs5535au)) { cs5535au 305 sound/pci/cs5535audio/cs5535audio.c cs5535au->irq = pci->irq; cs5535au 309 sound/pci/cs5535audio/cs5535audio.c cs5535au, &ops)) < 0) cs5535au 312 sound/pci/cs5535audio/cs5535audio.c *rcs5535au = cs5535au; cs5535au 316 sound/pci/cs5535audio/cs5535audio.c snd_cs5535audio_free(cs5535au); cs5535au 329 sound/pci/cs5535audio/cs5535audio.c struct cs5535audio *cs5535au; cs5535au 344 sound/pci/cs5535audio/cs5535audio.c if ((err = snd_cs5535audio_create(card, pci, &cs5535au)) < 0) cs5535au 347 sound/pci/cs5535audio/cs5535audio.c card->private_data = cs5535au; cs5535au 349 sound/pci/cs5535audio/cs5535audio.c if ((err = snd_cs5535audio_mixer(cs5535au)) < 0) cs5535au 352 sound/pci/cs5535audio/cs5535audio.c if ((err = snd_cs5535audio_pcm(cs5535au)) < 0) cs5535au 360 sound/pci/cs5535audio/cs5535audio.c cs5535au->port, cs5535au->irq); cs5535au 5 sound/pci/cs5535audio/cs5535audio.h #define cs_writel(cs5535au, reg, val) outl(val, (cs5535au)->port + reg) cs5535au 6 sound/pci/cs5535audio/cs5535audio.h #define cs_writeb(cs5535au, reg, val) outb(val, (cs5535au)->port + reg) cs5535au 7 sound/pci/cs5535audio/cs5535audio.h #define cs_readl(cs5535au, reg) inl((cs5535au)->port + reg) cs5535au 8 sound/pci/cs5535audio/cs5535audio.h #define cs_readw(cs5535au, reg) inw((cs5535au)->port + reg) cs5535au 9 sound/pci/cs5535audio/cs5535audio.h #define cs_readb(cs5535au, reg) inb((cs5535au)->port + reg) cs5535au 61 sound/pci/cs5535audio/cs5535audio.h void (*enable_dma)(struct cs5535audio *cs5535au); cs5535au 62 sound/pci/cs5535audio/cs5535audio.h void (*disable_dma)(struct cs5535audio *cs5535au); cs5535au 63 sound/pci/cs5535audio/cs5535audio.h void (*pause_dma)(struct cs5535audio *cs5535au); cs5535au 64 sound/pci/cs5535audio/cs5535audio.h void (*setup_prd)(struct cs5535audio *cs5535au, u32 prd_addr); cs5535au 65 sound/pci/cs5535audio/cs5535audio.h u32 (*read_prd)(struct cs5535audio *cs5535au); cs5535au 66 sound/pci/cs5535audio/cs5535audio.h u32 (*read_dma_pntr)(struct cs5535audio *cs5535au); cs5535au 79 sound/pci/cs5535audio/cs5535audio_olpc.c struct cs5535audio *cs5535au = snd_kcontrol_chip(kctl); cs5535au 81 sound/pci/cs5535audio/cs5535audio_olpc.c olpc_analog_input(cs5535au->ac97, v->value.integer.value[0]); cs5535au 97 sound/pci/cs5535audio/cs5535audio_olpc.c struct cs5535audio *cs5535au = snd_kcontrol_chip(kctl); cs5535au 98 sound/pci/cs5535audio/cs5535audio_olpc.c struct snd_ac97 *ac97 = cs5535au->ac97; cs5535au 108 sound/pci/cs5535audio/cs5535audio_olpc.c struct cs5535audio *cs5535au = snd_kcontrol_chip(kctl); cs5535au 110 sound/pci/cs5535audio/cs5535audio_olpc.c olpc_mic_bias(cs5535au->ac97, v->value.integer.value[0]); cs5535au 82 sound/pci/cs5535audio/cs5535audio_pcm.c struct cs5535audio *cs5535au = snd_pcm_substream_chip(substream); cs5535au 86 sound/pci/cs5535audio/cs5535audio_pcm.c runtime->hw.rates = cs5535au->ac97->rates[AC97_RATES_FRONT_DAC]; cs5535au 88 sound/pci/cs5535audio/cs5535audio_pcm.c cs5535au->playback_substream = substream; cs5535au 89 sound/pci/cs5535audio/cs5535audio_pcm.c runtime->private_data = &(cs5535au->dmas[CS5535AUDIO_DMA_PLAYBACK]); cs5535au 105 sound/pci/cs5535audio/cs5535audio_pcm.c static int cs5535audio_build_dma_packets(struct cs5535audio *cs5535au, cs5535au 120 sound/pci/cs5535audio/cs5535audio_pcm.c snd_dma_pci_data(cs5535au->pci), cs5535au 154 sound/pci/cs5535audio/cs5535audio_pcm.c spin_lock_irq(&cs5535au->reg_lock); cs5535au 155 sound/pci/cs5535audio/cs5535audio_pcm.c dma->ops->disable_dma(cs5535au); cs5535au 156 sound/pci/cs5535audio/cs5535audio_pcm.c dma->ops->setup_prd(cs5535au, jmpprd_addr); cs5535au 157 sound/pci/cs5535audio/cs5535audio_pcm.c spin_unlock_irq(&cs5535au->reg_lock); cs5535au 161 sound/pci/cs5535audio/cs5535audio_pcm.c static void cs5535audio_playback_enable_dma(struct cs5535audio *cs5535au) cs5535au 163 sound/pci/cs5535audio/cs5535audio_pcm.c cs_writeb(cs5535au, ACC_BM0_CMD, BM_CTL_EN); cs5535au 166 sound/pci/cs5535audio/cs5535audio_pcm.c static void cs5535audio_playback_disable_dma(struct cs5535audio *cs5535au) cs5535au 168 sound/pci/cs5535audio/cs5535audio_pcm.c cs_writeb(cs5535au, ACC_BM0_CMD, 0); cs5535au 171 sound/pci/cs5535audio/cs5535audio_pcm.c static void cs5535audio_playback_pause_dma(struct cs5535audio *cs5535au) cs5535au 173 sound/pci/cs5535audio/cs5535audio_pcm.c cs_writeb(cs5535au, ACC_BM0_CMD, BM_CTL_PAUSE); cs5535au 176 sound/pci/cs5535audio/cs5535audio_pcm.c static void cs5535audio_playback_setup_prd(struct cs5535audio *cs5535au, cs5535au 179 sound/pci/cs5535audio/cs5535audio_pcm.c cs_writel(cs5535au, ACC_BM0_PRD, prd_addr); cs5535au 182 sound/pci/cs5535audio/cs5535audio_pcm.c static u32 cs5535audio_playback_read_prd(struct cs5535audio *cs5535au) cs5535au 184 sound/pci/cs5535audio/cs5535audio_pcm.c return cs_readl(cs5535au, ACC_BM0_PRD); cs5535au 187 sound/pci/cs5535audio/cs5535audio_pcm.c static u32 cs5535audio_playback_read_dma_pntr(struct cs5535audio *cs5535au) cs5535au 189 sound/pci/cs5535audio/cs5535audio_pcm.c return cs_readl(cs5535au, ACC_BM0_PNTR); cs5535au 192 sound/pci/cs5535audio/cs5535audio_pcm.c static void cs5535audio_capture_enable_dma(struct cs5535audio *cs5535au) cs5535au 194 sound/pci/cs5535audio/cs5535audio_pcm.c cs_writeb(cs5535au, ACC_BM1_CMD, BM_CTL_EN); cs5535au 197 sound/pci/cs5535audio/cs5535audio_pcm.c static void cs5535audio_capture_disable_dma(struct cs5535audio *cs5535au) cs5535au 199 sound/pci/cs5535audio/cs5535audio_pcm.c cs_writeb(cs5535au, ACC_BM1_CMD, 0); cs5535au 202 sound/pci/cs5535audio/cs5535audio_pcm.c static void cs5535audio_capture_pause_dma(struct cs5535audio *cs5535au) cs5535au 204 sound/pci/cs5535audio/cs5535audio_pcm.c cs_writeb(cs5535au, ACC_BM1_CMD, BM_CTL_PAUSE); cs5535au 207 sound/pci/cs5535audio/cs5535audio_pcm.c static void cs5535audio_capture_setup_prd(struct cs5535audio *cs5535au, cs5535au 210 sound/pci/cs5535audio/cs5535audio_pcm.c cs_writel(cs5535au, ACC_BM1_PRD, prd_addr); cs5535au 213 sound/pci/cs5535audio/cs5535audio_pcm.c static u32 cs5535audio_capture_read_prd(struct cs5535audio *cs5535au) cs5535au 215 sound/pci/cs5535audio/cs5535audio_pcm.c return cs_readl(cs5535au, ACC_BM1_PRD); cs5535au 218 sound/pci/cs5535audio/cs5535audio_pcm.c static u32 cs5535audio_capture_read_dma_pntr(struct cs5535audio *cs5535au) cs5535au 220 sound/pci/cs5535audio/cs5535audio_pcm.c return cs_readl(cs5535au, ACC_BM1_PNTR); cs5535au 223 sound/pci/cs5535audio/cs5535audio_pcm.c static void cs5535audio_clear_dma_packets(struct cs5535audio *cs5535au, cs5535au 235 sound/pci/cs5535audio/cs5535audio_pcm.c struct cs5535audio *cs5535au = snd_pcm_substream_chip(substream); cs5535au 246 sound/pci/cs5535audio/cs5535audio_pcm.c err = cs5535audio_build_dma_packets(cs5535au, dma, substream, cs5535au 257 sound/pci/cs5535audio/cs5535audio_pcm.c struct cs5535audio *cs5535au = snd_pcm_substream_chip(substream); cs5535au 261 sound/pci/cs5535audio/cs5535audio_pcm.c if (substream == cs5535au->playback_substream) cs5535au 262 sound/pci/cs5535audio/cs5535audio_pcm.c snd_ac97_update_power(cs5535au->ac97, cs5535au 265 sound/pci/cs5535audio/cs5535audio_pcm.c snd_ac97_update_power(cs5535au->ac97, cs5535au 269 sound/pci/cs5535audio/cs5535audio_pcm.c cs5535audio_clear_dma_packets(cs5535au, dma, substream); cs5535au 275 sound/pci/cs5535audio/cs5535audio_pcm.c struct cs5535audio *cs5535au = snd_pcm_substream_chip(substream); cs5535au 276 sound/pci/cs5535audio/cs5535audio_pcm.c return snd_ac97_set_rate(cs5535au->ac97, AC97_PCM_FRONT_DAC_RATE, cs5535au 282 sound/pci/cs5535audio/cs5535audio_pcm.c struct cs5535audio *cs5535au = snd_pcm_substream_chip(substream); cs5535au 286 sound/pci/cs5535audio/cs5535audio_pcm.c spin_lock(&cs5535au->reg_lock); cs5535au 289 sound/pci/cs5535audio/cs5535audio_pcm.c dma->ops->pause_dma(cs5535au); cs5535au 292 sound/pci/cs5535audio/cs5535audio_pcm.c dma->ops->enable_dma(cs5535au); cs5535au 295 sound/pci/cs5535audio/cs5535audio_pcm.c dma->ops->enable_dma(cs5535au); cs5535au 298 sound/pci/cs5535audio/cs5535audio_pcm.c dma->ops->enable_dma(cs5535au); cs5535au 301 sound/pci/cs5535audio/cs5535audio_pcm.c dma->ops->disable_dma(cs5535au); cs5535au 304 sound/pci/cs5535audio/cs5535audio_pcm.c dma->ops->disable_dma(cs5535au); cs5535au 307 sound/pci/cs5535audio/cs5535audio_pcm.c dev_err(cs5535au->card->dev, "unhandled trigger\n"); cs5535au 311 sound/pci/cs5535audio/cs5535audio_pcm.c spin_unlock(&cs5535au->reg_lock); cs5535au 318 sound/pci/cs5535audio/cs5535audio_pcm.c struct cs5535audio *cs5535au = snd_pcm_substream_chip(substream); cs5535au 323 sound/pci/cs5535audio/cs5535audio_pcm.c curdma = dma->ops->read_dma_pntr(cs5535au); cs5535au 325 sound/pci/cs5535audio/cs5535audio_pcm.c dev_err(cs5535au->card->dev, "curdma=%x < %x bufaddr.\n", cs5535au 331 sound/pci/cs5535audio/cs5535audio_pcm.c dev_err(cs5535au->card->dev, "diff=%x >= %x buf_bytes.\n", cs5535au 341 sound/pci/cs5535audio/cs5535audio_pcm.c struct cs5535audio *cs5535au = snd_pcm_substream_chip(substream); cs5535au 345 sound/pci/cs5535audio/cs5535audio_pcm.c runtime->hw.rates = cs5535au->ac97->rates[AC97_RATES_ADC]; cs5535au 347 sound/pci/cs5535audio/cs5535audio_pcm.c cs5535au->capture_substream = substream; cs5535au 348 sound/pci/cs5535audio/cs5535audio_pcm.c runtime->private_data = &(cs5535au->dmas[CS5535AUDIO_DMA_CAPTURE]); cs5535au 352 sound/pci/cs5535audio/cs5535audio_pcm.c olpc_capture_open(cs5535au->ac97); cs5535au 358 sound/pci/cs5535audio/cs5535audio_pcm.c struct cs5535audio *cs5535au = snd_pcm_substream_chip(substream); cs5535au 359 sound/pci/cs5535audio/cs5535audio_pcm.c olpc_capture_close(cs5535au->ac97); cs5535au 365 sound/pci/cs5535audio/cs5535audio_pcm.c struct cs5535audio *cs5535au = snd_pcm_substream_chip(substream); cs5535au 366 sound/pci/cs5535audio/cs5535audio_pcm.c return snd_ac97_set_rate(cs5535au->ac97, AC97_PCM_LR_ADC_RATE, cs5535au 412 sound/pci/cs5535audio/cs5535audio_pcm.c int snd_cs5535audio_pcm(struct cs5535audio *cs5535au) cs5535au 417 sound/pci/cs5535audio/cs5535audio_pcm.c err = snd_pcm_new(cs5535au->card, "CS5535 Audio", 0, 1, 1, &pcm); cs5535au 421 sound/pci/cs5535audio/cs5535audio_pcm.c cs5535au->dmas[CS5535AUDIO_DMA_PLAYBACK].ops = cs5535au 423 sound/pci/cs5535audio/cs5535audio_pcm.c cs5535au->dmas[CS5535AUDIO_DMA_CAPTURE].ops = cs5535au 430 sound/pci/cs5535audio/cs5535audio_pcm.c pcm->private_data = cs5535au; cs5535au 435 sound/pci/cs5535audio/cs5535audio_pcm.c snd_dma_pci_data(cs5535au->pci), cs5535au 437 sound/pci/cs5535audio/cs5535audio_pcm.c cs5535au->pcm = pcm; cs5535au 18 sound/pci/cs5535audio/cs5535audio_pm.c static void snd_cs5535audio_stop_hardware(struct cs5535audio *cs5535au) cs5535au 40 sound/pci/cs5535audio/cs5535audio_pm.c cs_writel(cs5535au, ACC_CODEC_CNTL, ACC_CODEC_CNTL_LNK_SHUTDOWN); cs5535au 47 sound/pci/cs5535audio/cs5535audio_pm.c struct cs5535audio *cs5535au = card->private_data; cs5535au 51 sound/pci/cs5535audio/cs5535audio_pm.c snd_ac97_suspend(cs5535au->ac97); cs5535au 53 sound/pci/cs5535audio/cs5535audio_pm.c struct cs5535audio_dma *dma = &cs5535au->dmas[i]; cs5535au 55 sound/pci/cs5535audio/cs5535audio_pm.c dma->saved_prd = dma->ops->read_prd(cs5535au); cs5535au 58 sound/pci/cs5535audio/cs5535audio_pm.c snd_cs5535audio_stop_hardware(cs5535au); cs5535au 65 sound/pci/cs5535audio/cs5535audio_pm.c struct cs5535audio *cs5535au = card->private_data; cs5535au 71 sound/pci/cs5535audio/cs5535audio_pm.c cs_writel(cs5535au, ACC_CODEC_CNTL, ACC_CODEC_CNTL_LNK_WRM_RST); cs5535au 75 sound/pci/cs5535audio/cs5535audio_pm.c tmp = cs_readl(cs5535au, ACC_CODEC_STATUS); cs5535au 82 sound/pci/cs5535audio/cs5535audio_pm.c dev_err(cs5535au->card->dev, "Failure getting AC Link ready\n"); cs5535au 86 sound/pci/cs5535audio/cs5535audio_pm.c struct cs5535audio_dma *dma = &cs5535au->dmas[i]; cs5535au 89 sound/pci/cs5535audio/cs5535audio_pm.c dma->ops->setup_prd(cs5535au, dma->saved_prd); cs5535au 94 sound/pci/cs5535audio/cs5535audio_pm.c snd_ac97_resume(cs5535au->ac97);