We have hw.snd.maxautovchans already, so use this as the upper VCHAN
limit instead of having a hardcoded, and by nowadays' standards low, cap
(SND_MAXVCHANS) compiled into the module.
Additionally, bump the default hw.snd.maxautovchans value to 256. The
current value of 16 is too low and can be easily reached (e.g with a
browser having more than 16 audio tabs open). The user can theoretically
increase the limit, but it is easier to just ship with a hard-to-reach
value, than let the user figure this out.
A side-effect of this change is that now a user with root access can
potentially set hw.snd.maxautovchans to a very large value, and freeze
the machine by spawning too many channels. However, this is not
something that sound(4) should prevent, as we are currently also
restricting the ability to spawn an arbitrary amount of channels, even
for machines that can handle it.
Sponsored by: The FreeBSD Foundation
MFC after: 2 days