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 @@ -671,22 +671,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 @@ -2828,22 +2828,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/msm-pcm-routing-v2.c +13 −2 Original line number Diff line number Diff line Loading @@ -1729,6 +1729,11 @@ static int msm_pcm_routing_channel_mixer(int fe_id, bool perf_mode, for (i = 0; i < ADM_MAX_CHANNELS && channel_input[fe_id][i] > 0; ++i) { be_id = channel_input[fe_id][i] - 1; if (be_id < 0 || be_id >= MSM_BACKEND_DAI_MAX) { pr_err("%s: Received out of bounds be_id %d\n", __func__, be_id); return -EINVAL; } channel_mixer[fe_id].input_channels[i] = msm_bedais[be_id].channel; Loading Loading @@ -3470,10 +3475,10 @@ static int msm_pcm_get_out_chs(struct snd_kcontrol *kcontrol, static int msm_pcm_put_out_chs(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { u16 fe_id = 0; u16 fe_id = 0, out_ch = 0; fe_id = ((struct soc_multi_mixer_control *) kcontrol->private_value)->shift; out_ch = ucontrol->value.integer.value[0]; if (fe_id >= MSM_FRONTEND_DAI_MM_SIZE) { pr_err("%s: invalid FE %d\n", __func__, fe_id); return -EINVAL; Loading @@ -3482,6 +3487,12 @@ static int msm_pcm_put_out_chs(struct snd_kcontrol *kcontrol, pr_debug("%s: fe_id is %d, output channels = %d\n", __func__, fe_id, (unsigned int)(ucontrol->value.integer.value[0])); if (out_ch < 0 || out_ch > ADM_MAX_CHANNELS) { pr_err("%s: invalid output channel %d\n", __func__, out_ch); return -EINVAL; } channel_mixer[fe_id].output_channel = (unsigned int)(ucontrol->value.integer.value[0]); 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 @@ -671,22 +671,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 @@ -2828,22 +2828,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/msm-pcm-routing-v2.c +13 −2 Original line number Diff line number Diff line Loading @@ -1729,6 +1729,11 @@ static int msm_pcm_routing_channel_mixer(int fe_id, bool perf_mode, for (i = 0; i < ADM_MAX_CHANNELS && channel_input[fe_id][i] > 0; ++i) { be_id = channel_input[fe_id][i] - 1; if (be_id < 0 || be_id >= MSM_BACKEND_DAI_MAX) { pr_err("%s: Received out of bounds be_id %d\n", __func__, be_id); return -EINVAL; } channel_mixer[fe_id].input_channels[i] = msm_bedais[be_id].channel; Loading Loading @@ -3470,10 +3475,10 @@ static int msm_pcm_get_out_chs(struct snd_kcontrol *kcontrol, static int msm_pcm_put_out_chs(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { u16 fe_id = 0; u16 fe_id = 0, out_ch = 0; fe_id = ((struct soc_multi_mixer_control *) kcontrol->private_value)->shift; out_ch = ucontrol->value.integer.value[0]; if (fe_id >= MSM_FRONTEND_DAI_MM_SIZE) { pr_err("%s: invalid FE %d\n", __func__, fe_id); return -EINVAL; Loading @@ -3482,6 +3487,12 @@ static int msm_pcm_put_out_chs(struct snd_kcontrol *kcontrol, pr_debug("%s: fe_id is %d, output channels = %d\n", __func__, fe_id, (unsigned int)(ucontrol->value.integer.value[0])); if (out_ch < 0 || out_ch > ADM_MAX_CHANNELS) { pr_err("%s: invalid output channel %d\n", __func__, out_ch); return -EINVAL; } channel_mixer[fe_id].output_channel = (unsigned int)(ucontrol->value.integer.value[0]);