All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Enable low latency EFX capture on emu10k1
@ 2004-07-14  6:22 Lee Revell
  2004-07-14 16:05 ` Lee Revell
  0 siblings, 1 reply; 3+ messages in thread
From: Lee Revell @ 2004-07-14  6:22 UTC (permalink / raw)
  To: alsa-devel

The following patch fixes EFX capture on the emu10k1.  The
capture_period_sizes table is in bytes, but the hardware constraint was
being set in frames.

I tested 4 channel recording with a capture period of 64 frames (64
frames x 2 bytes/sample x 4 channels = 512, the lowest power of 2
capture period allowed).

Lee

Index: alsa-kernel/pci/emu10k1/emupcm.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/emu10k1/emupcm.c,v
retrieving revision 1.29
diff -u -r1.29 emupcm.c
--- alsa-kernel/pci/emu10k1/emupcm.c    1 Jul 2004 09:22:16 -0000       1.29
+++ alsa-kernel/pci/emu10k1/emupcm.c    14 Jul 2004 06:14:38 -0000
@@ -852,7 +852,7 @@
        runtime->hw = snd_emu10k1_capture;
        emu->capture_interrupt = snd_emu10k1_pcm_ac97adc_interrupt;
        emu->pcm_capture_substream = substream;
-       snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_SIZE, &hw_constraints_capture_period_sizes);
+       snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_BYTES, &hw_constraints_capture_period_sizes);
        snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_RATE, &hw_constraints_capture_rates);
        return 0;
 }
@@ -891,7 +891,7 @@
        runtime->hw.channels_min = 1;
        emu->capture_mic_interrupt = snd_emu10k1_pcm_ac97mic_interrupt;
        emu->pcm_capture_mic_substream = substream;
-       snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_SIZE, &hw_constraints_capture_period_sizes);
+       snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_BYTES, &hw_constraints_capture_period_sizes);
        return 0;
 }
 
@@ -942,7 +942,7 @@
        spin_unlock_irqrestore(&emu->reg_lock, flags);
        emu->capture_efx_interrupt = snd_emu10k1_pcm_efx_interrupt;
        emu->pcm_capture_efx_substream = substream;
-       snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_SIZE, &hw_constraints_capture_period_sizes);
+       snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_BYTES, &hw_constraints_capture_period_sizes);
        return 0;
 }
 




-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-07-14 16:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-07-14  6:22 [PATCH] Enable low latency EFX capture on emu10k1 Lee Revell
2004-07-14 16:05 ` Lee Revell
2004-07-14 16:17   ` Takashi Iwai

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.