Lines Matching refs:runtime

113 	struct snd_pcm_runtime		*runtime = substream->runtime;  in atmel_ac97c_prepare_dma()  local
120 if (runtime->dma_addr & 1 || runtime->buffer_size & 1) { in atmel_ac97c_prepare_dma()
130 buffer_len = frames_to_bytes(runtime, runtime->buffer_size); in atmel_ac97c_prepare_dma()
131 period_len = frames_to_bytes(runtime, runtime->period_size); in atmel_ac97c_prepare_dma()
133 cdesc = dw_dma_cyclic_prep(chan, runtime->dma_addr, buffer_len, in atmel_ac97c_prepare_dma()
178 struct snd_pcm_runtime *runtime = substream->runtime; in atmel_ac97c_playback_open() local
182 runtime->hw = atmel_ac97c_hw; in atmel_ac97c_playback_open()
184 runtime->hw.rate_min = chip->cur_rate; in atmel_ac97c_playback_open()
185 runtime->hw.rate_max = chip->cur_rate; in atmel_ac97c_playback_open()
188 runtime->hw.formats = pcm_format_to_bits(chip->cur_format); in atmel_ac97c_playback_open()
197 struct snd_pcm_runtime *runtime = substream->runtime; in atmel_ac97c_capture_open() local
201 runtime->hw = atmel_ac97c_hw; in atmel_ac97c_capture_open()
203 runtime->hw.rate_min = chip->cur_rate; in atmel_ac97c_capture_open()
204 runtime->hw.rate_max = chip->cur_rate; in atmel_ac97c_capture_open()
207 runtime->hw.formats = pcm_format_to_bits(chip->cur_format); in atmel_ac97c_capture_open()
320 struct snd_pcm_runtime *runtime = substream->runtime; in atmel_ac97c_playback_prepare() local
321 int block_size = frames_to_bytes(runtime, runtime->period_size); in atmel_ac97c_playback_prepare()
329 switch (runtime->channels) { in atmel_ac97c_playback_prepare()
350 switch (runtime->format) { in atmel_ac97c_playback_prepare()
376 if (runtime->rate != 48000) { in atmel_ac97c_playback_prepare()
387 runtime->rate); in atmel_ac97c_playback_prepare()
390 runtime->rate); in atmel_ac97c_playback_prepare()
398 writel(runtime->dma_addr, chip->regs + ATMEL_PDC_TPR); in atmel_ac97c_playback_prepare()
400 writel(runtime->dma_addr + block_size, in atmel_ac97c_playback_prepare()
411 struct snd_pcm_runtime *runtime = substream->runtime; in atmel_ac97c_capture_prepare() local
412 int block_size = frames_to_bytes(runtime, runtime->period_size); in atmel_ac97c_capture_prepare()
420 switch (runtime->channels) { in atmel_ac97c_capture_prepare()
441 switch (runtime->format) { in atmel_ac97c_capture_prepare()
467 if (runtime->rate != 48000) { in atmel_ac97c_capture_prepare()
478 runtime->rate); in atmel_ac97c_capture_prepare()
481 runtime->rate); in atmel_ac97c_capture_prepare()
489 writel(runtime->dma_addr, chip->regs + ATMEL_PDC_RPR); in atmel_ac97c_capture_prepare()
491 writel(runtime->dma_addr + block_size, in atmel_ac97c_capture_prepare()
592 struct snd_pcm_runtime *runtime = substream->runtime; in atmel_ac97c_playback_pointer() local
600 bytes -= runtime->dma_addr; in atmel_ac97c_playback_pointer()
602 frames = bytes_to_frames(runtime, bytes); in atmel_ac97c_playback_pointer()
603 if (frames >= runtime->buffer_size) in atmel_ac97c_playback_pointer()
604 frames -= runtime->buffer_size; in atmel_ac97c_playback_pointer()
612 struct snd_pcm_runtime *runtime = substream->runtime; in atmel_ac97c_capture_pointer() local
620 bytes -= runtime->dma_addr; in atmel_ac97c_capture_pointer()
622 frames = bytes_to_frames(runtime, bytes); in atmel_ac97c_capture_pointer()
623 if (frames >= runtime->buffer_size) in atmel_ac97c_capture_pointer()
624 frames -= runtime->buffer_size; in atmel_ac97c_capture_pointer()
660 struct snd_pcm_runtime *runtime; in atmel_ac97c_interrupt() local
671 runtime = chip->playback_substream->runtime; in atmel_ac97c_interrupt()
672 block_size = frames_to_bytes(runtime, in atmel_ac97c_interrupt()
673 runtime->period_size); in atmel_ac97c_interrupt()
676 if (chip->playback_period == runtime->periods) in atmel_ac97c_interrupt()
679 if (next_period == runtime->periods) in atmel_ac97c_interrupt()
684 writel(runtime->dma_addr + offset, in atmel_ac97c_interrupt()
693 runtime = chip->capture_substream->runtime; in atmel_ac97c_interrupt()
694 block_size = frames_to_bytes(runtime, in atmel_ac97c_interrupt()
695 runtime->period_size); in atmel_ac97c_interrupt()
698 if (chip->capture_period == runtime->periods) in atmel_ac97c_interrupt()
701 if (next_period == runtime->periods) in atmel_ac97c_interrupt()
706 writel(runtime->dma_addr + offset, in atmel_ac97c_interrupt()