From patchwork Thu Jan 28 04:49:42 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinod Koul X-Patchwork-Id: 8146131 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 83202BEEE5 for ; Thu, 28 Jan 2016 04:46:14 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BEBBE20251 for ; Thu, 28 Jan 2016 04:46:13 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id F3D4920154 for ; Thu, 28 Jan 2016 04:46:10 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 798CB261536; Thu, 28 Jan 2016 05:46:09 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 84831261536; Thu, 28 Jan 2016 05:46:01 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id AB27326155B; Thu, 28 Jan 2016 05:46:00 +0100 (CET) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by alsa0.perex.cz (Postfix) with ESMTP id 77FC3260A59 for ; Thu, 28 Jan 2016 05:45:53 +0100 (CET) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga104.fm.intel.com with ESMTP; 27 Jan 2016 20:45:53 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,356,1449561600"; d="scan'208";a="735567198" Received: from vkoul-udesk7.iind.intel.com ([10.223.84.34]) by orsmga003.jf.intel.com with ESMTP; 27 Jan 2016 20:45:48 -0800 From: Vinod Koul To: alsa-devel@alsa-project.org Date: Thu, 28 Jan 2016 10:19:42 +0530 Message-Id: <1453956582-27254-1-git-send-email-vinod.koul@intel.com> X-Mailer: git-send-email 1.9.1 Cc: liam.r.girdwood@linux.intel.com, tiwai@suse.de, broonie@kernel.org, Vinod Koul , patches.audio@intel.com Subject: [alsa-devel] [PATCH v2] amixer: skip showing asoc tlv byte controls X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- amixer/amixer.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/amixer/amixer.c b/amixer/amixer.c index db1849333da3..9ae75bfa3632 100644 --- a/amixer/amixer.c +++ b/amixer/amixer.c @@ -682,6 +682,12 @@ 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 show for ASoC TLV Byte controls */ + if (type == SND_CTL_ELEM_TYPE_BYTES) { + 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));