Page MenuHomeFreeBSD

D48031.diff
No OneTemporary

D48031.diff

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

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)

Event Timeline