Skip to contentSkip to conversation

alsa-utils: aplay: Adjust sample rate limits to support newer hardware

PATCH Applied Jussi Laako 2 participants 2 messages Dec 7, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 alsa-utils: aplay: Adjust sample rate limits to support newer hardware

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.

---
 aplay/aplay.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
aplay/aplay.c +2 -2
index dbae17c..6b740c2 100644
@@ -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;
 			}
Signature · 1 line
2.7.4
Applied
#1 lore raw
Quoted 6 lines · Jussi Laako

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.

Applied, thanks.

Takashi