aboutsummaryrefslogtreecommitdiffstats
path: root/sound/usb/usbmixer.c
diff options
context:
space:
mode:
authorDaniel Mack <daniel@caiaq.de>2010-03-11 15:13:21 -0500
committerTakashi Iwai <tiwai@suse.de>2010-03-12 06:20:07 -0500
commit45d760567a7d773237b8996584a4ae0440d5e369 (patch)
tree01a57c042733dde1b9488b8739c37b1a54a65a72 /sound/usb/usbmixer.c
parent7e847894039d7590321de306fca2b1ae58662f29 (diff)
ALSA: usb-mixer: use defines from audio.h
No need for the private enum. Signed-off-by: Daniel Mack <daniel@caiaq.de> Cc: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/usbmixer.c')
-rw-r--r--sound/usb/usbmixer.c27
1 files changed, 6 insertions, 21 deletions
diff --git a/sound/usb/usbmixer.c b/sound/usb/usbmixer.c
index 5c0568375941..ab8f0f0b65be 100644
--- a/sound/usb/usbmixer.c
+++ b/sound/usb/usbmixer.c
@@ -136,21 +136,6 @@ struct usb_mixer_elem_info {
136 u8 initialized; 136 u8 initialized;
137}; 137};
138 138
139
140enum {
141 USB_FEATURE_NONE = 0,
142 USB_FEATURE_MUTE = 1,
143 USB_FEATURE_VOLUME,
144 USB_FEATURE_BASS,
145 USB_FEATURE_MID,
146 USB_FEATURE_TREBLE,
147 USB_FEATURE_GEQ,
148 USB_FEATURE_AGC,
149 USB_FEATURE_DELAY,
150 USB_FEATURE_BASSBOOST,
151 USB_FEATURE_LOUDNESS
152};
153
154enum { 139enum {
155 USB_MIXER_BOOLEAN, 140 USB_MIXER_BOOLEAN,
156 USB_MIXER_INV_BOOLEAN, 141 USB_MIXER_INV_BOOLEAN,
@@ -954,7 +939,7 @@ static void build_feature_ctl(struct mixer_build *state, unsigned char *desc,
954 939
955 control++; /* change from zero-based to 1-based value */ 940 control++; /* change from zero-based to 1-based value */
956 941
957 if (control == USB_FEATURE_GEQ) { 942 if (control == UAC_GRAPHIC_EQUALIZER_CONTROL) {
958 /* FIXME: not supported yet */ 943 /* FIXME: not supported yet */
959 return; 944 return;
960 } 945 }
@@ -1001,8 +986,8 @@ static void build_feature_ctl(struct mixer_build *state, unsigned char *desc,
1001 kctl->id.name, sizeof(kctl->id.name)); 986 kctl->id.name, sizeof(kctl->id.name));
1002 987
1003 switch (control) { 988 switch (control) {
1004 case USB_FEATURE_MUTE: 989 case UAC_MUTE_CONTROL:
1005 case USB_FEATURE_VOLUME: 990 case UAC_VOLUME_CONTROL:
1006 /* determine the control name. the rule is: 991 /* determine the control name. the rule is:
1007 * - if a name id is given in descriptor, use it. 992 * - if a name id is given in descriptor, use it.
1008 * - if the connected input can be determined, then use the name 993 * - if the connected input can be determined, then use the name
@@ -1029,9 +1014,9 @@ static void build_feature_ctl(struct mixer_build *state, unsigned char *desc,
1029 len = append_ctl_name(kctl, " Playback"); 1014 len = append_ctl_name(kctl, " Playback");
1030 } 1015 }
1031 } 1016 }
1032 append_ctl_name(kctl, control == USB_FEATURE_MUTE ? 1017 append_ctl_name(kctl, control == UAC_MUTE_CONTROL ?
1033 " Switch" : " Volume"); 1018 " Switch" : " Volume");
1034 if (control == USB_FEATURE_VOLUME) { 1019 if (control == UAC_VOLUME_CONTROL) {
1035 kctl->tlv.c = mixer_vol_tlv; 1020 kctl->tlv.c = mixer_vol_tlv;
1036 kctl->vd[0].access |= 1021 kctl->vd[0].access |=
1037 SNDRV_CTL_ELEM_ACCESS_TLV_READ | 1022 SNDRV_CTL_ELEM_ACCESS_TLV_READ |
@@ -1120,7 +1105,7 @@ static int parse_audio_feature_unit(struct mixer_build *state, int unitid, void
1120 snd_printk(KERN_INFO 1105 snd_printk(KERN_INFO
1121 "usbmixer: master volume quirk for PCM2702 chip\n"); 1106 "usbmixer: master volume quirk for PCM2702 chip\n");
1122 /* disable non-functional volume control */ 1107 /* disable non-functional volume control */
1123 master_bits &= ~(1 << (USB_FEATURE_VOLUME - 1)); 1108 master_bits &= ~UAC_FU_VOLUME;
1124 break; 1109 break;
1125 } 1110 }
1126 if (channels > 0) 1111 if (channels > 0)