diff --git a/sys/dev/sound/pcm/channel.c b/sys/dev/sound/pcm/channel.c --- a/sys/dev/sound/pcm/channel.c +++ b/sys/dev/sound/pcm/channel.c @@ -1183,7 +1183,7 @@ direction = PCMDIR_PLAY; pnum = &d->pvchancount; type = SND_DEV_DSPHW_VPLAY; - max = SND_MAXVCHANS; + max = snd_maxautovchans; break; case PCMDIR_REC: dirs = "record"; @@ -1197,7 +1197,7 @@ direction = PCMDIR_REC; pnum = &d->rvchancount; type = SND_DEV_DSPHW_VREC; - max = SND_MAXVCHANS; + max = snd_maxautovchans; break; default: device_printf(d->dev, diff --git a/sys/dev/sound/pcm/feeder.c b/sys/dev/sound/pcm/feeder.c --- a/sys/dev/sound/pcm/feeder.c +++ b/sys/dev/sound/pcm/feeder.c @@ -85,8 +85,7 @@ if (snd_unit < 0) snd_unit = -1; - if (snd_maxautovchans < 0 || - snd_maxautovchans > SND_MAXVCHANS) + if (snd_maxautovchans < 0) snd_maxautovchans = 0; if (chn_latency < CHN_LATENCY_MIN || diff --git a/sys/dev/sound/pcm/sound.h b/sys/dev/sound/pcm/sound.h --- a/sys/dev/sound/pcm/sound.h +++ b/sys/dev/sound/pcm/sound.h @@ -103,7 +103,6 @@ * By design, limit possible channels for each direction. */ #define SND_MAXHWCHAN 256 -#define SND_MAXVCHANS SND_MAXHWCHAN #define SD_F_SIMPLEX 0x00000001 #define SD_F_AUTOVCHAN 0x00000002 diff --git a/sys/dev/sound/pcm/vchan.c b/sys/dev/sound/pcm/vchan.c --- a/sys/dev/sound/pcm/vchan.c +++ b/sys/dev/sound/pcm/vchan.c @@ -61,7 +61,7 @@ int trigger; }; -int snd_maxautovchans = 16; +int snd_maxautovchans = 256; static void * vchan_init(kobj_t obj, void *devinfo, struct snd_dbuf *b, @@ -341,8 +341,8 @@ if (err == 0 && req->newptr != NULL && vchancount != cnt) { if (cnt < 0) cnt = 0; - if (cnt > SND_MAXVCHANS) - cnt = SND_MAXVCHANS; + if (cnt > snd_maxautovchans) + cnt = snd_maxautovchans; err = vchan_setnew(d, direction, cnt); } @@ -934,7 +934,7 @@ if (!(d->flags & SD_F_AUTOVCHAN)) return (EINVAL); - if (newcnt < 0 || newcnt > SND_MAXVCHANS) + if (newcnt < 0 || newcnt > snd_maxautovchans) return (E2BIG); if (direction == PCMDIR_PLAY) @@ -1065,8 +1065,6 @@ if (error == 0 && req->newptr != NULL) { if (v < 0) v = 0; - if (v > SND_MAXVCHANS) - v = SND_MAXVCHANS; snd_maxautovchans = v; for (i = 0; pcm_devclass != NULL && i < devclass_get_maxunit(pcm_devclass); i++) {