Lines Matching full: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()
201 struct snd_pcm_runtime *runtime = substream->runtime; in atmel_ac97c_playback_prepare() local
202 int block_size = frames_to_bytes(runtime, runtime->period_size); in atmel_ac97c_playback_prepare()
210 switch (runtime->channels) { in atmel_ac97c_playback_prepare()
231 switch (runtime->format) { in atmel_ac97c_playback_prepare()
255 if (runtime->rate != 48000) { in atmel_ac97c_playback_prepare()
266 runtime->rate); in atmel_ac97c_playback_prepare()
269 runtime->rate); in atmel_ac97c_playback_prepare()
272 writel(runtime->dma_addr, chip->regs + ATMEL_PDC_TPR); in atmel_ac97c_playback_prepare()
274 writel(runtime->dma_addr + block_size, chip->regs + ATMEL_PDC_TNPR); in atmel_ac97c_playback_prepare()
283 struct snd_pcm_runtime *runtime = substream->runtime; in atmel_ac97c_capture_prepare() local
284 int block_size = frames_to_bytes(runtime, runtime->period_size); in atmel_ac97c_capture_prepare()
292 switch (runtime->channels) { in atmel_ac97c_capture_prepare()
313 switch (runtime->format) { in atmel_ac97c_capture_prepare()
337 if (runtime->rate != 48000) { in atmel_ac97c_capture_prepare()
348 runtime->rate); in atmel_ac97c_capture_prepare()
351 runtime->rate); in atmel_ac97c_capture_prepare()
354 writel(runtime->dma_addr, chip->regs + ATMEL_PDC_RPR); in atmel_ac97c_capture_prepare()
356 writel(runtime->dma_addr + block_size, chip->regs + ATMEL_PDC_RNPR); in atmel_ac97c_capture_prepare()
429 struct snd_pcm_runtime *runtime = substream->runtime; in atmel_ac97c_playback_pointer() local
434 bytes -= runtime->dma_addr; in atmel_ac97c_playback_pointer()
436 frames = bytes_to_frames(runtime, bytes); in atmel_ac97c_playback_pointer()
437 if (frames >= runtime->buffer_size) in atmel_ac97c_playback_pointer()
438 frames -= runtime->buffer_size; in atmel_ac97c_playback_pointer()
446 struct snd_pcm_runtime *runtime = substream->runtime; in atmel_ac97c_capture_pointer() local
451 bytes -= runtime->dma_addr; in atmel_ac97c_capture_pointer()
453 frames = bytes_to_frames(runtime, bytes); in atmel_ac97c_capture_pointer()
454 if (frames >= runtime->buffer_size) in atmel_ac97c_capture_pointer()
455 frames -= runtime->buffer_size; in atmel_ac97c_capture_pointer()
491 struct snd_pcm_runtime *runtime; in atmel_ac97c_interrupt() local
501 runtime = chip->playback_substream->runtime; in atmel_ac97c_interrupt()
502 block_size = frames_to_bytes(runtime, runtime->period_size); in atmel_ac97c_interrupt()
505 if (chip->playback_period == runtime->periods) in atmel_ac97c_interrupt()
508 if (next_period == runtime->periods) in atmel_ac97c_interrupt()
513 writel(runtime->dma_addr + offset, chip->regs + ATMEL_PDC_TNPR); in atmel_ac97c_interrupt()
519 runtime = chip->capture_substream->runtime; in atmel_ac97c_interrupt()
520 block_size = frames_to_bytes(runtime, runtime->period_size); in atmel_ac97c_interrupt()
523 if (chip->capture_period == runtime->periods) in atmel_ac97c_interrupt()
526 if (next_period == runtime->periods) in atmel_ac97c_interrupt()
531 writel(runtime->dma_addr + offset, chip->regs + ATMEL_PDC_RNPR); in atmel_ac97c_interrupt()