On Wed, Aug 05, 2015 at 11:11:07AM +0100, Liam Girdwood wrote:
From: Mengdong Lin mengdong.lin@intel.com
This is the kernel patch - a corresponding alsa-lib patch has also been sent.
This patch introduces multiple changes and should really have been sent separately. Please also try to keep your commit messages and especially subject lines under 80 colummns so that they are legible.
This patch updates the topology ABI version and adds support for private data types, specfic structures for each TLV data type and refactors the operations mapping structure to be generic (so that it can be used by other types). This code is only used within Intel atm and is not in an official alsa-lib release so impact should be minimali for the ABI update.
Note that once v4.2 comes out then the kernel ABI will have been in a kernel release and we're going to have to be a lot more conservative about these things.
Removed the following fields from topology TLV struct:
- size/count: type can decide the size.
struct snd_soc_tplg_ctl_tlv {
- __le32 size; /* in bytes aligned to 4 */
- __le32 numid; /* control element numeric identification */
- __le32 count; /* number of elem in data array */
- __le32 data[SND_SOC_TPLG_TLV_SIZE];
- __le32 size; /* in bytes of this structure */
- __le32 type; /* SNDRV_CTL_TLVT_*, type of TLV */
- union {
struct snd_soc_tplg_tlv_dbscale scale;
- };
The combination of removing size fromm the struct and not having data means that we can't in the future add a new type which has a larger size than the current one without confusing older systems (Rather than just having them drop the TLV information). I'm not sure how likely that really is but it's a consideration.
- if (tc->access & SNDRV_CTL_ELEM_ACCESS_TLV_CALLBACK)
kc->tlv.c = snd_soc_bytes_tlv_callback;
- else {
Please remember to keep { } on both side of an if statement if they're on one side.