aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/wm_adsp.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/codecs/wm_adsp.c')
-rw-r--r--sound/soc/codecs/wm_adsp.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/sound/soc/codecs/wm_adsp.c b/sound/soc/codecs/wm_adsp.c
index ff67b334065b..d01c2095452f 100644
--- a/sound/soc/codecs/wm_adsp.c
+++ b/sound/soc/codecs/wm_adsp.c
@@ -420,10 +420,9 @@ static int wm_coeff_put(struct snd_kcontrol *kcontrol,
420 420
421 memcpy(ctl->cache, p, ctl->len); 421 memcpy(ctl->cache, p, ctl->len);
422 422
423 if (!ctl->enabled) { 423 ctl->set = 1;
424 ctl->set = 1; 424 if (!ctl->enabled)
425 return 0; 425 return 0;
426 }
427 426
428 return wm_coeff_write_control(kcontrol, p, ctl->len); 427 return wm_coeff_write_control(kcontrol, p, ctl->len);
429} 428}
@@ -1185,7 +1184,6 @@ static int wm_adsp_load_coeff(struct wm_adsp *dsp)
1185 int ret, pos, blocks, type, offset, reg; 1184 int ret, pos, blocks, type, offset, reg;
1186 char *file; 1185 char *file;
1187 struct wm_adsp_buf *buf; 1186 struct wm_adsp_buf *buf;
1188 int tmp;
1189 1187
1190 file = kzalloc(PAGE_SIZE, GFP_KERNEL); 1188 file = kzalloc(PAGE_SIZE, GFP_KERNEL);
1191 if (file == NULL) 1189 if (file == NULL)
@@ -1335,12 +1333,7 @@ static int wm_adsp_load_coeff(struct wm_adsp *dsp)
1335 } 1333 }
1336 } 1334 }
1337 1335
1338 tmp = le32_to_cpu(blk->len) % 4; 1336 pos += (le32_to_cpu(blk->len) + sizeof(*blk) + 3) & ~0x03;
1339 if (tmp)
1340 pos += le32_to_cpu(blk->len) + (4 - tmp) + sizeof(*blk);
1341 else
1342 pos += le32_to_cpu(blk->len) + sizeof(*blk);
1343
1344 blocks++; 1337 blocks++;
1345 } 1338 }
1346 1339