mirror of https://github.com/ericonr/sndio.git
Move hw control in "inputs" and "outputs" groups
This commit is contained in:
parent
ddf18ab3e1
commit
5a0fc8feb7
|
@ -217,14 +217,14 @@ 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)
|
||||
scanvol(struct sioctl_sun_hdl *hdl, struct wskbd_vol *vol, char *group)
|
||||
{
|
||||
struct sioctl_desc desc;
|
||||
struct mixer_ctrl ctrl;
|
||||
int i, val;
|
||||
|
||||
memset(&desc, 0, sizeof(struct sioctl_desc));
|
||||
strlcpy(desc.group.str, "hw", sizeof(desc.group.str));
|
||||
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 +365,8 @@ sioctl_sun_ondesc(struct sioctl_hdl *addr)
|
|||
{
|
||||
struct sioctl_sun_hdl *hdl = (struct sioctl_sun_hdl *)addr;
|
||||
|
||||
if (!scanvol(hdl, &hdl->spkr) ||
|
||||
!scanvol(hdl, &hdl->mic)) {
|
||||
if (!scanvol(hdl, &hdl->spkr, "outputs") ||
|
||||
!scanvol(hdl, &hdl->mic, "inputs")) {
|
||||
hdl->sioctl.eof = 1;
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue