hal: separate transcode loopback usecase for Tx and Rx
- In transcode loopback usecase source device is fixed
with HDMI device and backend is not configurable.
- Separate transcode loopback usecase for Rx and Tx
to select the backend based on the source device.
Change-Id: Icbed33fe748ab5f9fc4ace3ada605ba25ad2c51c
Signed-off-by: Surendar Karka <skarka@codeaurora.org>
diff --git a/hal/audio_extn/utils.c b/hal/audio_extn/utils.c
index 6aab347..63cecd9 100644
--- a/hal/audio_extn/utils.c
+++ b/hal/audio_extn/utils.c
@@ -851,7 +851,7 @@
&usecase->stream.in->app_type_cfg);
ALOGV("%s Selected apptype: %d", __func__, usecase->stream.in->app_type_cfg.app_type);
break;
- case TRANSCODE_LOOPBACK :
+ case TRANSCODE_LOOPBACK_RX :
audio_extn_utils_update_stream_output_app_type_cfg(adev->platform,
&adev->streams_output_cfg_list,
usecase->stream.inout->out_config.devices,
@@ -911,7 +911,7 @@
platform_get_snd_device_name(split_snd_device));
if (usecase->type != PCM_PLAYBACK && usecase->type != PCM_CAPTURE &&
- usecase->type != TRANSCODE_LOOPBACK) {
+ usecase->type != TRANSCODE_LOOPBACK_RX) {
ALOGE("%s: not a playback/capture path, no need to cfg app type", __func__);
rc = 0;
goto exit_send_app_type_cfg;
@@ -921,7 +921,7 @@
(usecase->id != USECASE_AUDIO_PLAYBACK_MULTI_CH) &&
(usecase->id != USECASE_AUDIO_PLAYBACK_ULL) &&
(usecase->id != USECASE_AUDIO_PLAYBACK_VOIP) &&
- (usecase->id != USECASE_AUDIO_TRANSCODE_LOOPBACK) &&
+ (usecase->id != USECASE_AUDIO_TRANSCODE_LOOPBACK_RX) &&
(!is_interactive_usecase(usecase->id)) &&
(!is_offload_usecase(usecase->id)) &&
(usecase->type != PCM_CAPTURE)) {
@@ -937,7 +937,7 @@
goto exit_send_app_type_cfg;
}
- if (usecase->type == PCM_PLAYBACK || usecase->type == TRANSCODE_LOOPBACK) {
+ if (usecase->type == PCM_PLAYBACK || usecase->type == TRANSCODE_LOOPBACK_RX) {
pcm_device_id = platform_get_pcm_device_id(usecase->id, PCM_PLAYBACK);
snprintf(mixer_ctl_name, sizeof(mixer_ctl_name),
"Audio Stream %d App Type Cfg", pcm_device_id);
@@ -1073,7 +1073,7 @@
__func__, app_type, acdb_dev_id, sample_rate, snd_device_be_idx);
} else {
app_type = platform_get_default_app_type_v2(adev->platform, usecase->type);
- if(usecase->type == TRANSCODE_LOOPBACK) {
+ if(usecase->type == TRANSCODE_LOOPBACK_RX) {
sample_rate = usecase->stream.inout->out_config.sample_rate;
app_type = usecase->stream.inout->out_app_type_cfg.app_type;
}
@@ -1103,7 +1103,7 @@
switch (usecase->type) {
case PCM_PLAYBACK:
- case TRANSCODE_LOOPBACK:
+ case TRANSCODE_LOOPBACK_RX:
ALOGD("%s: usecase->out_snd_device %s",
__func__, platform_get_snd_device_name(usecase->out_snd_device));
/* check for out combo device */
@@ -1446,7 +1446,7 @@
platform_send_audio_calibration(adev->platform, usecase,
platform_get_default_app_type_v2(adev->platform, usecase->type),
48000);
- } else if (type == TRANSCODE_LOOPBACK && usecase->stream.inout != NULL) {
+ } else if (type == TRANSCODE_LOOPBACK_RX && usecase->stream.inout != NULL) {
int snd_device = usecase->out_snd_device;
snd_device = (snd_device == SND_DEVICE_OUT_SPEAKER) ?
platform_get_spkr_prot_snd_device(snd_device) : snd_device;