Fixes "audio0: different play and record parameters ... " errors, and
probably other unreported errors.
help and ok landry@
-/* $OpenBSD: i2s.c,v 1.32 2016/06/26 06:50:26 mglocker Exp $ */
+/* $OpenBSD: i2s.c,v 1.33 2016/08/30 11:20:09 ratchov Exp $ */
/* $NetBSD: i2s.c,v 1.1 2003/12/27 02:19:34 grant Exp $ */
/*-
p->precision = 16;
if (p->channels > 2)
p->channels = 2;
-
- switch (p->encoding) {
- case AUDIO_ENCODING_SLINEAR_BE:
- break;
- default:
- return (EINVAL);
- }
+ p->bps = AUDIO_BPS(p->precision);
+ p->msb = 1;
+ p->encoding = AUDIO_ENCODING_SLINEAR_BE;
}
/* Set the speed */
return EINVAL;
p->sample_rate = sc->sc_rate;
-
- p->bps = AUDIO_BPS(p->precision);
- p->msb = 1;
-
return 0;
}