Repository navigation
Conversation
Key phrase detector component sends async notification to KPB component using notifier module. KPB registers to specific event dedicated to key phrase detection. Once such event took place detection component calls notifier_event handler which in turn calls KPB call-back function. Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
| enum notify_id { | ||
| NOTIFIER_ID_CPU_FREQ = 0, | ||
| NOTIFIER_ID_SSP_FREQ, | ||
| NOTIFIER_ID_KEY_PHRASE_DETECTED, |
There was a problem hiding this comment.
Pls replace with some more generic name for all events sent by KPB clients, e.g. `NOTIFIER_ID_KPB_CLIENT_EVT'
| struct comp_data dummy_cd; | ||
|
|
||
| /* copy and process stream data from source to sink buffers */ | ||
| static int kp_detector_copy(struct comp_dev *dev) |
There was a problem hiding this comment.
Seems to be a dummy test code, a final version should be part of kp-detector commit.
There was a problem hiding this comment.
Yes, I was thinking about merging this code with kp_detector once its PR is accepted.
| @@ -0,0 +1,6 @@ | |||
| #include <stdint.h> | |||
|
|
|||
| struct kp_data { | |||
There was a problem hiding this comment.
Anything that is part of kpbuf public interface (internal to other fw components/units) may go to kpb.h or kpb_public.h (the latter follows current organization where the .h headers declare rather private data).
There was a problem hiding this comment.
kp_common.h, or kpb_public.h as you suggested has the same intention - provide a public/common data structure to be shared by key phrase related components.
|
@mrajwa I'm having a bit of trouble understanding the intent of this PR and the need for the kp_detector component. It seems like what you are looking for is to implement the cmd callback for the kpb component if I understand it correctly. |
|
@mrajwa why not add the commits to those PR's instead then? It will make reviewing the flow easier there. But with this PR the reviewers will have to review unnecessary code. |
|
Well I did not want to mess with with other PRs - especially with the detector one which was not created by myself. However I agree, it indeed might be easier to follow so I will close this PR and incorporate it into each PR accordingly. |
DO NOT MERGE! This is just a proposal of how we can handle async notification between key phrase detector component and KPB.
Key phrase detector component sends async notification to KPB
component using notifier module. KPB registers to specific event
dedicated to key phrase detection. Once such event takes place
detection component calls notifier_event handler which in turn
calls KPB call-back function.
Signed-off-by: Marcin Rajwa marcin.rajwa@linux.intel.com