Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F101888301
D46520.id142820.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
D46520.id142820.diff
View Options
diff --git a/sys/dev/sound/pcm/feeder.c b/sys/dev/sound/pcm/feeder.c
--- a/sys/dev/sound/pcm/feeder.c
+++ b/sys/dev/sound/pcm/feeder.c
@@ -85,8 +85,7 @@
if (snd_unit < 0)
snd_unit = -1;
- if (snd_maxautovchans < 0 ||
- snd_maxautovchans > SND_MAXVCHANS)
+ if (snd_maxautovchans < 0)
snd_maxautovchans = 0;
if (chn_latency < CHN_LATENCY_MIN ||
diff --git a/sys/dev/sound/pcm/sound.h b/sys/dev/sound/pcm/sound.h
--- a/sys/dev/sound/pcm/sound.h
+++ b/sys/dev/sound/pcm/sound.h
@@ -103,7 +103,6 @@
* By design, limit possible channels for each direction.
*/
#define SND_MAXHWCHAN 256
-#define SND_MAXVCHANS SND_MAXHWCHAN
#define SD_F_SIMPLEX 0x00000001
#define SD_F_AUTOVCHAN 0x00000002
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
@@ -61,7 +61,7 @@
int trigger;
};
-int snd_maxautovchans = 16;
+int snd_maxautovchans = 256;
static void *
vchan_init(kobj_t obj, void *devinfo, struct snd_dbuf *b,
@@ -341,8 +341,8 @@
if (err == 0 && req->newptr != NULL && vchancount != cnt) {
if (cnt < 0)
cnt = 0;
- if (cnt > SND_MAXVCHANS)
- cnt = SND_MAXVCHANS;
+ if (cnt > snd_maxautovchans)
+ cnt = snd_maxautovchans;
err = vchan_setnew(d, direction, cnt);
}
@@ -934,7 +934,7 @@
if (!(d->flags & SD_F_AUTOVCHAN))
return (EINVAL);
- if (newcnt < 0 || newcnt > SND_MAXVCHANS)
+ if (newcnt < 0 || newcnt > snd_maxautovchans)
return (E2BIG);
if (direction == PCMDIR_PLAY)
@@ -1065,8 +1065,6 @@
if (error == 0 && req->newptr != NULL) {
if (v < 0)
v = 0;
- if (v > SND_MAXVCHANS)
- v = SND_MAXVCHANS;
snd_maxautovchans = v;
for (i = 0; pcm_devclass != NULL &&
i < devclass_get_maxunit(pcm_devclass); i++) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Nov 6, 5:47 AM (4 h, 13 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14478693
Default Alt Text
D46520.id142820.diff (1 KB)
Attached To
Mode
D46520: sound: Retire SND_MAXVCHANS
Attached
Detach File
Event Timeline
Log In to Comment