From patchwork Fri Nov 6 14:37:27 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Liam Girdwood X-Patchwork-Id: 7569431 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 5AA789F4F5 for ; Fri, 6 Nov 2015 14:38:00 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9AD852068E for ; Fri, 6 Nov 2015 14:37:55 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 8DB4420690 for ; Fri, 6 Nov 2015 14:37:50 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 20E34260563; Fri, 6 Nov 2015 15:37:49 +0100 (CET) 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 [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 84A002604A1; Fri, 6 Nov 2015 15:37:41 +0100 (CET) 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 535352604E2; Fri, 6 Nov 2015 15:37:40 +0100 (CET) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by alsa0.perex.cz (Postfix) with ESMTP id 17ABA260438 for ; Fri, 6 Nov 2015 15:37:32 +0100 (CET) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga103.fm.intel.com with ESMTP; 06 Nov 2015 06:37:31 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,252,1444719600"; d="scan'208";a="844224254" Received: from mikkelss-mobl2.ger.corp.intel.com (HELO [10.252.24.70]) ([10.252.24.70]) by orsmga002.jf.intel.com with ESMTP; 06 Nov 2015 06:37:28 -0800 Message-ID: <1446820647.2776.19.camel@loki> From: Liam Girdwood To: Vinod Koul Date: Fri, 06 Nov 2015 14:37:27 +0000 In-Reply-To: References: <1446813576-29295-1-git-send-email-mengdong.lin@linux.intel.com> <20151106133118.GA18120@localhost> X-Mailer: Evolution 3.10.4-0ubuntu2 Mime-Version: 1.0 Cc: alsa-devel@alsa-project.org, mengdong.lin@linux.intel.com, Takashi Iwai , mengdong.lin@intel.com, broonie@kernel.org, subhransu.s.prusty@intel.com Subject: Re: [alsa-devel] [PATCH] topology: Include in API header file 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 On Fri, 2015-11-06 at 14:33 +0100, Takashi Iwai wrote: > On Fri, 06 Nov 2015 14:31:18 +0100, > Vinod Koul wrote: > > > > On Fri, Nov 06, 2015 at 01:59:41PM +0100, Takashi Iwai wrote: > > > On Fri, 06 Nov 2015 13:39:36 +0100, > > > mengdong.lin@linux.intel.com wrote: > > > > > > > > From: Mengdong Lin > > > > > > > > Include in the API header file topology.h > > > > > > > > The struct snd_tplg_stream_caps_template has a member "formats" > > > > of type __le64. So is needed. > > > > > > We shouldn't use __le64 for user-space API. I couldn't find it in > > > include/topology.h. Where is it used? > > > > > > Of course, it's fine to use it for kernel ABI. But then linux/types.h > > > is already included in local.h, so it shouldn't be a problem. > > > > Our tool threw this error > > > > ./local-alsa/include/alsa/topology.h:668:2: error: â__le64â does not name a > > type > > __le64 formats; /*!< supported formats SNDRV_PCM_FMTBIT_* */ > > Can you try the following patch for the userspace header. From 568f769269122e90fceee605a98a1a526db2b3d4 Mon Sep 17 00:00:00 2001 From: Liam Girdwood Date: Fri, 6 Nov 2015 14:30:36 +0000 Subject: [PATCH] topology: remove little endian type from userspace header. Use a generic unsigned long long for formats instead of an ABI endian specific __le64 type. Signed-off-by: Liam Girdwood --- include/topology.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/topology.h b/include/topology.h index b631871..1a110a2 100644 --- a/include/topology.h +++ b/include/topology.h @@ -665,7 +665,7 @@ struct snd_tplg_stream_template { */ struct snd_tplg_stream_caps_template { const char *name; /*!< name of the stream caps */ - __le64 formats; /*!< supported formats SNDRV_PCM_FMTBIT_* */ + unsigned long long formats; /*!< supported formats SNDRV_PCM_FMTBIT_* */ unsigned int rates; /*!< supported rates SNDRV_PCM_RATE_* */ unsigned int rate_min; /*!< min rate */ unsigned int rate_max; /*!< max rate */