Repository navigation
DMIC: eliminate the gain ramping task - #5852
Conversation
|
@juimonen, pls take a look, we need to sync changes with zephyr dai. |
|
Internal tests are not working properly now. |
lgirdwood
left a comment
There was a problem hiding this comment.
Can we simplify and do the ramp at the start of copy() instead of adding another callback ?
|
I think it makes sense here to add copy() to the DAIs (like everything else) and keep the interface simple (and saves an extra call) |
It is just a matter of name, .copy or .pre_copy - would be called anyway at the same moment. The point is - this method does not do any copying, it is a dma/dai job |
Agree, copy() naming does not align with usage today - but soon this call will be updated to the module C API and be called process() and this is a better naming/meaning match. Adding a new API adds a bit more complexity when it comes to the module API and I'd like to avoid and reuse (where good mapping permits). |
@lgirdwood but I should call it |
Yes, call it copy() today - there will be a subsequent update that then renames later and aligns with the module API. |
The capture ramps have been the same for a long time. If something has changed there could be a new bug. But I don't think CI tests the ramp shape, it can only detect no audio or much too silent audio kind of cases. |
|
Two CI tests failed with a timeout: suspend-resume-with-playback on WHL_UPEXT_HDA_ZEPHYR https://sof-ci.01.org/sofpr/PR5852/build515/devicetest/?model=WHL_UPEXT_HDA_ZEPHYR&testcase=check-suspend-resume-with-playback-5 and ipc-flood on BYT_MB_NOCODEC https://sof-ci.01.org/sofpr/PR5852/build515/devicetest/?model=BYT_MB_NOCODEC&testcase=check-ipc-flood - both supposedly unrelated |
singalsu
left a comment
There was a problem hiding this comment.
Looks good to me, great work! There's some conflict, so a rebase is needed.
|
Rerun CI as not expecting a build failure on only 1 platform. |
|
SOFCI TEST |
There was a problem hiding this comment.
A bit of documentation would be nice. In the context of the dmic problem this is easily understandable, but if you zoom out a bit, a copy method with no arguments looks very odd. Copy what and where?
|
@mmaka1 did you have any comments here - is this OK as part of the path forward to a copier API ? |
Add a DAI copy method to be called before dma_copy(). Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
DAI drivers sometimes need to access the underlying component object. Make this possible by adding a pointer to struct dai_data into struct dai and to struct comp_dev into struct dai_data and by assigning those pointers accordingly. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Currently the DMIC driver uses a separate task to implement its gain ramping. This creates a race during driver clean up. Avoid an additional asynchronous context by performing the ramping in DAI's .copy() context. Use the DAI's .copy() method for that. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
|
@lgirdwood CI on-device are 2 unrelated suspend -resume failures: https://sof-ci.01.org/sofpr/PR5852/build602/devicetest/?model=TGLU_UP_HDA_ZEPHYR&testcase=check-suspend-resume-5 and https://sof-ci.01.org/sofpr/PR5852/build602/devicetest/?model=WHL_UPEXT_HDA_ZEPHYR&testcase=check-suspend-resume-with-capture-5, checkpatch is complaining about a line, ending in '(' which I agree isn't pretty but looked like the best option in that case to avoid way too long a line |
|
@mmaka1 ping ? |
|
Merging since this fixes an issue, we can align to copier APIs incrementally. |
The DMIC driver currently uses a separate task to perform gain ramping on start up. This can be achieved from the
.copy()context avoiding an additional asynchronous context and races associated with it.