Lines Matching refs:runtime

80 	struct snd_pcm_runtime *runtime = substream->runtime;  in snd_gf1_pcm_block_change()  local
81 struct gus_pcm_private *pcmp = runtime->private_data; in snd_gf1_pcm_block_change()
91 if (snd_pcm_format_unsigned(runtime->format)) in snd_gf1_pcm_block_change()
93 if (snd_pcm_format_width(runtime->format) == 16) in snd_gf1_pcm_block_change()
96 block.buffer = runtime->dma_area + offset; in snd_gf1_pcm_block_change()
97 block.buf_addr = runtime->dma_addr + offset; in snd_gf1_pcm_block_change()
108 struct snd_pcm_runtime *runtime = substream->runtime; in snd_gf1_pcm_trigger_up() local
109 struct gus_pcm_private *pcmp = runtime->private_data; in snd_gf1_pcm_trigger_up()
127 rate = snd_gf1_translate_freq(gus, runtime->rate << 4); in snd_gf1_pcm_trigger_up()
129 voice_ctrl = snd_pcm_format_width(runtime->format) == 16 ? 0x24 : 0x20; in snd_gf1_pcm_trigger_up()
137 begin = pcmp->memory + voice * (pcmp->dma_size / runtime->channels); in snd_gf1_pcm_trigger_up()
138 curr = begin + (pcmp->bpos * pcmp->block_size) / runtime->channels; in snd_gf1_pcm_trigger_up()
139 end = curr + (pcmp->block_size / runtime->channels); in snd_gf1_pcm_trigger_up()
140 end -= snd_pcm_format_width(runtime->format) == 16 ? 2 : 1; in snd_gf1_pcm_trigger_up()
146 pan = runtime->channels == 2 ? (!voice ? 1 : 14) : 8; in snd_gf1_pcm_trigger_up()
190 struct snd_pcm_runtime *runtime; in snd_gf1_pcm_interrupt_wave() local
207 runtime = pcmp->substream->runtime; in snd_gf1_pcm_interrupt_wave()
229 end = pcmp->memory + (((pcmp->bpos + 1) * pcmp->block_size) / runtime->channels); in snd_gf1_pcm_interrupt_wave()
231 step = pcmp->dma_size / runtime->channels; in snd_gf1_pcm_interrupt_wave()
258 if ((runtime->flags & SNDRV_PCM_FLG_MMAP) && in snd_gf1_pcm_interrupt_wave()
259 *runtime->state == SNDRV_PCM_STATE_RUNNING) { in snd_gf1_pcm_interrupt_wave()
261 if (runtime->channels > 1) { in snd_gf1_pcm_interrupt_wave()
362 struct snd_pcm_runtime *runtime = substream->runtime; in snd_gf1_pcm_playback_copy() local
363 struct gus_pcm_private *pcmp = runtime->private_data; in snd_gf1_pcm_playback_copy()
366 bpos = samples_to_bytes(runtime, pos) + (voice * (pcmp->dma_size / 2)); in snd_gf1_pcm_playback_copy()
367 len = samples_to_bytes(runtime, count); in snd_gf1_pcm_playback_copy()
372 if (copy_from_user(runtime->dma_area + bpos, src, len)) in snd_gf1_pcm_playback_copy()
380 w16 = (snd_pcm_format_width(runtime->format) == 16); in snd_gf1_pcm_playback_copy()
381 invert = snd_pcm_format_unsigned(runtime->format); in snd_gf1_pcm_playback_copy()
382 …if ((err = snd_gf1_pcm_poke_block(gus, runtime->dma_area + bpos, pcmp->memory + bpos, len, w16, in… in snd_gf1_pcm_playback_copy()
393 struct snd_pcm_runtime *runtime = substream->runtime; in snd_gf1_pcm_playback_silence() local
394 struct gus_pcm_private *pcmp = runtime->private_data; in snd_gf1_pcm_playback_silence()
397 bpos = samples_to_bytes(runtime, pos) + (voice * (pcmp->dma_size / 2)); in snd_gf1_pcm_playback_silence()
398 len = samples_to_bytes(runtime, count); in snd_gf1_pcm_playback_silence()
403 snd_pcm_format_set_silence(runtime->format, runtime->dma_area + bpos, count); in snd_gf1_pcm_playback_silence()
410 w16 = (snd_pcm_format_width(runtime->format) == 16); in snd_gf1_pcm_playback_silence()
411 invert = snd_pcm_format_unsigned(runtime->format); in snd_gf1_pcm_playback_silence()
412 …if ((err = snd_gf1_pcm_poke_block(gus, runtime->dma_area + bpos, pcmp->memory + bpos, len, w16, in… in snd_gf1_pcm_playback_silence()
422 struct snd_pcm_runtime *runtime = substream->runtime; in snd_gf1_pcm_playback_hw_params() local
423 struct gus_pcm_private *pcmp = runtime->private_data; in snd_gf1_pcm_playback_hw_params()
437 runtime->dma_bytes, 1, 32, in snd_gf1_pcm_playback_hw_params()
469 struct snd_pcm_runtime *runtime = substream->runtime; in snd_gf1_pcm_playback_hw_free() local
470 struct gus_pcm_private *pcmp = runtime->private_data; in snd_gf1_pcm_playback_hw_free()
490 struct snd_pcm_runtime *runtime = substream->runtime; in snd_gf1_pcm_playback_prepare() local
491 struct gus_pcm_private *pcmp = runtime->private_data; in snd_gf1_pcm_playback_prepare()
504 struct snd_pcm_runtime *runtime = substream->runtime; in snd_gf1_pcm_playback_trigger() local
505 struct gus_pcm_private *pcmp = runtime->private_data; in snd_gf1_pcm_playback_trigger()
529 struct snd_pcm_runtime *runtime = substream->runtime; in snd_gf1_pcm_playback_pointer() local
530 struct gus_pcm_private *pcmp = runtime->private_data; in snd_gf1_pcm_playback_pointer()
540 if (substream->runtime->channels > 1) in snd_gf1_pcm_playback_pointer()
542 pos = bytes_to_frames(runtime, pos); in snd_gf1_pcm_playback_pointer()
586 struct snd_pcm_runtime *runtime = substream->runtime; in snd_gf1_pcm_capture_prepare() local
588 snd_gf1_i_write8(gus, SNDRV_GF1_GB_RECORD_RATE, runtime->rate_den - 2); in snd_gf1_pcm_capture_prepare()
591 snd_dma_program(gus->gf1.dma2, runtime->dma_addr, gus->c_period_size, DMA_MODE_READ); in snd_gf1_pcm_capture_prepare()
620 pos = bytes_to_frames(substream->runtime, (gus->c_pos + pos) % gus->c_dma_size); in snd_gf1_pcm_capture_pointer()
672 static void snd_gf1_pcm_playback_free(struct snd_pcm_runtime *runtime) in snd_gf1_pcm_playback_free() argument
674 kfree(runtime->private_data); in snd_gf1_pcm_playback_free()
681 struct snd_pcm_runtime *runtime = substream->runtime; in snd_gf1_pcm_playback_open() local
692 runtime->private_data = pcmp; in snd_gf1_pcm_playback_open()
693 runtime->private_free = snd_gf1_pcm_playback_free; in snd_gf1_pcm_playback_open()
703 runtime->hw = snd_gf1_pcm_playback; in snd_gf1_pcm_playback_open()
704 snd_pcm_limit_isa_dma_size(gus->gf1.dma1, &runtime->hw.buffer_bytes_max); in snd_gf1_pcm_playback_open()
705 snd_pcm_limit_isa_dma_size(gus->gf1.dma1, &runtime->hw.period_bytes_max); in snd_gf1_pcm_playback_open()
706 snd_pcm_hw_constraint_step(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_BYTES, 64); in snd_gf1_pcm_playback_open()
713 struct snd_pcm_runtime *runtime = substream->runtime; in snd_gf1_pcm_playback_close() local
714 struct gus_pcm_private *pcmp = runtime->private_data; in snd_gf1_pcm_playback_close()
725 struct snd_pcm_runtime *runtime = substream->runtime; in snd_gf1_pcm_capture_open() local
730 substream->runtime->hw = snd_gf1_pcm_capture; in snd_gf1_pcm_capture_open()
731 snd_pcm_limit_isa_dma_size(gus->gf1.dma2, &runtime->hw.buffer_bytes_max); in snd_gf1_pcm_capture_open()
732 snd_pcm_limit_isa_dma_size(gus->gf1.dma2, &runtime->hw.period_bytes_max); in snd_gf1_pcm_capture_open()
733 snd_pcm_hw_constraint_ratnums(runtime, 0, SNDRV_PCM_HW_PARAM_RATE, in snd_gf1_pcm_capture_open()