dragonboard: camera and audio support

Signed-off-by: August <mingxin.android@gmail.com>
This commit is contained in:
August 2018-07-29 00:07:00 +08:00
parent 8b35ede853
commit 53d5d63254
4 changed files with 24 additions and 19 deletions

View file

@ -97,6 +97,7 @@ void sigint_handler(int sig)
void close_speaker()
{
fprintf(stderr, "close_to_speaker\n");
tinymix_set_value_byname(mixer,"External Speaker Switch",0);
tinymix_set_value_byname(mixer,"SPK_R Mux",0);
tinymix_set_value_byname(mixer,"SPK_L Mux",0);
@ -104,6 +105,8 @@ void close_speaker()
void set_to_speaker()
{
fprintf(stderr, "set_to_speaker\n");
tinymix_set_value_byname(mixer,"AIF1IN0R Mux", (unsigned int)"AIF1_DA0R");
tinymix_set_value_byname(mixer,"AIF1IN0L Mux", (unsigned int)"AIF1_DA0L");
tinymix_set_value_byname(mixer,"DACR Mixer AIF1DA0R Switch",1);
@ -125,11 +128,14 @@ void set_to_speaker()
void close_jack()
{
fprintf(stderr, "close_to_jack\n");
tinymix_set_value_byname(mixer,"Headphone Switch", 0);
}
void set_to_jack()
{
fprintf(stderr, "set_to_jack\n");
tinymix_set_value_byname(mixer,"AIF1IN0R Mux", (unsigned int)"AIF1_DA0R");
tinymix_set_value_byname(mixer,"AIF1IN0L Mux", (unsigned int)"AIF1_DA0L");
tinymix_set_value_byname(mixer,"DACR Mixer AIF1DA0R Switch",1);

View file

@ -1568,7 +1568,7 @@ static int df_windows_init(void)
INIT_LIST_HEAD(&auto_tc_list);
INIT_LIST_HEAD(&manual_tc_list);
INIT_LIST_HEAD(&wifi_list);
#if 0
#if 1
printf("------------- to open video node\n");
while((access("/dev/video0",F_OK)) == -1)
{

View file

@ -642,8 +642,8 @@ output_mode = 4
;--------------------------------------------------------------------------------
[csi0]
csi0_used = 0
csi0_sensor_list = 0
csi0_used = 1
csi0_sensor_list = 1
csi0_pck = port:PE00<2><default><default><default>
csi0_mck = port:PE01<2><default><default><default>
csi0_hsync = port:PE02<2><default><default><default>
@ -660,15 +660,15 @@ csi0_sck = port:PE12<2><default><default><default>
csi0_sda = port:PE13<2><default><default><default>
[csi0/csi0_dev0]
csi0_dev0_used = 0
csi0_dev0_mname = "gc2145"
csi0_dev0_used = 1
csi0_dev0_mname = "ov5640"
csi0_dev0_twi_addr = 0x78
csi0_dev0_pos = "rear"
csi0_dev0_isp_used = 1
csi0_dev0_fmt = 0
csi0_dev0_stby_mode = 0
csi0_dev0_vflip = 0
csi0_dev0_hflip = 0
csi0_dev0_vflip = 1
csi0_dev0_hflip = 1
csi0_dev0_iovdd = "iovdd-csi"
csi0_dev0_iovdd_vol = 2800000
csi0_dev0_avdd = "avdd-csi"
@ -679,8 +679,8 @@ csi0_dev0_afvdd = "afvcc-csi"
csi0_dev0_afvdd_vol = 2800000
;csi0_dev0_power_en = port:PB04<1><0><1><0>
csi0_dev0_power_en =
csi0_dev0_reset = port:PE14<1><0><1><0>
csi0_dev0_pwdn = port:PE15<1><0><1><0>
csi0_dev0_reset = port:PE16<1><0><1><0>
csi0_dev0_pwdn = port:PE17<1><0><1><0>
csi0_dev0_flash_used = 0
csi0_dev0_flash_type = 2
csi0_dev0_flash_en =
@ -688,7 +688,7 @@ csi0_dev0_flash_mode =
csi0_dev0_flvdd = ""
csi0_dev0_flvdd_vol =
csi0_dev0_af_pwdn =
csi0_dev0_act_used = 0
csi0_dev0_act_used = 1
csi0_dev0_act_name = "ad5820_act"
csi0_dev0_act_slave = 0x18
@ -1208,7 +1208,7 @@ sndcodec_used = 0x1
aif2fmt = 0x3
aif3fmt = 0x3
aif2master = 0x1
hp_detect_case = 0x0
hp_detect_case = 0x1
;------------------------------------------------------------------------------
[i2s]
i2s_used = 0x1
@ -1232,7 +1232,7 @@ aif1_lrlk_div = 0x40
aif2_lrlk_div = 0x40
pa_sleep_time = 0x0a
dac_digital_vol = 0xa0a0
gpio-spk = port:PH07<2><1><default><default>
gpio-spk = port:PD14<1><0><default><0>
;----------------------------------------------------------------------------------
;ir --- infra remote configuration

View file

@ -275,7 +275,7 @@ module_path = "/system/vendor/modules/sunxi-ir-rx.ko"
;------------------------------------------------------------------------------------
[mic]
display_name= "录音耳机"
activated = 0
activated = 1
program = "mictester"
category = 1
run_type = 1
@ -310,17 +310,16 @@ device_name = "ft5x_ts"
; 'x' is the index of module, starts from 0.
;-------------------------------------------------------------------------------
[camera]
activated = 0
module_count= 8
activated = 1
module_count= 7
module1_path= "/system/vendor/modules/videobuf2-core.ko"
module2_path= "/system/vendor/modules/videobuf2-memops.ko"
module3_path= "/system/vendor/modules/videobuf2-v4l2.ko"
module4_path= "/system/vendor/modules/videobuf2-dma-contig.ko"
module5_path= "/system/vendor/modules/vfe_io.ko"
module6_path= "/system/vendor/modules/gc0328c.ko"
module7_path= "/system/vendor/modules/gc2145.ko"
module8_path= "/system/vendor/modules/vfe_v4l2.ko"
dev_cnt = 2
module6_path= "/system/vendor/modules/ov5640.ko"
module7_path= "/system/vendor/modules/vfe_v4l2.ko"
dev_cnt = 1
csi_cnt = 1
fps = 10