Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1219077

[PATCH 3.16.y-ckt 016/130] ALSA: usb-audio: add dB range mapping for some devices

From Luis Henriques <luis.henriques@canonical.com>
Newsgroups linux.kernel
Subject [PATCH 3.16.y-ckt 016/130] ALSA: usb-audio: add dB range mapping for some devices
Date 2015-09-04 16:00 +0200
Message-ID <q4ZH7-3Ud-87@gated-at.bofh.it> (permalink)
References <q4YUF-2WE-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


3.16.7-ckt17 -stable review patch.  If anyone has any objections, please let me know.

------------------

From: Yao-Wen Mao <yaowen@google.com>

commit 2d1cb7f658fb9c3ba8f9dab8aca297d4dfdec835 upstream.

Add the correct dB ranges of Bose Companion 5 and Drangonfly DAC 1.2.

Signed-off-by: Yao-Wen Mao <yaowen@google.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
 sound/usb/mixer_maps.c | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/sound/usb/mixer_maps.c b/sound/usb/mixer_maps.c
index b16be3944213..9a3e1076a5b1 100644
--- a/sound/usb/mixer_maps.c
+++ b/sound/usb/mixer_maps.c
@@ -336,6 +336,20 @@ static const struct usbmix_name_map scms_usb3318_map[] = {
 	{ 0 }
 };
 
+/* Bose companion 5, the dB conversion factor is 16 instead of 256 */
+static struct usbmix_dB_map bose_companion5_dB = {-5006, -6};
+static struct usbmix_name_map bose_companion5_map[] = {
+	{ 3, NULL, .dB = &bose_companion5_dB },
+	{ 0 }	/* terminator */
+};
+
+/* Dragonfly DAC 1.2, the dB conversion factor is 1 instead of 256 */
+static struct usbmix_dB_map dragonfly_1_2_dB = {0, 5000};
+static struct usbmix_name_map dragonfly_1_2_map[] = {
+	{ 7, NULL, .dB = &dragonfly_1_2_dB },
+	{ 0 }	/* terminator */
+};
+
 /*
  * Control map entries
  */
@@ -442,6 +456,16 @@ static struct usbmix_ctl_map usbmix_ctl_maps[] = {
 		.id = USB_ID(0x25c4, 0x0003),
 		.map = scms_usb3318_map,
 	},
+	{
+		/* Bose Companion 5 */
+		.id = USB_ID(0x05a7, 0x1020),
+		.map = bose_companion5_map,
+	},
+	{
+		/* Dragonfly DAC 1.2 */
+		.id = USB_ID(0x21b4, 0x0081),
+		.map = dragonfly_1_2_map,
+	},
 	{ 0 } /* terminator */
 };
 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[3.16.y-ckt stable] Linux 3.16.7-ckt17 stable review Luis Henriques <luis.henriques@canonical.com> - 2015-09-04 16:00 +0200
  [PATCH 3.16.y-ckt 006/130] iscsi-target: Fix use-after-free during TPG session shutdown Luis Henriques <luis.henriques@canonical.com> - 2015-09-04 16:00 +0200
  [PATCH 3.16.y-ckt 025/130] netfilter: ctnetlink: put back references to master ct and expect objects Luis Henriques <luis.henriques@canonical.com> - 2015-09-04 16:00 +0200
  [PATCH 3.16.y-ckt 013/130] xfs: remote attribute headers contain an invalid LSN Luis Henriques <luis.henriques@canonical.com> - 2015-09-04 16:00 +0200
  [PATCH 3.16.y-ckt 004/130] ARM: OMAP2+: hwmod: Fix _wait_target_ready() for hwmods without sysc Luis Henriques <luis.henriques@canonical.com> - 2015-09-04 16:00 +0200
  [PATCH 3.16.y-ckt 032/130] net/mlx4_core: Fix wrong index in propagating port change event to VFs Luis Henriques <luis.henriques@canonical.com> - 2015-09-04 16:00 +0200
  [PATCH 3.16.y-ckt 003/130] sysfs: Create mountpoints with sysfs_create_mount_point Luis Henriques <luis.henriques@canonical.com> - 2015-09-04 16:00 +0200
  [PATCH 3.16.y-ckt 005/130] ASoC: pcm1681: Fix setting de-emphasis sampling rate selection Luis Henriques <luis.henriques@canonical.com> - 2015-09-04 16:00 +0200
  [PATCH 3.16.y-ckt 014/130] xfs: remote attributes need to be considered data Luis Henriques <luis.henriques@canonical.com> - 2015-09-04 16:00 +0200
  [PATCH 3.16.y-ckt 026/130] ipvs: do not use random local source address for tunnels Luis Henriques <luis.henriques@canonical.com> - 2015-09-04 16:00 +0200
  [PATCH 3.16.y-ckt 021/130] ipr: Fix incorrect trace indexing Luis Henriques <luis.henriques@canonical.com> - 2015-09-04 16:00 +0200
  [PATCH 3.16.y-ckt 022/130] ipr: Fix invalid array indexing for HRRQ Luis Henriques <luis.henriques@canonical.com> - 2015-09-04 16:00 +0200
  [PATCH 3.16.y-ckt 016/130] ALSA: usb-audio: add dB range mapping for some devices Luis Henriques <luis.henriques@canonical.com> - 2015-09-04 16:00 +0200

csiph-web