hal: Add support for handset and speaker for msmnile QRD device
Identify msmnile QRD device to select QRD specific paths
for handset and speaker variant.
Change-Id: I236f51c1ff8beb48b9841aacd40b7a4520f9ee79
diff --git a/hal/msm8974/hw_info.c b/hal/msm8974/hw_info.c
index 40028b7..667338e 100644
--- a/hal/msm8974/hw_info.c
+++ b/hal/msm8974/hw_info.c
@@ -219,6 +219,14 @@
SND_DEVICE_OUT_VOICE_TTY_HCO_HANDSET,
};
+static const snd_device_t pahu_qrd_variant_devices[] = {
+ SND_DEVICE_OUT_SPEAKER,
+ SND_DEVICE_OUT_VOICE_SPEAKER,
+ SND_DEVICE_OUT_HANDSET,
+ SND_DEVICE_OUT_VOICE_HANDSET,
+ SND_DEVICE_OUT_VOICE_TTY_HCO_HANDSET,
+};
+
static const snd_device_t auto_variant_devices[] = {
SND_DEVICE_OUT_SPEAKER
};
@@ -420,9 +428,18 @@
}
}
-static void update_hardware_info_msmnile(struct hardware_info *hw_info __unused, const char *snd_card_name __unused)
+static void update_hardware_info_msmnile(struct hardware_info *hw_info, const char *snd_card_name)
{
- ALOGW("%s: Not a msmnile device", __func__);
+ if (strstr(snd_card_name, "qrd")) {
+ strlcpy(hw_info->type, " qrd", sizeof(hw_info->type));
+ strlcpy(hw_info->name, "msmnile", sizeof(hw_info->name));
+ hw_info->snd_devices = (snd_device_t *)pahu_qrd_variant_devices;
+ hw_info->num_snd_devices = ARRAY_SIZE(pahu_qrd_variant_devices);
+ hw_info->is_stereo_spkr = false;
+ strlcpy(hw_info->dev_extn, "-qrd", sizeof(hw_info->dev_extn));
+ } else {
+ ALOGW("%s: Not a msmnile device", __func__);
+ }
}
static void update_hardware_info_sdx(struct hardware_info *hw_info __unused, const char *snd_card_name __unused)