summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Kocialkowski <contact@paulk.fr>2013-05-18 20:43:35 +0200
committersakindia123 <sa6915@gmail.com>2013-05-25 17:47:37 +0100
commit487c86bd61fccd3449975ba496794269fe9f938e (patch)
tree95d387ab6e490305b3b3c836d2e8d5fcfafd3fa4
parent3f21abe3096e0182f47fd7e8348a93005f44e010 (diff)
downloaddevice_samsung_galaxys2-common-487c86bd61fccd3449975ba496794269fe9f938e.zip
device_samsung_galaxys2-common-487c86bd61fccd3449975ba496794269fe9f938e.tar.gz
device_samsung_galaxys2-common-487c86bd61fccd3449975ba496794269fe9f938e.tar.bz2
Mixer: Set the next elements routes when one failed
Signed-off-by: Paul Kocialkowski <contact@paulk.fr> Conflicts: tinyalsa_audio/mixer.c
-rw-r--r--tinyalsa_audio/mixer.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/tinyalsa_audio/mixer.c b/tinyalsa_audio/mixer.c
index e8742c6..a3daaa2 100644
--- a/tinyalsa_audio/mixer.c
+++ b/tinyalsa_audio/mixer.c
@@ -518,7 +518,7 @@ void tinyalsa_mixer_config_start(void *data, const XML_Char *elem,
mixer_data->type = MIXER_DATA_TYPE_WRITE;
list->data = (void *) mixer_data;
} else {
- LOGE("Missing device/path for elem: %s", elem);
+ ALOGE("Missing device/path for elem: %s", elem);
return;
}
@@ -530,7 +530,7 @@ void tinyalsa_mixer_config_start(void *data, const XML_Char *elem,
i++;
mixer_data->value = strdup((char *) attr[i]);
} else {
- LOGE("Unknown write attr: %s", attr[i]);
+ ALOGE("Unknown write attr: %s", attr[i]);
}
}
@@ -751,7 +751,7 @@ int tinyalsa_mixer_set_route_write(struct tinyalsa_mixer *mixer,
if(mixer_data->type != MIXER_DATA_TYPE_WRITE)
return -1;
- LOGD("Writing %s to %s", mixer_data->value, mixer_data->name);
+ ALOGD("Writing %s to %s", mixer_data->value, mixer_data->name);
asprintf(&buffer, "%s\n", mixer_data->value);
if(buffer == NULL)
@@ -792,16 +792,19 @@ int tinyalsa_mixer_set_route_list(struct tinyalsa_mixer *mixer, struct list_head
if(rc < 0) {
ALOGE("Unable to set control!");
return -1;
+ ALOGE("Unable to set control!");
+ goto list_continue;
}
}
} else if(mixer_data->type == MIXER_DATA_TYPE_WRITE) {
rc = tinyalsa_mixer_set_route_write(mixer, mixer_data);
if(rc < 0) {
- LOGE("Unable to write!");
- return -1;
+ ALOGE("Unable to write!");
+ goto list_continue;
}
}
+list_continue:
if(list->next != NULL)
list = list->next;
else