Skip to content

Commit

Permalink
k230 linux sdk release v0.6.1
Browse files Browse the repository at this point in the history
  • Loading branch information
wuwentao committed Dec 5, 2024
1 parent f9eeee2 commit 155359a
Show file tree
Hide file tree
Showing 9 changed files with 46 additions and 17 deletions.
12 changes: 10 additions & 2 deletions buildroot-overlay/package/audio_demo/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,16 @@
#
AUDIO_DEMO_DIR_NAME ?= audio_demo
AUDIO_DEMO_DIR ?= ${shell pwd}
CFLAGS := -mcpu=c908v -O2
LDFLAGS := -mcpu=c908v -O2
# CFLAGS := -mcpu=c908v -O2
# LDFLAGS := -mcpu=c908v -O2

ifeq ($(BR2_RISCV_32), y)
CFLAGS += -march=rv32gcv_xtheadc
LDFLAGS += -march=rv32gcv_xtheadc
else
CFLAGS += -mcpu=c908v -O2
LDFLAGS += -mcpu=c908v -O2
endif

BIN = audio_demo

Expand Down
1 change: 1 addition & 0 deletions buildroot-overlay/package/face_detect/main_cv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,7 @@ static void display_proc(int video_device) {
context.video_format = V4L2_PIX_FMT_NV12;
context.display_format = 0; // auto
context.drm_rotation = rotation_0;
// context.buffer_num = 5;

}
else {
Expand Down
4 changes: 2 additions & 2 deletions buildroot-overlay/package/vvcam/configs/ov5647.auto.json
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@
},
{
"classname": "ADmscv2",
"enable": true,
"enable": false,
"tables": [
{
"dmsc_denoise_strength": [0, 16, 31, 31, 31, 31],
Expand Down Expand Up @@ -587,7 +587,7 @@
},
{
"classname": "A3dnrv3_1",
"enable": true,
"enable": false,
"tables": [
{
"blend_motion": [95, 95, 95, 90, 85, 80],
Expand Down
4 changes: 2 additions & 2 deletions buildroot-overlay/package/vvcam/configs/ov5647.manual.json
Original file line number Diff line number Diff line change
Expand Up @@ -386,8 +386,8 @@
"range_v": 7,
"sadweight": 8,
"sigma": 5,
"strength": 32,
"thr_motion_slope": 8,
"strength": 48,
"thr_motion_slope": 12,
"tnr_en": true
},
{
Expand Down
21 changes: 20 additions & 1 deletion buildroot-overlay/package/vvcam/isp/vvcam_isp_hal.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@
#include <linux/io.h>
#include <linux/spinlock.h>
#include "vvcam_isp_driver.h"
#include "vvcam_isp_hal.h"
#include "vvcam_isp_hal.h"'
#include <linux/jiffies.h>

extern void vvcam_isp_proc_stat(unsigned long pde,
const uint32_t *irq_mis, const int len);
Expand Down Expand Up @@ -151,6 +152,9 @@ irqreturn_t vvcam_isp_irq_process(struct vvcam_isp_dev *isp_dev)
return IRQ_HANDLED;
}

uint32_t cut = 0;
uint64_t frame_timer = 0;
uint32_t flag = 0;
irqreturn_t vvcam_isp_mi_irq_process(struct vvcam_isp_dev *isp_dev)
{
uint32_t miv1_mis = 0;
Expand Down Expand Up @@ -221,6 +225,21 @@ irqreturn_t vvcam_isp_mi_irq_process(struct vvcam_isp_dev *isp_dev)
miv2_mis &= ~MIV2_MIS_MCM_RAW_RADY_MASK;
vvcam_event_queue(&isp_dev->event_dev, &event);
isp_dev->irq_mis[VVCAM_EID_RDMA_MIS] = event.irqevent.irq_value;

// if (miv2_mis & MIV2_MIS_MP_FRAME_END_MASK) {
// if(flag == 0)
// {
// flag = 1;
// frame_timer = ktime_get();
// cut = 0;
// }
// cut = cut + 1;
// if(cut == 100)
// {
// printk("timer is %lld \n", (ktime_to_ns(ktime_sub(ktime_get(),frame_timer))) / 100);
// flag = 0;
// }
// }
}

if (miv2_mis & MIV2_MIS_JPD_FRAME_END_MASK) {
Expand Down
Binary file modified buildroot-overlay/package/vvcam/isp_media_server
Binary file not shown.
10 changes: 5 additions & 5 deletions buildroot-overlay/package/vvcam/src/gc2093.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ static void deinit(void* ctx) {


static struct reg_list gc2093_1920x1080_30fps[] = {
{0x03fe,0xf0},
{0x03fe,0xf0},
{0x03fe,0xf0},
{0x03fe,0xf0},
{0x03fe,0x00},
Expand All @@ -172,7 +172,7 @@ static struct reg_list gc2093_1920x1080_30fps[] = {
{0x0005, 0x05}, //line width = 0x522 = 1314 x 2 = 2628
{0x0006, 0x22},
{0x0007, 0x00}, //Vblank = 17
{0x0008, 0x62},
{0x0008, 0x6e},
{0x0009, 0x00},
{0x000a, 0x02},
{0x000b, 0x00},
Expand All @@ -183,8 +183,8 @@ static struct reg_list gc2093_1920x1080_30fps[] = {
{0x0010, 0x8c},
{0x0013, 0x15},
{0x0019, 0x0c},
{0x0041, 0x04}, // frame length = 0x04b6 = 1206
{0x0042, 0xb6},
{0x0041, 0x06}, // frame length = 0x04c2 = 1218
{0x0042, 0x3a},
{0x0053, 0x60},
{0x008d, 0x92},
{0x0090, 0x00},
Expand Down Expand Up @@ -534,7 +534,7 @@ static int set_analog_gain(void* ctx, float gain) {
sensor->sensor_again = again;
}

sensor->mode.ae_info.cur_again = (float)sensor->sensor_again/64.0f;
sensor->mode.ae_info.cur_gain = (float)sensor->sensor_again/64.0f;

return 0;
}
Expand Down
9 changes: 5 additions & 4 deletions buildroot-overlay/package/vvcam/src/ov5647.c
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,8 @@ static int get_mode(void* ctx, struct vvcam_sensor_mode* mode) {

memcpy(mode, &sensor->mode, sizeof(struct vvcam_sensor_mode));

// printf(" %s sensor->mode.ae_info.cur_again is %f \n", __func__, sensor->mode.ae_info.cur_again);

return 0;
}

Expand Down Expand Up @@ -395,8 +397,6 @@ static int set_analog_gain(void* ctx, float gain) {
struct ov5647_ctx* sensor = ctx;
uint32_t again;

// printf("ov5647 %s %f\n", __func__, gain);

again = (uint32_t)(gain * 16 + 0.5);

if(sensor->sensor_again !=again)
Expand All @@ -406,8 +406,9 @@ static int set_analog_gain(void* ctx, float gain) {
sensor->sensor_again = again;
}

sensor->mode.ae_info.cur_again = (float)sensor->sensor_again/16.0f;
sensor->mode.ae_info.cur_gain = (float)sensor->sensor_again/16.0f;

// printf("ov5647 %s %f sensor->mode.ae_info.cur_again is %f \n", __func__, gain, sensor->mode.ae_info.cur_again);
return 0;
}

Expand All @@ -421,7 +422,7 @@ static int set_int_time(void* ctx, float time) {
uint16_t exp_line = 0;
float integraion_time = 0;

// printf("ov5647 %s %f\n", __func__, time);
printf("ov5647 %s %f\n", __func__, time);

integraion_time = time;

Expand Down
2 changes: 1 addition & 1 deletion buildroot-overlay/package/vvcam/v4l2-drm/src/lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ void v4l2_drm_default_context(struct v4l2_drm_context* ctx) {
ctx->video_format = V4L2_PIX_FMT_NV12;
ctx->display_format = DRM_FORMAT_NV12;
ctx->display = true;
ctx->buffer_num = DRM_BUFFERING + 2;
ctx->buffer_num = DRM_BUFFERING + 3;
ctx->plane = NULL;
ctx->flag_dqbuf = true;
ctx->offset_x = 0;
Expand Down

0 comments on commit 155359a

Please sign in to comment.