intel / ipu6-camera-hal

Apache License 2.0
39 stars 32 forks source link

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

Open jwrdegoede opened 3 months ago

jwrdegoede commented 3 months ago

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 as on older versions it is pad 0.

When updating the sensor link to point to the IVSC instead, link.srcPad was left at pad-0 inherited from the original sensor link.

Since with newer kernels this now needs to be pad-1, also update link.srcPad and do so dynamically, so that it works with all mainline IVSC driver versions.

This fixes ipu6-camera-hal / icamerasrc not working on laptops with an IVSC chip running kernels using the mainline IVSC driver with the mentioned commit.

jwrdegoede commented 3 months ago

Cc: @vicamo @smallorange (FYI)

vicamo commented 3 months ago

Cc: @vicamo @smallorange (FYI)

This is a duplicate of #112, no?

jwrdegoede commented 3 months ago

Cc: @vicamo @smallorange (FYI)

This is a duplicate of #112, no?

Ah yes it looks like it is (#112 seems to do more, but it does also set link.srcPad like this PR does) . I did not see those changes because I was testing the main branch.

Assuming that that commit is heading towards the main branch, then this can be closed.