Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F147535070
D45662.id140042.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D45662.id140042.diff
View Options
diff --git a/sys/dev/sound/pcm/vchan.c b/sys/dev/sound/pcm/vchan.c
--- a/sys/dev/sound/pcm/vchan.c
+++ b/sys/dev/sound/pcm/vchan.c
@@ -768,37 +768,15 @@
&vchanspd);
CHN_LOCK(parent);
if (r != 0) {
- /*
- * No saved value, no hint, NOTHING.
- *
- * Workaround for sb16 running
- * poorly at 45k / 49k.
- */
- switch (parent_caps->maxspeed) {
- case 45000:
- case 49000:
- vchanspd = 44100;
- break;
- default:
- vchanspd = VCHAN_DEFAULT_RATE;
- if (vchanspd > parent_caps->maxspeed)
- vchanspd = parent_caps->maxspeed;
- break;
- }
- if (vchanspd < parent_caps->minspeed)
- vchanspd = parent_caps->minspeed;
+ /* No saved value, no hint, NOTHING. */
+ vchanspd = VCHAN_DEFAULT_RATE;
+ RANGE(vchanspd, parent_caps->minspeed,
+ parent_caps->maxspeed);
}
- save = 1;
- }
-
- if (ret == 0) {
/*
* Limit the speed between feeder_rate_min <-> feeder_rate_max.
*/
- if (vchanspd < feeder_rate_min)
- vchanspd = feeder_rate_min;
- if (vchanspd > feeder_rate_max)
- vchanspd = feeder_rate_max;
+ RANGE(vchanspd, feeder_rate_min, feeder_rate_max);
if (feeder_rate_round) {
RANGE(vchanspd, parent_caps->minspeed,
@@ -808,6 +786,7 @@
}
ret = chn_reset(parent, vchanfmt, vchanspd);
+ save = 1;
}
if (ret == 0 && save) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Mar 12, 5:09 PM (20 h, 9 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29574750
Default Alt Text
D45662.id140042.diff (1 KB)
Attached To
Mode
D45662: sound: Get rid of snd_sb16 workaround in vchan_create()
Attached
Detach File
Event Timeline
Log In to Comment