libcamera: pipeline: rkisp1: Add self path devices
Add the V4L2 device nodes needed to operate the self path. Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
parent
95946056d6
commit
606a0c7fff
1 changed files with 22 additions and 4 deletions
|
@ -131,9 +131,11 @@ public:
|
||||||
class RkISP1CameraData : public CameraData
|
class RkISP1CameraData : public CameraData
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
RkISP1CameraData(PipelineHandler *pipe, V4L2VideoDevice *video)
|
RkISP1CameraData(PipelineHandler *pipe, V4L2VideoDevice *mainPathVideo,
|
||||||
|
V4L2VideoDevice *selfPathVideo)
|
||||||
: CameraData(pipe), sensor_(nullptr), frame_(0),
|
: CameraData(pipe), sensor_(nullptr), frame_(0),
|
||||||
frameInfo_(pipe), mainPathVideo_(video)
|
frameInfo_(pipe), mainPathVideo_(mainPathVideo),
|
||||||
|
selfPathVideo_(selfPathVideo)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -152,6 +154,7 @@ public:
|
||||||
RkISP1Timeline timeline_;
|
RkISP1Timeline timeline_;
|
||||||
|
|
||||||
V4L2VideoDevice *mainPathVideo_;
|
V4L2VideoDevice *mainPathVideo_;
|
||||||
|
V4L2VideoDevice *selfPathVideo_;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void queueFrameAction(unsigned int frame,
|
void queueFrameAction(unsigned int frame,
|
||||||
|
@ -228,7 +231,9 @@ private:
|
||||||
MediaDevice *media_;
|
MediaDevice *media_;
|
||||||
V4L2Subdevice *isp_;
|
V4L2Subdevice *isp_;
|
||||||
V4L2Subdevice *mainPathResizer_;
|
V4L2Subdevice *mainPathResizer_;
|
||||||
|
V4L2Subdevice *selfPathResizer_;
|
||||||
V4L2VideoDevice *mainPathVideo_;
|
V4L2VideoDevice *mainPathVideo_;
|
||||||
|
V4L2VideoDevice *selfPathVideo_;
|
||||||
V4L2VideoDevice *param_;
|
V4L2VideoDevice *param_;
|
||||||
V4L2VideoDevice *stat_;
|
V4L2VideoDevice *stat_;
|
||||||
|
|
||||||
|
@ -556,7 +561,8 @@ CameraConfiguration::Status RkISP1CameraConfiguration::validate()
|
||||||
|
|
||||||
PipelineHandlerRkISP1::PipelineHandlerRkISP1(CameraManager *manager)
|
PipelineHandlerRkISP1::PipelineHandlerRkISP1(CameraManager *manager)
|
||||||
: PipelineHandler(manager), isp_(nullptr), mainPathResizer_(nullptr),
|
: PipelineHandler(manager), isp_(nullptr), mainPathResizer_(nullptr),
|
||||||
mainPathVideo_(nullptr), param_(nullptr), stat_(nullptr)
|
selfPathResizer_(nullptr), mainPathVideo_(nullptr),
|
||||||
|
selfPathVideo_(nullptr), param_(nullptr), stat_(nullptr)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -565,7 +571,9 @@ PipelineHandlerRkISP1::~PipelineHandlerRkISP1()
|
||||||
delete param_;
|
delete param_;
|
||||||
delete stat_;
|
delete stat_;
|
||||||
delete mainPathVideo_;
|
delete mainPathVideo_;
|
||||||
|
delete selfPathVideo_;
|
||||||
delete mainPathResizer_;
|
delete mainPathResizer_;
|
||||||
|
delete selfPathResizer_;
|
||||||
delete isp_;
|
delete isp_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -968,7 +976,8 @@ int PipelineHandlerRkISP1::createCamera(MediaEntity *sensor)
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
std::unique_ptr<RkISP1CameraData> data =
|
std::unique_ptr<RkISP1CameraData> data =
|
||||||
std::make_unique<RkISP1CameraData>(this, mainPathVideo_);
|
std::make_unique<RkISP1CameraData>(this, mainPathVideo_,
|
||||||
|
selfPathVideo_);
|
||||||
|
|
||||||
ControlInfoMap::Map ctrls;
|
ControlInfoMap::Map ctrls;
|
||||||
ctrls.emplace(std::piecewise_construct,
|
ctrls.emplace(std::piecewise_construct,
|
||||||
|
@ -1023,11 +1032,19 @@ bool PipelineHandlerRkISP1::match(DeviceEnumerator *enumerator)
|
||||||
if (mainPathResizer_->open() < 0)
|
if (mainPathResizer_->open() < 0)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
selfPathResizer_ = V4L2Subdevice::fromEntityName(media_, "rkisp1_resizer_selfpath");
|
||||||
|
if (selfPathResizer_->open() < 0)
|
||||||
|
return false;
|
||||||
|
|
||||||
/* Locate and open the capture video node. */
|
/* Locate and open the capture video node. */
|
||||||
mainPathVideo_ = V4L2VideoDevice::fromEntityName(media_, "rkisp1_mainpath");
|
mainPathVideo_ = V4L2VideoDevice::fromEntityName(media_, "rkisp1_mainpath");
|
||||||
if (mainPathVideo_->open() < 0)
|
if (mainPathVideo_->open() < 0)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
selfPathVideo_ = V4L2VideoDevice::fromEntityName(media_, "rkisp1_selfpath");
|
||||||
|
if (selfPathVideo_->open() < 0)
|
||||||
|
return false;
|
||||||
|
|
||||||
stat_ = V4L2VideoDevice::fromEntityName(media_, "rkisp1_stats");
|
stat_ = V4L2VideoDevice::fromEntityName(media_, "rkisp1_stats");
|
||||||
if (stat_->open() < 0)
|
if (stat_->open() < 0)
|
||||||
return false;
|
return false;
|
||||||
|
@ -1037,6 +1054,7 @@ bool PipelineHandlerRkISP1::match(DeviceEnumerator *enumerator)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
mainPathVideo_->bufferReady.connect(this, &PipelineHandlerRkISP1::bufferReady);
|
mainPathVideo_->bufferReady.connect(this, &PipelineHandlerRkISP1::bufferReady);
|
||||||
|
selfPathVideo_->bufferReady.connect(this, &PipelineHandlerRkISP1::bufferReady);
|
||||||
stat_->bufferReady.connect(this, &PipelineHandlerRkISP1::statReady);
|
stat_->bufferReady.connect(this, &PipelineHandlerRkISP1::statReady);
|
||||||
param_->bufferReady.connect(this, &PipelineHandlerRkISP1::paramReady);
|
param_->bufferReady.connect(this, &PipelineHandlerRkISP1::paramReady);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue