When using alsactl to save or restore the card settings, it currently
skips over controls that don't have the appropriate read/write
permissions. It should also skip over inactive controls, otherwise it
will get an error when it tries to access that control, and will fail to
save the card state (or fully restore it.)
From: Dave Dillow <dave@thedillows.org>
return err;
}
- if (!snd_ctl_elem_info_is_readable(info))
+ if (snd_ctl_elem_info_is_inactive(info) ||
+ !snd_ctl_elem_info_is_readable(info))
return 0;
snd_ctl_elem_value_set_id(ctl, id);
err = snd_ctl_elem_read(handle, ctl);
}
}
- if (!snd_ctl_elem_info_is_writable(info))
+ if (snd_ctl_elem_info_is_inactive(info) ||
+ !snd_ctl_elem_info_is_writable(info))
return 0;
snd_ctl_elem_value_set_numid(ctl, numid1);