Lines Matching refs:runtime

166 static void snd_p16v_pcm_free_substream(struct snd_pcm_runtime *runtime)  in snd_p16v_pcm_free_substream()  argument
168 struct snd_emu10k1_pcm *epcm = runtime->private_data; in snd_p16v_pcm_free_substream()
179 struct snd_pcm_runtime *runtime = substream->runtime; in snd_p16v_pcm_open_playback_channel() local
193 runtime->private_data = epcm; in snd_p16v_pcm_open_playback_channel()
194 runtime->private_free = snd_p16v_pcm_free_substream; in snd_p16v_pcm_open_playback_channel()
196 runtime->hw = snd_p16v_playback_hw; in snd_p16v_pcm_open_playback_channel()
211 if ((err = snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS)) < 0) in snd_p16v_pcm_open_playback_channel()
214 runtime->sync.id32[0] = substream->pcm->card->number; in snd_p16v_pcm_open_playback_channel()
215 runtime->sync.id32[1] = 'P'; in snd_p16v_pcm_open_playback_channel()
216 runtime->sync.id32[2] = 16; in snd_p16v_pcm_open_playback_channel()
217 runtime->sync.id32[3] = 'V'; in snd_p16v_pcm_open_playback_channel()
227 struct snd_pcm_runtime *runtime = substream->runtime; in snd_p16v_pcm_open_capture_channel() local
241 runtime->private_data = epcm; in snd_p16v_pcm_open_capture_channel()
242 runtime->private_free = snd_p16v_pcm_free_substream; in snd_p16v_pcm_open_capture_channel()
244 runtime->hw = snd_p16v_capture_hw; in snd_p16v_pcm_open_capture_channel()
259 if ((err = snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS)) < 0) in snd_p16v_pcm_open_capture_channel()
341 struct snd_pcm_runtime *runtime = substream->runtime; in snd_p16v_pcm_prepare_playback() local
344 u32 period_size_bytes = frames_to_bytes(runtime, runtime->period_size); in snd_p16v_pcm_prepare_playback()
353 channel, runtime->rate, runtime->format, runtime->channels, in snd_p16v_pcm_prepare_playback()
354 runtime->buffer_size, runtime->period_size, in snd_p16v_pcm_prepare_playback()
355 runtime->periods, frames_to_bytes(runtime, 1)); in snd_p16v_pcm_prepare_playback()
358 runtime->dma_addr, runtime->dma_area, table_base); in snd_p16v_pcm_prepare_playback()
365 switch (runtime->rate) { in snd_p16v_pcm_prepare_playback()
381 for(i = 0; i < runtime->periods; i++) { in snd_p16v_pcm_prepare_playback()
382 table_base[i*2]=runtime->dma_addr+(i*period_size_bytes); in snd_p16v_pcm_prepare_playback()
387 snd_emu10k1_ptr20_write(emu, PLAYBACK_LIST_SIZE, channel, (runtime->periods - 1) << 19); in snd_p16v_pcm_prepare_playback()
389 snd_emu10k1_ptr20_write(emu, PLAYBACK_DMA_ADDR, channel, runtime->dma_addr); in snd_p16v_pcm_prepare_playback()
403 struct snd_pcm_runtime *runtime = substream->runtime; in snd_p16v_pcm_prepare_capture() local
416 switch (runtime->rate) { in snd_p16v_pcm_prepare_capture()
433 snd_emu10k1_ptr20_write(emu, CAPTURE_DMA_ADDR, channel, runtime->dma_addr); in snd_p16v_pcm_prepare_capture()
434 …snd_emu10k1_ptr20_write(emu, CAPTURE_BUFFER_SIZE, channel, frames_to_bytes(runtime, runtime->buffe… in snd_p16v_pcm_prepare_capture()
469 struct snd_pcm_runtime *runtime; in snd_p16v_pcm_trigger_playback() local
491 runtime = s->runtime; in snd_p16v_pcm_trigger_playback()
492 epcm = runtime->private_data; in snd_p16v_pcm_trigger_playback()
523 struct snd_pcm_runtime *runtime = substream->runtime; in snd_p16v_pcm_trigger_capture() local
524 struct snd_emu10k1_pcm *epcm = runtime->private_data; in snd_p16v_pcm_trigger_capture()
553 struct snd_pcm_runtime *runtime = substream->runtime; in snd_p16v_pcm_pointer_playback() local
554 struct snd_emu10k1_pcm *epcm = runtime->private_data; in snd_p16v_pcm_pointer_playback()
564 ptr2 = bytes_to_frames(runtime, ptr1); in snd_p16v_pcm_pointer_playback()
565 ptr2+= (ptr4 >> 3) * runtime->period_size; in snd_p16v_pcm_pointer_playback()
567 if (ptr >= runtime->buffer_size) in snd_p16v_pcm_pointer_playback()
568 ptr -= runtime->buffer_size; in snd_p16v_pcm_pointer_playback()
578 struct snd_pcm_runtime *runtime = substream->runtime; in snd_p16v_pcm_pointer_capture() local
579 struct snd_emu10k1_pcm *epcm = runtime->private_data; in snd_p16v_pcm_pointer_capture()
587 ptr2 = bytes_to_frames(runtime, ptr1); in snd_p16v_pcm_pointer_capture()
589 if (ptr >= runtime->buffer_size) { in snd_p16v_pcm_pointer_capture()
590 ptr -= runtime->buffer_size; in snd_p16v_pcm_pointer_capture()