aboutsummaryrefslogtreecommitdiff
path: root/sys/tools
diff options
context:
space:
mode:
authorHans Petter Selasky <hselasky@FreeBSD.org>2017-05-24 21:42:48 +0000
committerHans Petter Selasky <hselasky@FreeBSD.org>2017-05-24 21:42:48 +0000
commit0f86d40bf58c3eec01effe2ee55c0268fff74da0 (patch)
treec2f62a153612c250c0f1a4c2bc4e6a58f1c2e7d9 /sys/tools
parentb6be31c7cacc80ef56363f81dd834a24eb977c04 (diff)
downloadsrc-0f86d40bf58c3eec01effe2ee55c0268fff74da0.tar.gz
src-0f86d40bf58c3eec01effe2ee55c0268fff74da0.zip
Increase the allowed maximum number of audio channels from 31 to 127
in the PCM feeder mixer. Without this change a value of 32 channels is treated like zero, due to using a mask of 0x1f, causing a kernel assert when trying to playback bitperfect 32-channel audio. Also update the AWK script which is generating the division tables to handle more than 18 channels. This commit complements r282650. MFC after: 3 days
Notes
Notes: svn path=/head/; revision=318820
Diffstat (limited to 'sys/tools')
-rw-r--r--sys/tools/sound/snd_fxdiv_gen.awk6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/tools/sound/snd_fxdiv_gen.awk b/sys/tools/sound/snd_fxdiv_gen.awk
index 5828062ee662..2e1d3a545380 100644
--- a/sys/tools/sound/snd_fxdiv_gen.awk
+++ b/sys/tools/sound/snd_fxdiv_gen.awk
@@ -74,7 +74,7 @@ BEGIN {
FXSHIFT = 16;
FXONE = shl(1, FXSHIFT);
- SND_CHN_MAX = 18;
+ SND_CHN_MAX = 127;
PCM_8_BPS = 1;
PCM_16_BPS = 2;
@@ -103,9 +103,9 @@ BEGIN {
printf("/*\n");
printf(" * Fast unsigned 32bit integer division and rounding, accurate for\n");
printf(" * x = 1 - %d. This table should be enough to handle possible\n", FXONE);
- printf(" * division for 1 - 72 (more can be generated though..).\n");
+ printf(" * division for 1 - 508 (more can be generated though..).\n");
printf(" *\n");
- printf(" * 72 = SND_CHN_MAX * PCM_32_BPS, which is why....\n");
+ printf(" * 508 = SND_CHN_MAX * PCM_32_BPS, which is why....\n");
printf(" */\n\n");
printf("static const uint32_t snd_fxdiv_table[][2] = {\n");