| /linux/drivers/media/usb/gspca/ |
| H A D | autogain_functions.c | 3 * 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 …]
|
| /linux/drivers/iio/ |
| H A D | industrialio-gts-helper.c | 2 /* gain-time-scale conversion helpers for IIO light sensors 22 * iio_gts_get_gain - Convert scale to total gain 24 * Internal helper for converting scale to total gain. 29 * @scale: Linearized scale to compute the gain for. 31 * Return: (floored) gain corresponding to the scale. -EINVAL if scale 45 * gain_get_scale_fraction - get the gain or time based on scale and known one 50 * @scale: Linearized scale to compute the gain/time for. 51 * @known: Either integration time or gain depending on which one is known 52 * @unknown: Pointer to variable where the computed gain/time is stored 54 * Internal helper for computing unknown fraction of total gain. [all …]
|
| /linux/sound/soc/codecs/ |
| H A D | es83xx-dsm-common.h | 158 /* Volume - Gain */ 159 #define LINEIN_GAIN_0db 0x00 /* gain = 0db */ 160 #define LINEIN_GAIN_3db 0x01 /* gain = +3db */ 161 #define LINEIN_GAIN_6db 0x02 /* gain = +6db */ 162 #define LINEIN_GAIN_9db 0x03 /* gain = +9db */ 163 #define LINEIN_GAIN_12db 0x04 /* gain = +12db */ 164 #define LINEIN_GAIN_15db 0x05 /* gain = +15db */ 165 #define LINEIN_GAIN_18db 0x06 /* gain = +18db */ 166 #define LINEIN_GAIN_21db 0x07 /* gain = +21db */ 167 #define LINEIN_GAIN_24db 0x08 /* gain = +24db */ [all …]
|
| H A D | max9759.c | 22 unsigned int gain; member 48 ucontrol->value.integer.value[0] = priv->gain; in speaker_gain_control_get() 71 priv->gain = ucontrol->value.integer.value[0]; in speaker_gain_control_put() 75 speaker_gain_table[priv->gain][0]); in speaker_gain_control_put() 78 speaker_gain_table[priv->gain][1]); in speaker_gain_control_put() 108 SOC_SINGLE_EXT_TLV("Speaker Gain Volume", 0, 0, 3, 0, 162 priv->gpiod_gain = devm_gpiod_get_array(dev, "gain", GPIOD_OUT_HIGH); in max9759_probe() 165 "Failed to get 'gain' gpios"); in max9759_probe() 166 priv->gain = 0; in max9759_probe() 169 dev_err(dev, "Invalid 'gain' gpio in max9759_probe() [all...] |
| /linux/sound/soc/mediatek/mt8186/ |
| H A D | mt8186-dai-hw-gain.c | 3 // MediaTek ALSA SoC Audio DAI HW Gain Control 12 #define HW_GAIN_1_EN_W_NAME "HW GAIN 1 Enable" 13 #define HW_GAIN_2_EN_W_NAME "HW GAIN 2 Enable" 58 /* let hw gain ramp up, set cur gain to 0 */ in mtk_hw_gain_event() 61 /* set target gain to 0 */ in mtk_hw_gain_event() 96 SND_SOC_DAPM_INPUT("HW Gain 1 Out Endpoint"), 97 SND_SOC_DAPM_INPUT("HW Gain 2 Out Endpoint"), 98 SND_SOC_DAPM_OUTPUT("HW Gain 1 In Endpoint"), 102 {"HW Gain 1 In", NULL, "HW_GAIN1_IN_CH1"}, 103 {"HW Gain 1 In", NULL, "HW_GAIN1_IN_CH2"}, [all …]
|
| /linux/drivers/iio/amplifiers/ |
| H A D | hmc425a.c | 3 * HMC425A and similar Gain Amplifiers 25 * The LTC6373 amplifier supports configuring gain using GPIO's with the following 29 * From here, it is observed that all values are multiples of the '2' gain setting, 55 int (*gain_dB_to_code)(int gain, int *code); 63 u32 gain; member 70 int gain; in gain_dB_to_code() local 73 gain = (val * 1000) - (val2 / 1000); in gain_dB_to_code() 75 gain = (val * 1000) + (val2 / 1000); in gain_dB_to_code() 77 if (gain > inf->gain_max || gain < inf->gain_min) in gain_dB_to_code() 82 return st->chip_info->gain_dB_to_code(gain, code); in gain_dB_to_code() [all …]
|
| H A D | Kconfig | 3 # 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) 60 tristate "Analog Devices HMC425A and similar GPIO Gain Amplifiers" 64 gain amplifiers or step attenuators.
|
| H A D | ad8366.c | 3 * 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) 214 int code, gain = 0; in ad8366_read_raw() local 220 gain = inf->gain_step > 0 ? inf->gain_min : inf->gain_max; in ad8366_read_raw() 221 gain += inf->gain_step * code; in ad8366_read_raw() 223 *val = gain / 1000; in ad8366_read_raw() 224 *val2 = (gain % 1000) * 1000; in ad8366_read_raw() [all …]
|
| /linux/Documentation/userspace-api/media/v4l/ |
| H A D | ext-ctrls-rf-tuner.rst | 51 Enables/disables LNA automatic gain control (AGC) 54 Enables/disables mixer automatic gain control (AGC) 57 Enables/disables IF automatic gain control (AGC) 62 LNA gain and the RF gain in this document is that the LNA gain is 63 integrated in the tuner chip while the RF gain is a separate chip. 64 There may be both RF and LNA gain controls in the same device. The 68 LNA (low noise amplifier) gain is first gain stage on the RF tuner 71 ``V4L2_CID_RF_TUNER_RF_GAIN`` to understand how RF gain and LNA gain 76 Mixer gain is second gain stage on the RF tuner signal path. It is 82 IF gain is last gain stage on the RF tuner signal path. It is
|
| H A D | ext-ctrls-image-source.rst | 37 Analogue gain is gain affecting all colour components in the pixel 38 matrix. The gain operation is performed in the analogue domain 85 control taking 4 gain values, being the gains for each of the 92 The units for the gain values are linear, with the default value 93 representing a gain of exactly 1.0. For example, if this default value 95 a gain of exactly 1.5.
|
| /linux/drivers/iio/light/ |
| H A D | veml6046x00.c | 138 * DOC: Handling of gain and photodiode size (PD) 141 * sensor. The gain in the driver is a combination of the gain of the sensor 144 * gain(driver) = gain(sensor) * PD 154 * struct veml6046x00_gain_pd - Translation of gain and photodiode size (PD). 155 * @gain_sen: Gain used in the sensor as described in the datasheet of the 159 * This is the translation table from the gain used in the driver (and also used 160 * by the userspace interface in sysfs) to the gain and PD used in the sensor 163 * There are six gain values visible to the user (0.25 .. 2) which translate to 165 * 2/2). Theoretical are there eight combinations, but gain values 0.5 and 1 are 189 * Depending on the set up integration time (IT), gain and photodiode size (PD) [all …]
|
| /linux/drivers/iio/frequency/ |
| H A D | admfm2000.c | 31 u32 gain[2]; member 81 int gain; in admfm2000_read_raw() local 86 gain = ~(st->gain[chan->channel]) * -1000; in admfm2000_read_raw() 87 *val = gain / 1000; in admfm2000_read_raw() 88 *val2 = (gain % 1000) * 1000; in admfm2000_read_raw() 102 int gain, ret; in admfm2000_write_raw() local 105 gain = (val * 1000) - (val2 / 1000); in admfm2000_write_raw() 107 gain = (val * 1000) + (val2 / 1000); in admfm2000_write_raw() 109 if (gain > ADMFM2000_MAX_GAIN || gain < ADMFM2000_MIN_GAIN) in admfm2000_write_raw() 115 st->gain[chan->channel] = ~((abs(gain) / 1000) & 0x1F); in admfm2000_write_raw() [all …]
|
| /linux/drivers/iio/test/ |
| H A D | iio-test-gts.c | 2 /* Unit tests for IIO light sensor gain-time-scale helpers 73 /* Keep the gain and time tables unsorted to test the sorting */ 161 /* Ok times, negative gain */ in test_init_iio_gts_invalid() 167 /* gain * time overflow int */ in test_init_iio_gts_invalid() 186 * Meas time 100 => gain by time 2x in test_iio_gts_find_gain_for_scale_using_time() 187 * TEST_SCALE_8X matches total gain 8x in test_iio_gts_find_gain_for_scale_using_time() 196 * Meas time 200 => gain by time 4x in test_iio_gts_find_gain_for_scale_using_time() 197 * TEST_SCALE_256X matches total gain 256x in test_iio_gts_find_gain_for_scale_using_time() 203 /* Min time, Min gain */ in test_iio_gts_find_gain_for_scale_using_time() 209 /* Max time, Max gain */ in test_iio_gts_find_gain_for_scale_using_time() [all …]
|
| /linux/drivers/net/wireless/broadcom/b43/ |
| H A D | phy_n.h | 28 #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/drivers/iio/accel/ |
| H A D | st_accel_core.c | 156 .gain = IIO_G_TO_M_S_2(1000), 161 .gain = IIO_G_TO_M_S_2(2000), 166 .gain = IIO_G_TO_M_S_2(4000), 171 .gain = IIO_G_TO_M_S_2(12000), 235 .gain = IIO_G_TO_M_S_2(1000), 240 .gain = IIO_G_TO_M_S_2(2000), 245 .gain = IIO_G_TO_M_S_2(3900), 319 .gain = IIO_G_TO_M_S_2(61), 324 .gain = IIO_G_TO_M_S_2(122), 329 .gain = IIO_G_TO_M_S_2(183), [all …]
|
| /linux/drivers/iio/adc/ |
| H A D | hx711.c | 27 /* gain to pulse and scale conversion */ 32 int gain; member 50 static int hx711_get_gain_to_pulse(int gain) in hx711_get_gain_to_pulse() argument 55 if (hx711_gain_to_scale[i].gain == gain) in hx711_get_gain_to_pulse() 60 static int hx711_get_gain_to_scale(const int *gain_scale, int gain) in hx711_get_gain_to_scale() argument 65 if (hx711_gain_to_scale[i].gain == gain) in hx711_get_gain_to_scale() 76 return hx711_gain_to_scale[i].gain; in hx711_get_scale_to_gain() 98 int gain_set; /* gain set on device */ 99 int gain_chan_a; /* gain for channel A */ 228 /* after a reset the gain is 128 */ in hx711_reset() [all …]
|
| /linux/Documentation/userspace-api/media/drivers/ |
| H A D | ccs.rst | 69 Analogue gain model 72 The CCS defines an analogue gain model where the gain can be calculated using 75 gain = m0 * x + c0 / (m1 * x + c1) 85 The analogue gain (``x`` in the formula) is controlled through 88 Alternate analogue gain model 91 The CCS defines another analogue gain model called alternate analogue gain. In 92 this case, the formula to calculate actual gain consists of linear and 95 gain = linear * 2 ^ exponent
|
| /linux/drivers/iio/magnetometer/ |
| H A D | st_magn_core.c | 179 .gain = 1100, 185 .gain = 855, 191 .gain = 670, 197 .gain = 450, 203 .gain = 400, 209 .gain = 330, 215 .gain = 230, 258 .gain = 909, 264 .gain = 1169, 270 .gain = 1492, [all …]
|
| /linux/Documentation/devicetree/bindings/iio/dac/ |
| H A D | adi,ad3552r.yaml | 99 adi,gain-offset: 100 description: Gain offset used in the above formula 105 adi,gain-scaling-p: 106 description: GainP = 1 / ( 2 ^ adi,gain-scaling-p) 110 adi,gain-scaling-n: 111 description: GainN = 1 / ( 2 ^ adi,gain-scaling-n) 119 - adi,gain-offset 120 - adi,gain-scaling-p 121 - adi,gain-scaling-n 240 adi,gain-offset = <5>; [all …]
|
| /linux/sound/mips/ |
| H A D | ad1843.c | 37 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/drivers/media/dvb-frontends/ |
| H A D | stv6111.c | 36 /* Gain *100dB // Reg */ 72 /* Gain *100dB // reg */ 108 /* Gain *100dB // reg */ 168 /* Gain *100dB // reg */ 227 /* Gain *100dB // reg */ 535 s32 gain; in table_lookup() local 543 gain = table[0].value; in table_lookup() 545 gain = table[imax].value; in table_lookup() 556 gain = table[imin].value; in table_lookup() 558 gain += ((s32)(reg_value - table[imin].reg_value) * in table_lookup() [all …]
|
| /linux/sound/spi/ |
| H A D | at73c213.h | 22 /* 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/drivers/media/usb/gspca/stv06xx/ |
| H A D | stv06xx_pb0100.h | 41 #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/drivers/net/wireless/intel/iwlegacy/ |
| H A D | 4965.h | 218 * 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/include/linux/ |
| H A D | atmel-isc-media.h | 13 * 4 gain controls, sliders, for each of the BAYER components: R, B, GR, GB. 30 * configure the gain/offsets directly. 40 /* Red component gain control */ 42 /* Blue component gain control */ 44 /* Green Red component gain control */ 46 /* Green Blue gain control */
|