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

(cherry picked from commit a9341f0f0ae01b4d249dbf3bacfa420152c46aef)

Details

Provenance
dev_submerge.chAuthored on Feb 26 2024, 11:27 PM
christosCommitted on Mar 4 2024, 12:38 AM
Reviewer
christos
Differential Revision
D44051: snd_uaudio(4): Fix sample rate selection after 42fdcd9fd917.
Parents
rG7f387adb6996: ipsec esp: avoid dereferencing freed secasindex
Branches
Unknown
Tags
Unknown