[PATCH v1 1/2] kselftest: alsa: Factor out check that values meet constraints