Skip to content

Conversation

@fuyuntsuo
Copy link
Contributor

Added intelliGo noise reduction wrapper codes and topology.

The proprietary static library shall be released by intelliGo via private channel upon request.

@fuyuntsuo fuyuntsuo added the TGL Applies to Tiger Lake label Apr 9, 2021
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please show me where the wrapper would reject, i don't seen anything in the params or prepare callbacks that would reject s24/s32/float or other channel counts or rates

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, that is fine, but SOF can try and open the component with an invalid format/channels/rate, even if your topology specifies certain config, do not assume that the next configuration engineer will make the same wise decisions. The code should defend against invalid configs.

@fuyuntsuo fuyuntsuo removed the TGL Applies to Tiger Lake label Apr 10, 2021
@fuyuntsuo fuyuntsuo force-pushed the main branch 2 times, most recently from 5dea5af to b018cac Compare April 12, 2021 13:52
@fuyuntsuo fuyuntsuo requested a review from cujomalainey April 12, 2021 13:54
Copy link
Contributor

@cujomalainey cujomalainey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getting better, but you are still missing your checks in either prepare or params to verify the current hardware params are valid for your capabilities.

@fuyuntsuo
Copy link
Contributor Author

getting better, but you are still missing your checks in either prepare or params to verify the current hardware params are valid for your capabilities.

Inside set_capture_func of igo_nr_prepare, we will check the sample rate and frame format.

@iuliana-prodan
Copy link
Contributor

getting better, but you are still missing your checks in either prepare or params to verify the current hardware params are valid for your capabilities.

Inside set_capture_func of igo_nr_prepare, we will check the sample rate and frame format.

Maybe I'm missing something, but I don't see where do you check for sample rate?
In set_capture_func you filter the frame format.
In igo_nr_lib_init, called from igo_nr_prepare, you just set the number of channels to 1 and the sample rate to 16000.
I don't see any validation.

Copy link
Contributor

@cujomalainey cujomalainey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

component looks good, Intel please verify you are ok with topology changes. Thanks for keeping with this.

@fuyuntsuo
Copy link
Contributor Author

component looks good, Intel please verify you are ok with topology changes. Thanks for keeping with this.

@cujomalainey thanks! Just updated the copyright.

@cujomalainey
Copy link
Contributor

I would ideally like to get one more review, @ranj063 mind doing a review?

@fuyuntsuo
Copy link
Contributor Author

Seems like the reviewer has not responded yet. Is there anything I can do?

I just check the CI messages again and fix most of the complains. (The remaining complains have been discussed before.)

Please let me know if there is any PR blocker other than this one.

@lgirdwood
Copy link
Member

@fuyuntsuo I will ping @ranj063 to take a look.
@kkarask @wszypelt @zrombel looks like a whole WHL series failure in CI, but this is unrelated. Good to go ?

Copy link
Collaborator

@ranj063 ranj063 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would ideally like to get one more review, @ranj063 mind doing a review?

@cujomalainey working on it now.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NULL assignemtn not necessary

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With this NULL assignment, the memory allocations afterwards can share the same error handler.

That is, when if (!cd) holds (L243:igo_nr.c), then it goes to the last and rfree(NULL) becomes nop.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry not getting this point. Is (!cd) is true, that mean cd is NULL anyway

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fuyuntsuo none of the error paths before your alloc for cd jump to err so this NULL doesn't make a difference

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets fix this incrementally.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Get it @ranj063 @cujomalainey. This issue has been resolved in #4152.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like we dont need ret at all. just remoe it and return 0?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the ret was missing. I add it back. thanks!

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry not getting it. I meant just return 0 here and remove the declaration for "ret". You're not using it at all other than initializing it to 0

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes you are right. Return 0 here is just fine. Thanks!

@ranj063
Copy link
Collaborator

ranj063 commented May 3, 2021

@ranj063 we also need dynamic pipelines merged for IGO support (to support switching between IGO and passthrough capture using the same DMIC).

@lgirdwood the dynamic pipeline PR is merged to sof-dev. Switching just the pipelines for IGO to dynamic is also supprted in topology. But like we discussed, the dynamic pipelines patches are not upstream yet and also not part of the 5.4 kernel.

Copy link
Contributor

@cujomalainey cujomalainey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ranj063 thanks for catching that, I really need to get cppcheck into the CI for those kind of errors.

This commit added IGO_NR component into sof-tgl-max98373-rt5682.m4
as DMIC capture PCM99 pipeline.

Signed-off-by: fy.tsuo <fy.tsuo@intelli-go.com>
@fuyuntsuo
Copy link
Contributor Author

Despite the changes above, I also moved a struct (L32:igo_nr.c) and a macro (L30:igo_nr.c) from igo_nr.h to igo_nr.c because they are intended to be called inside igo_nr.c only.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

return err so you dont lose the original error?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. Thanks!

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove newline

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry not getting it. I meant just return 0 here and remove the declaration for "ret". You're not using it at all other than initializing it to 0

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove new line

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But I get this warning in post-commit check. Or you are saying the new line after comp_info?
image

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fuyuntsuo this can be fixed incrementally as I'm going to tag v1.8-rc1 today. The newline needs to go after the variable declarations i.e. after line 601 and before 602.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! This issue has been resolved in #4152.

@ranj063
Copy link
Collaborator

ranj063 commented May 4, 2021

Despite the changes above, I also moved a struct (L32:igo_nr.c) and a macro (L30:igo_nr.c) from igo_nr.h to igo_nr.c because they are intended to be called inside igo_nr.c only.

Thanks for the update @fuyuntsuo. Just a few more minor comments

This commit consists of files for adding IGO_NR component in arbitrary
topology. The proprietary static library shall be released by intelliGo
via private channel upon request.

Signed-off-by: fy.tsuo <fy.tsuo@intelli-go.com>
@fuyuntsuo
Copy link
Contributor Author

Despite the changes above, I also moved a struct (L32:igo_nr.c) and a macro (L30:igo_nr.c) from igo_nr.h to igo_nr.c because they are intended to be called inside igo_nr.c only.

Thanks for the update @fuyuntsuo. Just a few more minor comments

NP. Thanks for reviewing the PR as well. All the issues have been addressed. Please review again. Thanks!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets fix this incrementally.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets remove the enum since ALSA will map the switch as an ON/OFF type control. @fuyuntsuo this can be done as an update.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fuyuntsuo this can be fixed incrementally as I'm going to tag v1.8-rc1 today. The newline needs to go after the variable declarations i.e. after line 601 and before 602.

@lgirdwood lgirdwood merged commit 37d97d4 into thesofproject:main May 5, 2021
@lgirdwood
Copy link
Member

@fuyuntsuo please fix the comments above in a new PR - we can merge this fix PR for v1.8-rc2

@fuyuntsuo
Copy link
Contributor Author

@fuyuntsuo please fix the comments above in a new PR - we can merge this fix PR for v1.8-rc2

No problem. We will address the remaining issues in the new PR. Thanks!

@fuyuntsuo
Copy link
Contributor Author

@fuyuntsuo please fix the comments above in a new PR - we can merge this fix PR for v1.8-rc2

No problem. We will address the remaining issues in the new PR. Thanks!

The new PR is #4152.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants