diff options
author | Dmitry Shmidt <dimitrysh@google.com> | 2017-11-29 13:23:01 -0800 |
---|---|---|
committer | Dmitry Shmidt <dimitrysh@google.com> | 2017-11-29 13:23:01 -0800 |
commit | 6b34f04153d750c98ef1c66a272276f2cb8bf384 (patch) | |
tree | 17eefcc42d205bef45b3a3775a98c0359590a866 | |
parent | e45c7db22fd8a314285ee76d2bc10224e5dc0082 (diff) | |
download | hikey-6b34f04153d750c98ef1c66a272276f2cb8bf384.tar.gz |
hikey: audio: Clean up warnings
Change-Id: I3e0b49688a6ab709d3619d6e79ed9ac94448fc76
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
-rw-r--r-- | audio/audio_hw.c | 16 |
1 files changed, 5 insertions, 11 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; |