From patchwork Thu Sep 24 17:19:49 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Thomson X-Patchwork-Id: 7258471 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 3ABDBBEEC1 for ; Thu, 24 Sep 2015 17:21:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 70B59208B7 for ; Thu, 24 Sep 2015 17:21:48 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id E06922098D for ; Thu, 24 Sep 2015 17:21:46 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 16E4E265DEF; Thu, 24 Sep 2015 19:21:46 +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=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id EDA64265DC3; Thu, 24 Sep 2015 19:20:35 +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 3C6A4260592; Thu, 24 Sep 2015 19:20:34 +0200 (CEST) Received: from mail1.bemta3.messagelabs.com (mail1.bemta3.messagelabs.com [195.245.230.162]) by alsa0.perex.cz (Postfix) with ESMTP id 3E192260592 for ; Thu, 24 Sep 2015 19:19:54 +0200 (CEST) Received: from [85.158.137.3] by server-2.bemta-3.messagelabs.com id B3/77-21201-7B034065; Thu, 24 Sep 2015 17:19:51 +0000 X-Env-Sender: Adam.Thomson.Opensource@diasemi.com X-Msg-Ref: server-8.tower-38.messagelabs.com!1443115191!22562497!1 X-Originating-IP: [82.210.246.133] X-StarScan-Received: X-StarScan-Version: 6.13.16; banners=-,-,- X-VirusChecked: Checked Received: (qmail 9666 invoked from network); 24 Sep 2015 17:19:51 -0000 Received: from mailrelay1.diasemi.com (HELO NB-EX-CASHUB01.diasemi.com) (82.210.246.133) by server-8.tower-38.messagelabs.com with AES128-SHA encrypted SMTP; 24 Sep 2015 17:19:51 -0000 Received: from mailrelay1.diasemi.com (10.1.17.243) by NB-EX-CASHUB01.diasemi.com (10.1.16.140) with Microsoft SMTP Server id 14.3.248.2; Thu, 24 Sep 2015 19:19:50 +0200 Received: from swsrvapps-01.diasemi.com (Not Verified[10.20.28.141]) by mailrelay1.diasemi.com with ESMTP Gateway id ; Thu, 24 Sep 2015 19:19:50 +0200 Received: (from athomson@localhost) by swsrvapps-01.diasemi.com (8.14.3/8.14.3/Submit/Dlg) id t8OHJnU6022352; Thu, 24 Sep 2015 18:19:49 +0100 X-Authentication-Warning: swsrvapps-01.diasemi.com: athomson set sender to Adam.Thomson.Opensource@diasemi.com using -f Message-ID: <73e9957cca4f29bd1b9881c4518132e47b2f00b4.1443113192.git.Adam.Thomson.Opensource@diasemi.com> In-Reply-To: References: From: Adam Thomson Date: Thu, 24 Sep 2015 18:19:49 +0100 To: Mark Brown , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: 8d172408-bd6a-42b1-8e53-daaedf35a5af Cc: devicetree@vger.kernel.org, alsa-devel@alsa-project.org, Jason Coughlan , linux-kernel@vger.kernel.org, Support Opensource Subject: [alsa-devel] [PATCH v2 1/4] ASoC: Add SOC_DOUBLE_R_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 _EXT version of SOC_DOUBLE_R required to allow for custom handlers. Signed-off-by: Adam Thomson --- include/sound/soc.h | 7 +++++++ 1 file changed, 7 insertions(+) -- 1.9.3 diff --git a/include/sound/soc.h b/include/sound/soc.h index 884e728..2d79cb5 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h @@ -217,6 +217,13 @@ .get = xhandler_get, .put = xhandler_put, \ .private_value = \ SOC_DOUBLE_VALUE(reg, shift_left, shift_right, max, invert, 0) } +#define SOC_DOUBLE_R_EXT(xname, reg_left, reg_right, xshift, xmax, xinvert,\ + xhandler_get, xhandler_put) \ +{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname), \ + .info = snd_soc_info_volsw, \ + .get = xhandler_get, .put = xhandler_put, \ + .private_value = SOC_DOUBLE_R_VALUE(reg_left, reg_right, xshift, \ + xmax, xinvert) } #define SOC_SINGLE_EXT_TLV(xname, xreg, xshift, xmax, xinvert,\ xhandler_get, xhandler_put, tlv_array) \ { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \