Skip to content

Commit 3d53c6d

Browse files
crojewsk-intelbroonie
authored andcommitted
ASoC: Intel: catpt: Relax clock selection conditions
Stress tests show that DSP may occasionally be late with signaling WAIT state when all pins are made use of simultaneously plus start/stop (pause) gets involved. While this isn't tied to standard audio scenarios where only System Pin (playback and capture) is involved, ensure user is not hindered when playing with more advanced scenarios. >From DSP perspective, clock acts as a resource: low clock equals less resources, high clock more resources. Relax clock selection procedure so only low -> high switch is allowed when awaiting WAIT signal times out. Once active stream count decreases, DSP will have more time internally to adjust thus low clock selection becomes possible again. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20201012103221.30759-2-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 1d159ed commit 3d53c6d

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

  • sound/soc/intel/catpt

sound/soc/intel/catpt/dsp.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -267,9 +267,12 @@ static int catpt_dsp_select_lpclock(struct catpt_dev *cdev, bool lp, bool waiti)
267267
reg, (reg & CATPT_ISD_DCPWM),
268268
500, 10000);
269269
if (ret) {
270-
dev_err(cdev->dev, "await WAITI timeout\n");
271-
mutex_unlock(&cdev->clk_mutex);
272-
return ret;
270+
dev_warn(cdev->dev, "await WAITI timeout\n");
271+
/* no signal - only high clock selection allowed */
272+
if (lp) {
273+
mutex_unlock(&cdev->clk_mutex);
274+
return 0;
275+
}
273276
}
274277
}
275278

0 commit comments

Comments
 (0)