From patchwork Tue Feb 4 07:20:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikhil Mahale X-Patchwork-Id: 11364141 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4B8A214E3 for ; Tue, 4 Feb 2020 07:23:20 +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 D76DD20730 for ; Tue, 4 Feb 2020 07:23:19 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="XLVE0F5f"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=nvidia.com header.i=@nvidia.com header.b="iUoKeC72" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D76DD20730 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nvidia.com 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 3C730169E; Tue, 4 Feb 2020 08:22:34 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 3C730169E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1580800998; bh=HQKHiMZsxL5tRBeZ2ahbxeolqVNrjb9cMwt7GRMQ0lY=; h=From:To:Date:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=XLVE0F5f5w/r0v9b3Vxz4uThYu1RcV9DLLKGXK+T4iClLjPhLnv4LRiJfH3wBIw1c zigI0xPmDwtE7uiASWHEq6o3UTWs3gh8xfKh3vuJ01CYjVsO5zZLJBuSQppMeQ2xUW FvqDlb/sg4sZJUO+5f4QdjweOe+MZYSJlKv7IpSg= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id BE257F8027B; Tue, 4 Feb 2020 08:20:56 +0100 (CET) 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 E83DDF8025A; Tue, 4 Feb 2020 08:20:52 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from hqnvemgate26.nvidia.com (hqnvemgate26.nvidia.com [216.228.121.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 0A420F80162 for ; Tue, 4 Feb 2020 08:20:45 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 0A420F80162 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=nvidia.com header.i=@nvidia.com header.b="iUoKeC72" Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate26.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Mon, 03 Feb 2020 23:20:29 -0800 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Mon, 03 Feb 2020 23:20:44 -0800 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Mon, 03 Feb 2020 23:20:44 -0800 Received: from nvidia.com (10.124.1.5) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Tue, 4 Feb 2020 07:20:41 +0000 From: Nikhil Mahale To: , Date: Tue, 4 Feb 2020 12:50:16 +0530 Message-ID: <20200204072017.9554-3-nmahale@nvidia.com> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20200204072017.9554-1-nmahale@nvidia.com> References: <20200204072017.9554-1-nmahale@nvidia.com> X-NVConfidentiality: public MIME-Version: 1.0 X-Originating-IP: [10.124.1.5] X-ClientProxiedBy: HQMAIL111.nvidia.com (172.20.187.18) To HQMAIL107.nvidia.com (172.20.187.13) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1580800830; bh=PcvC1pN9+jSxqS3ZOq1pKrYISTG7O0QzDS/7ADpNxSY=; h=X-PGP-Universal:From:To:CC:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:X-NVConfidentiality:MIME-Version: X-Originating-IP:X-ClientProxiedBy:Content-Type; b=iUoKeC72t6AoUK88jUbwoYbZE+P5H3H0sk+chkz1fHC5bYVvxcSUwZcLEulYTNptW UEj6LQS7cT7OEKiLHJXOxwZC+IGP2GvlaKB5RbDdsEfdajvOEoSvLR644WS4X1Qn8H 9i0SNTDgzqNZSlt0uQMWwyhWMEyP3HNSZ11MMYpMbXxXs1hoA9sgPFa+IXoCwkPbJ2 r+w5ST8wUFKyZqbY6BKnFOzUdKJHsr9DQjWWCCfraqgXAfohmLP4lIhp4UNzuiTmG+ l5bZHoT6HiXUwzkr8dbQDBsjkd0VdCEn5c+oWkyMqvjbCAAUlrs6BoAMqSjtBkZkLT PteDqQDpcDBYA== Cc: alsa-devel@alsa-project.org, martin@larkos.de, Nikhil Mahale , aplattner@nvidia.com Subject: [alsa-devel] [PATCH v1 3/4] ALSA: hda - Change return type of update_eld() to void 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" snd_jack_report() does nothing is old and new status are same. Signed-off-by: Nikhil Mahale --- sound/pci/hda/patch_hdmi.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c index de45f5e5c724..1cf0604020bc 100644 --- a/sound/pci/hda/patch_hdmi.c +++ b/sound/pci/hda/patch_hdmi.c @@ -1485,7 +1485,7 @@ static void hdmi_pcm_reset_pin(struct hdmi_spec *spec, /* update per_pin ELD from the given new ELD; * setup info frame and notification accordingly */ -static bool update_eld(struct hda_codec *codec, +static void update_eld(struct hda_codec *codec, struct hdmi_spec_per_pin *per_pin, struct hdmi_eld *eld) { @@ -1549,7 +1549,6 @@ static bool update_eld(struct hda_codec *codec, SNDRV_CTL_EVENT_MASK_VALUE | SNDRV_CTL_EVENT_MASK_INFO, &get_hdmi_pcm(spec, pcm_idx)->eld_ctl->id); - return eld_changed; } /* update ELD and jack state via HD-audio verbs */ @@ -1654,7 +1653,6 @@ static void sync_eld_via_acomp(struct hda_codec *codec, struct hdmi_spec *spec = codec->spec; struct hdmi_eld *eld = &spec->temp_eld; struct snd_jack *jack = NULL; - bool changed; int size; mutex_lock(&per_pin->lock); @@ -1681,10 +1679,10 @@ static void sync_eld_via_acomp(struct hda_codec *codec, * disconnected event. Jack must be fetched before update_eld() */ jack = pin_idx_to_jack(codec, per_pin); - changed = update_eld(codec, per_pin, eld); + update_eld(codec, per_pin, eld); if (jack == NULL) jack = pin_idx_to_jack(codec, per_pin); - if (changed && jack) + if (jack) snd_jack_report(jack, (eld->monitor_present && eld->eld_valid) ? SND_JACK_AVOUT : 0);