From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: [PATCH v3] amixer: skip showing asoc tlv byte controls Date: Thu, 28 Jan 2016 08:29:57 +0100 Message-ID: References: <1453965966-27661-1-git-send-email-vinod.koul@intel.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id 013E42654B3 for ; Thu, 28 Jan 2016 08:29:59 +0100 (CET) In-Reply-To: <1453965966-27661-1-git-send-email-vinod.koul@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: Vinod Koul Cc: liam.r.girdwood@linux.intel.com, patches.audio@intel.com, alsa-devel@alsa-project.org, broonie@kernel.org List-Id: alsa-devel@alsa-project.org 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 > --- > 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 >