Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MediaControl: Dymically set mainline IVSC media-entity src-pad index #114

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/v4l2/MediaControl.cpp
Original file line number Diff line number Diff line change
@@ -886,6 +886,15 @@ int MediaControl::mediaCtlSetup(int cameraId, MediaCtlConf* mc, int width, int h
ivscName.c_str(), link.sinkEntityName.c_str());
link.srcEntity = ivsc->info.id;
link.srcEntityName = ivscName;
/*
* Since mainline kernel commit 48f5fd8967f8 ("media:
* ivsc: csi: Swap SINK and SOURCE pads") the src-pad
* on the mainline ivsc mc-entity is pad 1, where on
* older versions it is pad 0, so this needs to be set
* dynamically.
* The src-pad is the other pad of the found ivsc sink.
*/
link.srcPad = !ivsc->links[i].sink->index;
break;
}
}