aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/sound/usb/quirks.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/usb/quirks.c')
-rw-r--r--sound/usb/quirks.c50
1 files changed, 32 insertions, 18 deletions
diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c
index 848a4cc25bed..bca0179a0ef8 100644
--- a/sound/usb/quirks.c
+++ b/sound/usb/quirks.c
@@ -1458,6 +1458,30 @@ static void set_format_emu_quirk(struct snd_usb_substream *subs,
subs->pkt_offset_adj = (emu_samplerate_id >= EMU_QUIRK_SR_176400HZ) ? 4 : 0;
}
+
+/*
+ * Pioneer DJ DJM-900NXS2
+ * Device needs to know the sample rate each time substream is started
+ */
+static int pioneer_djm_set_format_quirk(struct snd_usb_substream *subs)
+{
+
+ /* Convert sample rate value to little endian */
+ u8 sr[3];
+
+ sr[0] = subs->cur_rate & 0xff;
+ sr[1] = (subs->cur_rate >> 8) & 0xff;
+ sr[2] = (subs->cur_rate >> 16) & 0xff;
+
+ /* Configure device */
+ usb_set_interface(subs->dev, 0, 1);
+ snd_usb_ctl_msg(subs->stream->chip->dev,
+ usb_rcvctrlpipe(subs->stream->chip->dev, 0),
+ 0x01, 0x22, 0x0100, 0x0082, &sr, 0x0003);
+
+ return 0;
+}
+
void snd_usb_set_format_quirk(struct snd_usb_substream *subs,
struct audioformat *fmt)
{
@@ -1468,6 +1492,9 @@ void snd_usb_set_format_quirk(struct snd_usb_substream *subs,
case USB_ID(0x041e, 0x3f19): /* E-Mu 0204 USB */
set_format_emu_quirk(subs, fmt);
break;
+ case USB_ID(0x2b73, 0x000a): /* Pioneer DJ DJM-900NXS2 */
+ pioneer_djm_set_format_quirk(subs);
+ break;
}
}
@@ -1636,13 +1663,14 @@ void snd_usb_ctl_msg_quirk(struct usb_device *dev, unsigned int pipe,
&& (requesttype & USB_TYPE_MASK) == USB_TYPE_CLASS)
msleep(20);
- /* Zoom R16/24, Logitech H650e, Jabra 550a needs a tiny delay here,
- * otherwise requests like get/set frequency return as failed despite
- * actually succeeding.
+ /* Zoom R16/24, Logitech H650e, Jabra 550a, Kingston HyperX needs a tiny
+ * delay here, otherwise requests like get/set frequency return as
+ * failed despite actually succeeding.
*/
if ((chip->usb_id == USB_ID(0x1686, 0x00dd) ||
chip->usb_id == USB_ID(0x046d, 0x0a46) ||
- chip->usb_id == USB_ID(0x0b0e, 0x0349)) &&
+ chip->usb_id == USB_ID(0x0b0e, 0x0349) ||
+ chip->usb_id == USB_ID(0x0951, 0x16ad)) &&
(requesttype & USB_TYPE_MASK) == USB_TYPE_CLASS)
usleep_range(1000, 2000);
}
@@ -1806,20 +1834,6 @@ void snd_usb_audioformat_attributes_quirk(struct snd_usb_audio *chip,
*/
fp->attributes &= ~UAC_EP_CS_ATTR_FILL_MAX;
break;
- case USB_ID(0x1235, 0x8200): /* Focusrite Scarlett 2i4 2nd gen */
- case USB_ID(0x1235, 0x8202): /* Focusrite Scarlett 2i2 2nd gen */
- case USB_ID(0x1235, 0x8205): /* Focusrite Scarlett Solo 2nd gen */
- /*
- * Reports that playback should use Synch: Synchronous
- * while still providing a feedback endpoint.
- * Synchronous causes snapping on some sample rates.
- * Force it to use Synch: Asynchronous.
- */
- if (stream == SNDRV_PCM_STREAM_PLAYBACK) {
- fp->ep_attr &= ~USB_ENDPOINT_SYNCTYPE;
- fp->ep_attr |= USB_ENDPOINT_SYNC_ASYNC;
- }
- break;
}
}