Remove group for hardware controls.

This commit is contained in:
Alexandre Ratchov 2020-01-13 07:15:36 +01:00
parent 166293b14a
commit c64f25a5f8
2 changed files with 4 additions and 5 deletions

View File

@ -217,14 +217,13 @@ setvol(struct sioctl_sun_hdl *hdl, struct wskbd_vol *vol, int addr, int val)
} }
static int 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 sioctl_desc desc;
struct mixer_ctrl ctrl; struct mixer_ctrl ctrl;
int i, val; int i, val;
memset(&desc, 0, sizeof(struct sioctl_desc)); memset(&desc, 0, sizeof(struct sioctl_desc));
strlcpy(desc.group.str, group, sizeof(desc.group.str));
desc.group.unit = -1; desc.group.unit = -1;
if (vol->level_idx >= 0) { if (vol->level_idx >= 0) {
ctrl.dev = vol->level_idx; 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; struct sioctl_sun_hdl *hdl = (struct sioctl_sun_hdl *)addr;
if (!scanvol(hdl, &hdl->spkr, "outputs") || if (!scanvol(hdl, &hdl->spkr) ||
!scanvol(hdl, &hdl->mic, "inputs")) { !scanvol(hdl, &hdl->mic)) {
hdl->sioctl.eof = 1; hdl->sioctl.eof = 1;
return 0; return 0;
} }

View File

@ -1155,7 +1155,7 @@ dev_open(struct dev *d)
} }
for (i = 0; i < DEV_NSLOT; i++) { 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), CTLADDR_SLOT_LEVEL(i),
d->slot[i].name, d->slot[i].unit, "level", d->slot[i].name, d->slot[i].unit, "level",
NULL, -1, d->slot[i].vol); NULL, -1, d->slot[i].vol);