diff options
Diffstat (limited to 'hal/audio_hw.c')
-rw-r--r-- | hal/audio_hw.c | 22 |
1 files changed, 4 insertions, 18 deletions
diff --git a/hal/audio_hw.c b/hal/audio_hw.c index 3bd4a1f6..10ed1a63 100644 --- a/hal/audio_hw.c +++ b/hal/audio_hw.c @@ -254,8 +254,6 @@ static struct audio_device *adev = NULL; static pthread_mutex_t adev_init_lock; static unsigned int audio_device_ref_count; -static int set_voice_volume_l(struct audio_device *adev, float volume); - static amplifier_device_t * get_amplifier_device(void) { if (adev) @@ -934,7 +932,6 @@ int select_devices(struct audio_device *adev, audio_usecase_t uc_id) struct audio_usecase *voip_usecase = NULL; struct audio_usecase *hfp_usecase = NULL; audio_usecase_t hfp_ucid; - struct listnode *node; int status = 0; usecase = get_usecase_from_list(adev, uc_id); @@ -1124,7 +1121,7 @@ int select_devices(struct audio_device *adev, audio_usecase_t uc_id) static int stop_input_stream(struct stream_in *in) { - int i, ret = 0; + int ret = 0; struct audio_usecase *uc_info; struct audio_device *adev = in->dev; @@ -1591,7 +1588,7 @@ static int check_and_set_hdmi_channels(struct audio_device *adev, static int stop_output_stream(struct stream_out *out) { - int i, ret = 0; + int ret = 0; struct audio_usecase *uc_info; struct audio_device *adev = out->dev; @@ -2029,12 +2026,9 @@ static int out_set_parameters(struct audio_stream *stream, const char *kvpairs) { struct stream_out *out = (struct stream_out *)stream; struct audio_device *adev = out->dev; - struct audio_usecase *usecase; - struct listnode *node; struct str_parms *parms; char value[32]; int ret = 0, val = 0, err; - bool select_new_device = false; ALOGD("%s: enter: usecase(%d: %s) kvpairs: %s", __func__, out->usecase, use_case_table[out->usecase], kvpairs); @@ -2719,7 +2713,6 @@ static int in_set_parameters(struct audio_stream *stream, const char *kvpairs) struct stream_in *in = (struct stream_in *)stream; struct audio_device *adev = in->dev; struct str_parms *parms; - char *str; char value[32]; int ret = 0, val = 0, err; @@ -2762,7 +2755,6 @@ static int in_set_parameters(struct audio_stream *stream, const char *kvpairs) } } -done: pthread_mutex_unlock(&adev->lock); pthread_mutex_unlock(&in->lock); @@ -2778,7 +2770,6 @@ static char* in_get_parameters(const struct audio_stream *stream, struct stream_in *in = (struct stream_in *)stream; struct str_parms *query = str_parms_create_str(keys); char *str; - char value[256]; struct str_parms *reply = str_parms_create(); if (!query || !reply) { @@ -2815,7 +2806,7 @@ static ssize_t in_read(struct audio_stream_in *stream, void *buffer, { struct stream_in *in = (struct stream_in *)stream; struct audio_device *adev = in->dev; - int i, ret = -1; + int ret = -1; int snd_scard_state = get_snd_card_state(adev); lock_input_stream(in); @@ -2977,7 +2968,7 @@ static int adev_open_output_stream(struct audio_hw_device *dev, { struct audio_device *adev = (struct audio_device *)dev; struct stream_out *out; - int i, ret = 0; + int ret = 0; audio_format_t format; *stream_out = NULL; @@ -3379,7 +3370,6 @@ static int adev_set_parameters(struct audio_hw_device *dev, const char *kvpairs) { struct audio_device *adev = (struct audio_device *)dev; struct str_parms *parms; - char *str; char value[32]; int val; int ret; @@ -3394,8 +3384,6 @@ static int adev_set_parameters(struct audio_hw_device *dev, const char *kvpairs) if (ret >= 0) { char *snd_card_status = value+2; if (strstr(snd_card_status, "OFFLINE")) { - struct listnode *node; - struct audio_usecase *usecase; ALOGD("Received sound card OFFLINE status"); set_snd_card_state(adev,SND_CARD_STATE_OFFLINE); //close compress sessions on OFFLINE status @@ -3880,8 +3868,6 @@ static int period_size_is_plausible_for_low_latency(int period_size) static int adev_open(const hw_module_t *module, const char *name, hw_device_t **device) { - int i, ret; - ALOGD("%s: enter", __func__); if (strcmp(name, AUDIO_HARDWARE_INTERFACE) != 0) return -EINVAL; |