From patchwork Thu Jun 13 13:09:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jaroslav Kysela X-Patchwork-Id: 10991791 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 57B1013AF for ; Thu, 13 Jun 2019 13:29:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 43B6D2882C for ; Thu, 13 Jun 2019 13:29:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 37A2C28846; Thu, 13 Jun 2019 13:29:06 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id B507A28913 for ; Thu, 13 Jun 2019 13:29:04 +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 E0295180F; Thu, 13 Jun 2019 15:09:17 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz E0295180F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1560431408; bh=xy4jIRMRFp35NFPOYA/ANDLpfuCpMi2YBC3TBZWisq0=; h=From:To:Date:Cc:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=SCqbF7Jd1RaQkLDSb6KEM5iArYFFmgtxV0QNaIvXk1XkEgcChULTOY9dQM+yx1mg5 9oaZplAoEbeYZJ9uo7mtjAxuNj5zglQnAZ7wcGf7cF+DVQWINgtw1UVduO9V4L24hj gPmUQclp+eVmLj47Y0pRKuhzz2RKn+J9KCFhYblk= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 5703FF896F1; Thu, 13 Jun 2019 15:09:17 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 64A98F89703; Thu, 13 Jun 2019 15:09:15 +0200 (CEST) Received: from mail1.perex.cz (mail1.perex.cz [77.48.224.245]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id B57EAF8076F for ; Thu, 13 Jun 2019 15:09:12 +0200 (CEST) Received: from mail1.perex.cz (localhost [127.0.0.1]) by smtp1.perex.cz (Perex's E-mail Delivery System) with ESMTP id B51C2A003F; Thu, 13 Jun 2019 15:09:11 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.perex.cz B51C2A003F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=perex.cz; s=default; t=1560431351; bh=HqrbTL1nKCHD/JJu8qm3kdltwhbwMZ52IxrXE5iidmw=; h=From:To:Cc:Subject:Date:From; b=WX4+df9QqvfmEoGJfqfnfezLe65974HYVoX0+J4ZVso17P5GkEqb8jz+2R3ds/yih gVL/GC+SGaU6+S0/PA7J66tx5bPnIwVA7EfQvcKWrln4swILiocOju7PSyGRH0t+dp nAX7h12wf1xORZTifuKdDfQdq1/EvrRR6VQj9fzM= Received: from p50.perex-int.cz (unknown [192.168.100.94]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: perex) by mail1.perex.cz (Perex's E-mail Delivery System) with ESMTPSA; Thu, 13 Jun 2019 15:09:08 +0200 (CEST) From: Jaroslav Kysela To: ALSA development Date: Thu, 13 Jun 2019 15:09:01 +0200 Message-Id: <20190613130901.26558-1-perex@perex.cz> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Cc: Takashi Iwai Subject: [alsa-devel] [PATCH] ALSA: hda/hdmi - consider eld_valid also in sync_eld_via_acomp() 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" X-Virus-Scanned: ClamAV using ClamSMTP In the commit 7f641e26a6df9269cb25dd7a4b0a91d6586ed441 (ALSA: hda/hdmi - Consider eld_valid when reporting jack event) the eld_valid check was added for the jack event reports. Do the same in sync_eld_via_acomp() function. Apparently, it is required for the NVIDIA proprietary driver (monitor presence reported first, but ELD is available later). Signed-off-by: Jaroslav Kysela --- sound/pci/hda/patch_hdmi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c index 0c61c05503f5..b522314ec5be 100644 --- a/sound/pci/hda/patch_hdmi.c +++ b/sound/pci/hda/patch_hdmi.c @@ -1627,7 +1627,8 @@ static void sync_eld_via_acomp(struct hda_codec *codec, if (jack == NULL) goto unlock; snd_jack_report(jack, - eld->monitor_present ? SND_JACK_AVOUT : 0); + (eld->monitor_present && eld->eld_valid) ? + SND_JACK_AVOUT : 0); unlock: mutex_unlock(&per_pin->lock); }