Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F115556951
D48031.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
725 B
Referenced Files
None
Subscribers
None
D48031.diff
View Options
diff --git a/sys/dev/sound/pcm/feeder_chain.c b/sys/dev/sound/pcm/feeder_chain.c
--- a/sys/dev/sound/pcm/feeder_chain.c
+++ b/sys/dev/sound/pcm/feeder_chain.c
@@ -718,6 +718,17 @@
c->format = cdesc.target.afmt;
c->speed = cdesc.target.rate;
} else {
+ /*
+ * Bail out early if we do not support either of those formats.
+ */
+ if ((cdesc.origin.afmt & AFMT_CONVERTIBLE) == 0 ||
+ (cdesc.target.afmt & AFMT_CONVERTIBLE) == 0) {
+ device_printf(c->dev,
+ "%s(): unsupported formats: in=0x%08x, out=0x%08x\n",
+ __func__, cdesc.origin.afmt, cdesc.target.afmt);
+ return (ENODEV);
+ }
+
/* hwfmt is not convertible, so 'dummy' it. */
if (hwfmt & AFMT_PASSTHROUGH)
cdesc.dummy = 1;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Apr 26, 7:22 AM (17 h, 32 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15637832
Default Alt Text
D48031.diff (725 B)
Attached To
Mode
D48031: sound: Bail out early if a format is not supported
Attached
Detach File
Event Timeline
Log In to Comment