Merge branch 'mixer' of ssh://moule/~alex/git/sndio into mixer

This commit is contained in:
Alexandre Ratchov 2020-01-11 13:00:18 +01:00
commit db6ff820c6
1 changed files with 4 additions and 4 deletions

View File

@ -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;
}