diff options
author | Clemens Ladisch <clemens@ladisch.de> | 2005-05-02 02:51:26 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2005-05-29 04:05:47 -0400 |
commit | 27d10f5664c7650af3b2ffadfefaf19b36dc7bd8 (patch) | |
tree | b89c8d639041f460557bf6e9078c7cee7426cd2b /sound/usb/usbmixer_maps.c | |
parent | b259b10c420a59a2fdbcf5a3498253ebcbdffa1e (diff) |
[ALSA] usb-audio - cache vendor/product IDs
USB generic driver
Cache the decoded values of idVendor/idProduct to get rid of most of
those ugly le16_to_cpu() calls.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Diffstat (limited to 'sound/usb/usbmixer_maps.c')
-rw-r--r-- | sound/usb/usbmixer_maps.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/sound/usb/usbmixer_maps.c b/sound/usb/usbmixer_maps.c index adb0abb3ee85..f05500b05ec0 100644 --- a/sound/usb/usbmixer_maps.c +++ b/sound/usb/usbmixer_maps.c | |||
@@ -33,8 +33,7 @@ struct usbmix_selector_map { | |||
33 | }; | 33 | }; |
34 | 34 | ||
35 | struct usbmix_ctl_map { | 35 | struct usbmix_ctl_map { |
36 | int vendor; | 36 | u32 id; |
37 | int product; | ||
38 | const struct usbmix_name_map *map; | 37 | const struct usbmix_name_map *map; |
39 | const struct usbmix_selector_map *selector_map; | 38 | const struct usbmix_selector_map *selector_map; |
40 | int ignore_ctl_error; | 39 | int ignore_ctl_error; |
@@ -225,26 +224,26 @@ static struct usbmix_name_map justlink_map[] = { | |||
225 | 224 | ||
226 | static struct usbmix_ctl_map usbmix_ctl_maps[] = { | 225 | static struct usbmix_ctl_map usbmix_ctl_maps[] = { |
227 | { | 226 | { |
228 | .vendor = 0x41e, .product = 0x3000, | 227 | .id = USB_ID(0x041e, 0x3000), |
229 | .map = extigy_map, | 228 | .map = extigy_map, |
230 | .ignore_ctl_error = 1, | 229 | .ignore_ctl_error = 1, |
231 | }, | 230 | }, |
232 | { | 231 | { |
233 | .vendor = 0x41e, .product = 0x3010, | 232 | .id = USB_ID(0x041e, 0x3010), |
234 | .map = mp3plus_map, | 233 | .map = mp3plus_map, |
235 | }, | 234 | }, |
236 | { | 235 | { |
237 | .vendor = 0x41e, .product = 0x3020, | 236 | .id = USB_ID(0x041e, 0x3020), |
238 | .map = audigy2nx_map, | 237 | .map = audigy2nx_map, |
239 | .selector_map = audigy2nx_selectors, | 238 | .selector_map = audigy2nx_selectors, |
240 | }, | 239 | }, |
241 | { | 240 | { |
242 | .vendor = 0x8bb, .product = 0x2702, | 241 | .id = USB_ID(0x08bb, 0x2702), |
243 | .map = linex_map, | 242 | .map = linex_map, |
244 | .ignore_ctl_error = 1, | 243 | .ignore_ctl_error = 1, |
245 | }, | 244 | }, |
246 | { | 245 | { |
247 | .vendor = 0xc45, .product = 0x1158, | 246 | .id = USB_ID(0x0c45, 0x1158), |
248 | .map = justlink_map, | 247 | .map = justlink_map, |
249 | }, | 248 | }, |
250 | { 0 } /* terminator */ | 249 | { 0 } /* terminator */ |