diff options
author | Clemens Ladisch <clemens@ladisch.de> | 2005-04-22 09:49:52 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2005-05-29 04:05:11 -0400 |
commit | 8e062ec7108f8a91149e6bccddc3b7341e406274 (patch) | |
tree | da052b40bcc2cbc7480a9999360f20c2a63c640d /sound/usb/usbmixer_maps.c | |
parent | 08fe15899df9696a6d34abf96230ae0691f5de66 (diff) |
[ALSA] usb-audio - add selector unit names override for Audigy 2 NX
USB generic driver
Add a mechanism to specify source names of selector units,
and add such names for the SB Audigy 2 NX.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Diffstat (limited to 'sound/usb/usbmixer_maps.c')
-rw-r--r-- | sound/usb/usbmixer_maps.c | 54 |
1 files changed, 49 insertions, 5 deletions
diff --git a/sound/usb/usbmixer_maps.c b/sound/usb/usbmixer_maps.c index 4918a1854223..adb0abb3ee85 100644 --- a/sound/usb/usbmixer_maps.c +++ b/sound/usb/usbmixer_maps.c | |||
@@ -26,10 +26,17 @@ struct usbmix_name_map { | |||
26 | int control; | 26 | int control; |
27 | }; | 27 | }; |
28 | 28 | ||
29 | struct usbmix_selector_map { | ||
30 | int id; | ||
31 | int count; | ||
32 | const char **names; | ||
33 | }; | ||
34 | |||
29 | struct usbmix_ctl_map { | 35 | struct usbmix_ctl_map { |
30 | int vendor; | 36 | int vendor; |
31 | int product; | 37 | int product; |
32 | const struct usbmix_name_map *map; | 38 | const struct usbmix_name_map *map; |
39 | const struct usbmix_selector_map *selector_map; | ||
33 | int ignore_ctl_error; | 40 | int ignore_ctl_error; |
34 | }; | 41 | }; |
35 | 42 | ||
@@ -162,6 +169,25 @@ static struct usbmix_name_map audigy2nx_map[] = { | |||
162 | { 0 } /* terminator */ | 169 | { 0 } /* terminator */ |
163 | }; | 170 | }; |
164 | 171 | ||
172 | static struct usbmix_selector_map audigy2nx_selectors[] = { | ||
173 | { | ||
174 | .id = 14, /* Capture Source */ | ||
175 | .count = 3, | ||
176 | .names = (const char*[]) {"Line", "Digital In", "What-U-Hear"} | ||
177 | }, | ||
178 | { | ||
179 | .id = 29, /* Digital Out Source */ | ||
180 | .count = 3, | ||
181 | .names = (const char*[]) {"Front", "PCM", "Digital In"} | ||
182 | }, | ||
183 | { | ||
184 | .id = 31, /* Headphone Source */ | ||
185 | .count = 2, | ||
186 | .names = (const char*[]) {"Front", "Side"} | ||
187 | }, | ||
188 | { 0 } /* terminator */ | ||
189 | }; | ||
190 | |||
165 | /* LineX FM Transmitter entry - needed to bypass controls bug */ | 191 | /* LineX FM Transmitter entry - needed to bypass controls bug */ |
166 | static struct usbmix_name_map linex_map[] = { | 192 | static struct usbmix_name_map linex_map[] = { |
167 | /* 1: IT pcm */ | 193 | /* 1: IT pcm */ |
@@ -198,11 +224,29 @@ static struct usbmix_name_map justlink_map[] = { | |||
198 | */ | 224 | */ |
199 | 225 | ||
200 | static struct usbmix_ctl_map usbmix_ctl_maps[] = { | 226 | static struct usbmix_ctl_map usbmix_ctl_maps[] = { |
201 | { 0x41e, 0x3000, extigy_map, 1 }, | 227 | { |
202 | { 0x41e, 0x3010, mp3plus_map, 0 }, | 228 | .vendor = 0x41e, .product = 0x3000, |
203 | { 0x41e, 0x3020, audigy2nx_map, 0 }, | 229 | .map = extigy_map, |
204 | { 0x8bb, 0x2702, linex_map, 1 }, | 230 | .ignore_ctl_error = 1, |
205 | { 0xc45, 0x1158, justlink_map, 0 }, | 231 | }, |
232 | { | ||
233 | .vendor = 0x41e, .product = 0x3010, | ||
234 | .map = mp3plus_map, | ||
235 | }, | ||
236 | { | ||
237 | .vendor = 0x41e, .product = 0x3020, | ||
238 | .map = audigy2nx_map, | ||
239 | .selector_map = audigy2nx_selectors, | ||
240 | }, | ||
241 | { | ||
242 | .vendor = 0x8bb, .product = 0x2702, | ||
243 | .map = linex_map, | ||
244 | .ignore_ctl_error = 1, | ||
245 | }, | ||
246 | { | ||
247 | .vendor = 0xc45, .product = 0x1158, | ||
248 | .map = justlink_map, | ||
249 | }, | ||
206 | { 0 } /* terminator */ | 250 | { 0 } /* terminator */ |
207 | }; | 251 | }; |
208 | 252 | ||