Lines Matching refs: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_user(runtime->dma_area + bpos, src, len)) in snd_gf1_pcm_playback_copy()
391 struct snd_pcm_runtime *runtime = substream->runtime; in snd_gf1_pcm_playback_copy_kernel() local
392 struct gus_pcm_private *pcmp = runtime->private_data; in snd_gf1_pcm_playback_copy_kernel()
399 memcpy(runtime->dma_area + bpos, src, len); in snd_gf1_pcm_playback_copy_kernel()
407 struct snd_pcm_runtime *runtime = substream->runtime; in snd_gf1_pcm_playback_silence() local
408 struct gus_pcm_private *pcmp = runtime->private_data; in snd_gf1_pcm_playback_silence()
415 snd_pcm_format_set_silence(runtime->format, runtime->dma_area + bpos, in snd_gf1_pcm_playback_silence()
416 bytes_to_samples(runtime, count)); in snd_gf1_pcm_playback_silence()
424 struct snd_pcm_runtime *runtime = substream->runtime; in snd_gf1_pcm_playback_hw_params() local
425 struct gus_pcm_private *pcmp = runtime->private_data; in snd_gf1_pcm_playback_hw_params()
427 if (runtime->buffer_changed) { in snd_gf1_pcm_playback_hw_params()
436 runtime->dma_bytes, 1, 32, in snd_gf1_pcm_playback_hw_params()
471 struct snd_pcm_runtime *runtime = substream->runtime; in snd_gf1_pcm_playback_hw_free() local
472 struct gus_pcm_private *pcmp = runtime->private_data; in snd_gf1_pcm_playback_hw_free()
491 struct snd_pcm_runtime *runtime = substream->runtime; in snd_gf1_pcm_playback_prepare() local
492 struct gus_pcm_private *pcmp = runtime->private_data; in snd_gf1_pcm_playback_prepare()
505 struct snd_pcm_runtime *runtime = substream->runtime; in snd_gf1_pcm_playback_trigger() local
506 struct gus_pcm_private *pcmp = runtime->private_data; in snd_gf1_pcm_playback_trigger()
530 struct snd_pcm_runtime *runtime = substream->runtime; in snd_gf1_pcm_playback_pointer() local
531 struct gus_pcm_private *pcmp = runtime->private_data; in snd_gf1_pcm_playback_pointer()
541 if (substream->runtime->channels > 1) in snd_gf1_pcm_playback_pointer()
543 pos = bytes_to_frames(runtime, pos); in snd_gf1_pcm_playback_pointer()
582 struct snd_pcm_runtime *runtime = substream->runtime; in snd_gf1_pcm_capture_prepare() local
584 snd_gf1_i_write8(gus, SNDRV_GF1_GB_RECORD_RATE, runtime->rate_den - 2); in snd_gf1_pcm_capture_prepare()
587 snd_dma_program(gus->gf1.dma2, runtime->dma_addr, gus->c_period_size, DMA_MODE_READ); in snd_gf1_pcm_capture_prepare()
616 pos = bytes_to_frames(substream->runtime, (gus->c_pos + pos) % gus->c_dma_size); in snd_gf1_pcm_capture_pointer()
668 static void snd_gf1_pcm_playback_free(struct snd_pcm_runtime *runtime) in snd_gf1_pcm_playback_free() argument
670 kfree(runtime->private_data); in snd_gf1_pcm_playback_free()
677 struct snd_pcm_runtime *runtime = substream->runtime; in snd_gf1_pcm_playback_open() local
688 runtime->private_data = pcmp; in snd_gf1_pcm_playback_open()
689 runtime->private_free = snd_gf1_pcm_playback_free; in snd_gf1_pcm_playback_open()
700 runtime->hw = snd_gf1_pcm_playback; in snd_gf1_pcm_playback_open()
701 snd_pcm_limit_isa_dma_size(gus->gf1.dma1, &runtime->hw.buffer_bytes_max); in snd_gf1_pcm_playback_open()
702 snd_pcm_limit_isa_dma_size(gus->gf1.dma1, &runtime->hw.period_bytes_max); in snd_gf1_pcm_playback_open()
703 snd_pcm_hw_constraint_step(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_BYTES, 64); in snd_gf1_pcm_playback_open()
710 struct snd_pcm_runtime *runtime = substream->runtime; in snd_gf1_pcm_playback_close() local
711 struct gus_pcm_private *pcmp = runtime->private_data; in snd_gf1_pcm_playback_close()
722 struct snd_pcm_runtime *runtime = substream->runtime; in snd_gf1_pcm_capture_open() local
727 substream->runtime->hw = snd_gf1_pcm_capture; in snd_gf1_pcm_capture_open()
728 snd_pcm_limit_isa_dma_size(gus->gf1.dma2, &runtime->hw.buffer_bytes_max); in snd_gf1_pcm_capture_open()
729 snd_pcm_limit_isa_dma_size(gus->gf1.dma2, &runtime->hw.period_bytes_max); in snd_gf1_pcm_capture_open()
730 snd_pcm_hw_constraint_ratnums(runtime, 0, SNDRV_PCM_HW_PARAM_RATE, in snd_gf1_pcm_capture_open()