Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 0 additions & 23 deletions Android.mk

This file was deleted.

50 changes: 50 additions & 0 deletions common/Android.bp
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
//
// Copyright (c) 2009-2018, Intel Corporation
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
// OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
// OTHER DEALINGS IN THE SOFTWARE.

cc_library_static {
name: "libhdcpcommon",

cppflags: [
"-DANDROID",
"-DANDROID_VERSION=800",
"-DLOG_TAG=\"HDCPCOMMON\"",
] + ["-DLOG_CONSOLE"] + ["-Wno-error"], // LOG_CONSOLE will print ALOGI, ALOGE, ALOGW in Android. Enable on debug build

include_dirs: [
"hardware/intel/external/media/hdcp/sdk",
"hardware/intel/external/media/hdcp/common",
],

shared_libs: [
"libutils",
"liblog",
],

srcs: [
"clientsock.cpp",
"gensock.cpp",
"servsock.cpp",
"socketdata.cpp",
],

proprietary: true,

}
73 changes: 0 additions & 73 deletions common/Android.mk

This file was deleted.

63 changes: 63 additions & 0 deletions daemon/Android.bp
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
//
// Copyright (c) 2009-2018, Intel Corporation
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
// OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
// OTHER DEALINGS IN THE SOFTWARE.

cc_binary {
name: "hdcpd",

cppflags: [
"-DANDROID",
"-DUSES_HDCP_HWCOMPOSER",
"-DANDROID_VERSION=800",
"-DLOG_TAG=\"HDCPD\"",
] + ["-DLOG_CONSOLE"] + [ // LOG_CONSOLE will print ALOGI, ALOGE, ALOGW in Android. Enable on debug build
"-Wno-unused-parameter",
"-Wno-error",
],

shared_libs: [
"libutils",
"libbinder",
"liblog",
"libcrypto",
"libdrm",
"libssl",
"libhwcservice",
],

static_libs: ["libhdcpcommon"],

srcs: [
"main.cpp",
"daemon.cpp",
"port.cpp",
//"srm.cpp",
"portmanager.cpp",
"portmanager_android.cpp",
],

include_dirs: ["."] + [
"hardware/intel/external/media/hdcp/sdk",
"hardware/intel/external/media/hdcp/common",
],

proprietary: true,

}
84 changes: 0 additions & 84 deletions daemon/Android.mk

This file was deleted.

10 changes: 6 additions & 4 deletions daemon/daemon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ void HdcpDaemon::DispatchCommand(
sendResponse = false;
}
break;

#if HDCP_SRM
case HDCP_API_SENDSRMDATA:
HDCP_NORMALMESSAGE("Daemon received 'SendSrmData' request");
SendSRMData(data, appId);
Expand All @@ -188,7 +188,7 @@ void HdcpDaemon::DispatchCommand(
HDCP_NORMALMESSAGE("Daemon received 'GetSrmVersion' request");
GetSRMVersion(data);
break;

#endif
case HDCP_API_CONFIG:
HDCP_NORMALMESSAGE("Daemon received 'Config' request");
Config(data);
Expand Down Expand Up @@ -500,6 +500,7 @@ void HdcpDaemon::GetKsvList(SocketData& data, uint32_t appId)
HDCP_FUNCTION_EXIT(SUCCESS);
}

#if HDCP_SRM
void HdcpDaemon::SendSRMData(SocketData& data, uint32_t appId)
{
HDCP_FUNCTION_ENTER;
Expand Down Expand Up @@ -590,18 +591,19 @@ void HdcpDaemon::GetSRMVersion(SocketData& data)

HDCP_FUNCTION_EXIT(SUCCESS);
}
#endif

void HdcpDaemon::Config(SocketData& data)
{
HDCP_FUNCTION_ENTER;

#if HDCP_SRM
int32_t sts = SrmConfig(data.Config.disableSrmStorage);
if (SUCCESS != sts)
{
data.Status = HDCP_STATUS_ERROR_INTERNAL;
return;
}

#endif
data.Status = HDCP_STATUS_SUCCESSFUL;

HDCP_FUNCTION_EXIT(SUCCESS);
Expand Down
1 change: 1 addition & 0 deletions daemon/daemon.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
#include "socketdata.h"

#define APP_ID_INTERNAL 0
#define HDCP_SRM 0

#ifdef ANDROID
#define HDCP_PIDFILE "/data/hdcp/hdcpd.pid"
Expand Down
5 changes: 4 additions & 1 deletion daemon/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,14 +156,15 @@ int32_t InitializeWithMinimalPrivileges()
int32_t ret = 1;
HdcpDaemon daemon;

#if HDCP_SRM
ret = SrmInit();
if (SUCCESS != ret)
{
ret = 1;
HDCP_ASSERTMESSAGE("SrmInit failed, destroying the daemon.");
goto out;
}

#endif
ret = PortManagerInit(daemon);
if (SUCCESS != ret)
{
Expand Down Expand Up @@ -193,7 +194,9 @@ int32_t InitializeWithMinimalPrivileges()

out:
PortManagerRelease();
#if HDCP_SRM
SrmRelease();
#endif

HDCP_FUNCTION_EXIT(ret);
return ret;
Expand Down
Loading