Blame src/timer/timer_local.h

Packit 4a16fb
/*
Packit 4a16fb
 *  Timer interface - local header file
Packit 4a16fb
 *  Copyright (c) 2001 by Jaroslav Kysela <perex@perex.cz>
Packit 4a16fb
 *
Packit 4a16fb
 *
Packit 4a16fb
 *   This library is free software; you can redistribute it and/or modify
Packit 4a16fb
 *   it under the terms of the GNU Lesser General Public License as
Packit 4a16fb
 *   published by the Free Software Foundation; either version 2.1 of
Packit 4a16fb
 *   the License, or (at your option) any later version.
Packit 4a16fb
 *
Packit 4a16fb
 *   This program is distributed in the hope that it will be useful,
Packit 4a16fb
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 4a16fb
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Packit 4a16fb
 *   GNU Lesser General Public License for more details.
Packit 4a16fb
 *
Packit 4a16fb
 *   You should have received a copy of the GNU Lesser General Public
Packit 4a16fb
 *   License along with this library; if not, write to the Free Software
Packit 4a16fb
 *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
Packit 4a16fb
 *
Packit 4a16fb
 */
Packit 4a16fb
Packit 4a16fb
#include "local.h"
Packit 4a16fb
#include <limits.h>
Packit 4a16fb
#include <sys/ioctl.h>
Packit 4a16fb
Packit 4a16fb
#ifndef DOC_HIDDEN
Packit 4a16fb
typedef struct {
Packit 4a16fb
	int (*close)(snd_timer_t *timer);
Packit 4a16fb
	int (*nonblock)(snd_timer_t *timer, int nonblock);
Packit 4a16fb
	int (*async)(snd_timer_t *timer, int sig, pid_t pid);
Packit 4a16fb
	int (*info)(snd_timer_t *timer, snd_timer_info_t *info);
Packit 4a16fb
	int (*params)(snd_timer_t *timer, snd_timer_params_t *params);
Packit 4a16fb
	int (*status)(snd_timer_t *timer, snd_timer_status_t *status);
Packit 4a16fb
	int (*rt_start)(snd_timer_t *timer);
Packit 4a16fb
	int (*rt_stop)(snd_timer_t *timer);
Packit 4a16fb
	int (*rt_continue)(snd_timer_t *timer);
Packit 4a16fb
	ssize_t (*read)(snd_timer_t *timer, void *buffer, size_t size);
Packit 4a16fb
} snd_timer_ops_t;
Packit 4a16fb
Packit 4a16fb
struct _snd_timer {
Packit 4a16fb
	unsigned int version;
Packit 4a16fb
	void *dl_handle;
Packit 4a16fb
	char *name;
Packit 4a16fb
	snd_timer_type_t type;
Packit 4a16fb
	int mode;
Packit 4a16fb
	int poll_fd;
Packit 4a16fb
	const snd_timer_ops_t *ops;
Packit 4a16fb
	void *private_data;
Packit 4a16fb
	struct list_head async_handlers;
Packit 4a16fb
};
Packit 4a16fb
Packit 4a16fb
typedef struct {
Packit 4a16fb
	int (*close)(snd_timer_query_t *timer);
Packit 4a16fb
	int (*next_device)(snd_timer_query_t *timer, snd_timer_id_t *tid);
Packit 4a16fb
	int (*info)(snd_timer_query_t *timer, snd_timer_ginfo_t *info);
Packit 4a16fb
	int (*params)(snd_timer_query_t *timer, snd_timer_gparams_t *info);
Packit 4a16fb
	int (*status)(snd_timer_query_t *timer, snd_timer_gstatus_t *info);
Packit 4a16fb
} snd_timer_query_ops_t;
Packit 4a16fb
Packit 4a16fb
struct _snd_timer_query {
Packit 4a16fb
	void *dl_handle;
Packit 4a16fb
	char *name;
Packit 4a16fb
	snd_timer_type_t type;
Packit 4a16fb
	int mode;
Packit 4a16fb
	int poll_fd;
Packit 4a16fb
	const snd_timer_query_ops_t *ops;
Packit 4a16fb
	void *private_data;
Packit 4a16fb
};
Packit 4a16fb
#endif /* DOC_HIDDEN */
Packit 4a16fb
Packit 4a16fb
int snd_timer_hw_open(snd_timer_t **handle, const char *name, int dev_class, int dev_sclass, int card, int device, int subdevice, int mode);
Packit 4a16fb
Packit 4a16fb
int snd_timer_query_hw_open(snd_timer_query_t **handle, const char *name, int mode);
Packit 4a16fb
Packit 4a16fb
int snd_timer_async(snd_timer_t *timer, int sig, pid_t pid);
Packit 4a16fb
Packit 4a16fb
#ifdef INTERNAL
Packit 4a16fb
int INTERNAL(snd_timer_params_set_exclusive)(snd_timer_params_t * params, int exclusive);
Packit 4a16fb
int INTERNAL(snd_timer_params_get_exclusive)(snd_timer_params_t * params);
Packit 4a16fb
void INTERNAL(snd_timer_params_set_filter)(snd_timer_params_t * params, unsigned int filter);
Packit 4a16fb
unsigned int INTERNAL(snd_timer_params_get_filter)(snd_timer_params_t * params);
Packit 4a16fb
int INTERNAL(snd_timer_query_info)(snd_timer_query_t *timer, snd_timer_ginfo_t *info);
Packit 4a16fb
int INTERNAL(snd_timer_query_params)(snd_timer_query_t *timer, snd_timer_gparams_t *params);
Packit 4a16fb
int INTERNAL(snd_timer_query_status)(snd_timer_query_t *timer, snd_timer_gstatus_t *status);
Packit 4a16fb
#endif /* INTERNAL */