HomeFreeBSD

snd_uaudio(4): Fix sample rate selection after 42fdcd9fd917.

Description

snd_uaudio(4): Fix sample rate selection after 42fdcd9fd917.

The sample rate selection of snd_uaudio(4) at runtime was implicitly
relying on a specific order in the device config list. In case a default
was set through the hw.usb.uaudio.default_rate sysctl tunable, commit
42fdcd9fd917 removed a duplicate sample rate entry from that list, which
inadvertently broke sample rate selection at runtime. Implement sample
rate selection in a way that works for any order in the device config
list.

Reported by: Lexi Winter <lexi@le-fay.org>
MFC after: 1 week
Reviewed by: christos
Differential Revision: https://reviews.freebsd.org/D44051

Details

Provenance
dev_submerge.chAuthored on Feb 26 2024, 11:27 PM
christosCommitted on Feb 26 2024, 11:27 PM
Reviewer
christos
Differential Revision
D44051: snd_uaudio(4): Fix sample rate selection after 42fdcd9fd917.
Parents
rGbc4c7e78f845: ofwdump: Convert ints that are booleans to bool.
Branches
Unknown
Tags
Unknown