diff options
author | Clemens Ladisch <clemens@ladisch.de> | 2005-07-25 14:19:10 (GMT) |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2005-07-28 10:22:41 (GMT) |
commit | 854af9578cb84e4ca3cb1551a6be40c4e81bb455 (patch) | |
tree | fb09d01b0499451e258a71e9a05246c1e08ea301 /sound/usb/usbaudio.h | |
parent | f38275fe994c333b809796230f4f98090f8d919b (diff) | |
download | linux-854af9578cb84e4ca3cb1551a6be40c4e81bb455.tar.xz |
[ALSA] usb-audio - change quirk type handling
USB generic driver
Make the quirk type an enum instead of a #defined integer, and use a
table for the quirk constructor functions instead of a big switch
statement.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Diffstat (limited to 'sound/usb/usbaudio.h')
-rw-r--r-- | sound/usb/usbaudio.h | 35 |
1 files changed, 19 insertions, 16 deletions
diff --git a/sound/usb/usbaudio.h b/sound/usb/usbaudio.h index c1415f4..ad9eab2 100644 --- a/sound/usb/usbaudio.h +++ b/sound/usb/usbaudio.h @@ -153,21 +153,24 @@ struct snd_usb_audio { #define QUIRK_NO_INTERFACE -2 #define QUIRK_ANY_INTERFACE -1 -/* quirk type */ -#define QUIRK_MIDI_FIXED_ENDPOINT 0 -#define QUIRK_MIDI_YAMAHA 1 -#define QUIRK_MIDI_MIDIMAN 2 -#define QUIRK_COMPOSITE 3 -#define QUIRK_AUDIO_FIXED_ENDPOINT 4 -#define QUIRK_AUDIO_STANDARD_INTERFACE 5 -#define QUIRK_MIDI_STANDARD_INTERFACE 6 -#define QUIRK_AUDIO_EDIROL_UA700_UA25 7 -#define QUIRK_AUDIO_EDIROL_UA1000 8 -#define QUIRK_IGNORE_INTERFACE 9 -#define QUIRK_MIDI_NOVATION 10 -#define QUIRK_MIDI_RAW 11 -#define QUIRK_MIDI_EMAGIC 12 -#define QUIRK_MIDI_MIDITECH 13 +enum quirk_type { + QUIRK_IGNORE_INTERFACE, + QUIRK_COMPOSITE, + QUIRK_MIDI_STANDARD_INTERFACE, + QUIRK_MIDI_FIXED_ENDPOINT, + QUIRK_MIDI_YAMAHA, + QUIRK_MIDI_MIDIMAN, + QUIRK_MIDI_NOVATION, + QUIRK_MIDI_RAW, + QUIRK_MIDI_EMAGIC, + QUIRK_MIDI_MIDITECH, + QUIRK_AUDIO_STANDARD_INTERFACE, + QUIRK_AUDIO_FIXED_ENDPOINT, + QUIRK_AUDIO_EDIROL_UA700_UA25, + QUIRK_AUDIO_EDIROL_UA1000, + + QUIRK_TYPE_COUNT +}; typedef struct snd_usb_audio_quirk snd_usb_audio_quirk_t; typedef struct snd_usb_midi_endpoint_info snd_usb_midi_endpoint_info_t; @@ -176,7 +179,7 @@ struct snd_usb_audio_quirk { const char *vendor_name; const char *product_name; int16_t ifnum; - int16_t type; + uint16_t type; const void *data; }; |