mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 07:03:09 -04:00
Merge "ASoC: msm: set pinctrl if available on auto machine"
This commit is contained in:
commit
454fe083a6
2 changed files with 56 additions and 40 deletions
|
|
@ -4801,11 +4801,13 @@ static int sa6155_tdm_snd_startup(struct snd_pcm_substream *substream)
|
|||
if (index == TDM_TERT || index == TDM_QUAT ||
|
||||
index == TDM_QUIN) {
|
||||
pinctrl_info = &pdata->pinctrl_info[index];
|
||||
ret_pinctrl = msm_set_pinctrl(pinctrl_info,
|
||||
STATE_ACTIVE);
|
||||
if (ret_pinctrl)
|
||||
pr_err("%s: TDM TLMM pinctrl set failed with %d\n",
|
||||
__func__, ret_pinctrl);
|
||||
if (pinctrl_info->pinctrl) {
|
||||
ret_pinctrl = msm_set_pinctrl(pinctrl_info,
|
||||
STATE_ACTIVE);
|
||||
if (ret_pinctrl)
|
||||
pr_err("%s: TDM TLMM pinctrl set failed with %d\n",
|
||||
__func__, ret_pinctrl);
|
||||
}
|
||||
}
|
||||
}
|
||||
mutex_unlock(&intf_conf->lock);
|
||||
|
|
@ -4841,11 +4843,13 @@ static void sa6155_tdm_snd_shutdown(struct snd_pcm_substream *substream)
|
|||
if (index == TDM_TERT || index == TDM_QUAT ||
|
||||
index == TDM_QUIN) {
|
||||
pinctrl_info = &pdata->pinctrl_info[index];
|
||||
ret_pinctrl = msm_set_pinctrl(pinctrl_info,
|
||||
STATE_SLEEP);
|
||||
if (ret_pinctrl)
|
||||
pr_err("%s: TDM TLMM pinctrl set failed with %d\n",
|
||||
__func__, ret_pinctrl);
|
||||
if (pinctrl_info->pinctrl) {
|
||||
ret_pinctrl = msm_set_pinctrl(pinctrl_info,
|
||||
STATE_SLEEP);
|
||||
if (ret_pinctrl)
|
||||
pr_err("%s: TDM TLMM pinctrl set failed with %d\n",
|
||||
__func__, ret_pinctrl);
|
||||
}
|
||||
}
|
||||
}
|
||||
mutex_unlock(&intf_conf->lock);
|
||||
|
|
@ -4935,11 +4939,13 @@ static int msm_mi2s_snd_startup(struct snd_pcm_substream *substream)
|
|||
}
|
||||
|
||||
pinctrl_info = &pdata->pinctrl_info[index];
|
||||
ret_pinctrl = msm_set_pinctrl(pinctrl_info,
|
||||
STATE_ACTIVE);
|
||||
if (ret_pinctrl)
|
||||
pr_err("%s: MI2S TLMM pinctrl set failed with %d\n",
|
||||
__func__, ret_pinctrl);
|
||||
if (pinctrl_info->pinctrl) {
|
||||
ret_pinctrl = msm_set_pinctrl(pinctrl_info,
|
||||
STATE_ACTIVE);
|
||||
if (ret_pinctrl)
|
||||
pr_err("%s: MI2S TLMM pinctrl set failed with %d\n",
|
||||
__func__, ret_pinctrl);
|
||||
}
|
||||
}
|
||||
clk_off:
|
||||
if (ret < 0)
|
||||
|
|
@ -4979,11 +4985,13 @@ static void msm_mi2s_snd_shutdown(struct snd_pcm_substream *substream)
|
|||
__func__, index, ret);
|
||||
|
||||
pinctrl_info = &pdata->pinctrl_info[index];
|
||||
ret_pinctrl = msm_set_pinctrl(pinctrl_info,
|
||||
STATE_SLEEP);
|
||||
if (ret_pinctrl)
|
||||
pr_err("%s: MI2S TLMM pinctrl set failed with %d\n",
|
||||
__func__, ret_pinctrl);
|
||||
if (pinctrl_info->pinctrl) {
|
||||
ret_pinctrl = msm_set_pinctrl(pinctrl_info,
|
||||
STATE_SLEEP);
|
||||
if (ret_pinctrl)
|
||||
pr_err("%s: MI2S TLMM pinctrl set failed with %d\n",
|
||||
__func__, ret_pinctrl);
|
||||
}
|
||||
}
|
||||
mutex_unlock(&intf_conf->lock);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4791,11 +4791,13 @@ static int sa8155_tdm_snd_startup(struct snd_pcm_substream *substream)
|
|||
mutex_lock(&intf_conf->lock);
|
||||
if (++intf_conf->ref_cnt == 1) {
|
||||
pinctrl_info = &pdata->pinctrl_info[index];
|
||||
ret_pinctrl = msm_set_pinctrl(pinctrl_info,
|
||||
STATE_ACTIVE);
|
||||
if (ret_pinctrl)
|
||||
pr_err("%s: TDM TLMM pinctrl set failed with %d\n",
|
||||
__func__, ret_pinctrl);
|
||||
if (pinctrl_info->pinctrl) {
|
||||
ret_pinctrl = msm_set_pinctrl(pinctrl_info,
|
||||
STATE_ACTIVE);
|
||||
if (ret_pinctrl)
|
||||
pr_err("%s: TDM TLMM pinctrl set failed with %d\n",
|
||||
__func__, ret_pinctrl);
|
||||
}
|
||||
}
|
||||
mutex_unlock(&intf_conf->lock);
|
||||
|
||||
|
|
@ -4828,11 +4830,13 @@ static void sa8155_tdm_snd_shutdown(struct snd_pcm_substream *substream)
|
|||
mutex_lock(&intf_conf->lock);
|
||||
if (--intf_conf->ref_cnt == 0) {
|
||||
pinctrl_info = &pdata->pinctrl_info[index];
|
||||
ret_pinctrl = msm_set_pinctrl(pinctrl_info,
|
||||
STATE_SLEEP);
|
||||
if (ret_pinctrl)
|
||||
pr_err("%s: TDM TLMM pinctrl set failed with %d\n",
|
||||
__func__, ret_pinctrl);
|
||||
if (pinctrl_info->pinctrl) {
|
||||
ret_pinctrl = msm_set_pinctrl(pinctrl_info,
|
||||
STATE_SLEEP);
|
||||
if (ret_pinctrl)
|
||||
pr_err("%s: TDM TLMM pinctrl set failed with %d\n",
|
||||
__func__, ret_pinctrl);
|
||||
}
|
||||
}
|
||||
mutex_unlock(&intf_conf->lock);
|
||||
}
|
||||
|
|
@ -4921,11 +4925,13 @@ static int msm_mi2s_snd_startup(struct snd_pcm_substream *substream)
|
|||
}
|
||||
|
||||
pinctrl_info = &pdata->pinctrl_info[index];
|
||||
ret_pinctrl = msm_set_pinctrl(pinctrl_info,
|
||||
STATE_ACTIVE);
|
||||
if (ret_pinctrl)
|
||||
pr_err("%s: MI2S TLMM pinctrl set failed with %d\n",
|
||||
__func__, ret_pinctrl);
|
||||
if (pinctrl_info->pinctrl) {
|
||||
ret_pinctrl = msm_set_pinctrl(pinctrl_info,
|
||||
STATE_ACTIVE);
|
||||
if (ret_pinctrl)
|
||||
pr_err("%s: MI2S TLMM pinctrl set failed with %d\n",
|
||||
__func__, ret_pinctrl);
|
||||
}
|
||||
}
|
||||
clk_off:
|
||||
if (ret < 0)
|
||||
|
|
@ -4965,11 +4971,13 @@ static void msm_mi2s_snd_shutdown(struct snd_pcm_substream *substream)
|
|||
__func__, index, ret);
|
||||
|
||||
pinctrl_info = &pdata->pinctrl_info[index];
|
||||
ret_pinctrl = msm_set_pinctrl(pinctrl_info,
|
||||
STATE_SLEEP);
|
||||
if (ret_pinctrl)
|
||||
pr_err("%s: MI2S TLMM pinctrl set failed with %d\n",
|
||||
__func__, ret_pinctrl);
|
||||
if (pinctrl_info->pinctrl) {
|
||||
ret_pinctrl = msm_set_pinctrl(pinctrl_info,
|
||||
STATE_SLEEP);
|
||||
if (ret_pinctrl)
|
||||
pr_err("%s: MI2S TLMM pinctrl set failed with %d\n",
|
||||
__func__, ret_pinctrl);
|
||||
}
|
||||
}
|
||||
mutex_unlock(&intf_conf->lock);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue