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()
72 if (snd_pcm_format_unsigned(runtime->format)) in snd_gf1_pcm_block_change()
74 if (snd_pcm_format_width(runtime->format) == 16) in snd_gf1_pcm_block_change()
77 block.buffer = runtime->dma_area + offset; in snd_gf1_pcm_block_change()
78 block.buf_addr = runtime->dma_addr + offset; in snd_gf1_pcm_block_change()
89 struct snd_pcm_runtime *runtime = substream->runtime; in snd_gf1_pcm_trigger_up() local
90 struct gus_pcm_private *pcmp = runtime->private_data; in snd_gf1_pcm_trigger_up()
108 rate = snd_gf1_translate_freq(gus, runtime->rate << 4); in snd_gf1_pcm_trigger_up()
110 voice_ctrl = snd_pcm_format_width(runtime->format) == 16 ? 0x24 : 0x20; in snd_gf1_pcm_trigger_up()
118 begin = pcmp->memory + voice * (pcmp->dma_size / runtime->channels); in snd_gf1_pcm_trigger_up()
119 curr = begin + (pcmp->bpos * pcmp->block_size) / runtime->channels; in snd_gf1_pcm_trigger_up()
120 end = curr + (pcmp->block_size / runtime->channels); in snd_gf1_pcm_trigger_up()
121 end -= snd_pcm_format_width(runtime->format) == 16 ? 2 : 1; in snd_gf1_pcm_trigger_up()
122 pan = runtime->channels == 2 ? (!voice ? 1 : 14) : 8; in snd_gf1_pcm_trigger_up()
166 struct snd_pcm_runtime *runtime; in snd_gf1_pcm_interrupt_wave() local
183 runtime = pcmp->substream->runtime; in snd_gf1_pcm_interrupt_wave()
205 end = pcmp->memory + (((pcmp->bpos + 1) * pcmp->block_size) / runtime->channels); in snd_gf1_pcm_interrupt_wave()
207 step = pcmp->dma_size / runtime->channels; in snd_gf1_pcm_interrupt_wave()
234 if ((runtime->flags & SNDRV_PCM_FLG_MMAP) && in snd_gf1_pcm_interrupt_wave()
235 *runtime->state == SNDRV_PCM_STATE_RUNNING) { in snd_gf1_pcm_interrupt_wave()
237 if (runtime->channels > 1) { in snd_gf1_pcm_interrupt_wave()
341 struct snd_pcm_runtime *runtime = substream->runtime; in playback_copy_ack() local
342 struct gus_pcm_private *pcmp = runtime->private_data; in playback_copy_ack()
350 w16 = (snd_pcm_format_width(runtime->format) == 16); in playback_copy_ack()
351 invert = snd_pcm_format_unsigned(runtime->format); in playback_copy_ack()
352 return snd_gf1_pcm_poke_block(gus, runtime->dma_area + bpos, in playback_copy_ack()
360 struct snd_pcm_runtime *runtime = substream->runtime; in snd_gf1_pcm_playback_copy() local
361 struct gus_pcm_private *pcmp = runtime->private_data; in snd_gf1_pcm_playback_copy()
368 if (copy_from_iter(runtime->dma_area + bpos, len, src) != len) in snd_gf1_pcm_playback_copy()
377 struct snd_pcm_runtime *runtime = substream->runtime; in snd_gf1_pcm_playback_silence() local
378 struct gus_pcm_private *pcmp = runtime->private_data; in snd_gf1_pcm_playback_silence()
385 snd_pcm_format_set_silence(runtime->format, runtime->dma_area + bpos, in snd_gf1_pcm_playback_silence()
386 bytes_to_samples(runtime, count)); in snd_gf1_pcm_playback_silence()
394 struct snd_pcm_runtime *runtime = substream->runtime; in snd_gf1_pcm_playback_hw_params() local
395 struct gus_pcm_private *pcmp = runtime->private_data; in snd_gf1_pcm_playback_hw_params()
397 if (runtime->buffer_changed) { in snd_gf1_pcm_playback_hw_params()
406 runtime->dma_bytes, 1, 32, in snd_gf1_pcm_playback_hw_params()
441 struct snd_pcm_runtime *runtime = substream->runtime; in snd_gf1_pcm_playback_hw_free() local
442 struct gus_pcm_private *pcmp = runtime->private_data; in snd_gf1_pcm_playback_hw_free()
461 struct snd_pcm_runtime *runtime = substream->runtime; in snd_gf1_pcm_playback_prepare() local
462 struct gus_pcm_private *pcmp = runtime->private_data; in snd_gf1_pcm_playback_prepare()
475 struct snd_pcm_runtime *runtime = substream->runtime; in snd_gf1_pcm_playback_trigger() local
476 struct gus_pcm_private *pcmp = runtime->private_data; in snd_gf1_pcm_playback_trigger()
500 struct snd_pcm_runtime *runtime = substream->runtime; in snd_gf1_pcm_playback_pointer() local
501 struct gus_pcm_private *pcmp = runtime->private_data; in snd_gf1_pcm_playback_pointer()
511 if (substream->runtime->channels > 1) in snd_gf1_pcm_playback_pointer()
513 pos = bytes_to_frames(runtime, pos); in snd_gf1_pcm_playback_pointer()
552 struct snd_pcm_runtime *runtime = substream->runtime; in snd_gf1_pcm_capture_prepare() local
554 snd_gf1_i_write8(gus, SNDRV_GF1_GB_RECORD_RATE, runtime->rate_den - 2); in snd_gf1_pcm_capture_prepare()
557 snd_dma_program(gus->gf1.dma2, runtime->dma_addr, gus->c_period_size, DMA_MODE_READ); in snd_gf1_pcm_capture_prepare()
586 pos = bytes_to_frames(substream->runtime, (gus->c_pos + pos) % gus->c_dma_size); in snd_gf1_pcm_capture_pointer()
638 static void snd_gf1_pcm_playback_free(struct snd_pcm_runtime *runtime) in snd_gf1_pcm_playback_free() argument
640 kfree(runtime->private_data); in snd_gf1_pcm_playback_free()
647 struct snd_pcm_runtime *runtime = substream->runtime; in snd_gf1_pcm_playback_open() local
658 runtime->private_data = pcmp; in snd_gf1_pcm_playback_open()
659 runtime->private_free = snd_gf1_pcm_playback_free; in snd_gf1_pcm_playback_open()
671 runtime->hw = snd_gf1_pcm_playback; in snd_gf1_pcm_playback_open()
672 snd_pcm_limit_isa_dma_size(gus->gf1.dma1, &runtime->hw.buffer_bytes_max); in snd_gf1_pcm_playback_open()
673 snd_pcm_limit_isa_dma_size(gus->gf1.dma1, &runtime->hw.period_bytes_max); in snd_gf1_pcm_playback_open()
674 snd_pcm_hw_constraint_step(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_BYTES, 64); in snd_gf1_pcm_playback_open()
681 struct snd_pcm_runtime *runtime = substream->runtime; in snd_gf1_pcm_playback_close() local
682 struct gus_pcm_private *pcmp = runtime->private_data; in snd_gf1_pcm_playback_close()
693 struct snd_pcm_runtime *runtime = substream->runtime; in snd_gf1_pcm_capture_open() local
698 substream->runtime->hw = snd_gf1_pcm_capture; in snd_gf1_pcm_capture_open()
699 snd_pcm_limit_isa_dma_size(gus->gf1.dma2, &runtime->hw.buffer_bytes_max); in snd_gf1_pcm_capture_open()
700 snd_pcm_limit_isa_dma_size(gus->gf1.dma2, &runtime->hw.period_bytes_max); in snd_gf1_pcm_capture_open()
701 snd_pcm_hw_constraint_ratnums(runtime, 0, SNDRV_PCM_HW_PARAM_RATE, in snd_gf1_pcm_capture_open()