ALSA: usb-audio: remove Wireless USB dead code
authorRuslan Bilovol <ruslan.bilovol@gmail.com>
Sun, 12 Mar 2023 22:28:57 +0000 (18:28 -0400)
committerTakashi Iwai <tiwai@suse.de>
Tue, 14 Mar 2023 16:00:57 +0000 (17:00 +0100)
Wireless USB host controller support has been removed
from Linux Kernel more than 3 years ago in commit
caa6772db4c1 ("Staging: remove wusbcore and UWB from the
kernel tree."), and the associated code in the
snd-usb-audio driver became unused and untested.

If in the future somebody will return WUSB/UWB support
back to the kernel, the snd-usb-audio driver will reject
Wireless USB audio devices at probe stage, and this patch
should be reverted.

Signed-off-by: Ruslan Bilovol <ruslan.bilovol@gmail.com>
Link: https://lore.kernel.org/r/20230312222857.296623-1-ruslan.bilovol@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/usb/card.c
sound/usb/endpoint.c
sound/usb/helper.c

index 26268ffb82742116de347782d7717184e811e498..f6e99ced8068cca261fa77c5d8d7200b988c5223 100644 (file)
@@ -609,7 +609,6 @@ static int snd_usb_audio_create(struct usb_interface *intf,
        case USB_SPEED_LOW:
        case USB_SPEED_FULL:
        case USB_SPEED_HIGH:
-       case USB_SPEED_WIRELESS:
        case USB_SPEED_SUPER:
        case USB_SPEED_SUPER_PLUS:
                break;
index 419302e2057e8fbc67c6ee8d940ae9a4876369b2..1e0af1179ca860f11031380687478dcc477b7893 100644 (file)
@@ -1173,22 +1173,8 @@ static int data_ep_set_params(struct snd_usb_endpoint *ep)
         */
        if (usb_pipein(ep->pipe) || ep->implicit_fb_sync) {
 
-               urb_packs = packs_per_ms;
-               /*
-                * Wireless devices can poll at a max rate of once per 4ms.
-                * For dataintervals less than 5, increase the packet count to
-                * allow the host controller to use bursting to fill in the
-                * gaps.
-                */
-               if (snd_usb_get_speed(chip->dev) == USB_SPEED_WIRELESS) {
-                       int interval = ep->datainterval;
-                       while (interval < 5) {
-                               urb_packs <<= 1;
-                               ++interval;
-                       }
-               }
                /* make capture URBs <= 1 ms and smaller than a period */
-               urb_packs = min(max_packs_per_urb, urb_packs);
+               urb_packs = min(max_packs_per_urb, packs_per_ms);
                while (urb_packs > 1 && urb_packs * maxsize >= ep->cur_period_bytes)
                        urb_packs >>= 1;
                ep->nurbs = MAX_URBS;
index a4410267bf70150e0d45c00f5fd28b0b36af368c..bf80e55d013a872b6efba0a3ac4c06bb3cd82c89 100644 (file)
@@ -108,7 +108,6 @@ unsigned char snd_usb_parse_datainterval(struct snd_usb_audio *chip,
 {
        switch (snd_usb_get_speed(chip->dev)) {
        case USB_SPEED_HIGH:
-       case USB_SPEED_WIRELESS:
        case USB_SPEED_SUPER:
        case USB_SPEED_SUPER_PLUS:
                if (get_endpoint(alts, 0)->bInterval >= 1 &&