[alsa-devel] [PATCH v6 01/11] ASoC: topology: Make manifest backward compatible from ABI v4

Lin, Mengdong mengdong.lin at intel.com
Tue Nov 1 14:49:46 CET 2016


> -----Original Message-----
> From: Mark Brown [mailto:broonie at kernel.org]
> Sent: Saturday, October 29, 2016 2:47 AM
> To: mengdong.lin at linux.intel.com
> Cc: alsa-devel at alsa-project.org; tiwai at suse.de;
> liam.r.girdwood at linux.intel.com; Shah, Hardik T <hardik.t.shah at intel.com>;
> Singh, Guneshwor O <guneshwor.o.singh at intel.com>; Koul, Vinod
> <vinod.koul at intel.com>; Ughreja, Rakesh A <rakesh.a.ughreja at intel.com>;
> Lin, Mengdong <mengdong.lin at intel.com>
> Subject: Re: [PATCH v6 01/11] ASoC: topology: Make manifest backward
> compatible from ABI v4
> 
> On Tue, Oct 11, 2016 at 02:36:42PM +0800, mengdong.lin at linux.intel.com
> wrote:
> 
> > +static int manifest_new_ver(struct soc_tplg *tplg,
> > +			    struct snd_soc_tplg_manifest *src,
> > +			    struct snd_soc_tplg_manifest **manifest) {
> > +	struct snd_soc_tplg_manifest *dest;
> > +	struct snd_soc_tplg_manifest_v4 *src_v4;
> > +
> > +	*manifest = NULL;
> > +
> > +	if (src->size != sizeof(*src_v4)) {
> > +		dev_err(tplg->dev, "ASoC: invalid manifest size\n");
> > +		return -EINVAL;
> > +	}
> > +
> > +	dev_warn(tplg->dev, "ASoC: old version of manifest\n");
> 
> The way this function is written it's not going to scale to any future ABI
> churn, it's not set up to handle multiple versions at all.

If future ABI change affects this manifest struct, we'll extend this function to map all old versions to the latest one. 

Since we already add some reserved fields in the manifest, so we can use those reserved fields to assure backward compatibility and there could be no change on this function.

Thanks
Mengdong


More information about the Alsa-devel mailing list