Skip to contentSkip to conversation

ALSA: timer: Relax start tick time check for slave timer elements

PATCH In review Takashi Iwai 2 participants 2 messages Aug 19, 2024 – Aug 27, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ALSA: timer: Relax start tick time check for slave timer elements

commit ccbfcac05866ebe6eb3bc6d07b51d4ed4fcde436 upstream.

The recent addition of a sanity check for a too low start tick time seems breaking some applications that uses aloop with a certain slave timer setup. They may have the initial resolution 0, hence it's treated as if it were a too low value.

Relax and skip the check for the slave timer instance for addressing the regression.

---

Greg, this is a backport for 6.6.y and older stable kernels that failed to cherry-pick the original one.

 sound/core/timer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/core/timer.c +1 -1
index a0b515981ee9..230babace502 100644
@@ -556,7 +556,7 @@ static int snd_timer_start1(struct snd_timer_instance *timeri,
 	/* check the actual time for the start tick;
 	 * bail out as error if it's way too low (< 100us)
 	 */
-	if (start) {
+	if (start && !(timer->hw.flags & SNDRV_TIMER_HW_SLAVE)) {
 		if ((u64)snd_timer_hw_resolution(timer) * ticks < 100000) {
 			result = -EINVAL;
 			goto unlock;
Signature · 1 line
2.43.0
maintainer
#1 lore raw
Quoted 15 lines · Takashi Iwai

commit ccbfcac05866ebe6eb3bc6d07b51d4ed4fcde436 upstream.

The recent addition of a sanity check for a too low start tick time seems breaking some applications that uses aloop with a certain slave timer setup. They may have the initial resolution 0, hence it's treated as if it were a too low value.

Relax and skip the check for the slave timer instance for addressing the regression.

Quoted 5 lines

---

Greg, this is a backport for 6.6.y and older stable kernels that failed to cherry-pick the original one.

Now queued up, thanks.

greg k-h