diff --git a/Makefile b/Makefile index d60a0236f5ee..73ad150b67ec 100644 --- a/Makefile +++ b/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/asoc/Kbuild b/asoc/Kbuild index f59beb058c3a..8276d7df6000 100644 --- a/asoc/Kbuild +++ b/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 diff --git a/asoc/bengal.c b/asoc/bengal.c index 2fff3ff5d19b..08517e07ae30 100644 --- a/asoc/bengal.c +++ b/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 @@ -3956,6 +3957,9 @@ 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) + mi2s_clk[index].clk_id = mi2s_ebit_clk[index]; ret = msm_mi2s_set_sclk(substream, true); if (ret < 0) { dev_err(rtd->card->dev, @@ -3978,11 +3982,8 @@ static int msm_mi2s_snd_startup(struct snd_pcm_substream *substream) atomic_inc(&(pdata->mi2s_gpio_ref_count[index])); } } - /* Check if msm needs to provide the clock to the interface */ - if (!mi2s_intf_conf[index].msm_is_mi2s_master) { - mi2s_clk[index].clk_id = mi2s_ebit_clk[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", diff --git a/asoc/codecs/Kbuild b/asoc/codecs/Kbuild index 52d20d667a20..0e842ee1bf6c 100755 --- a/asoc/codecs/Kbuild +++ b/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/asoc/codecs/audio-ext-clk-up.c b/asoc/codecs/audio-ext-clk-up.c index acd00da91404..f3e9b694c5b5 100644 --- a/asoc/codecs/audio-ext-clk-up.c +++ b/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/asoc/codecs/wcd-spi.c b/asoc/codecs/wcd-spi.c index 4c7a85338ed4..8eca87d9a0da 100644 --- a/asoc/codecs/wcd-spi.c +++ b/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/asoc/codecs/wcd934x/wcd934x.c b/asoc/codecs/wcd934x/wcd934x.c index 3a43485a7356..88cd5aa30334 100644 --- a/asoc/codecs/wcd934x/wcd934x.c +++ b/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