* [PATCH] topology: Add API to set a vendor specific version number
@ 2015-09-16 9:07 mengdong.lin
2015-09-23 8:48 ` Takashi Iwai
0 siblings, 1 reply; 5+ messages in thread
From: mengdong.lin @ 2015-09-16 9:07 UTC (permalink / raw)
To: alsa-devel
Cc: mengdong.lin, tiwai, Mengdong Lin, broonie, liam.r.girdwood,
subhransu.s.prusty
From: Mengdong Lin <mengdong.lin@intel.com>
This vendor-specific version number is optional. It will be written to
the 'version' field of each block header of the binary toplogy data file.
The vendor driver can check this number for further processing in kernel.
The topology ABI version number is still stored in the 'abi' field of
block headers.
Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Reviewed-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
---
include/topology.h | 8 ++++++++
src/topology/builder.c | 6 +++---
src/topology/parser.c | 7 +++++++
3 files changed, 18 insertions(+), 3 deletions(-)
diff --git a/include/topology.h b/include/topology.h
index 6ff8c5f..9b84bd9 100644
--- a/include/topology.h
+++ b/include/topology.h
@@ -690,6 +690,14 @@ int snd_tplg_build(snd_tplg_t *tplg, const char *outfile);
*/
int snd_tplg_set_manifest_data(snd_tplg_t *tplg, const void *data, int len);
+/**
+ * \brief Set an optional vendor specific version number.
+ * \param tplg Topology instance.
+ * \param version Vendor specific version number.
+ * \return Zero on success, otherwise a negative error code
+ */
+int snd_tplg_set_version(snd_tplg_t *tplg, unsigned int version);
+
/* \} */
#ifdef __cplusplus
diff --git a/src/topology/builder.c b/src/topology/builder.c
index 3bccd44..2f01137 100644
--- a/src/topology/builder.c
+++ b/src/topology/builder.c
@@ -89,7 +89,7 @@ static int write_data_block(snd_tplg_t *tplg, int size, int tplg_type,
/* write the header for this block */
ret = write_block_header(tplg, tplg_type, 0,
- SND_SOC_TPLG_ABI_VERSION, 0, size, 1);
+ tplg->version, 0, size, 1);
if (ret < 0) {
SNDERR("error: failed to write %s block %d\n", obj_name, ret);
return ret;
@@ -125,7 +125,7 @@ static int write_elem_block(snd_tplg_t *tplg,
}
ret = write_block_header(tplg, tplg_type, vendor_type,
- SND_SOC_TPLG_ABI_VERSION, 0, size, count);
+ tplg->version, 0, size, count);
if (ret < 0) {
SNDERR("error: failed to write %s block %d\n",
obj_name, ret);
@@ -243,7 +243,7 @@ static int write_manifest_data(snd_tplg_t *tplg)
/* write the header for this block */
ret = write_block_header(tplg, SND_SOC_TPLG_TYPE_MANIFEST, 0,
- SND_SOC_TPLG_ABI_VERSION, 0,
+ tplg->version, 0,
sizeof(tplg->manifest) + tplg->manifest.priv.size, 1);
if (ret < 0) {
SNDERR("error: failed to write manifest block %d\n", ret);
diff --git a/src/topology/parser.c b/src/topology/parser.c
index 7ca244c..c0ab5e4 100644
--- a/src/topology/parser.c
+++ b/src/topology/parser.c
@@ -362,6 +362,13 @@ int snd_tplg_set_manifest_data(snd_tplg_t *tplg, const void *data, int len)
return 0;
}
+int snd_tplg_set_version(snd_tplg_t *tplg, unsigned int version)
+{
+ tplg->version = version;
+
+ return 0;
+}
+
void snd_tplg_verbose(snd_tplg_t *tplg, int verbose)
{
tplg->verbose = verbose;
--
1.9.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] topology: Add API to set a vendor specific version number
2015-09-16 9:07 [PATCH] topology: Add API to set a vendor specific version number mengdong.lin
@ 2015-09-23 8:48 ` Takashi Iwai
2015-09-23 9:24 ` Liam Girdwood
2015-09-23 16:13 ` Lin, Mengdong
0 siblings, 2 replies; 5+ messages in thread
From: Takashi Iwai @ 2015-09-23 8:48 UTC (permalink / raw)
To: mengdong.lin
Cc: mengdong.lin, alsa-devel, broonie, subhransu.s.prusty,
liam.r.girdwood
On Wed, 16 Sep 2015 11:07:13 +0200,
mengdong.lin@intel.com wrote:
>
> From: Mengdong Lin <mengdong.lin@intel.com>
>
> This vendor-specific version number is optional. It will be written to
> the 'version' field of each block header of the binary toplogy data file.
> The vendor driver can check this number for further processing in kernel.
>
> The topology ABI version number is still stored in the 'abi' field of
> block headers.
>
> Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
> Reviewed-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Thanks, applied now. But I have concern about topology ABI/API: have
we stabilized it enough? That is, are there any missing patches in
the current kernel and alsa-lib/utils git trees that may lead to any
API/ABI incompatibilities?
Takashi
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] topology: Add API to set a vendor specific version number
2015-09-23 8:48 ` Takashi Iwai
@ 2015-09-23 9:24 ` Liam Girdwood
2015-09-23 16:13 ` Lin, Mengdong
1 sibling, 0 replies; 5+ messages in thread
From: Liam Girdwood @ 2015-09-23 9:24 UTC (permalink / raw)
To: Takashi Iwai
Cc: alsa-devel, mengdong.lin, Koul, Vinod, mengdong.lin, broonie,
subhransu.s.prusty
+ Vinod
On Wed, 2015-09-23 at 10:48 +0200, Takashi Iwai wrote:
> On Wed, 16 Sep 2015 11:07:13 +0200,
> mengdong.lin@intel.com wrote:
> >
> > From: Mengdong Lin <mengdong.lin@intel.com>
> >
> > This vendor-specific version number is optional. It will be written to
> > the 'version' field of each block header of the binary toplogy data file.
> > The vendor driver can check this number for further processing in kernel.
> >
> > The topology ABI version number is still stored in the 'abi' field of
> > block headers.
> >
> > Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
> > Reviewed-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
>
> Thanks, applied now. But I have concern about topology ABI/API: have
> we stabilized it enough? That is, are there any missing patches in
> the current kernel and alsa-lib/utils git trees that may lead to any
> API/ABI incompatibilities?
There are a couple of patches that are ABI changes afaik for PCM
config/capabilities.
Mengdong, can you point us to your latest code for alsa-lib and kernel
with the ABI updates. We can then review the final changes.
Vinod, Subhransu, please shout if there is anything missing from the
final ABI updates in Mengdongs alsa-lib/kernel branches.
Thanks
Liam
>
>
> Takashi
---------------------------------------------------------------------
Intel Corporation (UK) Limited
Registered No. 1134945 (England)
Registered Office: Pipers Way, Swindon SN3 1RJ
VAT No: 860 2173 47
This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] topology: Add API to set a vendor specific version number
2015-09-23 8:48 ` Takashi Iwai
2015-09-23 9:24 ` Liam Girdwood
@ 2015-09-23 16:13 ` Lin, Mengdong
2015-09-23 16:39 ` Mark Brown
1 sibling, 1 reply; 5+ messages in thread
From: Lin, Mengdong @ 2015-09-23 16:13 UTC (permalink / raw)
To: Takashi Iwai
Cc: alsa-devel@alsa-project.org, mengdong.lin@linux.intel.com,
Prusty, Subhransu S, broonie@kernel.org, Girdwood, Liam R
> -----Original Message-----
> From: alsa-devel-bounces@alsa-project.org
> [mailto:alsa-devel-bounces@alsa-project.org] On Behalf Of Takashi Iwai
> Sent: Wednesday, September 23, 2015 4:48 PM
> To: Lin, Mengdong
> Cc: mengdong.lin@linux.intel.com; alsa-devel@alsa-project.org;
> broonie@kernel.org; Prusty, Subhransu S; Girdwood, Liam R
> Subject: Re: [alsa-devel] [PATCH] topology: Add API to set a vendor specific
> version number
>
> On Wed, 16 Sep 2015 11:07:13 +0200,
> mengdong.lin@intel.com wrote:
> >
> > From: Mengdong Lin <mengdong.lin@intel.com>
> >
> > This vendor-specific version number is optional. It will be written to
> > the 'version' field of each block header of the binary toplogy data file.
> > The vendor driver can check this number for further processing in kernel.
> >
> > The topology ABI version number is still stored in the 'abi' field of
> > block headers.
> >
> > Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
> > Reviewed-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
>
> Thanks, applied now. But I have concern about topology ABI/API: have we
> stabilized it enough? That is, are there any missing patches in the current
> kernel and alsa-lib/utils git trees that may lead to any API/ABI
> incompatibilities?
Thank you, Takashi.
We'll upstream some topology ABI/API change soon (in 1 or 2 weeks), for DAI & DAI links.
There will be changes in the kernel and alsa-lib.
Regards
Mengdong
>
> Takashi
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] topology: Add API to set a vendor specific version number
2015-09-23 16:13 ` Lin, Mengdong
@ 2015-09-23 16:39 ` Mark Brown
0 siblings, 0 replies; 5+ messages in thread
From: Mark Brown @ 2015-09-23 16:39 UTC (permalink / raw)
To: Lin, Mengdong
Cc: Takashi Iwai, alsa-devel@alsa-project.org,
mengdong.lin@linux.intel.com, Prusty, Subhransu S,
Girdwood, Liam R
[-- Attachment #1.1: Type: text/plain, Size: 324 bytes --]
On Wed, Sep 23, 2015 at 04:13:26PM +0000, Lin, Mengdong wrote:
> We'll upstream some topology ABI/API change soon (in 1 or 2 weeks), for DAI & DAI links.
> There will be changes in the kernel and alsa-lib.
Please bear in mind that we're on -rc2 now and the later it gets the
more risk there is with getting things merged.
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-09-23 16:39 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-16 9:07 [PATCH] topology: Add API to set a vendor specific version number mengdong.lin
2015-09-23 8:48 ` Takashi Iwai
2015-09-23 9:24 ` Liam Girdwood
2015-09-23 16:13 ` Lin, Mengdong
2015-09-23 16:39 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).