[PATCH 4/4] ALSA: usb-audio: apply quirk for MOONDROP Quark2

Cryolitia PukNgae via B4 Relay posted 4 patches 1 month ago
[PATCH 4/4] ALSA: usb-audio: apply quirk for MOONDROP Quark2
Posted by Cryolitia PukNgae via B4 Relay 1 month ago
From: Cryolitia PukNgae <cryolitia@uniontech.com>

It reports a MIN value -15360 for volume control, but will mute when
setting it less than -14208

Tested-by: Guoli An <anguoli@uniontech.com>
Signed-off-by: Cryolitia PukNgae <cryolitia@uniontech.com>
---
 sound/usb/mixer.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c
index 5fcf1117777d1a1423806ea139a7692eea3c9ee8..34bcbfd8b54e66abc0229eefd354eb7bc4c01576 100644
--- a/sound/usb/mixer.c
+++ b/sound/usb/mixer.c
@@ -1182,6 +1182,13 @@ static void volume_control_quirks(struct usb_mixer_elem_info *cval,
 			cval->res = 1;
 		}
 		break;
+	case USB_ID(0x3302, 0x12db): /* MOONDROP Quark2 */
+		if (!strcmp(kctl->id.name, "PCM Playback Volume")) {
+			usb_audio_info(chip,
+				"set volume quirk for MOONDROP Quark2\n");
+			cval->min = -14208; /* Mute under it */
+		}
+		break;
 	}
 }
 

-- 
2.51.0