All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Vinod Koul <vinod.koul@intel.com>
Cc: liam.r.girdwood@linux.intel.com, patches.audio@intel.com,
	alsa-devel@alsa-project.org, broonie@kernel.org
Subject: Re: [PATCH v3] amixer: skip showing asoc tlv byte controls
Date: Thu, 28 Jan 2016 08:29:57 +0100	[thread overview]
Message-ID: <s5hegd2maa2.wl-tiwai@suse.de> (raw)
In-Reply-To: <1453965966-27661-1-git-send-email-vinod.koul@intel.com>

On Thu, 28 Jan 2016 08:26:06 +0100,
Vinod Koul wrote:
> 
> ASoC TLV Byte controls are very large size controls so we should add new
> options for these. So skip dumping contents for these.
> 
> $amixer -c0 cget numid=16
> numid=16,iface=MIXER,name='mdl params'
>   ; type=BYTES,access=-----RW-,values=30336
>   : ASoC TLV Byte control, skipping bytes dump

Use semicolon instead.


Takashi

> 
> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
> ---
>  amixer/amixer.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/amixer/amixer.c b/amixer/amixer.c
> index db1849333da3..e059c176f958 100644
> --- a/amixer/amixer.c
> +++ b/amixer/amixer.c
> @@ -682,6 +682,14 @@ static int show_control(const char *space, snd_hctl_elem_t *elem,
>  	      __skip_read:
>  		if (!snd_ctl_elem_info_is_tlv_readable(info))
>  			goto __skip_tlv;
> +		/* skip ASoC ext bytes controls that may have huge binary TLV data */
> +		if (type == SND_CTL_ELEM_TYPE_BYTES &&
> +				!snd_ctl_elem_info_is_readable(info) &&
> +				!snd_ctl_elem_info_is_writable(info)) {
> +			printf("%s: ASoC TLV Byte control, skipping bytes dump\n", space);
> +			goto __skip_tlv;
> +		}
> +
>  		tlv = malloc(4096);
>  		if ((err = snd_hctl_elem_tlv_read(elem, tlv, 4096)) < 0) {
>  			error("Control %s element TLV read error: %s\n", card, snd_strerror(err));
> -- 
> 1.9.1
> 

  reply	other threads:[~2016-01-28  7:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-28  7:26 [PATCH v3] amixer: skip showing asoc tlv byte controls Vinod Koul
2016-01-28  7:29 ` Takashi Iwai [this message]
2016-01-28  8:24   ` Vinod Koul

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=s5hegd2maa2.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=liam.r.girdwood@linux.intel.com \
    --cc=patches.audio@intel.com \
    --cc=vinod.koul@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.