]> git.alsa-project.org Git - alsa-utils.git/commitdiff
aplay: Adjust sample rate limits to support newer hardware
authorJussi Laako <jussi@sonarnerd.net>
Thu, 7 Dec 2017 11:57:14 +0000 (13:57 +0200)
committerTakashi Iwai <tiwai@suse.de>
Thu, 7 Dec 2017 12:44:20 +0000 (13:44 +0100)
There are number of devices that support up to 384 kHz sampling rate and
some devices up to 768 kHz sampling rate. This patch increases sanity
check limit to 768k in order to support testing of such hardware.

Signed-off-by: Jussi Laako <jussi@sonarnerd.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
aplay/aplay.c

index dbae17caf3a43f7fc6910fd70fbcacf0dd5d7c0b..6b740c281f8e439cf435986cc5d7b218d0175544 100644 (file)
@@ -635,10 +635,10 @@ int main(int argc, char *argv[])
                                error(_("invalid rate argument '%s'"), optarg);
                                return 1;
                        }
-                       if (tmp < 300)
+                       if (tmp < 1000)
                                tmp *= 1000;
                        rhwparams.rate = tmp;
-                       if (tmp < 2000 || tmp > 192000) {
+                       if (tmp < 2000 || tmp > 768000) {
                                error(_("bad speed value %i"), tmp);
                                return 1;
                        }