projects
/
GitHub
/
LineageOS
/
android_hardware_samsung.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4add9a2
)
audio: improve log message to support for devices that dont have an amp
author
Christopher N. Hesse
<raymanfx@gmail.com>
Thu, 12 Jul 2018 11:51:43 +0000
(13:51 +0200)
committer
Christopher H.
<raymanfx@gmail.com>
Thu, 19 Jul 2018 21:18:59 +0000
(23:18 +0200)
Change-Id: I3fe824c4dbdb57bb0d63b395cfcef2f9dbbe556b
Signed-off-by: Abhay Ruparel <abhayruparel2000@gmail.com>
(cherry picked from commit
c487bbe38958d79aa7391b928f15e9ed5f8d1d4b
)
audio/audio_hw.c
patch
|
blob
|
blame
|
history
diff --git
a/audio/audio_hw.c
b/audio/audio_hw.c
index 94c105f9379fa9423cad434ede8ebf581ce1579e..1e99dcbedc074d58a5e19be3645b1fa8058cbda6 100644
(file)
--- a/
audio/audio_hw.c
+++ b/
audio/audio_hw.c
@@
-201,6
+201,10
@@
static int amplifier_open(void)
rc = hw_get_module(AMPLIFIER_HARDWARE_MODULE_ID,
(const hw_module_t **) &module);
if (rc) {
+ if (rc == -ENOENT) {
+ // no amplifier HAL present
+ return -ENOENT;
+ }
ALOGV("%s: Failed to obtain reference to amplifier module: %s\n",
__func__, strerror(-rc));
return -ENODEV;
@@
-4309,7
+4313,7
@@
static int adev_open(const hw_module_t *module, const char *name,
return -EINVAL;
}
- if (amplifier_open() !=
0
) {
+ if (amplifier_open() !=
-ENOENT
) {
ALOGE("Amplifier initialization failed");
}