From patchwork Wed Mar 14 20:43:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liam Girdwood X-Patchwork-Id: 10283559 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 5277E6061F for ; Wed, 14 Mar 2018 20:44:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 406D222701 for ; Wed, 14 Mar 2018 20:44:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 349C62859F; Wed, 14 Mar 2018 20:44:05 +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=-1.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 51A1E22701 for ; Wed, 14 Mar 2018 20:44:04 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 2D410267196; Wed, 14 Mar 2018 21:44:03 +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 BA1DD267219; Wed, 14 Mar 2018 21:44:00 +0100 (CET) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by alsa0.perex.cz (Postfix) with ESMTP id 49FE726718B for ; Wed, 14 Mar 2018 21:43:56 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Mar 2018 13:43:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,307,1517904000"; d="scan'208";a="33901818" Received: from inhetel-mobl.amr.corp.intel.com (HELO sif.ger.corp.intel.com) ([10.252.3.21]) by FMSMGA003.fm.intel.com with ESMTP; 14 Mar 2018 13:43:54 -0700 From: Liam Girdwood To: Date: Wed, 14 Mar 2018 20:43:51 +0000 Message-Id: <20180314204351.13973-1-liam.r.girdwood@linux.intel.com> X-Mailer: git-send-email 2.14.1 Cc: Liam Girdwood , Mark Brown Subject: [alsa-devel] [PATCH] ASoC: pcm: improve debug output for DPCM BE searching. 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 Improve the DPCM BE search debug output to make it easier to debug issues in topologies. Signed-off-by: Liam Girdwood --- sound/soc/soc-pcm.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c index ea36de977c93..4ce489165a6d 100644 --- a/sound/soc/soc-pcm.c +++ b/sound/soc/soc-pcm.c @@ -1404,12 +1404,18 @@ static struct snd_soc_pcm_runtime *dpcm_get_be(struct snd_soc_card *card, struct snd_soc_pcm_runtime *be; int i; + dev_dbg(card->dev, "ASoC: find BE for widget %s\n", widget->name); + if (stream == SNDRV_PCM_STREAM_PLAYBACK) { list_for_each_entry(be, &card->rtd_list, list) { if (!be->dai_link->no_pcm) continue; + dev_dbg(card->dev, "ASoC: try BE : %s\n", + be->cpu_dai->playback_widget ? + be->cpu_dai->playback_widget->name : "(not set)"); + if (be->cpu_dai->playback_widget == widget) return be; @@ -1426,6 +1432,10 @@ static struct snd_soc_pcm_runtime *dpcm_get_be(struct snd_soc_card *card, if (!be->dai_link->no_pcm) continue; + dev_dbg(card->dev, "ASoC: try BE %s\n", + be->cpu_dai->capture_widget ? + be->cpu_dai->capture_widget->name : "(not set)"); + if (be->cpu_dai->capture_widget == widget) return be; @@ -1437,6 +1447,7 @@ static struct snd_soc_pcm_runtime *dpcm_get_be(struct snd_soc_card *card, } } + /* dai link name and stream name set correctly ? */ dev_err(card->dev, "ASoC: can't get %s BE for %s\n", stream ? "capture" : "playback", widget->name); return NULL;