diff options
author | Charles Keepax <ckeepax@opensource.wolfsonmicro.com> | 2015-04-13 13:28:02 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-04-27 15:38:25 +0100 |
commit | 2323736dca72ff368ff47ea23d1a710020db0618 (patch) | |
tree | c25084f2ca2a7f6380c55b7872c3668c6fa67a00 /sound/soc/codecs/wmfw.h | |
parent | b21acc1c370f72ccbe9735fd583d15db8a1f80c1 (diff) |
ASoC: wm_adsp: Add basic support for rev 1 firmware file format
Revision one of the file format includes new algorithm and coefficient
blocks which provide additional information about the controls exported
by the firmware. This patch updates the processing to handle this
version of the file format. Note that whilst this version of the format
adds support for specifying a name for the control through the firmware
file this has not been used and to keep compatibility with existing
deployments no changes to the firmware control naming are made by this
patch.
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/wmfw.h')
-rw-r--r-- | sound/soc/codecs/wmfw.h | 35 |
1 files changed, 32 insertions, 3 deletions
diff --git a/sound/soc/codecs/wmfw.h b/sound/soc/codecs/wmfw.h index 34c14b5916c0..04690b238b3c 100644 --- a/sound/soc/codecs/wmfw.h +++ b/sound/soc/codecs/wmfw.h @@ -15,6 +15,12 @@ #include <linux/types.h> +#define WMFW_MAX_ALG_NAME 256 +#define WMFW_MAX_ALG_DESCR_NAME 256 + +#define WMFW_MAX_COEFF_NAME 256 +#define WMFW_MAX_COEFF_DESCR_NAME 256 + struct wmfw_header { char magic[4]; __le32 len; @@ -90,6 +96,28 @@ struct wmfw_adsp2_alg_hdr { __be32 ym; } __packed; +struct wmfw_adsp_alg_data { + __le32 id; + u8 name[WMFW_MAX_ALG_NAME]; + u8 descr[WMFW_MAX_ALG_DESCR_NAME]; + __le32 ncoeff; + u8 data[]; +} __packed; + +struct wmfw_adsp_coeff_data { + struct { + __le16 offset; + __le16 type; + __le32 size; + } hdr; + u8 name[WMFW_MAX_COEFF_NAME]; + u8 descr[WMFW_MAX_COEFF_DESCR_NAME]; + __le16 ctl_type; + __le16 flags; + __le32 len; + u8 data[]; +} __packed; + struct wmfw_coeff_hdr { u8 magic[4]; __le32 len; @@ -117,9 +145,10 @@ struct wmfw_coeff_item { #define WMFW_ADSP1 1 #define WMFW_ADSP2 2 -#define WMFW_ABSOLUTE 0xf0 -#define WMFW_NAME_TEXT 0xfe -#define WMFW_INFO_TEXT 0xff +#define WMFW_ABSOLUTE 0xf0 +#define WMFW_ALGORITHM_DATA 0xf2 +#define WMFW_NAME_TEXT 0xfe +#define WMFW_INFO_TEXT 0xff #define WMFW_ADSP1_PM 2 #define WMFW_ADSP1_DM 3 |