Lines Matching refs:runtime
94 struct snd_pcm_runtime *runtime = substream->runtime; in snd_sb8_playback_prepare() local
97 unsigned char stereo = runtime->channels > 1; in snd_sb8_playback_prepare()
100 rate = runtime->rate; in snd_sb8_playback_prepare()
103 if (runtime->format == SNDRV_PCM_FORMAT_S16_LE) { in snd_sb8_playback_prepare()
112 if (runtime->channels > 1) { in snd_sb8_playback_prepare()
158 runtime->dma_area[0] = 0x80; in snd_sb8_playback_prepare()
159 snd_dma_program(dma, runtime->dma_addr, 1, DMA_MODE_WRITE); in snd_sb8_playback_prepare()
167 snd_sbdsp_command(chip, 256 - runtime->rate_den / 2); in snd_sb8_playback_prepare()
176 snd_sbdsp_command(chip, 256 - runtime->rate_den); in snd_sb8_playback_prepare()
187 snd_dma_program(dma, runtime->dma_addr, in snd_sb8_playback_prepare()
211 struct snd_pcm_runtime *runtime = substream->runtime; in snd_sb8_playback_trigger() local
213 if (runtime->channels > 1) { in snd_sb8_playback_trigger()
232 struct snd_pcm_runtime *runtime = substream->runtime; in snd_sb8_capture_prepare() local
235 unsigned char stereo = runtime->channels > 1; in snd_sb8_capture_prepare()
238 rate = runtime->rate; in snd_sb8_capture_prepare()
241 if (runtime->format == SNDRV_PCM_FORMAT_S16_LE) { in snd_sb8_capture_prepare()
250 if (runtime->channels > 1) { in snd_sb8_capture_prepare()
292 snd_sbdsp_command(chip, 256 - runtime->rate_den / 2); in snd_sb8_capture_prepare()
301 snd_sbdsp_command(chip, 256 - runtime->rate_den); in snd_sb8_capture_prepare()
312 snd_dma_program(dma, runtime->dma_addr, in snd_sb8_capture_prepare()
336 struct snd_pcm_runtime *runtime = substream->runtime; in snd_sb8_capture_trigger() local
338 if (runtime->channels > 1) { in snd_sb8_capture_trigger()
398 return bytes_to_frames(substream->runtime, ptr); in snd_sb8_playback_pointer()
414 return bytes_to_frames(substream->runtime, ptr); in snd_sb8_capture_pointer()
466 struct snd_pcm_runtime *runtime = substream->runtime; in snd_sb8_open() local
478 runtime->hw = snd_sb8_playback; in snd_sb8_open()
481 runtime->hw = snd_sb8_capture; in snd_sb8_open()
486 runtime->hw.formats |= SNDRV_PCM_FMTBIT_S16_LE; in snd_sb8_open()
487 runtime->hw.rates |= SNDRV_PCM_RATE_8000_48000; in snd_sb8_open()
488 runtime->hw.rate_min = 4000; in snd_sb8_open()
489 runtime->hw.rate_max = 50000; in snd_sb8_open()
490 runtime->hw.channels_max = 2; in snd_sb8_open()
493 runtime->hw.rate_max = 44100; in snd_sb8_open()
494 runtime->hw.channels_max = 2; in snd_sb8_open()
495 snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_RATE, in snd_sb8_open()
499 snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_CHANNELS, in snd_sb8_open()
505 runtime->hw.rate_max = 44100; in snd_sb8_open()
507 runtime->hw.rate_max = 15000; in snd_sb8_open()
513 snd_pcm_hw_constraint_ratnums(runtime, 0, SNDRV_PCM_HW_PARAM_RATE, in snd_sb8_open()
516 snd_pcm_hw_constraint_step(runtime, 0, in snd_sb8_open()
518 snd_pcm_hw_constraint_step(runtime, 0, in snd_sb8_open()
520 runtime->hw.buffer_bytes_max = 128 * 1024 * 1024; in snd_sb8_open()
521 runtime->hw.period_bytes_max = 128 * 1024 * 1024; in snd_sb8_open()