Lines Matching refs:runtime
89 struct snd_pcm_runtime *runtime = substream->runtime; in atmel_ac97c_playback_open() local
93 runtime->hw = atmel_ac97c_hw; in atmel_ac97c_playback_open()
95 runtime->hw.rate_min = chip->cur_rate; in atmel_ac97c_playback_open()
96 runtime->hw.rate_max = chip->cur_rate; in atmel_ac97c_playback_open()
99 runtime->hw.formats = pcm_format_to_bits(chip->cur_format); in atmel_ac97c_playback_open()
108 struct snd_pcm_runtime *runtime = substream->runtime; in atmel_ac97c_capture_open() local
112 runtime->hw = atmel_ac97c_hw; in atmel_ac97c_capture_open()
114 runtime->hw.rate_min = chip->cur_rate; in atmel_ac97c_capture_open()
115 runtime->hw.rate_max = chip->cur_rate; in atmel_ac97c_capture_open()
118 runtime->hw.formats = pcm_format_to_bits(chip->cur_format); in atmel_ac97c_capture_open()
189 struct snd_pcm_runtime *runtime = substream->runtime; in atmel_ac97c_playback_prepare() local
190 int block_size = frames_to_bytes(runtime, runtime->period_size); in atmel_ac97c_playback_prepare()
198 switch (runtime->channels) { in atmel_ac97c_playback_prepare()
219 switch (runtime->format) { in atmel_ac97c_playback_prepare()
243 if (runtime->rate != 48000) { in atmel_ac97c_playback_prepare()
254 runtime->rate); in atmel_ac97c_playback_prepare()
257 runtime->rate); in atmel_ac97c_playback_prepare()
260 writel(runtime->dma_addr, chip->regs + ATMEL_PDC_TPR); in atmel_ac97c_playback_prepare()
262 writel(runtime->dma_addr + block_size, chip->regs + ATMEL_PDC_TNPR); in atmel_ac97c_playback_prepare()
271 struct snd_pcm_runtime *runtime = substream->runtime; in atmel_ac97c_capture_prepare() local
272 int block_size = frames_to_bytes(runtime, runtime->period_size); in atmel_ac97c_capture_prepare()
280 switch (runtime->channels) { in atmel_ac97c_capture_prepare()
301 switch (runtime->format) { in atmel_ac97c_capture_prepare()
325 if (runtime->rate != 48000) { in atmel_ac97c_capture_prepare()
336 runtime->rate); in atmel_ac97c_capture_prepare()
339 runtime->rate); in atmel_ac97c_capture_prepare()
342 writel(runtime->dma_addr, chip->regs + ATMEL_PDC_RPR); in atmel_ac97c_capture_prepare()
344 writel(runtime->dma_addr + block_size, chip->regs + ATMEL_PDC_RNPR); in atmel_ac97c_capture_prepare()
417 struct snd_pcm_runtime *runtime = substream->runtime; in atmel_ac97c_playback_pointer() local
422 bytes -= runtime->dma_addr; in atmel_ac97c_playback_pointer()
424 frames = bytes_to_frames(runtime, bytes); in atmel_ac97c_playback_pointer()
425 if (frames >= runtime->buffer_size) in atmel_ac97c_playback_pointer()
426 frames -= runtime->buffer_size; in atmel_ac97c_playback_pointer()
434 struct snd_pcm_runtime *runtime = substream->runtime; in atmel_ac97c_capture_pointer() local
439 bytes -= runtime->dma_addr; in atmel_ac97c_capture_pointer()
441 frames = bytes_to_frames(runtime, bytes); in atmel_ac97c_capture_pointer()
442 if (frames >= runtime->buffer_size) in atmel_ac97c_capture_pointer()
443 frames -= runtime->buffer_size; in atmel_ac97c_capture_pointer()
475 struct snd_pcm_runtime *runtime; in atmel_ac97c_interrupt() local
485 runtime = chip->playback_substream->runtime; in atmel_ac97c_interrupt()
486 block_size = frames_to_bytes(runtime, runtime->period_size); in atmel_ac97c_interrupt()
489 if (chip->playback_period == runtime->periods) in atmel_ac97c_interrupt()
492 if (next_period == runtime->periods) in atmel_ac97c_interrupt()
497 writel(runtime->dma_addr + offset, chip->regs + ATMEL_PDC_TNPR); in atmel_ac97c_interrupt()
503 runtime = chip->capture_substream->runtime; in atmel_ac97c_interrupt()
504 block_size = frames_to_bytes(runtime, runtime->period_size); in atmel_ac97c_interrupt()
507 if (chip->capture_period == runtime->periods) in atmel_ac97c_interrupt()
510 if (next_period == runtime->periods) in atmel_ac97c_interrupt()
515 writel(runtime->dma_addr + offset, chip->regs + ATMEL_PDC_RNPR); in atmel_ac97c_interrupt()