From: Takashi Iwai Subject: Re: [PATCH v2] amixer: skip showing asoc tlv byte controls Date: Thu, 28 Jan 2016 08:04:51 +0100 Message-ID: References: <1453956582-27254-1-git-send-email-vinod.koul@intel.com> <20160128064011.GE11130@localhost> 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 CEEC52654B3 for ; Thu, 28 Jan 2016 08:04:51 +0100 (CET) In-Reply-To: <20160128064011.GE11130@localhost> 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 07:40:11 +0100, Vinod Koul wrote: > > On Thu, Jan 28, 2016 at 06:53:49AM +0100, Takashi Iwai wrote: > > On Thu, 28 Jan 2016 05:49:42 +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 > > > > > > Signed-off-by: Vinod Koul > > > > No, as I wrote before, checking the type isn't enough. > > Assigning a TLV to BYTES type doesn't mean necessarily that it's an > > ASoC EXT control. You need to check the r/w capabilities as well. > > Oops missed that part. > > So am making it > > if (type == SND_CTL_ELEM_TYPE_BYTES && > (snd_ctl_elem_info_is_tlv_readable(info) || > snd_ctl_elem_info_is_tlv_writable(info))) { > > But this control can be read only or write only. Like a module doesnt allow > read, or some is read only so OR should be good here > > Also should it check it is not normal read/write ? Yes. /* 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)) goto __skip_tlv; Takashi