All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Cc: alsa-devel@alsa-project.org
Subject: Re: [PATCH] topology: Add support for widget byte controls
Date: Mon, 14 Mar 2016 16:58:48 +0100	[thread overview]
Message-ID: <s5hbn6hhwzr.wl-tiwai@suse.de> (raw)
In-Reply-To: <1457942858-5652-5-git-send-email-liam.r.girdwood@linux.intel.com>

On Mon, 14 Mar 2016 09:07:38 +0100,
Liam Girdwood wrote:
> 
> Add support for DAPM widgets to include bytes controls.
> 
> Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>

Applied, thanks.


Takashi


> ---
>  src/topology/dapm.c | 30 ++++++++++++++++++++++++++++++
>  1 file changed, 30 insertions(+)
> 
> diff --git a/src/topology/dapm.c b/src/topology/dapm.c
> index 14969ee..278d605 100644
> --- a/src/topology/dapm.c
> +++ b/src/topology/dapm.c
> @@ -103,6 +103,28 @@ static int tplg_parse_dapm_enums(snd_config_t *cfg, struct tplg_elem *elem)
>  	return 0;
>  }
>  
> +static int tplg_parse_dapm_bytes(snd_config_t *cfg, struct tplg_elem *elem)
> +{
> +	snd_config_iterator_t i, next;
> +	snd_config_t *n;
> +	const char *value = NULL;
> +
> +	tplg_dbg(" DAPM Bytes Controls: %s\n", elem->id);
> +
> +	snd_config_for_each(i, next, cfg) {
> +		n = snd_config_iterator_entry(i);
> +
> +		/* get value */
> +		if (snd_config_get_string(n, &value) < 0)
> +			continue;
> +
> +		tplg_ref_add(elem, SND_TPLG_TYPE_BYTES, value);
> +		tplg_dbg("\t\t %s\n", value);
> +	}
> +
> +	return 0;
> +}
> +
>  /* move referenced controls to the widget */
>  static int copy_dapm_control(struct tplg_elem *elem, struct tplg_elem *ref)
>  {
> @@ -567,6 +589,14 @@ int tplg_parse_dapm_widget(snd_tplg_t *tplg,
>  			continue;
>  		}
>  
> +		if (strcmp(id, "bytes") == 0) {
> +			err = tplg_parse_dapm_bytes(n, elem);
> +			if (err < 0)
> +				return err;
> +
> +			continue;
> +		}
> +
>  		if (strcmp(id, "data") == 0) {
>  			if (snd_config_get_string(n, &val) < 0)
>  				return -EINVAL;
> -- 
> 2.5.0
> 

  reply	other threads:[~2016-03-14 15:58 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-14  8:07 [PATCH] topology: fix debug output to print correct "max" value Liam Girdwood
2016-03-14  8:07 ` [PATCH] topology: Add ops to bytes control Liam Girdwood
2016-03-14 15:58   ` Takashi Iwai
2016-03-14  8:07 ` [PATCH] topology: add support for pasring external ops in conf files Liam Girdwood
2016-03-14 15:58   ` Takashi Iwai
2016-03-14  8:07 ` [PATCH] topology: add support for CTL access flags to config file Liam Girdwood
2016-03-14 15:58   ` Takashi Iwai
2016-03-14  8:07 ` [PATCH] topology: Add support for widget byte controls Liam Girdwood
2016-03-14 15:58   ` Takashi Iwai [this message]
2016-03-14 15:56 ` [PATCH] topology: fix debug output to print correct "max" value 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=s5hbn6hhwzr.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=liam.r.girdwood@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.