summaryrefslogtreecommitdiff
path: root/sys/dev/pci/eap.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/pci/eap.c')
-rw-r--r--sys/dev/pci/eap.c24
1 files changed, 15 insertions, 9 deletions
diff --git a/sys/dev/pci/eap.c b/sys/dev/pci/eap.c
index 799dd2d2675..148642476f0 100644
--- a/sys/dev/pci/eap.c
+++ b/sys/dev/pci/eap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: eap.c,v 1.39 2010/06/20 10:22:25 ratchov Exp $ */
+/* $OpenBSD: eap.c,v 1.40 2010/07/15 03:43:11 jakemsr Exp $ */
/* $NetBSD: eap.c,v 1.46 2001/09/03 15:07:37 reinoud Exp $ */
/*
@@ -765,52 +765,56 @@ eap_query_encoding(void *addr, struct audio_encoding *fp)
fp->encoding = AUDIO_ENCODING_ULINEAR;
fp->precision = 8;
fp->flags = 0;
- return (0);
+ break;
case 1:
strlcpy(fp->name, AudioEmulaw, sizeof fp->name);
fp->encoding = AUDIO_ENCODING_ULAW;
fp->precision = 8;
fp->flags = AUDIO_ENCODINGFLAG_EMULATED;
- return (0);
+ break;
case 2:
strlcpy(fp->name, AudioEalaw, sizeof fp->name);
fp->encoding = AUDIO_ENCODING_ALAW;
fp->precision = 8;
fp->flags = AUDIO_ENCODINGFLAG_EMULATED;
- return (0);
+ break;
case 3:
strlcpy(fp->name, AudioEslinear, sizeof fp->name);
fp->encoding = AUDIO_ENCODING_SLINEAR;
fp->precision = 8;
fp->flags = AUDIO_ENCODINGFLAG_EMULATED;
- return (0);
+ break;
case 4:
strlcpy(fp->name, AudioEslinear_le, sizeof fp->name);
fp->encoding = AUDIO_ENCODING_SLINEAR_LE;
fp->precision = 16;
fp->flags = 0;
- return (0);
+ break;
case 5:
strlcpy(fp->name, AudioEulinear_le, sizeof fp->name);
fp->encoding = AUDIO_ENCODING_ULINEAR_LE;
fp->precision = 16;
fp->flags = AUDIO_ENCODINGFLAG_EMULATED;
- return (0);
+ break;
case 6:
strlcpy(fp->name, AudioEslinear_be, sizeof fp->name);
fp->encoding = AUDIO_ENCODING_SLINEAR_BE;
fp->precision = 16;
fp->flags = AUDIO_ENCODINGFLAG_EMULATED;
- return (0);
+ break;
case 7:
strlcpy(fp->name, AudioEulinear_be, sizeof fp->name);
fp->encoding = AUDIO_ENCODING_ULINEAR_BE;
fp->precision = 16;
fp->flags = AUDIO_ENCODINGFLAG_EMULATED;
- return (0);
+ break;
default:
return (EINVAL);
}
+ fp->bps = AUDIO_BPS(fp->precision);
+ fp->msb = 1;
+
+ return (0);
}
void
@@ -904,6 +908,8 @@ eap_set_params(void *addr, int setmode, int usemode,
default:
return (EINVAL);
}
+ p->bps = AUDIO_BPS(p->precision);
+ p->msb = 1;
}
if (!sc->sc_1371) {