diff options
author | Daniel Mack <daniel@caiaq.de> | 2010-02-22 23:49:10 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2010-02-23 08:40:20 +0100 |
commit | 8fee4aff8c89c229593b76a6ab172a9cad24b412 (patch) | |
tree | fa04320ed558000ee0e131808e14698ddd4fe3ce /sound/usb/usbmixer.c | |
parent | 28e1b773083d349d5223f586a39fa30f5d0f1c36 (diff) | |
download | linux-3.10-8fee4aff8c89c229593b76a6ab172a9cad24b412.tar.gz linux-3.10-8fee4aff8c89c229593b76a6ab172a9cad24b412.tar.bz2 linux-3.10-8fee4aff8c89c229593b76a6ab172a9cad24b412.zip |
ALSA: usbaudio: introduce new types for audio class v2
This patch adds some definitions for audio class v2.
Unfortunately, the UNIT types PROCESSING_UNIT and EXTENSION_UNIT have
different numerical representations in both standards, so there is need
for a _V1 add-on now. usbmixer.c is changed accordingly.
Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/usbmixer.c')
-rw-r--r-- | sound/usb/usbmixer.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sound/usb/usbmixer.c b/sound/usb/usbmixer.c index 11636a6112d..ca794959819 100644 --- a/sound/usb/usbmixer.c +++ b/sound/usb/usbmixer.c @@ -286,7 +286,7 @@ static void *find_audio_control_unit(struct mixer_build *state, unsigned char un p = NULL; while ((p = snd_usb_find_desc(state->buffer, state->buflen, p, USB_DT_CS_INTERFACE)) != NULL) { - if (p[0] >= 4 && p[2] >= INPUT_TERMINAL && p[2] <= EXTENSION_UNIT && p[3] == unit) + if (p[0] >= 4 && p[2] >= INPUT_TERMINAL && p[2] <= EXTENSION_UNIT_V1 && p[3] == unit) return p; } return NULL; @@ -607,9 +607,9 @@ static int get_term_name(struct mixer_build *state, struct usb_audio_term *iterm switch (iterm->type >> 16) { case SELECTOR_UNIT: strcpy(name, "Selector"); return 8; - case PROCESSING_UNIT: + case PROCESSING_UNIT_V1: strcpy(name, "Process Unit"); return 12; - case EXTENSION_UNIT: + case EXTENSION_UNIT_V1: strcpy(name, "Ext Unit"); return 8; case MIXER_UNIT: strcpy(name, "Mixer"); return 5; @@ -673,8 +673,8 @@ static int check_input_term(struct mixer_build *state, int id, struct usb_audio_ term->id = id; term->name = p1[9 + p1[0] - 1]; return 0; - case PROCESSING_UNIT: - case EXTENSION_UNIT: + case PROCESSING_UNIT_V1: + case EXTENSION_UNIT_V1: if (p1[6] == 1) { id = p1[7]; break; /* continue to parse */ @@ -1747,9 +1747,9 @@ static int parse_audio_unit(struct mixer_build *state, int unitid) return parse_audio_selector_unit(state, unitid, p1); case FEATURE_UNIT: return parse_audio_feature_unit(state, unitid, p1); - case PROCESSING_UNIT: + case PROCESSING_UNIT_V1: return parse_audio_processing_unit(state, unitid, p1); - case EXTENSION_UNIT: + case EXTENSION_UNIT_V1: return parse_audio_extension_unit(state, unitid, p1); default: snd_printk(KERN_ERR "usbaudio: unit %u: unexpected type 0x%02x\n", unitid, p1[2]); |