Skip to content

Commit

Permalink
jellybeaned
Browse files Browse the repository at this point in the history
  • Loading branch information
codeworkx committed Jul 22, 2012
1 parent 44378b7 commit d302101
Show file tree
Hide file tree
Showing 37 changed files with 4,898 additions and 1,290 deletions.
14 changes: 5 additions & 9 deletions 80cfw
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,8 @@
# Copy camera firmware to /data/cfw
#

if [ ! -f /data/cfw/SlimISP_GD.bin ];
then
busybox cp /system/vendor/firmware/SlimISP_GD.bin /data/cfw/SlimISP_GD.bin
fi

if [ ! -f /data/cfw/SlimISP_ZD.bin ];
then
busybox cp /system/vendor/firmware/SlimISP_ZD.bin /data/cfw/SlimISP_ZD.bin
fi
busybox cp /system/vendor/firmware/SlimISP_GD.bin /data/cfw/SlimISP_GD.bin
busybox cp /system/vendor/firmware/SlimISP_ZD.bin /data/cfw/SlimISP_ZD.bin
busybox chown system /data/cfw/*
busybox chgrp media /data/cfw/*
busybox chmod 0775 /data/cfw/*
14 changes: 9 additions & 5 deletions BoardConfig.mk
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,14 @@ TARGET_ARCH_VARIANT_CPU := cortex-a9
ARCH_ARM_HAVE_NEON := true
ARCH_ARM_HAVE_TLS_REGISTER := true
EXYNOS4X12_ENHANCEMENTS := true
EXYNOS4_ENHANCEMENTS := true

ifdef EXYNOS4X12_ENHANCEMENTS
COMMON_GLOBAL_CFLAGS += -DEXYNOS4210_ENHANCEMENTS
COMMON_GLOBAL_CFLAGS += -DEXYNOS4X12_ENHANCEMENTS
COMMON_GLOBAL_CFLAGS += -DEXYNOS4_ENHANCEMENTS
COMMON_GLOBAL_CFLAGS += -DSURFACEFLINGER_FORCE_SCREEN_RELEASE
COMMON_GLOBAL_CFLAGS += -DDISABLE_HW_ID_MATCH_CHECK
endif

TARGET_BOARD_PLATFORM := exynos4
Expand Down Expand Up @@ -76,12 +79,13 @@ COMMON_GLOBAL_CFLAGS += -DSEC_HWJPEG_G2D
ENABLE_WEBGL := true

# Audio
BOARD_USE_SAMSUNG_SEPARATEDSTREAM := true
BOARD_USES_LIBMEDIA_WITH_AUDIOPARAMETER := true

# HWComposer
BOARD_USES_HWCOMPOSER := true
BOARD_USE_SECTVOUT := true
BOARD_USES_FIMGAPI := true
#BOARD_USES_HWCOMPOSER := true
#BOARD_USE_SECTVOUT := true
#BOARD_USES_FIMGAPI := true
#BOARD_USES_HDMI_SUBTITLES := false
#BOARD_USES_HDMI := true
#BOARD_HDMI_STD := STD_1080P
Expand All @@ -93,8 +97,8 @@ COMMON_GLOBAL_CFLAGS += -DSAMSUNG_CAMERA_HARDWARE
# OMX
BOARD_HAVE_CODEC_SUPPORT := SAMSUNG_CODEC_SUPPORT
COMMON_GLOBAL_CFLAGS += -DSAMSUNG_CODEC_SUPPORT
#BOARD_USES_PROPRIETARY_OMX := SAMSUNG
#COMMON_GLOBAL_CFLAGS += -DSAMSUNG_OMX
BOARD_USES_PROPRIETARY_OMX := SAMSUNG
COMMON_GLOBAL_CFLAGS += -DSAMSUNG_OMX
BOARD_NONBLOCK_MODE_PROCESS := true
BOARD_USE_STOREMETADATA := true
BOARD_USE_METADATABUFFERTYPE := true
Expand Down
40 changes: 40 additions & 0 deletions TVOutDummy/Android.mk
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)

55 changes: 55 additions & 0 deletions TVOutDummy/Barrier.h
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
111 changes: 111 additions & 0 deletions TVOutDummy/ISecTVOut.cpp
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");
};
74 changes: 74 additions & 0 deletions TVOutDummy/ISecTVOut.h
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
Loading

0 comments on commit d302101

Please sign in to comment.