summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorDale Rahn <drahn@cvs.openbsd.org>2004-01-12 02:19:14 +0000
committerDale Rahn <drahn@cvs.openbsd.org>2004-01-12 02:19:14 +0000
commit35f4535c5de49efa341a767fbbb08450a0ef3913 (patch)
tree4c971b78cc71f2fa488226f6ab3bedd3c6cf21c0 /sys
parentd73667f28700a8144e719a35a3a065a6e4ad70a3 (diff)
Better defaults on snapper, fixes xmms problem reported by joshua stein
just hours after the driver was committed.
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/macppc/dev/snapper.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/sys/arch/macppc/dev/snapper.c b/sys/arch/macppc/dev/snapper.c
index d4967cec543..14b9a442f2d 100644
--- a/sys/arch/macppc/dev/snapper.c
+++ b/sys/arch/macppc/dev/snapper.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: snapper.c,v 1.2 2004/01/11 21:01:04 drahn Exp $ */
+/* $OpenBSD: snapper.c,v 1.3 2004/01/12 02:19:13 drahn Exp $ */
/* $NetBSD: snapper.c,v 1.1 2003/12/27 02:19:34 grant Exp $ */
/*-
@@ -374,11 +374,7 @@ snapper_attach(parent, self, aux)
printf(": irq %d,%d,%d\n", sc->sc_dev.dv_xname, cirq, oirq, iirq);
snapper_config(sc, sc->sc_node, parent);
-#if 0
- config_interrupts(self, snapper_defer);
-#else
config_defer(self, snapper_defer);
-#endif
}
void
@@ -567,7 +563,7 @@ snapper_set_params(h, setmode, usemode, play, rec)
struct audio_params *p;
int mode, rate;
- p = NULL;
+ p = play; /* default to play */
/*
* This device only has one clock, so make the sample rates match.
@@ -1048,6 +1044,12 @@ snapper_set_rate(sc, rate)
int clksrc, mdiv, sdiv;
int mclk_fs;
+ /* sanify */
+ if (rate > 48000)
+ rate = 48000;
+ else if (rate < 8000)
+ rate = 8000;
+
switch (rate) {
case 8000:
clksrc = 18432000; /* 18MHz */