summaryrefslogtreecommitdiff
authorTellen Yu <tellen.yu@amlogic.com>2016-10-09 10:20:39 (GMT)
committer Tellen Yu <tellen.yu@amlogic.com>2016-10-09 10:20:39 (GMT)
commit2a4846154c6c9a6e5303839444721d6c72568125 (patch)
treec7b7b860e82635cdb27f781251f6ab9b423d3178
parent77c4b9e4a1fc253ea8fd8a2a424825b18fbe64e9 (diff)
downloadaudio-2a4846154c6c9a6e5303839444721d6c72568125.zip
audio-2a4846154c6c9a6e5303839444721d6c72568125.tar.gz
audio-2a4846154c6c9a6e5303839444721d6c72568125.tar.bz2
64bit compatibility
Change-Id: Icb60e05d8ab9d7587096c7fe04a3ba58069c4642
Diffstat
-rw-r--r--audio_hw_profile.c3
-rw-r--r--audio_hw_profile.h6
-rw-r--r--audio_hw_utils.h2
-rw-r--r--audio_hwsync.h2
-rw-r--r--hdmi_audio_hw.c5
5 files changed, 17 insertions, 1 deletions
diff --git a/audio_hw_profile.c b/audio_hw_profile.c
index 4d52460..0b30d3c 100644
--- a/audio_hw_profile.c
+++ b/audio_hw_profile.c
@@ -12,6 +12,9 @@
#include <hardware/hardware.h>
#include <system/audio.h>
#include <hardware/audio.h>
+
+#include "audio_hw_utils.h"
+
#define LOG_TAG "audio_hw_hdmi"
/*
diff --git a/audio_hw_profile.h b/audio_hw_profile.h
index 1af6436..fe58eca 100644
--- a/audio_hw_profile.h
+++ b/audio_hw_profile.h
@@ -1,3 +1,9 @@
#ifndef _AUDIO_HW_PROFILE_H_
#define _AUDIO_HW_PROFILE_H_
+
+int get_external_card(int type);
+int get_aml_card();
+int get_spdif_port();
+char* get_hdmi_sink_cap(const char *keys);
+char* get_hdmi_arc_cap(unsigned *ad, int maxsize, const char *keys);
#endif \ No newline at end of file
diff --git a/audio_hw_utils.h b/audio_hw_utils.h
index 9145092..1585009 100644
--- a/audio_hw_utils.h
+++ b/audio_hw_utils.h
@@ -7,4 +7,6 @@ int mystrstr(char *mystr,char *substr) ;
void set_codec_type(int type);
int get_codec_type(int format);
int getprop_bool (const char *path);
+unsigned char codec_type_is_raw_data(int type);
+int mystrstr(char *mystr,char *substr);
#endif
diff --git a/audio_hwsync.h b/audio_hwsync.h
index f17144d..491ab7e 100644
--- a/audio_hwsync.h
+++ b/audio_hwsync.h
@@ -1,7 +1,6 @@
#ifndef _AUDIO_HWSYNC_H_
#define _AUDIO_HWSYNC_H_
-
#define TSYNC_FIRSTAPTS "/sys/class/tsync/firstapts"
#define TSYNC_PCRSCR "/sys/class/tsync/pts_pcrscr"
#define TSYNC_EVENT "/sys/class/tsync/event"
@@ -55,4 +54,5 @@ static inline uint32_t hwsync_header_get_size(uint8_t *header)
(((uint32_t)header[6]) << 8) |
((uint32_t)header[7]);
}
+
#endif
diff --git a/hdmi_audio_hw.c b/hdmi_audio_hw.c
index a3cbde3..c19a095 100644
--- a/hdmi_audio_hw.c
+++ b/hdmi_audio_hw.c
@@ -60,6 +60,9 @@
extern int aml_audio_hwsync_find_frame(struct aml_stream_out *out, const void *in_buffer, size_t in_bytes, uint64_t *cur_pts, int *outsize);
extern int spdifenc_write(const void *buffer, size_t numBytes);
extern uint64_t spdifenc_get_total();
+
+extern int spdifenc_init(struct pcm *mypcm);
+
struct pcm_config pcm_config_out = {
.channels = 2,
.rate = MM_FULL_POWER_SAMPLING_RATE,
@@ -82,6 +85,8 @@ static int adev_set_voice_volume(struct audio_hw_device *dev, float volume);
static int do_input_standby(struct aml_stream_in *in);
static int do_output_standby(struct aml_stream_out *out);
+extern void aml_audio_hwsync_clear_status(struct aml_stream_out *out);
+
static void select_output_device(struct aml_audio_device *adev)
{
LOGFUNC("%s(mode=%d, out_device=%#x)", __FUNCTION__, adev->mode,