Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* async: fix snd_async_del_handler for TIMER type
       [not found] <alsa-project/alsa-lib/pr/525@alsa-project.org>
@ 2026-09-15 11:50 ` GitHub pull_request - opened
  0 siblings, 0 replies; only message in thread
From: GitHub pull_request - opened @ 2026-09-15 11:50 UTC (permalink / raw)
  To: alsa-devel

alsa-project/alsa-lib pull request #525 was opened from LilyKing2026:

## Problem

`snd_async_del_handler()` has two switch statements that handle `PCM` and `CTL` handler types, but not `TIMER`. When a TIMER type handler is deleted, both switches fall through to `default` and trigger `assert(0)`, crashing any program that uses `snd_async_add_timer_handler()`.

## Reproduction

On Ubuntu 26.04 (alsa-lib 1.2.15.3), running `selftests/alsa/utimer-test`:

`global-timer: async.c:166: snd_async_del_handler: Assertion '0' failed.`

`Aborted (core dumped)`

## Fix

- Add the missing `SND_ASYNC_HANDLER_TIMER` cases to both switches in `src/async.c`
- Include `timer/timer_local.h` to access the members of `struct _snd_timer`

## Testing

After rebuilding and installing alsa-lib, `utimer-test` changes from FAIL to PASS:

`# PASSED: 2 / 2 tests passed.`

Request URL   : https://github.com/alsa-project/alsa-lib/pull/525
Patch URL     : https://github.com/alsa-project/alsa-lib/pull/525.patch
Repository URL: https://github.com/alsa-project/alsa-lib

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-09-15 11:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <alsa-project/alsa-lib/pr/525@alsa-project.org>
2026-09-15 11:50 ` async: fix snd_async_del_handler for TIMER type GitHub pull_request - opened

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