aplay: increase channel limit to 256 aplay is limited to 32 channels, which makes it impossible to use it for testing devices with more channels. here we increase the limit to 256, which should be sufficient for a virtual device made of 4 64-channel soundcards. Signed-off-by: Tim Blechmann <[email protected]> Signed-off-by: Jaroslav Kysela <[email protected]>
diff --git a/aplay/aplay.c b/aplay/aplay.c index 50e01ef..07e6bc0 100644 --- a/aplay/aplay.c +++ b/aplay/aplay.c
@@ -526,7 +526,7 @@ break; case 'c': rhwparams.channels = strtol(optarg, NULL, 0); - if (rhwparams.channels < 1 || rhwparams.channels > 32) { + if (rhwparams.channels < 1 || rhwparams.channels > 256) { error(_("value %i for channels is invalid"), rhwparams.channels); return 1; } @@ -1015,7 +1015,7 @@ if (hwparams.rate < 2000 || hwparams.rate > 256000) return -1; hwparams.channels = BE_INT(ap->channels); - if (hwparams.channels < 1 || hwparams.channels > 128) + if (hwparams.channels < 1 || hwparams.channels > 256) return -1; if ((size_t)safe_read(fd, buffer + sizeof(AuHeader), BE_INT(ap->hdr_size) - sizeof(AuHeader)) != BE_INT(ap->hdr_size) - sizeof(AuHeader)) { error(_("read error"));