alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: mengdong.lin@linux.intel.com
To: alsa-devel@alsa-project.org, broonie@kernel.org
Cc: Mengdong Lin <mengdong.lin@linux.intel.com>,
	tiwai@suse.de, mengdong.lin@intel.com,
	guneshwor.o.singh@intel.com, liam.r.girdwood@intel.com,
	hardik.t.shah@intel.com
Subject: [PATCH v2 4/6] topology: Fix pcm ID & name parsing
Date: Fri, 29 Apr 2016 11:03:30 +0800	[thread overview]
Message-ID: <ee41f44340104b6052fc694bf5fc156af1a23122.1461898635.git.mengdong.lin@linux.intel.com> (raw)
In-Reply-To: <cover.1461898635.git.mengdong.lin@linux.intel.com>

From: Mengdong Lin <mengdong.lin@linux.intel.com>

The name and ID of SectionPCM should be set to pcm_name and pcm_id,
for a front-end DAI link in the kernel, not for the front-end DAI
of the link.

Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>

diff --git a/include/sound/asoc.h b/include/sound/asoc.h
index 920c9e0..abe49c5 100644
--- a/include/sound/asoc.h
+++ b/include/sound/asoc.h
@@ -414,7 +414,7 @@ struct snd_soc_tplg_pcm {
 	__le32 size;		/* in bytes of this structure */
 	char pcm_name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
 	char dai_name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
-	__le32 pcm_id;		/* unique ID - used to match */
+	__le32 pcm_id;		/* unique ID - used to match with DAI link */
 	__le32 dai_id;		/* unique ID - used to match */
 	__le32 playback;	/* supports playback mode */
 	__le32 capture;		/* supports capture mode */
diff --git a/src/topology/pcm.c b/src/topology/pcm.c
index 1df4f54..1661821 100644
--- a/src/topology/pcm.c
+++ b/src/topology/pcm.c
@@ -337,7 +337,7 @@ int tplg_parse_pcm(snd_tplg_t *tplg,
 
 	pcm = elem->pcm;
 	pcm->size = elem->size;
-	elem_copy_text(pcm->dai_name, elem->id, SNDRV_CTL_ELEM_ID_NAME_MAXLEN);
+	elem_copy_text(pcm->pcm_name, elem->id, SNDRV_CTL_ELEM_ID_NAME_MAXLEN);
 
 	tplg_dbg(" PCM: %s\n", elem->id);
 
@@ -366,8 +366,8 @@ int tplg_parse_pcm(snd_tplg_t *tplg,
 			if (snd_config_get_string(n, &val) < 0)
 				return -EINVAL;
 
-			pcm->dai_id = atoi(val);
-			tplg_dbg("\t%s: %d\n", id, pcm->dai_id);
+			pcm->pcm_id = atoi(val);
+			tplg_dbg("\t%s: %d\n", id, pcm->pcm_id);
 			continue;
 		}
 
-- 
2.5.0

  parent reply	other threads:[~2016-04-29  3:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-29  3:02 [PATCH v2 0/6] topology: complete PCM parsing and code refactoring mengdong.lin
2016-04-29  3:02 ` [PATCH v2 1/6] topology: Set manifest size for ABI mengdong.lin
2016-04-29  3:03 ` [PATCH v2 2/6] topology: Refactor functions to parse and build streams mengdong.lin
2016-04-29  3:03 ` [PATCH v2 3/6] topology: Use generic pointer to realloc buffer for private data mengdong.lin
2016-04-29  3:03 ` mengdong.lin [this message]
2016-04-29  3:03 ` [PATCH v2 5/6] topology: Parse front-end DAI name and ID for the PCM mengdong.lin
2016-04-29  3:03 ` [PATCH v2 6/6] topology: Update PCM configurations in Broadwell text conf file mengdong.lin
2016-05-09  8:34 ` [PATCH v2 0/6] topology: complete PCM parsing and code refactoring Takashi Iwai

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=ee41f44340104b6052fc694bf5fc156af1a23122.1461898635.git.mengdong.lin@linux.intel.com \
    --to=mengdong.lin@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=guneshwor.o.singh@intel.com \
    --cc=hardik.t.shah@intel.com \
    --cc=liam.r.girdwood@intel.com \
    --cc=mengdong.lin@intel.com \
    --cc=tiwai@suse.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).