Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1e6978e9 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "hal: add support to compile audio hal for qcs405" into audio-hal.lnx.4.0

parents 0e6400bb 75c9a0c5
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -85,6 +85,10 @@ if (test x$TARGET_SUPPORT = xqcs605); then
         AC_SUBST([TARGET_PLATFORM], ["msm8974"])
         TARGET_CFLAGS=" -DPLATFORM_QCS605"
fi
if (test x$TARGET_SUPPORT = xqcs40x); then
         AC_SUBST([TARGET_PLATFORM], ["msm8974"])
         TARGET_CFLAGS=" -DPLATFORM_QCS405"
fi

AC_SUBST([TARGET_CFLAGS])

+1 −1
Original line number Diff line number Diff line
@@ -55,7 +55,7 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.*/
#define HFP_RX_VOLUME     "SEC AUXPCM LOOPBACK Volume"
#elif defined PLATFORM_MSM8996
#define HFP_RX_VOLUME     "PRI AUXPCM LOOPBACK Volume"
#elif defined (PLATFORM_MSM8998) || defined (PLATFORM_MSMFALCON) || defined (PLATFORM_SDM845) || defined (PLATFORM_SDM670) || defined (PLATFORM_QCS605) || defined (PLATFORM_MSMNILE)
#elif defined (PLATFORM_MSM8998) || defined (PLATFORM_MSMFALCON) || defined (PLATFORM_SDM845) || defined (PLATFORM_SDM670) || defined (PLATFORM_QCS605) || defined (PLATFORM_MSMNILE) || defined (PLATFORM_QCS405)
#define HFP_RX_VOLUME     "SLIMBUS_7 LOOPBACK Volume"
#else
#define HFP_RX_VOLUME     "Internal HFP RX Volume"
+5 −1
Original line number Diff line number Diff line
@@ -542,6 +542,9 @@ static void update_hardware_info_bear(struct hardware_info *hw_info, const char
    if (!strncmp(snd_card_name, "sdm660-snd-card",
                 sizeof("sdm660-snd-card")))
        strlcpy(hw_info->name, "sdm660", sizeof(hw_info->name));
    if (!strncmp(snd_card_name, "qcs405-sku1-snd-card",
                 sizeof("qcs405-sku1-snd-card")))
        strlcpy(hw_info->name, "qcs405", sizeof(hw_info->name));
    if (!strncmp(snd_card_name, "qcs605-lc-snd-card",
                 sizeof("qcs605-lc-snd-card")))
        strlcpy(hw_info->name, "qcs605-lc", sizeof(hw_info->name));
@@ -600,7 +603,8 @@ void *hw_info_init(const char *snd_card_name)
    } else if(strstr(snd_card_name, "sdm845")) {
        ALOGV("SDM845 - variant soundcard");
        update_hardware_info_sdm845(hw_info, snd_card_name);
    } else if (strstr(snd_card_name, "sdm660") || strstr(snd_card_name, "sdm670") || strstr(snd_card_name, "qcs605-lc")) {
    } else if (strstr(snd_card_name, "sdm660") || strstr(snd_card_name, "sdm670") ||
        strstr(snd_card_name, "qcs605-lc") || strstr(snd_card_name, "qcs405")) {
        ALOGV("Bear - variant soundcard");
        update_hardware_info_bear(hw_info, snd_card_name);
    } else if (strstr(snd_card_name, "sdx")) {
+17 −6
Original line number Diff line number Diff line
@@ -77,7 +77,7 @@
#endif

#include <linux/msm_audio.h>
#if defined (PLATFORM_MSM8998) || (PLATFORM_SDM845) || (PLATFORM_SDM670) || defined (PLATFORM_QCS605) || defined (PLATFORM_MSMNILE)
#if defined (PLATFORM_MSM8998) || (PLATFORM_SDM845) || (PLATFORM_SDM670) || defined (PLATFORM_QCS605) || defined (PLATFORM_MSMNILE) || defined (PLATFORM_QCS405)
#include <sound/devdep_params.h>
#endif

@@ -2408,11 +2408,22 @@ acdb_init_fail:
            strdup("INT0_MI2S_RX SampleRate");

    } else {
        if (!strncmp(snd_card_name, "qcs405", strlen("qcs405"))) {
            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 =
                strdup("WSA_CDC_DMA_RX_0 SampleRate");

            my_data->current_backend_cfg[DEFAULT_CODEC_TX_BACKEND].bitwidth_mixer_ctl =
                strdup("VA_CDC_DMA_TX_0 Format");
            my_data->current_backend_cfg[DEFAULT_CODEC_TX_BACKEND].samplerate_mixer_ctl =
                strdup("VA_CDC_DMA_TX_0 SampleRate");
        } else {
            my_data->current_backend_cfg[DEFAULT_CODEC_TX_BACKEND].bitwidth_mixer_ctl =
                strdup("SLIM_0_TX Format");
            my_data->current_backend_cfg[DEFAULT_CODEC_TX_BACKEND].samplerate_mixer_ctl =
                strdup("SLIM_0_TX SampleRate");
        }
        my_data->current_backend_cfg[HEADPHONE_BACKEND].bitwidth_mixer_ctl =
            strdup("SLIM_6_RX Format");
        my_data->current_backend_cfg[HEADPHONE_BACKEND].samplerate_mixer_ctl =
@@ -7913,7 +7924,7 @@ int platform_get_supported_copp_sampling_rate(uint32_t stream_sr)
    return sample_rate;
}

