Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp2948468imm; Thu, 24 May 2018 19:41:39 -0700 (PDT) X-Google-Smtp-Source: AB8JxZp3PpQmlcbdz8mIgLuTx8f4hExYL3PGu/yT8Ou/3SRJVzH12tpxn4NuEDthBYnP2yYI4g0a X-Received: by 2002:a65:5b8a:: with SMTP id i10-v6mr482410pgr.352.1527216099209; Thu, 24 May 2018 19:41:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527216099; cv=none; d=google.com; s=arc-20160816; b=cHsJAI2uX3fP/NZyADT6iKgHJQUS0glAam6xH9Ojd+8BcqHQ3Zlxtx3A1R5UVV2ftq jJYH1KRIVVH+x365WaeydPWWyMlKojtDBh6VrC5DfIgIf2Uj1smaPuySzXS3e0nTfxvx kJwS5PooLcroBF04D429XlamhbEra/JdmfUjwqBsk/MZGoSVoMOwCygdaJPoc11Ew99z Uxsgmxrmikc8Yz2up8VboONUrKgJv/AuuOCXnPf/3eZkVVPiW46HalHAnDD2wvrVetSV tFzcwB/yQ+AfErGJUBQx6DOShHMAowKbuq75ASa0LK8fRePS68QY6n+FpGzZ92be6P6E Vk0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=0AARM7+OHRqSKvDS/h4ZtcUWBPY2ydX5JTTGWGSdT2A=; b=GTcn+zUIMTE+i9PGoshZOT9d8Tg1VLG7uzogTqqWztmTHBulDAhiJ6LawU4mwKRD0Q 6elEMQYEpQGa+LLirzmLx1s2ZuXWn+XgLoQXI5hZNF2ZN7QyqNXwnbBGYcll3jNQKc8j MZPh2z9V4W8m/XzbAdi11tHQlH6Z1+KpwjKS6HzBfnLGwaS5vjermivGR4km2iepsxFG VsHrm/pUYXdbidCqROqvN2m/rALTxR48vRRL14JDu4AjlyWQBvnjp5qwJ0Ynwwzw5ADj u6xkAfZbpGzNfC/UdBvkmD54xyQlC3IvCVOJw3Bz9KT9ATT09H0oxyflARc9rivTRJOn teCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@roeck-us.net header.s=default header.b=j3DFnNH8; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g2-v6si1389236pgq.161.2018.05.24.19.41.24; Thu, 24 May 2018 19:41:39 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@roeck-us.net header.s=default header.b=j3DFnNH8; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S971226AbeEXTtq (ORCPT + 99 others); Thu, 24 May 2018 15:49:46 -0400 Received: from bh-25.webhostbox.net ([208.91.199.152]:52020 "EHLO bh-25.webhostbox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966483AbeEXTt3 (ORCPT ); Thu, 24 May 2018 15:49:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=roeck-us.net; s=default; h=References:In-Reply-To:Message-Id:Date:Subject: Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=0AARM7+OHRqSKvDS/h4ZtcUWBPY2ydX5JTTGWGSdT2A=; b=j3DFnNH8gonFOCLGhzG9wi5WL TEknB9EmfL8Nf1r0+cCj1PV5yq9X3iAcBaZMw+a1L8fnbGKtpOPUo8DWzKqEnrdvJuFhDdn3GaCn2 Tfo7YcB/PxiDKKIy6F4m9wLeiwqpZWpghgpSTP7KBdcx6s5QZ9IpT7lRy99cQBA+zbn/aJltKSO6I 4yoD7b26ixAQ26YRW5PeH/KiyKS2cMZPxy4Ihy7JfRbps81953tkZSmdQw0RuMdy0LGT9GIFLGZFS uJzcRQbbX2j+OoHSyHAh57IKFuRVvrA5DXCH2dVYVAgx0/zi/soFpP3VzQt02Qe0hPubmLxRo57S6 g55FgADsQ==; Received: from 108-223-40-66.lightspeed.sntcca.sbcglobal.net ([108.223.40.66]:60308 helo=localhost) by bh-25.webhostbox.net with esmtpa (Exim 4.89) (envelope-from ) id 1fLwEp-000qRb-4c; Thu, 24 May 2018 19:49:27 +0000 From: Guenter Roeck To: Takashi Iwai , Mark Brown , Liam Girdwood Cc: Jaroslav Kysela , Chintan Patel , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Pierre-Louis Bossart , Guenter Roeck Subject: [PATCH v2 2/3] ASoC: topology: Move v4 manifest header data structures to uapi Date: Thu, 24 May 2018 12:49:22 -0700 Message-Id: <1527191363-21021-2-git-send-email-linux@roeck-us.net> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1527191363-21021-1-git-send-email-linux@roeck-us.net> References: <1527191363-21021-1-git-send-email-linux@roeck-us.net> X-Authenticated_sender: guenter@roeck-us.net X-OutGoing-Spam-Status: No, score=-1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - bh-25.webhostbox.net X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - roeck-us.net X-Get-Message-Sender-Via: bh-25.webhostbox.net: authenticated_id: guenter@roeck-us.net X-Authenticated-Sender: bh-25.webhostbox.net: guenter@roeck-us.net X-Source: X-Source-Args: X-Source-Dir: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Guenter Roeck Topology manifest v4 is still part of the ABI. Move its data structures into the uapi header file. No functional change. Signed-off-by: Guenter Roeck --- v2: Added patch to series include/uapi/sound/asoc.h | 57 +++++++++++++++++++++++++++++++++++++++ sound/soc/soc-topology.c | 56 -------------------------------------- 2 files changed, 57 insertions(+), 56 deletions(-) diff --git a/include/uapi/sound/asoc.h b/include/uapi/sound/asoc.h index 69c37ecbff7e..a9df4900789c 100644 --- a/include/uapi/sound/asoc.h +++ b/include/uapi/sound/asoc.h @@ -552,4 +552,61 @@ struct snd_soc_tplg_dai { __le32 flags; /* SND_SOC_TPLG_DAI_FLGBIT_* */ struct snd_soc_tplg_private priv; } __attribute__((packed)); + +/* + * Old version of ABI structs, supported for backward compatibility. + */ + +/* Manifest v4 */ +struct snd_soc_tplg_manifest_v4 { + __le32 size; /* in bytes of this structure */ + __le32 control_elems; /* number of control elements */ + __le32 widget_elems; /* number of widget elements */ + __le32 graph_elems; /* number of graph elements */ + __le32 pcm_elems; /* number of PCM elements */ + __le32 dai_link_elems; /* number of DAI link elements */ + struct snd_soc_tplg_private priv; +} __packed; + +/* Stream Capabilities v4 */ +struct snd_soc_tplg_stream_caps_v4 { + __le32 size; /* in bytes of this structure */ + char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; + __le64 formats; /* supported formats SNDRV_PCM_FMTBIT_* */ + __le32 rates; /* supported rates SNDRV_PCM_RATE_* */ + __le32 rate_min; /* min rate */ + __le32 rate_max; /* max rate */ + __le32 channels_min; /* min channels */ + __le32 channels_max; /* max channels */ + __le32 periods_min; /* min number of periods */ + __le32 periods_max; /* max number of periods */ + __le32 period_size_min; /* min period size bytes */ + __le32 period_size_max; /* max period size bytes */ + __le32 buffer_size_min; /* min buffer size bytes */ + __le32 buffer_size_max; /* max buffer size bytes */ +} __packed; + +/* PCM v4 */ +struct snd_soc_tplg_pcm_v4 { + __le32 size; /* in bytes of this structure */ + char pcm_name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; + char dai_name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; + __le32 pcm_id; /* unique ID - used to match with DAI link */ + __le32 dai_id; /* unique ID - used to match */ + __le32 playback; /* supports playback mode */ + __le32 capture; /* supports capture mode */ + __le32 compress; /* 1 = compressed; 0 = PCM */ + struct snd_soc_tplg_stream stream[SND_SOC_TPLG_STREAM_CONFIG_MAX]; /* for DAI link */ + __le32 num_streams; /* number of streams */ + struct snd_soc_tplg_stream_caps_v4 caps[2]; /* playback and capture for DAI */ +} __packed; + +/* Physical link config v4 */ +struct snd_soc_tplg_link_config_v4 { + __le32 size; /* in bytes of this structure */ + __le32 id; /* unique ID - used to match */ + struct snd_soc_tplg_stream stream[SND_SOC_TPLG_STREAM_CONFIG_MAX]; /* supported configs playback and captrure */ + __le32 num_streams; /* number of streams */ +} __packed; + #endif diff --git a/sound/soc/soc-topology.c b/sound/soc/soc-topology.c index d66b2e5ccd67..40753c6a2554 100644 --- a/sound/soc/soc-topology.c +++ b/sound/soc/soc-topology.c @@ -54,62 +54,6 @@ #define SOC_TPLG_PASS_START SOC_TPLG_PASS_MANIFEST #define SOC_TPLG_PASS_END SOC_TPLG_PASS_LINK -/* - * Old version of ABI structs, supported for backward compatibility. - */ - -/* Manifest v4 */ -struct snd_soc_tplg_manifest_v4 { - __le32 size; /* in bytes of this structure */ - __le32 control_elems; /* number of control elements */ - __le32 widget_elems; /* number of widget elements */ - __le32 graph_elems; /* number of graph elements */ - __le32 pcm_elems; /* number of PCM elements */ - __le32 dai_link_elems; /* number of DAI link elements */ - struct snd_soc_tplg_private priv; -} __packed; - -/* Stream Capabilities v4 */ -struct snd_soc_tplg_stream_caps_v4 { - __le32 size; /* in bytes of this structure */ - char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; - __le64 formats; /* supported formats SNDRV_PCM_FMTBIT_* */ - __le32 rates; /* supported rates SNDRV_PCM_RATE_* */ - __le32 rate_min; /* min rate */ - __le32 rate_max; /* max rate */ - __le32 channels_min; /* min channels */ - __le32 channels_max; /* max channels */ - __le32 periods_min; /* min number of periods */ - __le32 periods_max; /* max number of periods */ - __le32 period_size_min; /* min period size bytes */ - __le32 period_size_max; /* max period size bytes */ - __le32 buffer_size_min; /* min buffer size bytes */ - __le32 buffer_size_max; /* max buffer size bytes */ -} __packed; - -/* PCM v4 */ -struct snd_soc_tplg_pcm_v4 { - __le32 size; /* in bytes of this structure */ - char pcm_name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; - char dai_name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; - __le32 pcm_id; /* unique ID - used to match with DAI link */ - __le32 dai_id; /* unique ID - used to match */ - __le32 playback; /* supports playback mode */ - __le32 capture; /* supports capture mode */ - __le32 compress; /* 1 = compressed; 0 = PCM */ - struct snd_soc_tplg_stream stream[SND_SOC_TPLG_STREAM_CONFIG_MAX]; /* for DAI link */ - __le32 num_streams; /* number of streams */ - struct snd_soc_tplg_stream_caps_v4 caps[2]; /* playback and capture for DAI */ -} __packed; - -/* Physical link config v4 */ -struct snd_soc_tplg_link_config_v4 { - __le32 size; /* in bytes of this structure */ - __le32 id; /* unique ID - used to match */ - struct snd_soc_tplg_stream stream[SND_SOC_TPLG_STREAM_CONFIG_MAX]; /* supported configs playback and captrure */ - __le32 num_streams; /* number of streams */ -} __packed; - /* topology context */ struct soc_tplg { const struct firmware *fw; -- 2.17.0.441.gb46fe60e1d-goog