Skip to content

Commit b30477d

Browse files
perexgtiwai
authored andcommitted
ALSA: timer - pass real event in snd_timer_notify1() to instance callback
Do not use hardcoded SNDRV_TIMER_EVENT_START value. Signed-off-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de>
1 parent faf4eb2 commit b30477d

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎include/sound/asound.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,7 @@ struct snd_rawmidi_status {
544544
* Timer section - /dev/snd/timer
545545
*/
546546

547-
#define SNDRV_TIMER_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 5)
547+
#define SNDRV_TIMER_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 6)
548548

549549
enum {
550550
SNDRV_TIMER_CLASS_NONE = -1,

‎sound/core/timer.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ static void snd_timer_notify1(struct snd_timer_instance *ti, int event)
393393
event == SNDRV_TIMER_EVENT_CONTINUE)
394394
resolution = snd_timer_resolution(ti);
395395
if (ti->ccallback)
396-
ti->ccallback(ti, SNDRV_TIMER_EVENT_START, &tstamp, resolution);
396+
ti->ccallback(ti, event, &tstamp, resolution);
397397
if (ti->flags & SNDRV_TIMER_IFLG_SLAVE)
398398
return;
399399
timer = ti->timer;

0 commit comments

Comments
 (0)