diff options
author | llololo <llololo@google.com> | 2021-04-08 09:25:58 +0000 |
---|---|---|
committer | Wayne Lo <llololo@google.com> | 2021-04-28 08:36:02 +0000 |
commit | 49b1536ed6ee60ab1bd652d23079a073d269dd61 (patch) | |
tree | 7b2ec52c19e87bcf9eba5112413cb0a58f69e3be | |
parent | 12343fe01ffe8cead102fc4ab481dd7668e89429 (diff) | |
download | audio-49b1536ed6ee60ab1bd652d23079a073d269dd61.tar.gz |
audio_hw_usb: reduce the number of the retries in usb_get_capabilityandroid-12.1.0_r9android-12.1.0_r8android-12.1.0_r7android-12.1.0_r22android-12.1.0_r21android-12.1.0_r20android-12.1.0_r19android-12.1.0_r11android-12.1.0_r10android-12.0.0_r32android-12.0.0_r29android-12.0.0_r28android-12.0.0_r27android-12.0.0_r26android-12.0.0_r21android-12.0.0_r20android-12.0.0_r19android-12.0.0_r18android-12.0.0_r16android12L-devandroid12-qpr3-s7-releaseandroid12-qpr3-s6-releaseandroid12-qpr3-s5-releaseandroid12-qpr3-s4-releaseandroid12-qpr3-s3-releaseandroid12-qpr3-s2-releaseandroid12-qpr3-s1-releaseandroid12-qpr3-releaseandroid12-qpr1-releaseandroid12-qpr1-d-s3-releaseandroid12-qpr1-d-s2-releaseandroid12-qpr1-d-s1-releaseandroid12-qpr1-d-releaseandroid12-dev
reduce the number of the retries to avoid hitting timecheck timeout 5s.
Bug: 172888755
Test: usb audio function simple test
Change-Id: I0a30b3246e13e440acf89b6b9f05480ca796259b
-rw-r--r-- | hal/audio_extn/usb.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/hal/audio_extn/usb.c b/hal/audio_extn/usb.c index b0b5049..4bf6a32 100644 --- a/hal/audio_extn/usb.c +++ b/hal/audio_extn/usb.c @@ -336,7 +336,7 @@ static int usb_get_capability(int type, char *bit_width_str = NULL; struct usb_device_config * usb_device_info; bool check = false; - int tries=5; + int tries=3; memset(path, 0, sizeof(path)); ALOGV("%s: for %s", __func__, (type == USB_PLAYBACK) ? @@ -354,7 +354,7 @@ static int usb_get_capability(int type, // TODO: figure up if this wait is needed any more while (tries--) { if (access(path, F_OK) < 0) { - ALOGW("stream %s doesn't exist retrying\n", path); + ALOGW("stream %s doesn't exist retrying %d more times\n", path, tries); sleep(1); continue; } |