All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: alsa-devel@alsa-project.org
Cc: tiwai@suse.de,
	Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
	vkoul@kernel.org, broonie@kernel.org,
	Rander Wang <rander.wang@intel.com>,
	Bard liao <yung-chuan.liao@linux.intel.com>,
	Rander Wang <rander.wang@linux.intel.com>
Subject: [PATCH 09/14] ASoC: Intel: sof_sdw: add trace for dai links
Date: Thu,  4 Feb 2021 14:33:07 -0600	[thread overview]
Message-ID: <20210204203312.27112-10-pierre-louis.bossart@linux.intel.com> (raw)
In-Reply-To: <20210204203312.27112-1-pierre-louis.bossart@linux.intel.com>

From: Bard Liao <yung-chuan.liao@linux.intel.com>

We create dai links dynamically, so it is not easy to know what dai
links are created. So adding trace for dai link name and id.

Reviewed-by: Rander Wang <rander.wang@intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
---
 sound/soc/intel/boards/sof_sdw.c | 21 ++++++++++-----------
 1 file changed, 10 insertions(+), 11 deletions(-)

diff --git a/sound/soc/intel/boards/sof_sdw.c b/sound/soc/intel/boards/sof_sdw.c
index 06f07dd45fb4..8adce6417b02 100644
--- a/sound/soc/intel/boards/sof_sdw.c
+++ b/sound/soc/intel/boards/sof_sdw.c
@@ -476,15 +476,14 @@ static int get_sdw_dailink_info(const struct snd_soc_acpi_link_adr *links,
 	return 0;
 }
 
