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 0b7d216e24f..c6c3f9f0da7 100644 --- a/include/sound/cs8403.h +++ b/include/sound/cs8403.h @@ -36,7 +36,7 @@ #endif -SND_CS8403_DECL void SND_CS8403_DECODE(snd_aes_iec958_t *diga, unsigned char bits) +SND_CS8403_DECL void SND_CS8403_DECODE(struct snd_aes_iec958 *diga, unsigned char bits) { if (bits & 0x01) { /* consumer */ if (!(bits & 0x02)) @@ -79,7 +79,7 @@ SND_CS8403_DECL void SND_CS8403_DECODE(snd_aes_iec958_t *diga, unsigned char bit } } -SND_CS8403_DECL unsigned char SND_CS8403_ENCODE(snd_aes_iec958_t *diga) +SND_CS8403_DECL unsigned char SND_CS8403_ENCODE(struct snd_aes_iec958 *diga) { unsigned char bits; @@ -166,7 +166,7 @@ SND_CS8403_DECL unsigned char SND_CS8403_ENCODE(snd_aes_iec958_t *diga) #endif -SND_CS8404_DECL void SND_CS8404_DECODE(snd_aes_iec958_t *diga, unsigned char bits) +SND_CS8404_DECL void SND_CS8404_DECODE(struct snd_aes_iec958 *diga, unsigned char bits) { if (bits & 0x10) { /* consumer */ if (!(bits & 0x20)) @@ -205,7 +205,7 @@ SND_CS8404_DECL void SND_CS8404_DECODE(snd_aes_iec958_t *diga, unsigned char bit } } -SND_CS8404_DECL unsigned char SND_CS8404_ENCODE(snd_aes_iec958_t *diga) +SND_CS8404_DECL unsigned char SND_CS8404_ENCODE(struct snd_aes_iec958 *diga) { unsigned char bits; diff --git a/include/sound/cs8427.h b/include/sound/cs8427.h index e725b7049a5..97fd9acf802 100644 --- a/include/sound/cs8427.h +++ b/include/sound/cs8427.h @@ -186,11 +186,16 @@ #define CS8427_VERSHIFT 0 #define CS8427_VER8427A 0x71 -int snd_cs8427_create(snd_i2c_bus_t *bus, unsigned char addr, - unsigned int reset_timeout, snd_i2c_device_t **r_cs8427); -int snd_cs8427_reg_write(snd_i2c_device_t *device, unsigned char reg, unsigned char val); -int snd_cs8427_iec958_build(snd_i2c_device_t *cs8427, snd_pcm_substream_t *playback_substream, snd_pcm_substream_t *capture_substream); -int snd_cs8427_iec958_active(snd_i2c_device_t *cs8427, int active); -int snd_cs8427_iec958_pcm(snd_i2c_device_t *cs8427, unsigned int rate); +struct snd_pcm_substream; + +int snd_cs8427_create(struct snd_i2c_bus *bus, unsigned char addr, + unsigned int reset_timeout, struct snd_i2c_device **r_cs8427); +int snd_cs8427_reg_write(struct snd_i2c_device *device, unsigned char reg, + unsigned char val); +int snd_cs8427_iec958_build(struct snd_i2c_device *cs8427, + struct snd_pcm_substream *playback_substream, + struct snd_pcm_substream *capture_substream); +int snd_cs8427_iec958_active(struct snd_i2c_device *cs8427, int active); +int snd_cs8427_iec958_pcm(struct snd_i2c_device *cs8427, unsigned int rate); #endif /* __SOUND_CS8427_H */ diff --git a/include/sound/i2c.h b/include/sound/i2c.h index a665ddf9c14..81eb23ed761 100644 --- a/include/sound/i2c.h +++ b/include/sound/i2c.h @@ -21,82 +21,84 @@ * */ -typedef struct _snd_i2c_device snd_i2c_device_t; -typedef struct _snd_i2c_bus snd_i2c_bus_t; - #define SND_I2C_DEVICE_ADDRTEN (1<<0) /* 10-bit I2C address */ -struct _snd_i2c_device { +struct snd_i2c_device { struct list_head list; - snd_i2c_bus_t *bus; /* I2C bus */ + struct snd_i2c_bus *bus; /* I2C bus */ char name[32]; /* some useful device name */ unsigned short flags; /* device flags */ unsigned short addr; /* device address (might be 10-bit) */ unsigned long private_value; void *private_data; - void (*private_free)(snd_i2c_device_t *device); + void (*private_free)(struct snd_i2c_device *device); +}; + +#define snd_i2c_device(n) list_entry(n, struct snd_i2c_device, list) + +struct snd_i2c_bit_ops { + void (*start)(struct snd_i2c_bus *bus); /* transfer start */ + void (*stop)(struct snd_i2c_bus *bus); /* transfer stop */ + void (*direction)(struct snd_i2c_bus *bus, int clock, int data); /* set line direction (0 = write, 1 = read) */ + void (*setlines)(struct snd_i2c_bus *bus, int clock, int data); + int (*getclock)(struct snd_i2c_bus *bus); + int (*getdata)(struct snd_i2c_bus *bus, int ack); }; -#define snd_i2c_device(n) list_entry(n, snd_i2c_device_t, list) - -typedef struct _snd_i2c_bit_ops { - void (*start)(snd_i2c_bus_t *bus); /* transfer start */ - void (*stop)(snd_i2c_bus_t *bus); /* transfer stop */ - void (*direction)(snd_i2c_bus_t *bus, int clock, int data); /* set line direction (0 = write, 1 = read) */ - void (*setlines)(snd_i2c_bus_t *bus, int clock, int data); - int (*getclock)(snd_i2c_bus_t *bus); - int (*getdata)(snd_i2c_bus_t *bus, int ack); -} snd_i2c_bit_ops_t; - -typedef struct _snd_i2c_ops { - int (*sendbytes)(snd_i2c_device_t *device, unsigned char *bytes, int count); - int (*readbytes)(snd_i2c_device_t *device, unsigned char *bytes, int count); - int (*probeaddr)(snd_i2c_bus_t *bus, unsigned short addr); -} snd_i2c_ops_t; - -struct _snd_i2c_bus { - snd_card_t *card; /* card which I2C belongs to */ +struct snd_i2c_ops { + int (*sendbytes)(struct snd_i2c_device *device, unsigned char *bytes, int count); + int (*readbytes)(struct snd_i2c_device *device, unsigned char *bytes, int count); + int (*probeaddr)(struct snd_i2c_bus *bus, unsigned short addr); +}; + +struct snd_i2c_bus { + struct snd_card *card; /* card which I2C belongs to */ char name[32]; /* some useful label */ struct semaphore lock_mutex; - snd_i2c_bus_t *master; /* master bus when SCK/SCL is shared */ + struct snd_i2c_bus *master; /* master bus when SCK/SCL is shared */ struct list_head buses; /* master: slave buses sharing SCK/SCL, slave: link list */ struct list_head devices; /* attached devices to this bus */ union { - snd_i2c_bit_ops_t *bit; + struct snd_i2c_bit_ops *bit; void *ops; } hw_ops; /* lowlevel operations */ - snd_i2c_ops_t *ops; /* midlevel operations */ + struct snd_i2c_ops *ops; /* midlevel operations */ unsigned long private_value; void *private_data; - void (*private_free)(snd_i2c_bus_t *bus); + void (*private_free)(struct snd_i2c_bus *bus); }; -#define snd_i2c_slave_bus(n) list_entry(n, snd_i2c_bus_t, buses) +#define snd_i2c_slave_bus(n) list_entry(n, struct snd_i2c_bus, buses) -int snd_i2c_bus_create(snd_card_t *card, const char *name, snd_i2c_bus_t *master, snd_i2c_bus_t **ri2c); -int snd_i2c_device_create(snd_i2c_bus_t *bus, const char *name, unsigned char addr, snd_i2c_device_t **rdevice); -int snd_i2c_device_free(snd_i2c_device_t *device); +int snd_i2c_bus_create(struct snd_card *card, const char *name, + struct snd_i2c_bus *master, struct snd_i2c_bus **ri2c); +int snd_i2c_device_create(struct snd_i2c_bus *bus, const char *name, + unsigned char addr, struct snd_i2c_device **rdevice); +int snd_i2c_device_free(struct snd_i2c_device *device); -static inline void snd_i2c_lock(snd_i2c_bus_t *bus) { +static inline void snd_i2c_lock(struct snd_i2c_bus *bus) +{ if (bus->master) down(&bus->master->lock_mutex); else down(&bus->lock_mutex); } -static inline void snd_i2c_unlock(snd_i2c_bus_t *bus) { + +static inline void snd_i2c_unlock(struct snd_i2c_bus *bus) +{ if (bus->master) up(&bus->master->lock_mutex); else up(&bus->lock_mutex); } -int snd_i2c_sendbytes(snd_i2c_device_t *device, unsigned char *bytes, int count); -int snd_i2c_readbytes(snd_i2c_device_t *device, unsigned char *bytes, int count); -int snd_i2c_probeaddr(snd_i2c_bus_t *bus, unsigned short addr); +int snd_i2c_sendbytes(struct snd_i2c_device *device, unsigned char *bytes, int count); +int snd_i2c_readbytes(struct snd_i2c_device *device, unsigned char *bytes, int count); +int snd_i2c_probeaddr(struct snd_i2c_bus *bus, unsigned short addr); #endif /* __SOUND_I2C_H */ diff --git a/include/sound/tea575x-tuner.h b/include/sound/tea575x-tuner.h index b82e408e758..a4f55452019 100644 --- a/include/sound/tea575x-tuner.h +++ b/include/sound/tea575x-tuner.h @@ -24,15 +24,15 @@ #include <linux/videodev.h> -typedef struct snd_tea575x tea575x_t; +struct snd_tea575x; struct snd_tea575x_ops { - void (*write)(tea575x_t *tea, unsigned int val); - unsigned int (*read)(tea575x_t *tea); + void (*write)(struct snd_tea575x *tea, unsigned int val); + unsigned int (*read)(struct snd_tea575x *tea); }; struct snd_tea575x { - snd_card_t *card; + struct snd_card *card; struct video_device vd; /* video device */ struct file_operations fops; int dev_nr; /* requested device number + 1 */ @@ -45,7 +45,7 @@ struct snd_tea575x { void *private_data; }; -void snd_tea575x_init(tea575x_t *tea); -void snd_tea575x_exit(tea575x_t *tea); +void snd_tea575x_init(struct snd_tea575x *tea); +void snd_tea575x_exit(struct snd_tea575x *tea); #endif /* __SOUND_TEA575X_TUNER_H */ diff --git a/include/sound/tea6330t.h b/include/sound/tea6330t.h index 1b265bf24ee..51b282b7689 100644 --- a/include/sound/tea6330t.h +++ b/include/sound/tea6330t.h @@ -24,7 +24,8 @@ #include "i2c.h" /* generic i2c support */ -int snd_tea6330t_detect(snd_i2c_bus_t *bus, int equalizer); -int snd_tea6330t_update_mixer(snd_card_t * card, snd_i2c_bus_t * bus, int equalizer, int fader); +int snd_tea6330t_detect(struct snd_i2c_bus *bus, int equalizer); +int snd_tea6330t_update_mixer(struct snd_card *card, struct snd_i2c_bus *bus, + int equalizer, int fader); #endif /* __SOUND_TEA6330T_H */ diff --git a/include/sound/uda1341.h b/include/sound/uda1341.h index 54a048ac6e4..2e564bfb37f 100644 --- a/include/sound/uda1341.h +++ b/include/sound/uda1341.h @@ -15,7 +15,7 @@ * features support */ -/* $Id: uda1341.h,v 1.7 2005/11/17 10:25:22 tiwai Exp $ */ +/* $Id: uda1341.h,v 1.8 2005/11/17 14:17:21 tiwai Exp $ */ #define UDA1341_ALSA_NAME "snd-uda1341" @@ -119,7 +119,7 @@ enum write_through { FLUSH, }; -int __init snd_chip_uda1341_mixer_new(snd_card_t *card, struct l3_client **clnt); +int __init snd_chip_uda1341_mixer_new(struct snd_card *card, struct l3_client **clnt); /* * Local variables: |