mirror of
https://github.com/joel16/android_kernel_sony_msm8994.git
synced 2024-11-24 12:40:24 +00:00
[ALSA] Remove xxx_t typedefs: ISA AD1816A
Modules: AD1816A driver Remove xxx_t typedefs from the ISA AD1816A driver. Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
4a4d2cfd8c
commit
cbdd0dd15f
@ -123,9 +123,7 @@
|
||||
#define AD1816A_CAPTURE_NOT_EQUAL 0x1000
|
||||
#define AD1816A_WSS_ENABLE 0x8000
|
||||
|
||||
typedef struct _snd_ad1816a ad1816a_t;
|
||||
|
||||
struct _snd_ad1816a {
|
||||
struct snd_ad1816a {
|
||||
unsigned long port;
|
||||
struct resource *res_port;
|
||||
int irq;
|
||||
@ -140,15 +138,15 @@ struct _snd_ad1816a {
|
||||
unsigned short mode;
|
||||
unsigned int clock_freq;
|
||||
|
||||
snd_card_t *card;
|
||||
snd_pcm_t *pcm;
|
||||
struct snd_card *card;
|
||||
struct snd_pcm *pcm;
|
||||
|
||||
snd_pcm_substream_t *playback_substream;
|
||||
snd_pcm_substream_t *capture_substream;
|
||||
struct snd_pcm_substream *playback_substream;
|
||||
struct snd_pcm_substream *capture_substream;
|
||||
unsigned int p_dma_size;
|
||||
unsigned int c_dma_size;
|
||||
|
||||
snd_timer_t *timer;
|
||||
struct snd_timer *timer;
|
||||
};
|
||||
|
||||
|
||||
@ -165,11 +163,11 @@ struct _snd_ad1816a {
|
||||
AD1816A_MODE_TIMER)
|
||||
|
||||
|
||||
extern int snd_ad1816a_create(snd_card_t *card, unsigned long port,
|
||||
extern int snd_ad1816a_create(struct snd_card *card, unsigned long port,
|
||||
int irq, int dma1, int dma2,
|
||||
ad1816a_t **chip);
|
||||
struct snd_ad1816a **chip);
|
||||
|
||||
extern int snd_ad1816a_pcm(ad1816a_t *chip, int device, snd_pcm_t **rpcm);
|
||||
extern int snd_ad1816a_mixer(ad1816a_t *chip);
|
||||
extern int snd_ad1816a_pcm(struct snd_ad1816a *chip, int device, struct snd_pcm **rpcm);
|
||||
extern int snd_ad1816a_mixer(struct snd_ad1816a *chip);
|
||||
|
||||
#endif /* __SOUND_AD1816A_H */
|
||||
|
@ -188,10 +188,10 @@ static int __devinit snd_card_ad1816a_probe(int dev, struct pnp_card_link *pcard
|
||||
const struct pnp_card_device_id *pid)
|
||||
{
|
||||
int error;
|
||||
snd_card_t *card;
|
||||
struct snd_card *card;
|
||||
struct snd_card_ad1816a *acard;
|
||||
ad1816a_t *chip;
|
||||
opl3_t *opl3;
|
||||
struct snd_ad1816a *chip;
|
||||
struct snd_opl3 *opl3;
|
||||
|
||||
if ((card = snd_card_new(index[dev], id[dev], THIS_MODULE,
|
||||
sizeof(struct snd_card_ad1816a))) == NULL)
|
||||
@ -282,7 +282,7 @@ static int __devinit snd_ad1816a_pnp_detect(struct pnp_card_link *card,
|
||||
|
||||
static void __devexit snd_ad1816a_pnp_remove(struct pnp_card_link * pcard)
|
||||
{
|
||||
snd_card_t *card = (snd_card_t *) pnp_get_card_drvdata(pcard);
|
||||
struct snd_card *card = (struct snd_card *) pnp_get_card_drvdata(pcard);
|
||||
|
||||
snd_card_disconnect(card);
|
||||
snd_card_free_in_thread(card);
|
||||
|
@ -34,7 +34,7 @@ MODULE_AUTHOR("Massimo Piccioni <dafastidio@libero.it>");
|
||||
MODULE_DESCRIPTION("lowlevel code for Analog Devices AD1816A chip");
|
||||
MODULE_LICENSE("GPL");
|
||||
|
||||
static inline int snd_ad1816a_busy_wait(ad1816a_t *chip)
|
||||
static inline int snd_ad1816a_busy_wait(struct snd_ad1816a *chip)
|
||||
{
|
||||
int timeout;
|
||||
|
||||
@ -46,34 +46,34 @@ static inline int snd_ad1816a_busy_wait(ad1816a_t *chip)
|
||||
return -EBUSY;
|
||||
}
|
||||
|
||||
static inline unsigned char snd_ad1816a_in(ad1816a_t *chip, unsigned char reg)
|
||||
static inline unsigned char snd_ad1816a_in(struct snd_ad1816a *chip, unsigned char reg)
|
||||
{
|
||||
snd_ad1816a_busy_wait(chip);
|
||||
return inb(AD1816A_REG(reg));
|
||||
}
|
||||
|
||||
static inline void snd_ad1816a_out(ad1816a_t *chip, unsigned char reg,
|
||||
static inline void snd_ad1816a_out(struct snd_ad1816a *chip, unsigned char reg,
|
||||
unsigned char value)
|
||||
{
|
||||
snd_ad1816a_busy_wait(chip);
|
||||
outb(value, AD1816A_REG(reg));
|
||||
}
|
||||
|
||||
static inline void snd_ad1816a_out_mask(ad1816a_t *chip, unsigned char reg,
|
||||
static inline void snd_ad1816a_out_mask(struct snd_ad1816a *chip, unsigned char reg,
|
||||
unsigned char mask, unsigned char value)
|
||||
{
|
||||
snd_ad1816a_out(chip, reg,
|
||||
(value & mask) | (snd_ad1816a_in(chip, reg) & ~mask));
|
||||
}
|
||||
|
||||
static unsigned short snd_ad1816a_read(ad1816a_t *chip, unsigned char reg)
|
||||
static unsigned short snd_ad1816a_read(struct snd_ad1816a *chip, unsigned char reg)
|
||||
{
|
||||
snd_ad1816a_out(chip, AD1816A_INDIR_ADDR, reg & 0x3f);
|
||||
return snd_ad1816a_in(chip, AD1816A_INDIR_DATA_LOW) |
|
||||
(snd_ad1816a_in(chip, AD1816A_INDIR_DATA_HIGH) << 8);
|
||||
}
|
||||
|
||||
static void snd_ad1816a_write(ad1816a_t *chip, unsigned char reg,
|
||||
static void snd_ad1816a_write(struct snd_ad1816a *chip, unsigned char reg,
|
||||
unsigned short value)
|
||||
{
|
||||
snd_ad1816a_out(chip, AD1816A_INDIR_ADDR, reg & 0x3f);
|
||||
@ -81,7 +81,7 @@ static void snd_ad1816a_write(ad1816a_t *chip, unsigned char reg,
|
||||
snd_ad1816a_out(chip, AD1816A_INDIR_DATA_HIGH, (value >> 8) & 0xff);
|
||||
}
|
||||
|
||||
static void snd_ad1816a_write_mask(ad1816a_t *chip, unsigned char reg,
|
||||
static void snd_ad1816a_write_mask(struct snd_ad1816a *chip, unsigned char reg,
|
||||
unsigned short mask, unsigned short value)
|
||||
{
|
||||
snd_ad1816a_write(chip, reg,
|
||||
@ -89,7 +89,7 @@ static void snd_ad1816a_write_mask(ad1816a_t *chip, unsigned char reg,
|
||||
}
|
||||
|
||||
|
||||
static unsigned char snd_ad1816a_get_format(ad1816a_t *chip,
|
||||
static unsigned char snd_ad1816a_get_format(struct snd_ad1816a *chip,
|
||||
unsigned int format, int channels)
|
||||
{
|
||||
unsigned char retval = AD1816A_FMT_LINEAR_8;
|
||||
@ -110,7 +110,7 @@ static unsigned char snd_ad1816a_get_format(ad1816a_t *chip,
|
||||
return (channels > 1) ? (retval | AD1816A_FMT_STEREO) : retval;
|
||||
}
|
||||
|
||||
static int snd_ad1816a_open(ad1816a_t *chip, unsigned int mode)
|
||||
static int snd_ad1816a_open(struct snd_ad1816a *chip, unsigned int mode)
|
||||
{
|
||||
unsigned long flags;
|
||||
|
||||
@ -146,7 +146,7 @@ static int snd_ad1816a_open(ad1816a_t *chip, unsigned int mode)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void snd_ad1816a_close(ad1816a_t *chip, unsigned int mode)
|
||||
static void snd_ad1816a_close(struct snd_ad1816a *chip, unsigned int mode)
|
||||
{
|
||||
unsigned long flags;
|
||||
|
||||
@ -178,7 +178,7 @@ static void snd_ad1816a_close(ad1816a_t *chip, unsigned int mode)
|
||||
}
|
||||
|
||||
|
||||
static int snd_ad1816a_trigger(ad1816a_t *chip, unsigned char what,
|
||||
static int snd_ad1816a_trigger(struct snd_ad1816a *chip, unsigned char what,
|
||||
int channel, int cmd)
|
||||
{
|
||||
int error = 0;
|
||||
@ -204,36 +204,36 @@ static int snd_ad1816a_trigger(ad1816a_t *chip, unsigned char what,
|
||||
return error;
|
||||
}
|
||||
|
||||
static int snd_ad1816a_playback_trigger(snd_pcm_substream_t *substream, int cmd)
|
||||
static int snd_ad1816a_playback_trigger(struct snd_pcm_substream *substream, int cmd)
|
||||
{
|
||||
ad1816a_t *chip = snd_pcm_substream_chip(substream);
|
||||
struct snd_ad1816a *chip = snd_pcm_substream_chip(substream);
|
||||
return snd_ad1816a_trigger(chip, AD1816A_PLAYBACK_ENABLE,
|
||||
SNDRV_PCM_STREAM_PLAYBACK, cmd);
|
||||
}
|
||||
|
||||
static int snd_ad1816a_capture_trigger(snd_pcm_substream_t *substream, int cmd)
|
||||
static int snd_ad1816a_capture_trigger(struct snd_pcm_substream *substream, int cmd)
|
||||
{
|
||||
ad1816a_t *chip = snd_pcm_substream_chip(substream);
|
||||
struct snd_ad1816a *chip = snd_pcm_substream_chip(substream);
|
||||
return snd_ad1816a_trigger(chip, AD1816A_CAPTURE_ENABLE,
|
||||
SNDRV_PCM_STREAM_CAPTURE, cmd);
|
||||
}
|
||||
|
||||
static int snd_ad1816a_hw_params(snd_pcm_substream_t * substream,
|
||||
snd_pcm_hw_params_t * hw_params)
|
||||
static int snd_ad1816a_hw_params(struct snd_pcm_substream *substream,
|
||||
struct snd_pcm_hw_params *hw_params)
|
||||
{
|
||||
return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params));
|
||||
}
|
||||
|
||||
static int snd_ad1816a_hw_free(snd_pcm_substream_t * substream)
|
||||
static int snd_ad1816a_hw_free(struct snd_pcm_substream *substream)
|
||||
{
|
||||
return snd_pcm_lib_free_pages(substream);
|
||||
}
|
||||
|
||||
static int snd_ad1816a_playback_prepare(snd_pcm_substream_t *substream)
|
||||
static int snd_ad1816a_playback_prepare(struct snd_pcm_substream *substream)
|
||||
{
|
||||
ad1816a_t *chip = snd_pcm_substream_chip(substream);
|
||||
struct snd_ad1816a *chip = snd_pcm_substream_chip(substream);
|
||||
unsigned long flags;
|
||||
snd_pcm_runtime_t *runtime = substream->runtime;
|
||||
struct snd_pcm_runtime *runtime = substream->runtime;
|
||||
unsigned int size, rate;
|
||||
|
||||
spin_lock_irqsave(&chip->lock, flags);
|
||||
@ -261,11 +261,11 @@ static int snd_ad1816a_playback_prepare(snd_pcm_substream_t *substream)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int snd_ad1816a_capture_prepare(snd_pcm_substream_t *substream)
|
||||
static int snd_ad1816a_capture_prepare(struct snd_pcm_substream *substream)
|
||||
{
|
||||
ad1816a_t *chip = snd_pcm_substream_chip(substream);
|
||||
struct snd_ad1816a *chip = snd_pcm_substream_chip(substream);
|
||||
unsigned long flags;
|
||||
snd_pcm_runtime_t *runtime = substream->runtime;
|
||||
struct snd_pcm_runtime *runtime = substream->runtime;
|
||||
unsigned int size, rate;
|
||||
|
||||
spin_lock_irqsave(&chip->lock, flags);
|
||||
@ -294,9 +294,9 @@ static int snd_ad1816a_capture_prepare(snd_pcm_substream_t *substream)
|
||||
}
|
||||
|
||||
|
||||
static snd_pcm_uframes_t snd_ad1816a_playback_pointer(snd_pcm_substream_t *substream)
|
||||
static snd_pcm_uframes_t snd_ad1816a_playback_pointer(struct snd_pcm_substream *substream)
|
||||
{
|
||||
ad1816a_t *chip = snd_pcm_substream_chip(substream);
|
||||
struct snd_ad1816a *chip = snd_pcm_substream_chip(substream);
|
||||
size_t ptr;
|
||||
if (!(chip->mode & AD1816A_MODE_PLAYBACK))
|
||||
return 0;
|
||||
@ -304,9 +304,9 @@ static snd_pcm_uframes_t snd_ad1816a_playback_pointer(snd_pcm_substream_t *subst
|
||||
return bytes_to_frames(substream->runtime, ptr);
|
||||
}
|
||||
|
||||
static snd_pcm_uframes_t snd_ad1816a_capture_pointer(snd_pcm_substream_t *substream)
|
||||
static snd_pcm_uframes_t snd_ad1816a_capture_pointer(struct snd_pcm_substream *substream)
|
||||
{
|
||||
ad1816a_t *chip = snd_pcm_substream_chip(substream);
|
||||
struct snd_ad1816a *chip = snd_pcm_substream_chip(substream);
|
||||
size_t ptr;
|
||||
if (!(chip->mode & AD1816A_MODE_CAPTURE))
|
||||
return 0;
|
||||
@ -317,7 +317,7 @@ static snd_pcm_uframes_t snd_ad1816a_capture_pointer(snd_pcm_substream_t *substr
|
||||
|
||||
static irqreturn_t snd_ad1816a_interrupt(int irq, void *dev_id, struct pt_regs *regs)
|
||||
{
|
||||
ad1816a_t *chip = dev_id;
|
||||
struct snd_ad1816a *chip = dev_id;
|
||||
unsigned char status;
|
||||
|
||||
spin_lock(&chip->lock);
|
||||
@ -340,7 +340,7 @@ static irqreturn_t snd_ad1816a_interrupt(int irq, void *dev_id, struct pt_regs *
|
||||
}
|
||||
|
||||
|
||||
static snd_pcm_hardware_t snd_ad1816a_playback = {
|
||||
static struct snd_pcm_hardware snd_ad1816a_playback = {
|
||||
.info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
|
||||
SNDRV_PCM_INFO_MMAP_VALID),
|
||||
.formats = (SNDRV_PCM_FMTBIT_MU_LAW | SNDRV_PCM_FMTBIT_A_LAW |
|
||||
@ -359,7 +359,7 @@ static snd_pcm_hardware_t snd_ad1816a_playback = {
|
||||
.fifo_size = 0,
|
||||
};
|
||||
|
||||
static snd_pcm_hardware_t snd_ad1816a_capture = {
|
||||
static struct snd_pcm_hardware snd_ad1816a_capture = {
|
||||
.info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
|
||||
SNDRV_PCM_INFO_MMAP_VALID),
|
||||
.formats = (SNDRV_PCM_FMTBIT_MU_LAW | SNDRV_PCM_FMTBIT_A_LAW |
|
||||
@ -379,32 +379,32 @@ static snd_pcm_hardware_t snd_ad1816a_capture = {
|
||||
};
|
||||
|
||||
#if 0 /* not used now */
|
||||
static int snd_ad1816a_timer_close(snd_timer_t *timer)
|
||||
static int snd_ad1816a_timer_close(struct snd_timer *timer)
|
||||
{
|
||||
ad1816a_t *chip = snd_timer_chip(timer);
|
||||
struct snd_ad1816a *chip = snd_timer_chip(timer);
|
||||
snd_ad1816a_close(chip, AD1816A_MODE_TIMER);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int snd_ad1816a_timer_open(snd_timer_t *timer)
|
||||
static int snd_ad1816a_timer_open(struct snd_timer *timer)
|
||||
{
|
||||
ad1816a_t *chip = snd_timer_chip(timer);
|
||||
struct snd_ad1816a *chip = snd_timer_chip(timer);
|
||||
snd_ad1816a_open(chip, AD1816A_MODE_TIMER);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static unsigned long snd_ad1816a_timer_resolution(snd_timer_t *timer)
|
||||
static unsigned long snd_ad1816a_timer_resolution(struct snd_timer *timer)
|
||||
{
|
||||
snd_assert(timer != NULL, return 0);
|
||||
|
||||
return 10000;
|
||||
}
|
||||
|
||||
static int snd_ad1816a_timer_start(snd_timer_t *timer)
|
||||
static int snd_ad1816a_timer_start(struct snd_timer *timer)
|
||||
{
|
||||
unsigned short bits;
|
||||
unsigned long flags;
|
||||
ad1816a_t *chip = snd_timer_chip(timer);
|
||||
struct snd_ad1816a *chip = snd_timer_chip(timer);
|
||||
spin_lock_irqsave(&chip->lock, flags);
|
||||
bits = snd_ad1816a_read(chip, AD1816A_INTERRUPT_ENABLE);
|
||||
|
||||
@ -419,10 +419,10 @@ static int snd_ad1816a_timer_start(snd_timer_t *timer)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int snd_ad1816a_timer_stop(snd_timer_t *timer)
|
||||
static int snd_ad1816a_timer_stop(struct snd_timer *timer)
|
||||
{
|
||||
unsigned long flags;
|
||||
ad1816a_t *chip = snd_timer_chip(timer);
|
||||
struct snd_ad1816a *chip = snd_timer_chip(timer);
|
||||
spin_lock_irqsave(&chip->lock, flags);
|
||||
|
||||
snd_ad1816a_write_mask(chip, AD1816A_INTERRUPT_ENABLE,
|
||||
@ -432,7 +432,7 @@ static int snd_ad1816a_timer_stop(snd_timer_t *timer)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct _snd_timer_hardware snd_ad1816a_timer_table = {
|
||||
static struct snd_timer_hardware snd_ad1816a_timer_table = {
|
||||
.flags = SNDRV_TIMER_HW_AUTO,
|
||||
.resolution = 10000,
|
||||
.ticks = 65535,
|
||||
@ -445,10 +445,10 @@ static struct _snd_timer_hardware snd_ad1816a_timer_table = {
|
||||
#endif /* not used now */
|
||||
|
||||
|
||||
static int snd_ad1816a_playback_open(snd_pcm_substream_t *substream)
|
||||
static int snd_ad1816a_playback_open(struct snd_pcm_substream *substream)
|
||||
{
|
||||
ad1816a_t *chip = snd_pcm_substream_chip(substream);
|
||||
snd_pcm_runtime_t *runtime = substream->runtime;
|
||||
struct snd_ad1816a *chip = snd_pcm_substream_chip(substream);
|
||||
struct snd_pcm_runtime *runtime = substream->runtime;
|
||||
int error;
|
||||
|
||||
if ((error = snd_ad1816a_open(chip, AD1816A_MODE_PLAYBACK)) < 0)
|
||||
@ -461,10 +461,10 @@ static int snd_ad1816a_playback_open(snd_pcm_substream_t *substream)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int snd_ad1816a_capture_open(snd_pcm_substream_t *substream)
|
||||
static int snd_ad1816a_capture_open(struct snd_pcm_substream *substream)
|
||||
{
|
||||
ad1816a_t *chip = snd_pcm_substream_chip(substream);
|
||||
snd_pcm_runtime_t *runtime = substream->runtime;
|
||||
struct snd_ad1816a *chip = snd_pcm_substream_chip(substream);
|
||||
struct snd_pcm_runtime *runtime = substream->runtime;
|
||||
int error;
|
||||
|
||||
if ((error = snd_ad1816a_open(chip, AD1816A_MODE_CAPTURE)) < 0)
|
||||
@ -477,18 +477,18 @@ static int snd_ad1816a_capture_open(snd_pcm_substream_t *substream)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int snd_ad1816a_playback_close(snd_pcm_substream_t *substream)
|
||||
static int snd_ad1816a_playback_close(struct snd_pcm_substream *substream)
|
||||
{
|
||||
ad1816a_t *chip = snd_pcm_substream_chip(substream);
|
||||
struct snd_ad1816a *chip = snd_pcm_substream_chip(substream);
|
||||
|
||||
chip->playback_substream = NULL;
|
||||
snd_ad1816a_close(chip, AD1816A_MODE_PLAYBACK);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int snd_ad1816a_capture_close(snd_pcm_substream_t *substream)
|
||||
static int snd_ad1816a_capture_close(struct snd_pcm_substream *substream)
|
||||
{
|
||||
ad1816a_t *chip = snd_pcm_substream_chip(substream);
|
||||
struct snd_ad1816a *chip = snd_pcm_substream_chip(substream);
|
||||
|
||||
chip->capture_substream = NULL;
|
||||
snd_ad1816a_close(chip, AD1816A_MODE_CAPTURE);
|
||||
@ -496,7 +496,7 @@ static int snd_ad1816a_capture_close(snd_pcm_substream_t *substream)
|
||||
}
|
||||
|
||||
|
||||
static void snd_ad1816a_init(ad1816a_t *chip)
|
||||
static void snd_ad1816a_init(struct snd_ad1816a *chip)
|
||||
{
|
||||
unsigned long flags;
|
||||
|
||||
@ -516,7 +516,7 @@ static void snd_ad1816a_init(ad1816a_t *chip)
|
||||
spin_unlock_irqrestore(&chip->lock, flags);
|
||||
}
|
||||
|
||||
static int snd_ad1816a_probe(ad1816a_t *chip)
|
||||
static int snd_ad1816a_probe(struct snd_ad1816a *chip)
|
||||
{
|
||||
unsigned long flags;
|
||||
|
||||
@ -540,7 +540,7 @@ static int snd_ad1816a_probe(ad1816a_t *chip)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int snd_ad1816a_free(ad1816a_t *chip)
|
||||
static int snd_ad1816a_free(struct snd_ad1816a *chip)
|
||||
{
|
||||
release_and_free_resource(chip->res_port);
|
||||
if (chip->irq >= 0)
|
||||
@ -557,13 +557,13 @@ static int snd_ad1816a_free(ad1816a_t *chip)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int snd_ad1816a_dev_free(snd_device_t *device)
|
||||
static int snd_ad1816a_dev_free(struct snd_device *device)
|
||||
{
|
||||
ad1816a_t *chip = device->device_data;
|
||||
struct snd_ad1816a *chip = device->device_data;
|
||||
return snd_ad1816a_free(chip);
|
||||
}
|
||||
|
||||
static const char *snd_ad1816a_chip_id(ad1816a_t *chip)
|
||||
static const char *snd_ad1816a_chip_id(struct snd_ad1816a *chip)
|
||||
{
|
||||
switch (chip->hardware) {
|
||||
case AD1816A_HW_AD1816A: return "AD1816A";
|
||||
@ -576,15 +576,15 @@ static const char *snd_ad1816a_chip_id(ad1816a_t *chip)
|
||||
}
|
||||
}
|
||||
|
||||
int snd_ad1816a_create(snd_card_t *card,
|
||||
int snd_ad1816a_create(struct snd_card *card,
|
||||
unsigned long port, int irq, int dma1, int dma2,
|
||||
ad1816a_t **rchip)
|
||||
struct snd_ad1816a **rchip)
|
||||
{
|
||||
static snd_device_ops_t ops = {
|
||||
static struct snd_device_ops ops = {
|
||||
.dev_free = snd_ad1816a_dev_free,
|
||||
};
|
||||
int error;
|
||||
ad1816a_t *chip;
|
||||
struct snd_ad1816a *chip;
|
||||
|
||||
*rchip = NULL;
|
||||
|
||||
@ -640,7 +640,7 @@ int snd_ad1816a_create(snd_card_t *card,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static snd_pcm_ops_t snd_ad1816a_playback_ops = {
|
||||
static struct snd_pcm_ops snd_ad1816a_playback_ops = {
|
||||
.open = snd_ad1816a_playback_open,
|
||||
.close = snd_ad1816a_playback_close,
|
||||
.ioctl = snd_pcm_lib_ioctl,
|
||||
@ -651,7 +651,7 @@ static snd_pcm_ops_t snd_ad1816a_playback_ops = {
|
||||
.pointer = snd_ad1816a_playback_pointer,
|
||||
};
|
||||
|
||||
static snd_pcm_ops_t snd_ad1816a_capture_ops = {
|
||||
static struct snd_pcm_ops snd_ad1816a_capture_ops = {
|
||||
.open = snd_ad1816a_capture_open,
|
||||
.close = snd_ad1816a_capture_close,
|
||||
.ioctl = snd_pcm_lib_ioctl,
|
||||
@ -662,10 +662,10 @@ static snd_pcm_ops_t snd_ad1816a_capture_ops = {
|
||||
.pointer = snd_ad1816a_capture_pointer,
|
||||
};
|
||||
|
||||
int snd_ad1816a_pcm(ad1816a_t *chip, int device, snd_pcm_t **rpcm)
|
||||
int snd_ad1816a_pcm(struct snd_ad1816a *chip, int device, struct snd_pcm **rpcm)
|
||||
{
|
||||
int error;
|
||||
snd_pcm_t *pcm;
|
||||
struct snd_pcm *pcm;
|
||||
|
||||
if ((error = snd_pcm_new(chip->card, "AD1816A", device, 1, 1, &pcm)))
|
||||
return error;
|
||||
@ -690,16 +690,16 @@ int snd_ad1816a_pcm(ad1816a_t *chip, int device, snd_pcm_t **rpcm)
|
||||
}
|
||||
|
||||
#if 0 /* not used now */
|
||||
static void snd_ad1816a_timer_free(snd_timer_t *timer)
|
||||
static void snd_ad1816a_timer_free(struct snd_timer *timer)
|
||||
{
|
||||
ad1816a_t *chip = timer->private_data;
|
||||
struct snd_ad1816a *chip = timer->private_data;
|
||||
chip->timer = NULL;
|
||||
}
|
||||
|
||||
int snd_ad1816a_timer(ad1816a_t *chip, int device, snd_timer_t **rtimer)
|
||||
int snd_ad1816a_timer(struct snd_ad1816a *chip, int device, struct snd_timer **rtimer)
|
||||
{
|
||||
snd_timer_t *timer;
|
||||
snd_timer_id_t tid;
|
||||
struct snd_timer *timer;
|
||||
struct snd_timer_id tid;
|
||||
int error;
|
||||
|
||||
tid.dev_class = SNDRV_TIMER_CLASS_CARD;
|
||||
@ -724,7 +724,7 @@ int snd_ad1816a_timer(ad1816a_t *chip, int device, snd_timer_t **rtimer)
|
||||
*
|
||||
*/
|
||||
|
||||
static int snd_ad1816a_info_mux(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
|
||||
static int snd_ad1816a_info_mux(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
|
||||
{
|
||||
static char *texts[8] = {
|
||||
"Line", "Mix", "CD", "Synth", "Video",
|
||||
@ -740,9 +740,9 @@ static int snd_ad1816a_info_mux(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int snd_ad1816a_get_mux(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
|
||||
static int snd_ad1816a_get_mux(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
|
||||
{
|
||||
ad1816a_t *chip = snd_kcontrol_chip(kcontrol);
|
||||
struct snd_ad1816a *chip = snd_kcontrol_chip(kcontrol);
|
||||
unsigned long flags;
|
||||
unsigned short val;
|
||||
|
||||
@ -754,9 +754,9 @@ static int snd_ad1816a_get_mux(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t *
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int snd_ad1816a_put_mux(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
|
||||
static int snd_ad1816a_put_mux(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
|
||||
{
|
||||
ad1816a_t *chip = snd_kcontrol_chip(kcontrol);
|
||||
struct snd_ad1816a *chip = snd_kcontrol_chip(kcontrol);
|
||||
unsigned long flags;
|
||||
unsigned short val;
|
||||
int change;
|
||||
@ -778,7 +778,7 @@ static int snd_ad1816a_put_mux(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t *
|
||||
.get = snd_ad1816a_get_single, .put = snd_ad1816a_put_single, \
|
||||
.private_value = reg | (shift << 8) | (mask << 16) | (invert << 24) }
|
||||
|
||||
static int snd_ad1816a_info_single(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
|
||||
static int snd_ad1816a_info_single(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
|
||||
{
|
||||
int mask = (kcontrol->private_value >> 16) & 0xff;
|
||||
|
||||
@ -789,9 +789,9 @@ static int snd_ad1816a_info_single(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int snd_ad1816a_get_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
|
||||
static int snd_ad1816a_get_single(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
|
||||
{
|
||||
ad1816a_t *chip = snd_kcontrol_chip(kcontrol);
|
||||
struct snd_ad1816a *chip = snd_kcontrol_chip(kcontrol);
|
||||
unsigned long flags;
|
||||
int reg = kcontrol->private_value & 0xff;
|
||||
int shift = (kcontrol->private_value >> 8) & 0xff;
|
||||
@ -806,9 +806,9 @@ static int snd_ad1816a_get_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int snd_ad1816a_put_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
|
||||
static int snd_ad1816a_put_single(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
|
||||
{
|
||||
ad1816a_t *chip = snd_kcontrol_chip(kcontrol);
|
||||
struct snd_ad1816a *chip = snd_kcontrol_chip(kcontrol);
|
||||
unsigned long flags;
|
||||
int reg = kcontrol->private_value & 0xff;
|
||||
int shift = (kcontrol->private_value >> 8) & 0xff;
|
||||
@ -835,7 +835,7 @@ static int snd_ad1816a_put_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_
|
||||
.get = snd_ad1816a_get_double, .put = snd_ad1816a_put_double, \
|
||||
.private_value = reg | (shift_left << 8) | (shift_right << 12) | (mask << 16) | (invert << 24) }
|
||||
|
||||
static int snd_ad1816a_info_double(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
|
||||
static int snd_ad1816a_info_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
|
||||
{
|
||||
int mask = (kcontrol->private_value >> 16) & 0xff;
|
||||
|
||||
@ -846,9 +846,9 @@ static int snd_ad1816a_info_double(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int snd_ad1816a_get_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
|
||||
static int snd_ad1816a_get_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
|
||||
{
|
||||
ad1816a_t *chip = snd_kcontrol_chip(kcontrol);
|
||||
struct snd_ad1816a *chip = snd_kcontrol_chip(kcontrol);
|
||||
unsigned long flags;
|
||||
int reg = kcontrol->private_value & 0xff;
|
||||
int shift_left = (kcontrol->private_value >> 8) & 0x0f;
|
||||
@ -869,9 +869,9 @@ static int snd_ad1816a_get_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int snd_ad1816a_put_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
|
||||
static int snd_ad1816a_put_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
|
||||
{
|
||||
ad1816a_t *chip = snd_kcontrol_chip(kcontrol);
|
||||
struct snd_ad1816a *chip = snd_kcontrol_chip(kcontrol);
|
||||
unsigned long flags;
|
||||
int reg = kcontrol->private_value & 0xff;
|
||||
int shift_left = (kcontrol->private_value >> 8) & 0x0f;
|
||||
@ -898,7 +898,7 @@ static int snd_ad1816a_put_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_
|
||||
return change;
|
||||
}
|
||||
|
||||
static snd_kcontrol_new_t snd_ad1816a_controls[] = {
|
||||
static struct snd_kcontrol_new snd_ad1816a_controls[] = {
|
||||
AD1816A_DOUBLE("Master Playback Switch", AD1816A_MASTER_ATT, 15, 7, 1, 1),
|
||||
AD1816A_DOUBLE("Master Playback Volume", AD1816A_MASTER_ATT, 8, 0, 31, 1),
|
||||
AD1816A_DOUBLE("PCM Playback Switch", AD1816A_VOICE_ATT, 15, 7, 1, 1),
|
||||
@ -933,9 +933,9 @@ AD1816A_SINGLE("3D Control - Switch", AD1816A_3D_PHAT_CTRL, 15, 1, 1),
|
||||
AD1816A_SINGLE("3D Control - Level", AD1816A_3D_PHAT_CTRL, 0, 15, 0),
|
||||
};
|
||||
|
||||
int snd_ad1816a_mixer(ad1816a_t *chip)
|
||||
int snd_ad1816a_mixer(struct snd_ad1816a *chip)
|
||||
{
|
||||
snd_card_t *card;
|
||||
struct snd_card *card;
|
||||
unsigned int idx;
|
||||
int err;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user