Merge pull request #318 from singalsu/eq_iir_fix_comp_data_retrieve

EQ IIR: Fix just introduced bug in eq_iir_cache()
This commit is contained in:
Liam Girdwood 2018-09-06 14:19:39 +01:00 committed by GitHub
commit 051f827dbb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 1 deletions

View File

@ -564,12 +564,13 @@ static int eq_iir_reset(struct comp_dev *dev)
static void eq_iir_cache(struct comp_dev *dev, int cmd)
{
struct comp_data *cd = comp_get_drvdata(dev);
struct comp_data *cd;
switch (cmd) {
case COMP_CACHE_WRITEBACK_INV:
trace_eq("wtb");
cd = comp_get_drvdata(dev);
if (cd->config)
dcache_writeback_invalidate_region(cd->config,
cd->config->size);
@ -586,6 +587,11 @@ static void eq_iir_cache(struct comp_dev *dev, int cmd)
trace_eq("inv");
dcache_invalidate_region(dev, sizeof(*dev));
/* Note: The component data need to be retrieved after
* the dev data has been invalidated.
*/
cd = comp_get_drvdata(dev);
dcache_invalidate_region(cd, sizeof(*cd));
if (cd->iir_delay)