diff options
author | Daniel Mack <daniel@caiaq.de> | 2010-05-31 07:35:36 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2010-05-31 12:15:45 -0400 |
commit | dcbe7bcfa32c5bc4f9bb6c75d4d41bb4db8c36fc (patch) | |
tree | 7cadc69ed8c6d3bd8df6f48cd640946b818200d6 /include/linux/usb | |
parent | 67a3e12b05e055c0415c556a315a3d3eb637e29e (diff) |
ALSA: usb-audio: UAC2: clean up parsing of bmaControls
Introduce two new static inline functions for a more readable parsing
of UAC2 bmaControls.
Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'include/linux/usb')
-rw-r--r-- | include/linux/usb/audio-v2.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/usb/audio-v2.h b/include/linux/usb/audio-v2.h index 92f1d99f0f17..8f91be3599c6 100644 --- a/include/linux/usb/audio-v2.h +++ b/include/linux/usb/audio-v2.h | |||
@@ -18,6 +18,16 @@ | |||
18 | /* v1.0 and v2.0 of this standard have many things in common. For the rest | 18 | /* v1.0 and v2.0 of this standard have many things in common. For the rest |
19 | * of the definitions, please refer to audio.h */ | 19 | * of the definitions, please refer to audio.h */ |
20 | 20 | ||
21 | static inline bool uac2_control_is_readable(u32 bmControls, u8 control) | ||
22 | { | ||
23 | return (bmControls >> (control * 2)) & 0x1; | ||
24 | } | ||
25 | |||
26 | static inline bool uac2_control_is_writeable(u32 bmControls, u8 control) | ||
27 | { | ||
28 | return (bmControls >> (control * 2)) & 0x2; | ||
29 | } | ||
30 | |||
21 | /* 4.7.2.1 Clock Source Descriptor */ | 31 | /* 4.7.2.1 Clock Source Descriptor */ |
22 | 32 | ||
23 | struct uac_clock_source_descriptor { | 33 | struct uac_clock_source_descriptor { |