aboutsummaryrefslogtreecommitdiffstats
path: root/sound/usb/mixer.c
diff options
context:
space:
mode:
authorDaniel Mack <daniel@caiaq.de>2010-06-16 11:57:28 -0400
committerTakashi Iwai <tiwai@suse.de>2010-06-23 10:09:26 -0400
commit69da9bcb98ccbfb5d5f751bc13418f1307332925 (patch)
tree4ba6ac91c576c0dcfabd31e78e8538e21c471cfe /sound/usb/mixer.c
parentf22aa94908352f40fce65b9a9180370fb09ecbe9 (diff)
ALSA: usb-audio: unify UAC macros and struct names
Get rid of the last occurances of _v1 suffixes, and move the version number right after the "uac" string. Now things are consitent again. Sorry for the forth and back, but it just looks much nicer this way. Signed-off-by: Daniel Mack <daniel@caiaq.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/mixer.c')
-rw-r--r--sound/usb/mixer.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c
index 736d134cc03c..ba54eb6bb0c9 100644
--- a/sound/usb/mixer.c
+++ b/sound/usb/mixer.c
@@ -582,9 +582,9 @@ static int get_term_name(struct mixer_build *state, struct usb_audio_term *iterm
582 switch (iterm->type >> 16) { 582 switch (iterm->type >> 16) {
583 case UAC_SELECTOR_UNIT: 583 case UAC_SELECTOR_UNIT:
584 strcpy(name, "Selector"); return 8; 584 strcpy(name, "Selector"); return 8;
585 case UAC_PROCESSING_UNIT_V1: 585 case UAC1_PROCESSING_UNIT:
586 strcpy(name, "Process Unit"); return 12; 586 strcpy(name, "Process Unit"); return 12;
587 case UAC_EXTENSION_UNIT_V1: 587 case UAC1_EXTENSION_UNIT:
588 strcpy(name, "Ext Unit"); return 8; 588 strcpy(name, "Ext Unit"); return 8;
589 case UAC_MIXER_UNIT: 589 case UAC_MIXER_UNIT:
590 strcpy(name, "Mixer"); return 5; 590 strcpy(name, "Mixer"); return 5;
@@ -672,8 +672,8 @@ static int check_input_term(struct mixer_build *state, int id, struct usb_audio_
672 term->name = uac_selector_unit_iSelector(d); 672 term->name = uac_selector_unit_iSelector(d);
673 return 0; 673 return 0;
674 } 674 }
675 case UAC_PROCESSING_UNIT_V1: 675 case UAC1_PROCESSING_UNIT:
676 case UAC_EXTENSION_UNIT_V1: { 676 case UAC1_EXTENSION_UNIT: {
677 struct uac_processing_unit_descriptor *d = p1; 677 struct uac_processing_unit_descriptor *d = p1;
678 if (d->bNrInPins) { 678 if (d->bNrInPins) {
679 id = d->baSourceID[0]; 679 id = d->baSourceID[0];
@@ -1855,13 +1855,13 @@ static int parse_audio_unit(struct mixer_build *state, int unitid)
1855 return parse_audio_selector_unit(state, unitid, p1); 1855 return parse_audio_selector_unit(state, unitid, p1);
1856 case UAC_FEATURE_UNIT: 1856 case UAC_FEATURE_UNIT:
1857 return parse_audio_feature_unit(state, unitid, p1); 1857 return parse_audio_feature_unit(state, unitid, p1);
1858 case UAC_PROCESSING_UNIT_V1: 1858 case UAC1_PROCESSING_UNIT:
1859 /* UAC2_EFFECT_UNIT has the same value */ 1859 /* UAC2_EFFECT_UNIT has the same value */
1860 if (state->mixer->protocol == UAC_VERSION_1) 1860 if (state->mixer->protocol == UAC_VERSION_1)
1861 return parse_audio_processing_unit(state, unitid, p1); 1861 return parse_audio_processing_unit(state, unitid, p1);
1862 else 1862 else
1863 return 0; /* FIXME - effect units not implemented yet */ 1863 return 0; /* FIXME - effect units not implemented yet */
1864 case UAC_EXTENSION_UNIT_V1: 1864 case UAC1_EXTENSION_UNIT:
1865 /* UAC2_PROCESSING_UNIT_V2 has the same value */ 1865 /* UAC2_PROCESSING_UNIT_V2 has the same value */
1866 if (state->mixer->protocol == UAC_VERSION_1) 1866 if (state->mixer->protocol == UAC_VERSION_1)
1867 return parse_audio_extension_unit(state, unitid, p1); 1867 return parse_audio_extension_unit(state, unitid, p1);
@@ -1925,7 +1925,7 @@ static int snd_usb_mixer_controls(struct usb_mixer_interface *mixer)
1925 p = NULL; 1925 p = NULL;
1926 while ((p = snd_usb_find_csint_desc(hostif->extra, hostif->extralen, p, UAC_OUTPUT_TERMINAL)) != NULL) { 1926 while ((p = snd_usb_find_csint_desc(hostif->extra, hostif->extralen, p, UAC_OUTPUT_TERMINAL)) != NULL) {
1927 if (mixer->protocol == UAC_VERSION_1) { 1927 if (mixer->protocol == UAC_VERSION_1) {
1928 struct uac_output_terminal_descriptor_v1 *desc = p; 1928 struct uac1_output_terminal_descriptor *desc = p;
1929 1929
1930 if (desc->bLength < sizeof(*desc)) 1930 if (desc->bLength < sizeof(*desc))
1931 continue; /* invalid descriptor? */ 1931 continue; /* invalid descriptor? */