Skip to content

module: passthrough: rework module to use sink/source api#10789

Open
softwarecki wants to merge 1 commit into
thesofproject:mainfrom
softwarecki:p20-passthrough
Open

module: passthrough: rework module to use sink/source api#10789
softwarecki wants to merge 1 commit into
thesofproject:mainfrom
softwarecki:p20-passthrough

Conversation

@softwarecki
Copy link
Copy Markdown
Collaborator

Rework the passthrough module to only use the sink/source api to prepare sof for the full transition to pipeline 2.0.

Rework the passthrough module to only use the sink/source api to prepare
sof for the full transition to pipeline 2.0.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
}
source_release_data(sources[0], n_bytes);

memcpy_s(codec->mpd.out_buff, codec->mpd.out_buff_size, codec->mpd.in_buff, n_bytes);
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.

are .in_buff and .out_buff temporary buffers? Looks like at least one of them could be eliminated, e.g. simply by removing this memcpy() and copying directly from .in_buff below. Maybe even both could be eliminated. But this doesn't have to be solved in this PR and maybe I'm mistaken entirely and those intermediate buffers have other roles too.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I think this is a sample module, a template for future codecs. Instead of memcpy, somebody could simply insert own processing function. The waves module uses this template.

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.

4 participants