Skip to content

Commit

Permalink
Backport fixes for Denon PMA-50. See https://discourse.osmc.tv/t/kern…
Browse files Browse the repository at this point in the history
…el-needs-patch-for-my-usb-dac/54982

Signed-off-by: Sam Nazarko <email@samnazarko.co.uk>
  • Loading branch information
samnazarko committed Mar 10, 2018
1 parent 8f679ac commit 86ff82a
Showing 1 changed file with 24 additions and 21 deletions.
45 changes: 24 additions & 21 deletions sound/usb/quirks.c
Expand Up @@ -1127,33 +1127,36 @@ void snd_usb_set_interface_quirk(struct usb_device *dev)
* "Playback Design" products need a 50ms delay after setting the
* USB interface.
*/
if (le16_to_cpu(dev->descriptor.idVendor) == 0x23ba)
mdelay(50);
switch (le16_to_cpu(dev->descriptor.idVendor)) {
case 0x23ba: /* Playback Design */
case 0x0644: /* TEAC Corp. */
mdelay(50);
}
}

void snd_usb_ctl_msg_quirk(struct usb_device *dev, unsigned int pipe,
__u8 request, __u8 requesttype, __u16 value,
__u16 index, void *data, __u16 size)
{
/*
* "Playback Design" products need a 20ms delay after each
* class compliant request
*/
if ((le16_to_cpu(dev->descriptor.idVendor) == 0x23ba) &&
(requesttype & USB_TYPE_MASK) == USB_TYPE_CLASS)
mdelay(20);

/* Marantz/Denon devices with USB DAC functionality need a delay
* after each class compliant request
*/
if ((le16_to_cpu(dev->descriptor.idVendor) == 0x154e) &&
(requesttype & USB_TYPE_MASK) == USB_TYPE_CLASS) {

switch (le16_to_cpu(dev->descriptor.idProduct)) {
case 0x3005: /* Marantz HD-DAC1 */
case 0x3006: /* Marantz SA-14S1 */
mdelay(20);
break;
if ((requesttype & USB_TYPE_MASK) == USB_TYPE_CLASS) {
switch (le16_to_cpu(dev->descriptor.idVendor)) {
/*
* "Playback Design"/"TEAC Corp." products need a 20ms delay after each
* class compliant request
*/
case 0x23ba: /* "Playback Design" */
case 0x0644: /* TEAC Corp. */
mdelay(20);
return;

/* Zoom R16/24 needs a tiny delay here, otherwise requests like
* get/set frequency return as failed despite actually succeeding.
*/
case 0x1686:
/* restrict to 0x00dd */
if (le16_to_cpu(dev->descriptor.idProduct) == 0x00dd)
mdelay(1);
return;
}
}
}
Expand Down

0 comments on commit 86ff82a

Please sign in to comment.