The -t option gives the user the ability to create a control device for
a given virtual_oss(8) instance, so that the instance's configuration
can be manipulated during runtime with virtual_oss_cmd(8). As is
expected, the control device's name is not known, since it is specified
by the user.
This patch hardcodes the control device's name to "vdsp.ctl" whenintroduces a virtual_oss_default_control_device rc variable,
virtual_oss(8) replaces sound(4)'s /dev/dsp with its own, i.e.,which defaults to "vdsp.ctl". when "-dThe goal of this is that third-party
dsp" is specified. The goal of this hardcoding is that third-partyprograms and scripts can access the control device of the default
programs and scripts can access the control device for thevirtual_oss(8) configuration without guessing. This is especially useful
virtual_oss(8)-created /dev/dspfor sbin/devd/snd.conf which deals without guessing. This is especially hot-swapping sound devices using
useful for sbin/devd/snd.conf which deals with hot-swapping sound
devices using virtual_oss(8).
There are a few side effects with this patch:
1. Configurations that specify "-d dsp" cannot use the -t option at all,
because the control device is hardcoded to "vdsp.ctl" and cannot be
overwritten.
2. "-t vdsp.ctl" can be manually specified only when the virtual_oss(8)
sound device is not /dev/dsp. This, as is logical, cannot be done at
the same time another virtual_oss(8) instance which specifies "-d
dsp" is running, because either the first instance will reserve the
name, or the instance which specified "-d dsp" will not the other
instance use that device namevirtual_oss(8).
Sponsored by: The FreeBSD Foundation
MFC after: 1 week