diff options
author | Takashi Iwai <tiwai@suse.de> | 2014-11-20 15:46:04 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2014-11-20 15:46:04 -0500 |
commit | a69862d8d04e4877965cc938140c9f8e6da0b827 (patch) | |
tree | 667cace5c2fad872871e4d24d0c895664f0e0bc6 /sound/usb | |
parent | 0f32fd1900e6b972f289416dbd75e92772b630cb (diff) | |
parent | 01cb156edbbd4e6c4fd8db0d05f18c62c424f9aa (diff) |
Merge branch 'for-linus' into test/usb-resume
Diffstat (limited to 'sound/usb')
-rw-r--r-- | sound/usb/mixer.c | 7 | ||||
-rw-r--r-- | sound/usb/mixer_quirks.c | 10 | ||||
-rw-r--r-- | sound/usb/quirks.c | 14 |
3 files changed, 26 insertions, 5 deletions
diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c index 14e1455ca9de..c6209ce5a430 100644 --- a/sound/usb/mixer.c +++ b/sound/usb/mixer.c | |||
@@ -2032,10 +2032,11 @@ static int parse_audio_selector_unit(struct mixer_build *state, int unitid, | |||
2032 | cval->res = 1; | 2032 | cval->res = 1; |
2033 | cval->initialized = 1; | 2033 | cval->initialized = 1; |
2034 | 2034 | ||
2035 | if (desc->bDescriptorSubtype == UAC2_CLOCK_SELECTOR) | 2035 | if (state->mixer->protocol == UAC_VERSION_1) |
2036 | cval->control = UAC2_CX_CLOCK_SELECTOR; | ||
2037 | else | ||
2038 | cval->control = 0; | 2036 | cval->control = 0; |
2037 | else /* UAC_VERSION_2 */ | ||
2038 | cval->control = (desc->bDescriptorSubtype == UAC2_CLOCK_SELECTOR) ? | ||
2039 | UAC2_CX_CLOCK_SELECTOR : UAC2_SU_SELECTOR; | ||
2039 | 2040 | ||
2040 | namelist = kmalloc(sizeof(char *) * desc->bNrInPins, GFP_KERNEL); | 2041 | namelist = kmalloc(sizeof(char *) * desc->bNrInPins, GFP_KERNEL); |
2041 | if (!namelist) { | 2042 | if (!namelist) { |
diff --git a/sound/usb/mixer_quirks.c b/sound/usb/mixer_quirks.c index 7b9331a17026..8b55c0667f60 100644 --- a/sound/usb/mixer_quirks.c +++ b/sound/usb/mixer_quirks.c | |||
@@ -702,10 +702,10 @@ static int snd_nativeinstruments_control_get(struct snd_kcontrol *kcontrol, | |||
702 | if (mixer->chip->shutdown) | 702 | if (mixer->chip->shutdown) |
703 | ret = -ENODEV; | 703 | ret = -ENODEV; |
704 | else | 704 | else |
705 | ret = usb_control_msg(dev, usb_rcvctrlpipe(dev, 0), bRequest, | 705 | ret = snd_usb_ctl_msg(dev, usb_rcvctrlpipe(dev, 0), bRequest, |
706 | USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_IN, | 706 | USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_IN, |
707 | 0, wIndex, | 707 | 0, wIndex, |
708 | &tmp, sizeof(tmp), 1000); | 708 | &tmp, sizeof(tmp)); |
709 | up_read(&mixer->chip->shutdown_rwsem); | 709 | up_read(&mixer->chip->shutdown_rwsem); |
710 | 710 | ||
711 | if (ret < 0) { | 711 | if (ret < 0) { |
@@ -981,6 +981,11 @@ static int snd_ftu_eff_switch_put(struct snd_kcontrol *kctl, | |||
981 | return changed; | 981 | return changed; |
982 | } | 982 | } |
983 | 983 | ||
984 | static void kctl_private_value_free(struct snd_kcontrol *kctl) | ||
985 | { | ||
986 | kfree((void *)kctl->private_value); | ||
987 | } | ||
988 | |||
984 | static int snd_ftu_create_effect_switch(struct usb_mixer_interface *mixer, | 989 | static int snd_ftu_create_effect_switch(struct usb_mixer_interface *mixer, |
985 | int validx, int bUnitID) | 990 | int validx, int bUnitID) |
986 | { | 991 | { |
@@ -1015,6 +1020,7 @@ static int snd_ftu_create_effect_switch(struct usb_mixer_interface *mixer, | |||
1015 | return -ENOMEM; | 1020 | return -ENOMEM; |
1016 | } | 1021 | } |
1017 | 1022 | ||
1023 | kctl->private_free = kctl_private_value_free; | ||
1018 | err = snd_ctl_add(mixer->chip->card, kctl); | 1024 | err = snd_ctl_add(mixer->chip->card, kctl); |
1019 | if (err < 0) | 1025 | if (err < 0) |
1020 | return err; | 1026 | return err; |
diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c index 809d7fab4633..2c1018e447b1 100644 --- a/sound/usb/quirks.c +++ b/sound/usb/quirks.c | |||
@@ -1155,6 +1155,20 @@ void snd_usb_ctl_msg_quirk(struct usb_device *dev, unsigned int pipe, | |||
1155 | if ((le16_to_cpu(dev->descriptor.idVendor) == 0x23ba) && | 1155 | if ((le16_to_cpu(dev->descriptor.idVendor) == 0x23ba) && |
1156 | (requesttype & USB_TYPE_MASK) == USB_TYPE_CLASS) | 1156 | (requesttype & USB_TYPE_MASK) == USB_TYPE_CLASS) |
1157 | mdelay(20); | 1157 | mdelay(20); |
1158 | |||
1159 | /* Marantz/Denon devices with USB DAC functionality need a delay | ||
1160 | * after each class compliant request | ||
1161 | */ | ||
1162 | if ((le16_to_cpu(dev->descriptor.idVendor) == 0x154e) && | ||
1163 | (requesttype & USB_TYPE_MASK) == USB_TYPE_CLASS) { | ||
1164 | |||
1165 | switch (le16_to_cpu(dev->descriptor.idProduct)) { | ||
1166 | case 0x3005: /* Marantz HD-DAC1 */ | ||
1167 | case 0x3006: /* Marantz SA-14S1 */ | ||
1168 | mdelay(20); | ||
1169 | break; | ||
1170 | } | ||
1171 | } | ||
1158 | } | 1172 | } |
1159 | 1173 | ||
1160 | /* | 1174 | /* |