Home
last modified time | relevance | path

Searched refs:gain (Results 76 - 100 of 649) sorted by relevance

12345678910>>...26

/kernel/linux/linux-6.6/sound/parisc/
H A Dharmony.c158 harmony_write(h, HARMONY_GAINCTL, h->st.gain); in harmony_unmute()
646 harmony_write(h, HARMONY_GAINCTL, h->st.gain); in snd_harmony_set_new_gain()
679 left = (h->st.gain >> shift_left) & mask; in snd_harmony_volume_get()
680 right = (h->st.gain >> shift_right) & mask; in snd_harmony_volume_get()
705 int old_gain = h->st.gain; in snd_harmony_volume_put()
712 h->st.gain &= ~( (mask << shift_left ) ); in snd_harmony_volume_put()
713 h->st.gain |= (left << shift_left); in snd_harmony_volume_put()
719 h->st.gain &= ~( (mask << shift_right) ); in snd_harmony_volume_put()
720 h->st.gain |= (right << shift_right); in snd_harmony_volume_put()
727 return h->st.gain ! in snd_harmony_volume_put()
[all...]
/third_party/ffmpeg/libavcodec/
H A Daacsbr_fixed.c397 * and Calculation of gain (14496-3 sp04 p219)
403 // max gain limits : -3dB, 0dB, 3dB, inf dB (limiter off) in sbr_gain_calc()
420 sbr->gain[e][m] = av_sqrt_sf(av_div_sf(sbr->e_origmapped[e][m], in sbr_gain_calc()
424 sbr->gain[e][m] = av_sqrt_sf(av_div_sf(sbr->e_origmapped[e][m], in sbr_gain_calc()
428 sbr->gain[e][m] = av_sqrt_sf( in sbr_gain_calc()
435 sbr->gain[e][m] = av_add_sf(sbr->gain[e][m], FLOAT_MIN); in sbr_gain_calc()
451 sbr->gain[e][m]); in sbr_gain_calc()
454 if (av_gt_sf(sbr->gain[e][m], gain_max)) in sbr_gain_calc()
455 sbr->gain[ in sbr_gain_calc()
[all...]
H A Dlibopusdec.c42 union { int i; double d; } gain; member
119 av_log(avc, AV_LOG_WARNING, "Failed to set gain: %s\n", in libopus_decode_init()
125 opus->gain.d = gain_lin; in libopus_decode_init()
127 opus->gain.i = FFMIN(gain_lin * 65536, INT_MAX); in libopus_decode_init()
190 *pcm = av_clipf(*pcm * opus->gain.d, -1, 1); in libopus_decode()
194 *pcm = av_clip_int16(((int64_t)opus->gain.i * *pcm) >> 16); in libopus_decode()
/kernel/linux/linux-6.6/drivers/staging/media/atomisp/i2c/
H A Datomisp-gc2235.c224 int gain, int digitgain) in __gc2235_set_exposure()
240 if (gain <= 0x58) { in __gc2235_set_exposure()
243 } else if (gain < 256) { in __gc2235_set_exposure()
245 gain_val2 = gain; in __gc2235_set_exposure()
247 gain_val2 = 64 * gain / 256; in __gc2235_set_exposure()
260 int gain, int digitgain) in gc2235_set_exposure()
266 ret = __gc2235_set_exposure(sd, exposure, gain, digitgain); in gc2235_set_exposure()
276 int gain = exposure->gain[0]; in gc2235_s_exposure() local
277 int digitgain = exposure->gain[ in gc2235_s_exposure()
223 __gc2235_set_exposure(struct v4l2_subdev *sd, int coarse_itg, int gain, int digitgain) __gc2235_set_exposure() argument
259 gc2235_set_exposure(struct v4l2_subdev *sd, int exposure, int gain, int digitgain) gc2235_set_exposure() argument
[all...]
/third_party/pulseaudio/src/modules/bluetooth/
H A Dbackend-native.c138 static pa_volume_t hsp_gain_to_volume(uint16_t gain) { in hsp_gain_to_volume() argument
140 gain * PA_VOLUME_NORM in hsp_gain_to_volume()
152 uint16_t gain = volume * HSP_MAX_GAIN / PA_VOLUME_NORM; in volume_to_hsp_gain() local
154 if (gain > HSP_MAX_GAIN) in volume_to_hsp_gain()
155 gain = HSP_MAX_GAIN; in volume_to_hsp_gain()
157 return gain; in volume_to_hsp_gain()
760 int gain, dummy; in rfcomm_io_callback() local
774 * AT+VGS=value: value between 0 and 15, sent by the HS to AG to set the speaker gain. in rfcomm_io_callback()
775 * +VGS=value is sent by AG to HS as a response to an AT+VGS command or when the gain in rfcomm_io_callback()
777 * AT+VGM=value: value between 0 and 15, sent by the HS to AG to set the microphone gain in rfcomm_io_callback()
885 uint16_t gain = volume_to_hsp_gain(volume); set_sink_volume() local
910 uint16_t gain = volume_to_hsp_gain(volume); set_source_volume() local
[all...]
/kernel/linux/linux-5.10/drivers/media/i2c/
H A Dmt9t001.c490 static u16 mt9t001_gain_value(s32 *gain) in mt9t001_gain_value() argument
501 * To minimize noise, the gain stages should be used in the second in mt9t001_gain_value()
506 if (*gain <= 32) in mt9t001_gain_value()
507 return *gain; in mt9t001_gain_value()
509 if (*gain <= 64) { in mt9t001_gain_value()
510 *gain &= ~1; in mt9t001_gain_value()
511 return (1 << 6) | (*gain >> 1); in mt9t001_gain_value()
514 *gain &= ~7; in mt9t001_gain_value()
515 return ((*gain - 64) << 5) | (1 << 6) | 32; in mt9t001_gain_value()
550 struct v4l2_ctrl *gain in mt9t001_s_ctrl() local
564 struct v4l2_ctrl *gain = mt9t001->gains[i]; mt9t001_s_ctrl() local
[all...]
H A Dimx274.c43 * The input gain is shifted by IMX274_GAIN_SHIFT to get
44 * decimal number. The real gain is
52 * min gain is 1X
53 * max gain is calculated based on IMX274_GAIN_REG_MAX
61 #define IMX274_GAIN_CONST (2048) /* for gain formula */
479 * @gain: Pointer to gain ctrl structure
486 struct v4l2_ctrl *gain; member
1282 priv->ctrls.gain->val = IMX274_DEF_GAIN; in imx274_load_default()
1297 /* update gain */ in imx274_load_default()
1470 u32 gain, analog_gain, digital_gain, gain_reg; imx274_set_gain() local
[all...]
/third_party/libsnd/tests/
H A Dgenerate.c33 static float crappy_snare (float *output, int len, int offset, float gain, float maxabs) ;
58 crappy_snare (float *output, int len, int offset, float gain, float maxabs) in crappy_snare() argument
62 for (k = offset ; k < len && env < gain ; k++) in crappy_snare()
/third_party/ffmpeg/libavfilter/
H A Daf_sidechaincompress.c77 { "level_in", "set input gain", OFFSET(level_in), AV_OPT_TYPE_DOUBLE, {.dbl=1}, 0.015625, 64, A|F|R },
85 { "makeup", "set make up gain", OFFSET(makeup), AV_OPT_TYPE_DOUBLE, {.dbl=1}, 1, 64, A|F|R },
93 { "level_sc", "set sidechain gain", OFFSET(level_sc), AV_OPT_TYPE_DOUBLE, {.dbl=1}, 0.015625, 64, A|F|R },
115 double gain = 0.0; in output_gain() local
122 gain = thres; in output_gain()
125 gain = (slope - thres) / ratio + thres; in output_gain()
131 gain = hermite_interpolation(slope, knee_stop, knee_start, in output_gain()
136 gain = hermite_interpolation(slope, knee_start, knee_stop, in output_gain()
141 return exp(gain - slope); in output_gain()
175 double abs_sample, gain in compressor() local
[all...]
H A Daf_agate.c74 { "range", "set max gain reduction", OFFSET(range), AV_OPT_TYPE_DOUBLE, {.dbl=0.06125}, 0, 1, A },
79 { "makeup", "set makeup gain", OFFSET(makeup), AV_OPT_TYPE_DOUBLE, {.dbl=1}, 1, 64, A },
87 { "level_sc", "set sidechain gain", OFFSET(level_sc), AV_OPT_TYPE_DOUBLE, {.dbl=1}, 0.015625, 64, A },
126 double gain = 0.; in output_gain() local
131 gain = (slope - thres) * tratio + thres; in output_gain()
136 gain = hermite_interpolation(slope, knee_stop, knee_start, ((knee_stop - thres) * tratio + thres), knee_start, delta, 1.); in output_gain()
139 gain = hermite_interpolation(slope, knee_start, knee_stop, ((knee_start - thres) * tratio + thres), knee_stop, delta, 1.); in output_gain()
141 return FFMAX(range, exp(gain - slope)); in output_gain()
156 double abs_sample = fabs(scsrc[0] * level_sc), gain = 1.0; in gate() local
181 gain in gate()
[all...]
/third_party/skia/src/gpu/effects/
H A DGrMatrixConvolutionEffect.cpp66 // Determine min and max values to figure out inner gain & bias. in Make()
76 // Treat near-0 gain (i.e. box blur) as 1, and let the kernelBias in Make()
81 // Inner bias is pre-inner-gain so we divide that out. in Make()
220 const char* gain = uniformHandler->getUniformCStr(fGainUni); in emitCode() local
239 fragBuilder->codeAppendf("color = sum * %s + %s;", gain, bias); in emitCode()
246 fragBuilder->codeAppendf("color.rgb = saturate(sum.rgb * %s + %s);", gain, bias); in emitCode()
273 SkScalar gain, in GrMatrixConvolutionEffect()
281 , fGain(SkScalarToFloat(gain)) in GrMatrixConvolutionEffect()
338 SkScalar gain, in Make()
353 gain, bia in Make()
270 GrMatrixConvolutionEffect(std::unique_ptr<GrFragmentProcessor> child, const KernelWrapper& kernel, std::unique_ptr<GrFragmentProcessor> kernelFP, SkScalar gain, SkScalar bias, const SkIPoint& kernelOffset, bool convolveAlpha) GrMatrixConvolutionEffect() argument
333 Make(GrRecordingContext* context, GrSurfaceProxyView srcView, const SkIRect& srcBounds, const SkISize& kernelSize, const SkScalar* kernel, SkScalar gain, SkScalar bias, const SkIPoint& kernelOffset, GrSamplerState::WrapMode wm, bool convolveAlpha, const GrCaps& caps) Make() argument
370 SkScalar gain = d->fRandom->nextSScalar1(); TestCreate() local
[all...]
/kernel/linux/linux-5.10/drivers/media/usb/gspca/stv06xx/
H A Dstv06xx_st6422.c51 static int setgain(struct sd *sd, u8 gain);
213 static int setgain(struct sd *sd, u8 gain) in setgain() argument
217 /* Set red, green, blue, gain */ in setgain()
218 err = stv06xx_write_bridge(sd, 0x0509, gain); in setgain()
222 err = stv06xx_write_bridge(sd, 0x050a, gain); in setgain()
226 err = stv06xx_write_bridge(sd, 0x050b, gain); in setgain()
/kernel/linux/linux-6.6/drivers/media/usb/gspca/stv06xx/
H A Dstv06xx_st6422.c51 static int setgain(struct sd *sd, u8 gain);
213 static int setgain(struct sd *sd, u8 gain) in setgain() argument
217 /* Set red, green, blue, gain */ in setgain()
218 err = stv06xx_write_bridge(sd, 0x0509, gain); in setgain()
222 err = stv06xx_write_bridge(sd, 0x050a, gain); in setgain()
226 err = stv06xx_write_bridge(sd, 0x050b, gain); in setgain()
/kernel/linux/linux-5.10/drivers/staging/media/atomisp/i2c/
H A Datomisp-gc0310.c417 static int gc0310_set_gain(struct v4l2_subdev *sd, int gain) in gc0310_set_gain() argument
424 if (gain < 0x20) in gc0310_set_gain()
425 gain = 0x20; in gc0310_set_gain()
426 if (gain > 0x80) in gc0310_set_gain()
427 gain = 0x80; in gc0310_set_gain()
429 if (gain >= 0x20 && gain < 0x40) { in gc0310_set_gain()
431 dgain = gain; in gc0310_set_gain()
434 dgain = gain / 2; in gc0310_set_gain()
437 pr_info("gain in gc0310_set_gain()
454 __gc0310_set_exposure(struct v4l2_subdev *sd, int coarse_itg, int gain, int digitgain) __gc0310_set_exposure() argument
483 gc0310_set_exposure(struct v4l2_subdev *sd, int exposure, int gain, int digitgain) gc0310_set_exposure() argument
500 int gain = exposure->gain[0]; gc0310_s_exposure() local
[all...]
/third_party/backends/backend/
H A Dpieusb_specific.c85 static double getGain(int gain);
86 static int getGainSetting(double gain);
132 #define SANE_NAME_GAIN_R "gain-r"
134 #define SANE_DESC_GAIN_R "The gain of the signal processor for red"
135 #define SANE_NAME_GAIN_G "gain-g"
137 #define SANE_DESC_GAIN_G "The gain of the signal processor for green"
138 #define SANE_NAME_GAIN_B "gain-b"
140 #define SANE_DESC_GAIN_B "The gain of the signal processor for blue"
141 #define SANE_NAME_GAIN_I "gain-i"
143 #define SANE_DESC_GAIN_I "The gain o
1873 double gain; sanei_pieusb_set_gain_offset() local
2407 getGain(int gain) getGain() argument
2424 getGainSetting(double gain) getGainSetting() argument
[all...]
/kernel/linux/linux-5.10/drivers/iio/imu/st_lsm6dsx/
H A Dst_lsm6dsx_shub.c61 .gain = 1500,
120 .gain = 146,
124 .gain = 292,
128 .gain = 438,
132 .gain = 584,
577 *val2 = sensor->gain; in st_lsm6dsx_shub_read_raw()
590 u32 gain) in st_lsm6dsx_shub_set_full_scale()
600 if (fs_table->fs_avl[i].gain == gain) in st_lsm6dsx_shub_set_full_scale()
613 sensor->gain in st_lsm6dsx_shub_set_full_scale()
589 st_lsm6dsx_shub_set_full_scale(struct st_lsm6dsx_sensor *sensor, u32 gain) st_lsm6dsx_shub_set_full_scale() argument
[all...]
/kernel/linux/linux-6.6/drivers/iio/imu/st_lsm6dsx/
H A Dst_lsm6dsx_shub.c61 .gain = 1500,
120 .gain = 146,
124 .gain = 292,
128 .gain = 438,
132 .gain = 584,
575 *val2 = sensor->gain; in st_lsm6dsx_shub_read_raw()
588 u32 gain) in st_lsm6dsx_shub_set_full_scale()
598 if (fs_table->fs_avl[i].gain == gain) in st_lsm6dsx_shub_set_full_scale()
611 sensor->gain in st_lsm6dsx_shub_set_full_scale()
587 st_lsm6dsx_shub_set_full_scale(struct st_lsm6dsx_sensor *sensor, u32 gain) st_lsm6dsx_shub_set_full_scale() argument
[all...]
/kernel/linux/linux-5.10/sound/pci/echoaudio/
H A Dlayla20_dsp.c251 /* Set input bus gain (one unit is 0.5dB !) */
252 static int set_input_gain(struct echoaudio *chip, u16 input, int gain) in set_input_gain() argument
260 chip->input_gain[input] = gain; in set_input_gain()
261 gain += GL20_INPUT_GAIN_MAGIC_NUMBER; in set_input_gain()
262 chip->comm_page->line_in_level[input] = gain; in set_input_gain()
/kernel/linux/linux-5.10/drivers/iio/light/
H A Dtcs3414.c54 u8 gain; member
80 /* scale factors: 1/gain */
152 i = (data->gain & TCS3414_GAIN_MASK) >> TCS3414_GAIN_SHIFT; in tcs3414_read_raw()
176 data->gain &= ~TCS3414_GAIN_MASK; in tcs3414_write_raw()
177 data->gain |= i << TCS3414_GAIN_SHIFT; in tcs3414_write_raw()
180 data->gain); in tcs3414_write_raw()
321 data->gain = ret; in tcs3414_probe()
/kernel/linux/linux-6.6/drivers/iio/light/
H A Dtcs3414.c54 u8 gain; member
80 /* scale factors: 1/gain */
152 i = (data->gain & TCS3414_GAIN_MASK) >> TCS3414_GAIN_SHIFT; in tcs3414_read_raw()
176 data->gain &= ~TCS3414_GAIN_MASK; in tcs3414_write_raw()
177 data->gain |= i << TCS3414_GAIN_SHIFT; in tcs3414_write_raw()
180 data->gain); in tcs3414_write_raw()
337 data->gain = ret; in tcs3414_probe()
/kernel/linux/linux-5.10/drivers/iio/adc/
H A Dqcom-spmi-iadc.c102 * @gain: Raw gain of the channels.
113 u16 gain; member
330 vsense_uv /= (s32)iadc->gain - iadc->offset[chan->channel]; in iadc_read_raw()
334 dev_dbg(iadc->dev, "off %d gain %d adc %d %duV I %duA\n", in iadc_read_raw()
335 iadc->offset[chan->channel], iadc->gain, in iadc_read_raw()
366 ret = iadc_do_conversion(iadc, IADC_GAIN_17P857MV, &iadc->gain); in iadc_update_offset()
375 if (iadc->gain == iadc->offset[IADC_INT_RSENSE]) { in iadc_update_offset()
376 dev_err(iadc->dev, "error: internal offset == gain %d\n", in iadc_update_offset()
377 iadc->gain); in iadc_update_offset()
[all...]
/kernel/linux/linux-6.6/drivers/iio/adc/
H A Dqcom-spmi-iadc.c101 * @gain: Raw gain of the channels.
112 u16 gain; member
329 vsense_uv /= (s32)iadc->gain - iadc->offset[chan->channel]; in iadc_read_raw()
333 dev_dbg(iadc->dev, "off %d gain %d adc %d %duV I %duA\n", in iadc_read_raw()
334 iadc->offset[chan->channel], iadc->gain, in iadc_read_raw()
365 ret = iadc_do_conversion(iadc, IADC_GAIN_17P857MV, &iadc->gain); in iadc_update_offset()
374 if (iadc->gain == iadc->offset[IADC_INT_RSENSE]) { in iadc_update_offset()
375 dev_err(iadc->dev, "error: internal offset == gain %d\n", in iadc_update_offset()
376 iadc->gain); in iadc_update_offset()
[all...]
/kernel/linux/linux-6.6/drivers/net/wireless/realtek/rtw89/
H A Drtw8852b.c619 struct rtw89_phy_efuse_gain *gain = &rtwdev->efuse_gain; in rtw8852b_efuse_parsing_gain_offset() local
623 &gain->offset[RF_PATH_A][RTW89_GAIN_OFFSET_2G_CCK], in rtw8852b_efuse_parsing_gain_offset()
624 &gain->offset[RF_PATH_B][RTW89_GAIN_OFFSET_2G_CCK]); in rtw8852b_efuse_parsing_gain_offset()
626 &gain->offset[RF_PATH_A][RTW89_GAIN_OFFSET_2G_OFDM], in rtw8852b_efuse_parsing_gain_offset()
627 &gain->offset[RF_PATH_B][RTW89_GAIN_OFFSET_2G_OFDM]); in rtw8852b_efuse_parsing_gain_offset()
629 &gain->offset[RF_PATH_A][RTW89_GAIN_OFFSET_5G_LOW], in rtw8852b_efuse_parsing_gain_offset()
630 &gain->offset[RF_PATH_B][RTW89_GAIN_OFFSET_5G_LOW]); in rtw8852b_efuse_parsing_gain_offset()
632 &gain->offset[RF_PATH_A][RTW89_GAIN_OFFSET_5G_MID], in rtw8852b_efuse_parsing_gain_offset()
633 &gain->offset[RF_PATH_B][RTW89_GAIN_OFFSET_5G_MID]); in rtw8852b_efuse_parsing_gain_offset()
635 &gain in rtw8852b_efuse_parsing_gain_offset()
810 struct rtw89_phy_efuse_gain *gain = &rtwdev->efuse_gain; rtw8852b_phycap_parsing_gain_comp() local
976 const struct rtw89_phy_bb_gain_info *gain = &rtwdev->bb_gain; rtw8852b_set_gain_error() local
1074 const struct rtw89_phy_bb_gain_info *gain = &rtwdev->bb_gain; rtw8852b_set_rxsc_rpl_comp() local
1416 struct rtw89_phy_efuse_gain *gain = &rtwdev->efuse_gain; rtw8852b_bb_sethw() local
[all...]
/third_party/skia/third_party/externals/oboe/src/flowgraph/resampler/
H A DMultiChannelResampler.cpp145 float gain = 0.0; // sum of raw coefficients in generateCoefficients() local
157 gain += coefficient; in generateCoefficients()
165 // Correct for gain variations. in generateCoefficients()
166 float gainCorrection = 1.0 / gain; // normalize the gain in generateCoefficients()
/kernel/linux/linux-5.10/sound/pci/au88x0/
H A Dau88x0_eq.c39 static void vortex_EqHw_SetTimeConsts(vortex_t * vortex, u16 gain, u16 level) in vortex_EqHw_SetTimeConsts() argument
41 hwwrite(vortex->mmio, 0x2b3c4, gain); in vortex_EqHw_SetTimeConsts()
493 static int vortex_Eqlzr_GetLeftGain(vortex_t * vortex, u16 index, u16 * gain) in vortex_Eqlzr_GetLeftGain() argument
498 *gain = eq->this130[index]; in vortex_Eqlzr_GetLeftGain()
504 static void vortex_Eqlzr_SetLeftGain(vortex_t * vortex, u16 index, u16 gain) in vortex_Eqlzr_SetLeftGain() argument
511 eq->this130[index] = gain; in vortex_Eqlzr_SetLeftGain()
515 vortex_EqHw_SetLeftGainsSingleTarget(vortex, index, gain); in vortex_Eqlzr_SetLeftGain()
518 static int vortex_Eqlzr_GetRightGain(vortex_t * vortex, u16 index, u16 * gain) in vortex_Eqlzr_GetRightGain() argument
523 *gain = eq->this130[index + eq->this10]; in vortex_Eqlzr_GetRightGain()
529 static void vortex_Eqlzr_SetRightGain(vortex_t * vortex, u16 index, u16 gain) in vortex_Eqlzr_SetRightGain() argument
[all...]

Completed in 21 milliseconds

12345678910>>...26