summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorAlexandre Ratchov <ratchov@cvs.openbsd.org>2008-11-25 17:25:54 +0000
committerAlexandre Ratchov <ratchov@cvs.openbsd.org>2008-11-25 17:25:54 +0000
commit17802f86fb797ffa838268ca2fcb489f828721eb (patch)
tree0868930bb519d9e6467683bd4aeb8a11ff9c834b /sys
parent4f87a041328022909468779074d96fb7c4f1323a (diff)
set parameters to native ones; don't setup emulation for now
to ease debugging ok uwe
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/bluetooth/btsco.c38
1 files changed, 17 insertions, 21 deletions
diff --git a/sys/dev/bluetooth/btsco.c b/sys/dev/bluetooth/btsco.c
index 20614310c5d..1bb26c56b48 100644
--- a/sys/dev/bluetooth/btsco.c
+++ b/sys/dev/bluetooth/btsco.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: btsco.c,v 1.1 2008/11/24 22:31:19 uwe Exp $ */
+/* $OpenBSD: btsco.c,v 1.2 2008/11/25 17:25:53 ratchov Exp $ */
/* $NetBSD: btsco.c,v 1.22 2008/08/06 15:01:23 plunky Exp $ */
/*-
@@ -744,11 +744,8 @@ static int
btsco_set_params(void *hdl, int setmode, int usemode,
audio_params_t *play, audio_params_t *rec)
{
-/* struct btsco_softc *sc = hdl; */
- const struct audio_format *f;
-#if 0
- int rv;
-#endif
+ int i, mode;
+ struct audio_params *p;
DPRINTF("setmode 0x%x usemode 0x%x\n", setmode, usemode);
DPRINTF("rate %d, precision %d, channels %d encoding %d\n",
@@ -759,22 +756,21 @@ btsco_set_params(void *hdl, int setmode, int usemode,
* and select the appropriate one to use. Currently only one is
* supported: 0x0060 == 8000Hz, mono, 16-bit, slinear_le
*/
- f = &btsco_format;
-
-#if 0
- if (setmode & AUMODE_PLAY) {
- rv = auconv_set_converter(f, 1, AUMODE_PLAY, play, TRUE, pfil);
- if (rv < 0)
- return EINVAL;
- }
-
- if (setmode & AUMODE_RECORD) {
- rv = auconv_set_converter(f, 1, AUMODE_RECORD, rec, TRUE, rfil);
- if (rv < 0)
- return EINVAL;
+ for (i = 0; i < 2; i++) {
+ if (i) {
+ mode = AUMODE_REC;
+ p = rec;
+ } else {
+ mode = AUMODE_PLAY;
+ p = play;
+ }
+ if (!(setmode & mode))
+ continue;
+ p->sample_rate = 8000;
+ p->encoding = slinear_le;
+ p->precision = 16;
+ p->channels = 1;
}
-#endif
-
return 0;
}