forked from CyanogenMod/android_device_samsung_i9300
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
37 changed files
with
4,898 additions
and
1,290 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Copyright (C) 2008 The Android Open Source Project | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
LOCAL_PATH:= $(call my-dir) | ||
|
||
# | ||
# libTVOut | ||
# | ||
|
||
include $(CLEAR_VARS) | ||
LOCAL_MODULE_TAGS := optional | ||
LOCAL_PRELINK_MODULE := false | ||
|
||
LOCAL_SRC_FILES := \ | ||
SecTVOutService.cpp \ | ||
MessageQueue.cpp \ | ||
main.cpp | ||
# ISecTVOut.cpp \ | ||
LOCAL_C_INCLUDES := \ | ||
|
||
LOCAL_SHARED_LIBRARIES := \ | ||
libbinder \ | ||
libutils \ | ||
libcutils | ||
|
||
LOCAL_MODULE := TVOutDummy | ||
include $(BUILD_EXECUTABLE) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
/* | ||
* Copyright (C) 2007 The Android Open Source Project | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
#ifndef ANDROID_BARRIER_H | ||
#define ANDROID_BARRIER_H | ||
|
||
#include <stdint.h> | ||
#include <sys/types.h> | ||
#include <utils/threads.h> | ||
|
||
namespace android { | ||
|
||
class Barrier | ||
{ | ||
public: | ||
inline Barrier() : state(CLOSED) { } | ||
inline ~Barrier() { } | ||
void open() { | ||
Mutex::Autolock _l(lock); | ||
state = OPENED; | ||
cv.broadcast(); | ||
} | ||
void close() { | ||
Mutex::Autolock _l(lock); | ||
state = CLOSED; | ||
} | ||
void wait() const { | ||
Mutex::Autolock _l(lock); | ||
while (state == CLOSED) { | ||
cv.wait(lock); | ||
} | ||
} | ||
private: | ||
enum { OPENED, CLOSED }; | ||
mutable Mutex lock; | ||
mutable Condition cv; | ||
volatile int state; | ||
}; | ||
|
||
}; // namespace android | ||
|
||
#endif // ANDROID_BARRIER_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
/* | ||
** | ||
** Copyright 2008, The Android Open Source Project | ||
** Copyright 2010, Samsung Electronics Co. LTD | ||
** | ||
** Licensed under the Apache License, Version 2.0 (the "License"); | ||
** you may not use this file except in compliance with the License. | ||
** You may obtain a copy of the License at | ||
** | ||
** http://www.apache.org/licenses/LICENSE-2.0 | ||
** | ||
** Unless required by applicable law or agreed to in writing, software | ||
** distributed under the License is distributed on an "AS IS" BASIS, | ||
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
** See the License for the specific language governing permissions and | ||
** limitations under the License. | ||
*/ | ||
|
||
/* | ||
** | ||
** @author Taikyung, Yu([email protected]) | ||
** @date 2011-07-06 | ||
*/ | ||
|
||
#include <stdint.h> | ||
#include <sys/types.h> | ||
#include <binder/Parcel.h> | ||
#include <utils/Log.h> | ||
#include "ISecTVOut.h" | ||
|
||
namespace android { | ||
|
||
enum { | ||
SET_HDMI_STATUS = IBinder::FIRST_CALL_TRANSACTION, | ||
SET_HDMI_MODE, | ||
SET_HDMI_RESOLUTION, | ||
SET_HDMI_HDCP, | ||
SET_HDMI_ROTATE, | ||
SET_HDMI_HWCLAYER, | ||
BLIT_2_HDMI | ||
}; | ||
|
||
void BpSecTVOut::setHdmiCableStatus(uint32_t status) | ||
{ | ||
Parcel data, reply; | ||
data.writeInt32(status); | ||
remote()->transact(SET_HDMI_STATUS, data, &reply); | ||
} | ||
|
||
void BpSecTVOut::setHdmiMode(uint32_t mode) | ||
{ | ||
Parcel data, reply; | ||
data.writeInt32(mode); | ||
remote()->transact(SET_HDMI_MODE, data, &reply); | ||
} | ||
|
||
void BpSecTVOut::setHdmiResolution(uint32_t resolution) | ||
{ | ||
Parcel data, reply; | ||
data.writeInt32(resolution); | ||
remote()->transact(SET_HDMI_RESOLUTION, data, &reply); | ||
} | ||
|
||
void BpSecTVOut::setHdmiHdcp(uint32_t resolution) | ||
{ | ||
Parcel data, reply; | ||
data.writeInt32(resolution); | ||
remote()->transact(SET_HDMI_HDCP, data, &reply); | ||
} | ||
|
||
void BpSecTVOut::setHdmiRotate(uint32_t rotVal, uint32_t hwcLayer) | ||
{ | ||
Parcel data, reply; | ||
data.writeInt32(rotVal); | ||
data.writeInt32(hwcLayer); | ||
remote()->transact(SET_HDMI_ROTATE, data, &reply); | ||
} | ||
|
||
void BpSecTVOut::setHdmiHwcLayer(uint32_t hwcLayer) | ||
{ | ||
Parcel data, reply; | ||
data.writeInt32(hwcLayer); | ||
remote()->transact(SET_HDMI_HWCLAYER, data, &reply); | ||
} | ||
|
||
void BpSecTVOut::blit2Hdmi(uint32_t w, uint32_t h, | ||
uint32_t colorFormat, | ||
uint32_t physYAddr, | ||
uint32_t physCbAddr, | ||
uint32_t physCrAddr, | ||
uint32_t dstX, | ||
uint32_t dstY, | ||
uint32_t hdmiLayer, | ||
uint32_t num_of_hwc_layer) | ||
{ | ||
Parcel data, reply; | ||
data.writeInt32(w); | ||
data.writeInt32(h); | ||
data.writeInt32(colorFormat); | ||
data.writeInt32(physYAddr); | ||
data.writeInt32(physCbAddr); | ||
data.writeInt32(physCrAddr); | ||
data.writeInt32(dstX); | ||
data.writeInt32(dstY); | ||
data.writeInt32(hdmiLayer); | ||
data.writeInt32(num_of_hwc_layer); | ||
remote()->transact(BLIT_2_HDMI, data, &reply); | ||
} | ||
|
||
IMPLEMENT_META_INTERFACE(SecTVOut, "android.os.ISecTVOut"); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
/* | ||
** | ||
** Copyright 2008, The Android Open Source Project | ||
** Copyright 2010, Samsung Electronics Co. LTD | ||
** | ||
** Licensed under the Apache License, Version 2.0 (the "License"); | ||
** you may not use this file except in compliance with the License. | ||
** You may obtain a copy of the License at | ||
** | ||
** http://www.apache.org/licenses/LICENSE-2.0 | ||
** | ||
** Unless required by applicable law or agreed to in writing, software | ||
** distributed under the License is distributed on an "AS IS" BASIS, | ||
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
** See the License for the specific language governing permissions and | ||
** limitations under the License. | ||
*/ | ||
|
||
/* | ||
** | ||
** @author Taikyung, Yu([email protected]) | ||
** @date 2011-07-06 | ||
*/ | ||
|
||
#ifndef ISECTVOUT_H | ||
#define ISECTVOUT_H | ||
#include <utils/RefBase.h> | ||
#include <binder/IInterface.h> | ||
#include <binder/Parcel.h> | ||
|
||
namespace android { | ||
class ISecTVOut: public IInterface | ||
{ | ||
public: | ||
DECLARE_META_INTERFACE(SecTVOut); | ||
virtual void setHdmiCableStatus(uint32_t status) = 0; | ||
virtual void setHdmiMode(uint32_t mode) = 0; | ||
virtual void setHdmiResolution(uint32_t resolution) = 0; | ||
virtual void setHdmiHdcp(uint32_t enHdcp) = 0; | ||
virtual void setHdmiRotate(uint32_t rotVal, uint32_t hwcLayer) = 0; | ||
virtual void setHdmiHwcLayer(uint32_t hwcLayer) = 0; | ||
virtual void blit2Hdmi(uint32_t w, uint32_t h, | ||
uint32_t colorFormat, | ||
uint32_t physYAddr, | ||
uint32_t physCbAddr, | ||
uint32_t physCrAddr, | ||
uint32_t dstX, | ||
uint32_t dstY, | ||
uint32_t hdmiLayer, | ||
uint32_t num_of_hwc_layer) = 0; | ||
}; | ||
//-------------------------------------------------------------- | ||
class BpSecTVOut: public BpInterface<ISecTVOut> | ||
{ | ||
public: | ||
BpSecTVOut(const sp<IBinder>& impl): BpInterface<ISecTVOut>(impl){} | ||
virtual void setHdmiCableStatus(uint32_t status); | ||
virtual void setHdmiMode(uint32_t mode); | ||
virtual void setHdmiResolution(uint32_t resolution); | ||
virtual void setHdmiHdcp(uint32_t enHdcp); | ||
virtual void setHdmiRotate(uint32_t rotVal, uint32_t hwcLayer); | ||
virtual void setHdmiHwcLayer(uint32_t hwcLayer); | ||
virtual void blit2Hdmi(uint32_t w, uint32_t h, | ||
uint32_t colorFormat, | ||
uint32_t physYAddr, | ||
uint32_t physCbAddr, | ||
uint32_t physCrAddr, | ||
uint32_t dstX, | ||
uint32_t dstY, | ||
uint32_t hdmiLayer, | ||
uint32_t num_of_hwc_layer); | ||
}; | ||
}; | ||
#endif |
Oops, something went wrong.