From: Jaroslav Kysela Date: Fri, 25 Oct 2019 11:43:31 +0000 (+0200) Subject: pcm: the maximal rate is 768000Hz, fix the remain code X-Git-Tag: v1.2.1~32 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=63ffd41d5f4615e6e8678d07212bf71853b3fd74;p=alsa-lib.git pcm: the maximal rate is 768000Hz, fix the remain code Signed-off-by: Jaroslav Kysela --- diff --git a/include/pcm_plugin.h b/include/pcm_plugin.h index 3061205a..2d014394 100644 --- a/include/pcm_plugin.h +++ b/include/pcm_plugin.h @@ -40,7 +40,7 @@ */ #define SND_PCM_PLUGIN_RATE_MIN 4000 /**< minimal rate for the rate plugin */ -#define SND_PCM_PLUGIN_RATE_MAX 192000 /**< maximal rate for the rate plugin */ +#define SND_PCM_PLUGIN_RATE_MAX 768000 /**< maximal rate for the rate plugin */ /* ROUTE_FLOAT should be set to 0 for machines without FP unit - like iPAQ */ #ifdef HAVE_SOFT_FLOAT diff --git a/src/pcm/pcm_rate_linear.c b/src/pcm/pcm_rate_linear.c index 7fe943d2..53ce902d 100644 --- a/src/pcm/pcm_rate_linear.c +++ b/src/pcm/pcm_rate_linear.c @@ -29,7 +29,7 @@ #include "plugin_ops.h" -/* LINEAR_DIV needs to be large enough to handle resampling from 192000 -> 8000 */ +/* LINEAR_DIV needs to be large enough to handle resampling from 768000 -> 8000 */ #define LINEAR_DIV_SHIFT 19 #define LINEAR_DIV (1<= 5000 && rate <= 192000); + assert(rate >= 5000 && rate <= 786000); assert(channels >= 1 && channels <= 512); rrate = rate; @@ -227,7 +227,7 @@ int snd_spcm_init_duplex(snd_pcm_t *playback_pcm, assert(playback_pcm); assert(capture_pcm); - assert(rate >= 5000 && rate <= 192000); + assert(rate >= 5000 && rate <= 768000); assert(channels >= 1 && channels <= 512); pcms[0] = playback_pcm;