Loading asoc/codecs/wcd_cpe_core.c +4 −0 Original line number Diff line number Diff line Loading @@ -116,6 +116,8 @@ struct wcd_cpe_attribute { ssize_t count); }; static u64 wcd_cpe_dma_mask = DMA_BIT_MASK(32); #define WCD_CPE_ATTR(_name, _mode, _show, _store) \ static struct wcd_cpe_attribute cpe_attr_##_name = { \ .attr = {.name = __stringify(_name), .mode = _mode}, \ Loading Loading @@ -2034,6 +2036,8 @@ struct wcd_cpe_core *wcd_cpe_init(const char *img_fname, __func__); goto schedule_dload_work; } core->dev->coherent_dma_mask = DMA_BIT_MASK(32); core->dev->dma_mask = &wcd_cpe_dma_mask; arch_setup_dma_ops(core->dev, 0, 0, NULL, 0); core->cpe_dump_v_addr = dma_alloc_coherent(core->dev, Loading asoc/msm-pcm-voice-v2.c +24 −1 Original line number Diff line number Diff line // SPDX-License-Identifier: GPL-2.0-only /* Copyright (c) 2012-2019, The Linux Foundation. All rights reserved. /* Copyright (c) 2012-2019, 2021, The Linux Foundation. All rights reserved. */ #include <linux/init.h> Loading Loading @@ -29,6 +29,8 @@ static struct msm_voice voice_info[VOICE_SESSION_INDEX_MAX]; static int voice_probe_done; static struct snd_pcm_hardware msm_pcm_hardware = { .info = (SNDRV_PCM_INFO_INTERLEAVED | Loading Loading @@ -778,6 +780,7 @@ static int msm_pcm_probe(struct platform_device *pdev) bool destroy_cvd = false; const char *is_destroy_cvd = "qcom,destroy-cvd"; voice_probe_done = 0; if (!is_voc_initialized()) { pr_debug("%s: voice module not initialized yet, deferring probe()\n", __func__); Loading Loading @@ -806,11 +809,31 @@ static int msm_pcm_probe(struct platform_device *pdev) rc = snd_soc_register_component(&pdev->dev, &msm_soc_component, NULL, 0); if (!rc) { pr_debug("%s msm_pcm_voice probe success! \n", __func__); voice_probe_done = 1; } done: return rc; } /** * msm_voice_get_probe_status - Returns the probe * status of msm-pcm-voice. * * Function that returns the probe status of msm-pcm-voice * driver. * * Returns: 1 on probe success, 0 otherwise. */ int msm_voice_get_probe_status(void) { return voice_probe_done; } EXPORT_SYMBOL(msm_voice_get_probe_status); static int msm_pcm_remove(struct platform_device *pdev) { snd_soc_unregister_component(&pdev->dev); Loading asoc/msm-pcm-voice-v2.h +3 −1 Original line number Diff line number Diff line /* SPDX-License-Identifier: GPL-2.0-only */ /* Copyright (c) 2012-2015, The Linux Foundation. All rights reserved. /* Copyright (c) 2012-2015, 2021, The Linux Foundation. All rights reserved. */ #ifndef _MSM_PCM_VOICE_H #define _MSM_PCM_VOICE_H Loading Loading @@ -31,4 +31,6 @@ struct msm_voice { int capture_start; }; int msm_voice_get_probe_status(void); #endif /*_MSM_PCM_VOICE_H*/ asoc/msm8952.c +9 −0 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ #include "msm-pcm-routing-v2.h" #include <asoc/msm-cdc-pinctrl.h> #include "msm8952.h" #include "msm-pcm-voice-v2.h" #define DRV_NAME "msm8952-asoc-wcd" Loading Loading @@ -3426,6 +3427,14 @@ static int msm8952_asoc_machine_probe(struct platform_device *pdev) } } /* Check if voice probe done, defer otherwise */ ret = msm_voice_get_probe_status(); if (!ret) { pr_debug("%s msm-pcm-voice probe status %d \n", __func__, ret); ret = -EPROBE_DEFER; goto err; } card = msm8952_populate_sndcard_dailinks(&pdev->dev, pdata->snd_card_val); dev_dbg(&pdev->dev, "default codec configured\n"); Loading dsp/q6afe.c +7 −8 Original line number Diff line number Diff line Loading @@ -9131,7 +9131,7 @@ int afe_set_lpass_clock_v2(u16 port_id, struct afe_clk_set *cfg) { int index = 0; int ret = 0; u16 idx = 0; int idx = 0; uint32_t build_major_version = 0; uint32_t build_minor_version = 0; uint32_t build_branch_version = 0; Loading Loading @@ -9165,12 +9165,9 @@ int afe_set_lpass_clock_v2(u16 port_id, struct afe_clk_set *cfg) } idx = afe_get_port_idx(port_id); if (idx < 0) { pr_err("%s: cannot get clock id for port id 0x%x\n", __func__, pr_debug("%s: cannot get clock id for port id 0x%x\n", __func__, port_id); return -EINVAL; } if (clkinfo_per_port[idx].mclk_src_id != MCLK_SRC_INT) { } else if (clkinfo_per_port[idx].mclk_src_id != MCLK_SRC_INT) { pr_debug("%s: ext MCLK src %d\n", __func__, clkinfo_per_port[idx].mclk_src_id); Loading Loading @@ -9200,10 +9197,12 @@ int afe_set_lpass_clock_v2(u16 port_id, struct afe_clk_set *cfg) ret = afe_set_lpass_clk_cfg_ext_mclk(index, cfg, clkinfo_per_port[idx].mclk_freq); } else { ret = afe_set_lpass_clk_cfg(index, cfg); goto done; } ret = afe_set_lpass_clk_cfg(index, cfg); done: if (ret) pr_err("%s: afe_set_lpass_clk_cfg_v2 failed %d\n", __func__, ret); Loading Loading
asoc/codecs/wcd_cpe_core.c +4 −0 Original line number Diff line number Diff line Loading @@ -116,6 +116,8 @@ struct wcd_cpe_attribute { ssize_t count); }; static u64 wcd_cpe_dma_mask = DMA_BIT_MASK(32); #define WCD_CPE_ATTR(_name, _mode, _show, _store) \ static struct wcd_cpe_attribute cpe_attr_##_name = { \ .attr = {.name = __stringify(_name), .mode = _mode}, \ Loading Loading @@ -2034,6 +2036,8 @@ struct wcd_cpe_core *wcd_cpe_init(const char *img_fname, __func__); goto schedule_dload_work; } core->dev->coherent_dma_mask = DMA_BIT_MASK(32); core->dev->dma_mask = &wcd_cpe_dma_mask; arch_setup_dma_ops(core->dev, 0, 0, NULL, 0); core->cpe_dump_v_addr = dma_alloc_coherent(core->dev, Loading
asoc/msm-pcm-voice-v2.c +24 −1 Original line number Diff line number Diff line // SPDX-License-Identifier: GPL-2.0-only /* Copyright (c) 2012-2019, The Linux Foundation. All rights reserved. /* Copyright (c) 2012-2019, 2021, The Linux Foundation. All rights reserved. */ #include <linux/init.h> Loading Loading @@ -29,6 +29,8 @@ static struct msm_voice voice_info[VOICE_SESSION_INDEX_MAX]; static int voice_probe_done; static struct snd_pcm_hardware msm_pcm_hardware = { .info = (SNDRV_PCM_INFO_INTERLEAVED | Loading Loading @@ -778,6 +780,7 @@ static int msm_pcm_probe(struct platform_device *pdev) bool destroy_cvd = false; const char *is_destroy_cvd = "qcom,destroy-cvd"; voice_probe_done = 0; if (!is_voc_initialized()) { pr_debug("%s: voice module not initialized yet, deferring probe()\n", __func__); Loading Loading @@ -806,11 +809,31 @@ static int msm_pcm_probe(struct platform_device *pdev) rc = snd_soc_register_component(&pdev->dev, &msm_soc_component, NULL, 0); if (!rc) { pr_debug("%s msm_pcm_voice probe success! \n", __func__); voice_probe_done = 1; } done: return rc; } /** * msm_voice_get_probe_status - Returns the probe * status of msm-pcm-voice. * * Function that returns the probe status of msm-pcm-voice * driver. * * Returns: 1 on probe success, 0 otherwise. */ int msm_voice_get_probe_status(void) { return voice_probe_done; } EXPORT_SYMBOL(msm_voice_get_probe_status); static int msm_pcm_remove(struct platform_device *pdev) { snd_soc_unregister_component(&pdev->dev); Loading
asoc/msm-pcm-voice-v2.h +3 −1 Original line number Diff line number Diff line /* SPDX-License-Identifier: GPL-2.0-only */ /* Copyright (c) 2012-2015, The Linux Foundation. All rights reserved. /* Copyright (c) 2012-2015, 2021, The Linux Foundation. All rights reserved. */ #ifndef _MSM_PCM_VOICE_H #define _MSM_PCM_VOICE_H Loading Loading @@ -31,4 +31,6 @@ struct msm_voice { int capture_start; }; int msm_voice_get_probe_status(void); #endif /*_MSM_PCM_VOICE_H*/
asoc/msm8952.c +9 −0 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ #include "msm-pcm-routing-v2.h" #include <asoc/msm-cdc-pinctrl.h> #include "msm8952.h" #include "msm-pcm-voice-v2.h" #define DRV_NAME "msm8952-asoc-wcd" Loading Loading @@ -3426,6 +3427,14 @@ static int msm8952_asoc_machine_probe(struct platform_device *pdev) } } /* Check if voice probe done, defer otherwise */ ret = msm_voice_get_probe_status(); if (!ret) { pr_debug("%s msm-pcm-voice probe status %d \n", __func__, ret); ret = -EPROBE_DEFER; goto err; } card = msm8952_populate_sndcard_dailinks(&pdev->dev, pdata->snd_card_val); dev_dbg(&pdev->dev, "default codec configured\n"); Loading
dsp/q6afe.c +7 −8 Original line number Diff line number Diff line Loading @@ -9131,7 +9131,7 @@ int afe_set_lpass_clock_v2(u16 port_id, struct afe_clk_set *cfg) { int index = 0; int ret = 0; u16 idx = 0; int idx = 0; uint32_t build_major_version = 0; uint32_t build_minor_version = 0; uint32_t build_branch_version = 0; Loading Loading @@ -9165,12 +9165,9 @@ int afe_set_lpass_clock_v2(u16 port_id, struct afe_clk_set *cfg) } idx = afe_get_port_idx(port_id); if (idx < 0) { pr_err("%s: cannot get clock id for port id 0x%x\n", __func__, pr_debug("%s: cannot get clock id for port id 0x%x\n", __func__, port_id); return -EINVAL; } if (clkinfo_per_port[idx].mclk_src_id != MCLK_SRC_INT) { } else if (clkinfo_per_port[idx].mclk_src_id != MCLK_SRC_INT) { pr_debug("%s: ext MCLK src %d\n", __func__, clkinfo_per_port[idx].mclk_src_id); Loading Loading @@ -9200,10 +9197,12 @@ int afe_set_lpass_clock_v2(u16 port_id, struct afe_clk_set *cfg) ret = afe_set_lpass_clk_cfg_ext_mclk(index, cfg, clkinfo_per_port[idx].mclk_freq); } else { ret = afe_set_lpass_clk_cfg(index, cfg); goto done; } ret = afe_set_lpass_clk_cfg(index, cfg); done: if (ret) pr_err("%s: afe_set_lpass_clk_cfg_v2 failed %d\n", __func__, ret); Loading