ALSA: timer - pass real event in snd_timer_notify1() to instance callback
authorJaroslav Kysela <perex@perex.cz>
Wed, 3 Mar 2010 10:05:55 +0000 (11:05 +0100)
committerTakashi Iwai <tiwai@suse.de>
Wed, 3 Mar 2010 21:39:45 +0000 (22:39 +0100)
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>
include/sound/asound.h
sound/core/timer.c

index 1f57bb92eb5a60fe985970b5bdb9712b24e98905..0985955006320e1ccc5edbca4c6b053b3daf1179 100644 (file)
@@ -544,7 +544,7 @@ struct snd_rawmidi_status {
  *  Timer section - /dev/snd/timer
  */
 
-#define SNDRV_TIMER_VERSION            SNDRV_PROTOCOL_VERSION(2, 0, 5)
+#define SNDRV_TIMER_VERSION            SNDRV_PROTOCOL_VERSION(2, 0, 6)
 
 enum {
        SNDRV_TIMER_CLASS_NONE = -1,
index 8f8b17ac074df5d8e07821c638657e55a1730fb4..73943651caed9e4376f8694ffa90835cd1d9832e 100644 (file)
@@ -393,7 +393,7 @@ static void snd_timer_notify1(struct snd_timer_instance *ti, int event)
            event == SNDRV_TIMER_EVENT_CONTINUE)
                resolution = snd_timer_resolution(ti);
        if (ti->ccallback)
-               ti->ccallback(ti, SNDRV_TIMER_EVENT_START, &tstamp, resolution);
+               ti->ccallback(ti, event, &tstamp, resolution);
        if (ti->flags & SNDRV_TIMER_IFLG_SLAVE)
                return;
        timer = ti->timer;