Skip to content

Commit

Permalink
ALSA: usb-audio: Add a quirk for Plantronics Gamecom 780
Browse files Browse the repository at this point in the history
Plantronics Gamecom 780 headset has a firmware problem, and when the
FU 0x09 volume is changed, it results in either too loud or silence
except for a very narrow range.  This patch provides a workaround,
ignoring the node, initialize the volume in a sane value and keep
untouched.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=65251
Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
Takashi Iwai committed Dec 20, 2013
1 parent 0f4881d commit 19570d7
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
10 changes: 10 additions & 0 deletions sound/usb/mixer_maps.c
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,12 @@ static struct usbmix_name_map hercules_usb51_map[] = {
{ 0 } /* terminator */
};

/* Plantronics Gamecom 780 has a broken volume control, better to disable it */
static struct usbmix_name_map gamecom780_map[] = {
{ 9, NULL }, /* FU, speaker out */
{}
};

/*
* Control map entries
*/
Expand Down Expand Up @@ -358,6 +364,10 @@ static struct usbmix_ctl_map usbmix_ctl_maps[] = {
.id = USB_ID(0x046d, 0x09a4),
.ignore_ctl_error = 1,
},
{ /* Plantronics GameCom 780 */
.id = USB_ID(0x047f, 0xc010),
.map = gamecom780_map,
},
{
/* Hercules DJ Console (Windows Edition) */
.id = USB_ID(0x06f8, 0xb000),
Expand Down
14 changes: 14 additions & 0 deletions sound/usb/quirks.c
Original file line number Diff line number Diff line change
Expand Up @@ -660,6 +660,18 @@ static int snd_usb_cm6206_boot_quirk(struct usb_device *dev)
return err;
}

/* quirk for Plantronics GameCom 780 with CM6302 chip */
static int snd_usb_gamecon780_boot_quirk(struct usb_device *dev)
{
/* set the initial volume and don't change; other values are either
* too loud or silent due to firmware bug (bko#65251)
*/
u8 buf[2] = { 0x74, 0xdc };
return snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), UAC_SET_CUR,
USB_RECIP_INTERFACE | USB_TYPE_CLASS | USB_DIR_OUT,
UAC_FU_VOLUME << 8, 9 << 8, buf, 2);
}

/*
* Novation Twitch DJ controller
*/
Expand Down Expand Up @@ -986,6 +998,8 @@ int snd_usb_apply_boot_quirk(struct usb_device *dev,
return snd_usb_nativeinstruments_boot_quirk(dev);
case USB_ID(0x0763, 0x2012): /* M-Audio Fast Track Pro USB */
return snd_usb_fasttrackpro_boot_quirk(dev);
case USB_ID(0x047f, 0xc010): /* Plantronics Gamecom 780 */
return snd_usb_gamecon780_boot_quirk(dev);
}

return 0;
Expand Down

0 comments on commit 19570d7

Please sign in to comment.