summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorariff <ariff@FreeBSD.org>2006-01-20 03:46:02 +0000
committerariff <ariff@FreeBSD.org>2006-01-20 03:46:02 +0000
commit578d59cab0c9ac844af0507db1eba0e7fbea130a (patch)
tree85ca08b590e037e006569cf6b7b907bb76ff8367 /sys
parent4b91dda12583662d0b29af69ebd64947c9d798ec (diff)
downloadFreeBSD-src-578d59cab0c9ac844af0507db1eba0e7fbea130a.zip
FreeBSD-src-578d59cab0c9ac844af0507db1eba0e7fbea130a.tar.gz
Ruthless vchan speed workaround against the dreaded sb16 / sb16x. It appear
that nothing else using this weird 45k / 49k speed upper limit.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/sound/pcm/vchan.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/sys/dev/sound/pcm/vchan.c b/sys/dev/sound/pcm/vchan.c
index 2f8ce68..308addc 100644
--- a/sys/dev/sound/pcm/vchan.c
+++ b/sys/dev/sound/pcm/vchan.c
@@ -441,13 +441,19 @@ vchan_create(struct pcm_channel *parent)
"vchanrate", &speed);
CHN_LOCK(parent);
if (r != 0) {
- speed = VCHAN_DEFAULT_SPEED;
/*
* Workaround for sb16 running
- * poorly at 45k.
+ * poorly at 45k / 49k.
*/
- if (speed > parent_caps->maxspeed)
+ switch (parent_caps->maxspeed) {
+ case 45000:
+ case 49000:
speed = 44100;
+ break;
+ default:
+ speed = VCHAN_DEFAULT_SPEED;
+ break;
+ }
}
}
OpenPOWER on IntegriCloud