Bug ID: 192755
           Summary: snd_uaudio incorrect handling of version 1 audio
                    format type descriptor
           Product: Base System
           Version: 10.0-STABLE
          Hardware: amd64
                OS: Any
            Status: Needs Triage
          Severity: Affects Only Me
          Priority: ---
         Component: usb

For USB audio 1.0 formats the code in uaudio.c uses the value of bBitResolution
from the descriptor directly to choose and internal audio format from the array
uaudio10_formats. It should use the value from bSubFrameSize instead.
It is clearly specified in the official USB document for audio data formats,
page 9 under the section "2.2.2 Audio Subframe" that the endpoint must be
handled using bSubFramSize*8 bits per sample from which the device will take
the number of bits it actually uses.
In my particular case I own a device reporting bBitResolution of 24 and
bSubFrameSize of 4. An unpatched driver will be sending 3-byte subframes to the
endpoint resulting in pure noise :)

For USB 2.0 formats the code already does some conversion to avoid this same
problem, using the equivalent bSubslotSize in the function

                 /* Map 4-byte aligned 24-bit samples into 32-bit */
                        if (bBitResolution == 24 && bSubslotSize == 4)
                                bBitResolution = 32;

                        if (bBitResolution != (bSubslotSize * 8)) {
                                DPRINTF("Invalid bSubslotSize\n");
                                goto next_ep;

You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________ mailing list
To unsubscribe, send any mail to ""

Reply via email to