From d9fdc1190ca7ea16fd36f8ca5cccda6679917b88 Mon Sep 17 00:00:00 2001 From: rncbc Date: Wed, 29 Nov 2006 20:06:36 +0000 Subject: [PATCH] Fix for drivers/alsa/usx2y interleave skip handling, should also take care of 122s & 224s. Without this, rawusb mode is just a noise generator :) Signed-off-by: Karsten Wiese Signed-off-by: Rui Nuno Capela git-svn-id: svn+ssh://jackaudio.org/trunk/jack@999 0c269be4-1314-0410-8aa9-9f06e86f4224 --- configure.ac | 2 +- drivers/alsa/usx2y.c | 13 ++++++++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/configure.ac b/configure.ac index 223c890..b5cacfd 100644 --- a/configure.ac +++ b/configure.ac @@ -17,7 +17,7 @@ dnl changes are made dnl --- JACK_MAJOR_VERSION=0 JACK_MINOR_VERSION=102 -JACK_MICRO_VERSION=27 +JACK_MICRO_VERSION=28 dnl --- dnl HOWTO: updating the jack protocol version diff --git a/drivers/alsa/usx2y.c b/drivers/alsa/usx2y.c index c6e3e7a..be59050 100644 --- a/drivers/alsa/usx2y.c +++ b/drivers/alsa/usx2y.c @@ -208,16 +208,19 @@ usx2y_driver_get_channel_addresses_capture (alsa_driver_t *driver, static int usx2y_driver_start (alsa_driver_t *driver) { - int err; + int err, i; snd_pcm_uframes_t poffset, pavail; usx2y_t *h = (usx2y_t *) driver->hw->private; - if (driver->capture_nchannels == 4) { + for (i = 0; i < driver->capture_nchannels; i++) // US428 channels 3+4 are on a seperate 2 channel stream. - // ALSA thinks its 1 stream with 4 channels, so we have to hack here. - driver->capture_interleave_skip = 2 * driver->capture_sample_bytes; - } + // ALSA thinks its 1 stream with 4 channels. + driver->capture_interleave_skip[i] = 2 * driver->capture_sample_bytes; + + + driver->playback_interleave_skip[0] = 2 * driver->playback_sample_bytes; + driver->playback_interleave_skip[1] = 2 * driver->playback_sample_bytes; driver->poll_last = 0; driver->poll_next = 0;