Skip to content

component: channel selector for keyword detection use case - #993

Merged
mmaka1 merged 2 commits into
thesofproject:masterfrom
lbetlej:channel-selector
Mar 1, 2019
Merged

mmaka1 merged 2 commits into
thesofproject:masterfrom
lbetlej:channel-selector

Conversation

@lbetlej

@lbetlej lbetlej commented Feb 11, 2019

Copy link
Copy Markdown
Collaborator

The component allows to select from a topology file one of channels
from an input buffer to be copied to an output buffer (provides channels
count reduction functionality). In case the component is configured to
output 2 or 4 channels it works in a bypass mode.

Signed-off-by: Lech Betlej lech.betlej@linux.intel.com

@plbossart plbossart left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

minor comments below. Wondering if this can be generalized to more than 1,2 and 4 channels.

Comment thread src/audio/selector.c Resolved
Comment thread src/audio/selector.c Resolved
Comment thread src/audio/selector.c Resolved
Comment thread src/audio/selector.c Resolved
Comment thread src/audio/selector.c Resolved
Comment thread src/audio/selector.h Resolved

@lgirdwood lgirdwood left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Probably worth aligning with @ranj063 on the kernel/topology side as it's mostly integrated in her branch.

Comment thread src/audio/CMakeLists.txt Resolved
Comment thread src/audio/selector.h Resolved
Comment thread src/audio/selector_generic.c Resolved
Comment thread src/include/uapi/ipc/topology.h Resolved
Comment thread src/include/uapi/ipc/topology.h Resolved
Comment thread src/audio/selector.c Resolved
Comment thread src/audio/selector.c Resolved
Comment thread src/audio/selector.h Resolved
Comment thread src/include/uapi/ipc/topology.h Resolved

@jajanusz jajanusz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please add COMP_SELECTOR Kconfig symbol, example for src & volume components is in this PR: https://github.com/thesofproject/sof/pull/955/commits

Comment thread src/audio/selector.c Resolved
Comment thread src/audio/selector.c Resolved
Comment thread src/audio/selector.c Resolved
Comment thread src/audio/selector.c Resolved
Comment thread src/audio/selector_generic.c Resolved
Comment thread src/audio/selector_generic.c Resolved
Comment thread src/include/sof/audio/component.h Resolved
Comment thread src/audio/CMakeLists.txt Resolved

@keyonjie keyonjie left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

In general, can we rename the file and configure items from selector to something like chan_selector? the former one is blurry, e.g. we can have component to select channel/input source/output sink...

Comment thread src/include/uapi/ipc/topology.h Resolved
Comment thread src/audio/selector.c Resolved
Comment thread src/audio/selector.c Resolved
Comment thread src/audio/selector.c Resolved
Comment thread src/audio/selector.c Resolved
Comment thread src/audio/selector.c Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Only one \brief and then continue with description?

@lgirdwood lgirdwood left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The IPC should be versatile and also support future generations of this component. Also need some reserved fields too.

Comment thread src/include/uapi/ipc/topology.h Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The limitations for channels count should be removed here (since the selector could be updated to support more). Any request for > channels than supported should return an error at topology load time.
Selecting source and sink channels should be done using masks as I dont see how the current IPC structure would allow mapping 4 source -> 2 sink channels.

@tlauda
tlauda force-pushed the channel-selector branch 2 times, most recently from f51e2e7 to f149dcd Compare February 25, 2019 13:19
@mmaka1

mmaka1 commented Mar 1, 2019

Copy link
Copy Markdown

@lbetlej Pls rebase

The component allows to select from a topology file one of channels
from an input buffer to be copied to an output buffer (provides channels
count reduction functionality). In case the component is configured to
output 2 or 4 channels it works in a passthrough mode.

Signed-off-by: Lech Betlej <lech.betlej@linux.intel.com>
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
@lbetlej
lbetlej force-pushed the channel-selector branch from f149dcd to 4f19feb Compare March 1, 2019 14:15
Adds unit tests for channel selector component.

Signed-off-by: Lech Betlej <lech.betlej@linux.intel.com>
@lbetlej
lbetlej force-pushed the channel-selector branch from 4f19feb to af99abe Compare March 1, 2019 16:11
@mmaka1

mmaka1 commented Mar 1, 2019

Copy link
Copy Markdown

KW scan looks good, propagation of the result failed somehow.

@mmaka1
mmaka1 merged commit 99ee443 into thesofproject:master Mar 1, 2019
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.