Skip to content

Commit

Permalink
hdmi_in_test: Add support for Android
Browse files Browse the repository at this point in the history
Add support for Android make file.
Fixed compiler warnings.

Change-Id: I7781cc16dc35f9b3498d02a3f60763cdd59b7e6f
  • Loading branch information
Varun Balaraj authored and Garmond Leung committed Sep 5, 2017
1 parent d0ec32e commit 7064334
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 4 deletions.
6 changes: 5 additions & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
SUBDIRS = hal post_proc

if QAHW_SUPPORT
SUBDIRS += qahw_api qahw_api/test hdmi_in_test
SUBDIRS += qahw_api qahw_api/test
endif

if AUDIO_HW_LOOPBACK
SUBDIRS += hdmi_in_test
endif

ACLOCAL_AMFLAGS = -I m4
15 changes: 15 additions & 0 deletions hdmi_in_test/Android.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)

LOCAL_MODULE := hdmi_in_test
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_OWNER := qti

LOCAL_SRC_FILES := \
src/hdmi_in_event_test.c

LOCAL_SHARED_LIBRARIES := \
liblog \
libcutils

include $(BUILD_EXECUTABLE)
7 changes: 4 additions & 3 deletions hdmi_in_test/src/hdmi_in_event_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
#include <poll.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <sys/prctl.h>
#include <sys/stat.h>
#include <sys/socket.h>
Expand Down Expand Up @@ -124,9 +125,9 @@ void get_hdmi_status()
read_data_from_fd(hdmi_in_audio_channel_sys_path, &hdmi_num_channels);

ALOGI("HDMI In state: %d, audio_state: %d, audio_format: %d,",
hdmi_conn_state, hdmi_audio_state, hdmi_audio_format);
hdmi_conn_state, hdmi_audio_state, hdmi_audio_format);
ALOGI(" hdmi_sample_rate: %d, hdmi_num_channels: %d\n",
hdmi_sample_rate, hdmi_num_channels);
hdmi_sample_rate, hdmi_num_channels);
}

int poll_event_init()
Expand Down Expand Up @@ -157,7 +158,7 @@ int poll_event_init()
return (soc > 0);
}

void listen_uevent(void *ptr)
void listen_uevent(void *ptr __unused)
{
char buffer[64*1024];
struct pollfd fds;
Expand Down

0 comments on commit 7064334

Please sign in to comment.