diff options
| author | Yao-Wen Mao <yaowen@google.com> | 2015-07-29 03:13:54 -0400 |
|---|---|---|
| committer | Takashi Iwai <tiwai@suse.de> | 2015-07-29 03:28:02 -0400 |
| commit | 2d1cb7f658fb9c3ba8f9dab8aca297d4dfdec835 (patch) | |
| tree | 9c9d0f3332ec29a18e261b34c97d2af576523afd | |
| parent | 3a05d12f46cb95a6a685114819363a56e6170996 (diff) | |
ALSA: usb-audio: add dB range mapping for some devices
Add the correct dB ranges of Bose Companion 5 and Drangonfly DAC 1.2.
Signed-off-by: Yao-Wen Mao <yaowen@google.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
| -rw-r--r-- | sound/usb/mixer_maps.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/sound/usb/mixer_maps.c b/sound/usb/mixer_maps.c index e5000da9e9d7..6a803eff87f7 100644 --- a/sound/usb/mixer_maps.c +++ b/sound/usb/mixer_maps.c | |||
| @@ -341,6 +341,20 @@ static const struct usbmix_name_map scms_usb3318_map[] = { | |||
| 341 | { 0 } | 341 | { 0 } |
| 342 | }; | 342 | }; |
| 343 | 343 | ||
| 344 | /* Bose companion 5, the dB conversion factor is 16 instead of 256 */ | ||
| 345 | static struct usbmix_dB_map bose_companion5_dB = {-5006, -6}; | ||
| 346 | static struct usbmix_name_map bose_companion5_map[] = { | ||
| 347 | { 3, NULL, .dB = &bose_companion5_dB }, | ||
| 348 | { 0 } /* terminator */ | ||
| 349 | }; | ||
| 350 | |||
| 351 | /* Dragonfly DAC 1.2, the dB conversion factor is 1 instead of 256 */ | ||
| 352 | static struct usbmix_dB_map dragonfly_1_2_dB = {0, 5000}; | ||
| 353 | static struct usbmix_name_map dragonfly_1_2_map[] = { | ||
| 354 | { 7, NULL, .dB = &dragonfly_1_2_dB }, | ||
| 355 | { 0 } /* terminator */ | ||
| 356 | }; | ||
| 357 | |||
| 344 | /* | 358 | /* |
| 345 | * Control map entries | 359 | * Control map entries |
| 346 | */ | 360 | */ |
| @@ -451,6 +465,16 @@ static struct usbmix_ctl_map usbmix_ctl_maps[] = { | |||
| 451 | .id = USB_ID(0x25c4, 0x0003), | 465 | .id = USB_ID(0x25c4, 0x0003), |
| 452 | .map = scms_usb3318_map, | 466 | .map = scms_usb3318_map, |
| 453 | }, | 467 | }, |
| 468 | { | ||
| 469 | /* Bose Companion 5 */ | ||
| 470 | .id = USB_ID(0x05a7, 0x1020), | ||
| 471 | .map = bose_companion5_map, | ||
| 472 | }, | ||
| 473 | { | ||
| 474 | /* Dragonfly DAC 1.2 */ | ||
| 475 | .id = USB_ID(0x21b4, 0x0081), | ||
| 476 | .map = dragonfly_1_2_map, | ||
| 477 | }, | ||
| 454 | { 0 } /* terminator */ | 478 | { 0 } /* terminator */ |
| 455 | }; | 479 | }; |
| 456 | 480 | ||
