diff options
author | Takashi Iwai <tiwai@suse.de> | 2015-04-13 04:23:18 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2015-04-13 04:23:18 -0400 |
commit | 9a4f35865ffcb2f4603375eadabe0d475fab1a0f (patch) | |
tree | 1465ac717deee029d3a9c1f7235ba85be57feefa /sound/usb | |
parent | eef0342cf32689f77d78ee3302999e5caaa6a8f3 (diff) | |
parent | c30cf8cbe55413cd643a0bdd3442d75950caa918 (diff) |
Merge branch 'for-next' into for-linus
Diffstat (limited to 'sound/usb')
-rw-r--r-- | sound/usb/quirks.c | 40 |
1 files changed, 17 insertions, 23 deletions
diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c index 32631a86078b..7c5a70139278 100644 --- a/sound/usb/quirks.c +++ b/sound/usb/quirks.c | |||
@@ -1126,17 +1126,24 @@ bool snd_usb_get_sample_rate_quirk(struct snd_usb_audio *chip) | |||
1126 | /* Marantz/Denon USB DACs need a vendor cmd to switch | 1126 | /* Marantz/Denon USB DACs need a vendor cmd to switch |
1127 | * between PCM and native DSD mode | 1127 | * between PCM and native DSD mode |
1128 | */ | 1128 | */ |
1129 | static bool is_marantz_denon_dac(unsigned int id) | ||
1130 | { | ||
1131 | switch (id) { | ||
1132 | case USB_ID(0x154e, 0x1003): /* Denon DA-300USB */ | ||
1133 | case USB_ID(0x154e, 0x3005): /* Marantz HD-DAC1 */ | ||
1134 | case USB_ID(0x154e, 0x3006): /* Marantz SA-14S1 */ | ||
1135 | return true; | ||
1136 | } | ||
1137 | return false; | ||
1138 | } | ||
1139 | |||
1129 | int snd_usb_select_mode_quirk(struct snd_usb_substream *subs, | 1140 | int snd_usb_select_mode_quirk(struct snd_usb_substream *subs, |
1130 | struct audioformat *fmt) | 1141 | struct audioformat *fmt) |
1131 | { | 1142 | { |
1132 | struct usb_device *dev = subs->dev; | 1143 | struct usb_device *dev = subs->dev; |
1133 | int err; | 1144 | int err; |
1134 | 1145 | ||
1135 | switch (subs->stream->chip->usb_id) { | 1146 | if (is_marantz_denon_dac(subs->stream->chip->usb_id)) { |
1136 | case USB_ID(0x154e, 0x1003): /* Denon DA-300USB */ | ||
1137 | case USB_ID(0x154e, 0x3005): /* Marantz HD-DAC1 */ | ||
1138 | case USB_ID(0x154e, 0x3006): /* Marantz SA-14S1 */ | ||
1139 | |||
1140 | /* First switch to alt set 0, otherwise the mode switch cmd | 1147 | /* First switch to alt set 0, otherwise the mode switch cmd |
1141 | * will not be accepted by the DAC | 1148 | * will not be accepted by the DAC |
1142 | */ | 1149 | */ |
@@ -1209,17 +1216,10 @@ void snd_usb_ctl_msg_quirk(struct usb_device *dev, unsigned int pipe, | |||
1209 | /* Marantz/Denon devices with USB DAC functionality need a delay | 1216 | /* Marantz/Denon devices with USB DAC functionality need a delay |
1210 | * after each class compliant request | 1217 | * after each class compliant request |
1211 | */ | 1218 | */ |
1212 | if ((le16_to_cpu(dev->descriptor.idVendor) == 0x154e) && | 1219 | if (is_marantz_denon_dac(USB_ID(le16_to_cpu(dev->descriptor.idVendor), |
1213 | (requesttype & USB_TYPE_MASK) == USB_TYPE_CLASS) { | 1220 | le16_to_cpu(dev->descriptor.idProduct))) |
1214 | 1221 | && (requesttype & USB_TYPE_MASK) == USB_TYPE_CLASS) | |
1215 | switch (le16_to_cpu(dev->descriptor.idProduct)) { | 1222 | mdelay(20); |
1216 | case 0x1003: /* Denon DA300-USB */ | ||
1217 | case 0x3005: /* Marantz HD-DAC1 */ | ||
1218 | case 0x3006: /* Marantz SA-14S1 */ | ||
1219 | mdelay(20); | ||
1220 | break; | ||
1221 | } | ||
1222 | } | ||
1223 | 1223 | ||
1224 | /* Zoom R16/24 needs a tiny delay here, otherwise requests like | 1224 | /* Zoom R16/24 needs a tiny delay here, otherwise requests like |
1225 | * get/set frequency return as failed despite actually succeeding. | 1225 | * get/set frequency return as failed despite actually succeeding. |
@@ -1274,15 +1274,9 @@ u64 snd_usb_interface_dsd_format_quirks(struct snd_usb_audio *chip, | |||
1274 | } | 1274 | } |
1275 | 1275 | ||
1276 | /* Denon/Marantz devices with USB DAC functionality */ | 1276 | /* Denon/Marantz devices with USB DAC functionality */ |
1277 | switch (chip->usb_id) { | 1277 | if (is_marantz_denon_dac(chip->usb_id)) { |
1278 | case USB_ID(0x154e, 0x1003): /* Denon DA300-USB */ | ||
1279 | case USB_ID(0x154e, 0x3005): /* Marantz HD-DAC1 */ | ||
1280 | case USB_ID(0x154e, 0x3006): /* Marantz SA-14S1 */ | ||
1281 | if (fp->altsetting == 2) | 1278 | if (fp->altsetting == 2) |
1282 | return SNDRV_PCM_FMTBIT_DSD_U32_BE; | 1279 | return SNDRV_PCM_FMTBIT_DSD_U32_BE; |
1283 | break; | ||
1284 | default: | ||
1285 | break; | ||
1286 | } | 1280 | } |
1287 | 1281 | ||
1288 | return 0; | 1282 | return 0; |