Home
last modified time | relevance | path

Searched refs:gain (Results 1 – 25 of 90) sorted by relevance

1234

/drivers/media/video/gspca/
Dautogain_functions.h35 int i, steps, gain, orig_gain, exposure, orig_exposure; in auto_gain_n_exposure() local
38 orig_gain = gain = sd->ctrls[GAIN].val; in auto_gain_n_exposure()
50 if (gain > gain_knee) in auto_gain_n_exposure()
51 gain--; in auto_gain_n_exposure()
54 else if (gain > sd->ctrls[GAIN].def) in auto_gain_n_exposure()
55 gain--; in auto_gain_n_exposure()
58 else if (gain > sd->ctrls[GAIN].min) in auto_gain_n_exposure()
59 gain--; in auto_gain_n_exposure()
63 if (gain < sd->ctrls[GAIN].def) in auto_gain_n_exposure()
64 gain++; in auto_gain_n_exposure()
[all …]
Dsonixb.c668 u8 gain = sd->ctrls[GAIN].val; in setsensorgain() local
675 i2c[3] = 0x3f - (gain / 4); in setsensorgain()
676 i2c[4] = 0x3f - (gain / 4); in setsensorgain()
677 i2c[5] = 0x3f - (gain / 4); in setsensorgain()
688 i2c[4] = 255 - gain; in setsensorgain()
696 gain = 255 - gain; in setsensorgain()
698 i2c[3] |= (gain & 0x80) >> 7; in setsensorgain()
699 i2c[3] |= (gain & 0x40) >> 5; in setsensorgain()
700 i2c[3] |= (gain & 0x20) >> 3; in setsensorgain()
701 i2c[3] |= (gain & 0x10) >> 1; in setsensorgain()
[all …]
Dtv8532.c34 __u16 gain; member
213 sd->gain = GAIN_DEF; in sd_config()
257 reg_w2(gspca_dev, R20_GAIN_G1L, sd->gain); in setgain()
258 reg_w2(gspca_dev, R22_GAIN_RL, sd->gain); in setgain()
259 reg_w2(gspca_dev, R24_GAIN_BL, sd->gain); in setgain()
260 reg_w2(gspca_dev, R26_GAIN_G2L, sd->gain); in setgain()
364 sd->gain = val; in sd_setgain()
374 *val = sd->gain; in sd_getgain()
Dpac7311.c68 unsigned char gain; member
400 sd->gain = GAIN_DEF; in sd_config()
422 int gain = GAIN_MAX - sd->gain; in setgain() local
424 if (gain < 1) in setgain()
425 gain = 1; in setgain()
426 else if (gain > 245) in setgain()
427 gain = 245; in setgain()
430 reg_w(gspca_dev, 0x0f, gain); in setgain()
693 sd->gain = val; in sd_setgain()
703 *val = sd->gain; in sd_getgain()
[all …]
Dpac207.c64 u8 gain; member
252 sd->gain = PAC207_GAIN_DEFAULT; in sd_config()
291 pac207_write_reg(gspca_dev, 0x0e, sd->gain); in sd_start()
409 pac207_write_reg(gspca_dev, 0x0e, sd->gain); in setgain()
454 sd->gain = val; in sd_setgain()
464 *val = sd->gain; in sd_getgain()
479 sd->gain = PAC207_GAIN_DEFAULT; in sd_setautogain()
Dsn9c20x.c1682 u8 gain[8] = {0x81, sd->i2c_addr, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1d}; in set_gain() local
1692 gain[0] |= (2 << 4); in set_gain()
1693 gain[3] = ov_gain[g]; in set_gain()
1696 gain[0] |= (3 << 4); in set_gain()
1697 gain[2] = 0x35; in set_gain()
1698 gain[3] = micron1_gain[g] >> 8; in set_gain()
1699 gain[4] = micron1_gain[g]; in set_gain()
1702 gain[0] |= (3 << 4); in set_gain()
1703 gain[2] = 0x2f; in set_gain()
1704 gain[3] = micron1_gain[g] >> 8; in set_gain()
[all …]
Dspca561.c63 __u8 gain; /* rev12a only */ member
469 sd->gain = GAIN_DEF; in sd_config()
597 if (sd->gain < 64) in setgain()
598 gspca_dev->usb_buf[0] = sd->gain; in setgain()
599 else if (sd->gain < 128) in setgain()
600 gspca_dev->usb_buf[0] = (sd->gain / 2) | 0x40; in setgain()
602 gspca_dev->usb_buf[0] = (sd->gain / 4) | 0xc0; in setgain()
920 sd->gain = val; in sd_setgain()
930 *val = sd->gain; in sd_getgain()
Dmr97310a.c95 u32 gain; member
660 sd->gain = gain_default; in sd_config()
1078 sensor_write1(gspca_dev, 0x0e, sd->gain); in setgain()
1081 sensor_write1(gspca_dev, gainreg, sd->gain >> 8); in setgain()
1082 sensor_write1(gspca_dev, gainreg + 1, sd->gain & 0xff); in setgain()
1085 sensor_write1(gspca_dev, 0x10, sd->gain); in setgain()
1139 sd->gain = val; in sd_setgain()
1149 *val = sd->gain; in sd_getgain()
/drivers/mfd/
Dab8500-gpadc.c99 u64 gain; member
157 if (!gpadc->cal_data[ADC_INPUT_VMAIN].gain) { in ab8500_gpadc_ad_to_voltage()
164 res = (int) (ad_value * gpadc->cal_data[ADC_INPUT_VMAIN].gain + in ab8500_gpadc_ad_to_voltage()
174 if (!gpadc->cal_data[ADC_INPUT_BTEMP].gain) { in ab8500_gpadc_ad_to_voltage()
181 res = (int) (ad_value * gpadc->cal_data[ADC_INPUT_BTEMP].gain + in ab8500_gpadc_ad_to_voltage()
187 if (!gpadc->cal_data[ADC_INPUT_VBAT].gain) { in ab8500_gpadc_ad_to_voltage()
194 res = (int) (ad_value * gpadc->cal_data[ADC_INPUT_VBAT].gain + in ab8500_gpadc_ad_to_voltage()
518 gpadc->cal_data[ADC_INPUT_VMAIN].gain = CALIB_SCALE * in ab8500_gpadc_read_calibration_data()
525 gpadc->cal_data[ADC_INPUT_VMAIN].gain = 0; in ab8500_gpadc_read_calibration_data()
536 gpadc->cal_data[ADC_INPUT_BTEMP].gain = in ab8500_gpadc_read_calibration_data()
[all …]
/drivers/isdn/mISDN/
Ddsp_biquad.h30 int32_t gain; member
41 int32_t gain, int32_t a1, int32_t a2, int32_t b1, int32_t b2) in biquad2_init() argument
43 bq->gain = gain; in biquad2_init()
58 z0 = sample * bq->gain + bq->z1 * bq->a1 + bq->z2 * bq->a2; in biquad2()
/drivers/input/
Dff-memless.c63 int gain; member
244 int gain) in ml_combine_effects() argument
257 x = fixp_mult(fixp_sin(i), level) * gain / 0xffff; in ml_combine_effects()
258 y = fixp_mult(-fixp_cos(i), level) * gain / 0xffff; in ml_combine_effects()
271 strong = (u32)new->u.rumble.strong_magnitude * gain / 0xffff; in ml_combine_effects()
272 weak = (u32)new->u.rumble.weak_magnitude * gain / 0xffff; in ml_combine_effects()
298 i = i * gain / 0x7fff; in ml_combine_effects()
382 ml_combine_effects(combo_effect, state, ml->gain); in ml_get_combo_effect()
418 static void ml_ff_set_gain(struct input_dev *dev, u16 gain) in ml_ff_set_gain() argument
423 ml->gain = gain; in ml_ff_set_gain()
[all …]
/drivers/media/video/
Dmt9t001.c384 static u16 mt9t001_gain_value(s32 *gain) in mt9t001_gain_value() argument
400 if (*gain <= 32) in mt9t001_gain_value()
401 return *gain; in mt9t001_gain_value()
403 if (*gain <= 64) { in mt9t001_gain_value()
404 *gain &= ~1; in mt9t001_gain_value()
405 return (1 << 6) | (*gain >> 1); in mt9t001_gain_value()
408 *gain &= ~7; in mt9t001_gain_value()
409 return ((*gain - 64) << 5) | (1 << 6) | 32; in mt9t001_gain_value()
444 struct v4l2_ctrl *gain = mt9t001->gains[i]; in mt9t001_s_ctrl() local
446 if (gain->val != gain->cur.val) in mt9t001_s_ctrl()
[all …]
Dmt9v022.c115 struct v4l2_ctrl *gain; member
454 struct v4l2_ctrl *gain = mt9v022->gain; in mt9v022_g_volatile_ctrl() local
465 range = gain->maximum - gain->minimum; in mt9v022_g_volatile_ctrl()
466 gain->val = ((data - 16) * range + 24) / 48 + gain->minimum; in mt9v022_g_volatile_ctrl()
510 struct v4l2_ctrl *gain = mt9v022->gain; in mt9v022_s_ctrl() local
512 unsigned long range = gain->maximum - gain->minimum; in mt9v022_s_ctrl()
514 unsigned long gain_val = ((gain->val - gain->minimum) * in mt9v022_s_ctrl()
802 mt9v022->gain = v4l2_ctrl_new_std(&mt9v022->hdl, &mt9v022_ctrl_ops, in mt9v022_probe()
Dmt9m111.c206 struct v4l2_ctrl *gain; member
686 static int mt9m111_set_global_gain(struct mt9m111 *mt9m111, int gain) in mt9m111_set_global_gain() argument
691 if (gain > 63 * 2 * 2) in mt9m111_set_global_gain()
694 if ((gain >= 64 * 2) && (gain < 63 * 2 * 2)) in mt9m111_set_global_gain()
695 val = (1 << 10) | (1 << 9) | (gain / 4); in mt9m111_set_global_gain()
696 else if ((gain >= 64) && (gain < 64 * 2)) in mt9m111_set_global_gain()
697 val = (1 << 9) | (gain / 2); in mt9m111_set_global_gain()
699 val = gain; in mt9m111_set_global_gain()
750 v4l2_ctrl_s_ctrl(mt9m111->gain, mt9m111_get_global_gain(mt9m111)); in mt9m111_suspend()
954 mt9m111->gain = v4l2_ctrl_new_std(&mt9m111->hdl, &mt9m111_ctrl_ops, in mt9m111_probe()
Dmt9m001.c431 unsigned long gain = ((ctrl->val - ctrl->default_value - 1) * in mt9m001_s_ctrl() local
434 if (gain <= 32) in mt9m001_s_ctrl()
435 data = gain; in mt9m001_s_ctrl()
436 else if (gain <= 64) in mt9m001_s_ctrl()
437 data = ((gain - 32) * 16 + 16) / 32 + 80; in mt9m001_s_ctrl()
439 data = ((gain - 64) * 7 + 28) / 56 + 96; in mt9m001_s_ctrl()
/drivers/media/dvb/frontends/
Dtda10023.c422 u16 gain = ((255-tda10023_readreg(state, 0x17))) + (255-ifgain)/16; in tda10023_read_signal_strength() local
424 if (gain>0x90) in tda10023_read_signal_strength()
425 gain=gain+2*(gain-0x90); in tda10023_read_signal_strength()
426 if (gain>255) in tda10023_read_signal_strength()
427 gain=255; in tda10023_read_signal_strength()
429 *strength = (gain<<8)|gain; in tda10023_read_signal_strength()
Ddib0070.c611 static u16 dib0070_read_wbd_offset(struct dib0070_state *state, u8 gain) in dib0070_read_wbd_offset() argument
618 …dib0070_write_reg(state, 0x0f, (1 << 14) | (2 << 12) | (gain << 9) | (1 << 8) | (1 << 7) | (0 << 0… in dib0070_read_wbd_offset()
627 u8 gain; in dib0070_wbd_offset_calibration() local
628 for (gain = 6; gain < 8; gain++) { in dib0070_wbd_offset_calibration()
629 state->wbd_offset_3_3[gain - 6] = ((dib0070_read_wbd_offset(state, gain) * 8 * 18 / 33 + 1) / 2); in dib0070_wbd_offset_calibration()
630 dprintk("Gain: %d, WBDOffset (3.3V) = %hd", gain, state->wbd_offset_3_3[gain-6]); in dib0070_wbd_offset_calibration()
Dix2505v.c140 u8 gain, cc, ref, psc, local_osc, lpf; in ix2505v_set_params() local
148 gain = (state->config->tuner_gain < 4) in ix2505v_set_params()
151 gain = 0x0; in ix2505v_set_params()
166 data[0] = ((gain & 0x3) << 5) | (N >> 3); in ix2505v_set_params()
Dstv6110x.h49 int (*tuner_set_bbgain) (struct dvb_frontend *fe, u32 gain);
50 int (*tuner_get_bbgain) (struct dvb_frontend *fe, u32 *gain);
Dl64781.c366 int gain = l64781_readreg (state, 0x0e); in l64781_read_status() local
373 if (gain > 5) in l64781_read_status()
407 u8 gain = l64781_readreg (state, 0x0e); in l64781_read_signal_strength() local
408 *signal_strength = (gain << 8) | gain; in l64781_read_signal_strength()
Dtda10021.c355 u8 gain = tda10021_readreg(state, 0x17); in tda10021_read_signal_strength() local
358 gain = ~gain; in tda10021_read_signal_strength()
359 *strength = (gain << 8) | gain; in tda10021_read_signal_strength()
/drivers/media/video/gspca/stv06xx/
Dstv06xx_st6422.c269 u8 gain; in setgain() local
272 gain = sensor_settings->ctrls[GAIN].val; in setgain()
275 err = stv06xx_write_bridge(sd, 0x0509, gain); in setgain()
279 err = stv06xx_write_bridge(sd, 0x050a, gain); in setgain()
283 err = stv06xx_write_bridge(sd, 0x050b, gain); in setgain()
/drivers/staging/comedi/drivers/
Ddas800.c610 int gain, startChan; in das800_ai_do_cmdtest() local
708 gain = CR_RANGE(cmd->chanlist[0]); in das800_ai_do_cmdtest()
717 if (CR_RANGE(cmd->chanlist[i]) != gain) { in das800_ai_do_cmdtest()
734 int startChan, endChan, scan, gain; in das800_ai_do_cmd() local
758 gain = CR_RANGE(async->cmd.chanlist[0]); in das800_ai_do_cmd()
759 if (thisboard->resolution == 12 && gain > 0) in das800_ai_do_cmd()
760 gain += 0x7; in das800_ai_do_cmd()
761 gain &= 0xf; in das800_ai_do_cmd()
762 outb(gain, dev->iobase + DAS800_GAIN); in das800_ai_do_cmd()
/drivers/media/video/davinci/
Ddm355_ccdc.c77 .gain = {
163 regw(ccdc_cfg.bayer.gain.r_ye, RYEGAIN); in ccdc_config_gain_offset()
164 regw(ccdc_cfg.bayer.gain.gr_cy, GRCYGAIN); in ccdc_config_gain_offset()
165 regw(ccdc_cfg.bayer.gain.gb_g, GBGGAIN); in ccdc_config_gain_offset()
166 regw(ccdc_cfg.bayer.gain.b_mg, BMGGAIN); in ccdc_config_gain_offset()
190 ccdc_cfg.bayer.gain.r_ye = GAIN_DEFAULT; in ccdc_restore_defaults()
191 ccdc_cfg.bayer.gain.gb_g = GAIN_DEFAULT; in ccdc_restore_defaults()
192 ccdc_cfg.bayer.gain.gr_cy = GAIN_DEFAULT; in ccdc_restore_defaults()
193 ccdc_cfg.bayer.gain.b_mg = GAIN_DEFAULT; in ccdc_restore_defaults()
Disif.c67 .gain = {
117 .gain = {
244 val = (gain_off_p->gain.r_ye.integer << GAIN_INTEGER_SHIFT) | in isif_config_gain_offset()
245 gain_off_p->gain.r_ye.decimal; in isif_config_gain_offset()
248 val = (gain_off_p->gain.gr_cy.integer << GAIN_INTEGER_SHIFT) | in isif_config_gain_offset()
249 gain_off_p->gain.gr_cy.decimal; in isif_config_gain_offset()
252 val = (gain_off_p->gain.gb_g.integer << GAIN_INTEGER_SHIFT) | in isif_config_gain_offset()
253 gain_off_p->gain.gb_g.decimal; in isif_config_gain_offset()
256 val = (gain_off_p->gain.b_mg.integer << GAIN_INTEGER_SHIFT) | in isif_config_gain_offset()
257 gain_off_p->gain.b_mg.decimal; in isif_config_gain_offset()

1234