diff --git a/techpack/audio/Makefile b/techpack/audio/Makefile index d60a0236f5ee..73ad150b67ec 100644 --- a/techpack/audio/Makefile +++ b/techpack/audio/Makefile @@ -30,6 +30,9 @@ endif ifeq ($(CONFIG_ARCH_SA6155), y) include $(srctree)/techpack/audio/config/sa6155auto.conf endif +ifeq ($(CONFIG_ARCH_SM6150), y) +include $(srctree)/techpack/audio/config/sm6150auto.conf +endif endif # Use USERINCLUDE when you must reference the UAPI directories only. USERINCLUDE += \ @@ -79,7 +82,10 @@ ifeq ($(CONFIG_ARCH_SA6155), y) LINUXINCLUDE += \ -include $(srctree)/techpack/audio/config/sa6155autoconf.h endif - +ifeq ($(CONFIG_ARCH_SM6150), y) +LINUXINCLUDE += \ + -include $(srctree)/techpack/audio/config/sm6150autoconf.h +endif obj-y += soc/ obj-y += dsp/ obj-y += ipc/ diff --git a/techpack/audio/Makefile.am b/techpack/audio/Makefile.am index 25c1e0e83d2a..5e3faccf5492 100755 --- a/techpack/audio/Makefile.am +++ b/techpack/audio/Makefile.am @@ -26,6 +26,7 @@ obj-m += asoc/ obj-m += asoc/codecs/ ifeq ($(TARGET_SUPPORT), $(filter $(TARGET_SUPPORT), sdmsteppe)) obj-m += asoc/codecs/wcd934x/ +KBUILD_CFLAGS += -Wno-error endif ifeq ($(TARGET_SUPPORT), $(filter $(TARGET_SUPPORT), qcs40x)) obj-m += asoc/codecs/bolero/ @@ -43,20 +44,20 @@ obj-m += asoc/codecs/bolero/ obj-m += asoc/codecs/wcd937x/ endif -ifeq ($(TARGET_SUPPORT), $(filter $(TARGET_SUPPORT), sa8155 sa8155ivi sa6155 sa8195 qtiquingvm qtiquingvm8295)) +ifeq ($(TARGET_SUPPORT), $(filter $(TARGET_SUPPORT), sa8155 sa8155ivi sa6155 sa8195 qtiquingvm qtiquingvm8295 sa8295 qtigvmi3)) KBUILD_OPTIONS += CONFIG_SND_SOC_AUTO=y obj-m := ipc/ obj-m += dsp/ obj-m += asoc/ obj-m += asoc/codecs/ obj-m += soc/ -ifeq ($(TARGET_SUPPORT), $(filter $(TARGET_SUPPORT), sa8155 sa8155ivi sa8195)) +ifeq ($(TARGET_SUPPORT), $(filter $(TARGET_SUPPORT), sa8155 sa8155ivi sa8195 sa8295)) KBUILD_OPTIONS += CONFIG_SND_SOC_SA8155=m endif ifeq ($(TARGET_SUPPORT), $(filter $(TARGET_SUPPORT), sa6155)) KBUILD_OPTIONS += CONFIG_SND_SOC_SA6155=m endif -ifeq ($(TARGET_SUPPORT), $(filter $(TARGET_SUPPORT), qtiquingvm)) +ifeq ($(TARGET_SUPPORT), $(filter $(TARGET_SUPPORT), qtiquingvm qtigvmi3)) KBUILD_OPTIONS += CONFIG_SND_SOC_GVM=m endif ifeq ($(TARGET_SUPPORT), $(filter $(TARGET_SUPPORT), qtiquingvm8295)) diff --git a/techpack/audio/asoc/Kbuild b/techpack/audio/asoc/Kbuild index f59beb058c3a..8f105ae11d28 100644 --- a/techpack/audio/asoc/Kbuild +++ b/techpack/audio/asoc/Kbuild @@ -136,7 +136,6 @@ endif # for SM6150 sound card driver ifdef CONFIG_SND_SOC_SM6150 MACHINE_OBJS += sm6150.o - MACHINE_OBJS += machine_615x_init.o endif # For sa6155 sound card driver @@ -211,11 +210,19 @@ ifdef CONFIG_SND_SOC_QDSP6V2 PLATFORM_OBJS += msm-pcm-loopback-v2.o PLATFORM_OBJS += msm-pcm-q6-noirq.o PLATFORM_OBJS += msm-pcm-q6-v2.o - PLATFORM_OBJS += msm-pcm-routing-v2.o - PLATFORM_OBJS += msm-pcm-voice-v2.o - PLATFORM_OBJS += msm-pcm-voip-v2.o + ifeq (y,$(findstring y,$(CONFIG_QTI_QUIN_GVM) $(CONFIG_PLATFORM_AUTO))) + PLATFORM_OBJS += msm-pcm-routing-auto.o + else + PLATFORM_OBJS += msm-pcm-routing-v2.o + PLATFORM_OBJS += msm-pcm-voice-v2.o + PLATFORM_OBJS += msm-pcm-voip-v2.o + endif PLATFORM_OBJS += msm-transcode-loopback-q6-v2.o - PLATFORM_OBJS += platform_init.o + ifeq (y,$(findstring y,$(CONFIG_QTI_QUIN_GVM) $(CONFIG_PLATFORM_AUTO))) + PLATFORM_OBJS += platform_init_auto.o + else + PLATFORM_OBJS += platform_init.o + endif endif ifdef CONFIG_WCD9XXX_CODEC_CORE PLATFORM_OBJS += msm-dai-slim.o diff --git a/techpack/audio/asoc/bengal.c b/techpack/audio/asoc/bengal.c old mode 100644 new mode 100755 index 42eeade28882..227a75ad2642 --- a/techpack/audio/asoc/bengal.c +++ b/techpack/audio/asoc/bengal.c @@ -1,6 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-only /* * Copyright (c) 2016-2021, The Linux Foundation. All rights reserved. + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. */ #include @@ -557,6 +558,7 @@ static void *def_wcd_mbhc_cal(void); static void *def_rouleur_mbhc_cal(void); static int msm_int_audrx_init(struct snd_soc_pcm_runtime*); +static int msm_aux_codec_init(struct snd_soc_pcm_runtime*); /* * Need to report LINEIN @@ -930,8 +932,6 @@ static int usb_audio_tx_format_get(struct snd_kcontrol *kcontrol, static int usb_audio_tx_format_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { - int rc = 0; - switch (ucontrol->value.integer.value[0]) { case 3: usb_tx_cfg.bit_format = SNDRV_PCM_FORMAT_S32_LE; @@ -951,7 +951,7 @@ static int usb_audio_tx_format_put(struct snd_kcontrol *kcontrol, __func__, usb_tx_cfg.bit_format, ucontrol->value.integer.value[0]); - return rc; + return 0; } static int usb_audio_rx_ch_get(struct snd_kcontrol *kcontrol, @@ -2098,7 +2098,8 @@ static int msm_mi2s_set_sclk(struct snd_pcm_substream *substream, bool enable) struct snd_soc_pcm_runtime *rtd = substream->private_data; struct snd_soc_dai *cpu_dai = rtd->cpu_dai; int port_id = 0; - int index = cpu_dai->id; + /* Rx and Tx DAIs should use same clk index */ + int index = (cpu_dai->id) / 2; port_id = msm_get_port_id(rtd->dai_link->id); if (port_id < 0) { @@ -3931,7 +3932,8 @@ static int msm_mi2s_snd_startup(struct snd_pcm_substream *substream) int ret = 0; struct snd_soc_pcm_runtime *rtd = substream->private_data; struct snd_soc_dai *cpu_dai = rtd->cpu_dai; - int index = cpu_dai->id; + /* Rx and Tx DAIs should use same clk index */ + int index = (cpu_dai->id) / 2; unsigned int fmt = SND_SOC_DAIFMT_CBS_CFS; struct snd_soc_card *card = rtd->card; struct msm_asoc_mach_data *pdata = snd_soc_card_get_drvdata(card); @@ -3956,10 +3958,8 @@ static int msm_mi2s_snd_startup(struct snd_pcm_substream *substream) mutex_lock(&mi2s_intf_conf[index].lock); if (++mi2s_intf_conf[index].ref_cnt == 1) { /* Check if msm needs to provide the clock to the interface */ - if (!mi2s_intf_conf[index].msm_is_mi2s_master) { + if (!mi2s_intf_conf[index].msm_is_mi2s_master) mi2s_clk[index].clk_id = mi2s_ebit_clk[index]; - fmt = SND_SOC_DAIFMT_CBM_CFM; - } ret = msm_mi2s_set_sclk(substream, true); if (ret < 0) { dev_err(rtd->card->dev, @@ -3968,12 +3968,6 @@ static int msm_mi2s_snd_startup(struct snd_pcm_substream *substream) goto clean_up; } - ret = snd_soc_dai_set_fmt(cpu_dai, fmt); - if (ret < 0) { - pr_err("%s: set fmt cpu dai failed for MI2S (%d), err:%d\n", - __func__, index, ret); - goto clk_off; - } if (pdata->mi2s_gpio_p[index]) { if (atomic_read(&(pdata->mi2s_gpio_ref_count[index])) == 0) { @@ -3988,6 +3982,14 @@ static int msm_mi2s_snd_startup(struct snd_pcm_substream *substream) atomic_inc(&(pdata->mi2s_gpio_ref_count[index])); } } + if (!mi2s_intf_conf[index].msm_is_mi2s_master) + fmt = SND_SOC_DAIFMT_CBM_CFM; + ret = snd_soc_dai_set_fmt(cpu_dai, fmt); + if (ret < 0) { + pr_err("%s: set fmt cpu dai failed for MI2S (%d), err:%d\n", + __func__, index, ret); + goto clk_off; + } clk_off: if (ret < 0) msm_mi2s_set_sclk(substream, false); @@ -4003,7 +4005,8 @@ static void msm_mi2s_snd_shutdown(struct snd_pcm_substream *substream) { int ret = 0; struct snd_soc_pcm_runtime *rtd = substream->private_data; - int index = rtd->cpu_dai->id; + /* Rx and Tx DAIs should use same clk index */ + int index = (rtd->cpu_dai->id) / 2; struct snd_soc_card *card = rtd->card; struct msm_asoc_mach_data *pdata = snd_soc_card_get_drvdata(card); @@ -4259,25 +4262,19 @@ static void msm_add_auxpcm_snd_controls(struct snd_soc_component *component) static int msm_int_audrx_init(struct snd_soc_pcm_runtime *rtd) { - int ret = -EINVAL; - struct snd_soc_component *component; - struct snd_soc_component *bolero_component = NULL; - struct snd_soc_dapm_context *dapm; - struct snd_card *card; - struct snd_info_entry *entry; - struct platform_device *pdev = NULL; - int i = 0; - char *data = NULL; + struct snd_soc_component *component = NULL; + struct snd_soc_dapm_context *dapm = NULL; + struct snd_card *card = NULL; + struct snd_info_entry *entry = NULL; struct msm_asoc_mach_data *pdata = snd_soc_card_get_drvdata(rtd->card); + int ret = -EINVAL; component = snd_soc_rtdcom_lookup(rtd, "bolero_codec"); if (!component) { pr_err("%s: could not find component for bolero_codec\n", __func__); return ret; - } else { - bolero_component = component; } dapm = snd_soc_component_get_dapm(component); @@ -4332,6 +4329,29 @@ static int msm_int_audrx_init(struct snd_soc_pcm_runtime *rtd) bolero_info_create_codec_entry(pdata->codec_root, component); bolero_register_wake_irq(component, false); +err: + return ret; +} + +static int msm_aux_codec_init(struct snd_soc_pcm_runtime *rtd) +{ + int ret = -EINVAL; + struct snd_soc_component *component = NULL; + struct snd_soc_component *bolero_component = NULL; + struct snd_soc_dapm_context *dapm = NULL; + struct snd_card *card = NULL; + struct snd_info_entry *entry; + char *data = NULL; + struct msm_asoc_mach_data *pdata = + snd_soc_card_get_drvdata(rtd->card); + + bolero_component = snd_soc_rtdcom_lookup(rtd, "bolero_codec"); + if (!bolero_component) { + pr_err("%s: could not find component for bolero_codec\n", + __func__); + return -EINVAL; + } + component = snd_soc_rtdcom_lookup(rtd, ROULEUR_DRV_NAME); if (!component) component = snd_soc_rtdcom_lookup(rtd, WCD937X_DRV_NAME); @@ -4355,6 +4375,18 @@ static int msm_int_audrx_init(struct snd_soc_pcm_runtime *rtd) snd_soc_dapm_ignore_suspend(dapm, "AMIC4"); snd_soc_dapm_sync(dapm); + if (!pdata->codec_root) { + entry = msm_snd_info_create_subdir(card->module, "codecs", + card->proc_root); + if (!entry) { + dev_dbg(component->dev, "%s: Cannot create codecs module entry\n", + __func__); + ret = 0; + goto err; + } + pdata->codec_root = entry; + } + if (wcd_datalane_mismatch) { bolero_set_port_map(component, ARRAY_SIZE(sm_port_map_khaje), @@ -4951,6 +4983,17 @@ static struct snd_soc_dai_link msm_common_misc_fe_dai_links[] = { .ops = &msm_cdc_dma_be_ops, SND_SOC_DAILINK_REG(tx_cdcdma5_tx), }, + {/* hw:x,39 */ + .name = "TX4_CDC_DMA Hostless", + .stream_name = "TX4_CDC_DMA Hostless", + .dynamic = 1, + .dpcm_capture = 1, + .trigger = {SND_SOC_DPCM_TRIGGER_POST, + SND_SOC_DPCM_TRIGGER_POST}, + .no_host_mode = SND_SOC_DAI_LINK_NO_HOST, + .ignore_suspend = 1, + SND_SOC_DAILINK_REG(tx4_cdcdma_hostless), + }, }; static struct snd_soc_dai_link msm_common_be_dai_links[] = { @@ -5391,7 +5434,7 @@ static struct snd_soc_dai_link msm_rx_tx_cdc_dma_be_dai_links[] = { .ignore_suspend = 1, .ops = &msm_cdc_dma_be_ops, SND_SOC_DAILINK_REG(rx_dma_rx0), - .init = &msm_int_audrx_init, + .init = &msm_aux_codec_init, }, { .name = LPASS_BE_RX_CDC_DMA_RX_1, @@ -5469,12 +5512,12 @@ static struct snd_soc_dai_link msm_va_cdc_dma_be_dai_links[] = { .stream_name = "VA CDC DMA0 Capture", .no_pcm = 1, .dpcm_capture = 1, - .init = &msm_int_audrx_init, .id = MSM_BACKEND_DAI_VA_CDC_DMA_TX_0, .be_hw_params_fixup = msm_be_hw_params_fixup, .ignore_suspend = 1, .ops = &msm_cdc_dma_be_ops, SND_SOC_DAILINK_REG(va_dma_tx0), + .init = &msm_int_audrx_init, }, { .name = LPASS_BE_VA_CDC_DMA_TX_1, diff --git a/techpack/audio/asoc/codecs/Kbuild b/techpack/audio/asoc/codecs/Kbuild index 52d20d667a20..0e842ee1bf6c 100755 --- a/techpack/audio/asoc/codecs/Kbuild +++ b/techpack/audio/asoc/codecs/Kbuild @@ -147,6 +147,7 @@ ifdef CONFIG_WCD9XXX_CODEC_CORE WCD9XXX_OBJS += wcd9xxx-resmgr-v2.o WCD9XXX_OBJS += wcd-dsp-utils.o WCD9XXX_OBJS += wcd-dsp-mgr.o + WCD9XXX_OBJS += wcd-clsh.o else WCD9XXX_OBJS += wcd-clsh.o endif diff --git a/techpack/audio/asoc/codecs/audio-ext-clk-up.c b/techpack/audio/asoc/codecs/audio-ext-clk-up.c index acd00da91404..f3e9b694c5b5 100644 --- a/techpack/audio/asoc/codecs/audio-ext-clk-up.c +++ b/techpack/audio/asoc/codecs/audio-ext-clk-up.c @@ -1,5 +1,6 @@ // SPDX-License-Identifier: GPL-2.0-only /* Copyright (c) 2015-2020, The Linux Foundation. All rights reserved. + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. */ #include @@ -58,6 +59,8 @@ struct audio_ext_clk_priv { uint32_t lpass_audio_hwvote_client_handle; }; +static struct audio_ext_clk audio_clk_array[]; + static inline struct audio_ext_clk_priv *to_audio_clk(struct clk_hw *hw) { return container_of(hw, struct audio_ext_clk_priv, audio_clk.fact.hw); @@ -137,8 +140,8 @@ static u8 audio_ext_clk_get_parent(struct clk_hw *hw) { struct audio_ext_clk_priv *clk_priv = to_audio_clk(hw); int num_parents = clk_hw_get_num_parents(hw); - const char * const *parent_names = hw->init->parent_names; - u8 i = 0, ret = hw->init->num_parents + 1; + const char * const *parent_names = audio_clk_array[clk_priv->clk_src].fact.hw.init->parent_names; + u8 i = 0, ret = num_parents + 1; if ((clk_priv->clk_src == AUDIO_EXT_CLK_PMI) && clk_priv->clk_name) { for (i = 0; i < num_parents; i++) { diff --git a/techpack/audio/asoc/codecs/bolero/va-macro.c b/techpack/audio/asoc/codecs/bolero/va-macro.c index 7547f486248e..53a4ffe5053b 100644 --- a/techpack/audio/asoc/codecs/bolero/va-macro.c +++ b/techpack/audio/asoc/codecs/bolero/va-macro.c @@ -1,5 +1,6 @@ // SPDX-License-Identifier: GPL-2.0-only /* Copyright (c) 2018-2021, The Linux Foundation. All rights reserved. + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. */ #include @@ -184,6 +185,7 @@ struct va_macro_priv { int dec_mode[VA_MACRO_NUM_DECIMATORS]; u16 current_clk_id; int pcm_rate[VA_MACRO_NUM_DECIMATORS]; + bool dev_up; }; static bool va_macro_get_data(struct snd_soc_component *component, @@ -329,6 +331,7 @@ static int va_macro_event_handler(struct snd_soc_component *component, trace_printk("%s, enter SSR up\n", __func__); /* reset swr after ssr/pdr */ va_priv->reset_swr = true; + va_priv->dev_up = true; if (va_priv->swr_ctrl_data) swrm_wcd_notify( va_priv->swr_ctrl_data[0].va_swr_pdev, @@ -338,6 +341,8 @@ static int va_macro_event_handler(struct snd_soc_component *component, bolero_rsc_clk_reset(va_dev, VA_CORE_CLK); break; case BOLERO_MACRO_EVT_SSR_DOWN: + trace_printk("%s: BOLERO_MACRO_EVT_SSR_DOWN\n", __func__); + va_priv->dev_up = false; if (va_priv->swr_ctrl_data) { swrm_wcd_notify( va_priv->swr_ctrl_data[0].va_swr_pdev, @@ -441,9 +446,7 @@ static int va_macro_swr_pwr_event_v2(struct snd_soc_dapm_widget *w, } break; case SND_SOC_DAPM_POST_PMD: - if (va_priv->current_clk_id == VA_CORE_CLK && - va_priv->va_swr_clk_cnt != 0 && - va_priv->tx_clk_status) { + if (va_priv->current_clk_id == VA_CORE_CLK) { ret = bolero_clk_rsc_request_clock(va_priv->dev, va_priv->default_clk_id, TX_CORE_CLK, @@ -452,7 +455,8 @@ static int va_macro_swr_pwr_event_v2(struct snd_soc_dapm_widget *w, dev_dbg(component->dev, "%s: request clock TX_CLK disable failed\n", __func__); - break; + if (va_priv->dev_up) + break; } ret = bolero_clk_rsc_request_clock(va_priv->dev, va_priv->default_clk_id, @@ -462,10 +466,11 @@ static int va_macro_swr_pwr_event_v2(struct snd_soc_dapm_widget *w, dev_dbg(component->dev, "%s: request clock VA_CLK disable failed\n", __func__); - bolero_clk_rsc_request_clock(va_priv->dev, - TX_CORE_CLK, - TX_CORE_CLK, - false); + if (va_priv->dev_up) + bolero_clk_rsc_request_clock(va_priv->dev, + TX_CORE_CLK, + TX_CORE_CLK, + false); break; } va_priv->current_clk_id = TX_CORE_CLK; @@ -704,6 +709,10 @@ static int va_macro_tx_va_mclk_enable(struct va_macro_priv *va_priv, TX_CORE_CLK, false); if (ret < 0) { + if (va_priv->swr_clk_users == 0) { + msm_cdc_pinctrl_select_sleep_state( + va_priv->va_swr_gpio_p); + } dev_err_ratelimited(va_priv->dev, "%s: swr request clk failed\n", __func__); @@ -2839,6 +2848,8 @@ static int va_macro_init(struct snd_soc_component *component) } snd_soc_dapm_sync(dapm); + va_priv->dev_up = true; + for (i = 0; i < VA_MACRO_NUM_DECIMATORS; i++) { va_priv->va_hpf_work[i].va_priv = va_priv; va_priv->va_hpf_work[i].decimator = i; diff --git a/techpack/audio/asoc/codecs/msm_stub.c b/techpack/audio/asoc/codecs/msm_stub.c index cf91f2a6de1b..69fa6bf62b5e 100644 --- a/techpack/audio/asoc/codecs/msm_stub.c +++ b/techpack/audio/asoc/codecs/msm_stub.c @@ -1,5 +1,6 @@ // SPDX-License-Identifier: GPL-2.0-only /* Copyright (c) 2011-2014, 2017-2019 The Linux Foundation. All rights reserved. + * Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved. */ #include #include @@ -18,7 +19,7 @@ static struct snd_soc_dai_driver msm_stub_dais[] = { .playback = { /* Support maximum range */ .stream_name = "Playback", .channels_min = 1, - .channels_max = 8, + .channels_max = 32, .rates = SNDRV_PCM_RATE_8000_48000, .formats = SNDRV_PCM_FMTBIT_S16_LE, }, @@ -28,7 +29,7 @@ static struct snd_soc_dai_driver msm_stub_dais[] = { .capture = { /* Support maximum range */ .stream_name = "Record", .channels_min = 1, - .channels_max = 8, + .channels_max = 32, .rates = SNDRV_PCM_RATE_8000_48000, .formats = (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_LE), diff --git a/techpack/audio/asoc/codecs/wcd-mbhc-adc.c b/techpack/audio/asoc/codecs/wcd-mbhc-adc.c index ebcedb9ae059..4ebfb2be65b5 100644 --- a/techpack/audio/asoc/codecs/wcd-mbhc-adc.c +++ b/techpack/audio/asoc/codecs/wcd-mbhc-adc.c @@ -453,7 +453,8 @@ static bool wcd_mbhc_adc_check_for_spl_headset(struct wcd_mbhc *mbhc, adc_hph_threshold = wcd_mbhc_adc_get_hph_thres(mbhc); if (output_mv > adc_threshold || output_mv < adc_hph_threshold) { - spl_hs = false; + if (mbhc->force_linein == true) + spl_hs = false; } else { spl_hs = true; if (spl_hs_cnt) @@ -515,9 +516,12 @@ static bool wcd_is_special_headset(struct wcd_mbhc *mbhc) msleep(50); output_mv = wcd_measure_adc_once(mbhc, MUX_CTL_IN2P); if (output_mv <= adc_threshold) { - pr_debug("%s: Special headset detected in %d msecs\n", - __func__, delay); - is_spl_hs = true; + if (mbhc->force_linein != true) { + pr_debug( + "%s: Special headset detected in %d msecs\n", + __func__, delay); + is_spl_hs = true; + } } if (delay == SPECIAL_HS_DETECT_TIME_MS) { @@ -831,7 +835,7 @@ correct_plug_type: } } - if (output_mv > hs_threshold) { + if (output_mv > hs_threshold || mbhc->force_linein == true) { pr_debug("%s: cable is extension cable\n", __func__); plug_type = MBHC_PLUG_TYPE_HIGH_HPH; wrk_complete = true; diff --git a/techpack/audio/asoc/codecs/wcd-spi.c b/techpack/audio/asoc/codecs/wcd-spi.c index 4c7a85338ed4..8eca87d9a0da 100644 --- a/techpack/audio/asoc/codecs/wcd-spi.c +++ b/techpack/audio/asoc/codecs/wcd-spi.c @@ -1,6 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-only /* * Copyright (c) 2016-2019, The Linux Foundation. All rights reserved. + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. */ #include @@ -1478,7 +1479,7 @@ static int wcd_spi_component_bind(struct device *dev, spi_message_add_tail(&wcd_spi->xfer2[1], &wcd_spi->msg2); /* Pre-allocate the buffers */ - wcd_spi->tx_buf = dma_zalloc_coherent(&spi->dev, + wcd_spi->tx_buf = dma_alloc_coherent(&spi->dev, WCD_SPI_RW_MAX_BUF_SIZE, &wcd_spi->tx_dma, GFP_KERNEL); if (!wcd_spi->tx_buf) { @@ -1486,7 +1487,7 @@ static int wcd_spi_component_bind(struct device *dev, goto done; } - wcd_spi->rx_buf = dma_zalloc_coherent(&spi->dev, + wcd_spi->rx_buf = dma_alloc_coherent(&spi->dev, WCD_SPI_RW_MAX_BUF_SIZE, &wcd_spi->rx_dma, GFP_KERNEL); if (!wcd_spi->rx_buf) { diff --git a/techpack/audio/asoc/codecs/wcd9335-regmap.c b/techpack/audio/asoc/codecs/wcd9335-regmap.c index 418327245018..ac734f8c46e9 100644 --- a/techpack/audio/asoc/codecs/wcd9335-regmap.c +++ b/techpack/audio/asoc/codecs/wcd9335-regmap.c @@ -1,13 +1,14 @@ // SPDX-License-Identifier: GPL-2.0-only /* * Copyright (c) 2015-2018, 2020, The Linux Foundation. All rights reserved. + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. */ #include #include #include #include -#include +#include "wcd9335_registers.h" static const struct reg_sequence wcd9335_1_x_defaults[] = { { WCD9335_CODEC_RPM_CLK_GATE, 0x03, 0x00 }, diff --git a/techpack/audio/asoc/codecs/wcd934x/wcd934x-regmap.c b/techpack/audio/asoc/codecs/wcd934x/wcd934x-regmap.c index a9642091a66e..5741c6b946c9 100644 --- a/techpack/audio/asoc/codecs/wcd934x/wcd934x-regmap.c +++ b/techpack/audio/asoc/codecs/wcd934x/wcd934x-regmap.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0-only /* - * Copyright (c) 2016-2018, The Linux Foundation. All rights reserved. + * Copyright (c) 2016-2018, 2021, The Linux Foundation. All rights reserved. */ #include @@ -1832,6 +1832,8 @@ int wcd934x_regmap_register_patch(struct regmap *regmap, int revision) ARRAY_SIZE(wcd934x_1_1_defaults)); regcache_cache_only(regmap, false); break; + default: + break; } return rc; diff --git a/techpack/audio/asoc/codecs/wcd934x/wcd934x.c b/techpack/audio/asoc/codecs/wcd934x/wcd934x.c index 3a43485a7356..88cd5aa30334 100644 --- a/techpack/audio/asoc/codecs/wcd934x/wcd934x.c +++ b/techpack/audio/asoc/codecs/wcd934x/wcd934x.c @@ -1,5 +1,6 @@ // SPDX-License-Identifier: GPL-2.0-only /* Copyright (c) 2015-2020, The Linux Foundation. All rights reserved. + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. */ #include #include @@ -21,6 +22,7 @@ #include #include #include