From: Takashi Iwai Subject: Re: [PATCH] sound/usb: add dB range mapping for some devices. Date: Wed, 29 Jul 2015 09:32:33 +0200 Message-ID: References: <1438154034-112595-1-git-send-email-yaowen@google.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id 4FD952654D8 for ; Wed, 29 Jul 2015 09:32:34 +0200 (CEST) In-Reply-To: <1438154034-112595-1-git-send-email-yaowen@google.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: Yao-Wen Mao Cc: alsa-devel@alsa-project.org, dgreid@chromium.org List-Id: alsa-devel@alsa-project.org On Wed, 29 Jul 2015 09:13:54 +0200, Yao-Wen Mao wrote: > > Add the correct dB ranges of Bose Companion 5 and Drangonfly DAC 1.2. > > Signed-off-by: Yao-Wen Mao > --- > sound/usb/mixer_maps.c | 23 +++++++++++++++++++++++ > 1 file changed, 23 insertions(+) > > diff --git a/sound/usb/mixer_maps.c b/sound/usb/mixer_maps.c > index e5000da..f0c9e49 100644 > --- a/sound/usb/mixer_maps.c > +++ b/sound/usb/mixer_maps.c > @@ -339,6 +339,19 @@ static struct usbmix_name_map gamecom780_map[] = { > static const struct usbmix_name_map scms_usb3318_map[] = { > { 10, NULL }, > { 0 } You seem to have dropped some lines here. At the next time, please at least do a build-test before submitting the patch. I applied it now with manual correction. Thanks. Takashi > + > +/* 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 */ > }; > > /* > @@ -451,6 +464,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 */ > }; > > -- > 2.5.0.rc2.392.g76e840b > >