Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 5594EC433F5 for ; Mon, 29 Nov 2021 08:37:35 +0000 (UTC) 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 7A13616F6; Mon, 29 Nov 2021 09:36:43 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 7A13616F6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1638175053; bh=BXYa6Ujyc6cwgNmQV4+N6MKGLOCqTPrI2QwIRjnnGBA=; h=Date:From:To:Subject:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=rEunpg8iPbNHpTxRNtDdUOM61FOmAqrNvZCVINT1aJKGTB2F++X1iiulM5W6JACb5 crmJlS9F0XOfbelRr2Il28AI/fqRrezCINcgt6/b8ogGbHXs7D+VPC6oXnEaYilTVD UC28qjmSSY1h+K8Oh0LBUNWIi/GqZfcVblTl61wo= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id F36DFF80217; Mon, 29 Nov 2021 09:36:42 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 448C6F80240; Mon, 29 Nov 2021 09:36:38 +0100 (CET) Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id C3AF9F80084 for ; Mon, 29 Nov 2021 09:36:30 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz C3AF9F80084 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="S1gJwyeP"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="bTSBReqg" Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id 972B31FCA1; Mon, 29 Nov 2021 08:36:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1638174989; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=b9kj66XkklaOVznUwG3LAOELKDW2yyHtE2uvX40sIQc=; b=S1gJwyePJgPy/xBPtPhbJVUWI9II7zvcM41SNaOXpzx0nW2Ab0KE2liaw5xqSIgyi8Bxvb W77L72r2vSpzktcfChEhsQTMOVjDXiR1m35XWSMH/VMhE1DgDuYwFUqMhaHWgC5pFQZ/hl e7VMHRxu5vr3hjPhVqrrd3DAaAyh+h0= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1638174989; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=b9kj66XkklaOVznUwG3LAOELKDW2yyHtE2uvX40sIQc=; b=bTSBReqgiKKEFtEjKIRBGOInv3ZqG0FXgoPlQ3NtVCMugo/Dq6Yi3XofH2xqMxIamKOw3x yvKmow7Y37eUehAg== Received: from alsa1.suse.de (alsa1.suse.de [10.160.4.42]) by relay2.suse.de (Postfix) with ESMTP id 8413FA3B81; Mon, 29 Nov 2021 08:36:29 +0000 (UTC) Date: Mon, 29 Nov 2021 09:36:29 +0100 Message-ID: From: Takashi Iwai To: Vitaly Rodionov Subject: Re: [PATCH] ALSA: hda/cs8409: Set PMSG_ON earlier inside cs8409 driver In-Reply-To: <20211128115558.71683-1-vitalyr@opensource.cirrus.com> References: <20211128115558.71683-1-vitalyr@opensource.cirrus.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: Stefan Binding , Lucas Tanure , patches@opensource.cirrus.com, alsa-devel@alsa-project.org, Takashi Iwai , linux-kernel@vger.kernel.org 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 Sun, 28 Nov 2021 12:55:58 +0100, Vitaly Rodionov wrote: > > From: Stefan Binding > > For cs8409, it is required to run Jack Detect on resume. > Jack Detect on cs8409+cs42l42 requires an interrupt from > cs42l42 to be sent to cs8409 which is propogated to the driver > via an unsolicited event. > However, the hda_codec drops unsolicited events if the power_state > is not set to PMSG_ON. Which is set at the end of the resume call. > This means there is a race condition between setting power_state > to PMSG_ON and receiving the interrupt. > To solve this, we can add an API to set the power_state earlier > and call that before we start Jack Detect. > This does not cause issues, since we know inside our driver that > we are already initialized, and ready to handle the unsolicited > events. > > Signed-off-by: Stefan Binding > Signed-off-by: Vitaly Rodionov Applied now with a minor coding style fix (and addition of Cc-to-stable). thanks, Takashi