diff options
author | Simon Wilson <simonwilson@google.com> | 2011-07-22 16:42:17 -0700 |
---|---|---|
committer | Simon Wilson <simonwilson@google.com> | 2011-07-22 16:42:17 -0700 |
commit | 716b2ebdcde9f3f2f7ad170d475073a4831afeea (patch) | |
tree | 81c742de91ad93ca6abadff411aaa42fa439c884 /audio | |
parent | a086244464d7c425f90daf807c94ac7385556267 (diff) | |
download | device_samsung_tuna-716b2ebdcde9f3f2f7ad170d475073a4831afeea.zip device_samsung_tuna-716b2ebdcde9f3f2f7ad170d475073a4831afeea.tar.gz device_samsung_tuna-716b2ebdcde9f3f2f7ad170d475073a4831afeea.tar.bz2 |
Revert "audio: disable output stage when going into standby"
The audio output is put into standby during a call so this
causes the earpiece and other output routes not to function
in that state. Reverting until a better fix is ready.
This reverts commit da4f484d573e99ce334664fdd8cd48560f334436.
Diffstat (limited to 'audio')
-rw-r--r-- | audio/audio_hw.c | 59 |
1 files changed, 26 insertions, 33 deletions
diff --git a/audio/audio_hw.c b/audio/audio_hw.c index f223a33..a9a5be7 100644 --- a/audio/audio_hw.c +++ b/audio/audio_hw.c @@ -152,37 +152,31 @@ struct route_setting defaults[] = { .intval = MIXER_ABE_GAIN_0DB, }, { - .ctl_name = MIXER_AUDUL_VOICE_UL_VOLUME, - .intval = MIXER_ABE_GAIN_0DB, + .ctl_name = MIXER_HEADSET_PLAYBACK_VOLUME, + .intval = 13, }, { - .ctl_name = MIXER_CAPTURE_PREAMPLIFIER_VOLUME, - .intval = 1, + .ctl_name = MIXER_EARPHONE_PLAYBACK_VOLUME, + .intval = 15, }, { - .ctl_name = MIXER_CAPTURE_VOLUME, - .intval = 4, + .ctl_name = MIXER_HANDSFREE_PLAYBACK_VOLUME, + .intval = 26, /* max for no distortion */ }, { - .ctl_name = MIXER_SIDETONE_MIXER_PLAYBACK, - .intval = 1, + .ctl_name = MIXER_AUDUL_VOICE_UL_VOLUME, + .intval = MIXER_ABE_GAIN_0DB, }, { - .ctl_name = MIXER_DL1_PDM_SWITCH, + .ctl_name = MIXER_CAPTURE_PREAMPLIFIER_VOLUME, .intval = 1, }, - - /* bt */ { - .ctl_name = MIXER_BT_UL_VOLUME, - .intval = MIXER_ABE_GAIN_MINUS1DB, - }, - { - .ctl_name = NULL, + .ctl_name = MIXER_CAPTURE_VOLUME, + .intval = 4, }, -}; -struct route_setting output_stage[] = { + /* speaker */ { .ctl_name = MIXER_HF_LEFT_PLAYBACK, .strval = MIXER_PLAYBACK_HF_DAC, @@ -191,25 +185,29 @@ struct route_setting output_stage[] = { .ctl_name = MIXER_HF_RIGHT_PLAYBACK, .strval = MIXER_PLAYBACK_HF_DAC, }, + + /* headset */ { - .ctl_name = MIXER_HS_LEFT_PLAYBACK, - .strval = MIXER_PLAYBACK_HS_DAC, + .ctl_name = MIXER_SIDETONE_MIXER_PLAYBACK, + .intval = 1, }, { - .ctl_name = MIXER_HS_RIGHT_PLAYBACK, - .strval = MIXER_PLAYBACK_HS_DAC, + .ctl_name = MIXER_DL1_PDM_SWITCH, + .intval = 1, }, { - .ctl_name = MIXER_HEADSET_PLAYBACK_VOLUME, - .intval = 13, + .ctl_name = MIXER_HS_LEFT_PLAYBACK, + .strval = MIXER_PLAYBACK_HS_DAC, }, { - .ctl_name = MIXER_EARPHONE_PLAYBACK_VOLUME, - .intval = 15, + .ctl_name = MIXER_HS_RIGHT_PLAYBACK, + .strval = MIXER_PLAYBACK_HS_DAC, }, + + /* bt */ { - .ctl_name = MIXER_HANDSFREE_PLAYBACK_VOLUME, - .intval = 26, /* max for no distortion */ + .ctl_name = MIXER_BT_UL_VOLUME, + .intval = MIXER_ABE_GAIN_MINUS1DB, }, { .ctl_name = NULL, @@ -485,9 +483,6 @@ static void select_output_device(struct tuna_audio_device *adev) static int start_output_stream(struct tuna_stream_out *out) { - struct tuna_audio_device *adev = out->dev; - - set_route_by_array(adev->mixer, output_stage, 1); out->pcm = pcm_open(0, PORT_MM, PCM_OUT, &out->config); if (!pcm_is_ready(out->pcm)) { LOGE("cannot open pcm_out driver: %s", pcm_get_error(out->pcm)); @@ -602,10 +597,8 @@ static int out_set_format(struct audio_stream *stream, int format) static int out_standby(struct audio_stream *stream) { struct tuna_stream_out *out = (struct tuna_stream_out *)stream; - struct tuna_audio_device *adev = out->dev; pthread_mutex_lock(&out->lock); - set_route_by_array(adev->mixer, output_stage, 0); if (!out->standby) { pcm_close(out->pcm); out->pcm = NULL; |