All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Sakamoto <o-takashi@sakamocchi.jp>
To: mengdong.lin@linux.intel.com, alsa-devel@alsa-project.org,
	broonie@kernel.org
Cc: tiwai@suse.de, mengdong.lin@intel.com, liam.r.girdwood@intel.com,
	shreyas.nc@intel.com
Subject: Re: [PATCH 4/5] topology: Parse vendor private data for manifest
Date: Wed, 13 Jul 2016 18:56:13 +0900	[thread overview]
Message-ID: <5786103C.8030509@sakamocchi.jp> (raw)
In-Reply-To: <5e5337dd75d6291b6f12e678adc9c5ea0f62138f.1468397702.git.mengdong.lin@linux.intel.com>

On Jul 13 2016 17:45, mengdong.lin@linux.intel.com wrote:
> diff --git a/src/topology/data.c b/src/topology/data.c
> index 65054d7..f04544b 100644
> --- a/src/topology/data.c
> +++ b/src/topology/data.c
> @@ -26,6 +26,10 @@ struct snd_soc_tplg_private *get_priv_data(struct tplg_elem *elem)
>   	struct snd_soc_tplg_private *priv = NULL;
>
>   	switch (elem->type) {
> +	case SND_TPLG_TYPE_MANIFEST:
> +		priv = &elem->manifest->priv;
> +		break;
> +
>   	case SND_TPLG_TYPE_MIXER:
>   		priv = &elem->mixer_ctrl->priv;
>   		break;
> @@ -835,6 +839,101 @@ void tplg_free_tuples(void *obj)
>   	free(tuples->set);
>   }
>
> +/* Parse manifest's data references
> + */
> +int tplg_parse_manifest_data(snd_tplg_t *tplg, snd_config_t *cfg,
> +	void *private ATTRIBUTE_UNUSED)
> +{
> +	struct snd_soc_tplg_manifest *manifest;
> +	struct tplg_elem *elem;
> +	snd_config_iterator_t i, next;
> +	snd_config_t *n;
> +	const char *id, *val = NULL;

data.c: In function ‘tplg_parse_manifest_data’:
data.c:851:19: warning: unused variable ‘val’ [-Wunused-variable]
   const char *id, *val = NULL;
                    ^

> +	int err;
> +
> +	if (!list_empty(&tplg->manifest_list)) {
> +		SNDERR("error: already has manifest data\n");
> +		return -EINVAL;
> +	}
> +
> +	elem = tplg_elem_new_common(tplg, cfg, NULL, SND_TPLG_TYPE_MANIFEST);
> +	if (!elem)
> +		return -ENOMEM;
> +
> +	manifest = elem->manifest;
> +	manifest->size = elem->size;
> +
> +	tplg_dbg(" Manifest: %s\n", elem->id);
> +
> +	snd_config_for_each(i, next, cfg) {
> +		n = snd_config_iterator_entry(i);
> +		if (snd_config_get_id(n, &id) < 0)
> +			continue;
> +
> +		/* skip comments */
> +		if (strcmp(id, "comment") == 0)
> +			continue;
> +		if (id[0] == '#')
> +			continue;
> +
> +
> +		if (strcmp(id, "data") == 0) {
> +			err = tplg_parse_data_refs(tplg, n, elem);
> +			if (err < 0)
> +				return err;
> +			continue;
> +		}
> +	}
> +}

data.c:887:1: warning: control reaches end of non-void function 
[-Wreturn-type]
  }
  ^

Regards

Takashi Sakamoto

  reply	other threads:[~2016-07-13  9:56 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-13  8:44 [PATCH 0/5] topology: Enhance support for private data mengdong.lin
2016-07-13  8:44 ` [PATCH 1/5] topology: An element can refer to multipe data sections in text conf file mengdong.lin
2016-07-13  9:56   ` Takashi Sakamoto
2016-07-13  8:44 ` [PATCH 2/5] topology: Merge lookup for data reference into tplg_copy_data() mengdong.lin
2016-07-13  8:44 ` [PATCH 3/5] topology: Change uuid value to 16 separate characters in text conf file mengdong.lin
2016-07-13  9:46   ` Takashi Sakamoto
2016-07-13  8:45 ` [PATCH 4/5] topology: Parse vendor private data for manifest mengdong.lin
2016-07-13  9:56   ` Takashi Sakamoto [this message]
2016-07-13  8:45 ` [PATCH 5/5] topology: Tuple type can have an extenstion mengdong.lin

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=5786103C.8030509@sakamocchi.jp \
    --to=o-takashi@sakamocchi.jp \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=liam.r.girdwood@intel.com \
    --cc=mengdong.lin@intel.com \
    --cc=mengdong.lin@linux.intel.com \
    --cc=shreyas.nc@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 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.