summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--audio/audio_hw.c16
-rw-r--r--device-common.mk3
2 files changed, 7 insertions, 12 deletions
diff --git a/audio/audio_hw.c b/audio/audio_hw.c
index 87fc4c6c..a62c3446 100644
--- a/audio/audio_hw.c
+++ b/audio/audio_hw.c
@@ -132,7 +132,6 @@ static int out_set_sample_rate(struct audio_stream *stream, uint32_t rate)
static size_t out_get_buffer_size(const struct audio_stream *stream)
{
ALOGV("out_get_buffer_size: %d", 4096);
- struct alsa_stream_out *out = (struct alsa_stream_out *)stream;
/* return the closest majoring multiple of 16 frames, as
* audioflinger expects audio buffers to be a multiple of 16 frames */
@@ -200,7 +199,6 @@ static int out_set_parameters(struct audio_stream *stream, const char *kvpairs)
struct alsa_stream_out *out = (struct alsa_stream_out *)stream;
struct alsa_audio_device *adev = out->dev;
struct str_parms *parms;
- char *str;
char value[32];
int ret, val = 0;
@@ -251,7 +249,6 @@ static ssize_t out_write(struct audio_stream_out *stream, const void* buffer,
struct alsa_audio_device *adev = out->dev;
size_t frame_size = audio_stream_out_frame_size(stream);
size_t out_frames = bytes / frame_size;
- int kernel_frames;
struct misc_io_pcm_buf_param pcmbuf;
/* acquiring hw device mutex systematically is useful if a low priority thread is waiting
@@ -589,7 +586,7 @@ static size_t adev_get_input_buffer_size(const struct audio_hw_device *dev,
return 320;
}
-static int adev_open_input_stream(struct audio_hw_device *dev,
+static int adev_open_input_stream(struct audio_hw_device __unused *dev,
audio_io_handle_t handle,
audio_devices_t devices,
struct audio_config *config,
@@ -598,11 +595,9 @@ static int adev_open_input_stream(struct audio_hw_device *dev,
const char *address __unused,
audio_source_t source __unused)
{
- ALOGV("adev_open_input_stream...");
-
- struct stub_audio_device *ladev = (struct stub_audio_device *)dev;
struct stub_stream_in *in;
- int ret;
+
+ ALOGV("adev_open_input_stream...");
in = (struct stub_stream_in *)calloc(1, sizeof(struct stub_stream_in));
if (!in)
@@ -655,10 +650,9 @@ static int adev_close(hw_device_t *device)
static int adev_open(const hw_module_t* module, const char* name,
hw_device_t** device)
{
- ALOGV("adev_open: %s", name);
-
struct alsa_audio_device *adev;
- int ret;
+
+ ALOGV("adev_open: %s", name);
if (strcmp(name, AUDIO_HARDWARE_INTERFACE) != 0)
return -EINVAL;
diff --git a/device-common.mk b/device-common.mk
index 03d88b32..3443b056 100644
--- a/device-common.mk
+++ b/device-common.mk
@@ -148,9 +148,10 @@ PRODUCT_PACKAGES += Launcher3
# Copy hardware config file(s)
PRODUCT_COPY_FILES += \
device/linaro/hikey/etc/permissions/android.hardware.screen.xml:system/etc/permissions/android.hardware.screen.xml \
- frameworks/native/data/etc/android.hardware.ethernet.xml:system/etc/permissions/android.hardware.ethernet.xml \
+ frameworks/native/data/etc/android.software.cts.xml:system/etc/permissions/android.software.cts.xml \
frameworks/native/data/etc/android.software.app_widgets.xml:system/etc/permissions/android.software.app_widgets.xml \
frameworks/native/data/etc/android.software.backup.xml:system/etc/permissions/android.software.backup.xml \
+ frameworks/native/data/etc/android.hardware.ethernet.xml:system/etc/permissions/android.hardware.ethernet.xml \
frameworks/native/data/etc/android.hardware.usb.accessory.xml:system/etc/permissions/android.hardware.usb.accessory.xml \
frameworks/native/data/etc/android.hardware.usb.host.xml:system/etc/permissions/android.hardware.usb.host.xml \
frameworks/native/data/etc/android.software.device_admin.xml:system/etc/permissions/android.software.device_admin.xml