diff options
author | Linux Build Service Account <lnxbuild@localhost> | 2019-01-10 22:11:39 -0800 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2019-01-10 22:11:39 -0800 |
commit | c914d503498844b66e826fbf981bab35d19b1b69 (patch) | |
tree | cb030a86cda88d445336f5c5f7436b92e4fd9c5b /hal/msm8974/platform.c | |
parent | b31e7f4be7ae373f26b6e752ba38058c3d1ccbd4 (diff) | |
parent | 74ace55bc210ddb3925a20f4760ae0a59aa513ea (diff) | |
download | hardware_qcom_audio-c914d503498844b66e826fbf981bab35d19b1b69.tar.gz hardware_qcom_audio-c914d503498844b66e826fbf981bab35d19b1b69.tar.bz2 hardware_qcom_audio-c914d503498844b66e826fbf981bab35d19b1b69.zip |
Merge "hal: add audio support for kona"
Diffstat (limited to 'hal/msm8974/platform.c')
-rw-r--r-- | hal/msm8974/platform.c | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/hal/msm8974/platform.c b/hal/msm8974/platform.c index 13315e28..0a77e5b8 100644 --- a/hal/msm8974/platform.c +++ b/hal/msm8974/platform.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2018, The Linux Foundation. All rights reserved. + * Copyright (c) 2013-2019, The Linux Foundation. All rights reserved. * Not a Contribution. * * Copyright (C) 2013 The Android Open Source Project @@ -80,7 +80,10 @@ #endif #include <linux/msm_audio.h> -#if defined (PLATFORM_MSM8998) || (PLATFORM_SDM845) || (PLATFORM_SDM710) || defined (PLATFORM_QCS605) || defined (PLATFORM_MSMNILE) || defined (PLATFORM_MSMSTEPPE) || defined (PLATFORM_TRINKET) +#if defined (PLATFORM_MSM8998) || (PLATFORM_SDM845) || (PLATFORM_SDM710) || \ + defined (PLATFORM_QCS605) || defined (PLATFORM_MSMNILE) || \ + defined (PLATFORM_MSMSTEPPE) || defined (PLATFORM_TRINKET) || \ + defined (PLATFORM_KONA) #include <sound/devdep_params.h> #endif @@ -1094,7 +1097,11 @@ static void update_codec_type_and_interface(struct platform_data * my_data, cons !strncmp(snd_card_name, "sm6150-wcd9375-snd-card", sizeof("sm6150-wcd9375-snd-card")) || !strncmp(snd_card_name, "sm6150-wcd9375qrd-snd-card", - sizeof("sm6150-wcd9375qrd-snd-card"))) { + sizeof("sm6150-wcd9375qrd-snd-card")) || + !strncmp(snd_card_name, "kona-mtp-snd-card", + sizeof("kona-mtp-snd-card")) || + !strncmp(snd_card_name, "kona-qrd-snd-card", + sizeof("kona-qrd-snd-card"))) { ALOGI("%s: snd_card_name: %s",__func__,snd_card_name); my_data->is_internal_codec = true; my_data->is_slimbus_interface = false; @@ -2269,6 +2276,9 @@ void *platform_init(struct audio_device *adev) else if (!strncmp(snd_card_name, "sm6150-wcd9375qrd-snd-card", sizeof("sm6150-wcd9375qrd-snd-card"))) platform_info_init(PLATFORM_INFO_XML_PATH_QRD, my_data, PLATFORM); + else if (!strncmp(snd_card_name, "kona-qrd-snd-card", + sizeof("kona-qrd-snd-card"))) + platform_info_init(PLATFORM_INFO_XML_PATH_QRD, my_data, PLATFORM); else if (my_data->is_internal_codec) platform_info_init(PLATFORM_INFO_XML_PATH_INTCODEC, my_data, PLATFORM); else @@ -2489,7 +2499,8 @@ acdb_init_fail: if (!my_data->is_slimbus_interface) { //TODO:: make generic interfaceface to check Slimbus/I2S/CDC_DMA - if (!strncmp(snd_card_name, "sm6150", strlen("sm6150"))) { + if (!strncmp(snd_card_name, "sm6150", strlen("sm6150")) || + !strncmp(snd_card_name, "kona", strlen("kona"))) { my_data->current_backend_cfg[DEFAULT_CODEC_BACKEND].bitwidth_mixer_ctl = strdup("WSA_CDC_DMA_RX_0 Format"); my_data->current_backend_cfg[DEFAULT_CODEC_BACKEND].samplerate_mixer_ctl = @@ -8145,7 +8156,10 @@ int platform_get_supported_copp_sampling_rate(uint32_t stream_sr) return sample_rate; } -#if defined (PLATFORM_MSM8998) || (PLATFORM_SDM845) || (PLATFORM_SDM710) || defined (PLATFORM_QCS605) || defined (PLATFORM_MSMNILE) || defined (PLATFORM_MSMSTEPPE) || defined (PLATFORM_TRINKET) +#if defined (PLATFORM_MSM8998) || (PLATFORM_SDM845) || (PLATFORM_SDM710) || \ + defined (PLATFORM_QCS605) || defined (PLATFORM_MSMNILE) || \ + defined (PLATFORM_MSMSTEPPE) || defined (PLATFORM_TRINKET) || \ + defined (PLATFORM_KONA) int platform_get_mmap_data_fd(void *platform, int fe_dev, int dir, int *fd, uint32_t *size) { |