aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched_clock.c
stat options
Period:
Authors:

Commits per author per week (path 'kernel/sched_clock.c')

AuthorW35 2025W36 2025W37 2025W38 2025Total
Total00000
'n180' href='#n180'>180 181 182 183 184 185 186 187 188 189 190 191 192
#ifndef __SOUND_INFO_H
#define __SOUND_INFO_H

/*
 *  Header file for info interface
 *  Copyright (c) by Jaroslav Kysela <perex@perex.cz>
 *
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 *
 *   This program is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU General Public License for more details.
 *
 *   You should have received a copy of the GNU General Public License
 *   along with this program; if not, write to the Free Software
 *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 *
 */

#include <linux/poll.h>

/* buffer for information */
struct snd_info_buffer {
	char *buffer;		/* pointer to begin of buffer */
	unsigned int curr;	/* current position in buffer */
	unsigned int size;	/* current size */
	unsigned int len;	/* total length of buffer */
	int stop;		/* stop flag */
	int error;		/* error code */
};

#define SNDRV_INFO_CONTENT_TEXT		0
#define SNDRV_INFO_CONTENT_DATA		1

struct snd_info_entry;

struct snd_info_entry_text {
	void (*read) (struct snd_info_entry *entry, struct snd_info_buffer *buffer);
	void (*write) (struct snd_info_entry *entry, struct snd_info_buffer *buffer);
};

struct snd_info_entry_ops {
	int (*open) (struct snd_info_entry *entry,
		     unsigned short mode, void **file_private_data);
	int (*release) (struct snd_info_entry * entry,
			unsigned short mode, void *file_private_data);
	long (*read) (struct snd_info_entry *entry, void *file_private_data,
		      struct file * file, char __user *buf,
		      unsigned long count, unsigned long pos);
	long (*write) (struct snd_info_entry *entry, void *file_private_data,
		       struct file * file, const char __user *buf,
		       unsigned long count, unsigned long pos);
	long long (*llseek) (struct snd_info_entry *entry, void *file_private_data,
			    struct file * file, long long offset, int orig);
	unsigned int (*poll) (struct snd_info_entry *entry, void *file_private_data,
			      struct file * file, poll_table * wait);
	int (*ioctl) (struct snd_info_entry *entry, void *file_private_data,
		      struct file * file, unsigned int cmd, unsigned long arg);
	int (*mmap) (struct snd_info_entry *entry, void *file_private_data,
		     struct inode * inode, struct file * file,
		     struct vm_area_struct * vma);
};

struct snd_info_entry {
	const char *name;
	mode_t mode;
	long size;
	unsigned short content;
	union {
		struct snd_info_entry_text text;
		struct snd_info_entry_ops *ops;
	} c;
	struct snd_info_entry *parent;
	struct snd_card *card;
	struct module *module;
	void *private_data;
	void (*private_free)(struct snd_info_entry *entry);
	struct proc_dir_entry *p;
	struct mutex access;
	struct list_head children;
	struct list_head list;
};

#if defined(CONFIG_SND_OSSEMUL) && defined(CONFIG_PROC_FS)
int snd_info_minor_register(void);
int snd_info_minor_unregister(void);
#else
#define snd_info_minor_register() /* NOP */
#define snd_info_minor_unregister() /* NOP */
#endif


#ifdef CONFIG_PROC_FS

extern struct snd_info_entry *snd_seq_root;
#ifdef CONFIG_SND_OSSEMUL
extern struct snd_info_entry *snd_oss_root;
#else
#define snd_oss_root NULL
#endif