Skip to content

Commit

Permalink
ALSA: usb-audio: Add quirk for Microsoft Modern Wireless Headset
Browse files Browse the repository at this point in the history
[ Upstream commit 3da4350 ]

Microsoft Modern Wireless Headset (appearing on the host as "Microsoft
USB Link") has a playback and a capture mixer volume/switch, but they
are fairly broken.  The descriptor reports wrong dB ranges for
playback, and the capture volume/switch don't influence on the actual
recording at all.  Moreover, there seem instabilities in the
connection, and at best, we should disable the runtime PM.

So this ended up with a quirk entry for:
- Correct the playback dB range;
  I picked up some reasonable values but it's a guess work
- Disable the capture mixer;
  it's completely useless and confuses PA/PW
- Suppress get-sample-rate, apply the delay for message handling,
  and suppress the auto-suspend

The behavior of the wheel control on the headset is somehow flaky,
too, but it's an issue of HID.

Link: https://bugzilla.suse.com/show_bug.cgi?id=1207129
Link: https://lore.kernel.org/r/20230725092057.15115-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
tiwai authored and gregkh committed Sep 13, 2023
1 parent 9c12633 commit eb54ad1
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
14 changes: 14 additions & 0 deletions sound/usb/mixer_maps.c
Expand Up @@ -374,6 +374,15 @@ static const struct usbmix_name_map corsair_virtuoso_map[] = {
{ 0 }
};

/* Microsoft USB Link headset */
/* a guess work: raw playback volume values are from 2 to 129 */
static const struct usbmix_dB_map ms_usb_link_dB = { -3225, 0, true };
static const struct usbmix_name_map ms_usb_link_map[] = {
{ 9, NULL, .dB = &ms_usb_link_dB },
{ 10, NULL }, /* Headset Capture volume; seems non-working, disabled */
{ 0 } /* terminator */
};

/* ASUS ROG Zenith II with Realtek ALC1220-VB */
static const struct usbmix_name_map asus_zenith_ii_map[] = {
{ 19, NULL, 12 }, /* FU, Input Gain Pad - broken response, disabled */
Expand Down Expand Up @@ -668,6 +677,11 @@ static const struct usbmix_ctl_map usbmix_ctl_maps[] = {
.id = USB_ID(0x1395, 0x0025),
.map = sennheiser_pc8_map,
},
{
/* Microsoft USB Link headset */
.id = USB_ID(0x045e, 0x083c),
.map = ms_usb_link_map,
},
{ 0 } /* terminator */
};

Expand Down
3 changes: 3 additions & 0 deletions sound/usb/quirks.c
Expand Up @@ -2011,6 +2011,9 @@ static const struct usb_audio_quirk_flags_table quirk_flags_table[] = {
QUIRK_FLAG_IGNORE_CTL_ERROR),
DEVICE_FLG(0x041e, 0x4080, /* Creative Live Cam VF0610 */
QUIRK_FLAG_GET_SAMPLE_RATE),
DEVICE_FLG(0x045e, 0x083c, /* MS USB Link headset */
QUIRK_FLAG_GET_SAMPLE_RATE | QUIRK_FLAG_CTL_MSG_DELAY |
QUIRK_FLAG_DISABLE_AUTOSUSPEND),
DEVICE_FLG(0x046d, 0x084c, /* Logitech ConferenceCam Connect */
QUIRK_FLAG_GET_SAMPLE_RATE | QUIRK_FLAG_CTL_MSG_DELAY_1M),
DEVICE_FLG(0x046d, 0x0991, /* Logitech QuickCam Pro */
Expand Down

0 comments on commit eb54ad1

Please sign in to comment.