audio: Add get param support and resolve compile errors
- Add get param support in AHAL for Direction of Arrival and Channel
index from STHAL.
- Correct feature flag enable syntax and resolve compile errors.
- Remove codec loopback and add afe loopback mixer controls in mixer xml.
- Update sound_trigger_platform xml file.
CRs-Fixed: 2225936
Change-Id: I2e477013977a03a599d6bb4a52c66b897e967219
diff --git a/hal/audio_extn/ffv.c b/hal/audio_extn/ffv.c
index 54ce30c..82140b1 100755
--- a/hal/audio_extn/ffv.c
+++ b/hal/audio_extn/ffv.c
@@ -81,6 +81,7 @@
#define FFV_CHANNEL_MODE_MONO 1
#define FFV_CHANNEL_MODE_STEREO 2
+#define FFV_CHANNEL_MODE_QUAD 6
#define FFV_CHANNEL_MODE_HEX 6
#define FFV_CHANNEL_MODE_OCT 8
@@ -407,7 +408,7 @@
config->period_size = ffvmod.capture_config.period_size;
}
-int32_t audio_extn_ffv_init(struct audio_device *adev)
+int32_t audio_extn_ffv_init(struct audio_device *adev __unused)
{
int ret = 0;
@@ -487,7 +488,7 @@
__func__, num_ec_ref_ch, num_tx_in_ch, num_out_ch, frame_len, sample_rate);
ALOGD("%s: config file path %s", __func__, config_file_path);
status_type = ffv_init_fn(&ffvmod.handle, num_tx_in_ch, num_out_ch, num_ec_ref_ch,
- frame_len, sample_rate, config_file_path, sm_buffer, 0,
+ frame_len, sample_rate, config_file_path, (char *)sm_buffer, 0,
&total_mem_size, key, lic);
if (status_type) {
ALOGE("%s: ERROR. ffv_init returned %d", __func__, status_type);
@@ -580,6 +581,8 @@
return SND_DEVICE_IN_HANDSET_8MIC;
} else if (ffvmod.capture_config.channels == FFV_CHANNEL_MODE_HEX) {
return SND_DEVICE_IN_HANDSET_6MIC;
+ } else if (ffvmod.capture_config.channels == FFV_CHANNEL_MODE_QUAD) {
+ return SND_DEVICE_IN_HANDSET_QMIC;
} else {
ALOGE("%s: Invalid channels configured for capture", __func__);
return SND_DEVICE_NONE;
@@ -587,7 +590,7 @@
}
int audio_extn_ffv_init_ec_ref_loopback(struct audio_device *adev,
- snd_device_t snd_device)
+ snd_device_t snd_device __unused)
{
struct audio_usecase *uc_info_tx = NULL;
snd_device_t in_snd_device;
@@ -679,7 +682,7 @@
}
int audio_extn_ffv_deinit_ec_ref_loopback(struct audio_device *adev,
- snd_device_t snd_device)
+ snd_device_t snd_device __unused)
{
struct audio_usecase *uc_info_tx = NULL;
snd_device_t in_snd_device;
@@ -709,7 +712,7 @@
return ret;
}
-int32_t audio_extn_ffv_read(struct audio_stream_in *stream,
+int32_t audio_extn_ffv_read(struct audio_stream_in *stream __unused,
void *buffer, size_t bytes)
{
int status = 0;
@@ -717,7 +720,7 @@
int16_t *process_ec_ref_ptr = NULL;
size_t in_buf_size, out_buf_size, bytes_to_copy;
int retry_num = 0;
- int i, j, ch;
+ int i, ch;
int total_in_ch, in_ch, ec_ref_ch;
if (!ffvmod.ffv_lib_handle) {
@@ -805,7 +808,7 @@
total_in_ch = ffvmod.capture_config.channels;
ec_ref_ch = ffvmod.ec_ref_config.channels;
in_ch = total_in_ch - ec_ref_ch;
- for (i = 0; i < ffvmod.capture_config.period_size; i++) {
+ for (i = 0; i < (int)ffvmod.capture_config.period_size; i++) {
for (ch = 0; ch < in_ch; ch++) {
process_in_ptr[i*in_ch+ch] =
in_ptr[i*total_in_ch+ch];
@@ -846,7 +849,6 @@
void audio_extn_ffv_set_parameters(struct audio_device *adev __unused,
struct str_parms *parms)
{
- int err;
int val;
int ret = 0;
char value[128];