| /linux/drivers/media/platform/ti/vpe/ |
| H A D | csc.c | 27 u16 coeff[12]; member 144 u16 *coeff, *end_coeff; in csc_set_coeff() local 195 coeff = csc_coeffs.y2r.r601.full.coeff; in csc_set_coeff() 197 coeff = csc_coeffs.y2r.r601.limited.coeff; in csc_set_coeff() 200 coeff = csc_coeffs.y2r.r709.full.coeff; in csc_set_coeff() 202 coeff = csc_coeffs.y2r.r709.limited.coeff; in csc_set_coeff() 205 coeff = csc_coeffs.y2r.r601.full.coeff; in csc_set_coeff() 223 coeff = csc_coeffs.r2y.r601.full.coeff; in csc_set_coeff() 225 coeff = csc_coeffs.r2y.r601.limited.coeff; in csc_set_coeff() 228 coeff = csc_coeffs.r2y.r709.full.coeff; in csc_set_coeff() [all …]
|
| /linux/drivers/gpu/ipu-v3/ |
| H A D | ipu-ic-csc.c | 19 .coeff = { 36 .coeff = { 53 .coeff = { 70 .coeff = { 88 .coeff = { 119 .coeff = { 130 .coeff = { 142 .coeff = { 153 .coeff = { 177 .coeff = { [all …]
|
| /linux/sound/soc/codecs/ |
| H A D | es8311.c | 376 const struct es8311_mclk_coeff *coeff, in es8311_cmp_adj_mclk_coeff() argument 379 if (WARN_ON_ONCE(!coeff)) in es8311_cmp_adj_mclk_coeff() 382 unsigned int div = coeff->div; in es8311_cmp_adj_mclk_coeff() 383 unsigned int mult = coeff->mult; in es8311_cmp_adj_mclk_coeff() 386 if (coeff->mclk == mclk_freq) { in es8311_cmp_adj_mclk_coeff() 388 } else if (mclk_freq % coeff->mclk == 0) { in es8311_cmp_adj_mclk_coeff() 389 div = mclk_freq / coeff->mclk; in es8311_cmp_adj_mclk_coeff() 390 div *= coeff->div; in es8311_cmp_adj_mclk_coeff() 393 } else if (coeff->mclk % mclk_freq == 0) { in es8311_cmp_adj_mclk_coeff() 394 mult = coeff->mclk / mclk_freq; in es8311_cmp_adj_mclk_coeff() [all …]
|
| H A D | es8389.c | 564 int coeff, ret; in es8389_pcm_hw_params() 613 coeff = get_coeff(es8389->vddd, dmic_enable, es8389->sysclk, params_rate(params)); in es8389_set_bias_level() 614 if (coeff >= 0) { in es8389_set_bias_level() 615 regmap_write(es8389->regmap, ES8389_CLK_DIV1, coeff_div[coeff].Reg0x04); in es8389_set_bias_level() 616 regmap_write(es8389->regmap, ES8389_CLK_MUL, coeff_div[coeff].Reg0x05); in es8389_set_bias_level() 617 regmap_write(es8389->regmap, ES8389_CLK_MUX1, coeff_div[coeff].Reg0x06); in es8389_set_bias_level() 618 regmap_write(es8389->regmap, ES8389_CLK_MUX2, coeff_div[coeff].Reg0x07); in es8389_set_bias_level() 619 regmap_write(es8389->regmap, ES8389_CLK_CTL1, coeff_div[coeff].Reg0x08); in es8389_set_bias_level() 620 regmap_write(es8389->regmap, ES8389_CLK_CTL2, coeff_div[coeff].Reg0x09); in es8389_set_bias_level() 621 regmap_write(es8389->regmap, ES8389_CLK_CTL3, coeff_div[coeff] in es8389_set_bias_level() 540 int coeff; es8389_pcm_hw_params() local [all...] |
| H A D | es8375.c | 294 int coeff, ret; in es8375_hw_params() local 319 coeff = get_coeff(es8375->vddd, dmic_enable, es8375->mclk_freq, params_rate(params)); in es8375_hw_params() 320 if (coeff < 0) { in es8375_hw_params() 322 return coeff; in es8375_hw_params() 325 coeff_div[coeff].Reg0x04); in es8375_hw_params() 327 coeff_div[coeff].Reg0x05); in es8375_hw_params() 329 coeff_div[coeff].Reg0x06); in es8375_hw_params() 331 coeff_div[coeff].Reg0x07); in es8375_hw_params() 333 coeff_div[coeff].Reg0x08); in es8375_hw_params() 335 coeff_div[coeff] in es8375_hw_params() [all...] |
| H A D | es8323.c | 566 int coeff; in es8323_pcm_hw_params() 568 coeff = get_coeff(es8323->sysclk, params_rate(params)); in es8323_pcm_hw_params() 569 if (coeff < 0) { 570 coeff = get_coeff(es8323->sysclk / 2, params_rate(params)); in es8323_mute_stream() 571 if (coeff < 0) { in es8323_mute_stream() 575 return coeff; in es8323_mute_stream() 583 fs = FIELD_PREP(ES8323_DACCONTROL2_DACFSMODE, es8323_coeff_div[coeff].usb) 584 | FIELD_PREP(ES8323_DACCONTROL2_DACFSRATIO, es8323_coeff_div[coeff].sr); 521 int coeff; es8323_pcm_hw_params() local
|
| H A D | msm8916-wcd-digital.c | 432 u32 coeff[BAND_MAX]; in msm8x16_wcd_get_iir_band_audio_mixer() local 434 coeff[0] = get_iir_band_coeff(component, iir_idx, band_idx, 0); in msm8x16_wcd_get_iir_band_audio_mixer() 435 coeff[1] = get_iir_band_coeff(component, iir_idx, band_idx, 1); in msm8x16_wcd_get_iir_band_audio_mixer() 436 coeff[2] = get_iir_band_coeff(component, iir_idx, band_idx, 2); in msm8x16_wcd_get_iir_band_audio_mixer() 437 coeff[3] = get_iir_band_coeff(component, iir_idx, band_idx, 3); in msm8x16_wcd_get_iir_band_audio_mixer() 438 coeff[4] = get_iir_band_coeff(component, iir_idx, band_idx, 4); in msm8x16_wcd_get_iir_band_audio_mixer() 440 memcpy(ucontrol->value.bytes.data, &coeff[0], params->max); in msm8x16_wcd_get_iir_band_audio_mixer() 477 u32 coeff[BAND_MAX]; in msm8x16_wcd_put_iir_band_audio_mixer() local 479 memcpy(&coeff[0], ucontrol->value.bytes.data, params->max); in msm8x16_wcd_put_iir_band_audio_mixer() 487 set_iir_band_coeff(component, iir_idx, band_idx, coeff[0]); in msm8x16_wcd_put_iir_band_audio_mixer() [all …]
|
| H A D | wm8988.c | 672 int coeff; in wm8988_pcm_hw_params() local 674 coeff = get_coeff(wm8988->sysclk, params_rate(params)); in wm8988_pcm_hw_params() 675 if (coeff < 0) { in wm8988_pcm_hw_params() 676 coeff = get_coeff(wm8988->sysclk / 2, params_rate(params)); in wm8988_pcm_hw_params() 679 if (coeff < 0) { in wm8988_pcm_hw_params() 683 return coeff; in wm8988_pcm_hw_params() 703 if (coeff >= 0) in wm8988_pcm_hw_params() 705 (coeff_div[coeff].sr << 1) | coeff_div[coeff].usb); in wm8988_pcm_hw_params()
|
| H A D | alc5623.c | 696 int coeff, rate; in alc5623_pcm_hw_params() 723 coeff = get_coeff(component, rate); in alc5623_pcm_hw_params() 724 if (coeff < 0) in alc5623_pcm_hw_params() 727 coeff = coeff_div[coeff].regvalue; in alc5623_pcm_hw_params() 728 dev_dbg(component->dev, "%s: sysclk=%d,rate=%d,coeff=0x%04x\n", in alc5623_pcm_hw_params() 729 __func__, alc5623->sysclk, rate, coeff); in alc5623_pcm_hw_params() 730 snd_soc_component_write(component, ALC5623_STEREO_AD_DA_CLK_CTRL, coeff); in alc5623_pcm_hw_params() 701 int coeff, rate; alc5623_pcm_hw_params() local
|
| H A D | es8326.c | 558 int coeff, array; in es8326_pcm_hw_params() 567 coeff = get_coeff(es8326->sysclk, params_rate(params), array, coeff_div); in es8326_pcm_hw_params() 592 if (coeff >= 0) { in es8326_pcm_hw_params() 594 coeff_div[coeff].reg4); in es8326_pcm_hw_params() 596 coeff_div[coeff].reg5); in es8326_pcm_hw_params() 598 coeff_div[coeff].reg6); in es8326_pcm_hw_params() 600 coeff_div[coeff].reg7); 602 coeff_div[coeff].reg8); in es8326_mute() 604 coeff_div[coeff].reg9); in es8326_mute() 606 coeff_div[coeff] in es8326_mute() 543 int coeff, array; es8326_pcm_hw_params() local [all...] |
| H A D | alc5632.c | 871 int coeff, rate; in alc5632_pcm_hw_params() local 895 coeff = get_coeff(component, rate); in alc5632_pcm_hw_params() 896 if (coeff < 0) in alc5632_pcm_hw_params() 899 coeff = coeff_div[coeff].regvalue; in alc5632_pcm_hw_params() 900 snd_soc_component_write(component, ALC5632_DAC_CLK_CTRL1, coeff); in alc5632_pcm_hw_params()
|
| /linux/drivers/hwmon/pmbus/ |
| H A D | lm25066.c | 470 const struct __coeff *coeff; in lm25066_probe() local 512 coeff = &lm25066_coeff[data->id][0]; in lm25066_probe() 513 info->m[PSC_TEMPERATURE] = coeff[PSC_TEMPERATURE].m; in lm25066_probe() 514 info->b[PSC_TEMPERATURE] = coeff[PSC_TEMPERATURE].b; in lm25066_probe() 515 info->R[PSC_TEMPERATURE] = coeff[PSC_TEMPERATURE].R; in lm25066_probe() 516 info->m[PSC_VOLTAGE_IN] = coeff[PSC_VOLTAGE_IN].m; in lm25066_probe() 517 info->b[PSC_VOLTAGE_IN] = coeff[PSC_VOLTAGE_IN].b; in lm25066_probe() 518 info->R[PSC_VOLTAGE_IN] = coeff[PSC_VOLTAGE_IN].R; in lm25066_probe() 519 info->m[PSC_VOLTAGE_OUT] = coeff[PSC_VOLTAGE_OUT].m; in lm25066_probe() 520 info->b[PSC_VOLTAGE_OUT] = coeff[PSC_VOLTAGE_OUT].b; in lm25066_probe() [all …]
|
| /linux/drivers/gpu/drm/i915/display/ |
| H A D | intel_casf.c | 175 u32 coeff; in casf_coeff() local 177 value = crtc_state->hw.casf_params.coeff[t]; in casf_coeff() 180 coeff = value.sign << 15 | value.exp << 12 | value.mantissa << 3; in casf_coeff() 181 return coeff; in casf_coeff() 220 static void convert_sharpness_coef_binary(struct scaler_filter_coeff *coeff, in convert_sharpness_coef_binary() argument 224 coeff->mantissa = (coefficient * 2048) / 100; in convert_sharpness_coef_binary() 225 coeff->exp = 3; in convert_sharpness_coef_binary() 227 coeff->mantissa = (coefficient * 1024) / 100; in convert_sharpness_coef_binary() 228 coeff->exp = 2; in convert_sharpness_coef_binary() 230 coeff->mantissa = (coefficient * 512) / 100; in convert_sharpness_coef_binary() [all …]
|
| H A D | intel_color.c | 114 #define CTM_COEFF_NEGATIVE(coeff) (((coeff) & CTM_COEFF_SIGN) != 0) argument 115 #define CTM_COEFF_ABS(coeff) ((coeff) & (CTM_COEFF_SIGN - 1)) argument 143 #define ILK_CSC_COEFF_FP(coeff, fbits) \ argument 144 (clamp_val(((coeff) >> (32 - (fbits) - 3)) + 4, 0, 0xfff) & 0xff8) 152 .coeff = { 163 .coeff = { 178 .coeff = { 239 csc->coeff[0] << 16 | csc->coeff[1]); in ilk_update_pipe_csc() 241 csc->coeff[2] << 16); in ilk_update_pipe_csc() 244 csc->coeff[3] << 16 | csc->coeff[4]); in ilk_update_pipe_csc() [all …]
|
| /linux/drivers/gpu/drm/amd/display/modules/color/ |
| H A D | color_gamma.c | 578 struct gamma_coefficients *coeff, in translate_from_linear_space_ex() argument 585 scratch_gamma_args.a0 = coeff->a0[color_index]; in translate_from_linear_space_ex() 586 scratch_gamma_args.a1 = coeff->a1[color_index]; in translate_from_linear_space_ex() 587 scratch_gamma_args.a2 = coeff->a2[color_index]; in translate_from_linear_space_ex() 588 scratch_gamma_args.a3 = coeff->a3[color_index]; in translate_from_linear_space_ex() 589 scratch_gamma_args.gamma = coeff->user_gamma[color_index]; in translate_from_linear_space_ex() 598 struct gamma_coefficients *coeff, in translate_to_linear_space_ex() argument 603 coeff->a0[color_index], in translate_to_linear_space_ex() 604 coeff->a1[color_index], in translate_to_linear_space_ex() 605 coeff->a2[color_index], in translate_to_linear_space_ex() [all …]
|
| /linux/drivers/net/wireless/ath/ath9k/ |
| H A D | ar9003_calib.c | 28 struct coeff { struct 889 struct coeff *coeff, in ar9003_hw_tx_iq_cal_outlier_detection() argument 930 ar9003_hw_detect_outlier(coeff->mag_coeff[i], in ar9003_hw_tx_iq_cal_outlier_detection() 935 ar9003_hw_detect_outlier(coeff->phs_coeff[i], in ar9003_hw_tx_iq_cal_outlier_detection() 942 magnitude = coeff->mag_coeff[i][im][0]; in ar9003_hw_tx_iq_cal_outlier_detection() 943 phase = coeff->phs_coeff[i][im][0]; in ar9003_hw_tx_iq_cal_outlier_detection() 945 coeff->iqc_coeff[0] = in ar9003_hw_tx_iq_cal_outlier_detection() 951 coeff->iqc_coeff[0]); in ar9003_hw_tx_iq_cal_outlier_detection() 955 coeff->iqc_coeff[0]); in ar9003_hw_tx_iq_cal_outlier_detection() 959 coeff->iqc_coeff[0]; in ar9003_hw_tx_iq_cal_outlier_detection() [all …]
|
| /linux/drivers/firmware/cirrus/test/ |
| H A D | cs_dsp_test_wmfw_error.c | 722 __le32 *alg_data, *coeff; in wmfw_v2_coeff_block_size_exceeds_block() local 747 coeff = (__force __le32 *)&alg_data[4]; in wmfw_v2_coeff_block_size_exceeds_block() 748 KUNIT_ASSERT_EQ(test, le32_to_cpu(coeff[0]), mock_coeff_template.mem_type << 16); in wmfw_v2_coeff_block_size_exceeds_block() 751 coeff[1] = cpu_to_le32(le32_to_cpu(coeff[1]) + 1); in wmfw_v2_coeff_block_size_exceeds_block() 757 coeff[1] = cpu_to_le32(0xffffffff); in wmfw_v2_coeff_block_size_exceeds_block() 762 coeff[1] = cpu_to_le32(0x7fffffff); in wmfw_v2_coeff_block_size_exceeds_block() 767 coeff[1] = cpu_to_le32(0x80000000); in wmfw_v2_coeff_block_size_exceeds_block() 782 struct wmfw_adsp_coeff_data *coeff; in wmfw_v1_coeff_name_unterminated() local 802 coeff = (void *)alg_data->data; in wmfw_v1_coeff_name_unterminated() 805 memset(coeff->descr, 0, sizeof(coeff->descr)); in wmfw_v1_coeff_name_unterminated() [all …]
|
| /linux/drivers/media/test-drivers/vicodec/ |
| H A D | codec-fwht.c | 140 int coeff; in derlc() local 146 coeff = in >> 4; in derlc() 157 *wp++ = coeff; in derlc() 196 static void quantize_intra(s16 *coeff, s16 *de_coeff, u16 qp) in quantize_intra() argument 202 for (i = 0; i < 8; i++, quant++, coeff++, de_coeff++) { in quantize_intra() 203 *coeff >>= *quant; in quantize_intra() 204 if (*coeff >= -qp && *coeff <= qp) in quantize_intra() 205 *coeff = *de_coeff = 0; in quantize_intra() 207 *de_coeff = *coeff << *quant; in quantize_intra() 212 static void dequantize_intra(s16 *coeff) in dequantize_intra() argument [all …]
|
| /linux/drivers/iio/proximity/ |
| H A D | isl29501.c | 266 u32 value, gain, coeff, exp; in isl29501_read_ext() local 285 ret = isl29501_register_read(isl29501, reg, &coeff); in isl29501_read_ext() 289 value = coeff << exp; in isl29501_read_ext() 302 enum isl29501_correction_coeff coeff; in isl29501_set_shadow_coeff() local 306 coeff = COEFF_TEMP_A; in isl29501_set_shadow_coeff() 309 coeff = COEFF_TEMP_B; in isl29501_set_shadow_coeff() 312 coeff = COEFF_LIGHT_A; in isl29501_set_shadow_coeff() 315 coeff = COEFF_LIGHT_B; in isl29501_set_shadow_coeff() 320 isl29501->shadow_coeffs[coeff] = val; in isl29501_set_shadow_coeff() 326 enum isl29501_correction_coeff coeff, in isl29501_write_coeff() argument [all …]
|
| /linux/drivers/media/platform/verisilicon/ |
| H A D | hantro_vp9.c | 107 for (m = 0; m < ARRAY_SIZE(vp9_ctx->cnts.coeff[i][0][0][0]); ++m) { \ 108 vp9_ctx->cnts.coeff[i][j][k][l][m] = \ 151 for (i = 0; i < ARRAY_SIZE(vp9_ctx->cnts.coeff); ++i) in init_v4l2_vp9_count_tbl() 152 for (j = 0; j < ARRAY_SIZE(vp9_ctx->cnts.coeff[i]); ++j) in init_v4l2_vp9_count_tbl() 153 for (k = 0; k < ARRAY_SIZE(vp9_ctx->cnts.coeff[i][0]); ++k) in init_v4l2_vp9_count_tbl() 154 for (l = 0; l < ARRAY_SIZE(vp9_ctx->cnts.coeff[i][0][0]); ++l) in init_v4l2_vp9_count_tbl()
|
| /linux/drivers/iio/light/ |
| H A D | rohm-bu27034.c | 630 static u64 bu27034_fixp_calc_t1_64bit(unsigned int coeff, unsigned int ch0, in bu27034_fixp_calc_t1_64bit() argument 637 helper64 = (u64)coeff * (u64)ch1 * (u64)ch1; in bu27034_fixp_calc_t1_64bit() 652 static u64 bu27034_fixp_calc_t1(unsigned int coeff, unsigned int ch0, in bu27034_fixp_calc_t1() argument 663 helper = coeff * ch1 * ch1; in bu27034_fixp_calc_t1() 668 if (check_mul_overflow(helper, coeff, &helper)) in bu27034_fixp_calc_t1() 669 return bu27034_fixp_calc_t1_64bit(coeff, ch0, ch1, gain0, gain1); in bu27034_fixp_calc_t1() 672 return bu27034_fixp_calc_t1_64bit(coeff, ch0, ch1, gain0, gain1); in bu27034_fixp_calc_t1() 678 static u64 bu27034_fixp_calc_t23(unsigned int coeff, unsigned int ch, in bu27034_fixp_calc_t23() argument 684 if (!check_mul_overflow(coeff, ch, &helper)) in bu27034_fixp_calc_t23() 687 helper64 = (u64)coeff * (u64)ch; in bu27034_fixp_calc_t23() [all …]
|
| /linux/drivers/net/dsa/mv88e6xxx/ |
| H A D | global1_atu.c | 47 const unsigned int coeff = chip->info->age_time_coeff; in mv88e6xxx_g1_atu_set_age_time() local 48 const unsigned int min = 0x01 * coeff; in mv88e6xxx_g1_atu_set_age_time() 49 const unsigned int max = 0xff * coeff; in mv88e6xxx_g1_atu_set_age_time() 58 age_time = (msecs + coeff / 2) / coeff; in mv88e6xxx_g1_atu_set_age_time() 73 age_time * coeff); in mv88e6xxx_g1_atu_set_age_time()
|
| /linux/drivers/media/dvb-frontends/ |
| H A D | af9033_priv.h | 30 struct coeff { struct 62 static const struct coeff coeff_lut[] = {
|
| /linux/drivers/media/platform/rockchip/rkvdec/ |
| H A D | rkvdec-vp9.c | 99 u32 coeff[3]; member 942 for (m = 0; m < ARRAY_SIZE(vp9_ctx->inter_cnts.coeff[0][0][0][0]); ++m) {\ in rkvdec_init_v4l2_vp9_count_tbl() 943 vp9_ctx->inter_cnts.coeff[i][j][k][l][m] = \ in rkvdec_init_v4l2_vp9_count_tbl() 944 &inter_cnts->ref_cnt[k][i][j][l][m].coeff; \ in rkvdec_init_v4l2_vp9_count_tbl() 950 vp9_ctx->intra_cnts.coeff[i][j][k][l][m] = \ in rkvdec_init_v4l2_vp9_count_tbl() 951 &intra_cnts->ref_cnt[k][i][j][l][m].coeff; \ in rkvdec_init_v4l2_vp9_count_tbl() 959 for (i = 0; i < ARRAY_SIZE(vp9_ctx->inter_cnts.coeff); ++i) in rkvdec_init_v4l2_vp9_count_tbl() 960 for (j = 0; j < ARRAY_SIZE(vp9_ctx->inter_cnts.coeff[0]); ++j) in rkvdec_init_v4l2_vp9_count_tbl() 961 for (k = 0; k < ARRAY_SIZE(vp9_ctx->inter_cnts.coeff[0][0]); ++k) in rkvdec_init_v4l2_vp9_count_tbl() 962 for (l = 0; l < ARRAY_SIZE(vp9_ctx->inter_cnts.coeff[0][0][0]); ++l) in rkvdec_init_v4l2_vp9_count_tbl()
|
| /linux/drivers/staging/fbtft/ |
| H A D | fb_agm1264k-fl.c | 256 signed char coeff; in iterate_diffusion_matrix() local 262 coeff = diffusing_matrix[i][j]; in iterate_diffusion_matrix() 263 if (-1 == coeff) { in iterate_diffusion_matrix() 267 signed short p = *write_pos + error * coeff; in iterate_diffusion_matrix()
|