Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-or-later */
0002 /*
0003  * OSS compatible sequencer driver
0004  * timer handling routines
0005  *
0006  * Copyright (C) 1998,99 Takashi Iwai <tiwai@suse.de>
0007  */
0008 
0009 #ifndef __SEQ_OSS_TIMER_H
0010 #define __SEQ_OSS_TIMER_H
0011 
0012 #include "seq_oss_device.h"
0013 
0014 /*
0015  * timer information definition
0016  */
0017 struct seq_oss_timer {
0018     struct seq_oss_devinfo *dp;
0019     reltime_t cur_tick;
0020     int realtime;
0021     int running;
0022     int tempo, ppq; /* ALSA queue */
0023     int oss_tempo, oss_timebase;
0024 };  
0025 
0026 
0027 struct seq_oss_timer *snd_seq_oss_timer_new(struct seq_oss_devinfo *dp);
0028 void snd_seq_oss_timer_delete(struct seq_oss_timer *dp);
0029 
0030 int snd_seq_oss_timer_start(struct seq_oss_timer *timer);
0031 int snd_seq_oss_timer_stop(struct seq_oss_timer *timer);
0032 int snd_seq_oss_timer_continue(struct seq_oss_timer *timer);
0033 int snd_seq_oss_timer_tempo(struct seq_oss_timer *timer, int value);
0034 #define snd_seq_oss_timer_reset  snd_seq_oss_timer_start
0035 
0036 int snd_seq_oss_timer_ioctl(struct seq_oss_timer *timer, unsigned int cmd, int __user *arg);
0037 
0038 /*
0039  * get current processed time
0040  */
0041 static inline abstime_t
0042 snd_seq_oss_timer_cur_tick(struct seq_oss_timer *timer)
0043 {
0044     return timer->cur_tick;
0045 }
0046 
0047 #endif