The 'maxchans' count is one more than the number of channels, so

'chancount' never got up to equaling 'maxchans'.  As a result,
pcm_makelinks() was never called, and one always had to set the sysctl to
get the /dev/mixer and other symlinks generated in the DEVFS case.  Instead,
change the test in pcm_addchan() to call pcm_makelinks() after the first
channel is initialized, since the aliases are linked to channel 0.

Reviewed by:	cg
This commit is contained in:
jhb 2001-01-04 23:49:00 +00:00
parent 7fdb864af7
commit 56f540e9eb

View File

@ -183,7 +183,7 @@ pcm_addchan(device_t dev, int dir, kobj_class_t cls, void *devinfo)
UID_ROOT, GID_WHEEL, 0666, "audio%d.%d", unit, d->chancount);
/* XXX SND_DEV_NORESET? */
d->chancount++;
if (d->chancount == d->maxchans)
if (d->chancount == 1)
pcm_makelinks(NULL);
return 0;
}