diff options
| author | Eric Laurent <elaurent@google.com> | 2011-08-10 20:16:23 -0700 |
|---|---|---|
| committer | Eric Laurent <elaurent@google.com> | 2011-08-11 09:17:07 -0700 |
| commit | 582a15744be109fb630db7dbd1d1bdf22ff44f12 (patch) | |
| tree | b8e19d17fc4c27e5ced828a7aceea9c010fdd81c /audio/audio_policy_hal.cpp | |
| parent | 33556654af63c3c8f9e8f6c8bd34b2ac15bef6b3 (diff) | |
| download | hardware_libhardware_legacy-582a15744be109fb630db7dbd1d1bdf22ff44f12.tar.gz hardware_libhardware_legacy-582a15744be109fb630db7dbd1d1bdf22ff44f12.tar.bz2 hardware_libhardware_legacy-582a15744be109fb630db7dbd1d1bdf22ff44f12.zip | |
AudioPolicyManager: register effect CPU on enable
Audio effect CPU usage is now registered on enable and
unregistered on disable instead of when the effect is
created or destroyed.
Change-Id: Icffcede9558d8d41887278f0efef2df430927381
Diffstat (limited to 'audio/audio_policy_hal.cpp')
| -rw-r--r-- | audio/audio_policy_hal.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/audio/audio_policy_hal.cpp b/audio/audio_policy_hal.cpp index 0dc5524..d5f2816 100644 --- a/audio/audio_policy_hal.cpp +++ b/audio/audio_policy_hal.cpp @@ -265,6 +265,12 @@ static int ap_unregister_effect(struct audio_policy *pol, int id) return lap->apm->unregisterEffect(id); } +static int ap_set_effect_enabled(struct audio_policy *pol, int id, bool enabled) +{ + struct legacy_audio_policy *lap = to_lap(pol); + return lap->apm->setEffectEnabled(id, enabled); +} + static bool ap_is_stream_active(const struct audio_policy *pol, int stream, uint32_t in_past_ms) { @@ -318,6 +324,7 @@ static int create_legacy_ap(const struct audio_policy_device *device, lap->policy.get_output_for_effect = ap_get_output_for_effect; lap->policy.register_effect = ap_register_effect; lap->policy.unregister_effect = ap_unregister_effect; + lap->policy.set_effect_enabled = ap_set_effect_enabled; lap->policy.is_stream_active = ap_is_stream_active; lap->policy.dump = ap_dump; |
