Page MenuHomeFreeBSD

sound: Fix vchanrate and vchanformat
ClosedPublic

Authored by christos on Feb 12 2025, 12:21 PM.
Tags
None
Referenced Files
F168321694: D48961.id152869.diff
Thu, Aug 27, 3:04 PM
Unknown Object (File)
Wed, Aug 26, 2:52 AM
Unknown Object (File)
Mon, Aug 24, 12:34 AM
Unknown Object (File)
Mon, Aug 24, 12:32 AM
Unknown Object (File)
Sat, Aug 22, 11:30 PM
Unknown Object (File)
Sat, Aug 22, 11:12 PM
Unknown Object (File)
Sat, Aug 22, 9:45 AM
Unknown Object (File)
Sat, Aug 22, 7:20 AM
Subscribers

Details

Summary

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

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This revision was not accepted when it landed; it landed in state Needs Review.Mar 30 2025, 5:48 PM
This revision was automatically updated to reflect the committed changes.