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=-6.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no 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 6C6EBC433E7 for ; Mon, 12 Oct 2020 11:02:06 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 22BCD208FE for ; Mon, 12 Oct 2020 11:02:03 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="kCkydd9l" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 22BCD208FE Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 5A54D1681; Mon, 12 Oct 2020 13:01:11 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 5A54D1681 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1602500521; bh=1UCU74GByhIjI+Mj+6Ef4CdeU9XMvKl6DzJwVJZaO9o=; h=Date:From:To:Subject:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=kCkydd9l0c9SJ7auyEWe53nKaDcaXVA/pe/sgk4Aggrw+cnVNa6ZJxYBgIjLyRMqy I7gLU5ZfItucBCGLP+UAU1W4C1vhmcb9r/YD5ko4Ob7CisMr1Sc+SqO0JVkOxaOkxC UkDVfepMjsjqux+9UuT46lLfTnzggBaVvIlpb3pQ= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id E0644F8020D; Mon, 12 Oct 2020 13:01:10 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 26D86F800D8; Mon, 12 Oct 2020 13:01:08 +0200 (CEST) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id BDE8CF80141 for ; Mon, 12 Oct 2020 13:01:01 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz BDE8CF80141 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 8101CACA3; Mon, 12 Oct 2020 11:01:01 +0000 (UTC) Date: Mon, 12 Oct 2020 13:01:00 +0200 Message-ID: From: Takashi Iwai To: Kai Vehmanen Subject: Re: [PATCH v2] ALSA: hda: fix jack detection with Realtek codecs when in D3 In-Reply-To: <20201012102704.794423-1-kai.vehmanen@linux.intel.com> References: <20201012102704.794423-1-kai.vehmanen@linux.intel.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 Cc: Kai-Heng Feng , alsa-devel@alsa-project.org, Kailang Yang , pierre-louis.bossart@linux.intel.com X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" On Mon, 12 Oct 2020 12:27:04 +0200, Kai Vehmanen wrote: > > In case HDA controller becomes active, but codec is runtime suspended, > jack detection is not successful and no interrupt is raised. This has > been observed with multiple Realtek codecs and HDA controllers from > different vendors. Bug does not occur if both codec and controller are > active, or both are in suspend. Bug can be easily hit on desktop systems > with no built-in speaker. > > The problem can be fixed by powering up the codec once after every > controller runtime resume. Even if codec goes back to suspend later, the > jack detection will continue to work. Add a flag to 'hda_codec' to > describe codecs that require this flow from the controller driver. > Modify __azx_runtime_resume() to use pm_request_resume() to make the > intent clearer. > > Mark all Realtek codecs with the new forced_resume flag. > > BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=209379 > Cc: Kailang Yang > Co-developed-by: Kai-Heng Feng > Signed-off-by: Kai-Heng Feng > Signed-off-by: Kai Vehmanen This deserves for Cc-to-stable. I applied with it now. Thanks! Takashi