Repository navigation
audio: host: reload DMA when partial_size is non zero - #8743
Conversation
b27051b to
ba612d9
Compare
kv2019i
left a comment
There was a problem hiding this comment.
Some comments inline, please check
| @@ -449,8 +449,20 @@ static int host_copy_normal(struct host_data *hd, struct comp_dev *dev, copy_cal | |||
| comp_dbg(dev, "host_copy_normal()"); | |||
There was a problem hiding this comment.
On the commit message, the git commit prefix should refer to the component changed, i.e. here "audio: host: ".
Could you explain a bit in which case this happens. "src" -> resampler case?
There was a problem hiding this comment.
Kai, thanks for feedback.
Regarding the commit message, I will make a correction to specify the component as "audio: host."
Regarding the scenario in which this could happen:
This condition typically occurs at the end of a stream, where the last data chunk does not meet the condition for reload DMA buffer (e.g., large buffers), leaving a non-zero partial_size.
|
|
||
| hd->partial_size = 0; | ||
| } | ||
| } |
There was a problem hiding this comment.
This seems to duplicate the logic at the end of the functions, so how about instaed:
if (copy_bytes)
cb(dev, copy_bytes);
if (!hd->partial_bytes)
return 0;
And let the existing code to call dma_reload at the end of the function.
There was a problem hiding this comment.
@dnikodem Ack, so above won't work with CONFIG_HOST_DMA_RELOAD_DELAY_ENABLE=y and if we get repeated calls copy_bytes==0 (stream is ending). So back to original version (with just the commit message clarified) is ok to me
|
Another DSP panic on suspend/resume. We seem to somehow get better and collecting logs on suspend/resume failures as opposed to just TIMEOUTs. Probably unrelated to this PR. EDIT: looks similar to DSP panic #8721 which was bisected. |
This patch ensures that the DMA buffer is reloaded when partial_size is non-zero, even if copy_bytes is zero. This condition typically occurs at the end of a stream, where the last data chunk does not meet the condition for reload DMA buffer, leaving a non-zero partial_size. Signed-off-by: Damian Nikodem <damian.nikodem@intel.com>
ba612d9 to
bc7f5f3
Compare
When partial_size is non-zero and copy_bytes equals zero, the DMA buffer should be reloaded. Otherwise, the DMA status registers will indicate incorrect values.