Loading asoc/codecs/bolero/rx-macro.c +11 −6 Original line number Diff line number Diff line Loading @@ -1236,6 +1236,7 @@ static int rx_macro_mclk_enable(struct rx_macro_priv *rx_priv, rx_priv->default_clk_id, rx_priv->clk_id, true); rx_macro_core_vote(rx_priv, false); if (ret < 0) { dev_err(rx_priv->dev, "%s: rx request clock enable failed\n", Loading Loading @@ -1290,6 +1291,7 @@ static int rx_macro_mclk_enable(struct rx_macro_priv *rx_priv, rx_priv->default_clk_id, rx_priv->clk_id, false); rx_macro_core_vote(rx_priv, false); rx_priv->clk_id = rx_priv->default_clk_id; } } Loading Loading @@ -1409,11 +1411,11 @@ static int rx_macro_event_handler(struct snd_soc_component *component, "%s, failed to enable clk, ret:%d\n", __func__, ret); } else { rx_macro_core_vote(rx_priv, true); bolero_clk_rsc_request_clock(rx_priv->dev, rx_priv->default_clk_id, RX_CORE_CLK, false); } rx_macro_core_vote(rx_priv, false); break; case BOLERO_MACRO_EVT_SSR_UP: trace_printk("%s, enter SSR up\n", __func__); Loading Loading @@ -3678,22 +3680,25 @@ static const struct snd_soc_dapm_route rx_audio_map[] = { static int rx_macro_core_vote(void *handle, bool enable) { int rc = 0; struct rx_macro_priv *rx_priv = (struct rx_macro_priv *) handle; if (rx_priv == NULL) { pr_err("%s: rx priv data is NULL\n", __func__); return -EINVAL; } if (enable) { pm_runtime_get_sync(rx_priv->dev); if (bolero_check_core_votes(rx_priv->dev)) rc = 0; else rc = -ENOTSYNC; } else { pm_runtime_put_autosuspend(rx_priv->dev); pm_runtime_mark_last_busy(rx_priv->dev); } if (bolero_check_core_votes(rx_priv->dev)) return 0; else return -EINVAL; return rc; } static int rx_swrm_clock(void *handle, bool enable) Loading asoc/codecs/bolero/tx-macro.c +8 −5 Original line number Diff line number Diff line Loading @@ -2678,22 +2678,25 @@ static int tx_macro_clk_switch(struct snd_soc_component *component, int clk_src) static int tx_macro_core_vote(void *handle, bool enable) { int rc = 0; struct tx_macro_priv *tx_priv = (struct tx_macro_priv *) handle; if (tx_priv == NULL) { pr_err("%s: tx priv data is NULL\n", __func__); return -EINVAL; } if (enable) { pm_runtime_get_sync(tx_priv->dev); if (bolero_check_core_votes(tx_priv->dev)) rc = 0; else rc = -ENOTSYNC; } else { pm_runtime_put_autosuspend(tx_priv->dev); pm_runtime_mark_last_busy(tx_priv->dev); } if (bolero_check_core_votes(tx_priv->dev)) return 0; else return -EINVAL; return rc; } static int tx_macro_swrm_clock(void *handle, bool enable) Loading asoc/codecs/bolero/va-macro.c +8 −5 Original line number Diff line number Diff line Loading @@ -672,22 +672,25 @@ static int va_macro_tx_va_mclk_enable(struct va_macro_priv *va_priv, static int va_macro_core_vote(void *handle, bool enable) { int rc = 0; struct va_macro_priv *va_priv = (struct va_macro_priv *) handle; if (va_priv == NULL) { pr_err("%s: va priv data is NULL\n", __func__); return -EINVAL; } if (enable) { pm_runtime_get_sync(va_priv->dev); if (bolero_check_core_votes(va_priv->dev)) rc = 0; else rc = -ENOTSYNC; } else { pm_runtime_put_autosuspend(va_priv->dev); pm_runtime_mark_last_busy(va_priv->dev); } if (bolero_check_core_votes(va_priv->dev)) return 0; else return -EINVAL; return rc; } static int va_macro_swrm_clock(void *handle, bool enable) Loading asoc/codecs/bolero/wsa-macro.c +8 −5 Original line number Diff line number Diff line Loading @@ -2830,22 +2830,25 @@ static void wsa_macro_init_reg(struct snd_soc_component *component) static int wsa_macro_core_vote(void *handle, bool enable) { int rc = 0; struct wsa_macro_priv *wsa_priv = (struct wsa_macro_priv *) handle; if (wsa_priv == NULL) { pr_err("%s: wsa priv data is NULL\n", __func__); return -EINVAL; } if (enable) { pm_runtime_get_sync(wsa_priv->dev); if (bolero_check_core_votes(wsa_priv->dev)) rc = 0; else rc = -ENOTSYNC; } else { pm_runtime_put_autosuspend(wsa_priv->dev); pm_runtime_mark_last_busy(wsa_priv->dev); } if (bolero_check_core_votes(wsa_priv->dev)) return 0; else return -EINVAL; return rc; } static int wsa_swrm_clock(void *handle, bool enable) Loading asoc/codecs/msm_hdmi_codec_rx.c 100644 → 100755 +29 −0 Original line number Diff line number Diff line Loading @@ -735,6 +735,10 @@ static int msm_ext_disp_audio_codec_rx_probe( { struct msm_ext_disp_audio_codec_rx_data *codec_data; struct device_node *of_node_parent = NULL; struct msm_ext_disp_codec_id codec_info; int dai_id = DP_DAI1; int type; int rc = 0; codec_data = kzalloc(sizeof(struct msm_ext_disp_audio_codec_rx_data), GFP_KERNEL); Loading Loading @@ -775,6 +779,31 @@ static int msm_ext_disp_audio_codec_rx_probe( dev_dbg(component->dev, "%s(): registered %s with ext disp core\n", __func__, component->name); mutex_lock(&codec_data->dp_ops_lock); /*Find a connected ext device to notify DisPlay*/ for (dai_id = DP_DAI1; dai_id < DP_DAI_MAX; dai_id++) { if (dai_id == HDMI_MS_DAI) type = EXT_DISPLAY_TYPE_HDMI; else type = EXT_DISPLAY_TYPE_DP; SWITCH_DP_CODEC(codec_info, codec_data, dai_id, type); rc = msm_ext_disp_select_audio_codec(codec_data->ext_disp_core_pdev, &codec_info); if (!rc) { if(codec_data->ext_disp_ops.ready) { rc = codec_data->ext_disp_ops.ready(codec_data->ext_disp_core_pdev); if(!rc) break; } } } mutex_unlock(&codec_data->dp_ops_lock); return 0; } Loading Loading
asoc/codecs/bolero/rx-macro.c +11 −6 Original line number Diff line number Diff line Loading @@ -1236,6 +1236,7 @@ static int rx_macro_mclk_enable(struct rx_macro_priv *rx_priv, rx_priv->default_clk_id, rx_priv->clk_id, true); rx_macro_core_vote(rx_priv, false); if (ret < 0) { dev_err(rx_priv->dev, "%s: rx request clock enable failed\n", Loading Loading @@ -1290,6 +1291,7 @@ static int rx_macro_mclk_enable(struct rx_macro_priv *rx_priv, rx_priv->default_clk_id, rx_priv->clk_id, false); rx_macro_core_vote(rx_priv, false); rx_priv->clk_id = rx_priv->default_clk_id; } } Loading Loading @@ -1409,11 +1411,11 @@ static int rx_macro_event_handler(struct snd_soc_component *component, "%s, failed to enable clk, ret:%d\n", __func__, ret); } else { rx_macro_core_vote(rx_priv, true); bolero_clk_rsc_request_clock(rx_priv->dev, rx_priv->default_clk_id, RX_CORE_CLK, false); } rx_macro_core_vote(rx_priv, false); break; case BOLERO_MACRO_EVT_SSR_UP: trace_printk("%s, enter SSR up\n", __func__); Loading Loading @@ -3678,22 +3680,25 @@ static const struct snd_soc_dapm_route rx_audio_map[] = { static int rx_macro_core_vote(void *handle, bool enable) { int rc = 0; struct rx_macro_priv *rx_priv = (struct rx_macro_priv *) handle; if (rx_priv == NULL) { pr_err("%s: rx priv data is NULL\n", __func__); return -EINVAL; } if (enable) { pm_runtime_get_sync(rx_priv->dev); if (bolero_check_core_votes(rx_priv->dev)) rc = 0; else rc = -ENOTSYNC; } else { pm_runtime_put_autosuspend(rx_priv->dev); pm_runtime_mark_last_busy(rx_priv->dev); } if (bolero_check_core_votes(rx_priv->dev)) return 0; else return -EINVAL; return rc; } static int rx_swrm_clock(void *handle, bool enable) Loading
asoc/codecs/bolero/tx-macro.c +8 −5 Original line number Diff line number Diff line Loading @@ -2678,22 +2678,25 @@ static int tx_macro_clk_switch(struct snd_soc_component *component, int clk_src) static int tx_macro_core_vote(void *handle, bool enable) { int rc = 0; struct tx_macro_priv *tx_priv = (struct tx_macro_priv *) handle; if (tx_priv == NULL) { pr_err("%s: tx priv data is NULL\n", __func__); return -EINVAL; } if (enable) { pm_runtime_get_sync(tx_priv->dev); if (bolero_check_core_votes(tx_priv->dev)) rc = 0; else rc = -ENOTSYNC; } else { pm_runtime_put_autosuspend(tx_priv->dev); pm_runtime_mark_last_busy(tx_priv->dev); } if (bolero_check_core_votes(tx_priv->dev)) return 0; else return -EINVAL; return rc; } static int tx_macro_swrm_clock(void *handle, bool enable) Loading
asoc/codecs/bolero/va-macro.c +8 −5 Original line number Diff line number Diff line Loading @@ -672,22 +672,25 @@ static int va_macro_tx_va_mclk_enable(struct va_macro_priv *va_priv, static int va_macro_core_vote(void *handle, bool enable) { int rc = 0; struct va_macro_priv *va_priv = (struct va_macro_priv *) handle; if (va_priv == NULL) { pr_err("%s: va priv data is NULL\n", __func__); return -EINVAL; } if (enable) { pm_runtime_get_sync(va_priv->dev); if (bolero_check_core_votes(va_priv->dev)) rc = 0; else rc = -ENOTSYNC; } else { pm_runtime_put_autosuspend(va_priv->dev); pm_runtime_mark_last_busy(va_priv->dev); } if (bolero_check_core_votes(va_priv->dev)) return 0; else return -EINVAL; return rc; } static int va_macro_swrm_clock(void *handle, bool enable) Loading
asoc/codecs/bolero/wsa-macro.c +8 −5 Original line number Diff line number Diff line Loading @@ -2830,22 +2830,25 @@ static void wsa_macro_init_reg(struct snd_soc_component *component) static int wsa_macro_core_vote(void *handle, bool enable) { int rc = 0; struct wsa_macro_priv *wsa_priv = (struct wsa_macro_priv *) handle; if (wsa_priv == NULL) { pr_err("%s: wsa priv data is NULL\n", __func__); return -EINVAL; } if (enable) { pm_runtime_get_sync(wsa_priv->dev); if (bolero_check_core_votes(wsa_priv->dev)) rc = 0; else rc = -ENOTSYNC; } else { pm_runtime_put_autosuspend(wsa_priv->dev); pm_runtime_mark_last_busy(wsa_priv->dev); } if (bolero_check_core_votes(wsa_priv->dev)) return 0; else return -EINVAL; return rc; } static int wsa_swrm_clock(void *handle, bool enable) Loading
asoc/codecs/msm_hdmi_codec_rx.c 100644 → 100755 +29 −0 Original line number Diff line number Diff line Loading @@ -735,6 +735,10 @@ static int msm_ext_disp_audio_codec_rx_probe( { struct msm_ext_disp_audio_codec_rx_data *codec_data; struct device_node *of_node_parent = NULL; struct msm_ext_disp_codec_id codec_info; int dai_id = DP_DAI1; int type; int rc = 0; codec_data = kzalloc(sizeof(struct msm_ext_disp_audio_codec_rx_data), GFP_KERNEL); Loading Loading @@ -775,6 +779,31 @@ static int msm_ext_disp_audio_codec_rx_probe( dev_dbg(component->dev, "%s(): registered %s with ext disp core\n", __func__, component->name); mutex_lock(&codec_data->dp_ops_lock); /*Find a connected ext device to notify DisPlay*/ for (dai_id = DP_DAI1; dai_id < DP_DAI_MAX; dai_id++) { if (dai_id == HDMI_MS_DAI) type = EXT_DISPLAY_TYPE_HDMI; else type = EXT_DISPLAY_TYPE_DP; SWITCH_DP_CODEC(codec_info, codec_data, dai_id, type); rc = msm_ext_disp_select_audio_codec(codec_data->ext_disp_core_pdev, &codec_info); if (!rc) { if(codec_data->ext_disp_ops.ready) { rc = codec_data->ext_disp_ops.ready(codec_data->ext_disp_core_pdev); if(!rc) break; } } } mutex_unlock(&codec_data->dp_ops_lock); return 0; } Loading