Home
last modified time | relevance | path

Searched refs:sample (Results 1 – 25 of 79) sorted by relevance

1234

/drivers/isdn/mISDN/
Ddsp_audio.c105 static unsigned char linear2ulaw(short sample) in linear2ulaw() argument
128 sign = (sample >> 8) & 0x80; /* set aside the sign */ in linear2ulaw()
130 sample = -sample; /* get magnitude */ in linear2ulaw()
133 sample = sample + BIAS; in linear2ulaw()
134 exponent = exp_lut[(sample >> 7) & 0xFF]; in linear2ulaw()
135 mantissa = (sample >> (exponent + 3)) & 0x0F; in linear2ulaw()
242 s32 sample; in dsp_audio_generate_mix_table() local
248 sample = dsp_audio_law_to_s32[i]; in dsp_audio_generate_mix_table()
249 sample += dsp_audio_law_to_s32[j]; in dsp_audio_generate_mix_table()
250 if (sample > 32767) in dsp_audio_generate_mix_table()
[all …]
Dl1oip_codec.c312 int i1, i2, c, sample; in l1oip_4bit_alloc() local
345 sample = _4bit_to_ulaw[i1]; in l1oip_4bit_alloc()
347 sample = _4bit_to_alaw[i1]; in l1oip_4bit_alloc()
350 table_dec[(i1 << 4) | i2] |= (sample << 8); in l1oip_4bit_alloc()
351 table_dec[(i2 << 4) | i1] |= sample; in l1oip_4bit_alloc()
Ddsp_cmx.c1302 register s32 sample; local
1481 sample = dsp_audio_law_to_s32[p[t]] +
1484 if (sample < -32768)
1485 sample = -32768;
1486 else if (sample > 32767)
1487 sample = 32767;
1488 *d++ = dsp_audio_s16_to_law[sample & 0xffff];
1511 sample = dsp_audio_law_to_s32[p[t]] + *c++ -
1513 if (sample < -32768)
1514 sample = -32768;
[all …]
/drivers/gpu/drm/bridge/synopsys/
Ddw-hdmi-ahb-audio.c161 u32 b, sample = *src++; in dw_hdmi_reformat_iec958() local
163 b = (sample & 8) << (28 - 3); in dw_hdmi_reformat_iec958()
165 sample >>= 4; in dw_hdmi_reformat_iec958()
167 *dst++ = sample | b; in dw_hdmi_reformat_iec958()
171 static u32 parity(u32 sample) in parity() argument
173 sample ^= sample >> 16; in parity()
174 sample ^= sample >> 8; in parity()
175 sample ^= sample >> 4; in parity()
176 sample ^= sample >> 2; in parity()
177 sample ^= sample >> 1; in parity()
[all …]
/drivers/gpu/drm/i915/
Di915_pmu.c194 static u64 read_sample(struct i915_pmu *pmu, unsigned int gt_id, int sample) in read_sample() argument
196 return pmu->sample[gt_id][sample].cur; in read_sample()
200 store_sample(struct i915_pmu *pmu, unsigned int gt_id, int sample, u64 val) in store_sample() argument
202 pmu->sample[gt_id][sample].cur = val; in store_sample()
206 add_sample_mult(struct i915_pmu *pmu, unsigned int gt_id, int sample, u32 val, u32 mul) in add_sample_mult() argument
208 pmu->sample[gt_id][sample].cur += mul_u32_u32(val, mul); in add_sample_mult()
334 add_sample(struct i915_pmu_sample *sample, u32 val) in add_sample() argument
336 sample->cur += val; in add_sample()
360 add_sample(&pmu->sample[I915_SAMPLE_WAIT], period_ns); in engine_sample()
362 add_sample(&pmu->sample[I915_SAMPLE_SEMA], period_ns); in engine_sample()
[all …]
/drivers/power/supply/
Dcpcap-battery.c101 s32 sample; /* 24 or 32 bits */ member
255 s32 sample, s32 accumulator, in cpcap_battery_cc_raw_div() argument
264 acc -= (s64)sample * offset; in cpcap_battery_cc_raw_div()
274 s32 sample, s32 accumulator, in cpcap_battery_cc_to_uah() argument
277 return cpcap_battery_cc_raw_div(ddata, sample, in cpcap_battery_cc_to_uah()
283 s32 sample, s32 accumulator, in cpcap_battery_cc_to_ua() argument
286 return cpcap_battery_cc_raw_div(ddata, sample, in cpcap_battery_cc_to_ua()
288 sample * in cpcap_battery_cc_to_ua()
314 ccd->sample = 0; in cpcap_battery_read_accumulated()
326 ccd->sample = (buf[1] & 0x0fff) << 16; in cpcap_battery_read_accumulated()
[all …]
/drivers/media/pci/cx25821/
Dcx25821-biffuncs.h14 static inline u8 getBit(u32 sample, u8 index) in getBit() argument
16 return (u8) ((sample >> index) & 1); in getBit()
24 static inline u32 setBitAtPos(u32 sample, u8 bit) in setBitAtPos() argument
26 sample |= (1 << bit); in setBitAtPos()
27 return sample; in setBitAtPos()
/drivers/input/touchscreen/
Dmc13783_ts.c37 unsigned int sample[4]; member
77 x0 = priv->sample[0] & 0xfff; in mc13783_ts_report_sample()
78 x1 = priv->sample[1] & 0xfff; in mc13783_ts_report_sample()
79 x2 = priv->sample[2] & 0xfff; in mc13783_ts_report_sample()
80 y0 = priv->sample[3] & 0xfff; in mc13783_ts_report_sample()
81 y1 = (priv->sample[0] >> 12) & 0xfff; in mc13783_ts_report_sample()
82 y2 = (priv->sample[1] >> 12) & 0xfff; in mc13783_ts_report_sample()
83 cr0 = (priv->sample[2] >> 12) & 0xfff; in mc13783_ts_report_sample()
84 cr1 = (priv->sample[3] >> 12) & 0xfff; in mc13783_ts_report_sample()
129 priv->sample) == 0) in mc13783_ts_work()
Dwm9712.c250 static int wm9712_poll_sample(struct wm97xx *wm, int adcsel, int *sample) in wm9712_poll_sample() argument
287 *sample = wm97xx_reg_read(wm, AC97_WM97XX_DIGITISER_RD); in wm9712_poll_sample()
292 if ((*sample ^ adcsel) & WM97XX_ADCSEL_MASK) { in wm9712_poll_sample()
295 *sample & WM97XX_ADCSEL_MASK); in wm9712_poll_sample()
299 if (wants_pen && !(*sample & WM97XX_PEN_DOWN)) { in wm9712_poll_sample()
301 *sample = wm97xx_reg_read(wm, AC97_WM97XX_DIGITISER_RD); in wm9712_poll_sample()
302 if (!(*sample & WM97XX_PEN_DOWN)) { in wm9712_poll_sample()
Dwm9705.c210 static int wm9705_poll_sample(struct wm97xx *wm, int adcsel, int *sample) in wm9705_poll_sample() argument
247 *sample = wm97xx_reg_read(wm, AC97_WM97XX_DIGITISER_RD); in wm9705_poll_sample()
252 if ((*sample ^ adcsel) & WM97XX_ADCSEL_MASK) { in wm9705_poll_sample()
255 *sample & WM97XX_ADCSEL_MASK); in wm9705_poll_sample()
259 if (wants_pen && !(*sample & WM97XX_PEN_DOWN)) { in wm9705_poll_sample()
Dwm9713.c255 static int wm9713_poll_sample(struct wm97xx *wm, int adcsel, int *sample) in wm9713_poll_sample() argument
297 *sample = wm97xx_reg_read(wm, AC97_WM97XX_DIGITISER_RD); in wm9713_poll_sample()
302 if ((*sample ^ adcsel) & WM97XX_ADCSEL_MASK) { in wm9713_poll_sample()
305 *sample & WM97XX_ADCSEL_MASK); in wm9713_poll_sample()
309 if (wants_pen && !(*sample & WM97XX_PEN_DOWN)) { in wm9713_poll_sample()
/drivers/net/ethernet/mellanox/mlxsw/
Dspectrum_matchall.c117 &mall_entry->sample.params, in mlxsw_sp_mall_port_sample_add()
275 mall_entry->sample.params.psample_group = act->sample.psample_group; in mlxsw_sp_mall_replace()
276 mall_entry->sample.params.truncate = act->sample.truncate; in mlxsw_sp_mall_replace()
277 mall_entry->sample.params.trunc_size = act->sample.trunc_size; in mlxsw_sp_mall_replace()
278 mall_entry->sample.params.rate = act->sample.rate; in mlxsw_sp_mall_replace()
384 u32 rate = mall_entry->sample.params.rate; in mlxsw_sp1_mall_sample_add()
421 u32 rate = mall_entry->sample.params.rate; in mlxsw_sp2_mall_sample_add()
425 err = mlxsw_sp_span_agent_get(mlxsw_sp, &mall_entry->sample.span_id, in mlxsw_sp2_mall_sample_add()
441 trigger_parms.span_id = mall_entry->sample.span_id; in mlxsw_sp2_mall_sample_add()
455 mlxsw_sp_span_agent_put(mlxsw_sp, mall_entry->sample.span_id); in mlxsw_sp2_mall_sample_add()
[all …]
/drivers/iio/resolver/
Dad2s1200.c42 struct gpio_desc *sample; member
75 gpiod_set_value(st->sample, 0); in ad2s1200_read_raw()
79 gpiod_set_value(st->sample, 1); in ad2s1200_read_raw()
147 st->sample = devm_gpiod_get(&spi->dev, "adi,sample", GPIOD_OUT_LOW); in ad2s1200_probe()
148 if (IS_ERR(st->sample)) { in ad2s1200_probe()
150 PTR_ERR(st->sample)); in ad2s1200_probe()
151 return PTR_ERR(st->sample); in ad2s1200_probe()
/drivers/media/test-drivers/vidtv/
Dvidtv_s302m.c236 u16 sample; in vidtv_s302m_get_sample() local
285 sample = *(u16 *)(e->src_buf + e->src_buf_offset); in vidtv_s302m_get_sample()
287 return sample; in vidtv_s302m_get_sample()
291 u16 sample) in vidtv_s302m_write_frame() argument
301 f.data[0] = sample & 0xFF; in vidtv_s302m_write_frame()
302 f.data[1] = (sample & 0xFF00) >> 8; in vidtv_s302m_write_frame()
303 f.data[2] = ((sample & 0x0F) << 4) | vucf; in vidtv_s302m_write_frame()
304 f.data[3] = (sample & 0x0FF0) >> 4; in vidtv_s302m_write_frame()
305 f.data[4] = (sample & 0xF000) >> 12; in vidtv_s302m_write_frame()
353 u16 sample; in vidtv_s302m_write_frames() local
[all …]
/drivers/net/ethernet/mellanox/mlx5/core/en/tc/act/
Dsample.c17 sample_attr->rate = act->sample.rate; in tc_act_parse_sample()
18 sample_attr->group_num = act->sample.psample_group->group_num; in tc_act_parse_sample()
20 if (act->sample.truncate) in tc_act_parse_sample()
21 sample_attr->trunc_size = act->sample.trunc_size; in tc_act_parse_sample()
/drivers/media/rc/
Dbpf-lirc.c20 BPF_CALL_1(bpf_rc_repeat, u32*, sample) in BPF_CALL_1() argument
24 ctrl = container_of(sample, struct ir_raw_event_ctrl, bpf_sample); in BPF_CALL_1()
38 BPF_CALL_4(bpf_rc_keydown, u32*, sample, u32, protocol, u64, scancode, in BPF_CALL_4() argument
43 ctrl = container_of(sample, struct ir_raw_event_ctrl, bpf_sample); in BPF_CALL_4()
60 BPF_CALL_3(bpf_rc_pointer_rel, u32*, sample, s32, rel_x, s32, rel_y) in BPF_CALL_3() argument
64 ctrl = container_of(sample, struct ir_raw_event_ctrl, bpf_sample); in BPF_CALL_3()
213 void lirc_bpf_run(struct rc_dev *rcdev, u32 sample) in lirc_bpf_run() argument
217 raw->bpf_sample = sample; in lirc_bpf_run()
Dfintek-cir.c270 u8 sample; in fintek_process_rx_ir_data() local
275 sample = fintek->buf[i]; in fintek_process_rx_ir_data()
278 fintek->cmd = sample; in fintek_process_rx_ir_data()
293 fintek->rem = fintek_cmdsize(fintek->cmd, sample); in fintek_process_rx_ir_data()
301 rawir.pulse = ((sample & BUF_PULSE_BIT) != 0); in fintek_process_rx_ir_data()
302 rawir.duration = (sample & BUF_SAMPLE_MASK) in fintek_process_rx_ir_data()
330 u8 sample, status; in fintek_get_rx_ir_data() local
340 sample = fintek_cir_reg_read(fintek, CIR_RX_DATA); in fintek_get_rx_ir_data()
341 fit_dbg("%s: sample: 0x%02x", __func__, sample); in fintek_get_rx_ir_data()
343 fintek->buf[fintek->pkts] = sample; in fintek_get_rx_ir_data()
Dlirc_dev.c42 int sample; in lirc_raw_event() local
52 sample = LIRC_OVERFLOW(LIRC_VALUE_MASK); in lirc_raw_event()
57 sample = LIRC_FREQUENCY(ev.carrier); in lirc_raw_event()
58 dev_dbg(&dev->dev, "carrier report (freq: %d)\n", sample); in lirc_raw_event()
64 sample = LIRC_TIMEOUT(ev.duration); in lirc_raw_event()
65 dev_dbg(&dev->dev, "timeout report (duration: %d)\n", sample); in lirc_raw_event()
83 sample = ev.pulse ? LIRC_PULSE(ev.duration) : in lirc_raw_event()
93 lirc_bpf_run(dev, sample); in lirc_raw_event()
97 if (kfifo_put(&fh->rawir, sample)) in lirc_raw_event()
/drivers/cpufreq/
Dintel_pstate.c109 struct sample { struct
245 struct sample sample; member
2134 cpu->last_update = cpu->sample.time; in intel_pstate_hwp_boost_up()
2143 expired = time_after64(cpu->sample.time, cpu->last_update + in intel_pstate_hwp_boost_down()
2150 cpu->last_update = cpu->sample.time; in intel_pstate_hwp_boost_down()
2156 cpu->sample.time = time; in intel_pstate_update_util_hwp_local()
2195 struct sample *sample = &cpu->sample; in intel_pstate_calc_avg_perf() local
2197 sample->core_avg_perf = div_ext_fp(sample->aperf, sample->mperf); in intel_pstate_calc_avg_perf()
2216 cpu->last_sample_time = cpu->sample.time; in intel_pstate_sample()
2217 cpu->sample.time = time; in intel_pstate_sample()
[all …]
/drivers/gpu/drm/vc4/
Dvc4_validate.c575 struct vc4_texture_sample_info *sample, in reloc_tex() argument
579 uint32_t p0 = *(uint32_t *)(uniform_data_u + sample->p_offset[0]); in reloc_tex()
580 uint32_t p1 = *(uint32_t *)(uniform_data_u + sample->p_offset[1]); in reloc_tex()
581 uint32_t p2 = (sample->p_offset[2] != ~0 ? in reloc_tex()
582 *(uint32_t *)(uniform_data_u + sample->p_offset[2]) : 0); in reloc_tex()
583 uint32_t p3 = (sample->p_offset[3] != ~0 ? in reloc_tex()
584 *(uint32_t *)(uniform_data_u + sample->p_offset[3]) : 0); in reloc_tex()
585 uint32_t *validated_p0 = exec->uniforms_v + sample->p_offset[0]; in reloc_tex()
599 if (sample->is_direct) { in reloc_tex()
748 DRM_INFO("Texture p0 at %d: 0x%08x\n", sample->p_offset[0], p0); in reloc_tex()
[all …]
/drivers/misc/echo/
Dfir.h91 static inline int16_t fir16(struct fir16_state_t *fir, int16_t sample) in fir16() argument
98 fir->history[fir->curr_pos] = sample; in fir16()
133 static inline int16_t fir32(struct fir32_state_t *fir, int16_t sample) in fir32() argument
140 fir->history[fir->curr_pos] = sample; in fir32()
/drivers/iio/adc/
Dad7266.c46 __be16 sample[2]; member
54 return spi_read(st->spi, &st->data.sample[0], 2); in ad7266_wakeup()
60 return spi_read(st->spi, &st->data.sample[0], 1); in ad7266_powerdown()
87 ret = spi_read(st->spi, st->data.sample, 4); in ad7266_trigger_handler()
140 *val = be16_to_cpu(st->data.sample[address % 2]); in ad7266_read_single()
456 st->single_xfer[0].rx_buf = &st->data.sample[0]; in ad7266_probe()
460 st->single_xfer[1].rx_buf = st->data.sample; in ad7266_probe()
464 st->single_xfer[2].tx_buf = &st->data.sample[0]; in ad7266_probe()
/drivers/iio/imu/bmi160/
Dbmi160_core.c366 __le16 sample; in bmi160_get_data() local
369 reg = bmi160_regs[t].data + (axis - IIO_MOD_X) * sizeof(sample); in bmi160_get_data()
371 ret = regmap_bulk_read(data->regmap, reg, &sample, sizeof(sample)); in bmi160_get_data()
375 *val = sign_extend32(le16_to_cpu(sample), 15); in bmi160_get_data()
430 __le16 sample; in bmi160_trigger_handler() local
434 ret = regmap_bulk_read(data->regmap, base + i * sizeof(sample), in bmi160_trigger_handler()
435 &sample, sizeof(sample)); in bmi160_trigger_handler()
438 data->buf[j++] = sample; in bmi160_trigger_handler()
/drivers/platform/chrome/
Dcros_ec_sensorhub_ring.c40 struct cros_ec_sensors_ring_sample *sample) in cros_sensorhub_send_sample() argument
43 int id = sample->sensor_id; in cros_sensorhub_send_sample()
55 if (sample->flag & MOTIONSENSE_SENSOR_FLAG_FLUSH) in cros_sensorhub_send_sample()
58 return cb(indio_dev, sample->vector, sample->timestamp); in cros_sensorhub_send_sample()
359 *sample) in cros_ec_sensor_ring_check_for_past_timestamp()
361 const u8 sensor_id = sample->sensor_id; in cros_ec_sensor_ring_check_for_past_timestamp()
365 sample->timestamp) in cros_ec_sensor_ring_check_for_past_timestamp()
367 sample->timestamp = in cros_ec_sensor_ring_check_for_past_timestamp()
371 sample->timestamp; in cros_ec_sensor_ring_check_for_past_timestamp()
/drivers/media/usb/msi2500/
Dmsi2500.c138 u32 sample; /* for sample rate calc */ member
246 u32 sample[3]; in msi2500_convert_stream() local
252 sample[i] = src[3] << 24 | src[2] << 16 | src[1] << 8 | in msi2500_convert_stream()
254 if (i == 0 && dev->next_sample != sample[0]) { in msi2500_convert_stream()
257 sample[0] - dev->next_sample, in msi2500_convert_stream()
259 sample[0]); in msi2500_convert_stream()
282 dev->next_sample = sample[i] + 504; in msi2500_convert_stream()
304 dev->next_sample = sample[i] + 252; in msi2500_convert_stream()
314 dev->next_sample = sample[i] + 384; in msi2500_convert_stream()
321 dev->next_sample = sample[i] + 504; in msi2500_convert_stream()
[all …]

1234