summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--hardware.c16
-rw-r--r--include/hardware/audio.h211
-rw-r--r--include/hardware/audio_policy.h46
-rw-r--r--include/hardware/gralloc.h29
-rw-r--r--include/hardware/hardware.h16
-rw-r--r--include/hardware/hwcomposer.h5
-rw-r--r--include/hardware/hwcomposer_defs.h3
-rw-r--r--include/hardware/power.h19
-rw-r--r--modules/audio/audio_hw.c12
-rw-r--r--modules/audio/audio_policy.c4
10 files changed, 356 insertions, 5 deletions
diff --git a/hardware.c b/hardware.c
index 1f831cb..ce14fe3 100644
--- a/hardware.c
+++ b/hardware.c
@@ -89,11 +89,13 @@ static int load(const char *id,
}
/* Check that the id matches */
+#ifndef DISABLE_HW_ID_MATCH_CHECK
if (strcmp(id, hmi->id) != 0) {
ALOGE("load: id=%s != hmi->id=%s", id, hmi->id);
status = -EINVAL;
goto done;
}
+#endif /* DISABLE_HW_ID_MATCH_CHECK */
hmi->dso = handle;
@@ -126,6 +128,10 @@ int hw_get_module_by_class(const char *class_id, const char *inst,
char prop[PATH_MAX];
char path[PATH_MAX];
char name[PATH_MAX];
+#ifdef QCOM_HARDWARE
+ int is_mpq;
+ IS_TARGET_MPQ(is_mpq);
+#endif
if (inst)
snprintf(name, PATH_MAX, "%s.%s", class_id, inst);
@@ -149,6 +155,16 @@ int hw_get_module_by_class(const char *class_id, const char *inst,
HAL_LIBRARY_PATH2, name, prop);
if (access(path, R_OK) == 0) break;
+#ifdef QCOM_HARDWARE
+ if ((!strncmp(name, "audio.primary", 13) ||
+ !strncmp(name, "audio_policy", 12)) &&
+ (is_mpq) && (!strncmp(prop, "msm8960", 7)))
+ {
+ strlcpy(prop, "mpq8064", 8);
+ ALOGE("setting prop to mpq8064");
+ }
+#endif
+
snprintf(path, sizeof(path), "%s/%s.%s.so",
HAL_LIBRARY_PATH1, name, prop);
if (access(path, R_OK) == 0) break;
diff --git a/include/hardware/audio.h b/include/hardware/audio.h
index 3a0962e..6e02157 100644
--- a/include/hardware/audio.h
+++ b/include/hardware/audio.h
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2011 The Android Open Source Project
+ * Copyright (c) 2012, Code Aurora Forum. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -19,6 +20,7 @@
#define ANDROID_AUDIO_HAL_INTERFACE_H
#include <stdint.h>
+#include <string.h>
#include <strings.h>
#include <sys/cdefs.h>
#include <sys/types.h>
@@ -117,7 +119,20 @@ __BEGIN_DECLS
* "sup_sampling_rates=44100|48000" */
#define AUDIO_PARAMETER_STREAM_SUP_SAMPLING_RATES "sup_sampling_rates"
+/* Query handle fm parameter*/
+#define AUDIO_PARAMETER_KEY_HANDLE_FM "handle_fm"
+/* Query voip flag */
+#define AUDIO_PARAMETER_KEY_VOIP_CHECK "voip_flag"
+
+/* Query Fluence type */
+#define AUDIO_PARAMETER_KEY_FLUENCE_TYPE "fluence"
+
+/* Query if surround sound recording is supported */
+#define AUDIO_PARAMETER_KEY_SSR "ssr"
+
+/* Query if a2dp is supported */
+#define AUDIO_PARAMETER_KEY_HANDLE_A2DP_DEVICE "isA2dpDeviceSupported"
/**************************************/
/* common audio stream configuration parameters */
@@ -128,6 +143,9 @@ struct audio_config {
};
typedef struct audio_config audio_config_t;
+#ifdef QCOM_HARDWARE
+typedef struct buf_info;
+#endif
/* common audio stream parameters and operations */
struct audio_stream {
@@ -252,16 +270,101 @@ struct audio_stream_out {
int (*get_render_position)(const struct audio_stream_out *stream,
uint32_t *dsp_frames);
+#ifdef QCOM_HARDWARE
+ /**
+ * start audio data rendering
+ */
+ int (*start)(struct audio_stream_out *stream);
+
+ /**
+ * pause audio rendering
+ */
+ int (*pause)(struct audio_stream_out *stream);
+
+ /**
+ * flush audio data with driver
+ */
+ int (*flush)(struct audio_stream_out *stream);
+
+ /**
+ * stop audio data rendering
+ */
+ int (*stop)(struct audio_stream_out *stream);
+#endif
+
/**
* get the local time at which the next write to the audio driver will be presented.
* The units are microseconds, where the epoch is decided by the local audio HAL.
*/
int (*get_next_write_timestamp)(const struct audio_stream_out *stream,
int64_t *timestamp);
+#ifdef QCOM_HARDWARE
+ /**
+ * return the current timestamp after quering to the driver
+ */
+ int (*get_time_stamp)(const struct audio_stream_out *stream,
+ uint64_t *time_stamp);
+ /**
+ * EOS notification from HAL to Player
+ */
+ int (*set_observer)(const struct audio_stream_out *stream,
+ void *observer);
+ /**
+ * Get the physical address of the buffer allocated in the
+ * driver
+ */
+ int (*get_buffer_info) (const struct audio_stream_out *stream,
+ struct buf_info **buf);
+ /**
+ * Check if next buffer is available. Waits until next buffer is
+ * available
+ */
+ int (*is_buffer_available) (const struct audio_stream_out *stream,
+ int *isAvail);
+#endif
};
typedef struct audio_stream_out audio_stream_out_t;
+#ifdef QCOM_HARDWARE
+/**
+ * audio_broadcast_stream is the abstraction interface for the
+ * audio output hardware.
+ *
+ * It provides information about various properties of the audio output
+ * hardware driver.
+ */
+
+struct audio_broadcast_stream {
+ struct audio_stream common;
+
+ /**
+ * return the audio hardware driver latency in milli seconds.
+ */
+ uint32_t (*get_latency)(const struct audio_broadcast_stream *stream);
+
+ /**
+ * Use this method in situations where audio mixing is done in the
+ * hardware. This method serves as a direct interface with hardware,
+ * allowing you to directly set the volume as apposed to via the framework.
+ * This method might produce multiple PCM outputs or hardware accelerated
+ * codecs, such as MP3 or AAC.
+ */
+ int (*set_volume)(struct audio_broadcast_stream *stream, float left, float right);
+
+ int (*mute)(struct audio_broadcast_stream *stream, bool mute);
+
+ int (*start)(struct audio_broadcast_stream *stream, int64_t absTimeToStart);
+ /**
+ * write audio buffer to driver. Returns number of bytes written
+ */
+ ssize_t (*write)(struct audio_broadcast_stream *stream, const void* buffer,
+ size_t bytes, int64_t timestamp, int audioType);
+
+};
+typedef struct audio_broadcast_stream audio_broadcast_stream_t;
+#endif
+
struct audio_stream_in {
struct audio_stream common;
@@ -296,8 +399,46 @@ typedef struct audio_stream_in audio_stream_in_t;
static inline size_t audio_stream_frame_size(const struct audio_stream *s)
{
size_t chan_samp_sz;
+ uint32_t chan_mask = s->get_channels(s);
+ int format = s->get_format(s);
+ char *tmpparam;
+ int isParamEqual;
+
+#ifdef QCOM_HARDWARE
+ if (audio_is_input_channel(chan_mask)) {
+ chan_mask &= (AUDIO_CHANNEL_IN_STEREO | \
+ AUDIO_CHANNEL_IN_MONO );
+ }
+
+ tmpparam = s->get_parameters(s, "voip_flag");
+ isParamEqual = !strcmp(tmpparam,"voip_flag=1");
+ free(tmpparam);
+ if(isParamEqual) {
+ if(format != AUDIO_FORMAT_PCM_8_BIT)
+ return popcount(chan_mask) * sizeof(int16_t);
+ else
+ return popcount(chan_mask) * sizeof(int8_t);
+ }
+
+ if (audio_is_input_channel(chan_mask)) {
+ chan_mask &= (AUDIO_CHANNEL_IN_STEREO | \
+ AUDIO_CHANNEL_IN_MONO | \
+ AUDIO_CHANNEL_IN_5POINT1);
+ }
+#endif
- switch (s->get_format(s)) {
+ switch (format) {
+#ifdef QCOM_HARDWARE
+ case AUDIO_FORMAT_AMR_NB:
+ chan_samp_sz = 32;
+ break;
+ case AUDIO_FORMAT_EVRC:
+ chan_samp_sz = 23;
+ break;
+ case AUDIO_FORMAT_QCELP:
+ chan_samp_sz = 35;
+ break;
+#endif
case AUDIO_FORMAT_PCM_16_BIT:
chan_samp_sz = sizeof(int16_t);
break;
@@ -307,7 +448,7 @@ static inline size_t audio_stream_frame_size(const struct audio_stream *s)
break;
}
- return popcount(s->get_channels(s)) * chan_samp_sz;
+ return popcount(chan_mask) * chan_samp_sz;
}
@@ -355,6 +496,7 @@ struct audio_hw_device {
*/
int (*set_master_volume)(struct audio_hw_device *dev, float volume);
+#ifndef ICS_AUDIO_BLOB
/**
* Get the current master volume value for the HAL, if the HAL supports
* master volume control. AudioFlinger will query this value from the
@@ -363,6 +505,12 @@ struct audio_hw_device {
* this method may leave it set to NULL.
*/
int (*get_master_volume)(struct audio_hw_device *dev, float *volume);
+#endif
+
+#ifdef QCOM_FM_ENABLED
+ /** set the fm audio volume. Range is between 0.0 and 1.0 */
+ int (*set_fm_volume)(struct audio_hw_device *dev, float volume);
+#endif
/**
* set_mode is called when the audio mode changes. AUDIO_MODE_NORMAL mode
@@ -390,25 +538,65 @@ struct audio_hw_device {
* See also get_buffer_size which is for a particular stream.
*/
size_t (*get_input_buffer_size)(const struct audio_hw_device *dev,
+#ifndef ICS_AUDIO_BLOB
const struct audio_config *config);
+#else
+ uint32_t sample_rate, int format,
+ int channel_count);
+#endif
/** This method creates and opens the audio hardware output stream */
+#ifndef ICS_AUDIO_BLOB
int (*open_output_stream)(struct audio_hw_device *dev,
audio_io_handle_t handle,
audio_devices_t devices,
audio_output_flags_t flags,
struct audio_config *config,
struct audio_stream_out **stream_out);
+#else
+ int (*open_output_stream)(struct audio_hw_device *dev, uint32_t devices,
+ int *format, uint32_t *channels,
+ uint32_t *sample_rate,
+ struct audio_stream_out **out);
+#endif
+
+#ifdef QCOM_ICS_LPA_COMPAT
+ /** This method creates and opens the audio hardware output session */
+ int (*open_output_session)(struct audio_hw_device *dev, uint32_t devices,
+ int *format, int sessionId,
+ struct audio_stream_out **out);
+#endif
void (*close_output_stream)(struct audio_hw_device *dev,
struct audio_stream_out* stream_out);
+#ifdef QCOM_HARDWARE
+ /** This method creates and opens the audio hardware output
+ * for broadcast stream */
+ int (*open_broadcast_stream)(struct audio_hw_device *dev, uint32_t devices,
+ int format, uint32_t channels,
+ uint32_t sample_rate,
+ uint32_t audio_source,
+ struct audio_broadcast_stream **out);
+
+ void (*close_broadcast_stream)(struct audio_hw_device *dev,
+ struct audio_broadcast_stream *out);
+#endif
+
/** This method creates and opens the audio hardware input stream */
+#ifndef ICS_AUDIO_BLOB
int (*open_input_stream)(struct audio_hw_device *dev,
audio_io_handle_t handle,
audio_devices_t devices,
struct audio_config *config,
struct audio_stream_in **stream_in);
+#else
+ int (*open_input_stream)(struct audio_hw_device *dev, uint32_t devices,
+ int *format, uint32_t *channels,
+ uint32_t *sample_rate,
+ audio_in_acoustics_t acoustics,
+ struct audio_stream_in **stream_in);
+#endif
void (*close_input_stream)(struct audio_hw_device *dev,
struct audio_stream_in *stream_in);
@@ -447,7 +635,26 @@ static inline int audio_hw_device_close(struct audio_hw_device* device)
return device->common.close(&device->common);
}
+#ifdef QCOM_HARDWARE
+/** Structure to save buffer information for applying effects for
+ * LPA buffers */
+struct buf_info {
+ int bufsize;
+ int nBufs;
+ int **buffers;
+};
+#ifdef __cplusplus
+/**
+ *Observer class to post the Events from HAL to Flinger
+*/
+class AudioEventObserver {
+public:
+ virtual ~AudioEventObserver() {}
+ virtual void postEOS(int64_t delayUs) = 0;
+};
+#endif
+#endif
__END_DECLS
#endif // ANDROID_AUDIO_INTERFACE_H
diff --git a/include/hardware/audio_policy.h b/include/hardware/audio_policy.h
index 9e145f8..775573c 100644
--- a/include/hardware/audio_policy.h
+++ b/include/hardware/audio_policy.h
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2011 The Android Open Source Project
+ * Copyright (c) 2012, Code Aurora Forum. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -126,6 +127,30 @@ struct audio_policy {
* Audio routing query functions
*/
+#ifdef QCOM_ICS_LPA_COMPAT
+ /* request an session appropriate for playback of the supplied stream type and
+ * parameters */
+ audio_io_handle_t (*get_session)(struct audio_policy *pol,
+ audio_stream_type_t stream,
+ uint32_t format,
+ audio_output_flags_t flags,
+ int sessionId);
+
+ /* pause session created for LPA Playback */
+ void (*pause_session)(struct audio_policy *pol,
+ audio_io_handle_t output,
+ audio_stream_type_t stream);
+
+ /* resume session created for LPA Playback */
+ void (*resume_session)(struct audio_policy *pol,
+ audio_io_handle_t output,
+ audio_stream_type_t stream);
+
+ /* release session created for LPA Playback */
+ void (*release_session)(struct audio_policy *pol,
+ audio_io_handle_t output);
+#endif
+
/* request an output appropriate for playback of the supplied stream type and
* parameters */
audio_io_handle_t (*get_output)(struct audio_policy *pol,
@@ -191,6 +216,7 @@ struct audio_policy {
audio_stream_type_t stream,
int *index);
+#ifndef ICS_AUDIO_BLOB
/* sets the new stream volume at a level corresponding to the supplied
* index for the specified device.
* The index is within the range specified by init_stream_volume() */
@@ -204,6 +230,7 @@ struct audio_policy {
audio_stream_type_t stream,
int *index,
audio_devices_t device);
+#endif
/* return the strategy corresponding to a given stream type */
uint32_t (*get_strategy_for_stream)(const struct audio_policy *pol,
@@ -268,6 +295,18 @@ struct audio_policy_service_ops {
uint32_t *pLatencyMs,
audio_output_flags_t flags);
+#ifdef QCOM_ICS_LPA_COMPAT
+ audio_io_handle_t (*open_session)(void *service,
+ uint32_t *pDevices,
+ uint32_t *pFormat,
+ audio_output_flags_t flags,
+ int32_t stream,
+ int32_t sessionId);
+
+ audio_io_handle_t (*close_session)(void *service,
+ audio_io_handle_t output);
+#endif
+
/* creates a special output that is duplicated to the two outputs passed as
* arguments. The duplication is performed by
* a special mixer thread in the AudioFlinger.
@@ -366,6 +405,13 @@ struct audio_policy_service_ops {
audio_io_handle_t src_output,
audio_io_handle_t dst_output);
+#ifdef QCOM_FM_ENABLED
+ /* set fm audio volume. */
+ int (*set_fm_volume)(void *service,
+ float volume,
+ int delay_ms);
+#endif
+
/* loads an audio hw module.
*
* The module name passed is the base name of the HW module library, e.g "primary" or "a2dp".
diff --git a/include/hardware/gralloc.h b/include/hardware/gralloc.h
index 7c819f0..f5e1b99 100644
--- a/include/hardware/gralloc.h
+++ b/include/hardware/gralloc.h
@@ -106,6 +106,16 @@ enum {
GRALLOC_USAGE_PRIVATE_2 = 0x40000000,
GRALLOC_USAGE_PRIVATE_3 = 0x80000000,
GRALLOC_USAGE_PRIVATE_MASK = 0xF0000000,
+
+#ifdef EXYNOS4_ENHANCEMENTS
+ /* SAMSUNG */
+ GRALLOC_USAGE_HW_FIMC1 = 0x01000000,
+ GRALLOC_USAGE_HW_ION = 0x02000000,
+ GRALLOC_USAGE_YUV_ADDR = 0x04000000,
+
+ /* SEC Private usage , for Overlay path at HWC */
+ GRALLOC_USAGE_HWC_HWOVERLAY = 0x20000000,
+#endif
};
/*****************************************************************************/
@@ -196,6 +206,10 @@ typedef struct gralloc_module_t {
int (*unlock)(struct gralloc_module_t const* module,
buffer_handle_t handle);
+#ifdef EXYNOS4_ENHANCEMENTS
+ int (*getphys) (struct gralloc_module_t const* module,
+ buffer_handle_t handle, void** paddr);
+#endif
/* reserved for future use */
int (*perform)(struct gralloc_module_t const* module,
@@ -215,6 +229,21 @@ typedef struct gralloc_module_t {
typedef struct alloc_device_t {
struct hw_device_t common;
+#ifdef QCOM_HARDWARE
+ /*
+ * (*allocSize)() Allocates a buffer in graphic memory with the requested
+ * bufferSize parameter and returns a buffer_handle_t and the stride in
+ * pixels to allow the implementation to satisfy hardware constraints on
+ * the width of a pixmap (eg: it may have to be multiple of 8 pixels).
+ * The CALLER TAKES OWNERSHIP of the buffer_handle_t.
+ *
+ * Returns 0 on success or -errno on error.
+ */
+ int (*allocSize)(struct alloc_device_t* dev,
+ int w, int h, int format, int usage,
+ buffer_handle_t* handle, int* stride, int bufferSize);
+#endif
+
/*
* (*alloc)() Allocates a buffer in graphic memory with the requested
* parameters and returns a buffer_handle_t and the stride in pixels to
diff --git a/include/hardware/hardware.h b/include/hardware/hardware.h
index 416ae39..37a5a15 100644
--- a/include/hardware/hardware.h
+++ b/include/hardware/hardware.h
@@ -33,7 +33,21 @@ __BEGIN_DECLS
#define HARDWARE_MODULE_TAG MAKE_TAG_CONSTANT('H', 'W', 'M', 'T')
#define HARDWARE_DEVICE_TAG MAKE_TAG_CONSTANT('H', 'W', 'D', 'T')
-
+#ifdef QCOM_HARDWARE
+#define IS_TARGET_MPQ(status) \
+{ \
+ int id = 0; \
+ FILE *fp; \
+ if ((fp = fopen("/sys/devices/system/soc/soc0/id", "r")) != NULL) { \
+ fscanf(fp, "%d", &id); \
+ fclose(fp); \
+ } \
+ if (id == 130) \
+ status = 1; \
+ else \
+ status = 0;\
+}
+#endif
#define HARDWARE_MAKE_API_VERSION(maj,min) \
((((maj) & 0xff) << 8) | ((min) & 0xff))
diff --git a/include/hardware/hwcomposer.h b/include/hardware/hwcomposer.h
index 0722e32..ac3aa42 100644
--- a/include/hardware/hwcomposer.h
+++ b/include/hardware/hwcomposer.h
@@ -128,6 +128,11 @@ typedef struct hwc_layer_1 {
/* transformation to apply to the buffer during composition */
uint32_t transform;
+#ifdef QCOM_HARDWARE
+ /* source transform of the buffer */
+ uint32_t sourceTransform;
+#endif
+
/* blending to apply during composition */
int32_t blending;
diff --git a/include/hardware/hwcomposer_defs.h b/include/hardware/hwcomposer_defs.h
index ef8fcf1..b23f08a 100644
--- a/include/hardware/hwcomposer_defs.h
+++ b/include/hardware/hwcomposer_defs.h
@@ -179,7 +179,8 @@ enum {
/* Allowed events for hwc_methods::eventControl() */
enum {
- HWC_EVENT_VSYNC = 0
+ HWC_EVENT_VSYNC = 0,
+ HWC_EVENT_ORIENTATION // To notify HWC about the device orientation
};
/* Display types and associated mask bits. */
diff --git a/include/hardware/power.h b/include/hardware/power.h
index 6c55061..b3724f0 100644
--- a/include/hardware/power.h
+++ b/include/hardware/power.h
@@ -41,6 +41,8 @@ __BEGIN_DECLS
typedef enum {
POWER_HINT_VSYNC = 0x00000001,
POWER_HINT_INTERACTION = 0x00000002,
+ POWER_HINT_VIDEO_ENCODE = 0x00000003,
+ POWER_HINT_CPU_BOOST = 0x00000004,
} power_hint_t;
/**
@@ -108,6 +110,23 @@ typedef struct power_module {
* and it may be appropriate to raise speeds of CPU, memory bus,
* etc. The data parameter is unused.
*
+ * POWER_HINT_VIDEO_ENCODE
+ *
+ * The user just started or stopped recording video. When encode
+ * begins, large writes to the SD card will be done and this may
+ * cause CPU frequency to increase. The data parameter is a string
+ * with semicolon-separated 'key:value' pairs. The most common key is
+ * 'state', which takes 0 or 1 as its value. For instance, To
+ * indicate that recording is beginning, the string "state:1" would
+ * need to be used. More keys can be provided depending on the data
+ * that is to be passed.
+ *
+ * POWER_HINT_CPU_BOOST
+ *
+ * An operation is happening where it would be ideal for the CPU to
+ * be boosted for a specific duration. The data parameter is an
+ * integer value of the boost duration in microseconds.
+ *
* A particular platform may choose to ignore any hint.
*
* availability: version 0.2
diff --git a/modules/audio/audio_hw.c b/modules/audio/audio_hw.c
index 3051519..b051cf9 100644
--- a/modules/audio/audio_hw.c
+++ b/modules/audio/audio_hw.c
@@ -126,11 +126,13 @@ static int out_remove_audio_effect(const struct audio_stream *stream, effect_han
return 0;
}
+#ifndef ICS_AUDIO_BLOB
static int out_get_next_write_timestamp(const struct audio_stream_out *stream,
int64_t *timestamp)
{
return -EINVAL;
}
+#endif
/** audio_stream_in implementation **/
static uint32_t in_get_sample_rate(const struct audio_stream *stream)
@@ -244,7 +246,9 @@ static int adev_open_output_stream(struct audio_hw_device *dev,
out->stream.set_volume = out_set_volume;
out->stream.write = out_write;
out->stream.get_render_position = out_get_render_position;
+#ifndef ICS_AUDIO_BLOB
out->stream.get_next_write_timestamp = out_get_next_write_timestamp;
+#endif
*stream_out = &out->stream;
return 0;
@@ -287,6 +291,7 @@ static int adev_set_master_volume(struct audio_hw_device *dev, float volume)
return -ENOSYS;
}
+#ifndef ICS_AUDIO_BLOB
static int adev_get_master_volume(struct audio_hw_device *dev, float *volume)
{
return -ENOSYS;
@@ -301,6 +306,7 @@ static int adev_get_master_mute(struct audio_hw_device *dev, bool *muted)
{
return -ENOSYS;
}
+#endif
static int adev_set_mode(struct audio_hw_device *dev, audio_mode_t mode)
{
@@ -400,18 +406,22 @@ static int adev_open(const hw_module_t* module, const char* name,
adev->device.init_check = adev_init_check;
adev->device.set_voice_volume = adev_set_voice_volume;
adev->device.set_master_volume = adev_set_master_volume;
+#ifndef ICS_AUDIO_BLOB
adev->device.get_master_volume = adev_get_master_volume;
adev->device.set_master_mute = adev_set_master_mute;
adev->device.get_master_mute = adev_get_master_mute;
+#endif
adev->device.set_mode = adev_set_mode;
adev->device.set_mic_mute = adev_set_mic_mute;
adev->device.get_mic_mute = adev_get_mic_mute;
adev->device.set_parameters = adev_set_parameters;
adev->device.get_parameters = adev_get_parameters;
+#ifndef ICS_AUDIO_BLOB
adev->device.get_input_buffer_size = adev_get_input_buffer_size;
adev->device.open_output_stream = adev_open_output_stream;
- adev->device.close_output_stream = adev_close_output_stream;
adev->device.open_input_stream = adev_open_input_stream;
+#endif
+ adev->device.close_output_stream = adev_close_output_stream;
adev->device.close_input_stream = adev_close_input_stream;
adev->device.dump = adev_dump;
diff --git a/modules/audio/audio_policy.c b/modules/audio/audio_policy.c
index 2dd3dbe..82aa449 100644
--- a/modules/audio/audio_policy.c
+++ b/modules/audio/audio_policy.c
@@ -164,6 +164,7 @@ static int ap_get_stream_volume_index(const struct audio_policy *pol,
return -ENOSYS;
}
+#ifndef ICS_AUDIO_BLOB
static int ap_set_stream_volume_index_for_device(struct audio_policy *pol,
audio_stream_type_t stream,
int index,
@@ -179,6 +180,7 @@ static int ap_get_stream_volume_index_for_device(const struct audio_policy *pol,
{
return -ENOSYS;
}
+#endif
static uint32_t ap_get_strategy_for_stream(const struct audio_policy *pol,
audio_stream_type_t stream)
@@ -267,8 +269,10 @@ static int create_default_ap(const struct audio_policy_device *device,
dap->policy.init_stream_volume = ap_init_stream_volume;
dap->policy.set_stream_volume_index = ap_set_stream_volume_index;
dap->policy.get_stream_volume_index = ap_get_stream_volume_index;
+#ifndef ICS_AUDIO_BLOB
dap->policy.set_stream_volume_index_for_device = ap_set_stream_volume_index_for_device;
dap->policy.get_stream_volume_index_for_device = ap_get_stream_volume_index_for_device;
+#endif
dap->policy.get_strategy_for_stream = ap_get_strategy_for_stream;
dap->policy.get_devices_for_stream = ap_get_devices_for_stream;
dap->policy.get_output_for_effect = ap_get_output_for_effect;