Skip to contentSkip to conversation

snd_usb_caiaq: make high sample rates work with A8DJ

PATCH Applied Daniel Mack 2 participants 2 messages Apr 10, 2008 – Apr 14, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 snd_usb_caiaq: make high sample rates work with A8DJ

This patch for snd_usb_caiaq makes sample rates higher dann 48KHz work with devices which have more than 2 stereo input/output pairs.

sound/usb/caiaq/caiaq-audio.c +6 -2
index ebf3281..24970a5 100644
@@ -39,7 +39,8 @@
 #define BYTES_PER_SAMPLE	3
 #define BYTES_PER_SAMPLE_USB	4
 #define MAX_BUFFER_SIZE		(128*1024)
-				 
+#define MAX_ENDPOINT_SIZE	512
+
 #define ENDPOINT_CAPTURE	2
 #define ENDPOINT_PLAYBACK	6
 
@@ -221,7 +222,10 @@ static int snd_usb_caiaq_pcm_prepare(struct snd_pcm_substream *substream)
 	
 	bpp = ((runtime->rate / 8000) + CLOCK_DRIFT_TOLERANCE)
 		* bytes_per_sample * CHANNELS_PER_STREAM * dev->n_streams;
-	
+
+	if (bpp > MAX_ENDPOINT_SIZE)
+		bpp = MAX_ENDPOINT_SIZE;
+
 	ret = snd_usb_caiaq_set_audio_params(dev, runtime->rate,
 					     runtime->sample_bits, bpp);
 	if (ret)
sound/usb/caiaq/caiaq-device.c +1 -1
index 379e608..e97d8b2 100644
@@ -42,7 +42,7 @@
 #endif
 
 MODULE_AUTHOR("Daniel Mack <[email protected]>");
-MODULE_DESCRIPTION("caiaq USB audio, version 1.3.5");
+MODULE_DESCRIPTION("caiaq USB audio, version 1.3.6");
 MODULE_LICENSE("GPL");
 MODULE_SUPPORTED_DEVICE("{{Native Instruments, RigKontrol2},"
 			 "{Native Instruments, RigKontrol3},"

_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

Applied
#1 lore raw

At Thu, 10 Apr 2008 14:20:04 +0200,

Quoted 5 lines · Daniel Mack

This patch for snd_usb_caiaq makes sample rates higher dann 48KHz work with devices which have more than 2 stereo input/output pairs.

Thanks, applied 1.3.4-1.3.6 patches. I dropped 1.3.7 since it doesn't matter as Adrian suggested (and one part is even buggy).

Takashi