From c64f25a5f8132cdc8c8cd6c2682a52e6cebf810e Mon Sep 17 00:00:00 2001 From: Alexandre Ratchov Date: Mon, 13 Jan 2020 07:15:36 +0100 Subject: [PATCH] Remove group for hardware controls. --- libsndio/sioctl_sun.c | 7 +++---- sndiod/dev.c | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/libsndio/sioctl_sun.c b/libsndio/sioctl_sun.c index 932374b..383080f 100644 --- a/libsndio/sioctl_sun.c +++ b/libsndio/sioctl_sun.c @@ -217,14 +217,13 @@ setvol(struct sioctl_sun_hdl *hdl, struct wskbd_vol *vol, int addr, int val) } static int -scanvol(struct sioctl_sun_hdl *hdl, struct wskbd_vol *vol, char *group) +scanvol(struct sioctl_sun_hdl *hdl, struct wskbd_vol *vol) { struct sioctl_desc desc; struct mixer_ctrl ctrl; int i, val; memset(&desc, 0, sizeof(struct sioctl_desc)); - strlcpy(desc.group.str, group, sizeof(desc.group.str)); desc.group.unit = -1; if (vol->level_idx >= 0) { ctrl.dev = vol->level_idx; @@ -365,8 +364,8 @@ sioctl_sun_ondesc(struct sioctl_hdl *addr) { struct sioctl_sun_hdl *hdl = (struct sioctl_sun_hdl *)addr; - if (!scanvol(hdl, &hdl->spkr, "outputs") || - !scanvol(hdl, &hdl->mic, "inputs")) { + if (!scanvol(hdl, &hdl->spkr) || + !scanvol(hdl, &hdl->mic)) { hdl->sioctl.eof = 1; return 0; } diff --git a/sndiod/dev.c b/sndiod/dev.c index 47d2f1a..7ff7ea7 100644 --- a/sndiod/dev.c +++ b/sndiod/dev.c @@ -1155,7 +1155,7 @@ dev_open(struct dev *d) } for (i = 0; i < DEV_NSLOT; i++) { - dev_addctl(d, "sndiod", gunit, CTL_NUM, + dev_addctl(d, "app", -1, CTL_NUM, CTLADDR_SLOT_LEVEL(i), d->slot[i].name, d->slot[i].unit, "level", NULL, -1, d->slot[i].vol);