Skip to content

Handle WoV phrase detection notification and kcontrols - #5903

Open
naveen-manohar wants to merge 2 commits into
thesofproject:topic/sof-devfrom
naveen-manohar:ww356_wov-kcontrol
Open

Handle WoV phrase detection notification and kcontrols#5903
naveen-manohar wants to merge 2 commits into
thesofproject:topic/sof-devfrom
naveen-manohar:ww356_wov-kcontrol

Conversation

@naveen-manohar

Copy link
Copy Markdown

Add SOF_IPC4_NOTIFY_PHRASE_DETECTED notification handler for WoV.
When DSP FW reports keyword detection, unblock the WoV capture stream
via snd_pcm_period_elapsed()
Notify topology-defined kcontrols ('wov_trigger_id', 'wov_event') for userspace polling.

Add SOF_IPC4_NOTIFY_PHRASE_DETECTED notification handler,
sent by DSP FW when a keyword is detected by WoV pipeline.

Handler parses PCM list to find WoV capture PCM pcm_id 11,
calls snd_pcm_period_elapsed() to unblock waiting capture
stream.

Change-Id: I16423e24fa2e274cefbc6def6063176fe60c10a8
Signed-off-by: Naveen Manohar <naveen.m@intel.com>
When DSP reports keyword detection, notify topology-defined
WoV kcontrols so that user space can poll for value changes.

Checked for 2 kcontrols in loaded topology:
- 'wov_trigger_id': RO enum reporting winner slot(0/1/2)
- 'wov_event': control that user space polls via POLLPRI

Signed-off-by: Naveen Manohar <naveen.m@intel.com>
@lgirdwood

Copy link
Copy Markdown
Member

@jsarha pls review - it may be that your IPC4 wov wakeup PR overlaps here.

@jsarha jsarha left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think it would be best to use snd_sof_pcm_period_elapsed(), but other than that I do not see anything alarming here. Of course the final judge is, does it work?

Comment thread sound/soc/sof/ipc4-wov.c
return;
}

snd_pcm_period_elapsed(substream);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think you should probably use snd_sof_pcm_period_elapsed() here. See https://github.com/naveen-manohar/linux/blob/412f4a9a9dbe2eda5b9467114c0043c6a0615ee3/sound/soc/sof/pcm.c#L43

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.

3 participants