From patchwork Mon May 25 17:22:50 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liam Girdwood X-Patchwork-Id: 6476481 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 12AFBC0020 for ; Mon, 25 May 2015 17:25:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 436BC203B5 for ; Mon, 25 May 2015 17:25:28 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id ED644203AA for ; Mon, 25 May 2015 17:25:26 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 07DCF26516E; Mon, 25 May 2015 19:25:26 +0200 (CEST) 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, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 26415265041; Mon, 25 May 2015 19:24:04 +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 D1C34265015; Mon, 25 May 2015 19:24:00 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by alsa0.perex.cz (Postfix) with ESMTP id 1A8672625C4 for ; Mon, 25 May 2015 19:23:43 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga102.fm.intel.com with ESMTP; 25 May 2015 10:23:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,493,1427785200"; d="scan'208";a="498023991" Received: from cbrouat-mobl.ger.corp.intel.com (HELO loki.ger.corp.intel.com) ([10.252.29.86]) by FMSMGA003.fm.intel.com with ESMTP; 25 May 2015 10:23:29 -0700 From: Liam Girdwood To: Date: Mon, 25 May 2015 18:22:50 +0100 Message-Id: <1432574570-7436-3-git-send-email-liam.r.girdwood@linux.intel.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1432574570-7436-1-git-send-email-liam.r.girdwood@linux.intel.com> References: <1432574570-7436-1-git-send-email-liam.r.girdwood@linux.intel.com> Cc: Takashi Iwai , Liam Girdwood , Mark Brown Subject: [alsa-devel] [PATCH v2 3/3] ALSA: topology: Export ID types for TLV 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 Make sure userspace can define TLV controls for topolofy using the correct type numbers. Signed-off-by: Liam Girdwood --- include/sound/tlv.h | 7 +------ include/uapi/sound/tlv.h | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+), 6 deletions(-) create mode 100644 include/uapi/sound/tlv.h diff --git a/include/sound/tlv.h b/include/sound/tlv.h index e11e179..7209331 100644 --- a/include/sound/tlv.h +++ b/include/sound/tlv.h @@ -31,12 +31,7 @@ * ~(sizeof(unsigned int) - 1)) .... */ -#define SNDRV_CTL_TLVT_CONTAINER 0 /* one level down - group of TLVs */ -#define SNDRV_CTL_TLVT_DB_SCALE 1 /* dB scale */ -#define SNDRV_CTL_TLVT_DB_LINEAR 2 /* linear volume */ -#define SNDRV_CTL_TLVT_DB_RANGE 3 /* dB range container */ -#define SNDRV_CTL_TLVT_DB_MINMAX 4 /* dB scale with min/max */ -#define SNDRV_CTL_TLVT_DB_MINMAX_MUTE 5 /* dB scale with min/max with mute */ +#include #define TLV_ITEM(type, ...) \ (type), TLV_LENGTH(__VA_ARGS__), __VA_ARGS__ diff --git a/include/uapi/sound/tlv.h b/include/uapi/sound/tlv.h new file mode 100644 index 0000000..33d747d --- /dev/null +++ b/include/uapi/sound/tlv.h @@ -0,0 +1,23 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#ifndef __UAPI_SOUND_TLV_H +#define __UAPI_SOUND_TLV_H + +#define SNDRV_CTL_TLVT_CONTAINER 0 /* one level down - group of TLVs */ +#define SNDRV_CTL_TLVT_DB_SCALE 1 /* dB scale */ +#define SNDRV_CTL_TLVT_DB_LINEAR 2 /* linear volume */ +#define SNDRV_CTL_TLVT_DB_RANGE 3 /* dB range container */ +#define SNDRV_CTL_TLVT_DB_MINMAX 4 /* dB scale with min/max */ +#define SNDRV_CTL_TLVT_DB_MINMAX_MUTE 5 /* dB scale with min/max with mute */ + +#endif