From patchwork Mon Sep 6 12:55:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 507478 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CFB21C433FE for ; Mon, 6 Sep 2021 12:58:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B8E0661076 for ; Mon, 6 Sep 2021 12:58:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243151AbhIFM7d (ORCPT ); Mon, 6 Sep 2021 08:59:33 -0400 Received: from mail.kernel.org ([198.145.29.99]:34516 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243147AbhIFM7F (ORCPT ); Mon, 6 Sep 2021 08:59:05 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 05BEC60F45; Mon, 6 Sep 2021 12:57:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1630933080; bh=mic5qVkF7Rr8iez1JKtmdhalvP13xxT+ZtxRZJcYobM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZqUr9s4n80osvAKQ6L2Kg8LZ/nsRwc0+jap8FO5eNjB134lv09jK89giQIGS2EA5M HhoN6vnzXDM7wLrdceSLerTga55qiMXMymzvnZ6rLp/+FpIJ5DC+/BZbmB+RQ3KOY0 T70VU+9lLGI3bOX4H7h5XviSXmnKgbXogF8O/+yg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Takashi Iwai Subject: [PATCH 5.13 21/24] ALSA: usb-audio: Fix regression on Sony WALKMAN NW-A45 DAC Date: Mon, 6 Sep 2021 14:55:50 +0200 Message-Id: <20210906125449.809396204@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210906125449.112564040@linuxfoundation.org> References: <20210906125449.112564040@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Takashi Iwai commit 7af5a14371c1cf94a41f08eabb62a3faceec8911 upstream. We've got a regression report for USB-audio with Sony WALKMAN NW-A45 DAC device where no sound is audible on recent kernel. The bisection resulted in the code change wrt endpoint management, and the further debug session revealed that it was caused by the order of the USB audio interface. In the earlier code, we always set up the USB interface at first before other setups, but it was changed to be done at the last for UAC2/3, which is more standard way, while keeping the old way for UAC1. OTOH, this device seems requiring the setup of the interface at first just like UAC1. This patch works around the regression by applying the interface setup specifically for the WALKMAN at the beginning of the endpoint setup procedure. This change is written straightforwardly to be easily backported in old kernels. A further cleanup to move the workaround into a generic quirk section will follow in a later patch. Fixes: bf6313a0ff76 ("ALSA: usb-audio: Refactor endpoint management") Cc: BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=214105 Link: https://lore.kernel.org/r/20210824054700.8236-1-tiwai@suse.de Signed-off-by: Takashi Iwai Signed-off-by: Greg Kroah-Hartman --- sound/usb/endpoint.c | 5 +++++ 1 file changed, 5 insertions(+) --- a/sound/usb/endpoint.c +++ b/sound/usb/endpoint.c @@ -1286,6 +1286,11 @@ int snd_usb_endpoint_configure(struct sn * to be set up before parameter setups */ iface_first = ep->cur_audiofmt->protocol == UAC_VERSION_1; + /* Workaround for Sony WALKMAN NW-A45 DAC; + * it requires the interface setup at first like UAC1 + */ + if (chip->usb_id == USB_ID(0x054c, 0x0b8c)) + iface_first = true; if (iface_first) { err = endpoint_set_interface(chip, ep, true); if (err < 0)