summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvivian,zhang <vivian.zhang@intel.com>2013-09-11 08:12:42 (GMT)
committerZhang,Vivian <vivian.zhang@intel.com>2013-09-11 08:12:42 (GMT)
commit7f03f5d7bad1ae5a600cc60df329d84ab4bf214b (patch)
tree0359992427bf0f2e4a505bc68a42da4573eeb7ec
parent9bfbe6026b1f330c10801ac8325903f44ac3823a (diff)
downloadsound-plugin-hal-clovertrail-7f03f5d7bad1ae5a600cc60df329d84ab4bf214b.zip
sound-plugin-hal-clovertrail-7f03f5d7bad1ae5a600cc60df329d84ab4bf214b.tar.gz
sound-plugin-hal-clovertrail-7f03f5d7bad1ae5a600cc60df329d84ab4bf214b.tar.bz2
eanble audio dualout for clv platform
Change-Id: I5656b5a8855bc694db5afeaa71d63282631e3640
-rw-r--r--src/audio_hal_plugin_clv.c16
-rw-r--r--src/sound_card_control_clv.c19
2 files changed, 14 insertions, 21 deletions
diff --git a/src/audio_hal_plugin_clv.c b/src/audio_hal_plugin_clv.c
index 5f1b39e..79a2712 100644
--- a/src/audio_hal_plugin_clv.c
+++ b/src/audio_hal_plugin_clv.c
@@ -68,25 +68,17 @@ static int hal_plug_set_sound_path(int gain, int output, int input, int option)
case AVSYS_AUDIO_GAIN_EX_GAME:
case AVSYS_AUDIO_GAIN_EX_RINGTONE:
case AVSYS_AUDIO_GAIN_EX_CALLTONE:
- /*if (current_mode == MODE_IN_CALL) {
+ if (current_mode == MODE_IN_CALL) {
debug_log("CLV: current mode is MODE_IN_CALL, skip audio path set");
return ret;
}
- NORMAL mode
- Check dual_out option
+ /*NORMAL mode*/
+ /*Check dual_out option*/
if (option & AVSYS_AUDIO_PATH_OPTION_DUAL_OUT) {
debug_log("CLV: Set audio path to dual out");
- MMSoundMgrPulseSetDefaultSink (DEVICE_API_ALSA, DEVICE_BUS_WIRED);
ret = set_dual_out();
return ret;
- Check output device
- } else if (output == AVSYS_AUDIO_PATH_EX_HEADSET) {
- debug_log("CLV: Set pulse default sink to wired_accessary");
- MMSoundMgrPulseSetDefaultSink (DEVICE_API_ALSA, DEVICE_BUS_WIRED);
- } else if (output == AVSYS_AUDIO_PATH_EX_SPK) {
- debug_log("CLV: Set pulse default sink to speaker");
- MMSoundMgrPulseSetDefaultSink (DEVICE_API_ALSA, DEVICE_BUS_BUILTIN);
- }*/
+ }
break;
/* recorder */
diff --git a/src/sound_card_control_clv.c b/src/sound_card_control_clv.c
index 2a180ca..d2a92a9 100644
--- a/src/sound_card_control_clv.c
+++ b/src/sound_card_control_clv.c
@@ -301,16 +301,17 @@ int set_dual_out(void )
debug_fenter();
- /* set dual out: numid=35 "Speaker Mux Playback Route" 1,1 */
- /*//in ZTE phone, it's 38
- //err = sound_card_ctrl_set(35, 1);
- err = sound_card_ctrl_set_by_name("Speaker Mux Playback Route", 1);
- if (err < 0) {
- debug_error("CLV: failed to set alsa element for dual out");
- return 1;
- }
+ /* set dual out */
+ /*SPK Amp Switch: off*/
+ sound_card_ctrl_set(81, 0);
+ /*SPKLO Amp Switch: on*/
+ sound_card_ctrl_set(79, 1);
+ /*EAR Amp Switch: off*/
+ sound_card_ctrl_set(80, 0);
+ /*HP Amp Switch: off*/
+ sound_card_ctrl_set(83, 1);
debug_log("CLV: set dual out successfully");
-*/
+
debug_fleave();
return 0;
}