hal: update combo device handling
If the wired headset/headphone/line devices are handled by
a different backend than speaker/earpiece devices, the combo
devices such as speaker+headphones can be split into individual
devices and enabled/disabled independently.
CRs-fixed: 989410
Change-Id: I379b56940eaf384d3cd1d9fe392b7fec65df023b
diff --git a/hal/audio_extn/utils.c b/hal/audio_extn/utils.c
index 8f49b8d..9f82869 100644
--- a/hal/audio_extn/utils.c
+++ b/hal/audio_extn/utils.c
@@ -618,8 +618,10 @@
app_type_cfg[len++] = platform_get_default_app_type(adev->platform);
app_type_cfg[len++] = acdb_dev_id;
app_type_cfg[len++] = sample_rate;
- ALOGI("%s PLAYBACK app_type %d, acdb_dev_id %d, sample_rate %d",
- __func__, platform_get_default_app_type(adev->platform), acdb_dev_id, sample_rate);
+ ALOGI("%s:%d PLAYBACK app_type %d, acdb_dev_id %d, sample_rate %d",
+ __func__, __LINE__,
+ platform_get_default_app_type(adev->platform),
+ acdb_dev_id, sample_rate);
} else if (usecase->type == PCM_PLAYBACK) {
if (usecase->stream.out->devices & AUDIO_DEVICE_OUT_SPEAKER) {
@@ -630,9 +632,6 @@
usecase->stream.out->app_type_cfg.sample_rate = DEFAULT_OUTPUT_SAMPLING_RATE;
}
- if (!audio_extn_is_hifi_audio_enabled())
- usecase->stream.out->app_type_cfg.sample_rate = DEFAULT_OUTPUT_SAMPLING_RATE;
-
sample_rate = usecase->stream.out->app_type_cfg.sample_rate;
property_get("audio.playback.mch.downsample",value,"");
@@ -652,8 +651,10 @@
else
app_type_cfg[len++] = sample_rate;
- ALOGI("%s PLAYBACK app_type %d, acdb_dev_id %d, sample_rate %d",
- __func__, usecase->stream.out->app_type_cfg.app_type, acdb_dev_id, sample_rate);
+ ALOGI("%s:%d PLAYBACK app_type %d, acdb_dev_id %d, sample_rate %d",
+ __func__, __LINE__,
+ platform_get_default_app_type(adev->platform),
+ acdb_dev_id, sample_rate);
} else if (usecase->type == PCM_CAPTURE) {
app_type_cfg[len++] = platform_get_default_app_type_v2(adev->platform, usecase->type);