Lines Matching defs:runtime

65 	struct snd_pcm_runtime *runtime = substream->runtime;
66 struct gus_pcm_private *pcmp = runtime->private_data;
76 if (snd_pcm_format_unsigned(runtime->format))
78 if (snd_pcm_format_width(runtime->format) == 16)
81 block.buffer = runtime->dma_area + offset;
82 block.buf_addr = runtime->dma_addr + offset;
93 struct snd_pcm_runtime *runtime = substream->runtime;
94 struct gus_pcm_private *pcmp = runtime->private_data;
112 rate = snd_gf1_translate_freq(gus, runtime->rate << 4);
114 voice_ctrl = snd_pcm_format_width(runtime->format) == 16 ? 0x24 : 0x20;
122 begin = pcmp->memory + voice * (pcmp->dma_size / runtime->channels);
123 curr = begin + (pcmp->bpos * pcmp->block_size) / runtime->channels;
124 end = curr + (pcmp->block_size / runtime->channels);
125 end -= snd_pcm_format_width(runtime->format) == 16 ? 2 : 1;
131 pan = runtime->channels == 2 ? (!voice ? 1 : 14) : 8;
175 struct snd_pcm_runtime *runtime;
192 runtime = pcmp->substream->runtime;
214 end = pcmp->memory + (((pcmp->bpos + 1) * pcmp->block_size) / runtime->channels);
216 step = pcmp->dma_size / runtime->channels;
243 if ((runtime->flags & SNDRV_PCM_FLG_MMAP) &&
244 *runtime->state == SNDRV_PCM_STATE_RUNNING) {
246 if (runtime->channels > 1) {
355 struct snd_pcm_runtime *runtime = substream->runtime;
356 struct gus_pcm_private *pcmp = runtime->private_data;
364 w16 = (snd_pcm_format_width(runtime->format) == 16);
365 invert = snd_pcm_format_unsigned(runtime->format);
366 return snd_gf1_pcm_poke_block(gus, runtime->dma_area + bpos,
374 struct snd_pcm_runtime *runtime = substream->runtime;
375 struct gus_pcm_private *pcmp = runtime->private_data;
382 if (copy_from_user(runtime->dma_area + bpos, src, len))
391 struct snd_pcm_runtime *runtime = substream->runtime;
392 struct gus_pcm_private *pcmp = runtime->private_data;
399 memcpy(runtime->dma_area + bpos, src, len);
407 struct snd_pcm_runtime *runtime = substream->runtime;
408 struct gus_pcm_private *pcmp = runtime->private_data;
415 snd_pcm_format_set_silence(runtime->format, runtime->dma_area + bpos,
416 bytes_to_samples(runtime, count));
424 struct snd_pcm_runtime *runtime = substream->runtime;
425 struct gus_pcm_private *pcmp = runtime->private_data;
427 if (runtime->buffer_changed) {
436 runtime->dma_bytes, 1, 32,
468 struct snd_pcm_runtime *runtime = substream->runtime;
469 struct gus_pcm_private *pcmp = runtime->private_data;
488 struct snd_pcm_runtime *runtime = substream->runtime;
489 struct gus_pcm_private *pcmp = runtime->private_data;
502 struct snd_pcm_runtime *runtime = substream->runtime;
503 struct gus_pcm_private *pcmp = runtime->private_data;
527 struct snd_pcm_runtime *runtime = substream->runtime;
528 struct gus_pcm_private *pcmp = runtime->private_data;
538 if (substream->runtime->channels > 1)
540 pos = bytes_to_frames(runtime, pos);
579 struct snd_pcm_runtime *runtime = substream->runtime;
581 snd_gf1_i_write8(gus, SNDRV_GF1_GB_RECORD_RATE, runtime->rate_den - 2);
584 snd_dma_program(gus->gf1.dma2, runtime->dma_addr, gus->c_period_size, DMA_MODE_READ);
613 pos = bytes_to_frames(substream->runtime, (gus->c_pos + pos) % gus->c_dma_size);
665 static void snd_gf1_pcm_playback_free(struct snd_pcm_runtime *runtime)
667 kfree(runtime->private_data);
674 struct snd_pcm_runtime *runtime = substream->runtime;
685 runtime->private_data = pcmp;
686 runtime->private_free = snd_gf1_pcm_playback_free;
696 runtime->hw = snd_gf1_pcm_playback;
697 snd_pcm_limit_isa_dma_size(gus->gf1.dma1, &runtime->hw.buffer_bytes_max);
698 snd_pcm_limit_isa_dma_size(gus->gf1.dma1, &runtime->hw.period_bytes_max);
699 snd_pcm_hw_constraint_step(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_BYTES, 64);
706 struct snd_pcm_runtime *runtime = substream->runtime;
707 struct gus_pcm_private *pcmp = runtime->private_data;
718 struct snd_pcm_runtime *runtime = substream->runtime;
723 substream->runtime->hw = snd_gf1_pcm_capture;
724 snd_pcm_limit_isa_dma_size(gus->gf1.dma2, &runtime->hw.buffer_bytes_max);
725 snd_pcm_limit_isa_dma_size(gus->gf1.dma2, &runtime->hw.period_bytes_max);
726 snd_pcm_hw_constraint_ratnums(runtime, 0, SNDRV_PCM_HW_PARAM_RATE,