firmware: cs_dsp: Add version checks on coefficient loading
authorCharles Keepax <ckeepax@opensource.cirrus.com>
Wed, 17 Nov 2021 13:22:53 +0000 (13:22 +0000)
committerMark Brown <broonie@kernel.org>
Wed, 17 Nov 2021 22:16:21 +0000 (22:16 +0000)
commit2925748eadc33cba3bded7b69475a1b002b124ac
treeec7130df3cbf7ab0d164d820a7141374f2585ecf
parent5065cfabec21a4acf562932f1d0a814c119e0a69
firmware: cs_dsp: Add version checks on coefficient loading

The firmware coefficient files contain version information that is
currently ignored by the cs_dsp code. This information specifies which
version of the firmware the coefficient were generated for. Add a check
into the code which prints a warning in the case the coefficient and
firmware differ in version, in many cases this will be ok but it is not
always, so best to let the user know there is a potential issue.

Co-authored-by: Simon Trimmer <simont@opensource.cirrus.com>
Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20211117132300.1290-3-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/firmware/cirrus/cs_dsp.c
include/linux/firmware/cirrus/cs_dsp.h