Remove server/ group, rename device.select to server.device

This commit is contained in:
Alexandre Ratchov 2020-06-27 10:30:20 +02:00
parent 24d12842ac
commit f96882d62d
3 changed files with 7 additions and 7 deletions

View File

@ -1238,9 +1238,9 @@ dev_open(struct dev *d)
for (a = d->alt_list; a != NULL; a = a->next) {
snprintf(name, sizeof(name), "%d", a->idx);
dev_addctl(d, "server", CTL_SEL,
dev_addctl(d, "", CTL_SEL,
CTLADDR_ALT_SEL + a->idx,
"device", -1, "select",
"server", -1, "device",
name, -1, 1, a->idx == d->alt_num);
}

View File

@ -65,12 +65,12 @@ dev_sioctl_ondesc(void *arg, struct sioctl_desc *desc, int val)
dev_rmctl(d, addr);
/*
* prefix group names we use (currently "app" and "server") with "hw/"
* to ensure that all controls have unique names when multiple
* prefix with "hw/" group names of controls we expose, to
* ensure that all controls have unique names when multiple
* sndiod's are chained
*/
if (strcmp(desc->group, "app") == 0 ||
strcmp(desc->group, "server") == 0) {
if (strcmp(desc->group, "app") == 0 || (desc->group[0] == 0 &&
strcmp(desc->node0.name, "server") == 0)) {
group = group_buf;
if (snprintf(group_buf, CTL_NAMEMAX, GROUP_PREFIX "/%s",
desc->group) >= CTL_NAMEMAX)

View File

@ -197,7 +197,7 @@ PCI device allows
to use the USB one preferably when it's connected
and to fall back to the PCI one when it's disconnected.
Alternate devices may be switched with the
.Va server/device.select
.Va server.device
control of the
.Xr sndioctl 1
utility.