Page MenuHomeFreeBSD

D45136.diff
No OneTemporary

D45136.diff

diff --git a/sys/dev/sound/pcm/sound.c b/sys/dev/sound/pcm/sound.c
--- a/sys/dev/sound/pcm/sound.c
+++ b/sys/dev/sound/pcm/sound.c
@@ -708,11 +708,9 @@
struct snddev_info *d;
struct pcm_channel *c;
- int j, ncards;
+ int j;
size_t i;
- ncards = 0;
-
strlcpy(si->product, si_product, sizeof(si->product));
strlcpy(si->version, si_version, sizeof(si->version));
si->versionnum = SOUND_VERSION;
@@ -720,7 +718,7 @@
/*
* Iterate over PCM devices and their channels, gathering up data
- * for the numaudios, ncards, and openedaudio fields.
+ * for the numaudios and openedaudio fields.
*/
si->numaudios = 0;
bzero((void *)&si->openedaudio, sizeof(si->openedaudio));
@@ -740,7 +738,6 @@
PCM_LOCK(d);
si->numaudios += PCM_CHANCOUNT(d);
- ++ncards;
CHN_FOREACH(c, d, channels.pcm) {
CHN_UNLOCKASSERT(c);
@@ -771,7 +768,7 @@
si->nummidis = 0;
si->numtimers = 0;
si->nummixers = mixer_count;
- si->numcards = ncards;
+ si->numcards = devclass_get_maxunit(pcm_devclass);
/* OSSv4 docs: Intended only for test apps; API doesn't
really have much of a concept of cards. Shouldn't be
used by applications. */

File Metadata

Mime Type
text/plain
Expires
Wed, Nov 6, 2:11 AM (41 m, 32 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14476163
Default Alt Text
D45136.diff (1 KB)

Event Timeline