2.20. V4L2 媒體匯流排函式和資料結構¶
-
enum v4l2_mbus_csi2_cphy_line_orders_type¶
CSI-2 C-PHY 線序
常量
V4L2_MBUS_CSI2_CPHY_LINE_ORDER_ABCC-PHY 線序 ABC(預設)
V4L2_MBUS_CSI2_CPHY_LINE_ORDER_ACBC-PHY 線序 ACB
V4L2_MBUS_CSI2_CPHY_LINE_ORDER_BACC-PHY 線序 BAC
V4L2_MBUS_CSI2_CPHY_LINE_ORDER_BCAC-PHY 線序 BCA
V4L2_MBUS_CSI2_CPHY_LINE_ORDER_CABC-PHY 線序 CAB
V4L2_MBUS_CSI2_CPHY_LINE_ORDER_CBAC-PHY 線序 CBA
-
struct v4l2_mbus_config_mipi_csi2¶
MIPI CSI-2 資料匯流排配置
定義:
struct v4l2_mbus_config_mipi_csi2 {
unsigned int flags;
unsigned char data_lanes[V4L2_MBUS_CSI2_MAX_DATA_LANES];
unsigned char clock_lane;
unsigned char num_data_lanes;
bool lane_polarities[1 + V4L2_MBUS_CSI2_MAX_DATA_LANES];
enum v4l2_mbus_csi2_cphy_line_orders_type line_orders[V4L2_MBUS_CSI2_MAX_DATA_LANES];
};
成員
flags媒體匯流排 (V4L2_MBUS_*) 標誌
data_lanes物理資料通道索引陣列
clock_lane時鐘通道的物理通道索引
num_data_lanes資料通道數
lane_polarities通道的極性。順序與物理通道相同。
line_orders資料通道的線序。順序與物理通道相同。
-
struct v4l2_mbus_config_parallel¶
並行資料匯流排配置
定義:
struct v4l2_mbus_config_parallel {
unsigned int flags;
unsigned char bus_width;
unsigned char data_shift;
};
成員
flags媒體匯流排 (V4L2_MBUS_*) 標誌
bus_width匯流排寬度(以位為單位)
data_shift資料移位(以位為單位)
-
struct v4l2_mbus_config_mipi_csi1¶
CSI-1/CCP2 資料匯流排配置
定義:
struct v4l2_mbus_config_mipi_csi1 {
unsigned char clock_inv:1;
unsigned char strobe:1;
bool lane_polarity[2];
unsigned char data_lane;
unsigned char clock_lane;
};
成員
clock_inv時鐘/選通訊號的極性 false - 未反轉,true - 反轉
strobefalse - 資料/時鐘,true - 資料/選通
lane_polarity時鐘(索引 0)和資料通道索引 (1) 的極性
data_lane資料通道號
clock_lane時鐘通道號
-
enum v4l2_mbus_type¶
媒體匯流排型別
常量
V4L2_MBUS_UNKNOWN未知匯流排型別,無 V4L2 媒體匯流排配置
V4L2_MBUS_PARALLEL帶 hsync 和 vsync 的並行介面
V4L2_MBUS_BT656帶嵌入式同步的並行介面,也可用於 BT.1120
V4L2_MBUS_CSI1MIPI CSI-1 序列介面
V4L2_MBUS_CCP2CCP2(緊湊型相機埠 2)
V4L2_MBUS_CSI2_DPHYMIPI CSI-2 序列介面,帶 D-PHY
V4L2_MBUS_CSI2_CPHYMIPI CSI-2 序列介面,帶 C-PHY
V4L2_MBUS_DPIMIPI VIDEO DPI 介面
V4L2_MBUS_INVALID無效匯流排型別(保持在最後)
-
struct v4l2_mbus_config¶
媒體匯流排配置
定義:
struct v4l2_mbus_config {
enum v4l2_mbus_type type;
u64 link_freq;
union {
struct v4l2_mbus_config_parallel parallel;
struct v4l2_mbus_config_mipi_csi1 mipi_csi1;
struct v4l2_mbus_config_mipi_csi2 mipi_csi2;
} bus;
};
成員
type介面型別
link_freq連結頻率。另請參見 V4L2_CID_LINK_FREQ 控制元件。
bus匯流排配置資料結構
bus.parallel嵌入式
struct v4l2_mbus_config_parallel。如果匯流排是並行或 BT.656,則使用此項。bus.mipi_csi1嵌入式
struct v4l2_mbus_config_mipi_csi1。如果匯流排是 MIPI 聯盟的相機序列介面版本 1 (MIPI CSI1) 或標準移動成像架構的緊湊型相機埠 2 (SMIA CCP2),則使用此項。bus.mipi_csi2嵌入式
struct v4l2_mbus_config_mipi_csi2。如果匯流排是 MIPI 聯盟的相機序列介面版本 2 (MIPI CSI2),則使用此項。
-
void v4l2_fill_pix_format(struct v4l2_pix_format *pix_fmt, const struct v4l2_mbus_framefmt *mbus_fmt)¶
輔助例程,用於從
struct v4l2_mbus_framefmt填充struct v4l2_pix_format欄位。
引數
struct v4l2_pix_format *pix_fmt指向要填充的
struct v4l2_pix_format的指標const struct v4l2_mbus_framefmt *mbus_fmt指向要用作模型的
struct v4l2_mbus_framefmt的指標
-
void v4l2_fill_mbus_format(struct v4l2_mbus_framefmt *mbus_fmt, const struct v4l2_pix_format *pix_fmt, u32 code)¶
輔助例程,用於從
struct v4l2_pix_format和資料格式程式碼填充struct v4l2_mbus_framefmt。
引數
struct v4l2_mbus_framefmt *mbus_fmt指向要填充的
struct v4l2_mbus_framefmt的指標const struct v4l2_pix_format *pix_fmt指向要用作模型的
struct v4l2_pix_format的指標u32 code資料格式程式碼(來自
enum v4l2_mbus_pixelcode)
-
void v4l2_fill_pix_format_mplane(struct v4l2_pix_format_mplane *pix_mp_fmt, const struct v4l2_mbus_framefmt *mbus_fmt)¶
輔助例程,用於從媒體匯流排結構填充
struct v4l2_pix_format_mplane欄位。
引數
struct v4l2_pix_format_mplane *pix_mp_fmt指向要填充的
struct v4l2_pix_format_mplane的指標const struct v4l2_mbus_framefmt *mbus_fmt指向要用作模型的
struct v4l2_mbus_framefmt的指標
-
void v4l2_fill_mbus_format_mplane(struct v4l2_mbus_framefmt *mbus_fmt, const struct v4l2_pix_format_mplane *pix_mp_fmt)¶
輔助例程,用於從
struct v4l2_pix_format_mplane填充struct v4l2_mbus_framefmt。
引數
struct v4l2_mbus_framefmt *mbus_fmt指向要填充的
struct v4l2_mbus_framefmt的指標const struct v4l2_pix_format_mplane *pix_mp_fmt指向要用作模型的
struct v4l2_pix_format_mplane的指標