summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvivian,zhang <vivian.zhang@intel.com>2013-09-03 07:21:00 (GMT)
committerZhang,Vivian <vivian.zhang@intel.com>2013-09-04 07:51:20 (GMT)
commit9bfbe6026b1f330c10801ac8325903f44ac3823a (patch)
tree9d5d5f2b53371065173e0bd11988de3a45454d73
parent3e0a4a4a30908ea85082dde4daf6963c19b39c4c (diff)
downloadsound-plugin-hal-clovertrail-9bfbe6026b1f330c10801ac8325903f44ac3823a.zip
sound-plugin-hal-clovertrail-9bfbe6026b1f330c10801ac8325903f44ac3823a.tar.gz
sound-plugin-hal-clovertrail-9bfbe6026b1f330c10801ac8325903f44ac3823a.tar.bz2
Adjust the volume and disable SDRC_CTRL to avoid noise in play/pause
Change-Id: I5ebc77a989b2fc785e8b32b6c5715d3f6712e15c
-rw-r--r--src/audio_hal_plugin_clv.c10
-rw-r--r--src/lpe_ctl.c9
2 files changed, 11 insertions, 8 deletions
diff --git a/src/audio_hal_plugin_clv.c b/src/audio_hal_plugin_clv.c
index 2d03469..5f1b39e 100644
--- a/src/audio_hal_plugin_clv.c
+++ b/src/audio_hal_plugin_clv.c
@@ -118,10 +118,10 @@ static int hal_plug_set_sound_path(int gain, int output, int input, int option)
break;
}
/* Set Path (GAIN, OUT, IN) */
- /*if (AVSYS_FAIL(avsys_audio_set_path_ex(gain, output, input, option))) {
+ if (AVSYS_FAIL(avsys_audio_set_path_ex(gain, output, input, option))) {
debug_error("avsys_audio_set_path_ex failed\n");
ret = AUDIO_HAL_STATE_ERROR_INTERNAL;
- }*/
+ }
debug_fleave();
return ret;
}
@@ -179,9 +179,9 @@ static int hal_plug_init()
sound_card_ctrl_set(64, 62);
sound_card_ctrl_set(57, 62);
- sound_card_ctrl_set(10, 215);
- sound_card_ctrl_set(6, 204);
-// lpe_setup_clv();
+ sound_card_ctrl_set(10, 194);
+ sound_card_ctrl_set(6, 180);
+ lpe_setup_clv();
debug_fleave();
return AUDIO_HAL_STATE_SUCCESS;
}
diff --git a/src/lpe_ctl.c b/src/lpe_ctl.c
index e0850b8..2d8ae37 100644
--- a/src/lpe_ctl.c
+++ b/src/lpe_ctl.c
@@ -176,9 +176,9 @@ int check_algo_state(int str_id, int algo_id)
int lpe_setup_clv()
{
- unsigned int param_data[32];
+ //unsigned int param_data[32];
- debug_log("CLV: Enable MIC1_PATH/GAIN_CTRL\n");
+ /*debug_log("CLV: Enable MIC1_PATH/GAIN_CTRL\n");
change_algo_state(0x05, LPE_ALGO_TYPE_VOL_CTRL, ENABLE);
debug_log("CLV: Enable MIC2_PATH/GAIN_CTRL\n");
change_algo_state(0x25, LPE_ALGO_TYPE_VOL_CTRL, ENABLE);
@@ -187,7 +187,10 @@ int lpe_setup_clv()
debug_log("Set MIC1_PATH/GAIN_CTRL/GAIN to value 20\n");
lpe_set_parameter(0x05, LPE_ALGO_TYPE_VOL_CTRL, ALGO_PARAM_VOL_CTRL_GAIN, 1, (char *)param_data);
debug_log("Set MIC2_PATH/GAIN_CTRL/GAIN to value 20\n");
- lpe_set_parameter(0x25, LPE_ALGO_TYPE_VOL_CTRL, ALGO_PARAM_VOL_CTRL_GAIN, 1, (char *)param_data);
+ lpe_set_parameter(0x25, LPE_ALGO_TYPE_VOL_CTRL, ALGO_PARAM_VOL_CTRL_GAIN, 1, (char *)param_data);*/
+
+ debug_log("CLV: Disable IHF_PATH/SDRC_CTRL\n");
+ change_algo_state(0x21, 0x72, DISABLE);
return 0;
}