#if defined (PLATFORM_MSM8998) || (PLATFORM_SDM845) || (PLATFORM_SDM670) || defined (PLATFORM_QCS605) || defined (PLATFORM_MSMNILE)
#if defined (PLATFORM_MSM8998) || (PLATFORM_SDM845) || (PLATFORM_SDM670) || defined (PLATFORM_QCS605) || defined (PLATFORM_MSMNILE) || defined (PLATFORM_QCS405)
int platform_get_mmap_data_fd(void *platform, int fe_dev, int dir, int *fd,
                              uint32_t *size)
{
+3 −3
Original line number Diff line number Diff line
@@ -371,11 +371,11 @@ enum {
#define PLAYBACK_OFFLOAD_DEVICE 9

// Direct_PCM
#if defined (PLATFORM_MSM8994) || defined (PLATFORM_MSM8996) || defined (PLATFORM_APQ8084) || defined (PLATFORM_MSM8998) || defined (PLATFORM_SDM845) || defined (PLATFORM_SDM670) ||defined (PLATFORM_QCS605) ||defined (PLATFORM_SDX24) || defined (PLATFORM_MSMNILE)
#if defined (PLATFORM_MSM8994) || defined (PLATFORM_MSM8996) || defined (PLATFORM_APQ8084) || defined (PLATFORM_MSM8998) || defined (PLATFORM_SDM845) || defined (PLATFORM_SDM670) ||defined (PLATFORM_QCS605) ||defined (PLATFORM_SDX24) || defined (PLATFORM_MSMNILE) || defined (PLATFORM_QCS405)
#define PLAYBACK_OFFLOAD_DEVICE2 17
#endif

#if defined (PLATFORM_APQ8084) || defined (PLATFORM_MSM8996) || defined (PLATFORM_MSM8998) || defined (PLATFORM_SDM845) || defined (PLATFORM_SDM670) || defined(PLATFORM_QCS605) || defined (PLATFORM_SDX24) || defined (PLATFORM_MSMNILE)
#if defined (PLATFORM_APQ8084) || defined (PLATFORM_MSM8996) || defined (PLATFORM_MSM8998) || defined (PLATFORM_SDM845) || defined (PLATFORM_SDM670) || defined(PLATFORM_QCS605) || defined (PLATFORM_SDX24) || defined (PLATFORM_MSMNILE) || defined (PLATFORM_QCS405)
#define PLAYBACK_OFFLOAD_DEVICE3 18
#define PLAYBACK_OFFLOAD_DEVICE4 34
#define PLAYBACK_OFFLOAD_DEVICE5 35
@@ -500,7 +500,7 @@ enum {
#define FM_RX_VOLUME "PRI MI2S LOOPBACK Volume"
#elif PLATFORM_MSM8996
#define FM_RX_VOLUME "Tert MI2S LOOPBACK Volume"
#elif defined (PLATFORM_MSM8998) || defined (PLATFORM_SDM845) || defined (PLATFORM_MSMFALCON) || defined (PLATFORM_SDM670) || defined (PLATFORM_QCS605) || defined (PLATFORM_MSMNILE)
#elif defined (PLATFORM_MSM8998) || defined (PLATFORM_SDM845) || defined (PLATFORM_MSMFALCON) || defined (PLATFORM_SDM670) || defined (PLATFORM_QCS605) || defined (PLATFORM_MSMNILE) || defined (PLATFORM_QCS405)
#define FM_RX_VOLUME "SLIMBUS_8 LOOPBACK Volume"
#else
#define FM_RX_VOLUME "Internal FM RX Volume"