The branch stable/15 has been updated by christos:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=bd0449aab23926b4724f4b5c91f008f2a60e58ca

commit bd0449aab23926b4724f4b5c91f008f2a60e58ca
Author:     Christos Margiolis <[email protected]>
AuthorDate: 2026-08-21 14:02:19 +0000
Commit:     Christos Margiolis <[email protected]>
CommitDate: 2026-08-29 11:14:27 +0000

    snd_uaudio: Use uDWord for the UAC2 sample rate
    
    uaudio20_set_speed() split the sample rate into bytes by hand. Use
    uDWord and USETDW() instead.
    
    No functional change intended.
    
    Sponsored by:   The FreeBSD Foundation
    MFC after:      1 week
    Reviewed by:    markj
    Differential Revision:  https://reviews.freebsd.org/D59066
    
    (cherry picked from commit 5c3bc8ab427c8624b29cd9ac9265445002da3ba8)
---
 sys/dev/sound/usb/uaudio.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/sys/dev/sound/usb/uaudio.c b/sys/dev/sound/usb/uaudio.c
index 6cb77854dfe7..d81eb037b283 100644
--- a/sys/dev/sound/usb/uaudio.c
+++ b/sys/dev/sound/usb/uaudio.c
@@ -5419,7 +5419,7 @@ uaudio20_set_speed(struct usb_device *udev, uint8_t 
iface_no,
     uint8_t clockid, uint32_t speed)
 {
        struct usb_device_request req;
-       uint8_t data[4];
+       uDWord data;
 
        DPRINTFN(6, "ifaceno=%d clockid=%d speed=%u\n",
            iface_no, clockid, speed);
@@ -5428,11 +5428,8 @@ uaudio20_set_speed(struct usb_device *udev, uint8_t 
iface_no,
        req.bRequest = UA20_CS_CUR;
        USETW2(req.wValue, UA20_CS_SAM_FREQ_CONTROL, 0);
        USETW2(req.wIndex, clockid, iface_no);
-       USETW(req.wLength, 4);
-       data[0] = speed;
-       data[1] = speed >> 8;
-       data[2] = speed >> 16;
-       data[3] = speed >> 24;
+       USETW(req.wLength, sizeof(data));
+       USETDW(data, speed);
 
        return (usbd_do_request(udev, NULL, &req, data));
 }

Reply via email to