Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp1936325rwn; Fri, 16 Sep 2022 03:13:12 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6cXwqADYbx9yYnUdotjYsjCqN8hDicuhncxndzaDRDk0kfOWUe0jJCZzMBiVcRPWJFBCjP X-Received: by 2002:a17:906:5d04:b0:722:f46c:b891 with SMTP id g4-20020a1709065d0400b00722f46cb891mr3188495ejt.4.1663323191822; Fri, 16 Sep 2022 03:13:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663323191; cv=none; d=google.com; s=arc-20160816; b=ecxognKf5MTseWq+VUQOeOig9CvM4yDxycIdyHPcj+xhDBq/I+4H5ve3HM11kiIKRP RKJww0sGxWMDuFh2h/0qpqPqN6x638maplQt0r0lh87zWJaOtF0MoIByNZMlvsYxeh8h iW8Kqu3NXwFwcgwcmsfKRAlP0RK5eoEZTKp1FvWXqUdElbTRunvfFoza/gJNLtdsGPr7 LJhvrhhYOQgapfeAh5yhCiToF9rndySv+Z+hcziePftpm+IRZP4ejmyMqOCxzcukUNGC WerufFYfdPH6cIcla2ERuk/RFkayO4AxdpJyi/Y561Q8JFJaLXpggfSTDrUVrQqQ9B88 Tprw== 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:dkim-signature:dkim-signature; bh=Sl129n6/GL6pBr3/vsDhfcCD/Rq1c5ZRbjlVmM9PSEA=; b=st0co8PhFJSfAkTjEpBt3CadJHJthYs2a/0MBfJn1X2QJYFLOGdslqpbQ9zddo2LUv 08yoAcMGBla+llPT2koF/ggFt5kzIzVa0p53jD3kvfj4hHtxdYXHn9YuEo4/kX1jl612 wg2W0rsdrgwF6ksqCMr0aFndbLS9Qymbyn5GRD3qyxuAp+j/6rZGR2UULCZJwAi1TQT4 Qdf3VGaW+Xq9eSdqfmsXC2iT+xjDZEzOFBpGh/i4jM9XzrWkmz6X45+jAYTp0BqcTg6V e09OZkudOm4LPvp5gfBFNUQGFTyKk29qQ6vyCv5qVSh7Y+T78CyCEPYKak4Xze8RoGqS HvHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b="bdJ/UjjV"; dkim=neutral (no key) header.i=@suse.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w13-20020a056402268d00b00448da245f3bsi2309446edd.6.2022.09.16.03.12.44; Fri, 16 Sep 2022 03:13:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b="bdJ/UjjV"; dkim=neutral (no key) header.i=@suse.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230164AbiIPKIM (ORCPT + 99 others); Fri, 16 Sep 2022 06:08:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59848 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230445AbiIPKHx (ORCPT ); Fri, 16 Sep 2022 06:07:53 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A796DAB41B for ; Fri, 16 Sep 2022 03:07:46 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id ACF3D339FB; Fri, 16 Sep 2022 10:07:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1663322864; 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=Sl129n6/GL6pBr3/vsDhfcCD/Rq1c5ZRbjlVmM9PSEA=; b=bdJ/UjjVwUHEZnFdA3GsdsMDbqnJdaa6elztU95rQfMQXZ7lAlXUwwLHq0cv9JAXxv77Yv +zdCM9hqjeXrN/Ne7mhUMEjMybBQ7mGpBDLh1qP1tgU209c0YO01zxV2ew3fGyIAzp5dFn BKlTnHNHXICa6O3vaUfLKGLxWiHzlvI= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1663322864; 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=Sl129n6/GL6pBr3/vsDhfcCD/Rq1c5ZRbjlVmM9PSEA=; b=rRVzmHz/mthfHdD1HLT7NgDQj5I2Ux7ptcwjmCpVpmvpSmPIAohotiKVj8h/8Wwj38RoCT Lis0/84Zdlef8oCw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 33C411332E; Fri, 16 Sep 2022 10:07:44 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 0khZC/BKJGOVagAAMHmgww (envelope-from ); Fri, 16 Sep 2022 10:07:44 +0000 Date: Fri, 16 Sep 2022 12:07:43 +0200 Message-ID: <874jx7vdhs.wl-tiwai@suse.de> From: Takashi Iwai To: Pshou Cc: "linux-kernel@vger.kernel.org" , "Takashi Iwai" , "Arava, Jairaj" , "Nujella, Sathyanarayana" , "Prabhu, Swarna" , "Afzal, Naeem M" , Shui-Wen Hsu , "Perati, RK" , "Mandri, Padmashree" , Kailang Subject: Re: Sarien/Dorset device: After system resumed from suspend, 3.5m jack is still shown as detected when unplugged during suspend In-Reply-To: References: User-Agent: Wanderlust/2.15.9 (Almost Unreal) Emacs/27.2 Mule/6.0 MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 16 Sep 2022 07:34:38 +0200, Pshou wrote: > > > Hi Takashi Iwai: > > Can you help me update this PATCH file? > > Check if ignore unsol events duing system suspend/resume and NVIDIA chip in > hda_codec_unsol_event(). > > Signed-off-by:PeiSen Hou > > Signed-off-by: Jairaj Arava > > diff --git a/sound/pci/hda/hda_bind.c b/sound/pci/hda/hda_bind.c > > index 1a868dd9dc4b..75560ff6eb83 100644 > > --- a/sound/pci/hda/hda_bind.c > > +++ b/sound/pci/hda/hda_bind.c > > @@ -50,7 +50,8 @@ static void hda_codec_unsol_event(struct hdac_device *dev, > unsigned int ev) > > /* ignore unsol events during system suspend/resume */ > > if (codec->core.dev.power.power_state.event != PM_EVENT_ON) > > - return; > > + if (codec->core.vendor_id == PCI_VENDOR_ID_NVIDIA) > > + return; > > if (codec->patch_ops.unsol_event) > > codec->patch_ops.unsol_event(codec, ev); Hmm, this doesn't look safe. We also want to avoid the unsol event handling during the PM state transition, too. So, if any, this should be allowed only at PM_EVENT_SUSPEND or PM_EVENT_HIBERNATE. Also, checking the codec vendor ID here is no good way. We may add a new flag for the special behavior (either allowing the unsol handling or prohibiting). But, from your patch, I don't see any reason *why* this has to be changed in that way. Could you give more backgrounds? thanks, Takashi