diff options
author | mauimauer <sebastian@n-unity.de> | 2011-11-30 15:13:17 +0100 |
---|---|---|
committer | mauimauer <sebastian@n-unity.de> | 2011-11-30 15:13:17 +0100 |
commit | 9e3dfdebbad74a759e854fc9ce2dfd239255e1bf (patch) | |
tree | e7eb0f3da64b319a5915e0c304014c638a6744a3 | |
parent | ac40a30ee795bb75beb5702afefc8e573aea79e5 (diff) | |
download | device_samsung_n7000-9e3dfdebbad74a759e854fc9ce2dfd239255e1bf.zip device_samsung_n7000-9e3dfdebbad74a759e854fc9ce2dfd239255e1bf.tar.gz device_samsung_n7000-9e3dfdebbad74a759e854fc9ce2dfd239255e1bf.tar.bz2 |
Keeping up with changes to audio
-rwxr-xr-x | audio/Android.mk | 9 | ||||
-rwxr-xr-x[-rw-r--r--] | audio/AudioPolicyCompatClient.cpp | 2 | ||||
-rwxr-xr-x[-rw-r--r--] | audio/AudioPolicyCompatClient.h | 4 | ||||
-rwxr-xr-x | audio/AudioPolicyInterface.h | 16 | ||||
-rwxr-xr-x | audio/AudioPolicyInterfaceLegacy.h | 2 | ||||
-rwxr-xr-x[-rw-r--r--] | audio/AudioPolicyManagerBase.cpp | 8 | ||||
-rwxr-xr-x | audio/AudioPolicyManagerBase.h | 2 | ||||
-rwxr-xr-x[-rw-r--r--] | audio/AudioPolicyManagerDefault.cpp | 2 | ||||
-rwxr-xr-x[-rw-r--r--] | audio/AudioPolicyManagerDefault.h | 2 | ||||
-rwxr-xr-x[-rw-r--r--] | audio/AudioSystem.h | 2 | ||||
-rwxr-xr-x[-rw-r--r--] | audio/audio_policy_hal.cpp | 7 |
11 files changed, 34 insertions, 22 deletions
diff --git a/audio/Android.mk b/audio/Android.mk index 9951ba3..43a76a9 100755 --- a/audio/Android.mk +++ b/audio/Android.mk @@ -32,6 +32,11 @@ LOCAL_SHARED_LIBRARIES += libdl LOCAL_SHARED_LIBRARIES += libaudio +ifeq ($(BOARD_FORCE_STATIC_A2DP),true) + LOCAL_SHARED_LIBRARIES += liba2dp +endif + + LOCAL_STATIC_LIBRARIES := \ libmedia_helper @@ -42,6 +47,7 @@ include $(BUILD_SHARED_LIBRARY) include $(CLEAR_VARS) +ifeq (1,1) ## COMMENT OUT AUDIOPOLICY LOCAL_SRC_FILES := \ AudioPolicyManagerBase.cpp \ AudioPolicyCompatClient.cpp \ @@ -95,4 +101,5 @@ endif include $(BUILD_SHARED_LIBRARY) -endif +endif ## AUDIOPOLICY +endif
\ No newline at end of file diff --git a/audio/AudioPolicyCompatClient.cpp b/audio/AudioPolicyCompatClient.cpp index 08c31c5..e048b35 100644..100755 --- a/audio/AudioPolicyCompatClient.cpp +++ b/audio/AudioPolicyCompatClient.cpp @@ -139,4 +139,4 @@ status_t AudioPolicyCompatClient::setVoiceVolume(float volume, int delayMs) return mServiceOps->set_voice_volume(mService, volume, delayMs); } -}; // namespace android_audio_legacy +}; // namespace android_audio_legacy
\ No newline at end of file diff --git a/audio/AudioPolicyCompatClient.h b/audio/AudioPolicyCompatClient.h index 4feee37..fae0f45 100644..100755 --- a/audio/AudioPolicyCompatClient.h +++ b/audio/AudioPolicyCompatClient.h @@ -22,7 +22,7 @@ #include <hardware/audio_policy.h> #include <hardware_legacy/AudioSystemLegacy.h> -#include <hardware_legacy/AudioPolicyInterface.h> +#include <AudioPolicyInterface.h> /************************************/ /* FOR BACKWARDS COMPATIBILITY ONLY */ @@ -76,4 +76,4 @@ private: }; // namespace android_audio_legacy -#endif // ANDROID_AUDIOPOLICYCLIENTLEGACY_H +#endif // ANDROID_AUDIOPOLICYCLIENTLEGACY_H
\ No newline at end of file diff --git a/audio/AudioPolicyInterface.h b/audio/AudioPolicyInterface.h index 53d5319..9880fda 100755 --- a/audio/AudioPolicyInterface.h +++ b/audio/AudioPolicyInterface.h @@ -23,7 +23,7 @@ #include <hardware_legacy/AudioSystemLegacy.h> -namespace android_audio_legacy { +namespace android_audio_legacy { using android::Vector; using android::String8; using android::ToneGenerator; @@ -133,12 +133,11 @@ public: // retreive current volume index for the specified stream virtual status_t getStreamVolumeIndex(AudioSystem::stream_type stream, int *index) = 0; + virtual status_t dummyA(int) { return 0; }; + // return the strategy corresponding to a given stream type virtual uint32_t getStrategyForStream(AudioSystem::stream_type stream) = 0; - // return the enabled output devices for the given stream type - virtual uint32_t getDevicesForStream(AudioSystem::stream_type stream) = 0; - // Audio effect management virtual audio_io_handle_t getOutputForEffect(effect_descriptor_t *desc) = 0; virtual status_t registerEffect(effect_descriptor_t *desc, @@ -147,12 +146,15 @@ public: int session, int id) = 0; virtual status_t unregisterEffect(int id) = 0; + + //dump state + virtual status_t dump(int fd) = 0; + // return the enabled output devices for the given stream type + virtual uint32_t getDevicesForStream(AudioSystem::stream_type stream) = 0; virtual status_t setEffectEnabled(int id, bool enabled) = 0; virtual bool isStreamActive(int stream, uint32_t inPastMs = 0) const = 0; - //dump state - virtual status_t dump(int fd) = 0; }; @@ -236,4 +238,4 @@ extern "C" void destroyAudioPolicyManager(AudioPolicyInterface *interface); }; // namespace android -#endif // ANDROID_AUDIOPOLICYINTERFACE_H +#endif // ANDROID_AUDIOPOLICYINTERFACE_H
\ No newline at end of file diff --git a/audio/AudioPolicyInterfaceLegacy.h b/audio/AudioPolicyInterfaceLegacy.h index 3625323..a7493f4 100755 --- a/audio/AudioPolicyInterfaceLegacy.h +++ b/audio/AudioPolicyInterfaceLegacy.h @@ -133,6 +133,8 @@ public: // retreive current volume index for the specified stream virtual status_t getStreamVolumeIndex(AudioSystem::stream_type stream, int *index) = 0; + virtual status_t dummyA(int) { return 0; }; + // return the strategy corresponding to a given stream type virtual uint32_t getStrategyForStream(AudioSystem::stream_type stream) = 0; diff --git a/audio/AudioPolicyManagerBase.cpp b/audio/AudioPolicyManagerBase.cpp index db4487a..902f94c 100644..100755 --- a/audio/AudioPolicyManagerBase.cpp +++ b/audio/AudioPolicyManagerBase.cpp @@ -56,7 +56,7 @@ status_t AudioPolicyManagerBase::setEffectEnabled(int id, bool enabled) { ssize_t index = mEffects.indexOfKey(id); if (index < 0) { - LOGW("unregisterEffect() unknown effect ID %d", id); + LOGW("setEffectEnabled() unknown effect ID %d", id); return INVALID_OPERATION; } @@ -79,7 +79,7 @@ bool AudioPolicyManagerBase::isStreamActive(int stream, uint32_t inPastMs) const status_t AudioPolicyManagerBase::initCheck() { - return (mHardwareOutput == 0) ? NO_INIT : NO_ERROR; + return NO_ERROR; } uint32_t AudioPolicyManagerBase::getDevicesForStream(AudioSystem::stream_type stream) { @@ -87,6 +87,7 @@ uint32_t AudioPolicyManagerBase::getDevicesForStream(AudioSystem::stream_type st // By checking the range of stream before calling getStrategy, we avoid // getStrategy's behavior for invalid streams. getStrategy would do a LOGE // and then return STRATEGY_MEDIA, but we want to return the empty set. + if (stream < (AudioSystem::stream_type) 0 || stream >= AudioSystem::NUM_STREAM_TYPES) { devices = 0; } else { @@ -97,5 +98,4 @@ uint32_t AudioPolicyManagerBase::getDevicesForStream(AudioSystem::stream_type st } - -}; // namespace android +}; // namespace android
\ No newline at end of file diff --git a/audio/AudioPolicyManagerBase.h b/audio/AudioPolicyManagerBase.h index 0dd1af3..f501871 100755 --- a/audio/AudioPolicyManagerBase.h +++ b/audio/AudioPolicyManagerBase.h @@ -390,4 +390,4 @@ private: int indexInUi); }; -}; +};
\ No newline at end of file diff --git a/audio/AudioPolicyManagerDefault.cpp b/audio/AudioPolicyManagerDefault.cpp index cc56047..78bf5d8 100644..100755 --- a/audio/AudioPolicyManagerDefault.cpp +++ b/audio/AudioPolicyManagerDefault.cpp @@ -32,4 +32,4 @@ extern "C" void destroyAudioPolicyManager(AudioPolicyInterface *interface) delete interface; } -}; // namespace android +}; // namespace android
\ No newline at end of file diff --git a/audio/AudioPolicyManagerDefault.h b/audio/AudioPolicyManagerDefault.h index 86627f0..949070d 100644..100755 --- a/audio/AudioPolicyManagerDefault.h +++ b/audio/AudioPolicyManagerDefault.h @@ -40,4 +40,4 @@ protected: #endif }; -}; +};
\ No newline at end of file diff --git a/audio/AudioSystem.h b/audio/AudioSystem.h index bd75a73..03aab8c 100644..100755 --- a/audio/AudioSystem.h +++ b/audio/AudioSystem.h @@ -559,4 +559,4 @@ private: }; // namespace android -#endif /*ANDROID_AUDIOSYSTEM_H_*/ +#endif /*ANDROID_AUDIOSYSTEM_H_*/
\ No newline at end of file diff --git a/audio/audio_policy_hal.cpp b/audio/audio_policy_hal.cpp index d5f2816..c9ba0bc 100644..100755 --- a/audio/audio_policy_hal.cpp +++ b/audio/audio_policy_hal.cpp @@ -24,7 +24,7 @@ #include <system/audio_policy.h> #include <hardware/audio_policy.h> -#include <hardware_legacy/AudioPolicyInterface.h> +#include <AudioPolicyInterface.h> #include <hardware_legacy/AudioSystemLegacy.h> #include "AudioPolicyCompatClient.h" @@ -144,7 +144,7 @@ static audio_io_handle_t ap_get_output(struct audio_policy *pol, LOGV("%s: tid %d", __func__, gettid()); return lap->apm->getOutput((AudioSystem::stream_type)stream, - sampling_rate, format, channels, + sampling_rate, format, channels << 2, (AudioSystem::output_flags)flags); } @@ -152,6 +152,7 @@ static int ap_start_output(struct audio_policy *pol, audio_io_handle_t output, audio_stream_type_t stream, int session) { struct legacy_audio_policy *lap = to_lap(pol); + LOGV("%s: tid %d", __func__, gettid()); return lap->apm->startOutput(output, (AudioSystem::stream_type)stream, session); } @@ -423,4 +424,4 @@ struct legacy_ap_module HAL_MODULE_INFO_SYM = { }; // extern "C" -}; // namespace android_audio_legacy +}; // namespace android_audio_legacy
\ No newline at end of file |