Commit 5dd360ebd8328affb22225141cece3a29403b965

Authored by Daniel Mack
Committed by Takashi Iwai
1 parent a6a3325913

include/linux/usb/audio-v2.h: add more UAC2 details

Also, remove the 'bmControl' field from uac_clock_selector_descriptor,
which was at the wrong offset. This struct is currently unused.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>

Showing 1 changed file with 20 additions and 1 deletions Side-by-side Diff

include/linux/usb/audio-v2.h
... ... @@ -41,6 +41,13 @@
41 41 __u8 iClockSource;
42 42 } __attribute__((packed));
43 43  
  44 +/* bmAttribute fields */
  45 +#define UAC_CLOCK_SOURCE_TYPE_EXT 0x0
  46 +#define UAC_CLOCK_SOURCE_TYPE_INT_FIXED 0x1
  47 +#define UAC_CLOCK_SOURCE_TYPE_INT_VAR 0x2
  48 +#define UAC_CLOCK_SOURCE_TYPE_INT_PROG 0x3
  49 +#define UAC_CLOCK_SOURCE_SYNCED_TO_SOF (1 << 2)
  50 +
44 51 /* 4.7.2.2 Clock Source Descriptor */
45 52  
46 53 struct uac_clock_selector_descriptor {
47 54  
... ... @@ -49,8 +56,20 @@
49 56 __u8 bDescriptorSubtype;
50 57 __u8 bClockID;
51 58 __u8 bNrInPins;
52   - __u8 bmControls;
53 59 __u8 baCSourceID[];
  60 + /* bmControls, bAssocTerminal and iClockSource omitted */
  61 +} __attribute__((packed));
  62 +
  63 +/* 4.7.2.3 Clock Multiplier Descriptor */
  64 +
  65 +struct uac_clock_multiplier_descriptor {
  66 + __u8 bLength;
  67 + __u8 bDescriptorType;
  68 + __u8 bDescriptorSubtype;
  69 + __u8 bClockID;
  70 + __u8 bCSourceID;
  71 + __u8 bmControls;
  72 + __u8 iClockMultiplier;
54 73 } __attribute__((packed));
55 74  
56 75 /* 4.7.2.4 Input terminal descriptor */