From patchwork Mon Jul 7 12:16:54 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Fitzgerald X-Patchwork-Id: 4494611 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.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 516CBBEEAA for ; Mon, 7 Jul 2014 12:17:26 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 90CE72027D for ; Mon, 7 Jul 2014 12:17:25 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 7FA7D20221 for ; Mon, 7 Jul 2014 12:17:24 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 9BE1E265536; Mon, 7 Jul 2014 14:17:22 +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,NO_DNS_FOR_FROM, UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 325DD2651D1; Mon, 7 Jul 2014 14:17:12 +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 78FAF2651ED; Mon, 7 Jul 2014 14:17:10 +0200 (CEST) Received: from opensource.wolfsonmicro.com (opensource.wolfsonmicro.com [80.75.67.52]) by alsa0.perex.cz (Postfix) with ESMTP id F33052651D1 for ; Mon, 7 Jul 2014 14:17:01 +0200 (CEST) Received: from opensource.wolfsonmicro.com (opensource [80.75.67.52]) by opensource.wolfsonmicro.com (Postfix) with ESMTPSA id 56F30110018; Mon, 7 Jul 2014 13:17:01 +0100 (BST) Date: Mon, 7 Jul 2014 13:16:54 +0100 From: Richard Fitzgerald To: broonie@kernel.org, lgirdwood@gmail.com, perex@perex.cz, tiwai@suse.de Message-ID: <20140707121644.GA26105@opensource.wolfsonmicro.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.17+20080114 (2008-01-14) Cc: alsa-devel@alsa-project.org, patches@opensource.wolfsonmicro.com, ckeepax@opensource.wolfsonmicro.com, linux-kernel@vger.kernel.org Subject: [alsa-devel] [PATCH] ASoC: add SOC_VALUE_ENUM_EXT 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP Adds an equivalent of SOC_ENUM_EXT for value enums Strictly speaking SOC_ENUM_EXT can also be used to define a value enum since the only difference is the get and set functions. But this doesn't look good in code because it is inconsistent with the normal control definitions. Adding a specific SOC_VALUE_ENUM_EXT is better for code clarity. Signed-off-by: Richard Fitzgerald --- include/sound/soc.h | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/include/sound/soc.h b/include/sound/soc.h index 9a5b4f6..1483920 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h @@ -248,6 +248,8 @@ .info = snd_soc_info_enum_double, \ .get = xhandler_get, .put = xhandler_put, \ .private_value = (unsigned long)&xenum } +#define SOC_VALUE_ENUM_EXT(xname, xenum, xhandler_get, xhandler_put) \ + SOC_ENUM_EXT(xname, xenum, xhandler_get, xhandler_put) #define SND_SOC_BYTES(xname, xbase, xregs) \ { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \