From patchwork Tue Aug 30 00:21:45 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Sakamoto X-Patchwork-Id: 9304671 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 2F176607F0 for ; Tue, 30 Aug 2016 00:22:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1D73F28911 for ; Tue, 30 Aug 2016 00:22:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0FEBD289D8; Tue, 30 Aug 2016 00:22:08 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7811128911 for ; Tue, 30 Aug 2016 00:22:07 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 49BBB26672D; Tue, 30 Aug 2016 02:22:06 +0200 (CEST) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 909902663E8; Tue, 30 Aug 2016 02:21:58 +0200 (CEST) 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 3B0F6266468; Tue, 30 Aug 2016 02:21:57 +0200 (CEST) Received: from smtp-proxy002.phy.lolipop.jp (smtp-proxy002.phy.lolipop.jp [157.7.104.43]) by alsa0.perex.cz (Postfix) with ESMTP id 18B7C265770 for ; Tue, 30 Aug 2016 02:21:50 +0200 (CEST) Received: from smtp-proxy002.phy.lolipop.lan (HELO smtp-proxy002.phy.lolipop.jp) (172.19.44.43) (smtp-auth username m12129643-o-takashi, mechanism plain) by smtp-proxy002.phy.lolipop.jp (qpsmtpd/0.82) with ESMTPA; Tue, 30 Aug 2016 09:21:47 +0900 Received: from 127.0.0.1 (127.0.0.1) by smtp-proxy002.phy.lolipop.jp (LOLIPOP-Fsecure); Tue, 30 Aug 2016 09:21:46 +0900 (JST) X-Virus-Status: clean(LOLIPOP-Fsecure) From: Takashi Sakamoto To: clemens@ladisch.de, tiwai@suse.de Date: Tue, 30 Aug 2016 09:21:45 +0900 Message-Id: <1472516505-8350-1-git-send-email-o-takashi@sakamocchi.jp> X-Mailer: git-send-email 2.7.4 Cc: alsa-devel@alsa-project.org Subject: [alsa-devel] [alsa-lib][PATCH] test: fix comment about first two fields of TLV data payload 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 I misunderstand TLV packet structure (struct snd_ctl_tlv) nests in its payload. But actually, the payload stores different type of data. This commit corrects a comment in a test program of user control element set including my misunderstanding. Signed-off-by: Takashi Sakamoto --- test/user-ctl-element-set.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/user-ctl-element-set.c b/test/user-ctl-element-set.c index 9b9dc59..f6f050a 100644 --- a/test/user-ctl-element-set.c +++ b/test/user-ctl-element-set.c @@ -418,11 +418,11 @@ static int check_tlv(struct elem_set_trial *trial) int err; /* - * See a layout of 'struct snd_ctl_tlv'. I don't know the reason to - * construct this buffer with the same layout. It should be abstracted - * inner userspace library... + * When transferring threshold level information via TLV feature of + * ALSA control interface, the first two fields of packet payload + * consist of data type and data length. */ - orig[0] = snd_ctl_elem_id_get_numid(trial->id); + orig[0] = SNDRV_CTL_TLVT_CONTAINER; orig[1] = 6 * sizeof(orig[0]); orig[2] = 'a'; orig[3] = 'b';