From patchwork Sun Mar 12 22:28:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ruslan Bilovol X-Patchwork-Id: 68588 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp900928wrd; Sun, 12 Mar 2023 15:35:47 -0700 (PDT) X-Google-Smtp-Source: AK7set+s1hHg622+/uozUcdvPDiEq+FWixBDj48suHXZHem6iIDfgX3Hjc5EJ8FURPrf7NxpNAps X-Received: by 2002:a17:90b:4c8d:b0:234:ad7b:a87c with SMTP id my13-20020a17090b4c8d00b00234ad7ba87cmr31782324pjb.38.1678660547033; Sun, 12 Mar 2023 15:35:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678660547; cv=none; d=google.com; s=arc-20160816; b=pWEzRtD5GJsQDweCt9BjxQ4pXu8W7oO/3fES/5YUA2YMDfBzsERTB+AZcJ5ttUtAMD /0Sv67B8HQdLDTBVC8N8rMkn5BkeOGGfbWLEatd7aAnN82f7gkBVlCWO26zdC8Zj7KE/ 0xUzGbsiz/p9wYgS8049ylczWm2JEl3BFJUQni6w3sAiucgg/qOBLIXczNGrsqp3FlNm aMbCnrj0bKgxOymDv8FTgFh8EFAHwzueCaTnscVhjMvL+wtgOGcdosn4+kddbfLeHd7z Xw5iYCnMJw6mHuorG2pmENkpQAVOWOMNXAwcm/VpTjpOE2Ziu3CHsdiNIlsJ1MyfCam7 d+lQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=0Bm8357knKBz2M26Sj/9hOvriOOgO862bSiwrgatoRU=; b=Fgegyv4s5PVN3FAvxzJiw8fM52goZ8hAyfYMpcBUrur4Y/Lxs3ronkp8rbXuxszccX WYMZsU2DojvEVE5Y7okoOAOr+HBt8FLA3J82Rn+gsuT3h5xhIkV33+gz2LtGnfk6jd3A UykRSgFqgGincyhRITMEkg6kd1Pq40dlpN/CmYpIc5m4wWR3E6XUkBX7kmFX1t6ARdl7 YARSpeKU34MHM8H87nxuoN2e0Ry3wzf7r/rwe5OqZq/VzjUZtCpPX2Z7OvQ9dtkvN6rM 536jXugSn2vTcOfvATgg0eV0N7mmjc0PVq388Le/z7ynuDm19Vkz6zFoM/Q/r+zjYzfM d3Vg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=SdNC01Qv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d21-20020a17090ab31500b0023b48c6b4f7si3188165pjr.64.2023.03.12.15.35.31; Sun, 12 Mar 2023 15:35:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=SdNC01Qv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230274AbjCLW3D (ORCPT + 99 others); Sun, 12 Mar 2023 18:29:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49156 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229783AbjCLW3A (ORCPT ); Sun, 12 Mar 2023 18:29:00 -0400 Received: from mail-qv1-xf35.google.com (mail-qv1-xf35.google.com [IPv6:2607:f8b0:4864:20::f35]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EC2092529D for ; Sun, 12 Mar 2023 15:28:59 -0700 (PDT) Received: by mail-qv1-xf35.google.com with SMTP id ks17so7200614qvb.6 for ; Sun, 12 Mar 2023 15:28:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678660139; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=0Bm8357knKBz2M26Sj/9hOvriOOgO862bSiwrgatoRU=; b=SdNC01QvISkfUd6mLyOxMYpMiwmohWX04EGJAd2LdJQUqBvKn34hqgFX+/kqLRhr2T ea3DWFMAUIW33aTPAVp+t40D5y6yzgqvmlsx8qqIm05cq6ZcUEw4s1CFCDNLbEKT1QDr 1UvQEoIbGif4Ihb7LEMu1rsdXDjcXWSMwDZM/kZr540WMJJNTQbDaV+L1qyRU4mDSDd4 zUJFcGPoZhoLfvTIZdZHLHsWnQlNBzRieoZJLYUeW7a1BpU2HREPgf91DdiAitWw4+lh minpXg+W/qbA7aA+WI5J984ZcNd7izX31GEkq9ucaVs5eYDEPB0JWfT3vT9B2nG+J27O +qog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678660139; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=0Bm8357knKBz2M26Sj/9hOvriOOgO862bSiwrgatoRU=; b=E0By7oA06H/39X6p2CXNF8q7rSiewATOJUTPLqaPVsni0fJrwEvbA4hqXIbfepMVwI dsJHLZoyRjO4lUBN/8K4a94lbKBtWSI5cSd24s0QV/hXcsbdi4aogZIihPqUlcKHdkMM dCiKiMTqDisMWly+ZlPhjEH8MwTR7GfShB1BZ1mG4nGz9OyZb7OCtKI0iPQBsAzd7ovT dcdFmTd6KPOvWn4ei22DEzObQv3+yrfJMRxKzHC8ZDwSNW1a6WzBnKGEe40Nn4KLNIev Gw6FHBVfNyGtHYodE6fVzHKfGRfuA+/U/QBdVgJLxf/rkbXC01inVhwTng1WYP5pvTCc yGdA== X-Gm-Message-State: AO0yUKW3VKsXjOTYfJZkgHv84kzviAq1kNfOJI8pFO3/b8RUcvodsG/4 oalE5zN+Wtdu/qC24H7VbFg= X-Received: by 2002:a05:6214:1bc7:b0:57f:5ab1:a42b with SMTP id m7-20020a0562141bc700b0057f5ab1a42bmr11877192qvc.32.1678660138951; Sun, 12 Mar 2023 15:28:58 -0700 (PDT) Received: from localhost ([72.138.97.66]) by smtp.gmail.com with ESMTPSA id r200-20020a3744d1000000b0074305413c73sm4183807qka.95.2023.03.12.15.28.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Mar 2023 15:28:58 -0700 (PDT) From: Ruslan Bilovol To: perex@perex.cz, tiwai@suse.com Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: [PATCH] sound: usb: remove Wireless USB dead code Date: Sun, 12 Mar 2023 18:28:57 -0400 Message-Id: <20230312222857.296623-1-ruslan.bilovol@gmail.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760203161769866777?= X-GMAIL-MSGID: =?utf-8?q?1760203161769866777?= 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 --- sound/usb/card.c | 1 - sound/usb/endpoint.c | 16 +--------------- sound/usb/helper.c | 1 - 3 files changed, 1 insertion(+), 17 deletions(-) diff --git a/sound/usb/card.c b/sound/usb/card.c index 26268ffb8274..f6e99ced8068 100644 --- a/sound/usb/card.c +++ b/sound/usb/card.c @@ -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; diff --git a/sound/usb/endpoint.c b/sound/usb/endpoint.c index 419302e2057e..1e0af1179ca8 100644 --- a/sound/usb/endpoint.c +++ b/sound/usb/endpoint.c @@ -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; diff --git a/sound/usb/helper.c b/sound/usb/helper.c index a4410267bf70..bf80e55d013a 100644 --- a/sound/usb/helper.c +++ b/sound/usb/helper.c @@ -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 &&