diff options
Diffstat (limited to 'sys/dev/pci')
-rw-r--r-- | sys/dev/pci/auacer.c | 24 | ||||
-rw-r--r-- | sys/dev/pci/auglx.c | 26 | ||||
-rw-r--r-- | sys/dev/pci/auich.c | 27 | ||||
-rw-r--r-- | sys/dev/pci/auixp.c | 26 | ||||
-rw-r--r-- | sys/dev/pci/autri.c | 6 | ||||
-rw-r--r-- | sys/dev/pci/auvia.c | 28 | ||||
-rw-r--r-- | sys/dev/pci/azalia.c | 8 | ||||
-rw-r--r-- | sys/dev/pci/cmpci.c | 9 | ||||
-rw-r--r-- | sys/dev/pci/cs4280.c | 7 | ||||
-rw-r--r-- | sys/dev/pci/cs4281.c | 7 | ||||
-rw-r--r-- | sys/dev/pci/eap.c | 24 | ||||
-rw-r--r-- | sys/dev/pci/emuxki.c | 7 | ||||
-rw-r--r-- | sys/dev/pci/envy.c | 8 | ||||
-rw-r--r-- | sys/dev/pci/esa.c | 31 | ||||
-rw-r--r-- | sys/dev/pci/eso.c | 8 | ||||
-rw-r--r-- | sys/dev/pci/fms.c | 28 | ||||
-rw-r--r-- | sys/dev/pci/maestro.c | 21 | ||||
-rw-r--r-- | sys/dev/pci/neo.c | 25 | ||||
-rw-r--r-- | sys/dev/pci/sv.c | 25 | ||||
-rw-r--r-- | sys/dev/pci/yds.c | 24 |
20 files changed, 247 insertions, 122 deletions
diff --git a/sys/dev/pci/auacer.c b/sys/dev/pci/auacer.c index c81adfe8b21..f36d9a3957d 100644 --- a/sys/dev/pci/auacer.c +++ b/sys/dev/pci/auacer.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auacer.c,v 1.6 2010/04/08 00:23:53 tedu Exp $ */ +/* $OpenBSD: auacer.c,v 1.7 2010/07/15 03:43:11 jakemsr Exp $ */ /* $NetBSD: auacer.c,v 1.3 2004/11/10 04:20:26 kent Exp $ */ /*- @@ -461,52 +461,56 @@ auacer_query_encoding(void *v, struct audio_encoding *aep) aep->encoding = AUDIO_ENCODING_ULINEAR; aep->precision = 8; aep->flags = AUDIO_ENCODINGFLAG_EMULATED; - return (0); + break; case 1: strlcpy(aep->name, AudioEmulaw, sizeof aep->name); aep->encoding = AUDIO_ENCODING_ULAW; aep->precision = 8; aep->flags = AUDIO_ENCODINGFLAG_EMULATED; - return (0); + break; case 2: strlcpy(aep->name, AudioEalaw, sizeof aep->name); aep->encoding = AUDIO_ENCODING_ALAW; aep->precision = 8; aep->flags = AUDIO_ENCODINGFLAG_EMULATED; - return (0); + break; case 3: strlcpy(aep->name, AudioEslinear, sizeof aep->name); aep->encoding = AUDIO_ENCODING_SLINEAR; aep->precision = 8; aep->flags = AUDIO_ENCODINGFLAG_EMULATED; - return (0); + break; case 4: strlcpy(aep->name, AudioEslinear_le, sizeof aep->name); aep->encoding = AUDIO_ENCODING_SLINEAR_LE; aep->precision = 16; aep->flags = 0; - return (0); + break; case 5: strlcpy(aep->name, AudioEulinear_le, sizeof aep->name); aep->encoding = AUDIO_ENCODING_ULINEAR_LE; aep->precision = 16; aep->flags = AUDIO_ENCODINGFLAG_EMULATED; - return (0); + break; case 6: strlcpy(aep->name, AudioEslinear_be, sizeof aep->name); aep->encoding = AUDIO_ENCODING_SLINEAR_BE; aep->precision = 16; aep->flags = AUDIO_ENCODINGFLAG_EMULATED; - return (0); + break; case 7: strlcpy(aep->name, AudioEulinear_be, sizeof aep->name); aep->encoding = AUDIO_ENCODING_ULINEAR_BE; aep->precision = 16; aep->flags = AUDIO_ENCODINGFLAG_EMULATED; - return (0); + break; default: return (EINVAL); } + aep->bps = AUDIO_BPS(aep->precision); + aep->msb = 1; + + return (0); } int @@ -646,6 +650,8 @@ auacer_set_params(void *v, int setmode, int usemode, struct audio_params *play, default: return (EINVAL); } + p->bps = AUDIO_BPS(p->precision); + p->msb = 1; if (AC97_IS_FIXED_RATE(sc->codec_if)) p->sample_rate = AC97_SINGLE_RATE; diff --git a/sys/dev/pci/auglx.c b/sys/dev/pci/auglx.c index b5159624a08..6e22cb94258 100644 --- a/sys/dev/pci/auglx.c +++ b/sys/dev/pci/auglx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auglx.c,v 1.3 2010/04/20 22:05:43 tedu Exp $ */ +/* $OpenBSD: auglx.c,v 1.4 2010/07/15 03:43:11 jakemsr Exp $ */ /* * Copyright (c) 2008 Marc Balmer <mbalmer@openbsd.org> @@ -497,52 +497,56 @@ auglx_query_encoding(void *v, struct audio_encoding *aep) aep->encoding = AUDIO_ENCODING_ULINEAR; aep->precision = 8; aep->flags = AUDIO_ENCODINGFLAG_EMULATED; - return 0; + break; case 1: strlcpy(aep->name, AudioEmulaw, sizeof aep->name); aep->encoding = AUDIO_ENCODING_ULAW; aep->precision = 8; aep->flags = AUDIO_ENCODINGFLAG_EMULATED; - return 0; + break; case 2: strlcpy(aep->name, AudioEalaw, sizeof aep->name); aep->encoding = AUDIO_ENCODING_ALAW; aep->precision = 8; aep->flags = AUDIO_ENCODINGFLAG_EMULATED; - return 0; + break; case 3: strlcpy(aep->name, AudioEslinear, sizeof aep->name); aep->encoding = AUDIO_ENCODING_SLINEAR; aep->precision = 8; aep->flags = AUDIO_ENCODINGFLAG_EMULATED; - return 0; + break; case 4: strlcpy(aep->name, AudioEslinear_le, sizeof aep->name); aep->encoding = AUDIO_ENCODING_SLINEAR_LE; aep->precision = 16; aep->flags = 0; - return 0; + break; case 5: strlcpy(aep->name, AudioEulinear_le, sizeof aep->name); aep->encoding = AUDIO_ENCODING_ULINEAR_LE; aep->precision = 16; aep->flags = AUDIO_ENCODINGFLAG_EMULATED; - return 0; + break; case 6: strlcpy(aep->name, AudioEslinear_be, sizeof aep->name); aep->encoding = AUDIO_ENCODING_SLINEAR_BE; aep->precision = 16; aep->flags = AUDIO_ENCODINGFLAG_EMULATED; - return 0; + break; case 7: strlcpy(aep->name, AudioEulinear_be, sizeof aep->name); aep->encoding = AUDIO_ENCODING_ULINEAR_BE; aep->precision = 16; aep->flags = AUDIO_ENCODINGFLAG_EMULATED; - return 0; + break; default: return EINVAL; } + aep->bps = AUDIO_BPS(aep->precision); + aep->msb = 1; + + return 0; } @@ -725,6 +729,8 @@ auglx_set_params(void *v, int setmode, int usemode, struct audio_params *play, default: return EINVAL; } + play->bps = AUDIO_BPS(play->precision); + play->msb = 1; orate = adj_rate = play->sample_rate; @@ -900,6 +906,8 @@ auglx_set_params(void *v, int setmode, int usemode, struct audio_params *play, default: return EINVAL; } + rec->bps = AUDIO_BPS(rec->precision); + rec->msb = 1; orate = rec->sample_rate; error = ac97_set_rate(sc->codec_if, AC97_REG_PCM_LR_ADC_RATE, diff --git a/sys/dev/pci/auich.c b/sys/dev/pci/auich.c index c2b0db58dea..abbc9533477 100644 --- a/sys/dev/pci/auich.c +++ b/sys/dev/pci/auich.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auich.c,v 1.82 2010/06/07 23:35:24 ratchov Exp $ */ +/* $OpenBSD: auich.c,v 1.83 2010/07/15 03:43:11 jakemsr Exp $ */ /* * Copyright (c) 2000,2001 Michael Shalayeff @@ -685,6 +685,8 @@ auich_query_encoding(v, aep) aep->encoding = AUDIO_ENCODING_SLINEAR_LE; aep->precision = 16; aep->flags = 0; + aep->bps = 2; + aep->msb = 1; return (0); default: return (EINVAL); @@ -696,52 +698,55 @@ auich_query_encoding(v, aep) aep->encoding = AUDIO_ENCODING_ULINEAR; aep->precision = 8; aep->flags = 0; - return (0); + break; case 1: strlcpy(aep->name, AudioEmulaw, sizeof aep->name); aep->encoding = AUDIO_ENCODING_ULAW; aep->precision = 8; aep->flags = AUDIO_ENCODINGFLAG_EMULATED; - return (0); + break; case 2: strlcpy(aep->name, AudioEalaw, sizeof aep->name); aep->encoding = AUDIO_ENCODING_ALAW; aep->precision = 8; aep->flags = AUDIO_ENCODINGFLAG_EMULATED; - return (0); + break; case 3: strlcpy(aep->name, AudioEslinear, sizeof aep->name); aep->encoding = AUDIO_ENCODING_SLINEAR; aep->precision = 8; aep->flags = AUDIO_ENCODINGFLAG_EMULATED; - return (0); + break; case 4: strlcpy(aep->name, AudioEslinear_le, sizeof aep->name); aep->encoding = AUDIO_ENCODING_SLINEAR_LE; aep->precision = 16; aep->flags = 0; - return (0); + break; case 5: strlcpy(aep->name, AudioEulinear_le, sizeof aep->name); aep->encoding = AUDIO_ENCODING_ULINEAR_LE; aep->precision = 16; aep->flags = AUDIO_ENCODINGFLAG_EMULATED; - return (0); + break; case 6: strlcpy(aep->name, AudioEslinear_be, sizeof aep->name); aep->encoding = AUDIO_ENCODING_SLINEAR_BE; aep->precision = 16; aep->flags = AUDIO_ENCODINGFLAG_EMULATED; - return (0); + break; case 7: strlcpy(aep->name, AudioEulinear_be, sizeof aep->name); aep->encoding = AUDIO_ENCODING_ULINEAR_BE; aep->precision = 16; aep->flags = AUDIO_ENCODINGFLAG_EMULATED; - return (0); + break; default: return (EINVAL); } + aep->bps = AUDIO_BPS(aep->precision); + aep->msb = 1; + return (0); } } @@ -960,6 +965,8 @@ auich_set_params(v, setmode, usemode, play, rec) default: return (EINVAL); } + play->bps = AUDIO_BPS(play->precision); + play->msb = 1; orate = adj_rate = play->sample_rate; if (sc->sc_ac97rate != 0) @@ -1145,6 +1152,8 @@ auich_set_params(v, setmode, usemode, play, rec) default: return (EINVAL); } + rec->bps = AUDIO_BPS(rec->precision); + rec->msb = 1; orate = rec->sample_rate; if (sc->sc_ac97rate != 0) diff --git a/sys/dev/pci/auixp.c b/sys/dev/pci/auixp.c index 2564d52164b..9b7782986d8 100644 --- a/sys/dev/pci/auixp.c +++ b/sys/dev/pci/auixp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auixp.c,v 1.24 2009/10/12 19:43:52 jakemsr Exp $ */ +/* $OpenBSD: auixp.c,v 1.25 2010/07/15 03:43:11 jakemsr Exp $ */ /* $NetBSD: auixp.c,v 1.9 2005/06/27 21:13:09 thorpej Exp $ */ /* @@ -233,52 +233,56 @@ auixp_query_encoding(void *hdl, struct audio_encoding *aep) aep->encoding = AUDIO_ENCODING_ULINEAR; aep->precision = 8; aep->flags = AUDIO_ENCODINGFLAG_EMULATED; - return (0); + break; case 1: strlcpy(aep->name, AudioEmulaw, sizeof aep->name); aep->encoding = AUDIO_ENCODING_ULAW; aep->precision = 8; aep->flags = AUDIO_ENCODINGFLAG_EMULATED; - return (0); + break; case 2: strlcpy(aep->name, AudioEalaw, sizeof aep->name); aep->encoding = AUDIO_ENCODING_ALAW; aep->precision = 8; aep->flags = AUDIO_ENCODINGFLAG_EMULATED; - return (0); + break; case 3: strlcpy(aep->name, AudioEslinear, sizeof aep->name); aep->encoding = AUDIO_ENCODING_SLINEAR; aep->precision = 8; aep->flags = AUDIO_ENCODINGFLAG_EMULATED; - return (0); + break; case 4: strlcpy(aep->name, AudioEslinear_le, sizeof aep->name); aep->encoding = AUDIO_ENCODING_SLINEAR_LE; aep->precision = 16; aep->flags = 0; - return (0); + break; case 5: strlcpy(aep->name, AudioEulinear_le, sizeof aep->name); aep->encoding = AUDIO_ENCODING_ULINEAR_LE; aep->precision = 16; aep->flags = AUDIO_ENCODINGFLAG_EMULATED; - return (0); + break; case 6: strlcpy(aep->name, AudioEslinear_be, sizeof aep->name); aep->encoding = AUDIO_ENCODING_SLINEAR_BE; aep->precision = 16; aep->flags = AUDIO_ENCODINGFLAG_EMULATED; - return (0); + break; case 7: strlcpy(aep->name, AudioEulinear_be, sizeof aep->name); aep->encoding = AUDIO_ENCODING_ULINEAR_BE; aep->precision = 16; aep->flags = AUDIO_ENCODINGFLAG_EMULATED; - return (0); + break; default: return (EINVAL); } + aep->bps = AUDIO_BPS(aep->precision); + aep->msb = 1; + + return (0); } @@ -545,6 +549,8 @@ auixp_set_params(void *hdl, int setmode, int usemode, default: return (EINVAL); } + play->bps = AUDIO_BPS(play->precision); + play->msb = 1; temprate = play->sample_rate; error = ac97_set_rate(co->codec_if, @@ -601,6 +607,8 @@ auixp_set_params(void *hdl, int setmode, int usemode, default: return (EINVAL); } + rec->bps = AUDIO_BPS(rec->precision); + rec->msb = 1; error = ac97_set_rate(co->codec_if, AC97_REG_PCM_LR_ADC_RATE, &rec->sample_rate); diff --git a/sys/dev/pci/autri.c b/sys/dev/pci/autri.c index 9419bb45263..5389362351a 100644 --- a/sys/dev/pci/autri.c +++ b/sys/dev/pci/autri.c @@ -1,4 +1,4 @@ -/* $OpenBSD: autri.c,v 1.24 2010/04/08 00:23:53 tedu Exp $ */ +/* $OpenBSD: autri.c,v 1.25 2010/07/15 03:43:11 jakemsr Exp $ */ /* * Copyright (c) 2001 SOMEYA Yoshihiko and KUROSAWA Takahiro. @@ -992,6 +992,8 @@ autri_query_encoding(addr, fp) default: return (EINVAL); } + fp->bps = AUDIO_BPS(fp->precision); + fp->msb = 1; return 0; } @@ -1047,6 +1049,8 @@ autri_set_params(addr, setmode, usemode, play, rec) default: return (EINVAL); } + p->bps = AUDIO_BPS(p->precision); + p->msb = 1; } return 0; diff --git a/sys/dev/pci/auvia.c b/sys/dev/pci/auvia.c index 0a785295abd..ad07c927e08 100644 --- a/sys/dev/pci/auvia.c +++ b/sys/dev/pci/auvia.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auvia.c,v 1.44 2008/10/25 22:30:43 jakemsr Exp $ */ +/* $OpenBSD: auvia.c,v 1.45 2010/07/15 03:43:11 jakemsr Exp $ */ /* $NetBSD: auvia.c,v 1.28 2002/11/04 16:38:49 kent Exp $ */ /*- @@ -503,6 +503,8 @@ auvia_query_encoding(void *addr, struct audio_encoding *fp) fp->encoding = AUDIO_ENCODING_SLINEAR_LE; fp->precision = 16; fp->flags = 0; + fp->bps = 2; + fp->msb = 1; return (0); default: return (EINVAL); @@ -514,54 +516,59 @@ auvia_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 auvia_set_params_sub(struct auvia_softc *sc, struct auvia_softc_chan *ch, struct audio_params *p) @@ -740,6 +747,9 @@ auvia_set_params(void *addr, int setmode, int usemode, return (EINVAL); } auvia_set_params_sub(sc, ch, p); + + p->bps = AUDIO_BPS(p->precision); + p->msb = 1; } return 0; diff --git a/sys/dev/pci/azalia.c b/sys/dev/pci/azalia.c index 72c6c041fce..4e003915e44 100644 --- a/sys/dev/pci/azalia.c +++ b/sys/dev/pci/azalia.c @@ -1,4 +1,4 @@ -/* $OpenBSD: azalia.c,v 1.173 2010/06/27 21:47:07 jakemsr Exp $ */ +/* $OpenBSD: azalia.c,v 1.174 2010/07/15 03:43:11 jakemsr Exp $ */ /* $NetBSD: azalia.c,v 1.20 2006/05/07 08:31:44 kent Exp $ */ /*- @@ -3871,6 +3871,8 @@ azalia_get_default_params(void *addr, int mode, struct audio_params *params) params->sample_rate = 48000; params->encoding = AUDIO_ENCODING_SLINEAR_LE; params->precision = 16; + params->bps = 2; + params->msb = 1; params->channels = 2; params->sw_code = NULL; params->factor = 1; @@ -4008,6 +4010,8 @@ azalia_set_params_sub(codec_t *codec, int mode, audio_params_t *par) } } par->sw_code = swcode; + par->bps = AUDIO_BPS(par->precision); + par->msb = 1; return (0); } @@ -4377,6 +4381,8 @@ azalia_create_encodings(codec_t *this) this->encs[i].index = i; this->encs[i].encoding = encs[i] & 0xff; this->encs[i].precision = encs[i] >> 8; + this->encs[i].bps = AUDIO_BPS(encs[i] >> 8); + this->encs[i].msb = 1; this->encs[i].flags = 0; switch (this->encs[i].encoding) { case AUDIO_ENCODING_SLINEAR_LE: diff --git a/sys/dev/pci/cmpci.c b/sys/dev/pci/cmpci.c index eb15bdfb63d..53344a42e93 100644 --- a/sys/dev/pci/cmpci.c +++ b/sys/dev/pci/cmpci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmpci.c,v 1.25 2010/04/08 00:23:53 tedu Exp $ */ +/* $OpenBSD: cmpci.c,v 1.26 2010/07/15 03:43:11 jakemsr Exp $ */ /* $NetBSD: cmpci.c,v 1.25 2004/10/26 06:32:20 xtraeme Exp $ */ /* @@ -629,6 +629,9 @@ cmpci_query_encoding(void *handle, struct audio_encoding *fp) default: return EINVAL; } + fp->bps = AUDIO_BPS(fp->precision); + fp->msb = 1; + return 0; } @@ -638,6 +641,8 @@ cmpci_get_default_params(void *addr, int mode, struct audio_params *params) params->sample_rate = 48000; params->encoding = AUDIO_ENCODING_SLINEAR_LE; params->precision = 16; + params->bps = 2; + params->msb = 1; params->channels = 2; params->sw_code = NULL; params->factor = 1; @@ -858,6 +863,8 @@ cmpci_set_params(void *handle, int setmode, int usemode, default: return (EINVAL); } + p->bps = AUDIO_BPS(p->precision); + p->msb = 1; if (mode & AUMODE_PLAY) { if (sc->sc_play_channel == 1) { cmpci_reg_partial_write_4(sc, diff --git a/sys/dev/pci/cs4280.c b/sys/dev/pci/cs4280.c index 9aee12b604d..8d278d9e9b8 100644 --- a/sys/dev/pci/cs4280.c +++ b/sys/dev/pci/cs4280.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cs4280.c,v 1.33 2009/01/20 20:00:06 grange Exp $ */ +/* $OpenBSD: cs4280.c,v 1.34 2010/07/15 03:43:11 jakemsr Exp $ */ /* $NetBSD: cs4280.c,v 1.5 2000/06/26 04:56:23 simonb Exp $ */ /* @@ -1106,6 +1106,9 @@ cs4280_query_encoding(addr, fp) default: return (EINVAL); } + fp->bps = AUDIO_BPS(fp->precision); + fp->msb = 1; + return (0); } @@ -1199,6 +1202,8 @@ cs4280_set_params(addr, setmode, usemode, play, rec) default: return (EINVAL); } + p->bps = AUDIO_BPS(p->precision); + p->msb = 1; } /* set sample rate */ diff --git a/sys/dev/pci/cs4281.c b/sys/dev/pci/cs4281.c index 3f2f658ccee..43e3147e948 100644 --- a/sys/dev/pci/cs4281.c +++ b/sys/dev/pci/cs4281.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cs4281.c,v 1.22 2008/10/25 22:30:43 jakemsr Exp $ */ +/* $OpenBSD: cs4281.c,v 1.23 2010/07/15 03:43:11 jakemsr Exp $ */ /* $Tera: cs4281.c,v 1.18 2000/12/27 14:24:45 tacha Exp $ */ /* @@ -494,6 +494,9 @@ cs4281_query_encoding(addr, fp) default: return EINVAL; } + fp->bps = AUDIO_BPS(fp->precision); + fp->msb = 1; + return (0); } @@ -558,6 +561,8 @@ cs4281_set_params(addr, setmode, usemode, play, rec) default: return (EINVAL); } + p->bps = AUDIO_BPS(p->precision); + p->msb = 1; } /* set sample rate */ 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) { diff --git a/sys/dev/pci/emuxki.c b/sys/dev/pci/emuxki.c index f190ed1315b..a61798e95ca 100644 --- a/sys/dev/pci/emuxki.c +++ b/sys/dev/pci/emuxki.c @@ -1,4 +1,4 @@ -/* $OpenBSD: emuxki.c,v 1.33 2009/03/29 21:53:52 sthen Exp $ */ +/* $OpenBSD: emuxki.c,v 1.34 2010/07/15 03:43:11 jakemsr Exp $ */ /* $NetBSD: emuxki.c,v 1.1 2001/10/17 18:39:41 jdolecek Exp $ */ /*- @@ -2145,6 +2145,9 @@ emuxki_query_encoding(void *addr, struct audio_encoding *fp) default: return (EINVAL); } + fp->bps = AUDIO_BPS(fp->precision); + fp->msb = 1; + return (0); } @@ -2234,6 +2237,8 @@ emuxki_set_vparms(struct emuxki_voice *voice, struct audio_params *p) default: return (EINVAL); } + p->bps = AUDIO_BPS(p->precision); + p->msb = 1; return (emuxki_voice_set_audioparms(voice, p->channels == 2, b16, p->sample_rate)); diff --git a/sys/dev/pci/envy.c b/sys/dev/pci/envy.c index 39d483694d7..d328ba6d8d1 100644 --- a/sys/dev/pci/envy.c +++ b/sys/dev/pci/envy.c @@ -1,4 +1,4 @@ -/* $OpenBSD: envy.c,v 1.36 2010/04/08 00:23:53 tedu Exp $ */ +/* $OpenBSD: envy.c,v 1.37 2010/07/15 03:43:11 jakemsr Exp $ */ /* * Copyright (c) 2007 Alexandre Ratchov <alex@caoua.org> * @@ -1542,6 +1542,8 @@ envy_query_encoding(void *self, struct audio_encoding *enc) strlcpy(enc->name, AudioEslinear_le, sizeof(enc->name)); enc->encoding = AUDIO_ENCODING_SLINEAR_LE; enc->precision = 24; + enc->bps = 4; + enc->msb = 1; enc->flags = 0; return 0; } @@ -1577,11 +1579,15 @@ envy_set_params(void *self, int setmode, int usemode, if (setmode & AUMODE_PLAY) { p->encoding = AUDIO_ENCODING_SLINEAR; p->precision = 24; + p->bps = 4; + p->msb = 1; p->channels = sc->isht ? sc->card->noch : ENVY_PCHANS; } if (setmode & AUMODE_RECORD) { r->encoding = AUDIO_ENCODING_SLINEAR; r->precision = 24; + r->bps = 4; + r->msb = 1; r->channels = sc->isht ? sc->card->nich : ENVY_RCHANS; } return 0; diff --git a/sys/dev/pci/esa.c b/sys/dev/pci/esa.c index 57da8a0753c..1f9413cdbbf 100644 --- a/sys/dev/pci/esa.c +++ b/sys/dev/pci/esa.c @@ -1,4 +1,4 @@ -/* $OpenBSD: esa.c,v 1.18 2009/11/13 02:22:19 deraadt Exp $ */ +/* $OpenBSD: esa.c,v 1.19 2010/07/15 03:43:11 jakemsr Exp $ */ /* $NetBSD: esa.c,v 1.12 2002/03/24 14:17:35 jmcneill Exp $ */ /* @@ -165,19 +165,20 @@ int esa_suspend(struct esa_softc *); int esa_resume(struct esa_softc *); static audio_encoding_t esa_encoding[] = { - { 0, AudioEulinear, AUDIO_ENCODING_ULINEAR, 8, 0 }, - { 1, AudioEmulaw, AUDIO_ENCODING_ULAW, 8, - AUDIO_ENCODINGFLAG_EMULATED }, - { 2, AudioEalaw, AUDIO_ENCODING_ALAW, 8, AUDIO_ENCODINGFLAG_EMULATED }, - { 3, AudioEslinear, AUDIO_ENCODING_SLINEAR, 8, - AUDIO_ENCODINGFLAG_EMULATED }, /* XXX: Are you sure? */ - { 4, AudioEslinear_le, AUDIO_ENCODING_SLINEAR_LE, 16, 0 }, - { 5, AudioEulinear_le, AUDIO_ENCODING_ULINEAR_LE, 16, - AUDIO_ENCODINGFLAG_EMULATED }, - { 6, AudioEslinear_be, AUDIO_ENCODING_SLINEAR_BE, 16, - AUDIO_ENCODINGFLAG_EMULATED }, - { 7, AudioEulinear_be, AUDIO_ENCODING_ULINEAR_BE, 16, - AUDIO_ENCODINGFLAG_EMULATED } + { 0, AudioEulinear, AUDIO_ENCODING_ULINEAR, 8, 1, 1, 0 }, + { 1, AudioEmulaw, AUDIO_ENCODING_ULAW, 8, 1, 1, + AUDIO_ENCODINGFLAG_EMULATED }, + { 2, AudioEalaw, AUDIO_ENCODING_ALAW, 8, 1, 1, + AUDIO_ENCODINGFLAG_EMULATED }, + { 3, AudioEslinear, AUDIO_ENCODING_SLINEAR, 8, 1, 1, + AUDIO_ENCODINGFLAG_EMULATED }, + { 4, AudioEslinear_le, AUDIO_ENCODING_SLINEAR_LE, 16, 2, 1, 0 }, + { 5, AudioEulinear_le, AUDIO_ENCODING_ULINEAR_LE, 16, 2, 1, + AUDIO_ENCODINGFLAG_EMULATED }, + { 6, AudioEslinear_be, AUDIO_ENCODING_SLINEAR_BE, 16, 2, 1, + AUDIO_ENCODINGFLAG_EMULATED }, + { 7, AudioEulinear_be, AUDIO_ENCODING_ULINEAR_BE, 16, 2, 1, + AUDIO_ENCODINGFLAG_EMULATED } }; #define ESA_NENCODINGS 8 @@ -336,6 +337,8 @@ esa_set_params(void *hdl, int setmode, int usemode, struct audio_params *play, default: return (EINVAL); } + p->bps = AUDIO_BPS(p->precision); + p->msb = 1; ch->mode = *p; } diff --git a/sys/dev/pci/eso.c b/sys/dev/pci/eso.c index e92805052cf..7edba2c8865 100644 --- a/sys/dev/pci/eso.c +++ b/sys/dev/pci/eso.c @@ -1,4 +1,4 @@ -/* $OpenBSD: eso.c,v 1.31 2010/05/23 11:41:07 deraadt Exp $ */ +/* $OpenBSD: eso.c,v 1.32 2010/07/15 03:43:11 jakemsr Exp $ */ /* $NetBSD: eso.c,v 1.48 2006/12/18 23:13:39 kleink Exp $ */ /* @@ -676,6 +676,8 @@ eso_query_encoding(void *hdl, struct audio_encoding *fp) default: return (EINVAL); } + fp->bps = AUDIO_BPS(fp->precision); + fp->msb = 1; return (0); } @@ -686,6 +688,8 @@ eso_get_default_params(void *addr, int mode, struct audio_params *params) params->sample_rate = 48000; params->encoding = AUDIO_ENCODING_ULINEAR_LE; params->precision = 16; + params->bps = 2; + params->msb = 1; params->channels = 2; params->sw_code = NULL; params->factor = 1; @@ -746,6 +750,8 @@ eso_set_params(void *hdl, int setmode, int usemode, default: return (EINVAL); } + p->bps = AUDIO_BPS(p->precision); + p->msb = 1; /* * We'll compute both possible sample rate dividers and pick diff --git a/sys/dev/pci/fms.c b/sys/dev/pci/fms.c index 3f1bcb650b6..ec021d39fca 100644 --- a/sys/dev/pci/fms.c +++ b/sys/dev/pci/fms.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fms.c,v 1.21 2010/04/04 00:50:36 jakemsr Exp $ */ +/* $OpenBSD: fms.c,v 1.22 2010/07/15 03:43:11 jakemsr Exp $ */ /* $NetBSD: fms.c,v 1.5.4.1 2000/06/30 16:27:50 simonb Exp $ */ /*- @@ -463,52 +463,56 @@ fms_query_encoding(addr, fp) fp->encoding = AUDIO_ENCODING_ULAW; fp->precision = 8; fp->flags = AUDIO_ENCODINGFLAG_EMULATED; - return 0; + break; case 1: strlcpy(fp->name, AudioEslinear_le, sizeof fp->name); fp->encoding = AUDIO_ENCODING_SLINEAR_LE; fp->precision = 16; fp->flags = 0; - return 0; + break; case 2: strlcpy(fp->name, AudioEulinear, sizeof fp->name); fp->encoding = AUDIO_ENCODING_ULINEAR; fp->precision = 8; fp->flags = 0; - return 0; + break; case 3: strlcpy(fp->name, AudioEalaw, sizeof fp->name); fp->encoding = AUDIO_ENCODING_ALAW; fp->precision = 8; fp->flags = AUDIO_ENCODINGFLAG_EMULATED; - return 0; + break; case 4: 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 5: strlcpy(fp->name, AudioEslinear, sizeof fp->name); fp->encoding = AUDIO_ENCODING_SLINEAR; fp->precision = 8; fp->flags = AUDIO_ENCODINGFLAG_EMULATED; - return 0; + break; case 6: 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; case 7: 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; default: return EINVAL; } + fp->bps = AUDIO_BPS(fp->precision); + fp->msb = 1; + + return 0; } void @@ -582,6 +586,9 @@ fms_set_params(addr, setmode, usemode, play, rec) default: return EINVAL; } + play->bps = AUDIO_BPS(play->precision); + play->msb = 1; + for (i = 0; i < 10 && play->sample_rate > fms_rates[i].limit; i++) ; @@ -623,6 +630,9 @@ fms_set_params(addr, setmode, usemode, play, rec) default: return EINVAL; } + rec->bps = AUDIO_BPS(rec->precision); + rec->msb = 1; + for (i = 0; i < 10 && rec->sample_rate > fms_rates[i].limit; i++) ; diff --git a/sys/dev/pci/maestro.c b/sys/dev/pci/maestro.c index 63036064786..dea2b251000 100644 --- a/sys/dev/pci/maestro.c +++ b/sys/dev/pci/maestro.c @@ -1,4 +1,4 @@ -/* $OpenBSD: maestro.c,v 1.28 2010/04/08 00:23:53 tedu Exp $ */ +/* $OpenBSD: maestro.c,v 1.29 2010/07/15 03:43:11 jakemsr Exp $ */ /* $FreeBSD: /c/ncvs/src/sys/dev/sound/pci/maestro.c,v 1.3 2000/11/21 12:22:11 julian Exp $ */ /* * FreeBSD's ESS Agogo/Maestro driver @@ -974,18 +974,18 @@ maestro_query_devinfo(self, cp) } struct audio_encoding maestro_tab[] = { - {0, AudioEslinear_le, AUDIO_ENCODING_SLINEAR_LE, 16, 0}, - {1, AudioEslinear, AUDIO_ENCODING_SLINEAR, 8, 0}, - {2, AudioEulinear, AUDIO_ENCODING_ULINEAR, 8, 0}, - {3, AudioEslinear_be, AUDIO_ENCODING_SLINEAR_BE, 16, + {0, AudioEslinear_le, AUDIO_ENCODING_SLINEAR_LE, 16, 2, 1, 0}, + {1, AudioEslinear, AUDIO_ENCODING_SLINEAR, 8, 1, 1, 0}, + {2, AudioEulinear, AUDIO_ENCODING_ULINEAR, 8, 1, 1, 0}, + {3, AudioEslinear_be, AUDIO_ENCODING_SLINEAR_BE, 16, 2, 1, AUDIO_ENCODINGFLAG_EMULATED}, - {4, AudioEulinear_le, AUDIO_ENCODING_ULINEAR_LE, 16, + {4, AudioEulinear_le, AUDIO_ENCODING_ULINEAR_LE, 16, 2, 1, AUDIO_ENCODINGFLAG_EMULATED}, - {5, AudioEulinear_be, AUDIO_ENCODING_ULINEAR_BE, 16, + {5, AudioEulinear_be, AUDIO_ENCODING_ULINEAR_BE, 16, 2, 1, AUDIO_ENCODINGFLAG_EMULATED}, - {6, AudioEmulaw, AUDIO_ENCODING_ULAW, 8, + {6, AudioEmulaw, AUDIO_ENCODING_ULAW, 8, 1, 1, AUDIO_ENCODINGFLAG_EMULATED}, - {7, AudioEalaw, AUDIO_ENCODING_ALAW, 8, + {7, AudioEalaw, AUDIO_ENCODING_ALAW, 8, 1, 1, AUDIO_ENCODINGFLAG_EMULATED} }; @@ -1117,6 +1117,9 @@ maestro_set_params(hdl, setmode, usemode, play, rec) else if (play->encoding != AUDIO_ENCODING_SLINEAR_LE) return (EINVAL); + play->bps = AUDIO_BPS(play->precision); + play->msb = 1; + maestro_set_speed(&sc->play, &play->sample_rate); return (0); } diff --git a/sys/dev/pci/neo.c b/sys/dev/pci/neo.c index f67cc61505d..496d07b496d 100644 --- a/sys/dev/pci/neo.c +++ b/sys/dev/pci/neo.c @@ -1,4 +1,4 @@ -/* $OpenBSD: neo.c,v 1.23 2008/10/25 22:30:43 jakemsr Exp $ */ +/* $OpenBSD: neo.c,v 1.24 2010/07/15 03:43:11 jakemsr Exp $ */ /* * Copyright (c) 1999 Cameron Grant <gandalf@vilnya.demon.co.uk> @@ -782,52 +782,56 @@ neo_query_encoding(addr, 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 @@ -916,9 +920,10 @@ neo_set_params(addr, setmode, usemode, play, rec) default: return (EINVAL); } + p->bps = AUDIO_BPS(p->precision); + p->msb = 1; } - return (0); } diff --git a/sys/dev/pci/sv.c b/sys/dev/pci/sv.c index 78882cca0e2..6d608fadf46 100644 --- a/sys/dev/pci/sv.c +++ b/sys/dev/pci/sv.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sv.c,v 1.26 2009/06/23 06:39:48 jsg Exp $ */ +/* $OpenBSD: sv.c,v 1.27 2010/07/15 03:43:11 jakemsr Exp $ */ /* * Copyright (c) 1998 Constantine Paul Sapuntzakis @@ -611,52 +611,56 @@ sv_query_encoding(addr, 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); } int @@ -720,6 +724,9 @@ sv_set_params(addr, setmode, usemode, p, r) p->sw_code = pswcode; r->sw_code = rswcode; + p->bps = AUDIO_BPS(p->precision); + r->bps = AUDIO_BPS(r->precision); + p->msb = r->msb = 1; /* Set the encoding */ reg = sv_read_indirect(sc, SV_DMA_DATA_FORMAT); diff --git a/sys/dev/pci/yds.c b/sys/dev/pci/yds.c index 8c9b600a312..fd5addc3d6c 100644 --- a/sys/dev/pci/yds.c +++ b/sys/dev/pci/yds.c @@ -1,4 +1,4 @@ -/* $OpenBSD: yds.c,v 1.33 2010/04/06 22:28:07 tedu Exp $ */ +/* $OpenBSD: yds.c,v 1.34 2010/07/15 03:43:11 jakemsr Exp $ */ /* $NetBSD: yds.c,v 1.5 2001/05/21 23:55:04 minoura Exp $ */ /* @@ -1140,52 +1140,56 @@ yds_query_encoding(addr, 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 @@ -1263,6 +1267,8 @@ yds_set_params(addr, setmode, usemode, play, rec) default: return (EINVAL); } + p->bps = AUDIO_BPS(p->precision); + p->msb = 1; } return 0; |