summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2005-11-17 14:29:37 +0100
committerJaroslav Kysela <perex@suse.cz>2006-01-03 12:18:19 +0100
commitc8ff6647bb8a1865608b2d0c8565ca0ac47fb9b7 (patch)
tree49f33f6cfed368bd3f85147cb66b0cddc5bcbf28
parentcbdd0dd15f06a989c519089bb24023a5bfa66eaf (diff)
downloadlinux-c8ff6647bb8a1865608b2d0c8565ca0ac47fb9b7.tar.bz2
[ALSA] Remove xxx_t typedefs: ISA AD1848
Modules: AD1848 driver Remove xxx_t typedefs from the ISA AD1848 driver. Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r--include/sound/ad1848.h28
-rw-r--r--sound/isa/ad1848/ad1848.c8
-rw-r--r--sound/isa/ad1848/ad1848_lib.c176
3 files changed, 105 insertions, 107 deletions
diff --git a/include/sound/ad1848.h b/include/sound/ad1848.h
index 7e33b11037f2..a03807088b10 100644
--- a/include/sound/ad1848.h
+++ b/include/sound/ad1848.h
@@ -127,7 +127,7 @@
#define AD1848_THINKPAD_CTL_PORT2 0x15e9
#define AD1848_THINKPAD_CS4248_ENABLE_BIT 0x02
-struct _snd_ad1848 {
+struct snd_ad1848 {
unsigned long port; /* i/o port */
struct resource *res_port;
int irq; /* IRQ line */
@@ -137,10 +137,10 @@ struct _snd_ad1848 {
unsigned short hardware; /* see to AD1848_HW_XXXX */
unsigned short single_dma:1; /* forced single DMA mode (GUS 16-bit daughter board) or dma1 == dma2 */
- snd_pcm_t *pcm;
- snd_pcm_substream_t *playback_substream;
- snd_pcm_substream_t *capture_substream;
- snd_card_t *card;
+ struct snd_pcm *pcm;
+ struct snd_pcm_substream *playback_substream;
+ struct snd_pcm_substream *capture_substream;
+ struct snd_card *card;
unsigned char image[32]; /* SGalaxy needs an access to extended registers */
int mce_bit;
@@ -152,21 +152,19 @@ struct _snd_ad1848 {
struct semaphore open_mutex;
};
-typedef struct _snd_ad1848 ad1848_t;
-
/* exported functions */
-void snd_ad1848_out(ad1848_t *chip, unsigned char reg, unsigned char value);
+void snd_ad1848_out(struct snd_ad1848 *chip, unsigned char reg, unsigned char value);
-int snd_ad1848_create(snd_card_t * card,
+int snd_ad1848_create(struct snd_card *card,
unsigned long port,
int irq, int dma,
unsigned short hardware,
- ad1848_t ** chip);
+ struct snd_ad1848 ** chip);
-int snd_ad1848_pcm(ad1848_t * chip, int device, snd_pcm_t **rpcm);
-const snd_pcm_ops_t *snd_ad1848_get_pcm_ops(int direction);
-int snd_ad1848_mixer(ad1848_t * chip);
+int snd_ad1848_pcm(struct snd_ad1848 * chip, int device, struct snd_pcm **rpcm);
+const struct snd_pcm_ops *snd_ad1848_get_pcm_ops(int direction);
+int snd_ad1848_mixer(struct snd_ad1848 * chip);
/* exported mixer stuffs */
enum { AD1848_MIX_SINGLE, AD1848_MIX_DOUBLE, AD1848_MIX_CAPTURE };
@@ -176,7 +174,7 @@ enum { AD1848_MIX_SINGLE, AD1848_MIX_DOUBLE, AD1848_MIX_CAPTURE };
#define AD1848_MIXVAL_DOUBLE(left_reg, right_reg, shift_left, shift_right, mask, invert) \
((left_reg) | ((right_reg) << 8) | ((shift_left) << 16) | ((shift_right) << 19) | ((mask) << 24) | ((invert) << 22))
-int snd_ad1848_add_ctl(ad1848_t *chip, const char *name, int index, int type, unsigned long value);
+int snd_ad1848_add_ctl(struct snd_ad1848 *chip, const char *name, int index, int type, unsigned long value);
/* for ease of use */
struct ad1848_mix_elem {
@@ -198,7 +196,7 @@ struct ad1848_mix_elem {
.type = AD1848_MIX_DOUBLE, \
.private_value = AD1848_MIXVAL_DOUBLE(left_reg, right_reg, shift_left, shift_right, mask, invert) }
-static inline int snd_ad1848_add_ctl_elem(ad1848_t *chip, const struct ad1848_mix_elem *c)
+static inline int snd_ad1848_add_ctl_elem(struct snd_ad1848 *chip, const struct ad1848_mix_elem *c)
{
return snd_ad1848_add_ctl(chip, c->name, c->index, c->type, c->private_value);
}
diff --git a/sound/isa/ad1848/ad1848.c b/sound/isa/ad1848/ad1848.c
index 3ebcc482b07a..ffc373b37a9b 100644
--- a/sound/isa/ad1848/ad1848.c
+++ b/sound/isa/ad1848/ad1848.c
@@ -60,14 +60,14 @@ MODULE_PARM_DESC(dma1, "DMA1 # for AD1848 driver.");
module_param_array(thinkpad, bool, NULL, 0444);
MODULE_PARM_DESC(thinkpad, "Enable only for the onboard CS4248 of IBM Thinkpad 360/750/755 series.");
-static snd_card_t *snd_ad1848_cards[SNDRV_CARDS] = SNDRV_DEFAULT_PTR;
+static struct snd_card *snd_ad1848_cards[SNDRV_CARDS] = SNDRV_DEFAULT_PTR;
static int __init snd_card_ad1848_probe(int dev)
{
- snd_card_t *card;
- ad1848_t *chip;
- snd_pcm_t *pcm;
+ struct snd_card *card;
+ struct snd_ad1848 *chip;
+ struct snd_pcm *pcm;
int err;
if (port[dev] == SNDRV_AUTO_PORT) {
diff --git a/sound/isa/ad1848/ad1848_lib.c b/sound/isa/ad1848/ad1848_lib.c
index 84a3c559655b..55ba32d4a22e 100644
--- a/sound/isa/ad1848/ad1848_lib.c
+++ b/sound/isa/ad1848/ad1848_lib.c
@@ -69,7 +69,7 @@ static unsigned int rates[14] = {
27042, 32000, 33075, 37800, 44100, 48000
};
-static snd_pcm_hw_constraint_list_t hw_constraints_rates = {
+static struct snd_pcm_hw_constraint_list hw_constraints_rates = {
.count = 14,
.list = rates,
.mask = 0,
@@ -99,7 +99,7 @@ static unsigned char snd_ad1848_original_image[16] =
* Basic I/O functions
*/
-void snd_ad1848_out(ad1848_t *chip,
+void snd_ad1848_out(struct snd_ad1848 *chip,
unsigned char reg,
unsigned char value)
{
@@ -119,7 +119,7 @@ void snd_ad1848_out(ad1848_t *chip,
#endif
}
-static void snd_ad1848_dout(ad1848_t *chip,
+static void snd_ad1848_dout(struct snd_ad1848 *chip,
unsigned char reg, unsigned char value)
{
int timeout;
@@ -131,7 +131,7 @@ static void snd_ad1848_dout(ad1848_t *chip,
mb();
}
-static unsigned char snd_ad1848_in(ad1848_t *chip, unsigned char reg)
+static unsigned char snd_ad1848_in(struct snd_ad1848 *chip, unsigned char reg)
{
int timeout;
@@ -148,7 +148,7 @@ static unsigned char snd_ad1848_in(ad1848_t *chip, unsigned char reg)
#if 0
-static void snd_ad1848_debug(ad1848_t *chip)
+static void snd_ad1848_debug(struct snd_ad1848 *chip)
{
printk("AD1848 REGS: INDEX = 0x%02x ", inb(AD1848P(chip, REGSEL)));
printk(" STATUS = 0x%02x\n", inb(AD1848P(chip, STATUS)));
@@ -176,7 +176,7 @@ static void snd_ad1848_debug(ad1848_t *chip)
* AD1848 detection / MCE routines
*/
-static void snd_ad1848_mce_up(ad1848_t *chip)
+static void snd_ad1848_mce_up(struct snd_ad1848 *chip)
{
unsigned long flags;
int timeout;
@@ -197,7 +197,7 @@ static void snd_ad1848_mce_up(ad1848_t *chip)
spin_unlock_irqrestore(&chip->reg_lock, flags);
}
-static void snd_ad1848_mce_down(ad1848_t *chip)
+static void snd_ad1848_mce_down(struct snd_ad1848 *chip)
{
unsigned long flags;
int timeout;
@@ -279,7 +279,7 @@ static unsigned int snd_ad1848_get_count(unsigned char format,
return size;
}
-static int snd_ad1848_trigger(ad1848_t *chip, unsigned char what,
+static int snd_ad1848_trigger(struct snd_ad1848 *chip, unsigned char what,
int channel, int cmd)
{
int result = 0;
@@ -324,7 +324,7 @@ static unsigned char snd_ad1848_get_rate(unsigned int rate)
return freq_bits[13];
}
-static int snd_ad1848_ioctl(snd_pcm_substream_t * substream,
+static int snd_ad1848_ioctl(struct snd_pcm_substream *substream,
unsigned int cmd, void *arg)
{
return snd_pcm_lib_ioctl(substream, cmd, arg);
@@ -348,7 +348,7 @@ static unsigned char snd_ad1848_get_format(int format, int channels)
return rformat;
}
-static void snd_ad1848_calibrate_mute(ad1848_t *chip, int mute)
+static void snd_ad1848_calibrate_mute(struct snd_ad1848 *chip, int mute)
{
unsigned long flags;
@@ -372,7 +372,7 @@ static void snd_ad1848_calibrate_mute(ad1848_t *chip, int mute)
spin_unlock_irqrestore(&chip->reg_lock, flags);
}
-static void snd_ad1848_set_data_format(ad1848_t *chip, snd_pcm_hw_params_t *hw_params)
+static void snd_ad1848_set_data_format(struct snd_ad1848 *chip, struct snd_pcm_hw_params *hw_params)
{
if (hw_params == NULL) {
chip->image[AD1848_DATA_FORMAT] = 0x20;
@@ -384,7 +384,7 @@ static void snd_ad1848_set_data_format(ad1848_t *chip, snd_pcm_hw_params_t *hw_p
// snd_printk(">>> pmode = 0x%x, dfr = 0x%x\n", pstr->mode, chip->image[AD1848_DATA_FORMAT]);
}
-static int snd_ad1848_open(ad1848_t *chip, unsigned int mode)
+static int snd_ad1848_open(struct snd_ad1848 *chip, unsigned int mode)
{
unsigned long flags;
@@ -438,7 +438,7 @@ static int snd_ad1848_open(ad1848_t *chip, unsigned int mode)
return 0;
}
-static void snd_ad1848_close(ad1848_t *chip)
+static void snd_ad1848_close(struct snd_ad1848 *chip)
{
unsigned long flags;
@@ -479,24 +479,24 @@ static void snd_ad1848_close(ad1848_t *chip)
* ok.. exported functions..
*/
-static int snd_ad1848_playback_trigger(snd_pcm_substream_t * substream,
+static int snd_ad1848_playback_trigger(struct snd_pcm_substream *substream,
int cmd)
{
- ad1848_t *chip = snd_pcm_substream_chip(substream);
+ struct snd_ad1848 *chip = snd_pcm_substream_chip(substream);
return snd_ad1848_trigger(chip, AD1848_PLAYBACK_ENABLE, SNDRV_PCM_STREAM_PLAYBACK, cmd);
}
-static int snd_ad1848_capture_trigger(snd_pcm_substream_t * substream,
+static int snd_ad1848_capture_trigger(struct snd_pcm_substream *substream,
int cmd)
{
- ad1848_t *chip = snd_pcm_substream_chip(substream);
+ struct snd_ad1848 *chip = snd_pcm_substream_chip(substream);
return snd_ad1848_trigger(chip, AD1848_CAPTURE_ENABLE, SNDRV_PCM_STREAM_CAPTURE, cmd);
}
-static int snd_ad1848_playback_hw_params(snd_pcm_substream_t * substream,
- snd_pcm_hw_params_t * hw_params)
+static int snd_ad1848_playback_hw_params(struct snd_pcm_substream *substream,
+ struct snd_pcm_hw_params *hw_params)
{
- ad1848_t *chip = snd_pcm_substream_chip(substream);
+ struct snd_ad1848 *chip = snd_pcm_substream_chip(substream);
unsigned long flags;
int err;
@@ -513,15 +513,15 @@ static int snd_ad1848_playback_hw_params(snd_pcm_substream_t * substream,
return 0;
}
-static int snd_ad1848_playback_hw_free(snd_pcm_substream_t * substream)
+static int snd_ad1848_playback_hw_free(struct snd_pcm_substream *substream)
{
return snd_pcm_lib_free_pages(substream);
}
-static int snd_ad1848_playback_prepare(snd_pcm_substream_t * substream)
+static int snd_ad1848_playback_prepare(struct snd_pcm_substream *substream)
{
- ad1848_t *chip = snd_pcm_substream_chip(substream);
- snd_pcm_runtime_t *runtime = substream->runtime;
+ struct snd_ad1848 *chip = snd_pcm_substream_chip(substream);
+ struct snd_pcm_runtime *runtime = substream->runtime;
unsigned long flags;
unsigned int size = snd_pcm_lib_buffer_bytes(substream);
unsigned int count = snd_pcm_lib_period_bytes(substream);
@@ -537,10 +537,10 @@ static int snd_ad1848_playback_prepare(snd_pcm_substream_t * substream)
return 0;
}
-static int snd_ad1848_capture_hw_params(snd_pcm_substream_t * substream,
- snd_pcm_hw_params_t * hw_params)
+static int snd_ad1848_capture_hw_params(struct snd_pcm_substream *substream,
+ struct snd_pcm_hw_params *hw_params)
{
- ad1848_t *chip = snd_pcm_substream_chip(substream);
+ struct snd_ad1848 *chip = snd_pcm_substream_chip(substream);
unsigned long flags;
int err;
@@ -557,15 +557,15 @@ static int snd_ad1848_capture_hw_params(snd_pcm_substream_t * substream,
return 0;
}
-static int snd_ad1848_capture_hw_free(snd_pcm_substream_t * substream)
+static int snd_ad1848_capture_hw_free(struct snd_pcm_substream *substream)
{
return snd_pcm_lib_free_pages(substream);
}
-static int snd_ad1848_capture_prepare(snd_pcm_substream_t * substream)
+static int snd_ad1848_capture_prepare(struct snd_pcm_substream *substream)
{
- ad1848_t *chip = snd_pcm_substream_chip(substream);
- snd_pcm_runtime_t *runtime = substream->runtime;
+ struct snd_ad1848 *chip = snd_pcm_substream_chip(substream);
+ struct snd_pcm_runtime *runtime = substream->runtime;
unsigned long flags;
unsigned int size = snd_pcm_lib_buffer_bytes(substream);
unsigned int count = snd_pcm_lib_period_bytes(substream);
@@ -583,7 +583,7 @@ static int snd_ad1848_capture_prepare(snd_pcm_substream_t * substream)
static irqreturn_t snd_ad1848_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{
- ad1848_t *chip = dev_id;
+ struct snd_ad1848 *chip = dev_id;
if ((chip->mode & AD1848_MODE_PLAY) && chip->playback_substream &&
(chip->mode & AD1848_MODE_RUNNING))
@@ -595,9 +595,9 @@ static irqreturn_t snd_ad1848_interrupt(int irq, void *dev_id, struct pt_regs *r
return IRQ_HANDLED;
}
-static snd_pcm_uframes_t snd_ad1848_playback_pointer(snd_pcm_substream_t * substream)
+static snd_pcm_uframes_t snd_ad1848_playback_pointer(struct snd_pcm_substream *substream)
{
- ad1848_t *chip = snd_pcm_substream_chip(substream);
+ struct snd_ad1848 *chip = snd_pcm_substream_chip(substream);
size_t ptr;
if (!(chip->image[AD1848_IFACE_CTRL] & AD1848_PLAYBACK_ENABLE))
@@ -606,9 +606,9 @@ static snd_pcm_uframes_t snd_ad1848_playback_pointer(snd_pcm_substream_t * subst
return bytes_to_frames(substream->runtime, ptr);
}
-static snd_pcm_uframes_t snd_ad1848_capture_pointer(snd_pcm_substream_t * substream)
+static snd_pcm_uframes_t snd_ad1848_capture_pointer(struct snd_pcm_substream *substream)
{
- ad1848_t *chip = snd_pcm_substream_chip(substream);
+ struct snd_ad1848 *chip = snd_pcm_substream_chip(substream);
size_t ptr;
if (!(chip->image[AD1848_IFACE_CTRL] & AD1848_CAPTURE_ENABLE))
@@ -621,7 +621,7 @@ static snd_pcm_uframes_t snd_ad1848_capture_pointer(snd_pcm_substream_t * substr
*/
-static void snd_ad1848_thinkpad_twiddle(ad1848_t *chip, int on) {
+static void snd_ad1848_thinkpad_twiddle(struct snd_ad1848 *chip, int on) {
int tmp;
@@ -642,9 +642,9 @@ static void snd_ad1848_thinkpad_twiddle(ad1848_t *chip, int on) {
}
#ifdef CONFIG_PM
-static int snd_ad1848_suspend(snd_card_t *card, pm_message_t state)
+static int snd_ad1848_suspend(struct snd_card *card, pm_message_t state)
{
- ad1848_t *chip = card->pm_private_data;
+ struct snd_ad1848 *chip = card->pm_private_data;
snd_pcm_suspend_all(chip->pcm);
/* FIXME: save registers? */
@@ -655,9 +655,9 @@ static int snd_ad1848_suspend(snd_card_t *card, pm_message_t state)
return 0;
}
-static int snd_ad1848_resume(snd_card_t *card)
+static int snd_ad1848_resume(struct snd_card *card)
{
- ad1848_t *chip = card->pm_private_data;
+ struct snd_ad1848 *chip = card->pm_private_data;
if (chip->thinkpad_flag)
snd_ad1848_thinkpad_twiddle(chip, 1);
@@ -668,7 +668,7 @@ static int snd_ad1848_resume(snd_card_t *card)
}
#endif /* CONFIG_PM */
-static int snd_ad1848_probe(ad1848_t * chip)
+static int snd_ad1848_probe(struct snd_ad1848 * chip)
{
unsigned long flags;
int i, id, rev, ad1847;
@@ -748,7 +748,7 @@ static int snd_ad1848_probe(ad1848_t * chip)
*/
-static snd_pcm_hardware_t snd_ad1848_playback =
+static struct snd_pcm_hardware snd_ad1848_playback =
{
.info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
SNDRV_PCM_INFO_MMAP_VALID),
@@ -767,7 +767,7 @@ static snd_pcm_hardware_t snd_ad1848_playback =
.fifo_size = 0,
};
-static snd_pcm_hardware_t snd_ad1848_capture =
+static struct snd_pcm_hardware snd_ad1848_capture =
{
.info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
SNDRV_PCM_INFO_MMAP_VALID),
@@ -790,10 +790,10 @@ static snd_pcm_hardware_t snd_ad1848_capture =
*/
-static int snd_ad1848_playback_open(snd_pcm_substream_t * substream)
+static int snd_ad1848_playback_open(struct snd_pcm_substream *substream)
{
- ad1848_t *chip = snd_pcm_substream_chip(substream);
- snd_pcm_runtime_t *runtime = substream->runtime;
+ struct snd_ad1848 *chip = snd_pcm_substream_chip(substream);
+ struct snd_pcm_runtime *runtime = substream->runtime;
int err;
if ((err = snd_ad1848_open(chip, AD1848_MODE_PLAY)) < 0)
@@ -806,10 +806,10 @@ static int snd_ad1848_playback_open(snd_pcm_substream_t * substream)
return 0;
}
-static int snd_ad1848_capture_open(snd_pcm_substream_t * substream)
+static int snd_ad1848_capture_open(struct snd_pcm_substream *substream)
{
- ad1848_t *chip = snd_pcm_substream_chip(substream);
- snd_pcm_runtime_t *runtime = substream->runtime;
+ struct snd_ad1848 *chip = snd_pcm_substream_chip(substream);
+ struct snd_pcm_runtime *runtime = substream->runtime;
int err;
if ((err = snd_ad1848_open(chip, AD1848_MODE_CAPTURE)) < 0)
@@ -822,9 +822,9 @@ static int snd_ad1848_capture_open(snd_pcm_substream_t * substream)
return 0;
}
-static int snd_ad1848_playback_close(snd_pcm_substream_t * substream)
+static int snd_ad1848_playback_close(struct snd_pcm_substream *substream)
{
- ad1848_t *chip = snd_pcm_substream_chip(substream);
+ struct snd_ad1848 *chip = snd_pcm_substream_chip(substream);
chip->mode &= ~AD1848_MODE_PLAY;
chip->playback_substream = NULL;
@@ -832,9 +832,9 @@ static int snd_ad1848_playback_close(snd_pcm_substream_t * substream)
return 0;
}
-static int snd_ad1848_capture_close(snd_pcm_substream_t * substream)
+static int snd_ad1848_capture_close(struct snd_pcm_substream *substream)
{
- ad1848_t *chip = snd_pcm_substream_chip(substream);
+ struct snd_ad1848 *chip = snd_pcm_substream_chip(substream);
chip->mode &= ~AD1848_MODE_CAPTURE;
chip->capture_substream = NULL;
@@ -842,7 +842,7 @@ static int snd_ad1848_capture_close(snd_pcm_substream_t * substream)
return 0;
}
-static int snd_ad1848_free(ad1848_t *chip)
+static int snd_ad1848_free(struct snd_ad1848 *chip)
{
release_and_free_resource(chip->res_port);
if (chip->irq >= 0)
@@ -855,13 +855,13 @@ static int snd_ad1848_free(ad1848_t *chip)
return 0;
}
-static int snd_ad1848_dev_free(snd_device_t *device)
+static int snd_ad1848_dev_free(struct snd_device *device)
{
- ad1848_t *chip = device->device_data;
+ struct snd_ad1848 *chip = device->device_data;
return snd_ad1848_free(chip);
}
-static const char *snd_ad1848_chip_id(ad1848_t *chip)
+static const char *snd_ad1848_chip_id(struct snd_ad1848 *chip)
{
switch (chip->hardware) {
case AD1848_HW_AD1847: return "AD1847";
@@ -872,16 +872,16 @@ static const char *snd_ad1848_chip_id(ad1848_t *chip)
}
}
-int snd_ad1848_create(snd_card_t * card,
+int snd_ad1848_create(struct snd_card *card,
unsigned long port,
int irq, int dma,
unsigned short hardware,
- ad1848_t ** rchip)
+ struct snd_ad1848 ** rchip)
{
- static snd_device_ops_t ops = {
+ static struct snd_device_ops ops = {
.dev_free = snd_ad1848_dev_free,
};
- ad1848_t *chip;
+ struct snd_ad1848 *chip;
int err;
*rchip = NULL;
@@ -937,7 +937,7 @@ int snd_ad1848_create(snd_card_t * card,
return 0;
}
-static snd_pcm_ops_t snd_ad1848_playback_ops = {
+static struct snd_pcm_ops snd_ad1848_playback_ops = {
.open = snd_ad1848_playback_open,
.close = snd_ad1848_playback_close,
.ioctl = snd_ad1848_ioctl,
@@ -948,7 +948,7 @@ static snd_pcm_ops_t snd_ad1848_playback_ops = {
.pointer = snd_ad1848_playback_pointer,
};
-static snd_pcm_ops_t snd_ad1848_capture_ops = {
+static struct snd_pcm_ops snd_ad1848_capture_ops = {
.open = snd_ad1848_capture_open,
.close = snd_ad1848_capture_close,
.ioctl = snd_ad1848_ioctl,
@@ -959,9 +959,9 @@ static snd_pcm_ops_t snd_ad1848_capture_ops = {
.pointer = snd_ad1848_capture_pointer,
};
-int snd_ad1848_pcm(ad1848_t *chip, int device, snd_pcm_t **rpcm)
+int snd_ad1848_pcm(struct snd_ad1848 *chip, int device, struct snd_pcm **rpcm)
{
- snd_pcm_t *pcm;
+ struct snd_pcm *pcm;
int err;
if ((err = snd_pcm_new(chip->card, "AD1848", device, 1, 1, &pcm)) < 0)
@@ -984,7 +984,7 @@ int snd_ad1848_pcm(ad1848_t *chip, int device, snd_pcm_t **rpcm)
return 0;
}
-const snd_pcm_ops_t *snd_ad1848_get_pcm_ops(int direction)
+const struct snd_pcm_ops *snd_ad1848_get_pcm_ops(int direction)
{
return direction == SNDRV_PCM_STREAM_PLAYBACK ?
&snd_ad1848_playback_ops : &snd_ad1848_capture_ops;
@@ -994,7 +994,7 @@ const snd_pcm_ops_t *snd_ad1848_get_pcm_ops(int direction)
* MIXER part
*/
-static int snd_ad1848_info_mux(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_ad1848_info_mux(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
{
static char *texts[4] = {
"Line", "Aux", "Mic", "Mix"
@@ -1009,9 +1009,9 @@ static int snd_ad1848_info_mux(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * u
return 0;
}
-static int snd_ad1848_get_mux(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_ad1848_get_mux(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{
- ad1848_t *chip = snd_kcontrol_chip(kcontrol);
+ struct snd_ad1848 *chip = snd_kcontrol_chip(kcontrol);
unsigned long flags;
spin_lock_irqsave(&chip->reg_lock, flags);
@@ -1021,9 +1021,9 @@ static int snd_ad1848_get_mux(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t *
return 0;
}
-static int snd_ad1848_put_mux(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_ad1848_put_mux(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{
- ad1848_t *chip = snd_kcontrol_chip(kcontrol);
+ struct snd_ad1848 *chip = snd_kcontrol_chip(kcontrol);
unsigned long flags;
unsigned short left, right;
int change;
@@ -1044,7 +1044,7 @@ static int snd_ad1848_put_mux(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t *
return change;
}
-static int snd_ad1848_info_single(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_ad1848_info_single(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
{
int mask = (kcontrol->private_value >> 16) & 0xff;
@@ -1055,9 +1055,9 @@ static int snd_ad1848_info_single(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t
return 0;
}
-static int snd_ad1848_get_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_ad1848_get_single(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{
- ad1848_t *chip = snd_kcontrol_chip(kcontrol);
+ struct snd_ad1848 *chip = snd_kcontrol_chip(kcontrol);
unsigned long flags;
int reg = kcontrol->private_value & 0xff;
int shift = (kcontrol->private_value >> 8) & 0xff;
@@ -1072,9 +1072,9 @@ static int snd_ad1848_get_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t
return 0;
}
-static int snd_ad1848_put_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_ad1848_put_single(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{
- ad1848_t *chip = snd_kcontrol_chip(kcontrol);
+ struct snd_ad1848 *chip = snd_kcontrol_chip(kcontrol);
unsigned long flags;
int reg = kcontrol->private_value & 0xff;
int shift = (kcontrol->private_value >> 8) & 0xff;
@@ -1095,7 +1095,7 @@ static int snd_ad1848_put_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t
return change;
}
-static int snd_ad1848_info_double(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_ad1848_info_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
{
int mask = (kcontrol->private_value >> 24) & 0xff;
@@ -1106,9 +1106,9 @@ static int snd_ad1848_info_double(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t
return 0;
}
-static int snd_ad1848_get_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_ad1848_get_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{
- ad1848_t *chip = snd_kcontrol_chip(kcontrol);
+ struct snd_ad1848 *chip = snd_kcontrol_chip(kcontrol);
unsigned long flags;
int left_reg = kcontrol->private_value & 0xff;
int right_reg = (kcontrol->private_value >> 8) & 0xff;
@@ -1128,9 +1128,9 @@ static int snd_ad1848_get_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t
return 0;
}
-static int snd_ad1848_put_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_ad1848_put_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{
- ad1848_t *chip = snd_kcontrol_chip(kcontrol);
+ struct snd_ad1848 *chip = snd_kcontrol_chip(kcontrol);
unsigned long flags;
int left_reg = kcontrol->private_value & 0xff;
int right_reg = (kcontrol->private_value >> 8) & 0xff;
@@ -1167,9 +1167,9 @@ static int snd_ad1848_put_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t
/*
*/
-int snd_ad1848_add_ctl(ad1848_t *chip, const char *name, int index, int type, unsigned long value)
+int snd_ad1848_add_ctl(struct snd_ad1848 *chip, const char *name, int index, int type, unsigned long value)
{
- static snd_kcontrol_new_t newctls[] = {
+ static struct snd_kcontrol_new newctls[] = {
[AD1848_MIX_SINGLE] = {
.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
.info = snd_ad1848_info_single,
@@ -1189,7 +1189,7 @@ int snd_ad1848_add_ctl(ad1848_t *chip, const char *name, int index, int type, un
.put = snd_ad1848_put_mux,
},
};
- snd_kcontrol_t *ctl;
+ struct snd_kcontrol *ctl;
int err;
ctl = snd_ctl_new1(&newctls[type], chip);
@@ -1222,10 +1222,10 @@ AD1848_SINGLE("Loopback Capture Switch", 0, AD1848_LOOPBACK, 0, 1, 0),
AD1848_SINGLE("Loopback Capture Volume", 0, AD1848_LOOPBACK, 1, 63, 0)
};
-int snd_ad1848_mixer(ad1848_t *chip)
+int snd_ad1848_mixer(struct snd_ad1848 *chip)
{
- snd_card_t *card;
- snd_pcm_t *pcm;
+ struct snd_card *card;
+ struct snd_pcm *pcm;
unsigned int idx;
int err;