|
|
@ -218,6 +218,10 @@ static int amplifier_open(void) |
|
|
|
rc = hw_get_module(AMPLIFIER_HARDWARE_MODULE_ID, |
|
|
|
rc = hw_get_module(AMPLIFIER_HARDWARE_MODULE_ID, |
|
|
|
(const hw_module_t **) &module); |
|
|
|
(const hw_module_t **) &module); |
|
|
|
if (rc) { |
|
|
|
if (rc) { |
|
|
|
|
|
|
|
if (rc == -ENOENT) { |
|
|
|
|
|
|
|
// no amplifier HAL present
|
|
|
|
|
|
|
|
return -ENOENT; |
|
|
|
|
|
|
|
} |
|
|
|
ALOGV("%s: Failed to obtain reference to amplifier module: %s\n", |
|
|
|
ALOGV("%s: Failed to obtain reference to amplifier module: %s\n", |
|
|
|
__func__, strerror(-rc)); |
|
|
|
__func__, strerror(-rc)); |
|
|
|
return -ENODEV; |
|
|
|
return -ENODEV; |
|
|
@ -4371,7 +4375,7 @@ static int adev_open(const hw_module_t *module, const char *name, |
|
|
|
return -EINVAL; |
|
|
|
return -EINVAL; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (amplifier_open() != 0) { |
|
|
|
if (amplifier_open() != -ENOENT) { |
|
|
|
ALOGE("Amplifier initialization failed"); |
|
|
|
ALOGE("Amplifier initialization failed"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|