Loading Android.mk +1 −1 Original line number Diff line number Diff line ifneq ($(filter mpq8092 msm8960 msm8226 msm8x26 msm8610 msm8974 msm8x74 apq8084 msm8916,$(TARGET_BOARD_PLATFORM)),) ifneq ($(filter mpq8092 msm8960 msm8226 msm8x26 msm8610 msm8974 msm8x74 apq8084 msm8916 msm8994,$(TARGET_BOARD_PLATFORM)),) MY_LOCAL_PATH := $(call my-dir) Loading hal/Android.mk +4 −1 Original line number Diff line number Diff line Loading @@ -8,7 +8,7 @@ LOCAL_ARM_MODE := arm AUDIO_PLATFORM := $(TARGET_BOARD_PLATFORM) ifneq ($(filter msm8974 msm8226 msm8610 apq8084,$(TARGET_BOARD_PLATFORM)),) ifneq ($(filter msm8974 msm8226 msm8610 apq8084 msm8994,$(TARGET_BOARD_PLATFORM)),) # B-family platform uses msm8974 code base AUDIO_PLATFORM = msm8974 MULTIPLE_HW_VARIANTS_ENABLED := true Loading @@ -21,6 +21,9 @@ endif ifneq ($(filter apq8084,$(TARGET_BOARD_PLATFORM)),) LOCAL_CFLAGS := -DPLATFORM_APQ8084 endif ifneq ($(filter msm8994,$(TARGET_BOARD_PLATFORM)),) LOCAL_CFLAGS := -DPLATFORM_MSM8994 endif endif ifneq ($(filter msm8916,$(TARGET_BOARD_PLATFORM)),) Loading hal/msm8974/hw_info.c +62 −0 Original line number Diff line number Diff line Loading @@ -83,6 +83,31 @@ static const snd_device_t taiko_liquid_variant_devices[] = { SND_DEVICE_IN_SPEAKER_STEREO_DMIC, }; static const snd_device_t tomtom_msm8994_CDP_variant_devices[] = { SND_DEVICE_IN_HANDSET_MIC, }; static const snd_device_t tomtom_liquid_variant_devices[] = { SND_DEVICE_OUT_SPEAKER, SND_DEVICE_OUT_SPEAKER_AND_HEADPHONES, SND_DEVICE_OUT_SPEAKER_AND_ANC_HEADSET, SND_DEVICE_IN_SPEAKER_MIC, SND_DEVICE_IN_HEADSET_MIC, SND_DEVICE_IN_VOICE_DMIC, SND_DEVICE_IN_VOICE_SPEAKER_DMIC, SND_DEVICE_IN_VOICE_REC_DMIC_STEREO, SND_DEVICE_IN_VOICE_REC_DMIC_FLUENCE, SND_DEVICE_IN_QUAD_MIC, SND_DEVICE_IN_HANDSET_STEREO_DMIC, SND_DEVICE_IN_SPEAKER_STEREO_DMIC, }; static const snd_device_t tomtom_stp_variant_devices[] = { SND_DEVICE_OUT_SPEAKER, SND_DEVICE_OUT_SPEAKER_AND_HEADPHONES, SND_DEVICE_OUT_SPEAKER_AND_ANC_HEADSET, }; static const snd_device_t taiko_DB_variant_devices[] = { SND_DEVICE_OUT_SPEAKER, SND_DEVICE_OUT_SPEAKER_AND_HEADPHONES, Loading Loading @@ -173,6 +198,37 @@ static void update_hardware_info_8084(struct hardware_info *hw_info, const char } } static void update_hardware_info_8994(struct hardware_info *hw_info, const char *snd_card_name) { if (!strcmp(snd_card_name, "msm8994-tomtom-mtp-snd-card")) { strlcpy(hw_info->type, " mtp", sizeof(hw_info->type)); strlcpy(hw_info->name, "msm8994", sizeof(hw_info->name)); hw_info->snd_devices = NULL; hw_info->num_snd_devices = 0; strlcpy(hw_info->dev_extn, "", sizeof(hw_info->dev_extn)); } else if (!strcmp(snd_card_name, "msm8994-tomtom-cdp-snd-card ")) { strlcpy(hw_info->type, " cdp", sizeof(hw_info->type)); strlcpy(hw_info->name, "msm8994", sizeof(hw_info->name)); hw_info->snd_devices = (snd_device_t *)tomtom_msm8994_CDP_variant_devices; hw_info->num_snd_devices = ARRAY_SIZE(tomtom_msm8994_CDP_variant_devices); strlcpy(hw_info->dev_extn, "-cdp", sizeof(hw_info->dev_extn)); } else if (!strcmp(snd_card_name, "msm8994-tomtom-stp-snd-card ")) { strlcpy(hw_info->type, " stp", sizeof(hw_info->type)); strlcpy(hw_info->name, "msm8994", sizeof(hw_info->name)); hw_info->snd_devices = (snd_device_t *)tomtom_stp_variant_devices; hw_info->num_snd_devices = ARRAY_SIZE(tomtom_stp_variant_devices); strlcpy(hw_info->dev_extn, "-stp", sizeof(hw_info->dev_extn)); } else if (!strcmp(snd_card_name, "msm8994-tomtom-liquid-snd-card ")) { strlcpy(hw_info->type, " liquid", sizeof(hw_info->type)); strlcpy(hw_info->name, "msm8994", sizeof(hw_info->name)); hw_info->snd_devices = (snd_device_t *)tomtom_liquid_variant_devices; hw_info->num_snd_devices = ARRAY_SIZE(tomtom_liquid_variant_devices); strlcpy(hw_info->dev_extn, "-liquid", sizeof(hw_info->dev_extn)); } else { ALOGW("%s: Not an 8994 device", __func__); } } static void update_hardware_info_8974(struct hardware_info *hw_info, const char *snd_card_name) { if (!strcmp(snd_card_name, "msm8974-taiko-mtp-snd-card")) { Loading Loading @@ -273,6 +329,9 @@ void *hw_info_init(const char *snd_card_name) hw_info = malloc(sizeof(struct hardware_info)); hw_info->snd_devices = NULL; hw_info->num_snd_devices = 0; strlcpy(hw_info->dev_extn, "", sizeof(hw_info->dev_extn)); strlcpy(hw_info->type, "", sizeof(hw_info->type)); strlcpy(hw_info->name, "", sizeof(hw_info->name)); if(strstr(snd_card_name, "msm8974") || strstr(snd_card_name, "apq8074")) { Loading @@ -287,6 +346,9 @@ void *hw_info_init(const char *snd_card_name) } else if(strstr(snd_card_name, "apq8084")) { ALOGV("8084 - variant soundcard"); update_hardware_info_8084(hw_info, snd_card_name); } else if(strstr(snd_card_name, "msm8994")) { ALOGV("8994 - variant soundcard"); update_hardware_info_8994(hw_info, snd_card_name); } else { ALOGE("%s: Unsupported target %s:",__func__, snd_card_name); free(hw_info); Loading Loading
Android.mk +1 −1 Original line number Diff line number Diff line ifneq ($(filter mpq8092 msm8960 msm8226 msm8x26 msm8610 msm8974 msm8x74 apq8084 msm8916,$(TARGET_BOARD_PLATFORM)),) ifneq ($(filter mpq8092 msm8960 msm8226 msm8x26 msm8610 msm8974 msm8x74 apq8084 msm8916 msm8994,$(TARGET_BOARD_PLATFORM)),) MY_LOCAL_PATH := $(call my-dir) Loading
hal/Android.mk +4 −1 Original line number Diff line number Diff line Loading @@ -8,7 +8,7 @@ LOCAL_ARM_MODE := arm AUDIO_PLATFORM := $(TARGET_BOARD_PLATFORM) ifneq ($(filter msm8974 msm8226 msm8610 apq8084,$(TARGET_BOARD_PLATFORM)),) ifneq ($(filter msm8974 msm8226 msm8610 apq8084 msm8994,$(TARGET_BOARD_PLATFORM)),) # B-family platform uses msm8974 code base AUDIO_PLATFORM = msm8974 MULTIPLE_HW_VARIANTS_ENABLED := true Loading @@ -21,6 +21,9 @@ endif ifneq ($(filter apq8084,$(TARGET_BOARD_PLATFORM)),) LOCAL_CFLAGS := -DPLATFORM_APQ8084 endif ifneq ($(filter msm8994,$(TARGET_BOARD_PLATFORM)),) LOCAL_CFLAGS := -DPLATFORM_MSM8994 endif endif ifneq ($(filter msm8916,$(TARGET_BOARD_PLATFORM)),) Loading
hal/msm8974/hw_info.c +62 −0 Original line number Diff line number Diff line Loading @@ -83,6 +83,31 @@ static const snd_device_t taiko_liquid_variant_devices[] = { SND_DEVICE_IN_SPEAKER_STEREO_DMIC, }; static const snd_device_t tomtom_msm8994_CDP_variant_devices[] = { SND_DEVICE_IN_HANDSET_MIC, }; static const snd_device_t tomtom_liquid_variant_devices[] = { SND_DEVICE_OUT_SPEAKER, SND_DEVICE_OUT_SPEAKER_AND_HEADPHONES, SND_DEVICE_OUT_SPEAKER_AND_ANC_HEADSET, SND_DEVICE_IN_SPEAKER_MIC, SND_DEVICE_IN_HEADSET_MIC, SND_DEVICE_IN_VOICE_DMIC, SND_DEVICE_IN_VOICE_SPEAKER_DMIC, SND_DEVICE_IN_VOICE_REC_DMIC_STEREO, SND_DEVICE_IN_VOICE_REC_DMIC_FLUENCE, SND_DEVICE_IN_QUAD_MIC, SND_DEVICE_IN_HANDSET_STEREO_DMIC, SND_DEVICE_IN_SPEAKER_STEREO_DMIC, }; static const snd_device_t tomtom_stp_variant_devices[] = { SND_DEVICE_OUT_SPEAKER, SND_DEVICE_OUT_SPEAKER_AND_HEADPHONES, SND_DEVICE_OUT_SPEAKER_AND_ANC_HEADSET, }; static const snd_device_t taiko_DB_variant_devices[] = { SND_DEVICE_OUT_SPEAKER, SND_DEVICE_OUT_SPEAKER_AND_HEADPHONES, Loading Loading @@ -173,6 +198,37 @@ static void update_hardware_info_8084(struct hardware_info *hw_info, const char } } static void update_hardware_info_8994(struct hardware_info *hw_info, const char *snd_card_name) { if (!strcmp(snd_card_name, "msm8994-tomtom-mtp-snd-card")) { strlcpy(hw_info->type, " mtp", sizeof(hw_info->type)); strlcpy(hw_info->name, "msm8994", sizeof(hw_info->name)); hw_info->snd_devices = NULL; hw_info->num_snd_devices = 0; strlcpy(hw_info->dev_extn, "", sizeof(hw_info->dev_extn)); } else if (!strcmp(snd_card_name, "msm8994-tomtom-cdp-snd-card ")) { strlcpy(hw_info->type, " cdp", sizeof(hw_info->type)); strlcpy(hw_info->name, "msm8994", sizeof(hw_info->name)); hw_info->snd_devices = (snd_device_t *)tomtom_msm8994_CDP_variant_devices; hw_info->num_snd_devices = ARRAY_SIZE(tomtom_msm8994_CDP_variant_devices); strlcpy(hw_info->dev_extn, "-cdp", sizeof(hw_info->dev_extn)); } else if (!strcmp(snd_card_name, "msm8994-tomtom-stp-snd-card ")) { strlcpy(hw_info->type, " stp", sizeof(hw_info->type)); strlcpy(hw_info->name, "msm8994", sizeof(hw_info->name)); hw_info->snd_devices = (snd_device_t *)tomtom_stp_variant_devices; hw_info->num_snd_devices = ARRAY_SIZE(tomtom_stp_variant_devices); strlcpy(hw_info->dev_extn, "-stp", sizeof(hw_info->dev_extn)); } else if (!strcmp(snd_card_name, "msm8994-tomtom-liquid-snd-card ")) { strlcpy(hw_info->type, " liquid", sizeof(hw_info->type)); strlcpy(hw_info->name, "msm8994", sizeof(hw_info->name)); hw_info->snd_devices = (snd_device_t *)tomtom_liquid_variant_devices; hw_info->num_snd_devices = ARRAY_SIZE(tomtom_liquid_variant_devices); strlcpy(hw_info->dev_extn, "-liquid", sizeof(hw_info->dev_extn)); } else { ALOGW("%s: Not an 8994 device", __func__); } } static void update_hardware_info_8974(struct hardware_info *hw_info, const char *snd_card_name) { if (!strcmp(snd_card_name, "msm8974-taiko-mtp-snd-card")) { Loading Loading @@ -273,6 +329,9 @@ void *hw_info_init(const char *snd_card_name) hw_info = malloc(sizeof(struct hardware_info)); hw_info->snd_devices = NULL; hw_info->num_snd_devices = 0; strlcpy(hw_info->dev_extn, "", sizeof(hw_info->dev_extn)); strlcpy(hw_info->type, "", sizeof(hw_info->type)); strlcpy(hw_info->name, "", sizeof(hw_info->name)); if(strstr(snd_card_name, "msm8974") || strstr(snd_card_name, "apq8074")) { Loading @@ -287,6 +346,9 @@ void *hw_info_init(const char *snd_card_name) } else if(strstr(snd_card_name, "apq8084")) { ALOGV("8084 - variant soundcard"); update_hardware_info_8084(hw_info, snd_card_name); } else if(strstr(snd_card_name, "msm8994")) { ALOGV("8994 - variant soundcard"); update_hardware_info_8994(hw_info, snd_card_name); } else { ALOGE("%s: Unsupported target %s:",__func__, snd_card_name); free(hw_info); Loading