Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F103037946
D45312.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
D45312.diff
View Options
diff --git a/sys/dev/sound/pcm/sndstat.c b/sys/dev/sound/pcm/sndstat.c
--- a/sys/dev/sound/pcm/sndstat.c
+++ b/sys/dev/sound/pcm/sndstat.c
@@ -330,7 +330,6 @@
uint32_t *max_rate, uint32_t *fmts, uint32_t *minchn, uint32_t *maxchn)
{
struct pcm_channel *c;
- unsigned int encoding;
int dir;
dir = play ? PCMDIR_PLAY : PCMDIR_REC;
@@ -347,11 +346,11 @@
return;
}
+ *fmts = 0;
*min_rate = UINT32_MAX;
*max_rate = 0;
*minchn = UINT32_MAX;
*maxchn = 0;
- encoding = 0;
CHN_FOREACH(c, d, channels.pcm) {
struct pcmchan_caps *caps;
int i;
@@ -364,9 +363,9 @@
*min_rate = min(caps->minspeed, *min_rate);
*max_rate = max(caps->maxspeed, *max_rate);
for (i = 0; caps->fmtlist[i]; i++) {
- encoding |= AFMT_ENCODING(caps->fmtlist[i]);
- *minchn = min(AFMT_CHANNEL(encoding), *minchn);
- *maxchn = max(AFMT_CHANNEL(encoding), *maxchn);
+ *fmts |= AFMT_ENCODING(caps->fmtlist[i]);
+ *minchn = min(AFMT_CHANNEL(caps->fmtlist[i]), *minchn);
+ *maxchn = max(AFMT_CHANNEL(caps->fmtlist[i]), *maxchn);
}
CHN_UNLOCK(c);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Nov 21, 3:18 AM (9 h, 33 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14731669
Default Alt Text
D45312.diff (1 KB)
Attached To
Mode
D45312: sound: Fix minchn, maxchn and fmts in sndstat_get_caps()
Attached
Detach File
Event Timeline
Log In to Comment