Merge ba56a64009 on remote branch

Change-Id: I822889bd320f8398a5cce4ffa6502416c09a9c4d
This commit is contained in:
Linux Build Service Account 2023-07-30 22:33:18 -07:00
commit 1fc2c1cc2f
2 changed files with 8 additions and 1 deletions

View file

@ -782,6 +782,13 @@ static int msm_lsm_reg_model(struct snd_pcm_substream *substream,
q6lsm_sm_set_param_data(client, p_info, &offset, sm);
if ((sm->size - offset) < p_info->param_size) {
dev_err(rtd->dev, "%s: user buff size is greater than expected\n",
__func__);
rc = -EINVAL;
goto err_copy;
}
/*
* For set_param, advance the sound model data with the
* number of bytes required by param_data.

View file

@ -1336,7 +1336,7 @@ static int msm_pcm_capture_copy(struct snd_pcm_substream *substream,
goto fail;
}
if (size == 0 || size < prtd->pcm_count) {
if ((size == 0 || size < prtd->pcm_count) && ((offset + size) < prtd->pcm_count)) {
memset(bufptr + offset + size, 0, prtd->pcm_count - size);
if (fbytes > prtd->pcm_count)
size = xfer = prtd->pcm_count;