Commit f956b4a3 authored by Takashi Iwai's avatar Takashi Iwai Committed by Jaroslav Kysela

[ALSA] Remove xxx_t typedefs: Mixer OSS-emulation

Modules: ALSA<-OSS emulation

Remove xxx_t typedefs from the core mixer OSS-emulation codes.
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 174c1f65
...@@ -24,51 +24,53 @@ ...@@ -24,51 +24,53 @@
#if defined(CONFIG_SND_MIXER_OSS) || defined(CONFIG_SND_MIXER_OSS_MODULE) #if defined(CONFIG_SND_MIXER_OSS) || defined(CONFIG_SND_MIXER_OSS_MODULE)
typedef struct _snd_oss_mixer_slot snd_mixer_oss_slot_t;
typedef struct _snd_oss_file snd_mixer_oss_file_t;
typedef int (*snd_mixer_oss_get_volume_t)(snd_mixer_oss_file_t *fmixer, snd_mixer_oss_slot_t *chn, int *left, int *right);
typedef int (*snd_mixer_oss_put_volume_t)(snd_mixer_oss_file_t *fmixer, snd_mixer_oss_slot_t *chn, int left, int right);
typedef int (*snd_mixer_oss_get_recsrc_t)(snd_mixer_oss_file_t *fmixer, snd_mixer_oss_slot_t *chn, int *active);
typedef int (*snd_mixer_oss_put_recsrc_t)(snd_mixer_oss_file_t *fmixer, snd_mixer_oss_slot_t *chn, int active);
typedef int (*snd_mixer_oss_get_recsrce_t)(snd_mixer_oss_file_t *fmixer, unsigned int *active_index);
typedef int (*snd_mixer_oss_put_recsrce_t)(snd_mixer_oss_file_t *fmixer, unsigned int active_index);
#define SNDRV_OSS_MAX_MIXERS 32 #define SNDRV_OSS_MAX_MIXERS 32
struct _snd_oss_mixer_slot { struct snd_mixer_oss_file;
struct snd_mixer_oss_slot {
int number; int number;
unsigned int stereo: 1; unsigned int stereo: 1;
snd_mixer_oss_get_volume_t get_volume; int (*get_volume)(struct snd_mixer_oss_file *fmixer,
snd_mixer_oss_put_volume_t put_volume; struct snd_mixer_oss_slot *chn,
snd_mixer_oss_get_recsrc_t get_recsrc; int *left, int *right);
snd_mixer_oss_put_recsrc_t put_recsrc; int (*put_volume)(struct snd_mixer_oss_file *fmixer,
struct snd_mixer_oss_slot *chn,
int left, int right);
int (*get_recsrc)(struct snd_mixer_oss_file *fmixer,
struct snd_mixer_oss_slot *chn,
int *active);
int (*put_recsrc)(struct snd_mixer_oss_file *fmixer,
struct snd_mixer_oss_slot *chn,
int active);
unsigned long private_value; unsigned long private_value;
void *private_data; void *private_data;
void (*private_free)(snd_mixer_oss_slot_t *slot); void (*private_free)(struct snd_mixer_oss_slot *slot);
int volume[2]; int volume[2];
}; };
struct _snd_oss_mixer { struct snd_mixer_oss {
snd_card_t *card; struct snd_card *card;
char id[16]; char id[16];
char name[32]; char name[32];
snd_mixer_oss_slot_t slots[SNDRV_OSS_MAX_MIXERS]; /* OSS mixer slots */ struct snd_mixer_oss_slot slots[SNDRV_OSS_MAX_MIXERS]; /* OSS mixer slots */
unsigned int mask_recsrc; /* exclusive recsrc mask */ unsigned int mask_recsrc; /* exclusive recsrc mask */
snd_mixer_oss_get_recsrce_t get_recsrc; int (*get_recsrc)(struct snd_mixer_oss_file *fmixer,
snd_mixer_oss_put_recsrce_t put_recsrc; unsigned int *active_index);
int (*put_recsrc)(struct snd_mixer_oss_file *fmixer,
unsigned int active_index);
void *private_data_recsrc; void *private_data_recsrc;
void (*private_free_recsrc)(snd_mixer_oss_t *mixer); void (*private_free_recsrc)(struct snd_mixer_oss *mixer);
struct semaphore reg_mutex; struct semaphore reg_mutex;
snd_info_entry_t *proc_entry; struct snd_info_entry *proc_entry;
int oss_dev_alloc; int oss_dev_alloc;
/* --- */ /* --- */
int oss_recsrc; int oss_recsrc;
}; };
struct _snd_oss_file { struct snd_mixer_oss_file {
snd_card_t *card; struct snd_card *card;
snd_mixer_oss_t *mixer; struct snd_mixer_oss *mixer;
}; };
#endif /* CONFIG_SND_MIXER_OSS */ #endif /* CONFIG_SND_MIXER_OSS */
......
...@@ -42,8 +42,8 @@ MODULE_ALIAS_SNDRV_MINOR(SNDRV_MINOR_OSS_MIXER); ...@@ -42,8 +42,8 @@ MODULE_ALIAS_SNDRV_MINOR(SNDRV_MINOR_OSS_MIXER);
static int snd_mixer_oss_open(struct inode *inode, struct file *file) static int snd_mixer_oss_open(struct inode *inode, struct file *file)
{ {
int cardnum = SNDRV_MINOR_OSS_CARD(iminor(inode)); int cardnum = SNDRV_MINOR_OSS_CARD(iminor(inode));
snd_card_t *card; struct snd_card *card;
snd_mixer_oss_file_t *fmixer; struct snd_mixer_oss_file *fmixer;
int err; int err;
if ((card = snd_cards[cardnum]) == NULL) if ((card = snd_cards[cardnum]) == NULL)
...@@ -71,10 +71,10 @@ static int snd_mixer_oss_open(struct inode *inode, struct file *file) ...@@ -71,10 +71,10 @@ static int snd_mixer_oss_open(struct inode *inode, struct file *file)
static int snd_mixer_oss_release(struct inode *inode, struct file *file) static int snd_mixer_oss_release(struct inode *inode, struct file *file)
{ {
snd_mixer_oss_file_t *fmixer; struct snd_mixer_oss_file *fmixer;
if (file->private_data) { if (file->private_data) {
fmixer = (snd_mixer_oss_file_t *) file->private_data; fmixer = (struct snd_mixer_oss_file *) file->private_data;
module_put(fmixer->card->module); module_put(fmixer->card->module);
snd_card_file_remove(fmixer->card, file); snd_card_file_remove(fmixer->card, file);
kfree(fmixer); kfree(fmixer);
...@@ -82,11 +82,11 @@ static int snd_mixer_oss_release(struct inode *inode, struct file *file) ...@@ -82,11 +82,11 @@ static int snd_mixer_oss_release(struct inode *inode, struct file *file)
return 0; return 0;
} }
static int snd_mixer_oss_info(snd_mixer_oss_file_t *fmixer, static int snd_mixer_oss_info(struct snd_mixer_oss_file *fmixer,
mixer_info __user *_info) mixer_info __user *_info)
{ {
snd_card_t *card = fmixer->card; struct snd_card *card = fmixer->card;
snd_mixer_oss_t *mixer = fmixer->mixer; struct snd_mixer_oss *mixer = fmixer->mixer;
struct mixer_info info; struct mixer_info info;
memset(&info, 0, sizeof(info)); memset(&info, 0, sizeof(info));
...@@ -98,11 +98,11 @@ static int snd_mixer_oss_info(snd_mixer_oss_file_t *fmixer, ...@@ -98,11 +98,11 @@ static int snd_mixer_oss_info(snd_mixer_oss_file_t *fmixer,
return 0; return 0;
} }
static int snd_mixer_oss_info_obsolete(snd_mixer_oss_file_t *fmixer, static int snd_mixer_oss_info_obsolete(struct snd_mixer_oss_file *fmixer,
_old_mixer_info __user *_info) _old_mixer_info __user *_info)
{ {
snd_card_t *card = fmixer->card; struct snd_card *card = fmixer->card;
snd_mixer_oss_t *mixer = fmixer->mixer; struct snd_mixer_oss *mixer = fmixer->mixer;
_old_mixer_info info; _old_mixer_info info;
memset(&info, 0, sizeof(info)); memset(&info, 0, sizeof(info));
...@@ -113,9 +113,9 @@ static int snd_mixer_oss_info_obsolete(snd_mixer_oss_file_t *fmixer, ...@@ -113,9 +113,9 @@ static int snd_mixer_oss_info_obsolete(snd_mixer_oss_file_t *fmixer,
return 0; return 0;
} }
static int snd_mixer_oss_caps(snd_mixer_oss_file_t *fmixer) static int snd_mixer_oss_caps(struct snd_mixer_oss_file *fmixer)
{ {
snd_mixer_oss_t *mixer = fmixer->mixer; struct snd_mixer_oss *mixer = fmixer->mixer;
int result = 0; int result = 0;
if (mixer == NULL) if (mixer == NULL)
...@@ -125,10 +125,10 @@ static int snd_mixer_oss_caps(snd_mixer_oss_file_t *fmixer) ...@@ -125,10 +125,10 @@ static int snd_mixer_oss_caps(snd_mixer_oss_file_t *fmixer)
return result; return result;
} }
static int snd_mixer_oss_devmask(snd_mixer_oss_file_t *fmixer) static int snd_mixer_oss_devmask(struct snd_mixer_oss_file *fmixer)
{ {
snd_mixer_oss_t *mixer = fmixer->mixer; struct snd_mixer_oss *mixer = fmixer->mixer;
snd_mixer_oss_slot_t *pslot; struct snd_mixer_oss_slot *pslot;
int result = 0, chn; int result = 0, chn;
if (mixer == NULL) if (mixer == NULL)
...@@ -141,10 +141,10 @@ static int snd_mixer_oss_devmask(snd_mixer_oss_file_t *fmixer) ...@@ -141,10 +141,10 @@ static int snd_mixer_oss_devmask(snd_mixer_oss_file_t *fmixer)
return result; return result;
} }
static int snd_mixer_oss_stereodevs(snd_mixer_oss_file_t *fmixer) static int snd_mixer_oss_stereodevs(struct snd_mixer_oss_file *fmixer)
{ {
snd_mixer_oss_t *mixer = fmixer->mixer; struct snd_mixer_oss *mixer = fmixer->mixer;
snd_mixer_oss_slot_t *pslot; struct snd_mixer_oss_slot *pslot;
int result = 0, chn; int result = 0, chn;
if (mixer == NULL) if (mixer == NULL)
...@@ -157,9 +157,9 @@ static int snd_mixer_oss_stereodevs(snd_mixer_oss_file_t *fmixer) ...@@ -157,9 +157,9 @@ static int snd_mixer_oss_stereodevs(snd_mixer_oss_file_t *fmixer)
return result; return result;
} }
static int snd_mixer_oss_recmask(snd_mixer_oss_file_t *fmixer) static int snd_mixer_oss_recmask(struct snd_mixer_oss_file *fmixer)
{ {
snd_mixer_oss_t *mixer = fmixer->mixer; struct snd_mixer_oss *mixer = fmixer->mixer;
int result = 0; int result = 0;
if (mixer == NULL) if (mixer == NULL)
...@@ -167,7 +167,7 @@ static int snd_mixer_oss_recmask(snd_mixer_oss_file_t *fmixer) ...@@ -167,7 +167,7 @@ static int snd_mixer_oss_recmask(snd_mixer_oss_file_t *fmixer)
if (mixer->put_recsrc && mixer->get_recsrc) { /* exclusive */ if (mixer->put_recsrc && mixer->get_recsrc) { /* exclusive */
result = mixer->mask_recsrc; result = mixer->mask_recsrc;
} else { } else {
snd_mixer_oss_slot_t *pslot; struct snd_mixer_oss_slot *pslot;
int chn; int chn;
for (chn = 0; chn < 31; chn++) { for (chn = 0; chn < 31; chn++) {
pslot = &mixer->slots[chn]; pslot = &mixer->slots[chn];
...@@ -178,9 +178,9 @@ static int snd_mixer_oss_recmask(snd_mixer_oss_file_t *fmixer) ...@@ -178,9 +178,9 @@ static int snd_mixer_oss_recmask(snd_mixer_oss_file_t *fmixer)
return result; return result;
} }
static int snd_mixer_oss_get_recsrc(snd_mixer_oss_file_t *fmixer) static int snd_mixer_oss_get_recsrc(struct snd_mixer_oss_file *fmixer)
{ {
snd_mixer_oss_t *mixer = fmixer->mixer; struct snd_mixer_oss *mixer = fmixer->mixer;
int result = 0; int result = 0;
if (mixer == NULL) if (mixer == NULL)
...@@ -191,7 +191,7 @@ static int snd_mixer_oss_get_recsrc(snd_mixer_oss_file_t *fmixer) ...@@ -191,7 +191,7 @@ static int snd_mixer_oss_get_recsrc(snd_mixer_oss_file_t *fmixer)
return err; return err;
result = 1 << result; result = 1 << result;
} else { } else {
snd_mixer_oss_slot_t *pslot; struct snd_mixer_oss_slot *pslot;
int chn; int chn;
for (chn = 0; chn < 31; chn++) { for (chn = 0; chn < 31; chn++) {
pslot = &mixer->slots[chn]; pslot = &mixer->slots[chn];
...@@ -206,10 +206,10 @@ static int snd_mixer_oss_get_recsrc(snd_mixer_oss_file_t *fmixer) ...@@ -206,10 +206,10 @@ static int snd_mixer_oss_get_recsrc(snd_mixer_oss_file_t *fmixer)
return mixer->oss_recsrc = result; return mixer->oss_recsrc = result;
} }
static int snd_mixer_oss_set_recsrc(snd_mixer_oss_file_t *fmixer, int recsrc) static int snd_mixer_oss_set_recsrc(struct snd_mixer_oss_file *fmixer, int recsrc)
{ {
snd_mixer_oss_t *mixer = fmixer->mixer; struct snd_mixer_oss *mixer = fmixer->mixer;
snd_mixer_oss_slot_t *pslot; struct snd_mixer_oss_slot *pslot;
int chn, active; int chn, active;
int result = 0; int result = 0;
...@@ -243,10 +243,10 @@ static int snd_mixer_oss_set_recsrc(snd_mixer_oss_file_t *fmixer, int recsrc) ...@@ -243,10 +243,10 @@ static int snd_mixer_oss_set_recsrc(snd_mixer_oss_file_t *fmixer, int recsrc)
return result; return result;
} }
static int snd_mixer_oss_get_volume(snd_mixer_oss_file_t *fmixer, int slot) static int snd_mixer_oss_get_volume(struct snd_mixer_oss_file *fmixer, int slot)
{ {
snd_mixer_oss_t *mixer = fmixer->mixer; struct snd_mixer_oss *mixer = fmixer->mixer;
snd_mixer_oss_slot_t *pslot; struct snd_mixer_oss_slot *pslot;
int result = 0, left, right; int result = 0, left, right;
if (mixer == NULL || slot > 30) if (mixer == NULL || slot > 30)
...@@ -268,11 +268,11 @@ static int snd_mixer_oss_get_volume(snd_mixer_oss_file_t *fmixer, int slot) ...@@ -268,11 +268,11 @@ static int snd_mixer_oss_get_volume(snd_mixer_oss_file_t *fmixer, int slot)
return result; return result;
} }
static int snd_mixer_oss_set_volume(snd_mixer_oss_file_t *fmixer, static int snd_mixer_oss_set_volume(struct snd_mixer_oss_file *fmixer,
int slot, int volume) int slot, int volume)
{ {
snd_mixer_oss_t *mixer = fmixer->mixer; struct snd_mixer_oss *mixer = fmixer->mixer;
snd_mixer_oss_slot_t *pslot; struct snd_mixer_oss_slot *pslot;
int result = 0, left = volume & 0xff, right = (volume >> 8) & 0xff; int result = 0, left = volume & 0xff, right = (volume >> 8) & 0xff;
if (mixer == NULL || slot > 30) if (mixer == NULL || slot > 30)
...@@ -293,7 +293,7 @@ static int snd_mixer_oss_set_volume(snd_mixer_oss_file_t *fmixer, ...@@ -293,7 +293,7 @@ static int snd_mixer_oss_set_volume(snd_mixer_oss_file_t *fmixer,
return (left & 0xff) | ((right & 0xff) << 8); return (left & 0xff) | ((right & 0xff) << 8);
} }
static int snd_mixer_oss_ioctl1(snd_mixer_oss_file_t *fmixer, unsigned int cmd, unsigned long arg) static int snd_mixer_oss_ioctl1(struct snd_mixer_oss_file *fmixer, unsigned int cmd, unsigned long arg)
{ {
void __user *argp = (void __user *)arg; void __user *argp = (void __user *)arg;
int __user *p = argp; int __user *p = argp;
...@@ -362,12 +362,12 @@ static int snd_mixer_oss_ioctl1(snd_mixer_oss_file_t *fmixer, unsigned int cmd, ...@@ -362,12 +362,12 @@ static int snd_mixer_oss_ioctl1(snd_mixer_oss_file_t *fmixer, unsigned int cmd,
static long snd_mixer_oss_ioctl(struct file *file, unsigned int cmd, unsigned long arg) static long snd_mixer_oss_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
{ {
return snd_mixer_oss_ioctl1((snd_mixer_oss_file_t *) file->private_data, cmd, arg); return snd_mixer_oss_ioctl1((struct snd_mixer_oss_file *) file->private_data, cmd, arg);
} }
int snd_mixer_oss_ioctl_card(snd_card_t *card, unsigned int cmd, unsigned long arg) int snd_mixer_oss_ioctl_card(struct snd_card *card, unsigned int cmd, unsigned long arg)
{ {
snd_mixer_oss_file_t fmixer; struct snd_mixer_oss_file fmixer;
snd_assert(card != NULL, return -ENXIO); snd_assert(card != NULL, return -ENXIO);
if (card->mixer_oss == NULL) if (card->mixer_oss == NULL)
...@@ -398,7 +398,7 @@ static struct file_operations snd_mixer_oss_f_ops = ...@@ -398,7 +398,7 @@ static struct file_operations snd_mixer_oss_f_ops =
.compat_ioctl = snd_mixer_oss_ioctl_compat, .compat_ioctl = snd_mixer_oss_ioctl_compat,
}; };
static snd_minor_t snd_mixer_oss_reg = static struct snd_minor snd_mixer_oss_reg =
{ {
.comment = "mixer", .comment = "mixer",
.f_ops = &snd_mixer_oss_f_ops, .f_ops = &snd_mixer_oss_f_ops,
...@@ -432,16 +432,16 @@ static long snd_mixer_oss_conv2(long val, long min, long max) ...@@ -432,16 +432,16 @@ static long snd_mixer_oss_conv2(long val, long min, long max)
} }
#if 0 #if 0
static void snd_mixer_oss_recsrce_set(snd_card_t *card, int slot) static void snd_mixer_oss_recsrce_set(struct snd_card *card, int slot)
{ {
snd_mixer_oss_t *mixer = card->mixer_oss; struct snd_mixer_oss *mixer = card->mixer_oss;
if (mixer) if (mixer)
mixer->mask_recsrc |= 1 << slot; mixer->mask_recsrc |= 1 << slot;
} }
static int snd_mixer_oss_recsrce_get(snd_card_t *card, int slot) static int snd_mixer_oss_recsrce_get(struct snd_card *card, int slot)
{ {
snd_mixer_oss_t *mixer = card->mixer_oss; struct snd_mixer_oss *mixer = card->mixer_oss;
if (mixer && (mixer->mask_recsrc & (1 << slot))) if (mixer && (mixer->mask_recsrc & (1 << slot)))
return 1; return 1;
return 0; return 0;
...@@ -488,10 +488,10 @@ struct slot { ...@@ -488,10 +488,10 @@ struct slot {
#define ID_UNKNOWN ((unsigned int)-1) #define ID_UNKNOWN ((unsigned int)-1)
static snd_kcontrol_t *snd_mixer_oss_test_id(snd_mixer_oss_t *mixer, const char *name, int index) static struct snd_kcontrol *snd_mixer_oss_test_id(struct snd_mixer_oss *mixer, const char *name, int index)
{ {
snd_card_t * card = mixer->card; struct snd_card *card = mixer->card;
snd_ctl_elem_id_t id; struct snd_ctl_elem_id id;
memset(&id, 0, sizeof(id)); memset(&id, 0, sizeof(id));
id.iface = SNDRV_CTL_ELEM_IFACE_MIXER; id.iface = SNDRV_CTL_ELEM_IFACE_MIXER;
...@@ -500,15 +500,15 @@ static snd_kcontrol_t *snd_mixer_oss_test_id(snd_mixer_oss_t *mixer, const char ...@@ -500,15 +500,15 @@ static snd_kcontrol_t *snd_mixer_oss_test_id(snd_mixer_oss_t *mixer, const char
return snd_ctl_find_id(card, &id); return snd_ctl_find_id(card, &id);
} }
static void snd_mixer_oss_get_volume1_vol(snd_mixer_oss_file_t *fmixer, static void snd_mixer_oss_get_volume1_vol(struct snd_mixer_oss_file *fmixer,
snd_mixer_oss_slot_t *pslot, struct snd_mixer_oss_slot *pslot,
unsigned int numid, unsigned int numid,
int *left, int *right) int *left, int *right)
{ {
snd_ctl_elem_info_t *uinfo; struct snd_ctl_elem_info *uinfo;
snd_ctl_elem_value_t *uctl; struct snd_ctl_elem_value *uctl;
snd_kcontrol_t *kctl; struct snd_kcontrol *kctl;
snd_card_t *card = fmixer->card; struct snd_card *card = fmixer->card;
if (numid == ID_UNKNOWN) if (numid == ID_UNKNOWN)
return; return;
...@@ -537,16 +537,16 @@ static void snd_mixer_oss_get_volume1_vol(snd_mixer_oss_file_t *fmixer, ...@@ -537,16 +537,16 @@ static void snd_mixer_oss_get_volume1_vol(snd_mixer_oss_file_t *fmixer,
kfree(uinfo); kfree(uinfo);
} }
static void snd_mixer_oss_get_volume1_sw(snd_mixer_oss_file_t *fmixer, static void snd_mixer_oss_get_volume1_sw(struct snd_mixer_oss_file *fmixer,
snd_mixer_oss_slot_t *pslot, struct snd_mixer_oss_slot *pslot,
unsigned int numid, unsigned int numid,
int *left, int *right, int *left, int *right,
int route) int route)
{ {
snd_ctl_elem_info_t *uinfo; struct snd_ctl_elem_info *uinfo;
snd_ctl_elem_value_t *uctl; struct snd_ctl_elem_value *uctl;
snd_kcontrol_t *kctl; struct snd_kcontrol *kctl;
snd_card_t *card = fmixer->card; struct snd_card *card = fmixer->card;
if (numid == ID_UNKNOWN) if (numid == ID_UNKNOWN)
return; return;
...@@ -576,8 +576,8 @@ static void snd_mixer_oss_get_volume1_sw(snd_mixer_oss_file_t *fmixer, ...@@ -576,8 +576,8 @@ static void snd_mixer_oss_get_volume1_sw(snd_mixer_oss_file_t *fmixer,
kfree(uinfo); kfree(uinfo);
} }
static int snd_mixer_oss_get_volume1(snd_mixer_oss_file_t *fmixer, static int snd_mixer_oss_get_volume1(struct snd_mixer_oss_file *fmixer,
snd_mixer_oss_slot_t *pslot, struct snd_mixer_oss_slot *pslot,
int *left, int *right) int *left, int *right)
{ {
struct slot *slot = (struct slot *)pslot->private_data; struct slot *slot = (struct slot *)pslot->private_data;
...@@ -602,15 +602,15 @@ static int snd_mixer_oss_get_volume1(snd_mixer_oss_file_t *fmixer, ...@@ -602,15 +602,15 @@ static int snd_mixer_oss_get_volume1(snd_mixer_oss_file_t *fmixer,
return 0; return 0;
} }
static void snd_mixer_oss_put_volume1_vol(snd_mixer_oss_file_t *fmixer, static void snd_mixer_oss_put_volume1_vol(struct snd_mixer_oss_file *fmixer,
snd_mixer_oss_slot_t *pslot, struct snd_mixer_oss_slot *pslot,
unsigned int numid, unsigned int numid,
int left, int right) int left, int right)
{ {
snd_ctl_elem_info_t *uinfo; struct snd_ctl_elem_info *uinfo;
snd_ctl_elem_value_t *uctl; struct snd_ctl_elem_value *uctl;
snd_kcontrol_t *kctl; struct snd_kcontrol *kctl;
snd_card_t *card = fmixer->card; struct snd_card *card = fmixer->card;
int res; int res;
if (numid == ID_UNKNOWN) if (numid == ID_UNKNOWN)
...@@ -640,16 +640,16 @@ static void snd_mixer_oss_put_volume1_vol(snd_mixer_oss_file_t *fmixer, ...@@ -640,16 +640,16 @@ static void snd_mixer_oss_put_volume1_vol(snd_mixer_oss_file_t *fmixer,
kfree(uinfo); kfree(uinfo);
} }
static void snd_mixer_oss_put_volume1_sw(snd_mixer_oss_file_t *fmixer, static void snd_mixer_oss_put_volume1_sw(struct snd_mixer_oss_file *fmixer,
snd_mixer_oss_slot_t *pslot, struct snd_mixer_oss_slot *pslot,
unsigned int numid, unsigned int numid,
int left, int right, int left, int right,
int route) int route)
{ {
snd_ctl_elem_info_t *uinfo; struct snd_ctl_elem_info *uinfo;
snd_ctl_elem_value_t *uctl; struct snd_ctl_elem_value *uctl;
snd_kcontrol_t *kctl; struct snd_kcontrol *kctl;
snd_card_t *card = fmixer->card; struct snd_card *card = fmixer->card;
int res; int res;
if (numid == ID_UNKNOWN) if (numid == ID_UNKNOWN)
...@@ -685,8 +685,8 @@ static void snd_mixer_oss_put_volume1_sw(snd_mixer_oss_file_t *fmixer, ...@@ -685,8 +685,8 @@ static void snd_mixer_oss_put_volume1_sw(snd_mixer_oss_file_t *fmixer,
kfree(uinfo); kfree(uinfo);
} }
static int snd_mixer_oss_put_volume1(snd_mixer_oss_file_t *fmixer, static int snd_mixer_oss_put_volume1(struct snd_mixer_oss_file *fmixer,
snd_mixer_oss_slot_t *pslot, struct snd_mixer_oss_slot *pslot,
int left, int right) int left, int right)
{ {
struct slot *slot = (struct slot *)pslot->private_data; struct slot *slot = (struct slot *)pslot->private_data;
...@@ -723,8 +723,8 @@ static int snd_mixer_oss_put_volume1(snd_mixer_oss_file_t *fmixer, ...@@ -723,8 +723,8 @@ static int snd_mixer_oss_put_volume1(snd_mixer_oss_file_t *fmixer,
return 0; return 0;
} }
static int snd_mixer_oss_get_recsrc1_sw(snd_mixer_oss_file_t *fmixer, static int snd_mixer_oss_get_recsrc1_sw(struct snd_mixer_oss_file *fmixer,
snd_mixer_oss_slot_t *pslot, struct snd_mixer_oss_slot *pslot,
int *active) int *active)
{ {
struct slot *slot = (struct slot *)pslot->private_data; struct slot *slot = (struct slot *)pslot->private_data;
...@@ -736,8 +736,8 @@ static int snd_mixer_oss_get_recsrc1_sw(snd_mixer_oss_file_t *fmixer, ...@@ -736,8 +736,8 @@ static int snd_mixer_oss_get_recsrc1_sw(snd_mixer_oss_file_t *fmixer,
return 0; return 0;
} }
static int snd_mixer_oss_get_recsrc1_route(snd_mixer_oss_file_t *fmixer, static int snd_mixer_oss_get_recsrc1_route(struct snd_mixer_oss_file *fmixer,
snd_mixer_oss_slot_t *pslot, struct snd_mixer_oss_slot *pslot,
int *active) int *active)
{ {
struct slot *slot = (struct slot *)pslot->private_data; struct slot *slot = (struct slot *)pslot->private_data;
...@@ -749,8 +749,8 @@ static int snd_mixer_oss_get_recsrc1_route(snd_mixer_oss_file_t *fmixer, ...@@ -749,8 +749,8 @@ static int snd_mixer_oss_get_recsrc1_route(snd_mixer_oss_file_t *fmixer,
return 0; return 0;
} }
static int snd_mixer_oss_put_recsrc1_sw(snd_mixer_oss_file_t *fmixer, static int snd_mixer_oss_put_recsrc1_sw(struct snd_mixer_oss_file *fmixer,
snd_mixer_oss_slot_t *pslot, struct snd_mixer_oss_slot *pslot,
int active) int active)
{ {
struct slot *slot = (struct slot *)pslot->private_data; struct slot *slot = (struct slot *)pslot->private_data;
...@@ -759,8 +759,8 @@ static int snd_mixer_oss_put_recsrc1_sw(snd_mixer_oss_file_t *fmixer, ...@@ -759,8 +759,8 @@ static int snd_mixer_oss_put_recsrc1_sw(snd_mixer_oss_file_t *fmixer,
return 0; return 0;
} }
static int snd_mixer_oss_put_recsrc1_route(snd_mixer_oss_file_t *fmixer, static int snd_mixer_oss_put_recsrc1_route(struct snd_mixer_oss_file *fmixer,
snd_mixer_oss_slot_t *pslot, struct snd_mixer_oss_slot *pslot,
int active) int active)
{ {
struct slot *slot = (struct slot *)pslot->private_data; struct slot *slot = (struct slot *)pslot->private_data;
...@@ -769,15 +769,15 @@ static int snd_mixer_oss_put_recsrc1_route(snd_mixer_oss_file_t *fmixer, ...@@ -769,15 +769,15 @@ static int snd_mixer_oss_put_recsrc1_route(snd_mixer_oss_file_t *fmixer,
return 0; return 0;
} }
static int snd_mixer_oss_get_recsrc2(snd_mixer_oss_file_t *fmixer, unsigned int *active_index) static int snd_mixer_oss_get_recsrc2(struct snd_mixer_oss_file *fmixer, unsigned int *active_index)
{ {
snd_card_t *card = fmixer->card; struct snd_card *card = fmixer->card;
snd_mixer_oss_t *mixer = fmixer->mixer; struct snd_mixer_oss *mixer = fmixer->mixer;
snd_kcontrol_t *kctl; struct snd_kcontrol *kctl;
snd_mixer_oss_slot_t *pslot; struct snd_mixer_oss_slot *pslot;
struct slot *slot; struct slot *slot;
snd_ctl_elem_info_t *uinfo; struct snd_ctl_elem_info *uinfo;
snd_ctl_elem_value_t *uctl; struct snd_ctl_elem_value *uctl;
int err, idx; int err, idx;
uinfo = kzalloc(sizeof(*uinfo), GFP_KERNEL); uinfo = kzalloc(sizeof(*uinfo), GFP_KERNEL);
...@@ -818,15 +818,15 @@ static int snd_mixer_oss_get_recsrc2(snd_mixer_oss_file_t *fmixer, unsigned int ...@@ -818,15 +818,15 @@ static int snd_mixer_oss_get_recsrc2(snd_mixer_oss_file_t *fmixer, unsigned int
return err; return err;
} }
static int snd_mixer_oss_put_recsrc2(snd_mixer_oss_file_t *fmixer, unsigned int active_index) static int snd_mixer_oss_put_recsrc2(struct snd_mixer_oss_file *fmixer, unsigned int active_index)
{ {
snd_card_t *card = fmixer->card; struct snd_card *card = fmixer->card;
snd_mixer_oss_t *mixer = fmixer->mixer; struct snd_mixer_oss *mixer = fmixer->mixer;
snd_kcontrol_t *kctl; struct snd_kcontrol *kctl;
snd_mixer_oss_slot_t *pslot; struct snd_mixer_oss_slot *pslot;
struct slot *slot = NULL; struct slot *slot = NULL;
snd_ctl_elem_info_t *uinfo; struct snd_ctl_elem_info *uinfo;
snd_ctl_elem_value_t *uctl; struct snd_ctl_elem_value *uctl;
int err; int err;
unsigned int idx; unsigned int idx;
...@@ -878,11 +878,11 @@ struct snd_mixer_oss_assign_table { ...@@ -878,11 +878,11 @@ struct snd_mixer_oss_assign_table {
int index; int index;
}; };
static int snd_mixer_oss_build_test(snd_mixer_oss_t *mixer, struct slot *slot, const char *name, int index, int item) static int snd_mixer_oss_build_test(struct snd_mixer_oss *mixer, struct slot *slot, const char *name, int index, int item)
{ {
snd_ctl_elem_info_t *info; struct snd_ctl_elem_info *info;
snd_kcontrol_t *kcontrol; struct snd_kcontrol *kcontrol;
snd_card_t *card = mixer->card; struct snd_card *card = mixer->card;
int err; int err;
down_read(&card->controls_rwsem); down_read(&card->controls_rwsem);
...@@ -910,7 +910,7 @@ static int snd_mixer_oss_build_test(snd_mixer_oss_t *mixer, struct slot *slot, c ...@@ -910,7 +910,7 @@ static int snd_mixer_oss_build_test(snd_mixer_oss_t *mixer, struct slot *slot, c
return 0; return 0;
} }
static void snd_mixer_oss_slot_free(snd_mixer_oss_slot_t *chn) static void snd_mixer_oss_slot_free(struct snd_mixer_oss_slot *chn)
{ {
struct slot *p = (struct slot *)chn->private_data; struct slot *p = (struct slot *)chn->private_data;
if (p) { if (p) {
...@@ -922,7 +922,7 @@ static void snd_mixer_oss_slot_free(snd_mixer_oss_slot_t *chn) ...@@ -922,7 +922,7 @@ static void snd_mixer_oss_slot_free(snd_mixer_oss_slot_t *chn)
} }
} }
static void mixer_slot_clear(snd_mixer_oss_slot_t *rslot) static void mixer_slot_clear(struct snd_mixer_oss_slot *rslot)
{ {
int idx = rslot->number; /* remember this */ int idx = rslot->number; /* remember this */
if (rslot->private_free) if (rslot->private_free)
...@@ -936,12 +936,12 @@ static void mixer_slot_clear(snd_mixer_oss_slot_t *rslot) ...@@ -936,12 +936,12 @@ static void mixer_slot_clear(snd_mixer_oss_slot_t *rslot)
* ptr_allocated means the entry is dynamically allocated (change via proc file). * ptr_allocated means the entry is dynamically allocated (change via proc file).
* when replace_old = 1, the old entry is replaced with the new one. * when replace_old = 1, the old entry is replaced with the new one.
*/ */
static int snd_mixer_oss_build_input(snd_mixer_oss_t *mixer, struct snd_mixer_oss_assign_table *ptr, int ptr_allocated, int replace_old) static int snd_mixer_oss_build_input(struct snd_mixer_oss *mixer, struct snd_mixer_oss_assign_table *ptr, int ptr_allocated, int replace_old)
{ {
struct slot slot; struct slot slot;
struct slot *pslot; struct slot *pslot;
snd_kcontrol_t *kctl; struct snd_kcontrol *kctl;
snd_mixer_oss_slot_t *rslot; struct snd_mixer_oss_slot *rslot;
char str[64]; char str[64];
/* check if already assigned */ /* check if already assigned */
...@@ -991,7 +991,7 @@ static int snd_mixer_oss_build_input(snd_mixer_oss_t *mixer, struct snd_mixer_os ...@@ -991,7 +991,7 @@ static int snd_mixer_oss_build_input(snd_mixer_oss_t *mixer, struct snd_mixer_os
return 0; return 0;
down_read(&mixer->card->controls_rwsem); down_read(&mixer->card->controls_rwsem);
if (ptr->index == 0 && (kctl = snd_mixer_oss_test_id(mixer, "Capture Source", 0)) != NULL) { if (ptr->index == 0 && (kctl = snd_mixer_oss_test_id(mixer, "Capture Source", 0)) != NULL) {
snd_ctl_elem_info_t *uinfo; struct snd_ctl_elem_info *uinfo;
uinfo = kmalloc(sizeof(*uinfo), GFP_KERNEL); uinfo = kmalloc(sizeof(*uinfo), GFP_KERNEL);
if (! uinfo) { if (! uinfo) {
...@@ -1093,10 +1093,10 @@ static char *oss_mixer_names[SNDRV_OSS_MAX_MIXERS] = { ...@@ -1093,10 +1093,10 @@ static char *oss_mixer_names[SNDRV_OSS_MAX_MIXERS] = {
* /proc interface * /proc interface
*/ */
static void snd_mixer_oss_proc_read(snd_info_entry_t *entry, static void snd_mixer_oss_proc_read(struct snd_info_entry *entry,
snd_info_buffer_t * buffer) struct snd_info_buffer *buffer)
{ {
snd_mixer_oss_t *mixer = entry->private_data; struct snd_mixer_oss *mixer = entry->private_data;
int i; int i;
down(&mixer->reg_mutex); down(&mixer->reg_mutex);
...@@ -1117,10 +1117,10 @@ static void snd_mixer_oss_proc_read(snd_info_entry_t *entry, ...@@ -1117,10 +1117,10 @@ static void snd_mixer_oss_proc_read(snd_info_entry_t *entry,
up(&mixer->reg_mutex); up(&mixer->reg_mutex);
} }
static void snd_mixer_oss_proc_write(snd_info_entry_t *entry, static void snd_mixer_oss_proc_write(struct snd_info_entry *entry,
snd_info_buffer_t * buffer) struct snd_info_buffer *buffer)
{ {
snd_mixer_oss_t *mixer = entry->private_data; struct snd_mixer_oss *mixer = entry->private_data;
char line[128], str[32], idxstr[16], *cptr; char line[128], str[32], idxstr[16], *cptr;
int ch, idx; int ch, idx;
struct snd_mixer_oss_assign_table *tbl; struct snd_mixer_oss_assign_table *tbl;
...@@ -1176,9 +1176,9 @@ static void snd_mixer_oss_proc_write(snd_info_entry_t *entry, ...@@ -1176,9 +1176,9 @@ static void snd_mixer_oss_proc_write(snd_info_entry_t *entry,
} }
} }
static void snd_mixer_oss_proc_init(snd_mixer_oss_t *mixer) static void snd_mixer_oss_proc_init(struct snd_mixer_oss *mixer)
{ {
snd_info_entry_t *entry; struct snd_info_entry *entry;
entry = snd_info_create_card_entry(mixer->card, "oss_mixer", entry = snd_info_create_card_entry(mixer->card, "oss_mixer",
mixer->card->proc_root); mixer->card->proc_root);
...@@ -1198,7 +1198,7 @@ static void snd_mixer_oss_proc_init(snd_mixer_oss_t *mixer) ...@@ -1198,7 +1198,7 @@ static void snd_mixer_oss_proc_init(snd_mixer_oss_t *mixer)
mixer->proc_entry = entry; mixer->proc_entry = entry;
} }
static void snd_mixer_oss_proc_done(snd_mixer_oss_t *mixer) static void snd_mixer_oss_proc_done(struct snd_mixer_oss *mixer)
{ {
if (mixer->proc_entry) { if (mixer->proc_entry) {
snd_info_unregister(mixer->proc_entry); snd_info_unregister(mixer->proc_entry);
...@@ -1206,7 +1206,7 @@ static void snd_mixer_oss_proc_done(snd_mixer_oss_t *mixer) ...@@ -1206,7 +1206,7 @@ static void snd_mixer_oss_proc_done(snd_mixer_oss_t *mixer)
} }
} }
static void snd_mixer_oss_build(snd_mixer_oss_t *mixer) static void snd_mixer_oss_build(struct snd_mixer_oss *mixer)
{ {
static struct snd_mixer_oss_assign_table table[] = { static struct snd_mixer_oss_assign_table table[] = {
{ SOUND_MIXER_VOLUME, "Master", 0 }, { SOUND_MIXER_VOLUME, "Master", 0 },
...@@ -1260,8 +1260,8 @@ static void snd_mixer_oss_build(snd_mixer_oss_t *mixer) ...@@ -1260,8 +1260,8 @@ static void snd_mixer_oss_build(snd_mixer_oss_t *mixer)
static int snd_mixer_oss_free1(void *private) static int snd_mixer_oss_free1(void *private)
{ {
snd_mixer_oss_t *mixer = private; struct snd_mixer_oss *mixer = private;
snd_card_t * card; struct snd_card *card;
int idx; int idx;
snd_assert(mixer != NULL, return -ENXIO); snd_assert(mixer != NULL, return -ENXIO);
...@@ -1269,7 +1269,7 @@ static int snd_mixer_oss_free1(void *private) ...@@ -1269,7 +1269,7 @@ static int snd_mixer_oss_free1(void *private)
snd_assert(mixer == card->mixer_oss, return -ENXIO); snd_assert(mixer == card->mixer_oss, return -ENXIO);
card->mixer_oss = NULL; card->mixer_oss = NULL;
for (idx = 0; idx < SNDRV_OSS_MAX_MIXERS; idx++) { for (idx = 0; idx < SNDRV_OSS_MAX_MIXERS; idx++) {
snd_mixer_oss_slot_t *chn = &mixer->slots[idx]; struct snd_mixer_oss_slot *chn = &mixer->slots[idx];
if (chn->private_free) if (chn->private_free)
chn->private_free(chn); chn->private_free(chn);
} }
...@@ -1277,9 +1277,9 @@ static int snd_mixer_oss_free1(void *private) ...@@ -1277,9 +1277,9 @@ static int snd_mixer_oss_free1(void *private)
return 0; return 0;
} }
static int snd_mixer_oss_notify_handler(snd_card_t * card, int cmd) static int snd_mixer_oss_notify_handler(struct snd_card *card, int cmd)
{ {
snd_mixer_oss_t *mixer; struct snd_mixer_oss *mixer;
if (cmd == SND_MIXER_OSS_NOTIFY_REGISTER) { if (cmd == SND_MIXER_OSS_NOTIFY_REGISTER) {
char name[128]; char name[128];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment