summaryrefslogtreecommitdiff
path: root/cras/src/tests/audio_thread_unittest.cc
diff options
context:
space:
mode:
authorJorge E. Moreira <jemoreira@google.com>2021-04-12 19:05:41 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2021-04-12 19:05:41 +0000
commitbcf1f249f11b6865cff3f0d3f0ae5801e67e0e7e (patch)
tree7e0e07b9d8d50fc5dd352d5b36d74fa3cb3427db /cras/src/tests/audio_thread_unittest.cc
parent1a33fa04345d1d2599eae37bb34781783aa0d04e (diff)
parent072dce8ca50bdf87b113490cdf14bde14724914f (diff)
downloadadhd-bcf1f249f11b6865cff3f0d3f0ae5801e67e0e7e.tar.gz
Merge remote-tracking branch 'aosp/upstream-main' into master am: 072dce8ca5android-s-beta-4android-s-beta-3android-s-beta-4
Original change: https://android-review.googlesource.com/c/platform/external/adhd/+/1673705 Change-Id: I34df6886976fcb22f0bef53453a5cd0924f04f7b
Diffstat (limited to 'cras/src/tests/audio_thread_unittest.cc')
-rw-r--r--cras/src/tests/audio_thread_unittest.cc14
1 files changed, 12 insertions, 2 deletions
diff --git a/cras/src/tests/audio_thread_unittest.cc b/cras/src/tests/audio_thread_unittest.cc
index 6b78c696..93045e0b 100644
--- a/cras/src/tests/audio_thread_unittest.cc
+++ b/cras/src/tests/audio_thread_unittest.cc
@@ -56,6 +56,7 @@ static struct cras_iodev* cras_iodev_start_ramp_odev;
static enum CRAS_IODEV_RAMP_REQUEST cras_iodev_start_ramp_request;
static struct timespec clock_gettime_retspec;
static struct timespec init_cb_ts_;
+static struct timespec sleep_interval_ts_;
static std::map<const struct dev_stream*, struct timespec>
dev_stream_wake_time_val;
static int cras_device_monitor_set_device_mute_state_called;
@@ -1225,10 +1226,12 @@ struct dev_stream* dev_stream_create(struct cras_rstream* stream,
unsigned int dev_id,
const struct cras_audio_format* dev_fmt,
void* dev_ptr,
- struct timespec* cb_ts) {
+ struct timespec* cb_ts,
+ const struct timespec* sleep_interval_ts) {
struct dev_stream* out = static_cast<dev_stream*>(calloc(1, sizeof(*out)));
out->stream = stream;
init_cb_ts_ = *cb_ts;
+ sleep_interval_ts_ = *sleep_interval_ts;
return out;
}
@@ -1268,7 +1271,7 @@ void dev_stream_set_delay(const struct dev_stream* dev_stream,
void dev_stream_set_dev_rate(struct dev_stream* dev_stream,
unsigned int dev_rate,
double dev_rate_ratio,
- double master_rate_ratio,
+ double main_rate_ratio,
int coarse_rate_adjust) {}
void dev_stream_update_frames(const struct dev_stream* dev_stream) {}
@@ -1409,12 +1412,19 @@ int cras_device_monitor_set_device_mute_state(unsigned int dev_idx) {
cras_device_monitor_set_device_mute_state_called++;
return 0;
}
+int cras_device_monitor_error_close(unsigned int dev_idx) {
+ return 0;
+}
int cras_iodev_drop_frames_by_time(struct cras_iodev* iodev,
struct timespec ts) {
return 0;
}
+bool cras_iodev_is_on_internal_card(const struct cras_ionode* node) {
+ return 0;
+}
+
// From librt.
int clock_gettime(clockid_t clk_id, struct timespec* tp) {
*tp = clock_gettime_retspec;