-static void init_dai_link(struct snd_soc_dai_link *dai_links, int be_id,
-			  char *name, int playback, int capture,
-			  struct snd_soc_dai_link_component *cpus,
-			  int cpus_num,
-			  struct snd_soc_dai_link_component *codecs,
-			  int codecs_num,
+static void init_dai_link(struct device *dev, struct snd_soc_dai_link *dai_links,
+			  int be_id, char *name, int playback, int capture,
+			  struct snd_soc_dai_link_component *cpus, int cpus_num,
+			  struct snd_soc_dai_link_component *codecs, int codecs_num,
 			  int (*init)(struct snd_soc_pcm_runtime *rtd),
 			  const struct snd_soc_ops *ops)
 {
+	dev_dbg(dev, "create dai link %s, id %d\n", name, be_id);
 	dai_links->id = be_id;
 	dai_links->name = name;
 	dai_links->platforms = platform_component;
@@ -822,7 +821,7 @@ static int create_sdw_dailink(struct device *dev, int *be_index,
 
 		playback = (stream == SNDRV_PCM_STREAM_PLAYBACK);
 		capture = (stream == SNDRV_PCM_STREAM_CAPTURE);
-		init_dai_link(dai_links + *be_index, *be_index, name,
+		init_dai_link(dev, dai_links + *be_index, *be_index, name,
 			      playback, capture,
 			      cpus + *cpu_id, cpu_dai_num,
 			      codecs, codec_num,
@@ -1061,7 +1060,7 @@ static int sof_card_dai_links_create(struct device *dev,
 
 		playback = info->direction[SNDRV_PCM_STREAM_PLAYBACK];
 		capture = info->direction[SNDRV_PCM_STREAM_CAPTURE];
-		init_dai_link(links + link_id, be_id, name,
+		init_dai_link(dev, links + link_id, be_id, name,
 			      playback, capture,
 			      cpus + cpu_id, 1,
 			      ssp_components, 1,
@@ -1078,7 +1077,7 @@ static int sof_card_dai_links_create(struct device *dev,
 	/* dmic */
 	if (dmic_num > 0) {
 		cpus[cpu_id].dai_name = "DMIC01 Pin";
-		init_dai_link(links + link_id, be_id, "dmic01",
+		init_dai_link(dev, links + link_id, be_id, "dmic01",
 			      0, 1, // DMIC only supports capture
 			      cpus + cpu_id, 1,
 			      dmic_component, 1,
@@ -1086,7 +1085,7 @@ static int sof_card_dai_links_create(struct device *dev,
 		INC_ID(be_id, cpu_id, link_id);
 
 		cpus[cpu_id].dai_name = "DMIC16k Pin";
-		init_dai_link(links + link_id, be_id, "dmic16k",
+		init_dai_link(dev, links + link_id, be_id, "dmic16k",
 			      0, 1, // DMIC only supports capture
 			      cpus + cpu_id, 1,
 			      dmic_component, 1,
@@ -1129,7 +1128,7 @@ static int sof_card_dai_links_create(struct device *dev,
 			return -ENOMEM;
 
 		cpus[cpu_id].dai_name = cpu_name;
-		init_dai_link(links + link_id, be_id, name,
+		init_dai_link(dev, links + link_id, be_id, name,
 			      1, 0, // HDMI only supports playback
 			      cpus + cpu_id, 1,
 			      idisp_components + i, 1,
-- 
2.25.1


  parent reply	other threads:[~2021-02-04 20:38 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-04 20:32 [PATCH 00/14] ASoC: SOF/Intel/SoundWire: add missing quirks and DMIC support Pierre-Louis Bossart
2021-02-04 20:32 ` [PATCH 01/14] ASoC: Intel: sof_sdw: add missing TGL_HDMI quirk for Dell SKU 0A3E Pierre-Louis Bossart
2021-02-04 20:33 ` [PATCH 02/14] ASoC: Intel: sof_sdw: add missing TGL_HDMI quirk for Dell SKU 0A5E Pierre-Louis Bossart
2021-02-04 20:33 ` [PATCH 03/14] ASoC: Intel: sof_sdw: add missing TGL_HDMI quirk for Dell SKU 0A32 Pierre-Louis Bossart
2021-02-04 20:33 ` [PATCH 04/14] ASoC: Intel: sof_sdw: reorganize quirks by generation Pierre-Louis Bossart
2021-02-04 20:33 ` [PATCH 05/14] ASoC: Intel: sof-sdw: indent and add quirks consistently Pierre-Louis Bossart
2021-02-04 20:33 ` [PATCH 06/14] ASoC: Intel: sof_sdw: add quirk for HP Spectre x360 convertible Pierre-Louis Bossart
2021-02-04 20:33 ` [PATCH 07/14] ASoC: Intel: sof_sdw: add mic:dmic and cfg-mics component strings Pierre-Louis Bossart
2021-02-04 20:33 ` [PATCH 08/14] ASoC: Intel: sof_sdw: detect DMIC number based on mach params Pierre-Louis Bossart
2021-02-04 20:33 ` Pierre-Louis Bossart [this message]
2021-02-04 20:33 ` [PATCH 10/14] ASoC: Intel: soc-acpi: add ACPI matching table for HP Spectre x360 Pierre-Louis Bossart
2021-02-04 20:33 ` [PATCH 11/14] ASoC: SOF: Intel: SoundWire: refine ACPI match Pierre-Louis Bossart
2021-02-04 20:33 ` [PATCH 12/14] ASoC: SOF: Intel: detect DMIC number in SoundWire mixed config Pierre-Louis Bossart
2021-02-04 20:33 ` [PATCH 13/14] ASoC: SOF: Intel: HDA: don't keep a temporary variable Pierre-Louis Bossart
2021-02-04 20:33 ` [PATCH 14/14] ASoC: SOF: Intel: hda: add dev_dbg() when DMIC number is overridden Pierre-Louis Bossart
2021-02-05 15:33   ` Mark Brown
2021-02-05 15:47     ` Pierre-Louis Bossart
2021-02-05 15:51       ` Mark Brown
2021-02-05 16:38         ` Pierre-Louis Bossart
2021-02-05 16:52           ` Mark Brown
2021-02-05 14:56 ` (subset) [PATCH 00/14] ASoC: SOF/Intel/SoundWire: add missing quirks and DMIC support Mark Brown
2021-02-10 20:11 ` Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210204203312.27112-10-pierre-louis.bossart@linux.intel.com \
    --to=pierre-louis.bossart@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=rander.wang@intel.com \
    --cc=rander.wang@linux.intel.com \
    --cc=tiwai@suse.de \
    --cc=vkoul@kernel.org \
    --cc=yung-chuan.liao@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.