HomeFreeBSD

sound: SNDCTL_AUDIOINFO: Do not skip physical channels if VCHANs are disabled

Description

sound: SNDCTL_AUDIOINFO: Do not skip physical channels if VCHANs are disabled

Currently, we are skipping physical channels when servicing
SNDCTL_AUDIOINFO, and VCHANs when servicing SNDCTL_AUDIOINFO_EX.
However, if we call SNDCTL_AUDIOINFO with VCHANs disabled, we'll
eventually skip all channels, resulting in some of oss_audioinfo's
fields containing wrong information (e.g min/max_channels).

Fix this by adding an exception to SNDCTL_AUDIOINFO not to skip physical
channels when VCHANs are disabled.

Sponsored by: The FreeBSD Foundation
MFC after: 2 days
Reviewed by: dev_submerge.ch, emaste
Differential Revision: https://reviews.freebsd.org/D45722

Details

Provenance
christosAuthored on Jul 6 2024, 6:22 PM
Reviewer
dev_submerge.ch
Differential Revision
D45722: sound: SNDCTL_AUDIOINFO: Do not skip physical channels if VCHANs are disabled
Parents
rGa9d7f098b865: mps(4): Correct a typo in a source code comment
Branches
Unknown
Tags
Unknown