Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1604230pxb; Thu, 4 Mar 2021 16:06:22 -0800 (PST) X-Google-Smtp-Source: ABdhPJxHVKA7Qyul08ETt3PJZYrG3jy8W7aeTtP9IlEn96EzDSLKK0VPj8xzStS9mSs2t1imdOkb X-Received: by 2002:a02:3304:: with SMTP id c4mr6840054jae.68.1614902782107; Thu, 04 Mar 2021 16:06:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614902782; cv=none; d=google.com; s=arc-20160816; b=nHwOAA02dU244bTMfBcUjvfKgNZ0MhSH49yccycoZEuaCpLQjc8cjj55xkwneM+N5n zsMfvLVIrjo+QoBE3I+xd/j2xkMF6Qj1DelRhzU1OUejZe8CQxooXyM0BnZnOx6o75ya B3HZK7UItTzs8zKgQf5mLvspjctpa/b7gbZ9RVqJeVh4AkF9K/P3armKnKEDcvn61S3d hT04eMXMx5jSHcamh2bpBtNkw33/6VsJ+uYlgZraYwBFfx319Vnrs5Gt397Qi7ADS8aQ vFi0Lp/zZD2iXjnTeE1t2s99U3aGAg6JgtWM73psO9KCmBmIEBacY4JUitXvxRBeF3bk RMlw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:in-reply-to :subject:cc:to:from:message-id:date; bh=iyrpBH3/BijPuTDOob/c9Oh8X32Q+fEMgw+GynEHMrM=; b=Y/dTc0Rs0If2bPivBIoyjQa7KkwsRjVQ97godb65oyRykCl5X/ixJ1vEUjKSYQnnpw dcQrtdIWwY6JOZjYlxRuA6RvZaxuL/zAqwebHVzHu+yk/+Bwf/wHfzlJLxBzesz3sR4X I1FekQ8SgEIOUZO5lUVJPL/Ap4fBUL5l7Pc4zC1pBWPC8WgtozytuoOYkGKRN2Hb1E6W bM2vphcjxwhOy78O3et+drl6wrHG3lTM+THr6kealEYAlW9QDlZaV4enduIFvd/2fTow 7pjzMh3SOycf3IqjRiGwRYaMxrXdZaRXsQhuhgRbyRXbZndiI7kF7rgMBSMHLHwmSqGq OBsQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x8si837495jao.12.2021.03.04.16.06.08; Thu, 04 Mar 2021 16:06:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236194AbhCDILJ (ORCPT + 99 others); Thu, 4 Mar 2021 03:11:09 -0500 Received: from mx2.suse.de ([195.135.220.15]:56644 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233819AbhCDILD (ORCPT ); Thu, 4 Mar 2021 03:11:03 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 9861EAC1F; Thu, 4 Mar 2021 08:10:22 +0000 (UTC) Date: Thu, 04 Mar 2021 09:10:22 +0100 Message-ID: From: Takashi Iwai To: Kai-Heng Feng Cc: tiwai@suse.com, "moderated list:SOUND" , Olivia Mackintosh , Dylan Robinson , Greg Kroah-Hartman , Chris Wulff , "Gustavo A. R. Silva" , Joakim Tjernlund , Alexander Tsoy , Mark Brown , Joe Perches , Dmitry Panchenko , open list Subject: Re: [PATCH] ALSA: usb-audio: Disable USB autosuspend properly in setup_disable_autosuspend() In-Reply-To: <20210304043419.287191-1-kai.heng.feng@canonical.com> References: <20210304043419.287191-1-kai.heng.feng@canonical.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/25.3 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 04 Mar 2021 05:34:16 +0100, Kai-Heng Feng wrote: > > Rear audio on Lenovo ThinkStation P620 stops working after commit > 1965c4364bdd ("ALSA: usb-audio: Disable autosuspend for Lenovo > ThinkStation P620"): > [ 6.013526] usbcore: registered new interface driver snd-usb-audio > [ 6.023064] usb 3-6: cannot get ctl value: req = 0x81, wValue = 0x100, wIndex = 0x0, type = 1 > [ 6.023083] usb 3-6: cannot get ctl value: req = 0x81, wValue = 0x202, wIndex = 0x0, type = 4 > [ 6.023090] usb 3-6: cannot get ctl value: req = 0x81, wValue = 0x100, wIndex = 0x0, type = 1 > [ 6.023098] usb 3-6: cannot get ctl value: req = 0x81, wValue = 0x202, wIndex = 0x0, type = 4 > [ 6.023103] usb 3-6: cannot get ctl value: req = 0x81, wValue = 0x100, wIndex = 0x0, type = 1 > [ 6.023110] usb 3-6: cannot get ctl value: req = 0x81, wValue = 0x202, wIndex = 0x0, type = 4 > [ 6.045846] usb 3-6: cannot get ctl value: req = 0x81, wValue = 0x100, wIndex = 0x0, type = 1 > [ 6.045866] usb 3-6: cannot get ctl value: req = 0x81, wValue = 0x202, wIndex = 0x0, type = 4 > [ 6.045877] usb 3-6: cannot get ctl value: req = 0x81, wValue = 0x100, wIndex = 0x0, type = 1 > [ 6.045886] usb 3-6: cannot get ctl value: req = 0x81, wValue = 0x202, wIndex = 0x0, type = 4 > [ 6.045894] usb 3-6: cannot get ctl value: req = 0x81, wValue = 0x100, wIndex = 0x0, type = 1 > [ 6.045908] usb 3-6: cannot get ctl value: req = 0x81, wValue = 0x202, wIndex = 0x0, type = 4 > > I overlooked the issue because when I was working on the said commit, > only the front audio is tested. Apology for that. > > Changing supports_autosuspend in driver is too late for disabling > autosuspend, because it was already used by USB probe routine, so it can > break the balance on the following code that depends on > supports_autosuspend. > > Fix it by using usb_disable_autosuspend() helper, and balance the > suspend count in disconnect callback. > > Fixes: 1965c4364bdd ("ALSA: usb-audio: Disable autosuspend for Lenovo ThinkStation P620") > Signed-off-by: Kai-Heng Feng Thanks, applied. Takashi