mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
ASoC: msm: Fix issues in proxy port driver due to early afe port enable.
After recent movement of afe_start to prepare the interrupts start coming earlier from proxy port. This results in proxy port driver not ready for interrupts. Start the timer later to ensure processing of packet once trigger start happens. Change-Id: Ie82d982b6c147afdef46a8c7bfe7234dd14486f1 Signed-off-by: Asish Bhattacharya <asishb@codeaurora.org>
This commit is contained in:
parent
7948e99265
commit
119570c698
2 changed files with 4 additions and 8 deletions
|
@ -140,9 +140,6 @@ static void pcm_afe_process_tx_pkt(uint32_t opcode,
|
|||
runtime->channels * 2)));
|
||||
pr_debug("prtd->poll_time: %d",
|
||||
prtd->poll_time);
|
||||
hrtimer_start(&prtd->hrt,
|
||||
ns_to_ktime(0),
|
||||
HRTIMER_MODE_REL);
|
||||
break;
|
||||
}
|
||||
case AFE_EVENT_RTPORT_STOP:
|
||||
|
@ -206,9 +203,6 @@ static void pcm_afe_process_rx_pkt(uint32_t opcode,
|
|||
snd_pcm_lib_period_bytes(prtd->substream)
|
||||
* 1000 * 1000)/(runtime->rate
|
||||
* runtime->channels * 2)));
|
||||
hrtimer_start(&prtd->hrt,
|
||||
ns_to_ktime(0),
|
||||
HRTIMER_MODE_REL);
|
||||
pr_debug("prtd->poll_time : %d", prtd->poll_time);
|
||||
break;
|
||||
}
|
||||
|
@ -465,6 +459,8 @@ static int msm_afe_trigger(struct snd_pcm_substream *substream, int cmd)
|
|||
case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
|
||||
pr_debug("%s: SNDRV_PCM_TRIGGER_START\n", __func__);
|
||||
prtd->start = 1;
|
||||
hrtimer_start(&prtd->hrt, ns_to_ktime(0),
|
||||
HRTIMER_MODE_REL);
|
||||
break;
|
||||
case SNDRV_PCM_TRIGGER_STOP:
|
||||
case SNDRV_PCM_TRIGGER_SUSPEND:
|
||||
|
|
|
@ -448,7 +448,7 @@ int afe_port_start(u16 port_id, union afe_port_config *afe_config,
|
|||
|
||||
if ((port_id == RT_PROXY_DAI_001_RX) ||
|
||||
(port_id == RT_PROXY_DAI_002_TX))
|
||||
return -EINVAL;
|
||||
return 0;
|
||||
if ((port_id == RT_PROXY_DAI_002_RX) ||
|
||||
(port_id == RT_PROXY_DAI_001_TX))
|
||||
port_id = VIRTUAL_ID_TO_PORTID(port_id);
|
||||
|
@ -608,7 +608,7 @@ int afe_open(u16 port_id, union afe_port_config *afe_config, int rate)
|
|||
|
||||
if ((port_id == RT_PROXY_DAI_001_RX) ||
|
||||
(port_id == RT_PROXY_DAI_002_TX))
|
||||
return -EINVAL;
|
||||
return 0;
|
||||
if ((port_id == RT_PROXY_DAI_002_RX) ||
|
||||
(port_id == RT_PROXY_DAI_001_TX))
|
||||
port_id = VIRTUAL_ID_TO_PORTID(port_id);
|
||||
|
|
Loading…
Reference in a new issue