Fix the sound driver vchan support to work when hw.snd.maxautovchans
has been specified through /boot/loader.conf as opposed to setting it in /etc/sysctl.conf. Only PCMDIR_PLAY channel can be used as a parent of virtual channel. Do not initialize a new vchan for a given physical channel if other physical channel already has one created. PR: 31597 Approved by: obrien (mentor)
This commit is contained in:
parent
58a8e6d20e
commit
61698e0ca1
@ -504,7 +504,8 @@ pcm_addchan(device_t dev, int dir, kobj_class_t cls, void *devinfo)
|
||||
return err;
|
||||
}
|
||||
|
||||
if (snd_maxautovchans > 0 && (d->flags & SD_F_AUTOVCHAN)) {
|
||||
if (snd_maxautovchans > 0 && (d->flags & SD_F_AUTOVCHAN) &&
|
||||
ch->direction == PCMDIR_PLAY && d->vchancount == 0) {
|
||||
ch->flags |= CHN_F_BUSY;
|
||||
err = vchan_create(ch);
|
||||
if (err) {
|
||||
|
Loading…
Reference in New Issue
Block a user