From patchwork Wed Aug 5 13:41:51 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liam Girdwood X-Patchwork-Id: 6950071 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 8B06D9F39D for ; Wed, 5 Aug 2015 13:51:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B27E820272 for ; Wed, 5 Aug 2015 13:51:31 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 8451020430 for ; Wed, 5 Aug 2015 13:51:30 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 70D3A266088; Wed, 5 Aug 2015 15:51:29 +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,NO_DNS_FOR_FROM, 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 B77CD266094; Wed, 5 Aug 2015 15:48: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 C535F266088; Wed, 5 Aug 2015 15:48:08 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by alsa0.perex.cz (Postfix) with ESMTP id 73AA4265FA3 for ; Wed, 5 Aug 2015 15:42:14 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga103.jf.intel.com with ESMTP; 05 Aug 2015 06:42:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,617,1432623600"; d="scan'208";a="778310967" Received: from unknown (HELO loki.ger.corp.intel.com) ([10.252.23.69]) by orsmga002.jf.intel.com with ESMTP; 05 Aug 2015 06:42:11 -0700 From: Liam Girdwood To: Date: Wed, 5 Aug 2015 14:41:51 +0100 Message-Id: <1438782111-20025-3-git-send-email-liam.r.girdwood@linux.intel.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1438782111-20025-1-git-send-email-liam.r.girdwood@linux.intel.com> References: <1438782111-20025-1-git-send-email-liam.r.girdwood@linux.intel.com> Cc: Takashi Iwai , Mengdong Lin , Mark Brown , Liam Girdwood Subject: [alsa-devel] [PATCH v2 2/2] topology: Add ops support to byte control objects. 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 From: Mengdong Lin Rename the control ops structure to make it more generic so we can use it with other objects like bytes controls. Add this structure to the byte control structure. Signed-off-by: Mengdong Lin Signed-off-by: Liam Girdwood --- include/sound/asoc.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/include/sound/asoc.h b/include/sound/asoc.h index 73eb80e..c642855 100644 --- a/include/sound/asoc.h +++ b/include/sound/asoc.h @@ -161,9 +161,11 @@ struct snd_soc_tplg_channel { } __attribute__((packed)); /* - * Kcontrol Operations IDs + * Genericl Operations IDs, for binding Kcontrol or Bytes ext ops + * Kcontrol ops need get/put/info. + * Bytes ext ops need get/put. */ -struct snd_soc_tplg_kcontrol_ops_id { +struct snd_soc_tplg_io_ops { __le32 get; __le32 put; __le32 info; @@ -177,7 +179,7 @@ struct snd_soc_tplg_ctl_hdr { __le32 type; char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; __le32 access; - struct snd_soc_tplg_kcontrol_ops_id ops; + struct snd_soc_tplg_io_ops ops; struct snd_soc_tplg_ctl_tlv tlv; } __attribute__((packed)); @@ -309,6 +311,7 @@ struct snd_soc_tplg_bytes_control { __le32 mask; __le32 base; __le32 num_regs; + struct snd_soc_tplg_io_ops ext_ops; struct snd_soc_tplg_private priv; } __attribute__((packed));