diff options
Diffstat (limited to 'include/sound')
-rw-r--r-- | include/sound/cs8403.h | 8 | ||||
-rw-r--r-- | include/sound/cs8427.h | 17 | ||||
-rw-r--r-- | include/sound/i2c.h | 78 | ||||
-rw-r--r-- | include/sound/tea575x-tuner.h | 12 | ||||
-rw-r--r-- | include/sound/tea6330t.h | 5 | ||||
-rw-r--r-- | include/sound/uda1341.h | 4 |
6 files changed, 66 insertions, 58 deletions
diff --git a/include/sound/cs8403.h b/include/sound/cs8403.h index 0b7d216e24f1..c6c3f9f0da78 100644 --- a/include/sound/cs8403.h +++ b/include/sound/cs8403.h | |||
@@ -36,7 +36,7 @@ | |||
36 | #endif | 36 | #endif |
37 | 37 | ||
38 | 38 | ||
39 | SND_CS8403_DECL void SND_CS8403_DECODE(snd_aes_iec958_t *diga, unsigned char bits) | 39 | SND_CS8403_DECL void SND_CS8403_DECODE(struct snd_aes_iec958 *diga, unsigned char bits) |
40 | { | 40 | { |
41 | if (bits & 0x01) { /* consumer */ | 41 | if (bits & 0x01) { /* consumer */ |
42 | if (!(bits & 0x02)) | 42 | if (!(bits & 0x02)) |
@@ -79,7 +79,7 @@ SND_CS8403_DECL void SND_CS8403_DECODE(snd_aes_iec958_t *diga, unsigned char bit | |||
79 | } | 79 | } |
80 | } | 80 | } |
81 | 81 | ||
82 | SND_CS8403_DECL unsigned char SND_CS8403_ENCODE(snd_aes_iec958_t *diga) | 82 | SND_CS8403_DECL unsigned char SND_CS8403_ENCODE(struct snd_aes_iec958 *diga) |
83 | { | 83 | { |
84 | unsigned char bits; | 84 | unsigned char bits; |
85 | 85 | ||
@@ -166,7 +166,7 @@ SND_CS8403_DECL unsigned char SND_CS8403_ENCODE(snd_aes_iec958_t *diga) | |||
166 | #endif | 166 | #endif |
167 | 167 | ||
168 | 168 | ||
169 | SND_CS8404_DECL void SND_CS8404_DECODE(snd_aes_iec958_t *diga, unsigned char bits) | 169 | SND_CS8404_DECL void SND_CS8404_DECODE(struct snd_aes_iec958 *diga, unsigned char bits) |
170 | { | 170 | { |
171 | if (bits & 0x10) { /* consumer */ | 171 | if (bits & 0x10) { /* consumer */ |
172 | if (!(bits & 0x20)) | 172 | if (!(bits & 0x20)) |
@@ -205,7 +205,7 @@ SND_CS8404_DECL void SND_CS8404_DECODE(snd_aes_iec958_t *diga, unsigned char bit | |||
205 | } | 205 | } |
206 | } | 206 | } |
207 | 207 | ||
208 | SND_CS8404_DECL unsigned char SND_CS8404_ENCODE(snd_aes_iec958_t *diga) | 208 | SND_CS8404_DECL unsigned char SND_CS8404_ENCODE(struct snd_aes_iec958 *diga) |
209 | { | 209 | { |
210 | unsigned char bits; | 210 | unsigned char bits; |
211 | 211 | ||
diff --git a/include/sound/cs8427.h b/include/sound/cs8427.h index e725b7049a53..97fd9acf8028 100644 --- a/include/sound/cs8427.h +++ b/include/sound/cs8427.h | |||
@@ -186,11 +186,16 @@ | |||
186 | #define CS8427_VERSHIFT 0 | 186 | #define CS8427_VERSHIFT 0 |
187 | #define CS8427_VER8427A 0x71 | 187 | #define CS8427_VER8427A 0x71 |
188 | 188 | ||
189 | int snd_cs8427_create(snd_i2c_bus_t *bus, unsigned char addr, | 189 | struct snd_pcm_substream; |
190 | unsigned int reset_timeout, snd_i2c_device_t **r_cs8427); | 190 | |
191 | int snd_cs8427_reg_write(snd_i2c_device_t *device, unsigned char reg, unsigned char val); | 191 | int snd_cs8427_create(struct snd_i2c_bus *bus, unsigned char addr, |
192 | int snd_cs8427_iec958_build(snd_i2c_device_t *cs8427, snd_pcm_substream_t *playback_substream, snd_pcm_substream_t *capture_substream); | 192 | unsigned int reset_timeout, struct snd_i2c_device **r_cs8427); |
193 | int snd_cs8427_iec958_active(snd_i2c_device_t *cs8427, int active); | 193 | int snd_cs8427_reg_write(struct snd_i2c_device *device, unsigned char reg, |
194 | int snd_cs8427_iec958_pcm(snd_i2c_device_t *cs8427, unsigned int rate); | 194 | unsigned char val); |
195 | int snd_cs8427_iec958_build(struct snd_i2c_device *cs8427, | ||
196 | struct snd_pcm_substream *playback_substream, | ||
197 | struct snd_pcm_substream *capture_substream); | ||
198 | int snd_cs8427_iec958_active(struct snd_i2c_device *cs8427, int active); | ||
199 | int snd_cs8427_iec958_pcm(struct snd_i2c_device *cs8427, unsigned int rate); | ||
195 | 200 | ||
196 | #endif /* __SOUND_CS8427_H */ | 201 | #endif /* __SOUND_CS8427_H */ |
diff --git a/include/sound/i2c.h b/include/sound/i2c.h index a665ddf9c146..81eb23ed761f 100644 --- a/include/sound/i2c.h +++ b/include/sound/i2c.h | |||
@@ -21,82 +21,84 @@ | |||
21 | * | 21 | * |
22 | */ | 22 | */ |
23 | 23 | ||
24 | typedef struct _snd_i2c_device snd_i2c_device_t; | ||
25 | typedef struct _snd_i2c_bus snd_i2c_bus_t; | ||
26 | |||
27 | #define SND_I2C_DEVICE_ADDRTEN (1<<0) /* 10-bit I2C address */ | 24 | #define SND_I2C_DEVICE_ADDRTEN (1<<0) /* 10-bit I2C address */ |
28 | 25 | ||
29 | struct _snd_i2c_device { | 26 | struct snd_i2c_device { |
30 | struct list_head list; | 27 | struct list_head list; |
31 | snd_i2c_bus_t *bus; /* I2C bus */ | 28 | struct snd_i2c_bus *bus; /* I2C bus */ |
32 | char name[32]; /* some useful device name */ | 29 | char name[32]; /* some useful device name */ |
33 | unsigned short flags; /* device flags */ | 30 | unsigned short flags; /* device flags */ |
34 | unsigned short addr; /* device address (might be 10-bit) */ | 31 | unsigned short addr; /* device address (might be 10-bit) */ |
35 | unsigned long private_value; | 32 | unsigned long private_value; |
36 | void *private_data; | 33 | void *private_data; |
37 | void (*private_free)(snd_i2c_device_t *device); | 34 | void (*private_free)(struct snd_i2c_device *device); |
35 | }; | ||
36 | |||
37 | #define snd_i2c_device(n) list_entry(n, struct snd_i2c_device, list) | ||
38 | |||
39 | struct snd_i2c_bit_ops { | ||
40 | void (*start)(struct snd_i2c_bus *bus); /* transfer start */ | ||
41 | void (*stop)(struct snd_i2c_bus *bus); /* transfer stop */ | ||
42 | void (*direction)(struct snd_i2c_bus *bus, int clock, int data); /* set line direction (0 = write, 1 = read) */ | ||
43 | void (*setlines)(struct snd_i2c_bus *bus, int clock, int data); | ||
44 | int (*getclock)(struct snd_i2c_bus *bus); | ||
45 | int (*getdata)(struct snd_i2c_bus *bus, int ack); | ||
38 | }; | 46 | }; |
39 | 47 | ||
40 | #define snd_i2c_device(n) list_entry(n, snd_i2c_device_t, list) | 48 | struct snd_i2c_ops { |
41 | 49 | int (*sendbytes)(struct snd_i2c_device *device, unsigned char *bytes, int count); | |
42 | typedef struct _snd_i2c_bit_ops { | 50 | int (*readbytes)(struct snd_i2c_device *device, unsigned char *bytes, int count); |
43 | void (*start)(snd_i2c_bus_t *bus); /* transfer start */ | 51 | int (*probeaddr)(struct snd_i2c_bus *bus, unsigned short addr); |
44 | void (*stop)(snd_i2c_bus_t *bus); /* transfer stop */ | 52 | }; |
45 | void (*direction)(snd_i2c_bus_t *bus, int clock, int data); /* set line direction (0 = write, 1 = read) */ | 53 | |
46 | void (*setlines)(snd_i2c_bus_t *bus, int clock, int data); | 54 | struct snd_i2c_bus { |
47 | int (*getclock)(snd_i2c_bus_t *bus); | 55 | struct snd_card *card; /* card which I2C belongs to */ |
48 | int (*getdata)(snd_i2c_bus_t *bus, int ack); | ||
49 | } snd_i2c_bit_ops_t; | ||
50 | |||
51 | typedef struct _snd_i2c_ops { | ||
52 | int (*sendbytes)(snd_i2c_device_t *device, unsigned char *bytes, int count); | ||
53 | int (*readbytes)(snd_i2c_device_t *device, unsigned char *bytes, int count); | ||
54 | int (*probeaddr)(snd_i2c_bus_t *bus, unsigned short addr); | ||
55 | } snd_i2c_ops_t; | ||
56 | |||
57 | struct _snd_i2c_bus { | ||
58 | snd_card_t *card; /* card which I2C belongs to */ | ||
59 | char name[32]; /* some useful label */ | 56 | char name[32]; /* some useful label */ |
60 | 57 | ||
61 | struct semaphore lock_mutex; | 58 | struct semaphore lock_mutex; |
62 | 59 | ||
63 | snd_i2c_bus_t *master; /* master bus when SCK/SCL is shared */ | 60 | struct snd_i2c_bus *master; /* master bus when SCK/SCL is shared */ |
64 | struct list_head buses; /* master: slave buses sharing SCK/SCL, slave: link list */ | 61 | struct list_head buses; /* master: slave buses sharing SCK/SCL, slave: link list */ |
65 | 62 | ||
66 | struct list_head devices; /* attached devices to this bus */ | 63 | struct list_head devices; /* attached devices to this bus */ |
67 | 64 | ||
68 | union { | 65 | union { |
69 | snd_i2c_bit_ops_t *bit; | 66 | struct snd_i2c_bit_ops *bit; |
70 | void *ops; | 67 | void *ops; |
71 | } hw_ops; /* lowlevel operations */ | 68 | } hw_ops; /* lowlevel operations */ |
72 | snd_i2c_ops_t *ops; /* midlevel operations */ | 69 | struct snd_i2c_ops *ops; /* midlevel operations */ |
73 | 70 | ||
74 | unsigned long private_value; | 71 | unsigned long private_value; |
75 | void *private_data; | 72 | void *private_data; |
76 | void (*private_free)(snd_i2c_bus_t *bus); | 73 | void (*private_free)(struct snd_i2c_bus *bus); |
77 | }; | 74 | }; |
78 | 75 | ||
79 | #define snd_i2c_slave_bus(n) list_entry(n, snd_i2c_bus_t, buses) | 76 | #define snd_i2c_slave_bus(n) list_entry(n, struct snd_i2c_bus, buses) |
80 | 77 | ||
81 | int snd_i2c_bus_create(snd_card_t *card, const char *name, snd_i2c_bus_t *master, snd_i2c_bus_t **ri2c); | 78 | int snd_i2c_bus_create(struct snd_card *card, const char *name, |
82 | int snd_i2c_device_create(snd_i2c_bus_t *bus, const char *name, unsigned char addr, snd_i2c_device_t **rdevice); | 79 | struct snd_i2c_bus *master, struct snd_i2c_bus **ri2c); |
83 | int snd_i2c_device_free(snd_i2c_device_t *device); | 80 | int snd_i2c_device_create(struct snd_i2c_bus *bus, const char *name, |
81 | unsigned char addr, struct snd_i2c_device **rdevice); | ||
82 | int snd_i2c_device_free(struct snd_i2c_device *device); | ||
84 | 83 | ||
85 | static inline void snd_i2c_lock(snd_i2c_bus_t *bus) { | 84 | static inline void snd_i2c_lock(struct snd_i2c_bus *bus) |
85 | { | ||
86 | if (bus->master) | 86 | if (bus->master) |
87 | down(&bus->master->lock_mutex); | 87 | down(&bus->master->lock_mutex); |
88 | else | 88 | else |
89 | down(&bus->lock_mutex); | 89 | down(&bus->lock_mutex); |
90 | } | 90 | } |
91 | static inline void snd_i2c_unlock(snd_i2c_bus_t *bus) { | 91 | |
92 | static inline void snd_i2c_unlock(struct snd_i2c_bus *bus) | ||
93 | { | ||
92 | if (bus->master) | 94 | if (bus->master) |
93 | up(&bus->master->lock_mutex); | 95 | up(&bus->master->lock_mutex); |
94 | else | 96 | else |
95 | up(&bus->lock_mutex); | 97 | up(&bus->lock_mutex); |
96 | } | 98 | } |
97 | 99 | ||
98 | int snd_i2c_sendbytes(snd_i2c_device_t *device, unsigned char *bytes, int count); | 100 | int snd_i2c_sendbytes(struct snd_i2c_device *device, unsigned char *bytes, int count); |
99 | int snd_i2c_readbytes(snd_i2c_device_t *device, unsigned char *bytes, int count); | 101 | int snd_i2c_readbytes(struct snd_i2c_device *device, unsigned char *bytes, int count); |
100 | int snd_i2c_probeaddr(snd_i2c_bus_t *bus, unsigned short addr); | 102 | int snd_i2c_probeaddr(struct snd_i2c_bus *bus, unsigned short addr); |
101 | 103 | ||
102 | #endif /* __SOUND_I2C_H */ | 104 | #endif /* __SOUND_I2C_H */ |
diff --git a/include/sound/tea575x-tuner.h b/include/sound/tea575x-tuner.h index b82e408e758f..a4f554520197 100644 --- a/include/sound/tea575x-tuner.h +++ b/include/sound/tea575x-tuner.h | |||
@@ -24,15 +24,15 @@ | |||
24 | 24 | ||
25 | #include <linux/videodev.h> | 25 | #include <linux/videodev.h> |
26 | 26 | ||
27 | typedef struct snd_tea575x tea575x_t; | 27 | struct snd_tea575x; |
28 | 28 | ||
29 | struct snd_tea575x_ops { | 29 | struct snd_tea575x_ops { |
30 | void (*write)(tea575x_t *tea, unsigned int val); | 30 | void (*write)(struct snd_tea575x *tea, unsigned int val); |
31 | unsigned int (*read)(tea575x_t *tea); | 31 | unsigned int (*read)(struct snd_tea575x *tea); |
32 | }; | 32 | }; |
33 | 33 | ||
34 | struct snd_tea575x { | 34 | struct snd_tea575x { |
35 | snd_card_t *card; | 35 | struct snd_card *card; |
36 | struct video_device vd; /* video device */ | 36 | struct video_device vd; /* video device */ |
37 | struct file_operations fops; | 37 | struct file_operations fops; |
38 | int dev_nr; /* requested device number + 1 */ | 38 | int dev_nr; /* requested device number + 1 */ |
@@ -45,7 +45,7 @@ struct snd_tea575x { | |||
45 | void *private_data; | 45 | void *private_data; |
46 | }; | 46 | }; |
47 | 47 | ||
48 | void snd_tea575x_init(tea575x_t *tea); | 48 | void snd_tea575x_init(struct snd_tea575x *tea); |
49 | void snd_tea575x_exit(tea575x_t *tea); | 49 | void snd_tea575x_exit(struct snd_tea575x *tea); |
50 | 50 | ||
51 | #endif /* __SOUND_TEA575X_TUNER_H */ | 51 | #endif /* __SOUND_TEA575X_TUNER_H */ |
diff --git a/include/sound/tea6330t.h b/include/sound/tea6330t.h index 1b265bf24ee1..51b282b76896 100644 --- a/include/sound/tea6330t.h +++ b/include/sound/tea6330t.h | |||
@@ -24,7 +24,8 @@ | |||
24 | 24 | ||
25 | #include "i2c.h" /* generic i2c support */ | 25 | #include "i2c.h" /* generic i2c support */ |
26 | 26 | ||
27 | int snd_tea6330t_detect(snd_i2c_bus_t *bus, int equalizer); | 27 | int snd_tea6330t_detect(struct snd_i2c_bus *bus, int equalizer); |
28 | int snd_tea6330t_update_mixer(snd_card_t * card, snd_i2c_bus_t * bus, int equalizer, int fader); | 28 | int snd_tea6330t_update_mixer(struct snd_card *card, struct snd_i2c_bus *bus, |
29 | int equalizer, int fader); | ||
29 | 30 | ||
30 | #endif /* __SOUND_TEA6330T_H */ | 31 | #endif /* __SOUND_TEA6330T_H */ |
diff --git a/include/sound/uda1341.h b/include/sound/uda1341.h index 54a048ac6e4f..2e564bfb37fe 100644 --- a/include/sound/uda1341.h +++ b/include/sound/uda1341.h | |||
@@ -15,7 +15,7 @@ | |||
15 | * features support | 15 | * features support |
16 | */ | 16 | */ |
17 | 17 | ||
18 | /* $Id: uda1341.h,v 1.7 2005/11/17 10:25:22 tiwai Exp $ */ | 18 | /* $Id: uda1341.h,v 1.8 2005/11/17 14:17:21 tiwai Exp $ */ |
19 | 19 | ||
20 | #define UDA1341_ALSA_NAME "snd-uda1341" | 20 | #define UDA1341_ALSA_NAME "snd-uda1341" |
21 | 21 | ||
@@ -119,7 +119,7 @@ enum write_through { | |||
119 | FLUSH, | 119 | FLUSH, |
120 | }; | 120 | }; |
121 | 121 | ||
122 | int __init snd_chip_uda1341_mixer_new(snd_card_t *card, struct l3_client **clnt); | 122 | int __init snd_chip_uda1341_mixer_new(struct snd_card *card, struct l3_client **clnt); |
123 | 123 | ||
124 | /* | 124 | /* |
125 | * Local variables: | 125 | * Local variables: |