Home
last modified time | relevance | path

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

12

/device/google/contexthub/util/nanoapp_cmd/
Dnanoapp_cmd.c54 uint32_t rate; member
102 cmd->rate = SENSOR_RATE_ONCHANGE; in setType()
105 cmd->rate = SENSOR_RATE_ONCHANGE; in setType()
108 cmd->rate = SENSOR_RATE_ONCHANGE; in setType()
111 cmd->rate = SENSOR_RATE_ONCHANGE; in setType()
114 cmd->rate = SENSOR_RATE_ONCHANGE; in setType()
117 cmd->rate = SENSOR_RATE_ONCHANGE; in setType()
120 cmd->rate = SENSOR_RATE_ONCHANGE; in setType()
123 cmd->rate = SENSOR_RATE_ONCHANGE; in setType()
126 cmd->rate = SENSOR_RATE_ONESHOT; in setType()
[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].rate, mSensorConfigList[i].reportLatency); in main()
/device/google/contexthub/firmware/src/
Dsensors.c74 uint32_t rate; member
261 static bool sensorCallFuncSetRate(struct Sensor* s, uint32_t rate, uint64_t latency) in sensorCallFuncSetRate() argument
264 INVOKE_AS_OWNER_AND_RETURN(LOCAL_APP_OPS(s)->sensorSetRate, rate, latency, s->callData); in sensorCallFuncSetRate()
272 evt->externalSetRateEvt.rate = rate; in sensorCallFuncSetRate()
451 if (req->rate == removedRate) { in sensorCalcHwRate()
459 if (req->rate == SENSOR_RATE_ONDEMAND) in sensorCalcHwRate()
461 if (req->rate == SENSOR_RATE_ONCHANGE) { in sensorCalcHwRate()
466 if (highestReq < req->rate) in sensorCalcHwRate()
467 highestReq = req->rate; in sensorCalcHwRate()
587 static bool sensorAddRequestor(uint32_t sensorHandle, uint32_t clientTid, uint32_t rate, uint64_t l… in sensorAddRequestor() argument
[all …]
DhostIntf.c73 uint32_t rate; member
85 uint32_t rate; member
695 mActiveSensorTable[j].rate = 0; in initSensors()
1124 … if (sensorRequestRateChange(mHostIntfTid, sensor->sensorHandle, cmd->rate, cmd->latency)) { in hostIntfHandleEvent()
1125 sensor->rate = cmd->rate; in hostIntfHandleEvent()
1148 sensor->rate = 0; in hostIntfHandleEvent()
1160 if (cmd->rate == SENSOR_RATE_ONESHOT) { in hostIntfHandleEvent()
1161 cmd->rate = SENSOR_RATE_ONCHANGE; in hostIntfHandleEvent()
1167 … if (sensorRequest(mHostIntfTid, sensor->sensorHandle, cmd->rate, cmd->latency)) { in hostIntfHandleEvent()
1172 sensor->rate = cmd->rate; in hostIntfHandleEvent()
/device/google/contexthub/firmware/inc/
Dsensors.h132 uint32_t rate; member
159 bool (*sensorSetRate)(uint32_t rate, uint64_t latency, void *);
259 bool sensorRequest(uint32_t clientTid, uint32_t sensorHandle, uint32_t rate, uint64_t latency);
277 uint32_t rate; in sensorTimerLookupCommon() local
279 while ((rate = *supportedRates++) != 0) { in sensorTimerLookupCommon()
280 if (rate == wantedRate) in sensorTimerLookupCommon()
/device/google/contexthub/firmware/src/drivers/bosch_bmi160/
Dbosch_bmi160.c323 uint32_t rate; member
339 uint32_t rate; member
1272 static uint8_t computeOdr(uint32_t rate) in computeOdr() argument
1275 switch (rate) { in computeOdr()
1311 static bool accSetRate(uint32_t rate, uint64_t latency, void *cookie) in accSetRate() argument
1316 INFO_PRINT("accSetRate: rate=%ld, latency=%lld, state=%s\n", rate, latency, in accSetRate()
1320 odr = computeOdr(rate); in accSetRate()
1342 mTask.sensors[ACC].rate = rate; in accSetRate()
1365 mTask.sensors[ACC].pConfig.rate = rate; in accSetRate()
1371 static bool gyrSetRate(uint32_t rate, uint64_t latency, void *cookie) in gyrSetRate() argument
[all …]
/device/google/contexthub/sensorhal/
Dhubconnection.cpp142 mSensorState[COMMS_SENSOR_WINDOW_ORIENTATION].rate = SENSOR_RATE_ONCHANGE; in HubConnection()
144 mSensorState[COMMS_SENSOR_STEP_DETECTOR].rate = SENSOR_RATE_ONCHANGE; in HubConnection()
147 mSensorState[COMMS_SENSOR_SIGNIFICANT_MOTION].rate = SENSOR_RATE_ONESHOT; in HubConnection()
154 mSensorState[COMMS_SENSOR_HALL].rate = SENSOR_RATE_ONCHANGE; in HubConnection()
156 mSensorState[COMMS_SENSOR_SYNC].rate = SENSOR_RATE_ONCHANGE; in HubConnection()
158 mSensorState[COMMS_SENSOR_ACTIVITY].rate = SENSOR_RATE_ONCHANGE; in HubConnection()
160 mSensorState[COMMS_SENSOR_TILT].rate = SENSOR_RATE_ONCHANGE; in HubConnection()
162 mSensorState[COMMS_SENSOR_GESTURE].rate = SENSOR_RATE_ONESHOT; in HubConnection()
164 mSensorState[COMMS_SENSOR_DOUBLE_TWIST].rate = SENSOR_RATE_ONCHANGE; in HubConnection()
166 mSensorState[COMMS_SENSOR_DOUBLE_TAP].rate = SENSOR_RATE_ONCHANGE; in HubConnection()
[all …]
Dhubconnection.h104 rate_q10_t rate; member
119 rate_q10_t rate; member
/device/google/contexthub/firmware/src/drivers/ams_tmd2772/
Dams_tmd2772.c282 static bool sensorRateAls(uint32_t rate, uint64_t latency, void *cookie) in sensorRateAls() argument
284 if (rate == SENSOR_RATE_ONCHANGE) { in sensorRateAls()
285 rate = AMS_TMD2772_DEFAULT_RATE; in sensorRateAls()
287 osLog(LOG_INFO, DRIVER_NAME "sensorRateAls: %ld/%lld\n", rate, latency); in sensorRateAls()
291 …mData.alsTimerHandle = timTimerSet(sensorTimerLookupCommon(supportedRates, rateTimerVals, rate), 0… in sensorRateAls()
293 sensorSignalInternalEvt(mData.alsHandle, SENSOR_INTERNAL_EVT_RATE_CHG, rate, latency); in sensorRateAls()
337 static bool sensorRateProx(uint32_t rate, uint64_t latency, void *cookie) in sensorRateProx() argument
339 if (rate == SENSOR_RATE_ONCHANGE) { in sensorRateProx()
340 rate = AMS_TMD2772_DEFAULT_RATE; in sensorRateProx()
342 osLog(LOG_INFO, DRIVER_NAME "sensorRateProx: %ld/%lld\n", rate, latency); in sensorRateProx()
[all …]
/device/asus/fugu/libaudio/
DAudioStreamIn.cpp106 status_t AudioStreamIn::setSampleRate(uint32_t rate) in setSampleRate() argument
108 (void) rate; in setSampleRate()
195 DUMP("\tinput sample rate: %d\n", mPcmConfig.rate); in dump()
350 mPcmConfig.rate = chosenSampleRate; in startInputStream_l()
353 AudioHardwareInput::kPeriodMsec * mPcmConfig.rate / 1000; in startInputStream_l()
382 if (mPcmConfig.rate != mRequestedSampleRate) { in startInputStream_l()
384 mPcmConfig.rate, mRequestedSampleRate); in startInputStream_l()
385 int ret = create_resampler(mPcmConfig.rate, in startInputStream_l()
Daudio_hal_thunks.cpp97 static int out_set_sample_rate(struct audio_stream *stream, uint32_t rate) in out_set_sample_rate() argument
102 if (rate != tstream->impl->sampleRate()) in out_set_sample_rate()
254 static int in_set_sample_rate(struct audio_stream *stream, uint32_t rate) in in_set_sample_rate() argument
259 return tstream->impl->setSampleRate(rate); in in_set_sample_rate()
/device/google/contexthub/util/nanotool/
Dnanomessage.cpp181 uint32_t ConfigureSensorRequest::FloatRateToFixedPoint(float rate) { in FloatRateToFixedPoint() argument
182 return rate * 1024.0f; in FloatRateToFixedPoint()
185 float ConfigureSensorRequest::FixedPointRateToFloat(uint32_t rate) { in FixedPointRateToFloat() argument
186 return rate / 1024.0f; in FixedPointRateToFloat()
216 config.rate, in ToString()
Dnanomessage.h169 static uint32_t FloatRateToFixedPoint(float rate);
170 static float FixedPointRateToFloat(uint32_t rate);
182 uint32_t rate; member
Dnanotool.cpp211 SensorSpecialRate rate; in ParseRate() local
213 std::tie(name, rate) = rates[i]; in ParseRate()
215 spec.special_rate = rate; in ParseRate()
/device/google/contexthub/firmware/src/drivers/rohm_rpr0521/
Drohm_rpr0521.c350 static bool sensorRateAls(uint32_t rate, uint64_t latency, void *cookie) in sensorRateAls() argument
352 if (rate == SENSOR_RATE_ONCHANGE) in sensorRateAls()
353 rate = ROHM_RPR0521_DEFAULT_RATE; in sensorRateAls()
355 DEBUG_PRINT("sensorRateAls: rate=%ld Hz latency=%lld ns\n", rate/1024, latency); in sensorRateAls()
357 return sensorSignalInternalEvt(mTask.alsHandle, SENSOR_INTERNAL_EVT_RATE_CHG, rate, latency); in sensorRateAls()
400 static bool sensorRateProx(uint32_t rate, uint64_t latency, void *cookie) in sensorRateProx() argument
402 if (rate == SENSOR_RATE_ONCHANGE) in sensorRateProx()
403 rate = ROHM_RPR0521_DEFAULT_RATE; in sensorRateProx()
405 DEBUG_PRINT("sensorRateProx: rate=%ld Hz latency=%lld ns\n", rate/1024, latency); in sensorRateProx()
407 return sensorSignalInternalEvt(mTask.proxHandle, SENSOR_INTERNAL_EVT_RATE_CHG, rate, latency); in sensorRateProx()
/device/linaro/hikey/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
233 return (PERIOD_SIZE * PLAYBACK_PERIOD_COUNT * 1000) / out->config.rate; in out_get_latency()
342 static int in_set_sample_rate(struct audio_stream *stream, uint32_t rate) in in_set_sample_rate() argument
344 ALOGV("in_set_sample_rate: %d", rate); in in_set_sample_rate()
465 out->config.rate = CODEC_SAMPLING_RATE; in adev_open_output_stream()
470 if (out->config.rate != config->sample_rate || in adev_open_output_stream()
473 config->sample_rate = out->config.rate; in adev_open_output_stream()
480 out->config.channels, out->config.rate, out->config.format); in adev_open_output_stream()
/device/google/contexthub/firmware/src/drivers/ams_tmd4903/
Dams_tmd4903.c398 static bool sensorRateAls(uint32_t rate, uint64_t latency, void *cookie) in sensorRateAls() argument
400 if (rate == SENSOR_RATE_ONCHANGE) in sensorRateAls()
401 rate = AMS_TMD4903_DEFAULT_RATE; in sensorRateAls()
403 DEBUG_PRINT("sensorRateAls: rate=%ld Hz latency=%lld ns\n", rate/1024, latency); in sensorRateAls()
405 return sensorSignalInternalEvt(mTask.alsHandle, SENSOR_INTERNAL_EVT_RATE_CHG, rate, latency); in sensorRateAls()
485 static bool sensorRateProx(uint32_t rate, uint64_t latency, void *cookie) in sensorRateProx() argument
487 if (rate == SENSOR_RATE_ONCHANGE) in sensorRateProx()
488 rate = AMS_TMD4903_DEFAULT_RATE; in sensorRateProx()
490 DEBUG_PRINT("sensorRateProx: rate=%ld Hz latency=%lld ns\n", rate/1024, latency); in sensorRateProx()
492 return sensorSignalInternalEvt(mTask.proxHandle, SENSOR_INTERNAL_EVT_RATE_CHG, rate, latency); in sensorRateProx()
/device/google/contexthub/firmware/src/drivers/bosch_bmp280/
Dbosch_bmp280.c217 static bool sensorRateBaro(uint32_t rate, uint64_t latency, void *cookie) in sensorRateBaro() argument
221 …imTimerSet(sensorTimerLookupCommon(baroSupportedRates, rateTimerValsBaro, rate), 0, 50, baroTimerC… in sensorRateBaro()
222 return sensorSignalInternalEvt(mTask.baroHandle, SENSOR_INTERNAL_EVT_RATE_CHG, rate, latency); in sensorRateBaro()
286 static bool sensorRateTemp(uint32_t rate, uint64_t latency, void *cookie) in sensorRateTemp() argument
290 …imTimerSet(sensorTimerLookupCommon(tempSupportedRates, rateTimerValsTemp, rate), 0, 50, tempTimerC… in sensorRateTemp()
291 sensorSignalInternalEvt(mTask.tempHandle, SENSOR_INTERNAL_EVT_RATE_CHG, rate, latency); in sensorRateTemp()
/device/google/contexthub/firmware/src/drivers/vsync/
Dvsync.c134 static bool vsyncSetRate(uint32_t rate, uint64_t latency, void *cookie) in vsyncSetRate() argument
137 return sensorSignalInternalEvt(mTask.sensorHandle, SENSOR_INTERNAL_EVT_RATE_CHG, rate, latency); in vsyncSetRate()
/device/google/dragon/audio/hal/
Daudio_hw.c54 .rate = PLAYBACK_DEFAULT_SAMPLING_RATE,
74 .rate = CAPTURE_DEFAULT_SAMPLING_RATE,
93 .rate = CAPTURE_DEFAULT_SAMPLING_RATE,
112 .rate = PLAYBACK_DEFAULT_SAMPLING_RATE,
132 .rate = PLAYBACK_DEFAULT_SAMPLING_RATE,
152 .rate = 16000,
192 .rate = DEEP_BUFFER_OUTPUT_SAMPLING_RATE,
1358 if (in->config.rate != pcm_profile->config.rate) { in start_input_stream()
1370 if (in->requested_rate != in->config.rate) { in start_input_stream()
1381 ret = create_resampler(in->config.rate, in start_input_stream()
[all …]
/device/google/contexthub/firmware/src/drivers/orientation/
Dorientation.c91 uint32_t rate; member
574 static bool fusionSetRate(uint32_t rate, uint64_t latency, void *cookie) in fusionSetRate() argument
582 mSensor->rate = rate; in fusionSetRate()
587 max_rate = max_rate > mTask.sensors[i].rate ? max_rate : mTask.sensors[i].rate; in fusionSetRate()
630 if (mSensor->rate > 0) in fusionSetRate()
631 sensorSignalInternalEvt(mSensor->handle, SENSOR_INTERNAL_EVT_RATE_CHG, rate, latency); in fusionSetRate()
/device/google/contexthub/firmware/src/drivers/hall/
Dhall.c162 static bool hallSetRate(uint32_t rate, uint64_t latency, void *cookie) in hallSetRate() argument
173 return sensorSignalInternalEvt(mTask.sensorHandle, SENSOR_INTERNAL_EVT_RATE_CHG, rate, latency); in hallSetRate()
/device/htc/flounder/audio/hal/
Daudio_hw.c60 .rate = PLAYBACK_DEFAULT_SAMPLING_RATE,
80 .rate = CAPTURE_DEFAULT_SAMPLING_RATE,
98 .rate = CAPTURE_DEFAULT_SAMPLING_RATE,
116 .rate = CAPTURE_DEFAULT_SAMPLING_RATE,
134 .rate = SCO_DEFAULT_SAMPLING_RATE,
154 .rate = SCO_DEFAULT_SAMPLING_RATE,
172 .rate = 16000,
214 .rate = DEEP_BUFFER_OUTPUT_SAMPLING_RATE,
951 …ernel_delay = (long)(((int64_t)kernel_frames * 1000000000) / ref_device->pcm_profile->config.rate); in get_capture_reference_delay()
991 buf_delay = (long)(((int64_t)(in->read_buf_frames) * 1000000000) / in->config.rate + in get_capture_delay()
[all …]
/device/google/contexthub/firmware/src/drivers/hall_twopole/
Dhall_twopole.c183 static bool hallSetRate(uint32_t rate, uint64_t latency, void *cookie) in hallSetRate() argument
189 return sensorSignalInternalEvt(mTask.sensorHandle, SENSOR_INTERNAL_EVT_RATE_CHG, rate, latency); in hallSetRate()
/device/google/contexthub/firmware/src/drivers/tilt_detection/
Dtilt_detection.c203 static bool tiltDetectionSetRate(uint32_t rate, uint64_t latency, void *cookie) in tiltDetectionSetRate() argument
205 sensorSignalInternalEvt(mTask.handle, SENSOR_INTERNAL_EVT_RATE_CHG, rate, in tiltDetectionSetRate()

12