Loading services/audioflinger/Android.mk +4 −0 Original line number Original line Diff line number Diff line Loading @@ -30,4 +30,8 @@ LOCAL_STATIC_LIBRARIES := \ LOCAL_MODULE:= libaudioflinger LOCAL_MODULE:= libaudioflinger ifeq ($(BOARD_USE_MOTO_DOCK_HACK),true) LOCAL_CFLAGS += -DMOTO_DOCK_HACK endif include $(BUILD_SHARED_LIBRARY) include $(BUILD_SHARED_LIBRARY) services/audioflinger/AudioFlinger.cpp +14 −0 Original line number Original line Diff line number Diff line Loading @@ -779,7 +779,21 @@ status_t AudioFlinger::setParameters(int ioHandle, const String8& keyValuePairs) mBtNrecIsOff = btNrecIsOff; mBtNrecIsOff = btNrecIsOff; } } } } #ifdef MOTO_DOCK_HACK String8 key = String8("DockState"); int device; if (NO_ERROR != param.getInt(key, device)) { LOGD("setParameters(): DockState not present"); return final_result; } else { /* We also need to pass routing=int */ ioHandle = 1; LOGD("setParameters(): DockState %d trick done!", device); } #else return final_result; return final_result; #endif } } // hold a strong ref on thread in case closeOutput() or closeInput() is called // hold a strong ref on thread in case closeOutput() or closeInput() is called Loading Loading
services/audioflinger/Android.mk +4 −0 Original line number Original line Diff line number Diff line Loading @@ -30,4 +30,8 @@ LOCAL_STATIC_LIBRARIES := \ LOCAL_MODULE:= libaudioflinger LOCAL_MODULE:= libaudioflinger ifeq ($(BOARD_USE_MOTO_DOCK_HACK),true) LOCAL_CFLAGS += -DMOTO_DOCK_HACK endif include $(BUILD_SHARED_LIBRARY) include $(BUILD_SHARED_LIBRARY)
services/audioflinger/AudioFlinger.cpp +14 −0 Original line number Original line Diff line number Diff line Loading @@ -779,7 +779,21 @@ status_t AudioFlinger::setParameters(int ioHandle, const String8& keyValuePairs) mBtNrecIsOff = btNrecIsOff; mBtNrecIsOff = btNrecIsOff; } } } } #ifdef MOTO_DOCK_HACK String8 key = String8("DockState"); int device; if (NO_ERROR != param.getInt(key, device)) { LOGD("setParameters(): DockState not present"); return final_result; } else { /* We also need to pass routing=int */ ioHandle = 1; LOGD("setParameters(): DockState %d trick done!", device); } #else return final_result; return final_result; #endif } } // hold a strong ref on thread in case closeOutput() or closeInput() is called // hold a strong ref on thread in case closeOutput() or closeInput() is called Loading