Blame view

include/sound/hwdep.h 2.56 KB
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
1
2
3
4
5
  #ifndef __SOUND_HWDEP_H
  #define __SOUND_HWDEP_H
  
  /*
   *  Hardware dependent layer 
c1017a4cd   Jaroslav Kysela   [ALSA] Changed Ja...
6
   *  Copyright (c) by Jaroslav Kysela <perex@perex.cz>
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
   *
   *
   *   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 <sound/asound.h>
  #include <linux/poll.h>
d9a98de21   Takashi Iwai   [ALSA] Remove xxx...
27
  struct snd_hwdep;
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
28

e0d80648c   Takashi Iwai   ALSA: hwdep - Fix...
29
  /* hwdep file ops; all ops can be NULL */
d9a98de21   Takashi Iwai   [ALSA] Remove xxx...
30
  struct snd_hwdep_ops {
e0d80648c   Takashi Iwai   ALSA: hwdep - Fix...
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
  	long long (*llseek)(struct snd_hwdep *hw, struct file *file,
  			    long long offset, int orig);
  	long (*read)(struct snd_hwdep *hw, char __user *buf,
  		     long count, loff_t *offset);
  	long (*write)(struct snd_hwdep *hw, const char __user *buf,
  		      long count, loff_t *offset);
  	int (*open)(struct snd_hwdep *hw, struct file * file);
  	int (*release)(struct snd_hwdep *hw, struct file * file);
  	unsigned int (*poll)(struct snd_hwdep *hw, struct file *file,
  			     poll_table *wait);
  	int (*ioctl)(struct snd_hwdep *hw, struct file *file,
  		     unsigned int cmd, unsigned long arg);
  	int (*ioctl_compat)(struct snd_hwdep *hw, struct file *file,
  			    unsigned int cmd, unsigned long arg);
  	int (*mmap)(struct snd_hwdep *hw, struct file *file,
  		    struct vm_area_struct *vma);
  	int (*dsp_status)(struct snd_hwdep *hw,
  			  struct snd_hwdep_dsp_status *status);
  	int (*dsp_load)(struct snd_hwdep *hw,
  			struct snd_hwdep_dsp_image *image);
d9a98de21   Takashi Iwai   [ALSA] Remove xxx...
51
  };
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
52

d9a98de21   Takashi Iwai   [ALSA] Remove xxx...
53
54
  struct snd_hwdep {
  	struct snd_card *card;
f87135f56   Clemens Ladisch   [ALSA] dynamic mi...
55
  	struct list_head list;
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
56
57
58
59
60
61
62
63
64
65
  	int device;
  	char id[32];
  	char name[80];
  	int iface;
  
  #ifdef CONFIG_SND_OSSEMUL
  	char oss_dev[32];
  	int oss_type;
  	int ossreg;
  #endif
d9a98de21   Takashi Iwai   [ALSA] Remove xxx...
66
  	struct snd_hwdep_ops ops;
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
67
68
  	wait_queue_head_t open_wait;
  	void *private_data;
d9a98de21   Takashi Iwai   [ALSA] Remove xxx...
69
  	void (*private_free) (struct snd_hwdep *hwdep);
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
70

1a60d4c5a   Ingo Molnar   [ALSA] semaphore ...
71
  	struct mutex open_mutex;
e0d80648c   Takashi Iwai   ALSA: hwdep - Fix...
72
73
74
  	int used;			/* reference counter */
  	unsigned int dsp_loaded;	/* bit fields of loaded dsp indices */
  	unsigned int exclusive:1;	/* exclusive access mode */
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
75
  };
d9a98de21   Takashi Iwai   [ALSA] Remove xxx...
76
77
  extern int snd_hwdep_new(struct snd_card *card, char *id, int device,
  			 struct snd_hwdep **rhwdep);
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
78
79
  
  #endif /* __SOUND_HWDEP_H */