aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorChristos Margiolis <christos@FreeBSD.org>2025-02-25 11:44:49 +0000
committerChristos Margiolis <christos@FreeBSD.org>2025-03-04 15:46:07 +0000
commit311b84540e737a55d032aa46975ea2379350077a (patch)
treec61b6257ae712516777c5ce2f4aee5fdf00d0f39 /lib
parent0a309ec1b80251afd69923a0a8e9692094533e05 (diff)
mixer(3): Do not skip devices with no volume control
Some devices might not have a software volume control, but still be able to be set as recording sources. PR: 279787 Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D48730 (cherry picked from commit f121de8fbcbc8aa82f9fb59039c502406b7c88b6)
Diffstat (limited to 'lib')
-rw-r--r--lib/libmixer/mixer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libmixer/mixer.c b/lib/libmixer/mixer.c
index 4abbed9b27d3..2be3a48eb755 100644
--- a/lib/libmixer/mixer.c
+++ b/lib/libmixer/mixer.c
@@ -113,14 +113,14 @@ dunit:
TAILQ_INIT(&m->devs);
for (i = 0; i < SOUND_MIXER_NRDEVICES; i++) {
- if (!MIX_ISDEV(m, i))
+ if (!MIX_ISDEV(m, i) && !MIX_ISREC(m, i))
continue;
if ((dp = calloc(1, sizeof(struct mix_dev))) == NULL)
goto fail;
dp->parent_mixer = m;
dp->devno = i;
dp->nctl = 0;
- if (_mixer_readvol(dp) < 0)
+ if (MIX_ISDEV(m, i) && _mixer_readvol(dp) < 0)
goto fail;
(void)strlcpy(dp->name, names[i], sizeof(dp->name));
TAILQ_INIT(&dp->ctls);