Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 665bd0da authored by Steve Kondik's avatar Steve Kondik Committed by Gerrit Code Review
Browse files

Merge "Implement hack to enable audio thru docks on Motorola phones" into ics

parents 47bab4d2 f08de588
Loading
Loading
Loading
Loading
+4 −0
Original line number Original line Diff line number Diff line
@@ -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)
+14 −0
Original line number Original line Diff line number Diff line
@@ -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