Lines Matching refs:runtime
392 static int snd_bt87x_set_digital_hw(struct snd_bt87x *chip, struct snd_pcm_runtime *runtime) in snd_bt87x_set_digital_hw() argument
395 runtime->hw = snd_bt87x_digital_hw; in snd_bt87x_set_digital_hw()
396 runtime->hw.rates = snd_pcm_rate_to_rate_bit(chip->board.dig_rate); in snd_bt87x_set_digital_hw()
397 runtime->hw.rate_min = chip->board.dig_rate; in snd_bt87x_set_digital_hw()
398 runtime->hw.rate_max = chip->board.dig_rate; in snd_bt87x_set_digital_hw()
402 static int snd_bt87x_set_analog_hw(struct snd_bt87x *chip, struct snd_pcm_runtime *runtime) in snd_bt87x_set_analog_hw() argument
416 runtime->hw = snd_bt87x_analog_hw; in snd_bt87x_set_analog_hw()
417 return snd_pcm_hw_constraint_ratnums(runtime, 0, SNDRV_PCM_HW_PARAM_RATE, in snd_bt87x_set_analog_hw()
424 struct snd_pcm_runtime *runtime = substream->runtime; in snd_bt87x_pcm_open() local
431 err = snd_bt87x_set_digital_hw(chip, runtime); in snd_bt87x_pcm_open()
433 err = snd_bt87x_set_analog_hw(chip, runtime); in snd_bt87x_pcm_open()
437 err = snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS); in snd_bt87x_pcm_open()
492 struct snd_pcm_runtime *runtime = substream->runtime; in snd_bt87x_prepare() local
497 decimation = (ANALOG_CLOCK + runtime->rate / 4) / runtime->rate; in snd_bt87x_prepare()
499 if (runtime->format == SNDRV_PCM_FORMAT_S8) in snd_bt87x_prepare()
548 struct snd_pcm_runtime *runtime = substream->runtime; in snd_bt87x_pointer() local
550 return (snd_pcm_uframes_t)bytes_to_frames(runtime, chip->current_line * chip->line_bytes); in snd_bt87x_pointer()