Project

General

Profile

Feature #100

usb_as and usb_ac driver enhancements

Added by Albert Lee about 9 years ago. Updated about 9 years ago.

Status:
Resolved
Priority:
Low
Category:
-
Start date:
2010-08-26
Due date:
% Done:

100%

Estimated time:
8.00 h
Difficulty:
Tags:

Description

The proposed changes encapsulate CR 6932599 and CR 6932622. The webrev (c. onnv_140) for the changes is at: http://cr.opensolaris.org/~trisk/usb_as/
I don't have hardware to test with the current gate yet.

6932599: usb_as should support arbitrary sample rates

Certain USB audio devices do not work with the usb_as driver because they have invalid format descriptors or descriptors with different sample rates.
For example, the Logitech Quickcam for Notebooks Pro (046d:08c3) has:
AudioStream_Interface: format_type Descriptor {
bSamFreqType = 0x1
bSamFreqs = 0x0
... = 0x0 0x0
}
...
AudioStream_Interface: format_type Descriptor {
bSamFreqType = 0x1
bSamFreqs = 0x0
... = 0x0 0x0
}
...
AudioStream_Interface: format_type Descriptor {
bSamFreqType = 0x1
bSamFreqs = 0x80
... = 0x3e 0x0
}
Only the last descriptor is usable, but usb_as fails to find a valid rate because it has a fixed list of supported sample rates and removes rates which don't appear in every format descriptor, which in this case eliminates all rates.
It should instead create a list of rates reported by the format descriptors and invalidate format descriptors with no valid sample rates.
Other OSes appear to ignore format cs descriptors which have all-zero rates.
There also exist many USB audio class devices which have > 48kHz sample rates and 24-bit resolution, so a fixed sample rate table is not optimal.

6932622: usb_ac/usb_as format selection makes a number of assumptions

usb_ac and usb_as assume that devices' alternate format descriptors have the same channel counts, sample rates, and precision/resolution.
usb_as stores a single channel count and sample rate list and usb_ac reports the maximum channel count, sample rate, and precision to the engine when these values may not all be supported by a single actual format.
usb_ac should instead select an actual format based on priority.

History

#1

Updated by Albert Lee about 9 years ago

  • Status changed from New to Closed
  • % Done changed from 80 to 100

Resolved by changeset 969b97e84bdc

#2

Updated by Garrett D'Amore about 9 years ago

  • Status changed from Closed to Resolved

We don't mark things "closed" yet. This happens only after we have some kind of official build released. So for now, "resolved" is as far as it can go.

Also available in: Atom PDF