From: Lars-Peter Clausen <lars@metafoo.de>
To: Mark Brown <broonie@kernel.org>, Takashi Iwai <tiwai@suse.de>
Cc: Liam Girdwood <liam.r.girdwood@linux.intel.com>,
"Koul, Vinod" <vinod.koul@intel.com>,
"alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>
Subject: Re: [RFC 1/4] ASoC: topology: Add topology UAPI header.
Date: Tue, 21 Apr 2015 18:46:28 +0200 [thread overview]
Message-ID: <55367EE4.5030201@metafoo.de> (raw)
In-Reply-To: <20150421163502.GL22845@sirena.org.uk>
On 04/21/2015 06:35 PM, Mark Brown wrote:
> On Tue, Apr 21, 2015 at 05:23:36PM +0200, Takashi Iwai wrote:
>> Mark Brown wrote:
>
>>> That's sounding like an awfully small number if we're trying to be
>>> infititely future proof (obviously the default value for that is 640k!).
>>> We'd also need to go through and give *all* the structures padding. How
>>> about just adding length fields instead with a rule that if the
>>> structure is bigger than you know about just ignore anything at the end?
>
>> In theory, having only "abi" field should be enough, as we can know
>> the size predefined for each ABI version. But I agree that it'd be
>> friendlier for a parser if the header itself declares its size,
>> e.g. via a header_size field or embedding the size into some check
>> field like ioctl.
>
> The trouble with the ABI version information is that it tells new
> kernels how to handle old tables but old kernels will have no idea what
> to do with new firmwares.
What I did for the SigmaDSP firmware format (which can hopefully be
superseded by this) is to have a header which a block type and the block
length for each block for exactly this reason. It allows fully backward and
forward compatibility between kernel versions and does not require a change
in the ABI each time a new type of block is added. It also keeps the parser
simple since it does not have to know the size and also makes support for
vendor blocks quite easy, since the processing of those can be offloaded to
some vendor callbacks without the core having to be informed what the
content or size of those vendor blocks is.
- Lars
next prev parent reply other threads:[~2015-04-21 16:46 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-16 20:48 [RFC 1/4] ASoC: topology: Add topology UAPI header Liam Girdwood
2015-04-20 21:30 ` Mark Brown
2015-04-21 9:47 ` Liam Girdwood
2015-04-21 10:02 ` Takashi Iwai
2015-04-21 12:43 ` Liam Girdwood
2015-04-21 13:17 ` Takashi Iwai
2015-04-21 15:03 ` Mark Brown
2015-04-21 15:23 ` Takashi Iwai
2015-04-21 16:35 ` Mark Brown
2015-04-21 16:46 ` Lars-Peter Clausen [this message]
2015-04-22 11:24 ` Mark Brown
2015-04-22 11:30 ` Liam Girdwood
2015-04-21 19:05 ` Takashi Iwai
2015-04-21 17:01 ` Lars-Peter Clausen
2015-04-22 11:16 ` Liam Girdwood
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=55367EE4.5030201@metafoo.de \
--to=lars@metafoo.de \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=liam.r.girdwood@linux.intel.com \
--cc=tiwai@suse.de \
--cc=vinod.koul@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox