Home
last modified time | relevance | path

Searched refs:rate (Results 1 – 25 of 64) sorted by relevance

123

/device/linaro/hikey/hifi/xaf/host-apf/playback/
Dxa_playback.c75 unsigned int rate, unsigned int bits, unsigned int period_size,
202 unsigned int rate, unsigned int bits, unsigned int period_size, in sample_is_playable() argument
214 can_play = check_param(params, PCM_PARAM_RATE, rate, "Sample rate", "Hz"); in sample_is_playable()
228 unsigned int rate, in xa_playback_open() argument
238 config.rate = rate; in xa_playback_open()
249 if (!sample_is_playable(card, device, channels, rate, bits, period_size, period_count)) { in xa_playback_open()
289 unsigned int rate, unsigned int bits, unsigned int period_size,
307 config.rate = rate;
318 if (!sample_is_playable(card, device, channels, rate, bits, period_size, period_count)) {
338 printf("Playing sample: %u ch, %u hz, %u bit\n", channels, rate, bits);
/device/google/contexthub/util/nanoapp_cmd/
Dnanoapp_cmd.c70 uint32_t rate; member
135 cmd->rate = SENSOR_RATE_ONCHANGE; in setType()
138 cmd->rate = SENSOR_RATE_ONCHANGE; in setType()
141 cmd->rate = SENSOR_RATE_ONCHANGE; in setType()
144 cmd->rate = SENSOR_RATE_ONCHANGE; in setType()
147 cmd->rate = SENSOR_RATE_ONCHANGE; in setType()
150 cmd->rate = SENSOR_RATE_ONCHANGE; in setType()
153 cmd->rate = SENSOR_RATE_ONCHANGE; in setType()
156 cmd->rate = SENSOR_RATE_ONCHANGE; in setType()
159 cmd->rate = SENSOR_RATE_ONESHOT; in setType()
[all …]
/device/google/contexthub/firmware/os/drivers/st_lsm6dsm/
Dst_lsm6dsm.c653 uint32_t rate; member
689 uint32_t rate[NUM_SENSORS]; member
1150 #define DEC_OPS(power, firmware, rate, flush) \ argument
1153 .sensorSetRate = rate, \
1156 #define DEC_OPS_SEND(power, firmware, rate, flush, send) \ argument
1159 .sensorSetRate = rate, \
1163 #define DEC_OPS_CFG_SELFTEST(power, firmware, rate, flush, cfgData, selftest) \ argument
1164 DEC_OPS(power, firmware, rate, flush), \
1168 #define DEC_OPS_CAL_CFG_SELFTEST(power, firmware, rate, flush, cal, cfgData, selftest) \ argument
1169 DEC_OPS(power, firmware, rate, flush), \
[all …]
/device/google/contexthub/util/sensortest/
Dsensortest.cpp28 int32_t rate; member
125 .rate = atoi(argv[currArgumentIndex+2]), in parseArguments()
133 .rate = atoi(argv[currArgumentIndex+2]), in parseArguments()
158 .rate = atoi(argv[currArgumentIndex+2]), in parseArguments()
166 .rate = atoi(argv[currArgumentIndex+2]), in parseArguments()
217 … mSensorConfigList[i].rate, mSensorConfigList[i].reportLatency) < 0) { in main()
219 mSensorConfigList[i].listIndex, mSensorConfigList[i].rate, in main()
/device/google/contexthub/firmware/os/core/
Dsensors.c230 static bool sensorCallFuncSetRate(struct Sensor* s, uint32_t rate, uint64_t latency) in sensorCallFuncSetRate() argument
233 INVOKE_AS_OWNER_AND_RETURN(LOCAL_APP_OPS(s)->sensorSetRate, rate, latency, s->callData); in sensorCallFuncSetRate()
241 evt->externalSetRateEvt.rate = rate; in sensorCallFuncSetRate()
428 if (req->rate == removedRate) { in sensorCalcHwRate()
436 if (req->rate == SENSOR_RATE_ONDEMAND) in sensorCalcHwRate()
438 if (req->rate == SENSOR_RATE_ONCHANGE) { in sensorCalcHwRate()
443 if (highestReq < req->rate) in sensorCalcHwRate()
444 highestReq = req->rate; in sensorCalcHwRate()
574 static bool sensorAddRequestor(uint32_t sensorHandle, uint32_t clientTid, uint32_t rate, uint64_t l… in sensorAddRequestor() argument
584 req->rate = rate; in sensorAddRequestor()
[all …]
Dnanohub_chre.c334 uint32_t rate; in osChreSensorGetSamplingStatus() local
340 rate = sensorGetHwRate(sensorHandle); in osChreSensorGetSamplingStatus()
343 if (rate == SENSOR_RATE_OFF) { in osChreSensorGetSamplingStatus()
349 if (rate == SENSOR_RATE_ONDEMAND in osChreSensorGetSamplingStatus()
350 || rate == SENSOR_RATE_ONCHANGE in osChreSensorGetSamplingStatus()
351 || rate == SENSOR_RATE_ONESHOT) in osChreSensorGetSamplingStatus()
354 status->interval = (UINT32_C(1024000000) / rate) * UINT64_C(1000); in osChreSensorGetSamplingStatus()
376 uint32_t rate, interval_us; in osChreSensorConfigure() local
391 rate = SENSOR_RATE_ONCHANGE; in osChreSensorConfigure()
394 rate = si->supportedRates[i]; in osChreSensorConfigure()
[all …]
/device/google/contexthub/firmware/os/drivers/st_acc44/
Dst_acc44.c239 uint32_t rate; member
341 static uint8_t st_acc44_computeOdr(uint32_t rate) in st_acc44_computeOdr() argument
346 if (st_acc44_Rates[i] == rate) in st_acc44_computeOdr()
357 static uint32_t st_acc44_Rate_hz_to_ns(uint32_t rate) in st_acc44_Rate_hz_to_ns() argument
361 if ((i = st_acc44_computeOdr(rate)) >= 0) in st_acc44_Rate_hz_to_ns()
408 static bool st_acc44_SetRate(uint32_t rate, uint64_t latency, void *cookie) in st_acc44_SetRate() argument
412 INFO_PRINT("SetRate %lu Hz - %llu ns\n", rate, latency); in st_acc44_SetRate()
415 num = st_acc44_computeOdr(rate); in st_acc44_SetRate()
418 mTask.rate = rate; in st_acc44_SetRate()
419 mTask.sample_rate_ns = st_acc44_Rate_hz_to_ns(rate); in st_acc44_SetRate()
[all …]
/device/google/contexthub/firmware/os/inc/
Dsensors.h144 uint32_t rate; member
171 bool (*sensorSetRate)(uint32_t rate, uint64_t latency, void *);
273 bool sensorRequest(uint32_t clientTid, uint32_t sensorHandle, uint32_t rate, uint64_t latency);
297 uint32_t rate; in sensorTimerLookupCommon() local
299 while ((rate = *supportedRates++) != 0) { in sensorTimerLookupCommon()
300 if (rate == wantedRate) in sensorTimerLookupCommon()
/device/google/contexthub/firmware/os/drivers/si_si7034/
Dsi7034a10.c284 static bool humiSetRate(uint32_t rate, uint64_t latency, void *cookie) in humiSetRate() argument
286 DEBUG_PRINT("%s %ld (%lld)\n", __func__, rate, latency); in humiSetRate()
292 si7034RatesRateVals, rate), 0, 50, sensorHumiTimerCallback, NULL, false); in humiSetRate()
295 SENSOR_INTERNAL_EVT_RATE_CHG, rate, latency); in humiSetRate()
325 static bool tempSetRate(uint32_t rate, uint64_t latency, void *cookie) in tempSetRate() argument
327 DEBUG_PRINT("%s %ld (%lld)\n", __func__, rate, latency); in tempSetRate()
333 si7034RatesRateVals, rate), 0, 50, sensorTempTimerCallback, NULL, false); in tempSetRate()
336 SENSOR_INTERNAL_EVT_RATE_CHG, rate, latency); in tempSetRate()
344 #define DEC_OPS(power, firmware, rate, flush, cal, cfg) \ argument
347 .sensorSetRate = rate, \
/device/google/contexthub/firmware/os/drivers/bosch_bmi160/
Dbosch_bmi160.c444 uint32_t rate; member
465 uint32_t rate; member
1527 static uint8_t computeOdr(uint32_t rate) argument
1530 switch (rate) {
1572 static bool accSetRate(uint32_t rate, uint64_t latency, void *cookie) argument
1581 rate, latency, getStateName(GET_STATE()));
1584 odr = computeOdr(rate);
1612 mTask.sensors[ACC].rate = rate;
1635 mTask.sensors[ACC].pConfig.rate = rate;
1641 static bool gyrSetRate(uint32_t rate, uint64_t latency, void *cookie) argument
[all …]
/device/google/contexthub/firmware/os/drivers/ams_tmd2772/
Dams_tmd2772.c344 static bool sensorRateAls(uint32_t rate, uint64_t latency, void *cookie) in sensorRateAls() argument
346 if (rate == SENSOR_RATE_ONCHANGE) { in sensorRateAls()
347 rate = AMS_TMD2772_DEFAULT_RATE; in sensorRateAls()
349 osLog(LOG_INFO, DRIVER_NAME "sensorRateAls: %ld/%lld\n", rate, latency); in sensorRateAls()
353 …mData.alsTimerHandle = timTimerSet(sensorTimerLookupCommon(supportedRates, rateTimerVals, rate), 0… in sensorRateAls()
355 sensorSignalInternalEvt(mData.alsHandle, SENSOR_INTERNAL_EVT_RATE_CHG, rate, latency); in sensorRateAls()
399 static bool sensorRateProx(uint32_t rate, uint64_t latency, void *cookie) in sensorRateProx() argument
401 if (rate == SENSOR_RATE_ONCHANGE) { in sensorRateProx()
402 rate = AMS_TMD2772_DEFAULT_RATE; in sensorRateProx()
404 osLog(LOG_INFO, DRIVER_NAME "sensorRateProx: %ld/%lld\n", rate, latency); in sensorRateProx()
[all …]
/device/google/contexthub/util/nanotool/
Dnanomessage.cpp192 uint32_t ConfigureSensorRequest::FloatRateToFixedPoint(float rate) { in FloatRateToFixedPoint() argument
193 return rate * 1024.0f; in FloatRateToFixedPoint()
196 float ConfigureSensorRequest::FixedPointRateToFloat(uint32_t rate) { in FixedPointRateToFloat() argument
197 return rate / 1024.0f; in FixedPointRateToFloat()
227 config.rate, in ToString()
Dnanomessage.h174 static uint32_t FloatRateToFixedPoint(float rate);
175 static float FixedPointRateToFloat(uint32_t rate);
187 uint32_t rate; member
/device/google/contexthub/firmware/os/drivers/st_lps22hb/
Dlps22hb.c389 static bool baroSetRate(uint32_t rate, uint64_t latency, void *cookie) in baroSetRate() argument
391 INFO_PRINT("baroSetRate %lu Hz - %llu ns\n", rate, latency); in baroSetRate()
397 lps22hbRatesRateVals, rate), 0, 50, sensorBaroTimerCallback, NULL, false); in baroSetRate()
400 SENSOR_INTERNAL_EVT_RATE_CHG, rate, latency); in baroSetRate()
486 static bool tempSetRate(uint32_t rate, uint64_t latency, void *cookie) in tempSetRate() argument
491 INFO_PRINT("tempSetRate %lu Hz - %llu ns\n", rate, latency); in tempSetRate()
493 lps22hbRatesRateVals, rate), 0, 50, sensorTempTimerCallback, NULL, false); in tempSetRate()
496 SENSOR_INTERNAL_EVT_RATE_CHG, rate, latency); in tempSetRate()
504 #define DEC_OPS(power, firmware, rate, flush, cal, cfg) \ argument
507 .sensorSetRate = rate, \
/device/google/contexthub/firmware/os/drivers/intersil_isl29034/
Disl29034.c255 static bool sensorRateAls(uint32_t rate, uint64_t latency, void *cookie) in sensorRateAls() argument
257 if (rate == SENSOR_RATE_ONCHANGE) in sensorRateAls()
258 rate = ISL29034_DEFAULT_RATE; in sensorRateAls()
260 INFO_PRINT("sensorRateAls: %ld/%lld\n", rate, latency); in sensorRateAls()
264 …mData.alsTimerHandle = timTimerSet(sensorTimerLookupCommon(supportedRates, rateTimerVals, rate), 0… in sensorRateAls()
266 sensorSignalInternalEvt(mData.alsHandle, SENSOR_INTERNAL_EVT_RATE_CHG, rate, latency); in sensorRateAls()
/device/google/contexthub/firmware/os/drivers/rohm_rpr0521/
Drohm_rpr0521.c450 static bool sensorRateAls(uint32_t rate, uint64_t latency, void *cookie) in sensorRateAls() argument
452 if (rate == SENSOR_RATE_ONCHANGE) in sensorRateAls()
453 rate = ROHM_RPR0521_DEFAULT_RATE; in sensorRateAls()
455 VERBOSE_PRINT("sensorRateAls: rate=%ld Hz latency=%lld ns\n", rate/1024, latency); in sensorRateAls()
457 return sensorSignalInternalEvt(mTask.alsHandle, SENSOR_INTERNAL_EVT_RATE_CHG, rate, latency); in sensorRateAls()
500 static bool sensorRateProx(uint32_t rate, uint64_t latency, void *cookie) in sensorRateProx() argument
502 if (rate == SENSOR_RATE_ONCHANGE) in sensorRateProx()
503 rate = ROHM_RPR0521_DEFAULT_RATE; in sensorRateProx()
505 VERBOSE_PRINT("sensorRateProx: rate=%ld Hz latency=%lld ns\n", rate/1024, latency); in sensorRateProx()
507 return sensorSignalInternalEvt(mTask.proxHandle, SENSOR_INTERNAL_EVT_RATE_CHG, rate, latency); in sensorRateProx()
/device/google/contexthub/sensorhal/
Dhubconnection.cpp213 mSensorState[COMMS_SENSOR_WINDOW_ORIENTATION].rate = SENSOR_RATE_ONCHANGE; in HubConnection()
215 mSensorState[COMMS_SENSOR_STEP_DETECTOR].rate = SENSOR_RATE_ONCHANGE; in HubConnection()
218 mSensorState[COMMS_SENSOR_SIGNIFICANT_MOTION].rate = SENSOR_RATE_ONESHOT; in HubConnection()
225 mSensorState[COMMS_SENSOR_HALL].rate = SENSOR_RATE_ONCHANGE; in HubConnection()
227 mSensorState[COMMS_SENSOR_SYNC].rate = SENSOR_RATE_ONCHANGE; in HubConnection()
229 mSensorState[COMMS_SENSOR_TILT].rate = SENSOR_RATE_ONCHANGE; in HubConnection()
231 mSensorState[COMMS_SENSOR_GESTURE].rate = SENSOR_RATE_ONESHOT; in HubConnection()
233 mSensorState[COMMS_SENSOR_DOUBLE_TWIST].rate = SENSOR_RATE_ONCHANGE; in HubConnection()
235 mSensorState[COMMS_SENSOR_DOUBLE_TAP].rate = SENSOR_RATE_ONCHANGE; in HubConnection()
238 mSensorState[COMMS_SENSOR_DOUBLE_TOUCH].rate = SENSOR_RATE_ONESHOT; in HubConnection()
[all …]
/device/linaro/poplar/audio/
Daudio_hw.c120 return out->config.rate; in out_get_sample_rate()
123 static int out_set_sample_rate(struct audio_stream *stream, uint32_t rate) in out_set_sample_rate() argument
231 return (PERIOD_SIZE * PLAYBACK_PERIOD_COUNT * 1000) / out->config.rate; in out_get_latency()
339 static int in_set_sample_rate(struct audio_stream *stream, uint32_t rate) in in_set_sample_rate() argument
341 ALOGV("in_set_sample_rate: %d", rate); in in_set_sample_rate()
462 out->config.rate = CODEC_SAMPLING_RATE; in adev_open_output_stream()
467 if (out->config.rate != config->sample_rate || in adev_open_output_stream()
470 config->sample_rate = out->config.rate; in adev_open_output_stream()
477 out->config.channels, out->config.rate, out->config.format); in adev_open_output_stream()
/device/google/contexthub/firmware/os/drivers/st_hts221/
Dhts221.c342 static bool humiditySetRate(uint32_t rate, uint64_t latency, void *cookie) in humiditySetRate() argument
344 INFO_PRINT("humiditySetRate %lu Hz - %llu ns\n", rate, latency); in humiditySetRate()
350 hts221RatesRateVals, rate), 0, 50, sensorHumidityTimerCallback, NULL, false); in humiditySetRate()
353 SENSOR_INTERNAL_EVT_RATE_CHG, rate, latency); in humiditySetRate()
361 #define DEC_OPS(power, firmware, rate, flush, cal, cfg) \ argument
364 .sensorSetRate = rate, \
/device/amlogic/yukawa/hal/audio/
Daudio_hw.c195 return out->config.rate; in out_get_sample_rate()
198 static int out_set_sample_rate(struct audio_stream *stream, uint32_t rate) in out_set_sample_rate() argument
309 return (PLAYBACK_PERIOD_SIZE * PLAYBACK_PERIOD_COUNT * 1000) / out->config.rate; in out_get_latency()
357 get_pcm_timestamp(out->pcm, out->config.rate, &info, true /*isOutput*/); in out_write()
475 return in->config.rate; in in_get_sample_rate()
478 static int in_set_sample_rate(struct audio_stream *stream, uint32_t rate) in in_set_sample_rate() argument
480 ALOGV("in_set_sample_rate: %d", rate); in in_set_sample_rate()
697 get_pcm_timestamp(in->pcm, in->config.rate, &info, false /*isOutput*/); in in_read()
824 out->config.rate = PLAYBACK_CODEC_SAMPLING_RATE; in adev_open_output_stream()
829 if (out->config.rate != config->sample_rate || in adev_open_output_stream()
[all …]
/device/google/contexthub/firmware/os/drivers/st_mag40/
Dst_mag40.c220 uint32_t rate; member
432 static uint8_t st_mag40_computeOdr(uint32_t rate) in st_mag40_computeOdr() argument
437 if (st_mag40_Rates[i] == rate) in st_mag40_computeOdr()
479 static bool magSetRate(uint32_t rate, uint64_t latency, void *cookie) in magSetRate() argument
483 INFO_PRINT("magSetRate %lu Hz - %llu ns\n", rate, latency); in magSetRate()
485 num = st_mag40_computeOdr(rate); in magSetRate()
487 mTask.rate = rate; in magSetRate()
666 #define DEC_OPS(power, firmware, rate, flush, test, cal, cfg) \ argument
669 .sensorSetRate = rate, \
849 SENSOR_INTERNAL_EVT_RATE_CHG, mTask.rate, mTask.latency); in sensorMagConfig()
/device/google/contexthub/firmware/os/drivers/leds/
Dleds_gpio.c100 static bool sensorLedsSetRate(uint32_t rate, uint64_t latency, void *cookie) in sensorLedsSetRate() argument
106 ledsRatesRateVals, rate), 0, 50, sensorLedsTimerCallback, NULL, false); in sensorLedsSetRate()
108 return sensorSignalInternalEvt(mTask.sHandle, SENSOR_INTERNAL_EVT_RATE_CHG, rate, latency); in sensorLedsSetRate()
/device/google/contexthub/firmware/os/drivers/ams_tmd4903/
Dams_tmd4903.c505 static bool sensorRateAls(uint32_t rate, uint64_t latency, void *cookie) in sensorRateAls() argument
507 if (rate == SENSOR_RATE_ONCHANGE) in sensorRateAls()
508 rate = AMS_TMD4903_DEFAULT_RATE; in sensorRateAls()
510 DEBUG_PRINT("sensorRateAls: rate=%ld Hz latency=%lld ns\n", rate/1024, latency); in sensorRateAls()
512 return sensorSignalInternalEvt(mTask.alsHandle, SENSOR_INTERNAL_EVT_RATE_CHG, rate, latency); in sensorRateAls()
592 static bool sensorRateProx(uint32_t rate, uint64_t latency, void *cookie) in sensorRateProx() argument
594 if (rate == SENSOR_RATE_ONCHANGE) in sensorRateProx()
595 rate = AMS_TMD4903_DEFAULT_RATE; in sensorRateProx()
597 DEBUG_PRINT("sensorRateProx: rate=%ld Hz latency=%lld ns\n", rate/1024, latency); in sensorRateProx()
599 return sensorSignalInternalEvt(mTask.proxHandle, SENSOR_INTERNAL_EVT_RATE_CHG, rate, latency); in sensorRateProx()
/device/google/contexthub/firmware/os/drivers/invensense_icm40600/
Dinvensense_icm40600.c535 uint32_t rate; member
556 uint32_t rate; member
1905 static uint8_t computeOdrConf(uint32_t rate) argument
1907 switch (rate) {
1948 if (T(sensors[ACC]).rate > NO_DECIMATION_MAX_RATE) {
1950 } else if (T(sensors[ACC]).rate < NO_DECIMATION_MIN_RATE) {
1953 config->accel_rate = T(sensors[ACC]).rate;
1961 if (T(sensors[GYR]).rate > NO_DECIMATION_MAX_RATE) {
1963 } else if (T(sensors[GYR]).rate < NO_DECIMATION_MIN_RATE) {
1966 config->gyro_rate = T(sensors[GYR]).rate;
[all …]
/device/linaro/hikey/audio/
Daudio_hw.c282 return out->config.rate; in out_get_sample_rate()
285 static int out_set_sample_rate(struct audio_stream *stream, uint32_t rate) in out_set_sample_rate() argument
401 return (PERIOD_SIZE * PLAYBACK_PERIOD_COUNT * 1000) / out->config.rate; in out_get_latency()
523 static int in_set_sample_rate(struct audio_stream *stream, uint32_t rate) in in_set_sample_rate() argument
525 ALOGV("in_set_sample_rate: %d", rate); in in_set_sample_rate()
646 out->config.rate = CODEC_SAMPLING_RATE; in adev_open_output_stream()
651 if (out->config.rate != config->sample_rate || in adev_open_output_stream()
654 config->sample_rate = out->config.rate; in adev_open_output_stream()
661 out->config.channels, out->config.rate, out->config.format); in adev_open_output_stream()

123