Lines Matching full:runtime

65 	struct snd_pcm_runtime *runtime = substream->runtime;  in snd_gf1_pcm_block_change()  local
66 struct gus_pcm_private *pcmp = runtime->private_data; in snd_gf1_pcm_block_change()
76 if (snd_pcm_format_unsigned(runtime->format)) in snd_gf1_pcm_block_change()
78 if (snd_pcm_format_width(runtime->format) == 16) in snd_gf1_pcm_block_change()
81 block.buffer = runtime->dma_area + offset; in snd_gf1_pcm_block_change()
82 block.buf_addr = runtime->dma_addr + offset; in snd_gf1_pcm_block_change()
93 struct snd_pcm_runtime *runtime = substream->runtime; in snd_gf1_pcm_trigger_up() local
94 struct gus_pcm_private *pcmp = runtime->private_data; in snd_gf1_pcm_trigger_up()
112 rate = snd_gf1_translate_freq(gus, runtime->rate << 4); in snd_gf1_pcm_trigger_up()
114 voice_ctrl = snd_pcm_format_width(runtime->format) == 16 ? 0x24 : 0x20; in snd_gf1_pcm_trigger_up()
122 begin = pcmp->memory + voice * (pcmp->dma_size / runtime->channels); in snd_gf1_pcm_trigger_up()
123 curr = begin + (pcmp->bpos * pcmp->block_size) / runtime->channels; in snd_gf1_pcm_trigger_up()
124 end = curr + (pcmp->block_size / runtime->channels); in snd_gf1_pcm_trigger_up()
125 end -= snd_pcm_format_width(runtime->format) == 16 ? 2 : 1; in snd_gf1_pcm_trigger_up()
131 pan = runtime->channels == 2 ? (!voice ? 1 : 14) : 8; in snd_gf1_pcm_trigger_up()
175 struct snd_pcm_runtime *runtime; in snd_gf1_pcm_interrupt_wave() local
192 runtime = pcmp->substream->runtime; in snd_gf1_pcm_interrupt_wave()
214 end = pcmp->memory + (((pcmp->bpos + 1) * pcmp->block_size) / runtime->channels); in snd_gf1_pcm_interrupt_wave()
216 step = pcmp->dma_size / runtime->channels; in snd_gf1_pcm_interrupt_wave()
243 if ((runtime->flags & SNDRV_PCM_FLG_MMAP) && in snd_gf1_pcm_interrupt_wave()
244 *runtime->state == SNDRV_PCM_STATE_RUNNING) { in snd_gf1_pcm_interrupt_wave()
246 if (runtime->channels > 1) { in snd_gf1_pcm_interrupt_wave()
355 struct snd_pcm_runtime *runtime = substream->runtime; in playback_copy_ack() local
356 struct gus_pcm_private *pcmp = runtime->private_data; in playback_copy_ack()
364 w16 = (snd_pcm_format_width(runtime->format) == 16); in playback_copy_ack()
365 invert = snd_pcm_format_unsigned(runtime->format); in playback_copy_ack()
366 return snd_gf1_pcm_poke_block(gus, runtime->dma_area + bpos, in playback_copy_ack()
374 struct snd_pcm_runtime *runtime = substream->runtime; in snd_gf1_pcm_playback_copy() local
375 struct gus_pcm_private *pcmp = runtime->private_data; in snd_gf1_pcm_playback_copy()
382 if (copy_from_iter(runtime->dma_area + bpos, len, src) != len) in snd_gf1_pcm_playback_copy()
391 struct snd_pcm_runtime *runtime = substream->runtime; in snd_gf1_pcm_playback_silence() local
392 struct gus_pcm_private *pcmp = runtime->private_data; in snd_gf1_pcm_playback_silence()
399 snd_pcm_format_set_silence(runtime->format, runtime->dma_area + bpos, in snd_gf1_pcm_playback_silence()
400 bytes_to_samples(runtime, count)); in snd_gf1_pcm_playback_silence()
408 struct snd_pcm_runtime *runtime = substream->runtime; in snd_gf1_pcm_playback_hw_params() local
409 struct gus_pcm_private *pcmp = runtime->private_data; in snd_gf1_pcm_playback_hw_params()
411 if (runtime->buffer_changed) { in snd_gf1_pcm_playback_hw_params()
420 runtime->dma_bytes, 1, 32, in snd_gf1_pcm_playback_hw_params()
455 struct snd_pcm_runtime *runtime = substream->runtime; in snd_gf1_pcm_playback_hw_free() local
456 struct gus_pcm_private *pcmp = runtime->private_data; in snd_gf1_pcm_playback_hw_free()
475 struct snd_pcm_runtime *runtime = substream->runtime; in snd_gf1_pcm_playback_prepare() local
476 struct gus_pcm_private *pcmp = runtime->private_data; in snd_gf1_pcm_playback_prepare()
489 struct snd_pcm_runtime *runtime = substream->runtime; in snd_gf1_pcm_playback_trigger() local
490 struct gus_pcm_private *pcmp = runtime->private_data; in snd_gf1_pcm_playback_trigger()
514 struct snd_pcm_runtime *runtime = substream->runtime; in snd_gf1_pcm_playback_pointer() local
515 struct gus_pcm_private *pcmp = runtime->private_data; in snd_gf1_pcm_playback_pointer()
525 if (substream->runtime->channels > 1) in snd_gf1_pcm_playback_pointer()
527 pos = bytes_to_frames(runtime, pos); in snd_gf1_pcm_playback_pointer()
566 struct snd_pcm_runtime *runtime = substream->runtime; in snd_gf1_pcm_capture_prepare() local
568 snd_gf1_i_write8(gus, SNDRV_GF1_GB_RECORD_RATE, runtime->rate_den - 2); in snd_gf1_pcm_capture_prepare()
571 snd_dma_program(gus->gf1.dma2, runtime->dma_addr, gus->c_period_size, DMA_MODE_READ); in snd_gf1_pcm_capture_prepare()
600 pos = bytes_to_frames(substream->runtime, (gus->c_pos + pos) % gus->c_dma_size); in snd_gf1_pcm_capture_pointer()
652 static void snd_gf1_pcm_playback_free(struct snd_pcm_runtime *runtime) in snd_gf1_pcm_playback_free() argument
654 kfree(runtime->private_data); in snd_gf1_pcm_playback_free()
661 struct snd_pcm_runtime *runtime = substream->runtime; in snd_gf1_pcm_playback_open() local
672 runtime->private_data = pcmp; in snd_gf1_pcm_playback_open()
673 runtime->private_free = snd_gf1_pcm_playback_free; in snd_gf1_pcm_playback_open()
684 runtime->hw = snd_gf1_pcm_playback; in snd_gf1_pcm_playback_open()
685 snd_pcm_limit_isa_dma_size(gus->gf1.dma1, &runtime->hw.buffer_bytes_max); in snd_gf1_pcm_playback_open()
686 snd_pcm_limit_isa_dma_size(gus->gf1.dma1, &runtime->hw.period_bytes_max); in snd_gf1_pcm_playback_open()
687 snd_pcm_hw_constraint_step(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_BYTES, 64); in snd_gf1_pcm_playback_open()
694 struct snd_pcm_runtime *runtime = substream->runtime; in snd_gf1_pcm_playback_close() local
695 struct gus_pcm_private *pcmp = runtime->private_data; in snd_gf1_pcm_playback_close()
706 struct snd_pcm_runtime *runtime = substream->runtime; in snd_gf1_pcm_capture_open() local
711 substream->runtime->hw = snd_gf1_pcm_capture; in snd_gf1_pcm_capture_open()
712 snd_pcm_limit_isa_dma_size(gus->gf1.dma2, &runtime->hw.buffer_bytes_max); in snd_gf1_pcm_capture_open()
713 snd_pcm_limit_isa_dma_size(gus->gf1.dma2, &runtime->hw.period_bytes_max); in snd_gf1_pcm_capture_open()
714 snd_pcm_hw_constraint_ratnums(runtime, 0, SNDRV_PCM_HW_PARAM_RATE, in snd_gf1_pcm_capture_open()