summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorelektroschmock <elektroschmock78@googlemail.com>2014-02-11 21:37:30 +0100
committerelektroschmock <elektroschmock78@googlemail.com>2014-02-11 21:37:30 +0100
commite578ca5344118f7772acdcab6ffdd71764fc4e92 (patch)
tree8f44ec5380464d7c13ac6686a856de47312c5826
parent2ebdb7161223de357c9874eb7a63a6f0c68496bd (diff)
downloadandroid_system_media-e578ca5344118f7772acdcab6ffdd71764fc4e92.tar.gz
android_system_media-e578ca5344118f7772acdcab6ffdd71764fc4e92.tar.bz2
android_system_media-e578ca5344118f7772acdcab6ffdd71764fc4e92.zip
Revert "audio_route: fix possible segfault"
This reverts commit 84f0b1899302784c679105f444e87686a66c1274. Change-Id: I35c375d7b8291eca166267f621f6ef4d4b870a1c
-rw-r--r--audio_route/audio_route.c18
1 files changed, 0 insertions, 18 deletions
diff --git a/audio_route/audio_route.c b/audio_route/audio_route.c
index a0b4f365..4a449079 100644
--- a/audio_route/audio_route.c
+++ b/audio_route/audio_route.c
@@ -540,17 +540,8 @@ int audio_route_update_mixer(struct audio_route *ar)
static void save_mixer_state(struct audio_route *ar)
{
unsigned int i;
- struct mixer_ctl *ctl;
- enum mixer_ctl_type type;
for (i = 0; i < ar->num_mixer_ctls; i++) {
- /* Skip unsupported types that are not supported yet in XML */
- ctl = mixer_get_ctl(ar->mixer, i);
- type = mixer_ctl_get_type(ctl);
- if ((type != MIXER_CTL_TYPE_BOOL) && (type != MIXER_CTL_TYPE_INT) &&
- (type != MIXER_CTL_TYPE_ENUM))
- continue;
-
memcpy(ar->mixer_state[i].reset_value, ar->mixer_state[i].new_value,
ar->mixer_state[i].num_values * sizeof(int));
}
@@ -560,18 +551,9 @@ static void save_mixer_state(struct audio_route *ar)
void audio_route_reset(struct audio_route *ar)
{
unsigned int i;
- struct mixer_ctl *ctl;
- enum mixer_ctl_type type;
/* load all of the saved values */
for (i = 0; i < ar->num_mixer_ctls; i++) {
- /* Skip unsupported types that are not supported yet in XML */
- ctl = mixer_get_ctl(ar->mixer, i);
- type = mixer_ctl_get_type(ctl);
- if ((type != MIXER_CTL_TYPE_BOOL) && (type != MIXER_CTL_TYPE_INT) &&
- (type != MIXER_CTL_TYPE_ENUM))
- continue;
-
memcpy(ar->mixer_state[i].new_value, ar->mixer_state[i].reset_value,
ar->mixer_state[i].num_values * sizeof(int));
}