#include <linux/module.h>
#include <linux/sched.h>
#include <linux/slab.h>
#include <linux/errno.h>
#include <linux/kernel.h>
#include <linux/fs.h>
#include <linux/string.h>
#include <linux/init.h>
#include <linux/autoconf.h>
#include <linux/interrupt.h>
#include <linux/time.h>
#include <asm/system.h>
#include <asm/arch/hwregs/intr_vect.h>
#include <asm/arch/hwregs/intr_vect_defs.h>
#include <asm/io.h>
#include <asm/irq.h>
#include <asm/delay.h>
#include <asm/uaccess.h>
#include <asm/arch/cache.h>
#include <asm/elphel/c313a.h>
#include <asm/elphel/exifa.h>
#include "fpgactrl.h"
#include "fpga_sdram.h"
#include "x3x3.h"
#include "cc3x3.h"
#include "cxsdram.h"
#include "cci2c.h"
#include "cxdma.h"
#include "circbuf.h"
#include "fpgaconfi2c.h"
#include "hist.h"
#include "exif353.h"
Include dependency graph for cc3x3.c:
Go to the source code of this file.
Data Structures | |
struct | meta_offsets_t |
Defines | |
#define | USE_HARDWARE_I2C y |
#define | MCPpresent() 0 |
#define | MCP_open(inode, filp) -1 |
#define | MCP_lseek(file, offset, orig) 0 |
#define | MCP_read(file, buf, count, off) 0 |
#define | MCP_write(file, buf, count, off) 0 |
#define | MD1(x) |
#define | MD12(x) |
#define | MD13(x) |
#define | MD20(x) |
#define | MD11(x) |
where jpeg_rp is modified? | |
#define | MD10(x) |
#define | MD9(x) |
#define | MD8(x) |
#define | MD7(x) |
camSeqStartClip | |
#define | MD6(x) |
#define | MD2(x) |
programSensor(nonstop) | |
#define | D(x) |
#define | D1(x) |
#define | D2(x) |
#define | D3(x) |
#define | D4(x) |
#define | D5(x) printk("%s:%d:",__FILE__,__LINE__);x |
#define | CMOSCAM_MAJOR 126 |
#define | MY_MODULE_DESCRIPTION "Elphel model 353 camera driver" |
#define | CMOSCAM_DRIVER_NAME "CMOS/MCP camera 353 driver\n" |
#define | X313_ACQUIRE_STOP port_csp0_addr[X313_WA_TRIG]=0 |
#define | X313_ACQUIRE_ONCE port_csp0_addr[X313_WA_TRIG]=(imageParamsR[P_TRIG] & 1)?6:4 |
#define | X313_ACQUIRE_INTERNAL port_csp0_addr[X313_WA_TRIG]=4 |
#define | X313_ACQUIRE_EXTERNAL port_csp0_addr[X313_WA_TRIG]=6 |
#define | X313_ACQUIRE_ON port_csp0_addr[X313_WA_TRIG]=5 |
#define | EN_INTERRUPT(x) port_csp0_addr[X313_WA_IRQM]= (intm_shadow |= (1<< x )) |
#define | DIS_INTERRUPT(x) port_csp0_addr[X313_WA_IRQM]= (intm_shadow &= ~(1<< x )) |
#define | DIS_INTERRUPTS port_csp0_addr[X313_WA_IRQM]= (intm_shadow = 0) |
#define | PROGRAM_FPN(t, s, m, d, l) |
#define | PROGRAM_CLK_EN(x) X313_SETFIELD(CLKEN, x ) |
#define | CCAM_DONOTUSEAUX (ccam_cr_shadow & X313_MASK(KAI11000)) |
#define | CCAM_ARO_ON ccamCROr( X313_BITS(ARO,1) ) |
#define | CCAM_ARO_OFF ccamCRAnd(~X313_BITS(ARO,1) ) |
#define | CCAM_DCLK_OFF ccamCROr( X313_BITS(DCLKMODE,1) ) |
#define | CCAM_DCLK_ON ccamCRAnd(~X313_BITS(DCLKMODE,1) ) |
#define | CCAM_ARST_OFF ccamCROr( X313_BITS(ARST,1) ) |
#define | CCAM_ARST_ON ccamCRAnd(~X313_BITS(ARST,1) ) |
#define | CCAM_MRST_OFF ccamCROr( X313_BITS(MRST,1) ) |
#define | CCAM_MRST_ON ccamCRAnd(~X313_BITS(MRST,1) ) |
#define | CCAM_NEGRST ccamCROr( X313_BITS(NEGRST,1) ) |
#define | CCAM_POSRST ccamCRAnd(~X313_BITS(NEGRST,1) ) |
#define | CCAM_CNVEN_OFF ccamCRAnd(~X313_BITS(CNVEN,1) ) |
#define | CCAM_TRIG_INT ccamCRAnd(~X313_BITS(TRIGSRC,1) ) |
Sensor (MT9X001) trigger source selection (internal/external). | |
#define | CCAM_TRIG_EXT ccamCROr( X313_BITS(TRIGSRC,1) ) |
#define | CCAM_TIMESTAMP_NORMAL ccamCRAnd(~X313_BITS(EARLYTRIG,1) ) |
early/normal timestamp in async mode | |
#define | CCAM_TIMESTAMP_EARLY ccamCROr( X313_BITS(EARLYTRIG,1) ) |
#define | CCAM_SET_HACT_PHASE(x) ccamCRAndOr(~X313_MASK(HACT_PHASE), X313_BITS(HACT_PHASE, (x))) |
#define | CCAM_CNVEN_ON printk ("\r\n*** Maybe fatal for MT9P001 !!! Set CONFIG_ETRAX_ELPHEL_FORCE_MT9P001 if troubleshooting MT9P001 ***\r\n");ccamCROr( X313_BITS(CNVEN,1) ) |
#define | X313_MAXMINOR 15 |
#define | SCALE_MIN 0x040 |
#define | SCALE_MAX 0x400 |
#define | nint_vact 0 |
#define | nint_xint 1 |
#define | nint_xferovr 2 |
#define | nint_done 3 |
#define | nint_eot 4 |
#define | nint_overrun 5 |
#define | nint_done_input 6 |
#define | nint_done_compress 7 |
#define | nint_smart 8 |
#define | MAXEXPOSURE 60000 |
#define | SIMPLE_IRQ y |
#define | CONFIG_ETRAX_ELPHEL_AUTOEXP y |
#define | OLD_CAMSEQSTOP 0 |
Called from programSensor() if frame format is changed (needed to restart compressor). | |
#define | ENABLE_OLD_SENSORS 1 |
#define | PROGRAM_SENSOR_DIS_IRQ 0 |
#define | CX313_FPGA_HISTOGRAM_SIZE 0x400 |
Functions | |
static | DECLARE_MUTEX (sensor_lock) |
unsigned long | gain_balance (unsigned long *scale, unsigned long gain) |
void | dumpFrameParams (struct frame_params_t *fp, const char *title) |
static unsigned long imageParamsR[P_NUMBER *4] | __attribute__ ((aligned(PAGE_SIZE))) |
static int | getCamSeqState (void) |
static int | getCamSeqCount (void) |
static void | setCamSeqState (int v) |
static void | setCamSeqCount (int v) |
static void | initCamIRQs (void) |
static int | camSeqStart (void) |
static irqreturn_t | camSeq_interrupt (int irq, void *dev_id) |
static int | x313_JPEG_cmd_wrapper (int arg) |
static int | ccam_DMA_ioctl (struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg) |
to combine calls to x313_JPEG_cmd(arg) and some other action to be calles from ioctl, as before and lseek (,,2) | |
static int | cmoscam_open (struct inode *inode, struct file *filp) |
static int | cmoscam_release (struct inode *inode, struct file *filp) |
static int | cmoscam_ioctl (struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg) |
static loff_t | cmoscam_lseek (struct file *file, loff_t offset, int orig) |
static ssize_t | cmoscam_read (struct file *file, char *buf, size_t count, loff_t *off) |
static ssize_t | cmoscam_write (struct file *file, const char *buf, size_t count, loff_t *off) |
static int | cmoscam_mmap (struct file *file, struct vm_area_struct *vma) |
static unsigned int | cmoscam_poll (struct file *file, poll_table *wait) |
static int __init | cmoscam_init (void) |
static int | init_sensor (void) |
static int | programSensor (int nonstop) |
static int | init_FPGA (void) |
static void | camSeq_dump (void) |
void | adjust_fps_2_compressor (void) |
void | x313_tables_gammainitlinear (void) |
loff_t | x313_tables_lseek (struct file *file, loff_t offset, int orig) |
ssize_t | x313_tables_write (struct file *file, const char *buf, size_t count, loff_t *off) |
ssize_t | x313_tables_read (struct file *file, char *buf, size_t count, loff_t *off) |
loff_t | x313_histogram_lseek (struct file *file, loff_t offset, int orig) |
ssize_t | x313_histogram_read (struct file *file, char *buf, size_t count, loff_t *off) |
int | write_gamma_fpga (unsigned short gamma_table[1028]) |
loff_t | x313_gamma_lseek (struct file *file, loff_t offset, int orig) |
ssize_t | x313_gamma_read (struct file *file, char *buf, size_t count, loff_t *off) |
ssize_t | x313_gamma_write (struct file *file, const char *buf, size_t count, loff_t *off) |
loff_t | x313_senspars_lseek (struct file *file, loff_t offset, int orig) |
ssize_t | x313_senspars_read (struct file *file, char *buf, size_t count, loff_t *off) |
ssize_t | x313_senspars_write (struct file *file, const char *buf, size_t count, loff_t *off) |
int | x313_senspars_mmap (struct file *file, struct vm_area_struct *vma) |
void | x313_program_focus (int totalwidth) |
HACK: programming focus filter parameters, will likely change. Should be called after the image width is already known. | |
static void | startAcquire (void) |
void | tasklet_irq_f (unsigned long arg) |
DECLARE_TASKLET (tasklet_vact, tasklet_irq_f, IRQ_SRC_VACT) | |
DECLARE_TASKLET (tasklet_done_compress, tasklet_irq_f, IRQ_SRC_DONE_COMPRESS) | |
void | compressorSingle (void) |
void | compressorRun (void) |
void | compressorStop (void) |
void | updateJPEG_wp (void) |
uses fpga transfer counter to update JPEG_wp. Should be called before any compressorStop | |
void | resetPointers (void) |
void | advance_imageParamsR (void) |
void | add_frame_params (void) |
void | ch0_lock (void) |
int | camSeqGetJPEG_wp (void) |
int | camSeqGetJPEG_rp (void) |
void | camSeqSetJPEG_rp (int p) |
int | camSeqStartClip (int nfr, int len) |
only "n, -1" and "0, -1" are updated to include CCD so far | |
void | camSeqStop (void) |
int | get_sensor_i2c_regs16 (int n) |
unsigned char | get_sensor_i2c_regs (int n) |
unsigned long | get_imageParamsR (int n) |
unsigned long | get_imageParamsW (int n) |
unsigned char | get_sensor_i2c_addr (void) |
void | set_sensor_i2c_regs (int n, unsigned char d) |
void | set_imageParamsR (int n, unsigned long d) |
void | set_imageParamsW (int n, unsigned long d) |
void | set_sensor_i2c_addr (unsigned char d) |
void | ccamCRAnd (unsigned long d) |
void | ccamCROr (unsigned long d) |
void | ccamCRXor (unsigned long d) |
void | ccamCRAndOr (unsigned long d_and, unsigned long d_or) |
unsigned long | ccamGetCR (void) |
void | writeSensorDefaults (unsigned long *data, int count) |
int | readSensorReg (unsigned int ra, int mode) |
int | writeSensorReg (unsigned int ra, unsigned char rd, int uncond) |
int | readSensorReg16 (unsigned char ra, int mode) |
int | writeSensorReg16 (unsigned char ra, int rd, int uncond) |
int | writeSensorRegFF (unsigned char ra, int rd, int uncond) |
static int | program_KAI11000 (void) |
void | exposition_unlock (void) |
int | program_sensor_exposition (void) |
int | program_sensor_exposition_just (void) |
This program returns -1 for all not yet suported (re-supported ) sensors. | |
void | program_trigger (void) |
program trigger parameters | |
void | program_i2c (void) |
void | program_smart_irq (void) |
void | program_early_timestamp (void) |
int | flush_par_cache (void) |
void | init_autoexp_struct (void) |
module_init (cmoscam_init) | |
MODULE_LICENSE ("GPL") | |
MODULE_AUTHOR ("Andrey Filippov <andrey@elphel.com>.") | |
MODULE_DESCRIPTION (MY_MODULE_DESCRIPTION) | |
MODULE_DESCRIPTION ("Elphel Model 353 camera driver") | |
Variables | |
static const char | cmoscam_name [] = "cmoscam353" |
sensor_t | sensor |
unsigned short | gamma_tables_soft [1028] |
int | gamma_tables_changed = 0 |
static unsigned long | default_common [] |
gains_t | gains |
frame_params_t | frame_params |
unsigned long * | frame_params_ul = (unsigned long *) &frame_params |
unsigned short * | exif_index = (unsigned short * ) &frame_params.meta_index |
static struct meta_offsets_t | meta_offsets |
char * | exif_meta_time_string |
static int | minors [X313_MAXMINOR+1] |
static unsigned char | sensor_i2c_addr |
static unsigned short | sensor_i2c_regs16 [0x100] |
unsigned char * | sensor_i2c_regs |
unsigned long * | imageParamsW = &imageParamsR[P_NUMBER] |
unsigned long * | imageParamsR_PREV = &imageParamsR[2*P_NUMBER] |
unsigned long * | imageParamsR_PREV_PREV = &imageParamsR[3*P_NUMBER] |
autoexp_t * | autoexp_state = NULL |
autoexp_t * | autoexp_set = NULL |
aexp_window_t * | aexp_window = NULL |
aexp_window_t * | aexp_window_set = NULL |
static int | jpeg_sdram_ctl0 |
volatile unsigned long | ccam_cr_shadow = 0 |
static struct file_operations | cmoscam_fops |
static volatile unsigned long | intm_shadow = 0 |
static volatile int | camSeqCount |
static volatile int | camSeqState |
static volatile int | JPEG_wp |
static volatile int | JPEG_rp |
static volatile int | JPEG_len |
static unsigned long | DMA_buf_start |
static volatile int | JPEG_nfr |
static volatile int | JPEG_lfr |
static volatile int | dbg_20 |
static volatile int | dbg_28 |
wait_queue_head_t | x313_wait_queue |
unsigned long | ccam_dma_length |
static int | fpga_counter_prev = 0 |
static int | JPEG_wp_prev = 0 |
int | slock |
wait_queue_head_t | vack_wait_queue |
sensor_t | kai11002 |
unsigned long | fpga_tables_buffer [CX313_FPGA_TABLES_SIZE] |
Moved to c313a.h. |
#define CCAM_CNVEN_ON printk ("\r\n*** Maybe fatal for MT9P001 !!! Set CONFIG_ETRAX_ELPHEL_FORCE_MT9P001 if troubleshooting MT9P001 ***\r\n");ccamCROr( X313_BITS(CNVEN,1) ) |
#define CCAM_DONOTUSEAUX (ccam_cr_shadow & X313_MASK(KAI11000)) |
#define CCAM_TIMESTAMP_EARLY ccamCROr( X313_BITS(EARLYTRIG,1) ) |
#define CCAM_TIMESTAMP_NORMAL ccamCRAnd(~X313_BITS(EARLYTRIG,1) ) |
#define CCAM_TRIG_INT ccamCRAnd(~X313_BITS(TRIGSRC,1) ) |
#define CONFIG_ETRAX_ELPHEL_AUTOEXP y |
#define DIS_INTERRUPT | ( | x | ) | port_csp0_addr[X313_WA_IRQM]= (intm_shadow &= ~(1<< x )) |
#define DIS_INTERRUPTS port_csp0_addr[X313_WA_IRQM]= (intm_shadow = 0) |
#define EN_INTERRUPT | ( | x | ) | port_csp0_addr[X313_WA_IRQM]= (intm_shadow |= (1<< x )) |
#define ENABLE_OLD_SENSORS 1 |
#define OLD_CAMSEQSTOP 0 |
Called from programSensor() if frame format is changed (needed to restart compressor).
#define PROGRAM_FPN | ( | t, | |||
s, | |||||
m, | |||||
d, | |||||
l | ) |
Value:
port_csp0_addr[X313_WA_SENSFPN]= \ (((t) & 1) << 10) | \ (((s) & 7) << 7) | \ (((m) & 7) << 4) | \ (((d) & 1) << 3) | \ (((l) & 7) << 0)
#define USE_HARDWARE_I2C y |
*************************************************************************** ! FILE NAME : cc353.c ! DESCRIPTION: TBD ! Copyright (C) 2002-2007 Elphel, Inc. ! -----------------------------------------------------------------------------** ! ! This program is free software: you can redistribute it and/or modify ! it under the terms of the GNU General Public License as published by ! the Free Software Foundation, either version 3 of the License, or ! (at your option) any later version. ! ! This program is distributed in the hope that it will be useful, ! but WITHOUT ANY WARRANTY; without even the implied warranty of ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! GNU General Public License for more details. ! ! You should have received a copy of the GNU General Public License ! along with this program. If not, see <http://www.gnu.org/licenses/>. ! -----------------------------------------------------------------------------** !
#define X313_ACQUIRE_EXTERNAL port_csp0_addr[X313_WA_TRIG]=6 |
#define X313_ACQUIRE_INTERNAL port_csp0_addr[X313_WA_TRIG]=4 |
#define X313_ACQUIRE_ON port_csp0_addr[X313_WA_TRIG]=5 |
#define X313_ACQUIRE_ONCE port_csp0_addr[X313_WA_TRIG]=(imageParamsR[P_TRIG] & 1)?6:4 |
#define X313_ACQUIRE_STOP port_csp0_addr[X313_WA_TRIG]=0 |
static unsigned long imageParamsR [P_NUMBER * 4] __attribute__ | ( | (aligned(PAGE_SIZE)) | ) | [static] |
void add_frame_params | ( | void | ) | [inline] |
Definition at line 1091 of file cc3x3.c.
References advance_imageParamsR(), ccam_dma_buf_ptr, CCAM_DMA_SIZE, CCAM_MMAP_META, circbuf_wait_queue, encode_time(), Exif_Image_DateTime, exif_index, Exif_Photo_DateTimeOriginal, frame_params, meta_offsets_t::Image_DateTime, memcpy(), meta_offsets, meta_offsets_t::Photo_DateTimeOriginal, store_meta(), and write_meta_irq().
void adjust_fps_2_compressor | ( | void | ) |
void advance_imageParamsR | ( | void | ) | [inline] |
=========================================================================================== ! Is called from the interrupt service routine - it generates the last (just) acquired frame ! length word in front of compressed data, copies current acquisition parameters to the ! 32-6=26 bytes before the frame (-32..-6 bytes from the begfinning of the frame) ! JPEG_wp is set to the start of the next frame. ! ! As this function is called after compression of each frame some of the activity ! in cxdma353.c may be removed !===========================================================================================
is it still used anywhere??
Definition at line 1079 of file cc3x3.c.
References Exif_Image_FrameNumber, Exif_Photo_ExposureTime, frame_params_t::exposure, frame_params, meta_offsets_t::Image_FrameNumber, imageParamsR, meta_offsets, P_EXPOS, P_FRAME, meta_offsets_t::Photo_ExposureTime, and putlong_meta_irq().
static void camSeq_dump | ( | void | ) | [static] |
static irqreturn_t camSeq_interrupt | ( | int | irq, | |
void * | dev_id | |||
) | [static] |
Definition at line 1126 of file cc3x3.c.
References add_frame_params(), advance_imageParamsR(), CAMSEQ_DONE, CAMSEQ_JPEG, CAMSEQ_RUN, CAMSEQ_SINGLE, CAMSEQ_STOP, CAMSEQ_WAIT_F, CCAM_DMA_SIZE, ch0_lock(), compressorRun(), compressorSingle(), compressorStop(), DIS_INTERRUPTS, EN_INTERRUPT, imageParamsR, nint_done_compress, nint_vact, P_CAMSEQCOUNT, P_CAMSEQSTATE, P_TASKLET_CTL, startAcquire(), updateJPEG_wp(), X313_CHN0_BOUND, X313_IRQSTATE, X313_POSTINIT_SDCHAN, and X313_SR.
void camSeqSetJPEG_rp | ( | int | p | ) |
Definition at line 1339 of file cc3x3.c.
References imageParamsR, P_CIRCBUFRP, P_CIRCBUFSIZE, P_CIRCBUFWP, and P_FREECIRCBUF.
static int camSeqStart | ( | void | ) | [static] |
Definition at line 1291 of file cc3x3.c.
References CAMSEQ_DONE, CAMSEQ_READY, CAMSEQ_SKIP, EN_INTERRUPT, getCamSeqCount(), getCamSeqState(), MD1, nint_vact, printk, setCamSeqState(), and startAcquire().
only "n, -1" and "0, -1" are updated to include CCD so far
0, 0 - reread n, l - both restrictions n,-1 - n frames, any length -1, l - any n, fixed length 0,-1 - start constant compressing -1, 0 - end constant compressing (will need to wait for the state to be "DONE") if "end" and it was'n running - acquire 1 full buffer
stop and wasn't running - acquire 1 full buffer (nfr == -2 - will not restart)
NOTE: here it is important to start from the beginning of the buffer
make it invalid - why? First we'll fix dealing with invalid JPEG_rp, then - remove this operator.
start constant compression (after skipping 2 "bad" frames)
already acquiring/compressing? hello -z -> 7
do we need to reset everything - maybe just contunue?
copied from camSeq_interrupt this sequence is normally executed _after_ the first frame, but we do not want to waste first frame here
already acquiring/compressing? hello -z -> 7
copied from camSeq_interrupt this sequence is normally executed _after_ the first frame, but we do not want to waste first frame here
(0,0) - just reread from memory
Definition at line 1360 of file cc3x3.c.
References CAMSEQ_DONE, CAMSEQ_JPEG, CAMSEQ_READY, CAMSEQ_RUN, CAMSEQ_SINGLE, CAMSEQ_STOP, CCAM_DMA_SIZE, compressorRun(), compressorSingle(), EN_INTERRUPT, getCamSeqState(), imageParamsR, IS_KAI11000, local_irq_restore, local_irq_save, MD1, MD7, nint_done_compress, nint_vact, P_CIRCBUFRP, P_CIRCBUFWP, P_FREECIRCBUF, P_JPEG_WP, P_SKIP_FRAMES, printk, resetPointers(), setCamSeqCount(), setCamSeqState(), writeSensorReg16(), X313_ACQUIRE_ON, X313_CHN_DIS, x313_dma_reset_chain(), x313_dma_start(), and X313_POSTINIT_SDCHAN.
void camSeqStop | ( | void | ) |
Definition at line 1506 of file cc3x3.c.
References CAMSEQ_READY, compressorStop(), DIS_INTERRUPTS, getCamSeqState(), imageParamsR, MD1, MD11, MD12, P_COMPRESSOR_CMD, printk, setCamSeqState(), X313_ACQUIRE_STOP, and x313_dma_stop().
static int ccam_DMA_ioctl | ( | struct inode * | inode, | |
struct file * | file, | |||
unsigned int | cmd, | |||
unsigned long | arg | |||
) | [static] |
to combine calls to x313_JPEG_cmd(arg) and some other action to be calles from ioctl, as before and lseek (,,2)
using dummy read after potential write - see c353.h
update at once, reset compressor and circbuf pointers
update immediately, non-stop mode, keep circbuf poinetrs
Definition at line 3451 of file cc3x3.c.
References CAMSEQ_DONE, camSeq_dump(), CAMSEQ_JPEG, camSeqStart(), camSeqStartClip(), camSeqStop(), CCAM_ADDR, CCAM_CTRL, CCAM_DMA_CMD_START, CCAM_DMA_CMD_STOP, CCAM_RPARS, CCAM_WPARS, getCamSeqCount(), getCamSeqState(), IO_CCAM_CR_MODIFY, IO_CCAM_DMA, IO_CCAM_JPEG, IO_CCAM_JPEG_CTRL, IO_CCAM_JPEG_GET_L, IO_CCAM_JPEG_GET_N, IO_CCAM_JPEG_QUALITY, IO_CCAM_MONITOR_SEQ, IO_CCAM_PINS_READ, IO_CCAM_PINS_WRITE, IO_CCAM_SET_EXT_EXPOSURE, JPEG_CMD_DUMP, JPEG_CMD_L_DONE, JPEG_CMD_N_DONE, local_irq_restore, local_irq_save, MD, MD1, MD6, P_PAGE_ACQ, P_PAGE_READ, P_PARS_CHANGED, P_QUALITY, P_UPDATE, port_csp0_addr, printk, programSensor(), x313_dma_start(), x313_dma_stop(), x313_dma_update_jpeg_header(), x313_f_invalidate(), X313_IOPINS, x313_JPEG_cmd(), x313_JPEG_cmd_wrapper(), x313_JPEG_ctrl(), and X313_WA_WCTL.
void ccamCRAnd | ( | unsigned long | d | ) |
Definition at line 1561 of file cc3x3.c.
References local_irq_restore, local_irq_save, port_csp0_addr, and X313_WA_WCTL.
void ccamCRAndOr | ( | unsigned long | d_and, | |
unsigned long | d_or | |||
) |
Definition at line 1583 of file cc3x3.c.
References local_irq_restore, local_irq_save, port_csp0_addr, and X313_WA_WCTL.
void ccamCROr | ( | unsigned long | d | ) |
Definition at line 1568 of file cc3x3.c.
References local_irq_restore, local_irq_save, port_csp0_addr, and X313_WA_WCTL.
void ccamCRXor | ( | unsigned long | d | ) |
Definition at line 1575 of file cc3x3.c.
References local_irq_restore, local_irq_save, port_csp0_addr, and X313_WA_WCTL.
void ch0_lock | ( | void | ) |
static int __init cmoscam_init | ( | void | ) | [static] |
Definition at line 1758 of file cc3x3.c.
References camSeq_interrupt(), CMOSCAM_DRIVER_NAME, CMOSCAM_MAJOR, cmoscam_name, init_autoexp_struct(), init_ccam_dma_buf_ptr(), init_waitqueue_head, KERN_ERR, printk, and x313_dma_init().
static int cmoscam_ioctl | ( | struct inode * | inode, | |
struct file * | filp, | |||
unsigned int | cmd, | |||
unsigned long | arg | |||
) | [static] |
Definition at line 3153 of file cc3x3.c.
References ccam_DMA_ioctl(), CMOSCAM_MINOR_CIRCBUF, CMOSCAM_MINOR_DMA, CMOSCAM_MINOR_FPN, CMOSCAM_MINOR_FRAME, CMOSCAM_MINOR_I2C, CMOSCAM_MINOR_JPEAGHEAD, CMOSCAM_MINOR_MCP, CMOSCAM_MINOR_SENSPARS, i2c_ioctl(), and init_FPGA().
static loff_t cmoscam_lseek | ( | struct file * | file, | |
loff_t | offset, | |||
int | orig | |||
) | [static] |
Definition at line 3177 of file cc3x3.c.
References CAMSEQ_RUN, CAMSEQ_SINGLE, CAMSEQ_STOP, CMOSCAM_MINOR_DMA, CMOSCAM_MINOR_FPN, CMOSCAM_MINOR_FRAME, CMOSCAM_MINOR_GAMMA, CMOSCAM_MINOR_HISTOGRAM, CMOSCAM_MINOR_MCP, CMOSCAM_MINOR_RWTABLES, CMOSCAM_MINOR_SENSPARS, getCamSeqState(), MCP_lseek, x313_dma_lseek(), x313_fpn_lseek(), x313_frame_lseek(), x313_gamma_lseek(), x313_histogram_lseek(), x313_senspars_lseek(), and x313_tables_lseek().
static int cmoscam_mmap | ( | struct file * | file, | |
struct vm_area_struct * | vma | |||
) | [static] |
Definition at line 3235 of file cc3x3.c.
References CMOSCAM_MINOR_SENSPARS, and x313_senspars_mmap().
static int cmoscam_open | ( | struct inode * | inode, | |
struct file * | filp | |||
) | [static] |
Definition at line 2964 of file cc3x3.c.
References CAMSEQ_RUN, CAMSEQ_STOP, CCAM_DONOTUSEAUX, ccamCROr(), CMOSCAM_MINOR_CIRCBUF, CMOSCAM_MINOR_DMA, CMOSCAM_MINOR_FPN, CMOSCAM_MINOR_FRAME, CMOSCAM_MINOR_GAMMA, CMOSCAM_MINOR_HISTOGRAM, CMOSCAM_MINOR_I2C, CMOSCAM_MINOR_JPEAGHEAD, CMOSCAM_MINOR_LOCK, CMOSCAM_MINOR_MCP, CMOSCAM_MINOR_RWTABLES, CMOSCAM_MINOR_SENSORJTAGFPGA, CMOSCAM_MINOR_SENSPARS, CMOSCAM_MINOR_UNLOCK, cmoscam_open_dma(), D1, gamma_tables_changed, getCamSeqState(), init_FPGA(), MCP_open, MD, port_csp0_addr, printk, X313_BITS, x313_fpn_open(), x313_frame_open(), X313_MASK, and X313_WA_SDCH0_CTL2.
static unsigned int cmoscam_poll | ( | struct file * | file, | |
poll_table * | wait | |||
) | [static] |
Definition at line 3241 of file cc3x3.c.
References CMOSCAM_MINOR_CIRCBUF, CMOSCAM_MINOR_DMA, and P_CIRCBUFWP.
static ssize_t cmoscam_read | ( | struct file * | file, | |
char * | buf, | |||
size_t | count, | |||
loff_t * | off | |||
) | [static] |
Definition at line 3199 of file cc3x3.c.
References CMOSCAM_MINOR_DMA, CMOSCAM_MINOR_FPN, CMOSCAM_MINOR_FRAME, CMOSCAM_MINOR_GAMMA, CMOSCAM_MINOR_HISTOGRAM, CMOSCAM_MINOR_MCP, CMOSCAM_MINOR_RWTABLES, CMOSCAM_MINOR_SENSPARS, MCP_read, x313_dma_read(), x313_fpn_read(), x313_frame_read(), x313_gamma_read(), x313_histogram_read(), x313_senspars_read(), and x313_tables_read().
static int cmoscam_release | ( | struct inode * | inode, | |
struct file * | filp | |||
) | [static] |
Definition at line 3098 of file cc3x3.c.
References CMOSCAM_MINOR_CIRCBUF, CMOSCAM_MINOR_DMA, CMOSCAM_MINOR_FPN, CMOSCAM_MINOR_FRAME, CMOSCAM_MINOR_GAMMA, CMOSCAM_MINOR_HISTOGRAM, CMOSCAM_MINOR_I2C, CMOSCAM_MINOR_JPEAGHEAD, CMOSCAM_MINOR_LOCK, CMOSCAM_MINOR_MCP, CMOSCAM_MINOR_RWTABLES, CMOSCAM_MINOR_SENSORJTAGFPGA, CMOSCAM_MINOR_SENSPARS, CMOSCAM_MINOR_UNLOCK, D, gamma_tables_changed, gamma_tables_soft, MD, printk, write_gamma_fpga(), x313_fpn_release(), and x313_frame_release().
static ssize_t cmoscam_write | ( | struct file * | file, | |
const char * | buf, | |||
size_t | count, | |||
loff_t * | off | |||
) | [static] |
Definition at line 3215 of file cc3x3.c.
References CMOSCAM_MINOR_DMA, CMOSCAM_MINOR_FPN, CMOSCAM_MINOR_GAMMA, CMOSCAM_MINOR_JPEAGHEAD, CMOSCAM_MINOR_MCP, CMOSCAM_MINOR_RWTABLES, CMOSCAM_MINOR_SENSORJTAGFPGA, CMOSCAM_MINOR_SENSPARS, MCP_write, x313_dma_write(), x313_fpn_write(), x313_gamma_write(), x313_senspars_write(), and x313_tables_write().
void compressorRun | ( | void | ) | [inline] |
Definition at line 1025 of file cc3x3.c.
References COMPRESSOR_CMD_RUN, imageParamsR, P_COMPRESSOR_CMD, port_csp0_addr, X313_CHN_EN, x313_get_JPEG_ctrl(), and X313_WA_COMP_CMD.
void compressorSingle | ( | void | ) | [inline] |
============================================================================ ! FPGA compressor maintains the 24-bit counter that is incremented ! with each 32 compressed bytes transferred to the system memory, rolling ! over 1<<24. ! When the compressor is reset, this counter is reset too(*), but the actual ! memory pointer (maintained in the CPU) is reset separately, so when ! frames are acquired in mode 7 (not continuous compression), this pointer ! will be reset before each frame transfer, while the DMA pointer continues ! (*) counter is reset when bit 5 (|0x20) written to ! port_csp0_addr[X313_WA_COMP_CMD] is zero, it is set in x313_get_JPEG_ctrl() !============================================================================
needed to clear bit 7 - it was set, so "single" worked as "start"
start compressing 1 frame (will stop automatically)
enable SDRAM channel 2
Definition at line 1018 of file cc3x3.c.
References COMPRESSOR_CMD_RUN, COMPRESSOR_CMD_SINGLE, imageParamsR, P_COMPRESSOR_CMD, port_csp0_addr, X313_CHN_EN, x313_get_JPEG_ctrl(), and X313_WA_COMP_CMD.
void compressorStop | ( | void | ) | [inline] |
Definition at line 1031 of file cc3x3.c.
References imageParamsR, P_COMPRESSOR_CMD, port_csp0_addr, X313_CHN_DIS, and X313_WA_COMP_CMD.
static DECLARE_MUTEX | ( | sensor_lock | ) | [static] |
DECLARE_TASKLET | ( | tasklet_done_compress | , | |
tasklet_irq_f | , | |||
IRQ_SRC_DONE_COMPRESS | ||||
) |
DECLARE_TASKLET | ( | tasklet_vact | , | |
tasklet_irq_f | , | |||
IRQ_SRC_VACT | ||||
) |
void dumpFrameParams | ( | struct frame_params_t * | fp, | |
const char * | title | |||
) |
Definition at line 750 of file cc3x3.c.
References frame_params_t::black, frame_params_t::bscale, frame_params_t::color, frame_params_t::colorsat, DEFAULT_COLOR_SATURATION_BLUE, DEFAULT_COLOR_SATURATION_RED, frame_params_t::exposure, frame_params_t::gain_b, frame_params_t::gain_g, frame_params_t::gain_gb, frame_params_t::gain_r, frame_params_t::gamma, frame_params_t::height, frame_params_t::meta_index, printk, frame_params_t::quality, frame_params_t::rscale, frame_params_t::signffff, frame_params_t::timestamp_sec, frame_params_t::timestamp_usec, and frame_params_t::width.
void exposition_unlock | ( | void | ) |
Definition at line 2871 of file cc3x3.c.
References get_imageParamsR(), P_EXPOS, P_VEXPOS, and set_imageParamsW().
int flush_par_cache | ( | void | ) |
unsigned long gain_balance | ( | unsigned long * | scale, | |
unsigned long | gain | |||
) |
unsigned long get_imageParamsR | ( | int | n | ) |
static int getCamSeqState | ( | void | ) | [static] |
Definition at line 1275 of file cc3x3.c.
References CAMSEQ_ACQUIRE, CAMSEQ_READY, CAMSEQ_WAIT_F, CAMSEQ_WAIT_T, local_irq_restore, local_irq_save, and X313_SR.
void init_autoexp_struct | ( | void | ) |
Definition at line 3886 of file cc3x3.c.
References aexp_window, aexp_window_set, autoexp_set, autoexp_state, imageParamsR, P_AEXPWND, and P_AUTOEXP.
static int init_FPGA | ( | void | ) | [static] |
Definition at line 1786 of file cc3x3.c.
References D5, fpga_initSDRAM(), getClockFreq(), imageParamsR, init_sensor(), initCamIRQs(), P_CLK_FPGA, P_CLK_SENSOR, port_csp0_addr, printk, setClockFreq(), udelay, X313__RA__MODEL, X313_CHN0_USED, X313_IS_SDRAM_ON, and x313_tables_gammainitlinear().
int init_sensor | ( | void | ) | [static] |
Definition at line 1885 of file cc3x3.c.
References CCAM_ARST_OFF, CCAM_CNVEN_ON, CCAM_MRST_OFF, CCAM_NEGRST, CCAM_POSRST, ccamCRAndOr(), default_common, dumpFrameParams(), frame_params, sensor_t::i2c_bytes, sensor_t::i2c_period, sensor_t::imageHeight, imageParamsR, sensor_t::imageWidth, init_mt9x001(), IS_KAI11000, kai11002, sensor_t::margins, MD10, MD7, memcpy(), sensor_t::nomClockFreq, P_CLK_FPGA, P_CLK_SENSOR, P_FRAME, P_I2C_BYTES, P_I2C_QPERIOD, P_IRQ_SMART, P_SENSOR, P_SENSOR_HEIGHT, P_SENSOR_WIDTH, P_SKIP_FRAMES, P_VIDEO, P_WOI_HEIGHT, P_WOI_WIDTH, port_csp0_addr, printk, PROGRAM_CLK_EN, program_i2c(), program_smart_irq(), programSensor(), sensor, SENSOR_NONE, sensor_t::sensorType, set_sensor_i2c_addr(), udelay, writeSensorDefaults(), and X313_WA_DCDC.
static void initCamIRQs | ( | void | ) | [static] |
Definition at line 1257 of file cc3x3.c.
References CAMSEQ_OFF, camSeqStop(), DIS_INTERRUPTS, printk, resetPointers(), and setCamSeqState().
MODULE_AUTHOR | ( | "Andrey Filippov <andrey@elphel.com>." | ) |
MODULE_DESCRIPTION | ( | "Elphel Model 353 camera driver" | ) |
MODULE_DESCRIPTION | ( | MY_MODULE_DESCRIPTION | ) |
module_init | ( | cmoscam_init | ) |
MODULE_LICENSE | ( | "GPL" | ) |
void program_early_timestamp | ( | void | ) |
Definition at line 3288 of file cc3x3.c.
References CCAM_TIMESTAMP_EARLY, CCAM_TIMESTAMP_NORMAL, imageParamsR, and P_EARLY_TIMESTAMP.
void program_i2c | ( | void | ) |
Definition at line 3275 of file cc3x3.c.
References imageParamsR, MD20, P_I2C_BYTES, P_I2C_QPERIOD, port_csp0_addr, and printk.
static int program_KAI11000 | ( | void | ) | [static] |
int program_sensor_exposition | ( | void | ) |
Definition at line 2876 of file cc3x3.c.
References hist_sensor_t::exposure, hist_sensor_lock(), hist_sensor_unlock(), P_VEXPOS, program_sensor_exposition_just(), and set_imageParamsW().
int program_sensor_exposition_just | ( | void | ) |
This program returns -1 for all not yet suported (re-supported ) sensors.
Just a placeholder TODO: put something meaningful here
Definition at line 2922 of file cc3x3.c.
References adjust_fps_2_compressor(), imageParamsR, P_SENSOR, program_exposure_mt9x001(), SENSOR_KAC1310, SENSOR_KAC5000, SENSOR_KAI11000, SENSOR_MASK, SENSOR_MT9X001, SENSOR_MT9Y001, SENSOR_ZR32112, and SENSOR_ZR32212.
void program_smart_irq | ( | void | ) |
void program_trigger | ( | void | ) |
program trigger parameters
overloaded lseek for SEEK_END with offset>0 Will execute JPEG commands (1..0xf) as with ioctl
Definition at line 3267 of file cc3x3.c.
References imageParamsR, P_TRIG_CONDITION, P_TRIG_DELAY, P_TRIG_OUT, P_TRIG_PERIOD, and port_csp0_addr.
Definition at line 2138 of file cc3x3.c.
References adjustBinning_mt9x001(), bh, frame_params_t::black, frame_params_t::bscale, bv, CAMSEQ_OFF, CAMSEQ_READY, camSeqStop(), CCAM_ARST_OFF, CCAM_MRST_OFF, CCAM_MRST_ON, CCAM_SET_HACT_PHASE, CCAM_TRIG_EXT, CCAM_TRIG_INT, ccamCRAndOr(), sensor_t::clearHeight, sensor_t::clearWidth, frame_params_t::color, frame_params_t::colorsat, sensor_t::dcmHor, sensor_t::dcmVert, DEFAULT_COLOR_SATURATION_BLUE, DEFAULT_COLOR_SATURATION_RED, dh, dumpFrameParams(), dv, hist_sensor_t::exposure, sensor_t::flips, frame_params, gains, frame_params_t::gamma, get_imageParamsR(), getCamSeqState(), sensor_t::hact_delay, frame_params_t::height, hist_image_exp(), hist_image_size(), hist_sensor_lock(), hist_sensor_unlock(), sensor_t::imageHeight, imageParamsR, sensor_t::imageWidth, init_mt9x001(), JPEG_CTRL_MONOCHROME, JPEG_CTRL_NOMOSAIC, local_irq_restore, local_irq_save, sensor_t::margins, sensor_t::maxClockFreq, MD1, MD10, MD11, MD12, MD13, MD2, MD6, MD8, MD9, sensor_t::minHeight, sensor_t::minWidth, P_ACTUAL_HEIGHT, P_ACTUAL_WIDTH, P_AUXCM, P_BAYER, P_BGFRAME, P_BIN_HOR, P_BIN_VERT, P_BITS, P_BSCALE, P_CLK_FPGA, P_CLK_SENSOR, P_COLOR, P_COLOR_SATURATION_BLUE, P_COLOR_SATURATION_RED, P_DCM_HOR, P_DCM_VERT, P_DMA_VALID, P_EXPOS, P_FLIP, P_FPGA_XTRA, P_FPNM, P_FPNS, P_FPSLM, P_FRAMESYNC_DLY, P_GAMMA, P_GSCALE, P_MCLK, P_OVERLAP, P_OVERSIZE, P_PAGE_ACQ, P_PARS_CHANGED, P_PERIOD, P_PF_HEIGHT, P_PGMSENSRSLT, P_PIXEL_HIGH, P_PIXEL_LOW, P_RSCALE, P_SENSOR, P_SENSOR_PHASE, P_SHIFTL, P_SKIP_FRAMES, P_TASKLET_CTL, P_TILES, P_TRIG, P_UPDATE, P_VEXPOS, P_VIRTTRIG, P_WOI_HEIGHT, P_WOI_LEFT, P_WOI_TOP, P_WOI_WIDTH, pfh, sensor_t::pixelHeight, sensor_t::pixelWidth, port_csp0_addr, printk, PROGRAM_CLK_EN, program_early_timestamp(), PROGRAM_FPN, program_gains_mt9x001(), program_KAI11000(), program_sensor_exposition_just(), program_woi_mt9x001(), frame_params_t::rscale, SCALE_MAX, SCALE_MIN, sensor, SENSOR_IBIS51300, SENSOR_KAC1310, SENSOR_KAC5000, SENSOR_KAI11000, SENSOR_MASK, SENSOR_MT9X001, SENSOR_MT9Y001, SENSOR_NONE, SENSOR_ZR32112, SENSOR_ZR32212, sensor_t::sensorPhase, sensor_t::sensorPhase90, set_gamma(), set_imageParamsW(), setCamSeqCount(), setCamSeqState(), setClockFreq(), udelay, gains_t::used, frame_params_t::width, X313_BITS, X313_CHN0_SET_USED, X313_CHN_EN, x313_get_JPEG_ctrl(), X313_INIT_SDCHAN, x313_JPEG_ctrl(), X313_MAP_FPN, X313_MASK, x313_program_focus(), X313_SR, X313_TIMESTAMPLEN, X313_WA_COLOR_SAT, X313_WA_FRAMESYNC_DLY, X313_WA_MCUNUM, X313_WA_NLINES, X313_WA_SDCH2_CTL1, X313_WA_SDCH2_CTL2, and X313_WA_VIRTTRIG.
Definition at line 1608 of file cc3x3.c.
References i2c_readData(), i2c_writeData(), local_irq_restore, local_irq_save, MD7, and printk.
Definition at line 1661 of file cc3x3.c.
References get_sensor_i2c_regs16(), i2c_readData(), i2c_writeData(), local_irq_restore, local_irq_save, MD8, and printk.
void resetPointers | ( | void | ) |
Definition at line 1056 of file cc3x3.c.
References imageParamsR, P_CIRCBUFRP, P_CIRCBUFWP, P_FREECIRCBUF, and P_JPEG_WP.
void set_imageParamsR | ( | int | n, | |
unsigned long | d | |||
) |
static void setCamSeqCount | ( | int | v | ) | [static] |
static void setCamSeqState | ( | int | v | ) | [static] |
Definition at line 1246 of file cc3x3.c.
References imageParamsR, MD, P_CAMSEQCOUNT, P_CAMSEQSTATE, and printk.
static void startAcquire | ( | void | ) | [inline, static] |
Definition at line 944 of file cc3x3.c.
References CAMSEQ_WAIT_F, EN_INTERRUPT, imageParamsR, nint_xferovr, P_BGFRAME, P_CAMSEQCOUNT, P_CAMSEQSTATE, X313_ACQUIRE_INTERNAL, and X313_ACQUIRE_ONCE.
void tasklet_irq_f | ( | unsigned long | arg | ) |
void updateJPEG_wp | ( | void | ) | [inline] |
uses fpga transfer counter to update JPEG_wp. Should be called before any compressorStop
number of 32-byte chunks transferred since compressor was reset
using macro defined in x353.h that makes a dummy read (reads after writes can be wrong)
Transferred since last JPEG_wp update (or counetr reset)
counts in 32-byte ( 8 of 32bit words) chunks
this is not cache-safe
P_* should be in the same 32-byte cache line
Definition at line 1038 of file cc3x3.c.
References CCAM_DMA_SIZE, imageParamsR, P_CIRCBUFRP, P_CIRCBUFSIZE, P_CIRCBUFWP, P_FOCUS_VALUE, P_FREECIRCBUF, P_JPEG_WP, X313_HIGHFREQ, and X313_XFERCNTR.
int write_gamma_fpga | ( | unsigned short | gamma_table[1028] | ) |
void writeSensorDefaults | ( | unsigned long * | data, | |
int | count | |||
) |
Definition at line 1630 of file cc3x3.c.
References i2c_writeData(), local_irq_restore, local_irq_save, MD8, and printk.
Definition at line 1681 of file cc3x3.c.
References get_sensor_i2c_regs16(), i2c_writeData(), local_irq_restore, local_irq_save, MD8, and printk.
Definition at line 1716 of file cc3x3.c.
References i2c_writeData(), int, local_irq_restore, local_irq_save, MD, and printk.
loff_t x313_gamma_lseek | ( | struct file * | file, | |
loff_t | offset, | |||
int | orig | |||
) |
ssize_t x313_gamma_read | ( | struct file * | file, | |
char * | buf, | |||
size_t | count, | |||
loff_t * | off | |||
) |
ssize_t x313_gamma_write | ( | struct file * | file, | |
const char * | buf, | |||
size_t | count, | |||
loff_t * | off | |||
) |
loff_t x313_histogram_lseek | ( | struct file * | file, | |
loff_t | offset, | |||
int | orig | |||
) |
ssize_t x313_histogram_read | ( | struct file * | file, | |
char * | buf, | |||
size_t | count, | |||
loff_t * | off | |||
) |
Definition at line 3439 of file cc3x3.c.
References camSeq_dump(), cmd, JPEG_CMD_DUMP, JPEG_CMD_L_DONE, JPEG_CMD_N_DONE, MD6, P_PARS_CHANGED, printk, PROGRAM_SENSOR_0, PROGRAM_SENSOR_1, programSensor(), and x313_JPEG_cmd().
void x313_program_focus | ( | int | totalwidth | ) |
HACK: programming focus filter parameters, will likely change. Should be called after the image width is already known.
loff_t x313_senspars_lseek | ( | struct file * | file, | |
loff_t | offset, | |||
int | orig | |||
) |
int x313_senspars_mmap | ( | struct file * | file, | |
struct vm_area_struct * | vma | |||
) |
ssize_t x313_senspars_read | ( | struct file * | file, | |
char * | buf, | |||
size_t | count, | |||
loff_t * | off | |||
) |
ssize_t x313_senspars_write | ( | struct file * | file, | |
const char * | buf, | |||
size_t | count, | |||
loff_t * | off | |||
) |
void x313_tables_gammainitlinear | ( | void | ) |
loff_t x313_tables_lseek | ( | struct file * | file, | |
loff_t | offset, | |||
int | orig | |||
) |
ssize_t x313_tables_read | ( | struct file * | file, | |
char * | buf, | |||
size_t | count, | |||
loff_t * | off | |||
) |
ssize_t x313_tables_write | ( | struct file * | file, | |
const char * | buf, | |||
size_t | count, | |||
loff_t * | off | |||
) |
struct aexp_window_t* aexp_window = NULL |
struct aexp_window_t* aexp_window_set = NULL |
struct autoexp_t* autoexp_set = NULL |
struct autoexp_t* autoexp_state = NULL |
volatile int camSeqCount [static] |
volatile int camSeqState [static] |
volatile unsigned long ccam_cr_shadow = 0 |
unsigned long ccam_dma_length |
struct file_operations cmoscam_fops [static] |
Initial value:
{ owner: THIS_MODULE, llseek: cmoscam_lseek, read: cmoscam_read, write: cmoscam_write, ioctl: cmoscam_ioctl, open: cmoscam_open, mmap: cmoscam_mmap, poll: cmoscam_poll, release: cmoscam_release }
const char cmoscam_name[] = "cmoscam353" [static] |
unsigned long default_common[] [static] |
unsigned long DMA_buf_start [static] |
unsigned short* exif_index = (unsigned short * ) &frame_params.meta_index |
char* exif_meta_time_string |
int fpga_counter_prev = 0 [static] |
unsigned long fpga_tables_buffer[CX313_FPGA_TABLES_SIZE] |
struct frame_params_t frame_params |
Initial value:
{ .exposure=0, .width=0, .height=0, .colorsat= DEFAULT_COLOR_SATURATION_BLUE | (DEFAULT_COLOR_SATURATION_RED << 16), .color=0, .quality=50, .gamma=100, .black=0, .rscale=0, .bscale=0, .gain_r=0, .gain_g=0, .gain_b=0, .gain_gb=0, .meta_index =0, .signffff=0xffff, {.timestamp_sec=0}, .timestamp_usec=0 }
unsigned long* frame_params_ul = (unsigned long *) &frame_params |
unsigned short gamma_tables_soft[1028] |
unsigned long* imageParamsR_PREV = &imageParamsR[2*P_NUMBER] |
unsigned long* imageParamsR_PREV_PREV = &imageParamsR[3*P_NUMBER] |
unsigned long* imageParamsW = &imageParamsR[P_NUMBER] |
volatile unsigned long intm_shadow = 0 [static] |
int jpeg_sdram_ctl0 [static] |
int JPEG_wp_prev = 0 [static] |
struct meta_offsets_t meta_offsets [static] |
unsigned char sensor_i2c_addr [static] |
unsigned char* sensor_i2c_regs |
unsigned short sensor_i2c_regs16[0x100] [static] |
wait_queue_head_t vack_wait_queue |
wait_queue_head_t x313_wait_queue |