Page MenuHomeFreeBSD

D46520.diff
No OneTemporary

D46520.diff

diff --git a/share/man/man4/pcm.4 b/share/man/man4/pcm.4
--- a/share/man/man4/pcm.4
+++ b/share/man/man4/pcm.4
@@ -367,7 +367,6 @@
Set to
.Dq 0
if no VCHANs are desired.
-Maximum value is 256.
.It Va hw.snd.report_soft_formats
Controls the internal format conversion if it is
available transparently to the application software.
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,6 @@
if (err == 0 && req->newptr != NULL && vchancount != cnt) {
if (cnt < 0)
cnt = 0;
- if (cnt > SND_MAXVCHANS)
- cnt = SND_MAXVCHANS;
err = vchan_setnew(d, direction, cnt);
}
@@ -934,7 +932,7 @@
if (!(d->flags & SD_F_AUTOVCHAN))
return (EINVAL);
- if (newcnt < 0 || newcnt > SND_MAXVCHANS)
+ if (newcnt < 0)
return (E2BIG);
if (direction == PCMDIR_PLAY)
@@ -1062,8 +1060,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

Mime Type
text/plain
Expires
Thu, Nov 7, 1:52 AM (21 h, 16 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14503121
Default Alt Text
D46520.diff (1 KB)

Event Timeline