mirror of
https://github.com/S3NEO/android_device_samsung_matissewifi.git
synced 2024-11-01 11:56:29 +00:00
Revert test change to audio
This commit is contained in:
parent
177c0e751a
commit
2a13c5e349
4 changed files with 153 additions and 119 deletions
|
@ -81,7 +81,7 @@ BOARD_USES_QCOM_HARDWARE := true
|
|||
TARGET_QCOM_MEDIA_VARIANT := caf-new
|
||||
TARGET_QCOM_DISPLAY_VARIANT := caf-new
|
||||
BOARD_USES_LEGACY_ALSA_AUDIO :=
|
||||
TARGET_QCOM_AUDIO_VARIANT :=
|
||||
TARGET_QCOM_AUDIO_VARIANT := caf
|
||||
TARGET_USES_QCOM_BSP := true
|
||||
|
||||
# Audio settings
|
||||
|
|
|
@ -6,18 +6,12 @@
|
|||
# }
|
||||
# }
|
||||
libraries {
|
||||
# This is a proxy library that will be an abstraction for
|
||||
# the HW and SW effects
|
||||
proxy {
|
||||
path /system/lib/soundfx/libeffectproxy.so
|
||||
}
|
||||
# This is the HW implementation library for the effect
|
||||
offload {
|
||||
path /system/lib/soundfx/libaudioeffectoffload.so
|
||||
}
|
||||
bundle {
|
||||
path /system/lib/soundfx/libbundlewrapper.so
|
||||
}
|
||||
cm {
|
||||
path /system/lib/soundfx/libcyanogen-dsp.so
|
||||
}
|
||||
reverb {
|
||||
path /system/lib/soundfx/libreverbwrapper.so
|
||||
}
|
||||
|
@ -30,30 +24,14 @@ libraries {
|
|||
downmix {
|
||||
path /system/lib/soundfx/libdownmix.so
|
||||
}
|
||||
mysound {
|
||||
path /system/lib/libmysound.so
|
||||
proxy {
|
||||
path /system/lib/soundfx/libeffectproxy.so
|
||||
}
|
||||
soundalive {
|
||||
path /system/lib/libaudiosa.so
|
||||
}
|
||||
soundalive_sec {
|
||||
path /system/lib/soundfx/libaudiosa_sec.so
|
||||
}
|
||||
loudness_enhancer {
|
||||
path /system/lib/soundfx/libldnhncr.so
|
||||
}
|
||||
pre_processing {
|
||||
audio_pre_processing {
|
||||
path /system/lib/soundfx/libqcomvoiceprocessing.so
|
||||
}
|
||||
}
|
||||
|
||||
# Default pre-processing library. Add to audio_effect.conf "libraries" section if
|
||||
# audio HAL implements support for default software audio pre-processing effects
|
||||
#
|
||||
# pre_processing {
|
||||
# path /system/lib/soundfx/libaudiopreprocessing.so
|
||||
# }
|
||||
|
||||
# list of effects to load. Each effect element must contain a "library" and a "uuid" element.
|
||||
# The value of the "library" element must correspond to the name of one library element in the
|
||||
# "libraries" element.
|
||||
|
@ -70,53 +48,27 @@ libraries {
|
|||
# }
|
||||
|
||||
effects {
|
||||
soundalive {
|
||||
library proxy
|
||||
uuid 05227ea0-50bb-11e3-ac69-0002a5d5c51b
|
||||
libsw {
|
||||
library soundalive_sec
|
||||
uuid cf65eb39-ce2f-48a8-a903-ceb818c06745
|
||||
}
|
||||
libhw {
|
||||
library offload
|
||||
uuid 0b2dbc60-50bb-11e3-988b-0002a5d5c51b
|
||||
}
|
||||
compression {
|
||||
library cm
|
||||
uuid f27317f4-c984-4de6-9a90-545759495bf2
|
||||
}
|
||||
bassboost {
|
||||
library proxy
|
||||
uuid 10e50dc0-50bb-11e3-a9b0-0002a5d5c51b
|
||||
libsw {
|
||||
library soundalive
|
||||
uuid a926a540-418a-11e1-b2f1-0002a5d5c51b
|
||||
}
|
||||
libhw {
|
||||
library offload
|
||||
uuid 16a70d80-50bb-11e3-8959-0002a5d5c51b
|
||||
}
|
||||
# library bundle
|
||||
# uuid 8631f300-72e2-11df-b57e-0002a5d5c51b
|
||||
library cm
|
||||
uuid 42b5cbf5-4dd8-4e79-a5fb-cceb2cb54e13
|
||||
}
|
||||
virtualizer {
|
||||
library proxy
|
||||
uuid 1db5b180-50bb-11e3-888e-0002a5d5c51b
|
||||
libsw {
|
||||
library soundalive
|
||||
uuid c747f6a0-418a-11e1-a621-0002a5d5c51b
|
||||
}
|
||||
libhw {
|
||||
library offload
|
||||
uuid 23318080-50bb-11e3-9101-0002a5d5c51b
|
||||
}
|
||||
# library bundle
|
||||
# uuid 1d4033c0-8557-11df-9f2d-0002a5d5c51b
|
||||
library cm
|
||||
uuid 7c6cc5f8-6f34-4449-a282-bed84f1a5b5a
|
||||
}
|
||||
equalizer {
|
||||
library proxy
|
||||
uuid 295b42c0-50bb-11e3-a6ed-0002a5d5c51b
|
||||
libsw {
|
||||
library soundalive
|
||||
uuid c117b70-f97f-11e0-be50-0002a5d5c51b
|
||||
}
|
||||
libhw {
|
||||
library offload
|
||||
uuid 2f2afe20-50bb-11e3-bc97-0002a5d5c51b
|
||||
}
|
||||
# library bundle
|
||||
# uuid ce772f20-847d-11df-bb17-0002a5d5c51b
|
||||
library cm
|
||||
uuid 58bc9000-0d7f-462e-90d2-035eddd8b434
|
||||
}
|
||||
volume {
|
||||
library bundle
|
||||
|
@ -141,61 +93,30 @@ effects {
|
|||
visualizer {
|
||||
library proxy
|
||||
uuid 1d0a1a53-7d5d-48f2-8e71-27fbd10d842c
|
||||
libsw {
|
||||
library visualizer_sw
|
||||
uuid d069d9e0-8329-11df-9168-0002a5d5c51b
|
||||
}
|
||||
libhw {
|
||||
library visualizer_hw
|
||||
uuid 7a8044a0-1a71-11e3-a184-0002a5d5c51b
|
||||
}
|
||||
|
||||
libsw {
|
||||
library visualizer_sw
|
||||
uuid d069d9e0-8329-11df-9168-0002a5d5c51b
|
||||
}
|
||||
|
||||
libhw {
|
||||
library visualizer_hw
|
||||
uuid 7a8044a0-1a71-11e3-a184-0002a5d5c51b
|
||||
}
|
||||
}
|
||||
downmix {
|
||||
library downmix
|
||||
uuid 93f04452-e4fe-41cc-91f9-e475b6d1d69f
|
||||
}
|
||||
dha {
|
||||
library proxy
|
||||
uuid 37155c20-50bb-11e3-9fac-0002a5d5c51b
|
||||
libsw {
|
||||
library mysound
|
||||
uuid 263a88e0-50b1-11e2-bcfd-0800200c9a66
|
||||
}
|
||||
libhw {
|
||||
library offload
|
||||
uuid 3ef69260-50bb-11e3-931e-0002a5d5c51b
|
||||
}
|
||||
}
|
||||
loudness_enhancer {
|
||||
library loudness_enhancer
|
||||
uuid fa415329-2034-4bea-b5dc-5b381c8d1e2c
|
||||
}
|
||||
aec {
|
||||
library pre_processing
|
||||
library audio_pre_processing
|
||||
uuid 0f8d0d2a-59e5-45fe-b6e4-248c8a799109
|
||||
}
|
||||
ns {
|
||||
library pre_processing
|
||||
uuid 1d97bb0b-9e2f-4403-9ae3-58c2554306
|
||||
library audio_pre_processing
|
||||
uuid 1d97bb0b-9e2f-4403-9ae3-58c2554306f8
|
||||
}
|
||||
}
|
||||
|
||||
# Default pre-processing effects. Add to audio_effect.conf "effects" section if
|
||||
# audio HAL implements support for them.
|
||||
#
|
||||
# agc {
|
||||
# library pre_processing
|
||||
# uuid aa8130e0-66fc-11e0-bad0-0002a5d5c51b
|
||||
# }
|
||||
# aec {
|
||||
# library pre_processing
|
||||
# uuid 0f8d0d2a-59e5-45fe-b6e4-248c8a799109
|
||||
# }
|
||||
# ns {
|
||||
# library pre_processing
|
||||
# uuid c06c8400-8e06-11e0-9cb6-0002a5d5c51b
|
||||
# }
|
||||
|
||||
# Audio preprocessor configurations.
|
||||
# The pre processor configuration consists in a list of elements each describing
|
||||
# pre processor settings for a given input source. Valid input source names are:
|
||||
|
@ -235,8 +156,3 @@ effects {
|
|||
#
|
||||
# TODO: add default audio pre processor configurations after debug and tuning phase
|
||||
#
|
||||
pre_processing {
|
||||
voice_communication {
|
||||
aec {}
|
||||
}
|
||||
}
|
||||
|
|
115
audio/platform/customplatform.c
Normal file
115
audio/platform/customplatform.c
Normal file
|
@ -0,0 +1,115 @@
|
|||
/*
|
||||
* Copyright 2013, The CyanogenMod Project
|
||||
* Shareef Ali
|
||||
* Hashcode
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "Custom-Platform_Api.h"
|
||||
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <dlfcn.h>
|
||||
#include <cutils/log.h>
|
||||
#include <audio_hw.h>
|
||||
#include <platform_api.h>
|
||||
#include "platform.h"
|
||||
#include "voice_extn.h"
|
||||
#include "audio_extn.h"
|
||||
|
||||
snd_device_t custom_platform_get_input_snd_device(void *platform, audio_devices_t out_device)
|
||||
{
|
||||
struct platform_data *my_data = (struct platform_data *)platform;
|
||||
struct audio_device *adev = my_data->adev;
|
||||
audio_source_t source = (adev->active_input == NULL) ?
|
||||
AUDIO_SOURCE_DEFAULT : adev->active_input->source;
|
||||
|
||||
audio_mode_t mode = adev->mode;
|
||||
audio_channel_mask_t channel_mask = (adev->active_input == NULL) ?
|
||||
AUDIO_CHANNEL_IN_MONO : adev->active_input->channel_mask;
|
||||
snd_device_t snd_device = -2;
|
||||
int channel_count = popcount(channel_mask);
|
||||
|
||||
if ((out_device != AUDIO_DEVICE_NONE) && ((mode == AUDIO_MODE_IN_CALL) ||
|
||||
voice_extn_compress_voip_is_active(adev))) {
|
||||
if (adev->voice.tty_mode == TTY_MODE_OFF) {
|
||||
if (out_device & AUDIO_DEVICE_OUT_EARPIECE ||
|
||||
out_device & AUDIO_DEVICE_OUT_WIRED_HEADPHONE) {
|
||||
if (!(out_device & AUDIO_DEVICE_OUT_EARPIECE &&
|
||||
audio_extn_should_use_handset_anc(channel_count))) {
|
||||
if (my_data->fluence_type == FLUENCE_NONE ||
|
||||
my_data->fluence_in_voice_call == false) {
|
||||
snd_device = SND_DEVICE_IN_HANDSET_STEREO_DMIC;
|
||||
}
|
||||
}
|
||||
} else if (out_device & AUDIO_DEVICE_OUT_SPEAKER) {
|
||||
if (!(my_data->fluence_type != FLUENCE_NONE &&
|
||||
my_data->fluence_in_voice_call &&
|
||||
my_data->fluence_in_spkr_mode)) {
|
||||
snd_device = SND_DEVICE_IN_SPEAKER_STEREO_DMIC;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return snd_device;
|
||||
}
|
||||
void custom_init_data(){
|
||||
change_acdb_data(SND_DEVICE_OUT_SPEAKER, 15);
|
||||
change_acdb_data(SND_DEVICE_OUT_SPEAKER_REVERSE, 15);
|
||||
change_acdb_data(SND_DEVICE_OUT_SPEAKER_AND_HEADPHONES, 15);
|
||||
change_acdb_data(SND_DEVICE_OUT_VOICE_SPEAKER, 15);
|
||||
change_acdb_data(SND_DEVICE_IN_VOICE_DMIC, 4);
|
||||
change_acdb_data(SND_DEVICE_IN_HANDSET_DMIC, 4);
|
||||
change_acdb_data(SND_DEVICE_IN_VOICE_SPEAKER_DMIC, 11);
|
||||
change_acdb_data(SND_DEVICE_IN_SPEAKER_DMIC, 11);
|
||||
change_acdb_data(SND_DEVICE_IN_VOICE_REC_MIC, 53);
|
||||
change_acdb_data(SND_DEVICE_IN_CAMCORDER_MIC, 56);
|
||||
change_acdb_data(SND_DEVICE_OUT_USB_HEADSET, 98);
|
||||
change_acdb_data(SND_DEVICE_OUT_BT_SCO, 48);
|
||||
change_acdb_data(SND_DEVICE_OUT_BT_SCO_WB, 50);
|
||||
change_acdb_data(SND_DEVICE_IN_BT_SCO_MIC, 49);
|
||||
change_acdb_data(SND_DEVICE_IN_BT_SCO_MIC_WB, 51);
|
||||
|
||||
change_table_data(SND_DEVICE_OUT_HEADPHONES, "headset");
|
||||
change_table_data(SND_DEVICE_OUT_VOICE_HANDSET, "voice-call-handset");
|
||||
change_table_data(SND_DEVICE_OUT_VOICE_SPEAKER, "voice-call-speaker");
|
||||
change_table_data(SND_DEVICE_OUT_VOICE_HEADPHONES, "voice-call-headset");
|
||||
change_table_data(SND_DEVICE_OUT_VOICE_TTY_FULL_HEADPHONES, "TTY-full");
|
||||
change_table_data(SND_DEVICE_OUT_VOICE_TTY_VCO_HEADPHONES, "TTY-headset");
|
||||
change_table_data(SND_DEVICE_OUT_VOICE_TTY_HCO_HANDSET, "TTY-handset");
|
||||
change_table_data(SND_DEVICE_IN_HANDSET_MIC, "rec-main-mic");
|
||||
change_table_data(SND_DEVICE_IN_HANDSET_DMIC, "voice-call-main-mic");
|
||||
change_table_data(SND_DEVICE_IN_HANDSET_DMIC_NS, "voice-call-NS-mic-handset");
|
||||
change_table_data(SND_DEVICE_IN_HANDSET_DMIC_AEC, "voice-call-main-mic");
|
||||
change_table_data(SND_DEVICE_IN_HANDSET_DMIC_AEC_NS, "voice-call-main-mic");
|
||||
change_table_data(SND_DEVICE_IN_SPEAKER_MIC, "rec-sub-mic");
|
||||
change_table_data(SND_DEVICE_IN_SPEAKER_DMIC, "voice-call-sub-mic");
|
||||
change_table_data(SND_DEVICE_IN_SPEAKER_DMIC_NS, "voice-call-NS-mic-speaker");
|
||||
change_table_data(SND_DEVICE_IN_SPEAKER_DMIC_AEC, "voice-call-sub-mic");
|
||||
change_table_data(SND_DEVICE_IN_SPEAKER_DMIC_AEC_NS, "voice-call-sub-mic");
|
||||
change_table_data(SND_DEVICE_IN_HEADSET_MIC, "rec-headset-mic");
|
||||
change_table_data(SND_DEVICE_IN_VOICE_SPEAKER_MIC, "voice-call-sub-mic");
|
||||
change_table_data(SND_DEVICE_IN_VOICE_HEADSET_MIC, "voice-call-headset-mic");
|
||||
change_table_data(SND_DEVICE_IN_CAMCORDER_MIC, "rec-stereo-mic");
|
||||
change_table_data(SND_DEVICE_IN_VOICE_DMIC, "voice-call-main-mic");
|
||||
change_table_data(SND_DEVICE_IN_VOICE_SPEAKER_DMIC, "voice-call-sub-mic");
|
||||
change_table_data(SND_DEVICE_IN_VOICE_TTY_FULL_HEADSET_MIC, "TTY-full-mic");
|
||||
change_table_data(SND_DEVICE_IN_VOICE_TTY_VCO_HANDSET_MIC, "TTY-vco-mic");
|
||||
change_table_data(SND_DEVICE_IN_VOICE_TTY_HCO_HEADSET_MIC, "TTY-headset-mic");
|
||||
change_table_data(SND_DEVICE_IN_VOICE_REC_MIC, "vr-main-mic");
|
||||
change_table_data(SND_DEVICE_IN_VOICE_REC_MIC_NS, "svoice-NS-mic");
|
||||
change_table_data(SND_DEVICE_IN_VOICE_REC_DMIC_STEREO, "vr-sub-mic");
|
||||
change_table_data(SND_DEVICE_IN_HANDSET_STEREO_DMIC, "rec-stereo-mic");
|
||||
change_table_data(SND_DEVICE_IN_SPEAKER_STEREO_DMIC, "rec-stereo-mic");
|
||||
}
|
|
@ -30,12 +30,15 @@ vendor/lib/liblocationservice.so
|
|||
# Audio
|
||||
vendor/lib/libacdbloader.so
|
||||
vendor/lib/libacdbloader.so:lib/libacdbloader.so
|
||||
vendor/lib/libacdbmapper.so
|
||||
vendor/lib/libaudcal.so
|
||||
vendor/lib/libcsd-client.so
|
||||
vendor/lib/libacdbrtac.so
|
||||
vendor/lib/libadiertac.so
|
||||
lib/libmysound.so
|
||||
lib/libaudiosa.so
|
||||
lib/libsoundalive.so
|
||||
lib/lib_soundaliveresampler.so
|
||||
lib/soundfx/libaudioeffectoffload.so
|
||||
lib/soundfx/libaudiosa_sec.so
|
||||
etc/Bluetooth_cal.acdb
|
||||
|
|
Loading…
Reference in a new issue