diff options
author | vivek mehta <mvivek@codeaurora.org> | 2015-07-14 16:06:54 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-07-14 16:06:54 +0000 |
commit | 49cb6c00948a74130db24987048e3ee98bf40e7f (patch) | |
tree | fbe21e0ec9c378ed5261a5ea3d34b5c7df34c4dc | |
parent | 8a25cdef5a77bd8505b70df76c7f4e737d6af555 (diff) | |
parent | 4cb8298a322ef5be6f8db002e50c764fdecc2c55 (diff) | |
download | hardware_qcom_audio-49cb6c00948a74130db24987048e3ee98bf40e7f.tar.gz hardware_qcom_audio-49cb6c00948a74130db24987048e3ee98bf40e7f.tar.bz2 hardware_qcom_audio-49cb6c00948a74130db24987048e3ee98bf40e7f.zip |
am 4cb8298a: hal: send correct ACDB id
* commit '4cb8298a322ef5be6f8db002e50c764fdecc2c55':
hal: send correct ACDB id
-rw-r--r-- | hal/msm8974/platform.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/hal/msm8974/platform.c b/hal/msm8974/platform.c index 1b6a569a..bb028692 100644 --- a/hal/msm8974/platform.c +++ b/hal/msm8974/platform.c @@ -464,7 +464,6 @@ bool platform_send_gain_dep_cal(void *platform, int level) int mode = CAL_MODE_RTAC; struct listnode *node; struct audio_usecase *usecase; - snd_device_t snd_device; if (my_data->acdb_send_gain_dep_cal == NULL) { ALOGE("%s: dlsym error for acdb_send_gain_dep_cal", __func__); @@ -485,8 +484,12 @@ bool platform_send_gain_dep_cal(void *platform, int level) (usecase->stream.out->devices == AUDIO_DEVICE_OUT_SPEAKER)) { ALOGV("%s: out device is %d", __func__, usecase->out_snd_device); - snd_device = audio_extn_spkr_prot_get_acdb_id(usecase->out_snd_device); - acdb_dev_id = acdb_device_table[snd_device]; + if (audio_extn_spkr_prot_is_enabled()) { + acdb_dev_id = audio_extn_spkr_prot_get_acdb_id(usecase->out_snd_device); + } else { + acdb_dev_id = acdb_device_table[usecase->out_snd_device]; + } + if (!my_data->acdb_send_gain_dep_cal(acdb_dev_id, app_type, acdb_dev_type, mode, level)) { // set ret_val true if at least one calibration is set successfully |