From f96882d62d4b645b9ea8ca584196744237369172 Mon Sep 17 00:00:00 2001 From: Alexandre Ratchov Date: Sat, 27 Jun 2020 10:30:20 +0200 Subject: [PATCH] Remove server/ group, rename device.select to server.device --- sndiod/dev.c | 4 ++-- sndiod/dev_sioctl.c | 8 ++++---- sndiod/sndiod.8 | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/sndiod/dev.c b/sndiod/dev.c index 6c0fb95..85b8689 100644 --- a/sndiod/dev.c +++ b/sndiod/dev.c @@ -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); } diff --git a/sndiod/dev_sioctl.c b/sndiod/dev_sioctl.c index e2859e4..94123c7 100644 --- a/sndiod/dev_sioctl.c +++ b/sndiod/dev_sioctl.c @@ -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) diff --git a/sndiod/sndiod.8 b/sndiod/sndiod.8 index 9dedde2..6bbc452 100644 --- a/sndiod/sndiod.8 +++ b/sndiod/sndiod.8 @@ -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.