Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F157869124
D48011.id151466.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
D48011.id151466.diff
View Options
diff --git a/sys/dev/sound/pcm/channel.c b/sys/dev/sound/pcm/channel.c
--- a/sys/dev/sound/pcm/channel.c
+++ b/sys/dev/sound/pcm/channel.c
@@ -2104,21 +2104,20 @@
int
chn_setspeed(struct pcm_channel *c, uint32_t speed)
{
- uint32_t oldformat, oldspeed, format;
+ uint32_t oldformat, oldspeed;
int ret;
oldformat = c->format;
oldspeed = c->speed;
- format = oldformat;
- ret = chn_setparam(c, format, speed);
+ ret = chn_setparam(c, c->format, speed);
if (ret != 0) {
if (snd_verbose > 3)
device_printf(c->dev,
"%s(): Setting speed %d failed, "
"falling back to %d\n",
__func__, speed, oldspeed);
- chn_setparam(c, c->format, oldspeed);
+ chn_setparam(c, oldformat, oldspeed);
}
return (ret);
@@ -2127,7 +2126,7 @@
int
chn_setformat(struct pcm_channel *c, uint32_t format)
{
- uint32_t oldformat, oldspeed, speed;
+ uint32_t oldformat, oldspeed;
int ret;
/* XXX force stereo */
@@ -2138,9 +2137,8 @@
oldformat = c->format;
oldspeed = c->speed;
- speed = oldspeed;
- ret = chn_setparam(c, format, speed);
+ ret = chn_setparam(c, format, c->speed);
if (ret != 0) {
if (snd_verbose > 3)
device_printf(c->dev,
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, May 27, 12:17 AM (7 h, 46 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33541986
Default Alt Text
D48011.id151466.diff (1 KB)
Attached To
Mode
D48011: sound: Get rid of redundant variables in chn_setspeed() and chn_setformat()
Attached
Detach File
Event Timeline
Log In to Comment