Lines Matching refs:runtime
418 struct snd_pcm_runtime *runtime = substream->runtime; in snd_es18xx_rate_set() local
420 if (runtime->rate_num == new_clocks[0].num) in snd_es18xx_rate_set()
421 bits = 128 - runtime->rate_den; in snd_es18xx_rate_set()
423 bits = 256 - runtime->rate_den; in snd_es18xx_rate_set()
425 if (runtime->rate_num == old_clocks[0].num) in snd_es18xx_rate_set()
426 bits = 256 - runtime->rate_den; in snd_es18xx_rate_set()
428 bits = 128 - runtime->rate_den; in snd_es18xx_rate_set()
432 div0 = 256 - 7160000*20/(8*82*runtime->rate); in snd_es18xx_rate_set()
484 struct snd_pcm_runtime *runtime = substream->runtime; in snd_es18xx_playback1_prepare() local
497 ((runtime->channels == 1) ? 0x00 : 0x02) | in snd_es18xx_playback1_prepare()
498 (snd_pcm_format_width(runtime->format) == 16 ? 0x01 : 0x00) | in snd_es18xx_playback1_prepare()
499 (snd_pcm_format_unsigned(runtime->format) ? 0x00 : 0x04)); in snd_es18xx_playback1_prepare()
502 snd_dma_program(chip->dma2, runtime->dma_addr, size, DMA_MODE_WRITE | DMA_AUTOINIT); in snd_es18xx_playback1_prepare()
583 struct snd_pcm_runtime *runtime = substream->runtime; in snd_es18xx_capture_prepare() local
590 snd_es18xx_bits(chip, 0xA8, 0x03, runtime->channels == 1 ? 0x02 : 0x01); in snd_es18xx_capture_prepare()
605 snd_pcm_format_unsigned(runtime->format) ? 0x51 : 0x71); in snd_es18xx_capture_prepare()
607 ((runtime->channels == 1) ? 0x40 : 0x08) | in snd_es18xx_capture_prepare()
608 (snd_pcm_format_width(runtime->format) == 16 ? 0x04 : 0x00) | in snd_es18xx_capture_prepare()
609 (snd_pcm_format_unsigned(runtime->format) ? 0x00 : 0x20)); in snd_es18xx_capture_prepare()
612 snd_dma_program(chip->dma1, runtime->dma_addr, size, DMA_MODE_READ | DMA_AUTOINIT); in snd_es18xx_capture_prepare()
649 struct snd_pcm_runtime *runtime = substream->runtime; in snd_es18xx_playback2_prepare() local
656 snd_es18xx_bits(chip, 0xA8, 0x03, runtime->channels == 1 ? 0x02 : 0x01); in snd_es18xx_playback2_prepare()
667 snd_pcm_format_unsigned(runtime->format) ? 0x80 : 0x00); in snd_es18xx_playback2_prepare()
669 snd_pcm_format_unsigned(runtime->format) ? 0x51 : 0x71); in snd_es18xx_playback2_prepare()
671 (runtime->channels == 1 ? 0x40 : 0x08) | in snd_es18xx_playback2_prepare()
672 (snd_pcm_format_width(runtime->format) == 16 ? 0x04 : 0x00) | in snd_es18xx_playback2_prepare()
673 (snd_pcm_format_unsigned(runtime->format) ? 0x00 : 0x20)); in snd_es18xx_playback2_prepare()
676 snd_dma_program(chip->dma1, runtime->dma_addr, size, DMA_MODE_WRITE | DMA_AUTOINIT); in snd_es18xx_playback2_prepare()
883 struct snd_pcm_runtime *runtime = substream->runtime; in snd_es18xx_playback_open() local
889 chip->capture_a_substream->runtime->channels != 1) in snd_es18xx_playback_open()
900 substream->runtime->hw = snd_es18xx_playback; in snd_es18xx_playback_open()
901 snd_pcm_hw_constraint_ratnums(runtime, 0, SNDRV_PCM_HW_PARAM_RATE, in snd_es18xx_playback_open()
908 struct snd_pcm_runtime *runtime = substream->runtime; in snd_es18xx_capture_open() local
915 chip->playback_a_substream->runtime->channels != 1) in snd_es18xx_capture_open()
918 substream->runtime->hw = snd_es18xx_capture; in snd_es18xx_capture_open()
919 snd_pcm_hw_constraint_ratnums(runtime, 0, SNDRV_PCM_HW_PARAM_RATE, in snd_es18xx_capture_open()