public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v6.6.y] ALSA: timer: Relax start tick time check for slave timer elements
@ 2024-08-19 15:47 Takashi Iwai
  2024-08-27 12:37 ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Takashi Iwai @ 2024-08-19 15:47 UTC (permalink / raw)
  To: gregkh; +Cc: stable

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.

Fixes: 4a63bd179fa8 ("ALSA: timer: Set lower bound of start tick time")
Cc: <stable@vger.kernel.org>
Link: https://github.com/raspberrypi/linux/issues/6294
Link: https://patch.msgid.link/20240810084833.10939-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---

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(-)

diff --git a/sound/core/timer.c b/sound/core/timer.c
index a0b515981ee9..230babace502 100644
--- a/sound/core/timer.c
+++ b/sound/core/timer.c
@@ -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;
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v6.6.y] ALSA: timer: Relax start tick time check for slave timer elements
  2024-08-19 15:47 [PATCH v6.6.y] ALSA: timer: Relax start tick time check for slave timer elements Takashi Iwai
@ 2024-08-27 12:37 ` Greg KH
  0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2024-08-27 12:37 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: stable

On Mon, Aug 19, 2024 at 05:47:45PM +0200, Takashi Iwai wrote:
> 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.
> 
> Fixes: 4a63bd179fa8 ("ALSA: timer: Set lower bound of start tick time")
> Cc: <stable@vger.kernel.org>
> Link: https://github.com/raspberrypi/linux/issues/6294
> Link: https://patch.msgid.link/20240810084833.10939-1-tiwai@suse.de
> Signed-off-by: Takashi Iwai <tiwai@suse.de>
> ---
> 
> 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-08-27 12:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-19 15:47 [PATCH v6.6.y] ALSA: timer: Relax start tick time check for slave timer elements Takashi Iwai
2024-08-27 12:37 ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox