Lines Matching refs:runtime
88 struct snd_pcm_runtime *runtime = substream->runtime; in atmel_ac97c_playback_open() local
92 runtime->hw = atmel_ac97c_hw; in atmel_ac97c_playback_open()
94 runtime->hw.rate_min = chip->cur_rate; in atmel_ac97c_playback_open()
95 runtime->hw.rate_max = chip->cur_rate; in atmel_ac97c_playback_open()
98 runtime->hw.formats = pcm_format_to_bits(chip->cur_format); in atmel_ac97c_playback_open()
107 struct snd_pcm_runtime *runtime = substream->runtime; in atmel_ac97c_capture_open() local
111 runtime->hw = atmel_ac97c_hw; in atmel_ac97c_capture_open()
113 runtime->hw.rate_min = chip->cur_rate; in atmel_ac97c_capture_open()
114 runtime->hw.rate_max = chip->cur_rate; in atmel_ac97c_capture_open()
117 runtime->hw.formats = pcm_format_to_bits(chip->cur_format); in atmel_ac97c_capture_open()
188 struct snd_pcm_runtime *runtime = substream->runtime; in atmel_ac97c_playback_prepare() local
189 int block_size = frames_to_bytes(runtime, runtime->period_size); in atmel_ac97c_playback_prepare()
197 switch (runtime->channels) { in atmel_ac97c_playback_prepare()
218 switch (runtime->format) { in atmel_ac97c_playback_prepare()
242 if (runtime->rate != 48000) { in atmel_ac97c_playback_prepare()
253 runtime->rate); in atmel_ac97c_playback_prepare()
256 runtime->rate); in atmel_ac97c_playback_prepare()
259 writel(runtime->dma_addr, chip->regs + ATMEL_PDC_TPR); in atmel_ac97c_playback_prepare()
261 writel(runtime->dma_addr + block_size, chip->regs + ATMEL_PDC_TNPR); in atmel_ac97c_playback_prepare()
270 struct snd_pcm_runtime *runtime = substream->runtime; in atmel_ac97c_capture_prepare() local
271 int block_size = frames_to_bytes(runtime, runtime->period_size); in atmel_ac97c_capture_prepare()
279 switch (runtime->channels) { in atmel_ac97c_capture_prepare()
300 switch (runtime->format) { in atmel_ac97c_capture_prepare()
324 if (runtime->rate != 48000) { in atmel_ac97c_capture_prepare()
335 runtime->rate); in atmel_ac97c_capture_prepare()
338 runtime->rate); in atmel_ac97c_capture_prepare()
341 writel(runtime->dma_addr, chip->regs + ATMEL_PDC_RPR); in atmel_ac97c_capture_prepare()
343 writel(runtime->dma_addr + block_size, chip->regs + ATMEL_PDC_RNPR); in atmel_ac97c_capture_prepare()
416 struct snd_pcm_runtime *runtime = substream->runtime; in atmel_ac97c_playback_pointer() local
421 bytes -= runtime->dma_addr; in atmel_ac97c_playback_pointer()
423 frames = bytes_to_frames(runtime, bytes); in atmel_ac97c_playback_pointer()
424 if (frames >= runtime->buffer_size) in atmel_ac97c_playback_pointer()
425 frames -= runtime->buffer_size; in atmel_ac97c_playback_pointer()
433 struct snd_pcm_runtime *runtime = substream->runtime; in atmel_ac97c_capture_pointer() local
438 bytes -= runtime->dma_addr; in atmel_ac97c_capture_pointer()
440 frames = bytes_to_frames(runtime, bytes); in atmel_ac97c_capture_pointer()
441 if (frames >= runtime->buffer_size) in atmel_ac97c_capture_pointer()
442 frames -= runtime->buffer_size; in atmel_ac97c_capture_pointer()
474 struct snd_pcm_runtime *runtime; in atmel_ac97c_interrupt() local
484 runtime = chip->playback_substream->runtime; in atmel_ac97c_interrupt()
485 block_size = frames_to_bytes(runtime, runtime->period_size); in atmel_ac97c_interrupt()
488 if (chip->playback_period == runtime->periods) in atmel_ac97c_interrupt()
491 if (next_period == runtime->periods) in atmel_ac97c_interrupt()
496 writel(runtime->dma_addr + offset, chip->regs + ATMEL_PDC_TNPR); in atmel_ac97c_interrupt()
502 runtime = chip->capture_substream->runtime; in atmel_ac97c_interrupt()
503 block_size = frames_to_bytes(runtime, runtime->period_size); in atmel_ac97c_interrupt()
506 if (chip->capture_period == runtime->periods) in atmel_ac97c_interrupt()
509 if (next_period == runtime->periods) in atmel_ac97c_interrupt()
514 writel(runtime->dma_addr + offset, chip->regs + ATMEL_PDC_RNPR); in atmel_ac97c_interrupt()