X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=control.c;h=7d942fdfab48557a412089f649544edb0816f30e;hb=b24d6584ce3c44cdb5ba9ebe6aa525ff7ecd477c;hp=db8d324e6997ae611a91240eea7a0efda927ae95;hpb=91169afdbdcbdf36ca591fd31eafcdc7919936b7;p=android-x86%2Fhardware-intel-libsensors.git diff --git a/control.c b/control.c index db8d324..7d942fd 100644 --- a/control.c +++ b/control.c @@ -377,7 +377,9 @@ static void* acquisition_routine (void* param) struct timespec target_time; int64_t period; - ALOGV("Entering data acquisition thread for sensor %d\n", s); + ALOGI("Entering data acquisition thread S%d (%s): rate(%f), minDelay(%ld), maxDelay(%ld)\n", + s, sensor_info[s].friendly_name, sensor_info[s].sampling_rate, + sensor_desc[s].minDelay, sensor_desc[s].maxDelay); if (s < 0 || s >= sensor_count) { ALOGE("Invalid sensor handle!\n"); @@ -750,8 +752,9 @@ void set_report_ts(int s, int64_t ts) * this may not be the case. Perhaps we'll get rid of this when * we'll be reading the timestamp from the iio channel for all sensors */ - if (sensor_info[s].report_ts && - sensor_info[s].sampling_rate && !sensor_desc[s].flags) { + if (sensor_info[s].report_ts && sensor_info[s].sampling_rate && + REPORTING_MODE(sensor_desc[s].flags) == SENSOR_FLAG_CONTINUOUS_MODE) + { period = (int64_t) (1000000000LL / sensor_info[s].sampling_rate); maxTs = sensor_info[s].report_ts + period; sensor_info[s].report_ts = (ts < maxTs ? ts : maxTs); @@ -911,9 +914,8 @@ static void synthetize_duplicate_samples (void) if (!sensor_info[s].enable_count) continue; - /* If the sensor can generate duplicates, leave it alone */ - if (!(sensor_info[s].quirks & QUIRK_TERSE_DRIVER) && - sensor_info[s].selected_trigger != + /* If the sensor is continuously firing, leave it alone */ + if ( sensor_info[s].selected_trigger != sensor_info[s].motion_trigger_name) continue;