Check validbits against precision in vchan_autoconfig. At present

validbits != precision is not supported.

This change will most likely break autoconfig on vs(4), for these machines
the parameters can be set to the paramaters reported at attach time via
sysctl.
This commit is contained in:
nat 2017-06-25 02:47:28 +00:00
parent ef1ca21e92
commit edb4ba2fe2
1 changed files with 4 additions and 2 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: audio.c,v 1.363 2017/06/25 02:11:40 nat Exp $ */
/* $NetBSD: audio.c,v 1.364 2017/06/25 02:47:28 nat Exp $ */
/*-
* Copyright (c) 2016 Nathanial Sloss <nathanialsloss@yahoo.com.au>
@ -148,7 +148,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.363 2017/06/25 02:11:40 nat Exp $");
__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.364 2017/06/25 02:47:28 nat Exp $");
#ifdef _KERNEL_OPT
#include "audio.h"
@ -6089,6 +6089,8 @@ vchan_autoconfig(struct audio_softc *sc)
if (vc->sc_npfilters > 0 &&
(vc->sc_mpr.s.param.precision !=
sc->sc_precision ||
vc->sc_mpr.s.param.validbits !=
sc->sc_precision ||
vc->sc_mpr.s.param.
sample_rate != sc->sc_frequency ||
vc->sc_mpr.s.param.