Răsfoiți Sursa

ALSA: usb - Quirk to disable master volume control in PCM2702

Disable the master volume control in the PCM2702 chipset.

The datasheet documents two independent channel volume controls, one
master mute control and one master volume control. All controls are
fully functional except for the master volume control, which returns
USB stalls on all GET requests.

Signed-off-by: Javier Kohen <jkohen@users.sourceforge.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Javier Kohen 15 ani în urmă
părinte
comite
0c3cee57ef
1 a modificat fișierele cu 9 adăugiri și 0 ștergeri
  1. 9 0
      sound/usb/usbmixer.c

+ 9 - 0
sound/usb/usbmixer.c

@@ -1071,6 +1071,15 @@ static int parse_audio_feature_unit(struct mixer_build *state, int unitid, unsig
 	channels = (ftr[0] - 7) / csize - 1;
 	channels = (ftr[0] - 7) / csize - 1;
 
 
 	master_bits = snd_usb_combine_bytes(ftr + 6, csize);
 	master_bits = snd_usb_combine_bytes(ftr + 6, csize);
+	/* master configuration quirks */
+	switch (state->chip->usb_id) {
+	case USB_ID(0x08bb, 0x2702):
+		snd_printk(KERN_INFO
+			   "usbmixer: master volume quirk for PCM2702 chip\n");
+		/* disable non-functional volume control */
+		master_bits &= ~(1 << (USB_FEATURE_VOLUME - 1));
+		break;
+	}
 	if (channels > 0)
 	if (channels > 0)
 		first_ch_bits = snd_usb_combine_bytes(ftr + 6 + csize, csize);
 		first_ch_bits = snd_usb_combine_bytes(ftr + 6 + csize, csize);
 	else
 	else