diff options
author | Daniel Mack <daniel@caiaq.de> | 2008-04-14 15:40:31 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2008-04-24 12:00:36 +0200 |
commit | 6e9fc6bd5db34a6580e1917bd0fea4b0754c7de8 (patch) | |
tree | 1773120a4c1c1a1221a7b8b9a71781a8d3ca2dab /sound/usb/caiaq/caiaq-audio.c | |
parent | 6849d49c48718def95cf1b74154b9b0aee617c7e (diff) |
[ALSA] 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.
Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/caiaq/caiaq-audio.c')
-rw-r--r-- | sound/usb/caiaq/caiaq-audio.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sound/usb/caiaq/caiaq-audio.c b/sound/usb/caiaq/caiaq-audio.c index ebf32818a16..24970a5c888 100644 --- a/sound/usb/caiaq/caiaq-audio.c +++ b/sound/usb/caiaq/caiaq-audio.c @@ -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) |