From patchwork Thu Dec 3 21:08:50 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Subhransu S. Prusty" X-Patchwork-Id: 7761151 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 0F1F39F30B for ; Thu, 3 Dec 2015 15:39:08 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3C5E1204D8 for ; Thu, 3 Dec 2015 15:39:07 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 1743D20034 for ; Thu, 3 Dec 2015 15:39:05 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 5C7102605B2; Thu, 3 Dec 2015 16:39:03 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=0.4 required=5.0 tests=BAYES_00, DATE_IN_FUTURE_03_06, RCVD_IN_DNSWL_LOW,UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 75F66260525; Thu, 3 Dec 2015 16:38:32 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 8671E2604F0; Thu, 3 Dec 2015 16:38:30 +0100 (CET) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by alsa0.perex.cz (Postfix) with ESMTP id 52C8F260421 for ; Thu, 3 Dec 2015 16:38:23 +0100 (CET) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga103.jf.intel.com with ESMTP; 03 Dec 2015 07:38:23 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,378,1444719600"; d="scan'208";a="611962874" Received: from subhransu-desktop.iind.intel.com ([10.223.96.57]) by FMSMGA003.fm.intel.com with ESMTP; 03 Dec 2015 07:38:21 -0800 From: "Subhransu S. Prusty" To: alsa-devel@alsa-project.org Date: Fri, 4 Dec 2015 02:38:50 +0530 Message-Id: <1449176942-3441-2-git-send-email-subhransu.s.prusty@intel.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1449176942-3441-1-git-send-email-subhransu.s.prusty@intel.com> References: <1449176538-3250-1-git-send-email-subhransu.s.prusty@intel.com> <1449176942-3441-1-git-send-email-subhransu.s.prusty@intel.com> Cc: tiwai@suse.de, David Airlie , lgirdwood@gmail.com, dri-devel@lists.freedesktop.org, patches.audio@intel.com, broonie@kernel.org, Daniel Vetter , Vinod Koul , "Subhransu S. Prusty" Subject: [alsa-devel] [PATCH v2 02/14] ASoC: hdac_hdmi: Fix to warn instead of err for no connected nids X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 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: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP It is possible that some pin widget may return with no converter connected. So don't throw error if none are found to be connected. Instead print a warning and continue. Signed-off-by: Subhransu S. Prusty Signed-off-by: Vinod Koul --- sound/soc/codecs/hdac_hdmi.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/hdac_hdmi.c b/sound/soc/codecs/hdac_hdmi.c index 929f27b..429fa14 100644 --- a/sound/soc/codecs/hdac_hdmi.c +++ b/sound/soc/codecs/hdac_hdmi.c @@ -316,10 +316,12 @@ static int hdac_hdmi_query_pin_connlist(struct hdac_ext_device *hdac, pin->num_mux_nids = snd_hdac_get_connections(&hdac->hdac, pin->nid, pin->mux_nids, HDA_MAX_CONNECTIONS); - if (pin->num_mux_nids == 0) { - dev_err(&hdac->hdac.dev, "No connections found\n"); - return -ENODEV; - } + if (pin->num_mux_nids == 0) + dev_warn(&hdac->hdac.dev, "No connections found for pin: %d\n", + pin->nid); + + dev_dbg(&hdac->hdac.dev, "num_mux_nids %d for pin: %d\n", + pin->num_mux_nids, pin->nid); return pin->num_mux_nids; }