diff options
Diffstat (limited to 'audio/audio_hw.c')
-rwxr-xr-x | audio/audio_hw.c | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/audio/audio_hw.c b/audio/audio_hw.c index 260292f..eafcd82 100755 --- a/audio/audio_hw.c +++ b/audio/audio_hw.c @@ -19,7 +19,7 @@ */ #define LOG_TAG "audio_hw_primary" -#define LOG_NDEBUG 0 +//#define LOG_NDEBUG 0 #include <errno.h> #include <pthread.h> @@ -230,14 +230,14 @@ static int set_bigroute_by_array(struct mixer *mixer, struct route_setting *rout if (ret != 0) { ALOGE("Failed to set '%s' to '%s'\n", route[i].ctl_name, route[i].strval); } else { - ALOGV("Set '%s' to '%s'\n", route[i].ctl_name, route[i].strval); + //ALOGV("Set '%s' to '%s'\n", route[i].ctl_name, route[i].strval); } } else { ret = mixer_ctl_set_enum_by_string(ctl, "Off"); if (ret != 0) { ALOGE("Failed to set '%s' to '%s'\n", route[i].ctl_name, route[i].strval); } else { - ALOGV("Set '%s' to '%s'\n", route[i].ctl_name, "Off"); + //ALOGV("Set '%s' to '%s'\n", route[i].ctl_name, "Off"); } } } else { @@ -248,14 +248,14 @@ static int set_bigroute_by_array(struct mixer *mixer, struct route_setting *rout if (ret != 0) { ALOGE("Failed to set '%s' to '%d'\n", route[i].ctl_name, route[i].intval); } else { - ALOGV("Set '%s' to '%d'\n", route[i].ctl_name, route[i].intval); + //ALOGV("Set '%s' to '%d'\n", route[i].ctl_name, route[i].intval); } } else { ret = mixer_ctl_set_value(ctl, j, 0); if (ret != 0) { ALOGE("Failed to set '%s' to '%d'\n", route[i].ctl_name, route[i].intval); } else { - ALOGV("Set '%s' to '%d'\n", route[i].ctl_name, 0); + //ALOGV("Set '%s' to '%d'\n", route[i].ctl_name, 0); } } } @@ -300,8 +300,8 @@ static int set_route_by_array(struct mixer *mixer, struct route_setting *route, ALOGE("Failed to set '%s'.%d to %d\n", route[i].ctl_name, j, route[i].intval); } else { - ALOGV("Set '%s'.%d to %d\n", - route[i].ctl_name, j, route[i].intval); + //ALOGV("Set '%s'.%d to %d\n", + //route[i].ctl_name, j, route[i].intval); } } } @@ -709,12 +709,16 @@ static void select_output_device(struct m0_audio_device *adev) static void select_input_device(struct m0_audio_device *adev) { - switch(adev->in_device) { + int input_device = AUDIO_DEVICE_BIT_IN | adev->in_device; + + switch(input_device) { case AUDIO_DEVICE_IN_BUILTIN_MIC: ALOGD("%s: AUDIO_DEVICE_IN_BUILTIN_MIC", __func__); break; case AUDIO_DEVICE_IN_BACK_MIC: ALOGD("%s: AUDIO_DEVICE_IN_BACK_MIC", __func__); + // Force use both mics for video recording + adev->in_device = (AUDIO_DEVICE_IN_BACK_MIC | AUDIO_DEVICE_IN_BUILTIN_MIC) & ~AUDIO_DEVICE_BIT_IN; break; case AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET: ALOGD("%s: AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET", __func__); @@ -2872,7 +2876,7 @@ static void adev_config_start(void *data, const XML_Char *elem, return; } - ALOGV("Parsing control %s => %s\n", name, val); + //ALOGV("Parsing control %s => %s\n", name, val); r = realloc(s->path, sizeof(*r) * (s->path_len + 1)); if (!r) { |