Skip to content

Commit 1072460

Browse files
crojewsk-intelbroonie
authored andcommitted
ASoC: Intel: catpt: Correct clock selection for dai trigger
During stream start DSP firmware requires LPCS disabled as that moment in time is resource heavy. Currently high-clock is selected on start of second stream onwards while low-clock is re-selected before stream actually leaves RESUME state i.e. PAUSE_STREAM call. Fix this by always updating clock before RESUME_STREAM and directly after PAUSE_STREAM. Fixes: a126750 ("ASoC: Intel: catpt: PCM operations") Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20201116133332.8530-3-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent aa9e3fa commit 1072460

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

  • sound/soc/intel/catpt

sound/soc/intel/catpt/pcm.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -458,10 +458,6 @@ static int catpt_dai_prepare(struct snd_pcm_substream *substream,
458458
if (ret)
459459
return CATPT_IPC_ERROR(ret);
460460

461-
ret = catpt_dsp_update_lpclock(cdev);
462-
if (ret)
463-
return ret;
464-
465461
ret = catpt_dai_apply_usettings(dai, stream);
466462
if (ret)
467463
return ret;
@@ -500,18 +496,19 @@ static int catpt_dai_trigger(struct snd_pcm_substream *substream, int cmd,
500496
case SNDRV_PCM_TRIGGER_RESUME:
501497
case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
502498
resume_stream:
499+
catpt_dsp_update_lpclock(cdev);
503500
ret = catpt_ipc_resume_stream(cdev, stream->info.stream_hw_id);
504501
if (ret)
505502
return CATPT_IPC_ERROR(ret);
506503
break;
507504

508505
case SNDRV_PCM_TRIGGER_STOP:
509506
stream->prepared = false;
510-
catpt_dsp_update_lpclock(cdev);
511507
fallthrough;
512508
case SNDRV_PCM_TRIGGER_SUSPEND:
513509
case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
514510
ret = catpt_ipc_pause_stream(cdev, stream->info.stream_hw_id);
511+
catpt_dsp_update_lpclock(cdev);
515512
if (ret)
516513
return CATPT_IPC_ERROR(ret);
517514
break;

0 commit comments

Comments
 (0)