Lines Matching refs:runtime

152 static void snd_p16v_pcm_free_substream(struct snd_pcm_runtime *runtime)  in snd_p16v_pcm_free_substream()  argument
154 struct snd_emu10k1_pcm *epcm = runtime->private_data; in snd_p16v_pcm_free_substream()
165 struct snd_pcm_runtime *runtime = substream->runtime; in snd_p16v_pcm_open_playback_channel() local
179 runtime->private_data = epcm; in snd_p16v_pcm_open_playback_channel()
180 runtime->private_free = snd_p16v_pcm_free_substream; in snd_p16v_pcm_open_playback_channel()
182 runtime->hw = snd_p16v_playback_hw; in snd_p16v_pcm_open_playback_channel()
197 err = snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS); in snd_p16v_pcm_open_playback_channel()
201 runtime->sync.id32[0] = substream->pcm->card->number; in snd_p16v_pcm_open_playback_channel()
202 runtime->sync.id32[1] = 'P'; in snd_p16v_pcm_open_playback_channel()
203 runtime->sync.id32[2] = 16; in snd_p16v_pcm_open_playback_channel()
204 runtime->sync.id32[3] = 'V'; in snd_p16v_pcm_open_playback_channel()
214 struct snd_pcm_runtime *runtime = substream->runtime; in snd_p16v_pcm_open_capture_channel() local
228 runtime->private_data = epcm; in snd_p16v_pcm_open_capture_channel()
229 runtime->private_free = snd_p16v_pcm_free_substream; in snd_p16v_pcm_open_capture_channel()
231 runtime->hw = snd_p16v_capture_hw; in snd_p16v_pcm_open_capture_channel()
246 err = snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS); in snd_p16v_pcm_open_capture_channel()
291 struct snd_pcm_runtime *runtime = substream->runtime; in snd_p16v_pcm_prepare_playback() local
294 u32 period_size_bytes = frames_to_bytes(runtime, runtime->period_size); in snd_p16v_pcm_prepare_playback()
303 channel, runtime->rate, runtime->format, runtime->channels, in snd_p16v_pcm_prepare_playback()
304 runtime->buffer_size, runtime->period_size, in snd_p16v_pcm_prepare_playback()
305 runtime->periods, frames_to_bytes(runtime, 1)); in snd_p16v_pcm_prepare_playback()
308 runtime->dma_addr, runtime->dma_area, table_base); in snd_p16v_pcm_prepare_playback()
315 switch (runtime->rate) { in snd_p16v_pcm_prepare_playback()
331 for(i = 0; i < runtime->periods; i++) { in snd_p16v_pcm_prepare_playback()
332 table_base[i*2]=runtime->dma_addr+(i*period_size_bytes); in snd_p16v_pcm_prepare_playback()
337 snd_emu10k1_ptr20_write(emu, PLAYBACK_LIST_SIZE, channel, (runtime->periods - 1) << 19); in snd_p16v_pcm_prepare_playback()
339 snd_emu10k1_ptr20_write(emu, PLAYBACK_DMA_ADDR, channel, runtime->dma_addr); in snd_p16v_pcm_prepare_playback()
353 struct snd_pcm_runtime *runtime = substream->runtime; in snd_p16v_pcm_prepare_capture() local
366 switch (runtime->rate) { in snd_p16v_pcm_prepare_capture()
383 snd_emu10k1_ptr20_write(emu, CAPTURE_DMA_ADDR, channel, runtime->dma_addr); in snd_p16v_pcm_prepare_capture()
384 …snd_emu10k1_ptr20_write(emu, CAPTURE_BUFFER_SIZE, channel, frames_to_bytes(runtime, runtime->buffe… in snd_p16v_pcm_prepare_capture()
419 struct snd_pcm_runtime *runtime; in snd_p16v_pcm_trigger_playback() local
441 runtime = s->runtime; in snd_p16v_pcm_trigger_playback()
442 epcm = runtime->private_data; in snd_p16v_pcm_trigger_playback()
473 struct snd_pcm_runtime *runtime = substream->runtime; in snd_p16v_pcm_trigger_capture() local
474 struct snd_emu10k1_pcm *epcm = runtime->private_data; in snd_p16v_pcm_trigger_capture()
503 struct snd_pcm_runtime *runtime = substream->runtime; in snd_p16v_pcm_pointer_playback() local
504 struct snd_emu10k1_pcm *epcm = runtime->private_data; in snd_p16v_pcm_pointer_playback()
514 ptr2 = bytes_to_frames(runtime, ptr1); in snd_p16v_pcm_pointer_playback()
515 ptr2+= (ptr4 >> 3) * runtime->period_size; in snd_p16v_pcm_pointer_playback()
517 if (ptr >= runtime->buffer_size) in snd_p16v_pcm_pointer_playback()
518 ptr -= runtime->buffer_size; in snd_p16v_pcm_pointer_playback()
528 struct snd_pcm_runtime *runtime = substream->runtime; in snd_p16v_pcm_pointer_capture() local
529 struct snd_emu10k1_pcm *epcm = runtime->private_data; in snd_p16v_pcm_pointer_capture()
537 ptr2 = bytes_to_frames(runtime, ptr1); in snd_p16v_pcm_pointer_capture()
539 if (ptr >= runtime->buffer_size) { in snd_p16v_pcm_pointer_capture()
540 ptr -= runtime->buffer_size; in snd_p16v_pcm_pointer_capture()