diff options
Diffstat (limited to 'sound/usb/mixer.c')
-rw-r--r-- | sound/usb/mixer.c | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c index 675a4f1b5de..09e59345bb6 100644 --- a/sound/usb/mixer.c +++ b/sound/usb/mixer.c | |||
@@ -2075,8 +2075,9 @@ static void snd_usb_mixer_interrupt(struct urb *urb) | |||
2075 | { | 2075 | { |
2076 | struct usb_mixer_interface *mixer = urb->context; | 2076 | struct usb_mixer_interface *mixer = urb->context; |
2077 | int len = urb->actual_length; | 2077 | int len = urb->actual_length; |
2078 | int ustatus = urb->status; | ||
2078 | 2079 | ||
2079 | if (urb->status != 0) | 2080 | if (ustatus != 0) |
2080 | goto requeue; | 2081 | goto requeue; |
2081 | 2082 | ||
2082 | if (mixer->protocol == UAC_VERSION_1) { | 2083 | if (mixer->protocol == UAC_VERSION_1) { |
@@ -2117,12 +2118,32 @@ static void snd_usb_mixer_interrupt(struct urb *urb) | |||
2117 | } | 2118 | } |
2118 | 2119 | ||
2119 | requeue: | 2120 | requeue: |
2120 | if (urb->status != -ENOENT && urb->status != -ECONNRESET) { | 2121 | if (ustatus != -ENOENT && ustatus != -ECONNRESET && ustatus != -ESHUTDOWN) { |
2121 | urb->dev = mixer->chip->dev; | 2122 | urb->dev = mixer->chip->dev; |
2122 | usb_submit_urb(urb, GFP_ATOMIC); | 2123 | usb_submit_urb(urb, GFP_ATOMIC); |
2123 | } | 2124 | } |
2124 | } | 2125 | } |
2125 | 2126 | ||
2127 | /* stop any bus activity of a mixer */ | ||
2128 | void snd_usb_mixer_inactivate(struct usb_mixer_interface *mixer) | ||
2129 | { | ||
2130 | usb_kill_urb(mixer->urb); | ||
2131 | usb_kill_urb(mixer->rc_urb); | ||
2132 | } | ||
2133 | |||
2134 | int snd_usb_mixer_activate(struct usb_mixer_interface *mixer) | ||
2135 | { | ||
2136 | int err; | ||
2137 | |||
2138 | if (mixer->urb) { | ||
2139 | err = usb_submit_urb(mixer->urb, GFP_NOIO); | ||
2140 | if (err < 0) | ||
2141 | return err; | ||
2142 | } | ||
2143 | |||
2144 | return 0; | ||
2145 | } | ||
2146 | |||
2126 | /* create the handler for the optional status interrupt endpoint */ | 2147 | /* create the handler for the optional status interrupt endpoint */ |
2127 | static int snd_usb_mixer_status_create(struct usb_mixer_interface *mixer) | 2148 | static int snd_usb_mixer_status_create(struct usb_mixer_interface *mixer) |
2128 | { | 2149 | { |