if a device has no play or no record channels, set its simplex flag.

This commit is contained in:
cg 2000-06-01 01:32:30 +00:00
parent b9592ca040
commit ba367be739

View File

@ -202,6 +202,9 @@ pcm_register(device_t dev, void *devinfo, int numplay, int numrec)
bzero(d->rec, numrec * sizeof(pcm_channel));
}
if (numplay == 0 || numrec == 0)
d->flags |= SD_F_SIMPLEX;
fkchan_setup(&d->fakechan);
chn_init(&d->fakechan, NULL, 0);
d->magic = MAGIC(unit); /* debugging... */