Home
last modified time | relevance | path

Searched full:gain (Results 1 – 25 of 957) sorted by relevance

12345678910>>...39

/Linux-v5.4/drivers/media/usb/gspca/
Dautogain_functions.c3 * Functions for auto gain.
9 /* auto gain and exposure algorithm based on the knee algorithm described here:
12 Returns 0 if no changes were made, 1 if the gain and or exposure settings
22 s32 gain, orig_gain, exposure, orig_exposure; in gspca_expo_autogain() local
28 orig_gain = gain = v4l2_ctrl_g_ctrl(gspca_dev->gain); in gspca_expo_autogain()
40 if (gain > gain_knee) in gspca_expo_autogain()
41 gain--; in gspca_expo_autogain()
44 else if (gain > gspca_dev->gain->default_value) in gspca_expo_autogain()
45 gain--; in gspca_expo_autogain()
48 else if (gain > gspca_dev->gain->minimum) in gspca_expo_autogain()
[all …]
Dsonixb.c14 0x10 high nibble red gain low nibble blue gain
15 0x11 low nibble green gain
17 0x05 red gain 0-127
18 0x06 blue gain 0-127
19 0x07 green gain 0-127
115 if we adjust the gain or exposure we must ignore at least the next frame for
230 add a bit additional red gain and a lot additional blue gain, which
291 0x09 Blue Gain
292 0x0a Green1 Gain
293 0x0b Green2 Gain
[all …]
Dtouptek.c33 * Three gain stages
35 * 0x007F: low gain bits
36 * 0x0080: medium gain bit
37 * 0x0100: high gain bit
38 * gain = enable * (1 + regH) * (1 + regM) * z * regL
40 * Gain implementation
43 * Gain does not vary with resolution (checked 640x480 vs 1600x1200)
48 * Gain, GTOP, B, R, GBOT
71 * However, V4L expects a main gain channel + R and B balance
75 * Converted using gain model turns out to be quite linear:
[all …]
/Linux-v5.4/Documentation/media/uapi/v4l/
Dext-ctrls-rf-tuner.rst57 Enables/disables LNA automatic gain control (AGC)
60 Enables/disables mixer automatic gain control (AGC)
63 Enables/disables IF automatic gain control (AGC)
68 LNA gain and the RF gain in this document is that the LNA gain is
69 integrated in the tuner chip while the RF gain is a separate chip.
70 There may be both RF and LNA gain controls in the same device. The
74 LNA (low noise amplifier) gain is first gain stage on the RF tuner
77 ``V4L2_CID_RF_TUNER_RF_GAIN`` to understand how RF gain and LNA gain
82 Mixer gain is second gain stage on the RF tuner signal path. It is
88 IF gain is last gain stage on the RF tuner signal path. It is
/Linux-v5.4/drivers/iio/amplifiers/
Dad8366.c3 * AD8366 and similar Gain Amplifiers
4 * This driver supports the following gain amplifiers:
5 * AD8366 Dual-Digital Variable Gain Amplifier (VGA)
6 * ADA4961 BiCMOS RF Digital Gain Amplifier (DGA)
7 * ADL5240 Digitally controlled variable gain amplifier (VGA)
104 int code, gain = 0; in ad8366_read_raw() local
113 gain = code * 253 + 4500; in ad8366_read_raw()
116 gain = 15000 - code * 1000; in ad8366_read_raw()
119 gain = 20000 - 31500 + code * 500; in ad8366_read_raw()
124 *val = gain / 1000; in ad8366_read_raw()
[all …]
DKconfig3 # Gain Amplifiers, etc.
10 tristate "Analog Devices AD8366 and similar Gain Amplifiers"
16 gain amplifiers. This driver supports the following gain amplifiers
18 AD8366 Dual-Digital Variable Gain Amplifier (VGA)
19 ADA4961 BiCMOS RF Digital Gain Amplifier (DGA)
20 ADL5240 Digitally controlled variable gain amplifier (VGA)
/Linux-v5.4/drivers/iio/adc/
Dhx711.c24 /* gain to pulse and scale conversion */
28 int gain; member
48 static int hx711_get_gain_to_pulse(int gain) in hx711_get_gain_to_pulse() argument
53 if (hx711_gain_to_scale[i].gain == gain) in hx711_get_gain_to_pulse()
58 static int hx711_get_gain_to_scale(int gain) in hx711_get_gain_to_scale() argument
63 if (hx711_gain_to_scale[i].gain == gain) in hx711_get_gain_to_scale()
74 return hx711_gain_to_scale[i].gain; in hx711_get_scale_to_gain()
83 int gain_set; /* gain set on device */
84 int gain_chan_a; /* gain for channel A */
209 * after a reset the gain is 128 so we do a dummy read in hx711_reset()
[all …]
Dad7780.c65 unsigned int gain; member
122 *val = voltage_uv * st->gain; in ad7780_read_raw()
148 unsigned int full_scale, gain; in ad7780_write_raw() local
160 gain = DIV_ROUND_CLOSEST_ULL(vref, full_scale); in ad7780_write_raw()
161 gain = DIV_ROUND_CLOSEST(gain, val2); in ad7780_write_raw()
162 st->gain = gain; in ad7780_write_raw()
163 if (gain < AD7780_GAIN_MIDPOINT) in ad7780_write_raw()
164 gain = 0; in ad7780_write_raw()
166 gain = 1; in ad7780_write_raw()
167 gpiod_set_value(st->gain_gpio, gain); in ad7780_write_raw()
[all …]
/Linux-v5.4/drivers/net/wireless/mediatek/mt76/mt76x2/
Dphy.c15 s8 gain; in mt76x2_adjust_high_lna_gain() local
17 gain = FIELD_GET(MT_BBP_AGC_LNA_HIGH_GAIN, in mt76x2_adjust_high_lna_gain()
19 gain -= offset / 2; in mt76x2_adjust_high_lna_gain()
20 mt76_rmw_field(dev, MT_BBP(AGC, reg), MT_BBP_AGC_LNA_HIGH_GAIN, gain); in mt76x2_adjust_high_lna_gain()
26 s8 gain; in mt76x2_adjust_agc_gain() local
28 gain = FIELD_GET(MT_BBP_AGC_GAIN, mt76_rr(dev, MT_BBP(AGC, reg))); in mt76x2_adjust_agc_gain()
29 gain += offset; in mt76x2_adjust_agc_gain()
30 mt76_rmw_field(dev, MT_BBP(AGC, reg), MT_BBP_AGC_GAIN, gain); in mt76x2_adjust_agc_gain()
144 int base_power, gain; in mt76x2_phy_set_txpower() local
163 gain = min(txp_0, txp_1); in mt76x2_phy_set_txpower()
[all …]
/Linux-v5.4/drivers/net/wireless/broadcom/b43/
Dphy_n.h28 #define B43_NPHY_C1_CGAINI B43_PHY_N(0x01C) /* Core 1 compute gain info */
29 #define B43_NPHY_C1_CGAINI_GAINBKOFF 0x001F /* Gain backoff */
31 #define B43_NPHY_C1_CGAINI_CLIPGBKOFF 0x03E0 /* Clip gain backoff */
33 #define B43_NPHY_C1_CGAINI_GAINSTEP 0x1C00 /* Gain step */
36 #define B43_NPHY_C1_CCK_CGAINI B43_PHY_N(0x01D) /* Core 1 CCK compute gain info */
37 #define B43_NPHY_C1_CCK_CGAINI_GAINBKOFF 0x001F /* Gain backoff */
38 #define B43_NPHY_C1_CCK_CGAINI_CLIPGBKOFF 0x01E0 /* CCK barely clip gain backoff */
39 #define B43_NPHY_C1_MINMAX_GAIN B43_PHY_N(0x01E) /* Core 1 min/max gain */
40 #define B43_NPHY_C1_MINGAIN 0x00FF /* Minimum gain */
42 #define B43_NPHY_C1_MAXGAIN 0xFF00 /* Maximum gain */
[all …]
/Linux-v5.4/Documentation/devicetree/bindings/iio/light/
Dus5182d.txt14 - upisemi,upper-dark-gain: 8-bit dark gain compensation factor(4 int and 4
17 - upisemi,lower-dark-gain: 8-bit dark gain compensation factor(4 int and 4
33 There will be no dark-gain compensation by default when ALS > thresh
34 (0 * dark-gain), and a 1.35 compensation factor when ALS < thresh.
43 upisemi,upper-dark-gain = /bits/ 8 <0x00>;
44 upisemi,lower-dark-gain = /bits/ 8 <0x16>;
/Linux-v5.4/drivers/staging/comedi/drivers/
Ddt2811.c28 * - A/D ranges are not programmable but the gain is. The AI subdevice has
29 * a range_table containing all the possible analog input range/gain
31 * your board configuration and the desired gain to correctly convert
33 * gain.
58 #define DT2811_ADGCR_REG 0x01 /* r/w A/D Gain/Channel */
106 * The gain may be set to 1, 2, 4, or 8 (on the dt2811-pgh) or to
111 BIP_RANGE(5), /* range 0: gain=1 */
112 BIP_RANGE(2.5), /* range 1: gain=2 */
113 BIP_RANGE(1.25), /* range 2: gain=4 */
114 BIP_RANGE(0.625), /* range 3: gain=8 */
[all …]
/Linux-v5.4/drivers/media/i2c/
Dvs6624_regs.h132 #define VS6624_DIRECT_ANAL_GAIN_MSB 0x119D /* analog gain for Direct Mode MSB */
133 #define VS6624_DIRECT_ANAL_GAIN_LSB 0x119E /* analog gain for Direct Mode LSB */
134 #define VS6624_DIRECT_DIGI_GAIN_MSB 0x11A1 /* digital gain for Direct Mode MSB */
135 #define VS6624_DIRECT_DIGI_GAIN_LSB 0x11A2 /* digital gain for Direct Mode LSB */
140 #define VS6624_FLASH_ANAL_GAIN_MSB 0x11AD /* analog gain for Flash Gun Mode MSB */
141 #define VS6624_FLASH_ANAL_GAIN_LSB 0x11AE /* analog gain for Flash Gun Mode LSB */
142 #define VS6624_FLASH_DIGI_GAIN_MSB 0x11B1 /* digital gain for Flash Gun Mode MSB */
143 #define VS6624_FLASH_DIGI_GAIN_LSB 0x11B2 /* digital gain for Flash Gun Mode LSB */
147 #define VS6624_FLASH_AG_THR_MSB 0x11BB /* recommend flash gun analog gain threshold MSB */
148 #define VS6624_FLASH_AG_THR_LSB 0x11BC /* recommend flash gun analog gain threshold LSB */
[all …]
/Linux-v5.4/drivers/iio/magnetometer/
Dst_magn_core.c140 .gain = 1100,
146 .gain = 855,
152 .gain = 670,
158 .gain = 450,
164 .gain = 400,
170 .gain = 330,
176 .gain = 230,
219 .gain = 909,
225 .gain = 1169,
231 .gain = 1492,
[all …]
/Linux-v5.4/sound/soc/samsung/
Ds3c24xx_simtec.c23 * speaker_gain_get - read the speaker gain setting.
24 * @kcontrol: The control for the speaker gain.
27 * Read the value for the AMP gain control.
37 * speaker_gain_set - set the value of the speaker amp gain
47 * speaker_gain_put - set the speaker gain setting.
48 * @kcontrol: The control for the speaker gain.
51 * Set the value of the speaker gain from the specified
54 * Note, if the speaker amp is muted, then we do not set a gain value
72 SOC_SINGLE_EXT("Speaker Gain", 0, 0, 3, 0,
87 /* if we're umuting, also re-set the gain */ in spk_unmute_state()
[all …]
/Linux-v5.4/sound/spi/
Dat73c213.h22 /* DAC left line in gain register */
26 /* DAC right line in gain register */
30 /* DAC Left Master Playback Gain Register */
34 /* DAC Right Master Playback Gain Register */
38 /* DAC Left Line Out Gain Register */
42 /* DAC Right Line Out Gain Register */
85 /* DAC Auxiliary Input Gain Control Register */
/Linux-v5.4/sound/mips/
Dad1843.c37 ad1843_RIG = { 2, 0, 4 }, /* Right ADC Input Gain */
38 ad1843_RMGE = { 2, 4, 1 }, /* Right ADC Mic Gain Enable */
40 ad1843_LIG = { 2, 8, 4 }, /* Left ADC Input Gain */
41 ad1843_LMGE = { 2, 12, 1 }, /* Left ADC Mic Gain Enable */
43 ad1843_RD2M = { 3, 0, 5 }, /* Right DAC 2 Mix Gain/Atten */
45 ad1843_LD2M = { 3, 8, 5 }, /* Left DAC 2 Mix Gain/Atten */
47 ad1843_RX1M = { 4, 0, 5 }, /* Right Aux 1 Mix Gain/Atten */
49 ad1843_LX1M = { 4, 8, 5 }, /* Left Aux 1 Mix Gain/Atten */
51 ad1843_RX2M = { 5, 0, 5 }, /* Right Aux 2 Mix Gain/Atten */
53 ad1843_LX2M = { 5, 8, 5 }, /* Left Aux 2 Mix Gain/Atten */
[all …]
/Linux-v5.4/drivers/iio/accel/
Dst_accel_core.c138 .gain = IIO_G_TO_M_S_2(1000),
143 .gain = IIO_G_TO_M_S_2(2000),
148 .gain = IIO_G_TO_M_S_2(4000),
153 .gain = IIO_G_TO_M_S_2(12000),
217 .gain = IIO_G_TO_M_S_2(1000),
222 .gain = IIO_G_TO_M_S_2(2000),
227 .gain = IIO_G_TO_M_S_2(3900),
301 .gain = IIO_G_TO_M_S_2(61),
306 .gain = IIO_G_TO_M_S_2(122),
311 .gain = IIO_G_TO_M_S_2(183),
[all …]
/Linux-v5.4/sound/soc/codecs/
Dmax9759.c22 unsigned int gain; member
48 ucontrol->value.integer.value[0] = priv->gain; in speaker_gain_control_get()
70 priv->gain = ucontrol->value.integer.value[0]; in speaker_gain_control_put()
74 speaker_gain_table[priv->gain][0]); in speaker_gain_control_put()
77 speaker_gain_table[priv->gain][1]); in speaker_gain_control_put()
107 SOC_SINGLE_EXT_TLV("Speaker Gain Volume", 0, 0, 3, 0,
168 priv->gpiod_gain = devm_gpiod_get_array(dev, "gain", GPIOD_OUT_HIGH); in max9759_probe()
172 dev_err(dev, "Failed to get 'gain' gpios: %d", err); in max9759_probe()
175 priv->gain = 0; in max9759_probe()
178 dev_err(dev, "Invalid 'gain' gpios count: %d", in max9759_probe()
/Linux-v5.4/drivers/media/usb/gspca/stv06xx/
Dstv06xx_pb0100.h41 #define PB_EXPGAIN 0x0e /* Exposure Gain Command */
70 #define PB_G1GAIN 0x2b /* Green 1 Gain */
71 #define PB_BGAIN 0x2c /* Blue Gain */
72 #define PB_RGAIN 0x2d /* Red Gain */
73 #define PB_G2GAIN 0x2e /* Green 2 Gain */
78 #define PB_ADCMAXGAIN 0x33 /* Maximum Gain */
79 #define PB_ADCMINGAIN 0x34 /* Minimum Gain */
80 #define PB_ADCGLOBALGAIN 0x35 /* Global Gain */
91 #define PB_R64 0x40 /* Red/Blue Gain */
92 #define PB_R65 0x41 /* Green 2/Green 1 Gain */
/Linux-v5.4/drivers/iio/light/
Dzopt2201.c75 u8 gain; member
81 unsigned int gain; /* gain factor */ member
92 unsigned int gain; /* gain factor */ member
116 u8 gain; /* gain register value */ member
145 u8 gain; /* gain register value */ member
273 zopt2201_gain_uvb[data->gain].gain; in zopt2201_read_raw()
278 *val = zopt2201_gain_als[data->gain].scale; in zopt2201_read_raw()
281 *val = zopt2201_gain_uvb[data->gain].scale; in zopt2201_read_raw()
336 static int zopt2201_set_gain(struct zopt2201_data *data, u8 gain) in zopt2201_set_gain() argument
340 ret = i2c_smbus_write_byte_data(data->client, ZOPT2201_LS_GAIN, gain); in zopt2201_set_gain()
[all …]
/Linux-v5.4/drivers/media/dvb-frontends/
Dstv6111.c45 /* Gain *100dB // Reg */
81 /* Gain *100dB // reg */
117 /* Gain *100dB // reg */
177 /* Gain *100dB // reg */
236 /* Gain *100dB // reg */
544 s32 gain; in table_lookup() local
552 gain = table[0].value; in table_lookup()
554 gain = table[imax].value; in table_lookup()
565 gain = table[imin].value; in table_lookup()
567 gain += ((s32)(reg_value - table[imin].reg_value) * in table_lookup()
[all …]
/Linux-v5.4/Documentation/devicetree/bindings/iio/afe/
Dcurrent-sense-amplifier.txt15 - sense-gain-mult: Amplifier gain multiplier. The default is <1>.
16 - sense-gain-div: Amplifier gain divider. The default is <1>.
25 sense-gain-mul = <50>;
/Linux-v5.4/drivers/net/wireless/intel/iwlegacy/
D4965.h218 * a txpower setting (amplifier gain is temperature dependent). The
295 * 3) Tx gain compensation to balance 2 transmitters for MIMO use.
321 * txpower gain tables):
375 * Driver should interpolate factory values for temperature, gain table
385 * factory-measured txpower. Using (interpolated) factory gain table idx
388 * txpower is reached. Each step in the gain table is 1/2 dB.
391 * is 13 dBm, add 6 steps to the factory gain idx to reduce txpower
401 * increase gain (lower gain table idx), and vice verse.
403 * Temperature affects gain differently for different channels:
420 * voltage, gain should be reduced (gain table idx increased) by:
[all …]
/Linux-v5.4/drivers/mfd/
Dab8500-gpadc.c108 /* This is used to not lose precision when dividing to get gain and offset */
112 * when dividing to get ibat gain.
130 * struct adc_cal_data - Table for storing gain and offset for the calibrated
132 * @gain: Gain of the ADC channel
136 s64 gain; member
200 if (!gpadc->cal_data[ADC_INPUT_VMAIN].gain) { in ab8500_gpadc_ad_to_voltage()
207 res = (int) (ad_value * gpadc->cal_data[ADC_INPUT_VMAIN].gain + in ab8500_gpadc_ad_to_voltage()
218 if (!gpadc->cal_data[ADC_INPUT_BTEMP].gain) { in ab8500_gpadc_ad_to_voltage()
225 res = (int) (ad_value * gpadc->cal_data[ADC_INPUT_BTEMP].gain + in ab8500_gpadc_ad_to_voltage()
232 if (!gpadc->cal_data[ADC_INPUT_VBAT].gain) { in ab8500_gpadc_ad_to_voltage()
[all …]

12345678910>>...39