HomeFreeBSD

sound: Fix minchn, maxchn and fmts in sndstat_get_caps()

Description

sound: Fix minchn, maxchn and fmts in sndstat_get_caps()

The current implementation (incorrectly) passes the channel encoding
value to AFMT_CHANNEL(), which will always return 0, since the channel
number bits are masked out by AFMT_ENCODING().

Also add missing fmts initialization and aggregate encoding formats into
it directly.

Sponsored by: The FreeBSD Foundation
MFC after: 1 day
Reviewed by: dev_submerge.ch
Differential Revision: https://reviews.freebsd.org/D45312

(cherry picked from commit 425a7bc465d4a6393c88c2e79c5ad77befda2a97)

Details

Provenance
christosAuthored on May 23 2024, 12:57 AM
Reviewer
dev_submerge.ch
Differential Revision
D45312: sound: Fix minchn, maxchn and fmts in sndstat_get_caps()
Parents
rG63be29379cb1: mixer.3: Fix mandoc -Tlint warnings
Branches
Unknown
Tags
Unknown