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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9606DC433EF for ; Mon, 29 Nov 2021 08:38:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349060AbhK2Il4 (ORCPT ); Mon, 29 Nov 2021 03:41:56 -0500 Received: from smtp-out2.suse.de ([195.135.220.29]:50258 "EHLO smtp-out2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244039AbhK2Ijr (ORCPT ); Mon, 29 Nov 2021 03:39:47 -0500 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 Cc: Takashi Iwai , Jaroslav Kysela , Stefan Binding , Lucas Tanure , , , 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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