Lines Matching refs:runtime

279 			      substream->runtime->rate);  in azx_adjust_codec_delay()
356 struct snd_pcm_runtime *runtime = substream->runtime; in azx_setup_periods() local
358 pos_adj = (pos_adj * runtime->rate + 47999) / 48000; in azx_setup_periods()
364 pos_adj = frames_to_bytes(runtime, pos_adj); in azx_setup_periods()
479 struct snd_pcm_runtime *runtime = substream->runtime; in azx_pcm_prepare() local
494 runtime->rate, in azx_pcm_prepare()
495 runtime->channels, in azx_pcm_prepare()
496 runtime->format, in azx_pcm_prepare()
502 runtime->rate, runtime->channels, runtime->format); in azx_pcm_prepare()
516 runtime->no_period_wakeup != azx_dev->no_period_wakeup) { in azx_pcm_prepare()
520 azx_dev->no_period_wakeup = runtime->no_period_wakeup; in azx_pcm_prepare()
530 if (runtime->period_size > 64) in azx_pcm_prepare()
531 azx_dev->delay_negative_threshold = -frames_to_bytes(runtime, 64); in azx_pcm_prepare()
536 azx_dev->period_wallclk = (((runtime->period_size * 24000) / in azx_pcm_prepare()
537 runtime->rate) * 1000); in azx_pcm_prepare()
667 snd_pcm_gettime(substream->runtime, &substream->runtime->trigger_tstamp); in azx_pcm_trigger()
668 substream->runtime->trigger_tstamp_latched = true; in azx_pcm_trigger()
716 if (substream->runtime) { in azx_get_position()
725 substream->runtime->delay = delay; in azx_get_position()
738 return bytes_to_frames(substream->runtime, in azx_pcm_pointer()
750 if ((substream->runtime->hw.info & SNDRV_PCM_INFO_HAS_LINK_ATIME) && in azx_get_time_info()
753 snd_pcm_gettime(substream->runtime, system_ts); in azx_get_time_info()
804 struct snd_pcm_runtime *runtime = substream->runtime; in azx_pcm_open() local
816 runtime->hw = azx_pcm_hw; in azx_pcm_open()
817 runtime->hw.channels_min = hinfo->channels_min; in azx_pcm_open()
818 runtime->hw.channels_max = hinfo->channels_max; in azx_pcm_open()
819 runtime->hw.formats = hinfo->formats; in azx_pcm_open()
820 runtime->hw.rates = hinfo->rates; in azx_pcm_open()
821 snd_pcm_limit_hw_rates(runtime); in azx_pcm_open()
822 snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS); in azx_pcm_open()
825 snd_pcm_hw_constraint_minmax(runtime, SNDRV_PCM_HW_PARAM_BUFFER_TIME, in azx_pcm_open()
844 snd_pcm_hw_constraint_step(runtime, 0, SNDRV_PCM_HW_PARAM_BUFFER_BYTES, in azx_pcm_open()
846 snd_pcm_hw_constraint_step(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_BYTES, in azx_pcm_open()
857 snd_pcm_limit_hw_rates(runtime); in azx_pcm_open()
859 if (snd_BUG_ON(!runtime->hw.channels_min) || in azx_pcm_open()
860 snd_BUG_ON(!runtime->hw.channels_max) || in azx_pcm_open()
861 snd_BUG_ON(!runtime->hw.formats) || in azx_pcm_open()
862 snd_BUG_ON(!runtime->hw.rates)) { in azx_pcm_open()
873 runtime->hw.info &= ~SNDRV_PCM_INFO_HAS_WALL_CLOCK; /* legacy */ in azx_pcm_open()
874 runtime->hw.info &= ~SNDRV_PCM_INFO_HAS_LINK_ATIME; in azx_pcm_open()
882 runtime->private_data = azx_dev; in azx_pcm_open()