[alsa-devel] [PATCH 3/5] ALSA: hdspm - Reorder period sizes according to their bit representation

Adrian Knoth adi at drcomp.erfurt.thur.de
Mon Aug 15 00:22:52 CEST 2011


On newer RME cards like RayDAT and AIO, the 8192 samples per period size
are no longer supported. Instead, setting all three bits of
HDSP_LatencyMask to one ({1,1,1}) now corresponds to 32 samples per
period.

To make this more obvious to future developers, let's reorder the array
according to their bit representation, starting at 64 ({0,0,0}) up to
4096 ({1,1,0}) and finally 32 ({1,1,1}).

Note that this patch doesn't change semantics.

Signed-off-by: Adrian Knoth <adi at drcomp.erfurt.thur.de>

diff --git a/sound/pci/rme9652/hdspm.c b/sound/pci/rme9652/hdspm.c
index 8dc2a89..159133a 100644
--- a/sound/pci/rme9652/hdspm.c
+++ b/sound/pci/rme9652/hdspm.c
@@ -5677,7 +5677,7 @@ static unsigned int period_sizes_old[] = {
 };
 
 static unsigned int period_sizes_new[] = {
-	32, 64, 128, 256, 512, 1024, 2048, 4096
+	64, 128, 256, 512, 1024, 2048, 4096, 32
 };
 
 /* RayDAT and AIO always have a buffer of 16384 samples per channel */
-- 
1.7.5.4



More information about the Alsa-devel mailing list