summaryrefslogtreecommitdiff
path: root/sys/dev/audio.c
diff options
context:
space:
mode:
authorAlexandre Ratchov <ratchov@cvs.openbsd.org>2017-05-03 06:56:55 +0000
committerAlexandre Ratchov <ratchov@cvs.openbsd.org>2017-05-03 06:56:55 +0000
commitab178bfb5130263e8c0f495f6189b6be6a3da690 (patch)
treec27b4dde6981d4aa2ee5fe9720d106504dd20fe5 /sys/dev/audio.c
parent8f6e9108862594179393ad606375b6a5495427a1 (diff)
style improvement from Michael W. Bombardieri <mb at ii.net>
Diffstat (limited to 'sys/dev/audio.c')
-rw-r--r--sys/dev/audio.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/sys/dev/audio.c b/sys/dev/audio.c
index e1993d6b63f..8f9ab62dd48 100644
--- a/sys/dev/audio.c
+++ b/sys/dev/audio.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: audio.c,v 1.162 2017/03/28 05:20:22 ratchov Exp $ */
+/* $OpenBSD: audio.c,v 1.163 2017/05/03 06:56:54 ratchov Exp $ */
/*
* Copyright (c) 2015 Alexandre Ratchov <alex@caoua.org>
*
@@ -724,14 +724,13 @@ audio_setpar(struct audio_softc *sc)
if (sc->bits == 8) {
sc->conv_enc = slinear8_to_mulaw;
sc->conv_dec = mulaw_to_slinear8;
- break;
} else if (sc->bits == 24) {
sc->conv_enc = slinear24_to_mulaw24;
sc->conv_dec = mulaw24_to_slinear24;
- break;
+ } else {
+ sc->sw_enc = sc->hw_enc;
+ sc->conv_dec = sc->conv_enc = NULL;
}
- sc->sw_enc = sc->hw_enc;
- sc->conv_dec = sc->conv_enc = NULL;
break;
default:
printf("%s: setpar: enc = %d, bits = %d: emulation skipped\n",