HomeFreeBSD

sound: Fix vchanrate and vchanformat

Description

sound: Fix vchanrate and vchanformat

Make vchanrate and vchanformat reflect the primary channel's software
buffer's rate and format respectively. Fix previous inconsistencies.

Get rid of the initializations in vchan_create() and move them to
chn_init().

Without the feeder_rate_round check in sysctl_dev_pcm_vchanrate(), we
can set the software rate to anything between feeder_rate_min and
feeder_rate_max. If we keep the check, however, the rate is limited to
whatever the driver's min/max is, which can be a problem if, for
example, the driver supports only a single rate, in which case we won't
be able to set anything other than the driver rate.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D48961

Details

Provenance
christosAuthored on Mar 30 2025, 5:45 PM
Differential Revision
D48961: sound: Fix vchanrate and vchanformat
Parents
rG0cc5e57d2d31: src.conf.5: regen after riscv EFI change
Branches
Unknown
Tags
Unknown