From patchwork Wed Mar 28 17:09:04 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ranjani Sridharan X-Patchwork-Id: 10313675 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 795A3600F6 for ; Wed, 28 Mar 2018 17:09:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 678E7252D5 for ; Wed, 28 Mar 2018 17:09:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5B8E428DE1; Wed, 28 Mar 2018 17:09:18 +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 90063252D5 for ; Wed, 28 Mar 2018 17:09:17 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 37668267063; Wed, 28 Mar 2018 19:09:15 +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 11C2826709D; Wed, 28 Mar 2018 19:09:13 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by alsa0.perex.cz (Postfix) with ESMTP id 81D55266E07 for ; Wed, 28 Mar 2018 19:09:07 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Mar 2018 10:09:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,372,1517904000"; d="scan'208";a="32167589" Received: from cmalik-mobl.amr.corp.intel.com (HELO ranjani-desktop.hsd1.ca.comcast.net) ([10.254.181.79]) by fmsmga002.fm.intel.com with ESMTP; 28 Mar 2018 10:09:04 -0700 From: Ranjani Sridharan To: alsa-devel@alsa-project.org Date: Wed, 28 Mar 2018 10:09:04 -0700 Message-Id: <20180328170904.19845-1-ranjani.sridharan@linux.intel.com> X-Mailer: git-send-email 2.14.1 Cc: liam.r.girdwood@linux.intel.com Subject: [alsa-devel] [PATCH v2] ALSA: core api: define offsets for TLV items 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 This patch defines accessor offsets for the type, length, min, mute and step items in TLV data. These will be used by drivers to extract the TLV data while loading topology. Signed-off-by: Ranjani Sridharan --- V2: removed redundant redefinitions and updated prefix --- include/uapi/sound/tlv.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/uapi/sound/tlv.h b/include/uapi/sound/tlv.h index be5371f09a62..1fd786a5e57b 100644 --- a/include/uapi/sound/tlv.h +++ b/include/uapi/sound/tlv.h @@ -98,4 +98,12 @@ #define SNDRV_CTL_TLVD_DB_GAIN_MUTE -9999999 +/* Accessor offsets for TLV data items */ +#define SNDRV_CTL_TLV_OFFSET_TYPE 0 +#define SNDRV_CTL_TLV_OFFSET_LEN 1 + +/* Accessor offsets for min, mute and step items in dB scale type TLV */ +#define SNDRV_CTL_TLV_OFFSET_DB_MIN 2 +#define SNDRV_CTL_TLV_OFFSET_DB_MUTE_AND_STEP 3 + #endif