Uh oh!
There was an error while loading. Please reload this page.
Audio: IGO_NR: Convert to module adapter - #8301
Conversation
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
9918c61 to
cd4e32aCompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
cd4e32a to
5d0fd84CompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
5d0fd84 to
2af73d8Compare2af73d8 to
2a18630CompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
btian1
left a comment
There was a problem hiding this comment.
that's definitely not one PR work, right? title is convert to module interface, inside PR, at least 3 tasks are done, do you want to split it to several PRs? for better review/merge/track?
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
The problem is that the component didn't work even with IPC3. It's impossible to test without all the changes included. Since this is a closed component and not useful without licensing it, I'd like to pass this with small effort to make this testable again. The owner or licensors of this should do the extra polishing effort. |
lgirdwood
commented
Dec 18, 2023
Ack - the aim here is not to change functionality or improve performance, but to do the mechanical work to bring it to the module API. Once at module API, it can then be integrated by folks who work on this module. |
2a18630 to
ffca82fCompare| case SOF_IPC4_SWITCH_CONTROL_PARAM_ID: | ||
| comp_info(dev, "igo_nr_cmd_set_config(), SOF_IPC4_SWITCH_CONTROL_PARAM_ID"); | ||
| return igo_nr_set_chan(mod, ctl); | ||
| return 0; |
There was a problem hiding this comment.
Oops, wasn't fixed. Done now.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| ptr = (char *)ptr - cir_buf_size; | ||
| return ptr; | ||
| } |
There was a problem hiding this comment.
static inline void *cir_buf_wrap(void *ptr, void *buf_addr, void *buf_end)
{
if (ptr >= buf_end)
ptr = (char *)buf_addr +
((char *)ptr - (char *)buf_end);
assert((intptr_t)ptr <= (intptr_t)buf_end);
return ptr;
}
why not directly use this?
There was a problem hiding this comment.
I don't see issues in what I proposed.
There was a problem hiding this comment.
check https://github.com/thesofproject/sof/blob/main/src/include/sof/audio/audio_stream.h#L414
you don't need define a new one.
There was a problem hiding this comment.
OK, I've changed and tested it now - pushing new version!
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
lgirdwood
commented
Dec 20, 2023
@lyakh@btian1 we only need to focus review on the changes to use the module API. This PR is not about improving the existing IGO code as we need to minimize the change surface here to module API integration only. So yes, there are lots of ways the IGO code can be improved, but we need to get integration with module API done before any other code improvements. Same goes for all 3P modules integrations to module API. |
ffca82f to
4b17596Comparesingalsu
commented
Jan 4, 2024
I rebased and fixed rimage related conflicts. This version sounds choppy in playback test (sof-hda-benchmark-igo_nr32-tgl.tplg). |
singalsu
commented
Jan 4, 2024
Correction, the issue was in my test setup: DUT -> USB sound card -> PC. Hooking headphones directly to DUT fixed the choppy playback. Also I was able to fix the choppy sounding test setup afterwards. So, this version is OK. Also note for testing. Since there is no DP scheduler for TGL, I'm not able to process 768 frame size (16 ms), so I've made this code change (not in PR) just for my own DUT test run: Need to address the DP rimage mode for MTL and example topology later. In TGL changing the period in topology to 16 ms has no impact since IPC4 assumes 1 ms for LL scheduling. |
4b17596 to
582836cCompare582836c to
4150713Compare| ptr = (char *)ptr - cir_buf_size; | ||
| return ptr; | ||
| } |
There was a problem hiding this comment.
check https://github.com/thesofproject/sof/blob/main/src/include/sof/audio/audio_stream.h#L414
you don't need define a new one.
4150713 to
419e505Compare419e505 to
068240bComparelgirdwood
commented
Jan 17, 2024
@singalsu conflicts, probably since RTNR merged. |
This patch converts this component to module adapter API. - New() becomes simpler init() - Params() is handled in module adapter, in init() "mod->verify_params_flags = BUFF_PARAMS_RATE;" replaces igo_nr_verify_params(). - Rates check in params() is placed to separate function igo_nr_check_params() to be called from prepare(). - cmd() handler is changed to module adapter client style with igo_nr_set_config() and igo_nr_get_config(). - igo_nr_process() and igo_nr_copy() are merged to module API style igo_nr_process() function. - igo_nr_prepare() sets source and sink align constraints for processing. - igo_nr_trigger() is removed, handled by module adapter. - Changes to support IPC4. Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Function igo_nr_init() expects a nonzero value for rballoc() size so this can't be left zero. The value is just something for stub usage that felt suitable for an unknown. Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This allows to build and load IGO NR stub version to testbench. Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
The source sink API is needed for DP (data processing) scheduler that is needed for 16 ms schedule rate. Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch enables to load the component in the changed platforms. Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
068240b to
3685642Compare
This is first "working" draft IPC4 version, but processing with stub library is forced to 48 frames for 1 ms LL scheduling. It obviously can't be used with the real processing library. For 16 ms need to change this further to support DP mode in IPC4.