Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[ALSA] Remove xxx_t typedefs: PCI emu10k1

Modules: EMU10K1/EMU10K2 driver

Remove xxx_t typedefs from the PCI emu10k1 driver.

Signed-off-by: Takashi Iwai <tiwai@suse.de>

authored by

Takashi Iwai and committed by
Jaroslav Kysela
eb4698f3 3d19f804

+1015 -939
+165 -159
include/sound/emu10k1.h
··· 887 887 888 888 /* ------------------- STRUCTURES -------------------- */ 889 889 890 - typedef struct _snd_emu10k1 emu10k1_t; 891 - typedef struct _snd_emu10k1_voice emu10k1_voice_t; 892 - typedef struct _snd_emu10k1_pcm emu10k1_pcm_t; 893 - 894 - typedef enum { 890 + enum { 895 891 EMU10K1_EFX, 896 892 EMU10K1_PCM, 897 893 EMU10K1_SYNTH, 898 894 EMU10K1_MIDI 899 - } emu10k1_voice_type_t; 895 + }; 900 896 901 - struct _snd_emu10k1_voice { 902 - emu10k1_t *emu; 897 + struct snd_emu10k1; 898 + 899 + struct snd_emu10k1_voice { 900 + struct snd_emu10k1 *emu; 903 901 int number; 904 902 unsigned int use: 1, 905 903 pcm: 1, 906 904 efx: 1, 907 905 synth: 1, 908 906 midi: 1; 909 - void (*interrupt)(emu10k1_t *emu, emu10k1_voice_t *pvoice); 907 + void (*interrupt)(struct snd_emu10k1 *emu, struct snd_emu10k1_voice *pvoice); 910 908 911 - emu10k1_pcm_t *epcm; 909 + struct snd_emu10k1_pcm *epcm; 912 910 }; 913 911 914 - typedef enum { 912 + enum { 915 913 PLAYBACK_EMUVOICE, 916 914 PLAYBACK_EFX, 917 915 CAPTURE_AC97ADC, 918 916 CAPTURE_AC97MIC, 919 917 CAPTURE_EFX 920 - } snd_emu10k1_pcm_type_t; 918 + }; 921 919 922 - struct _snd_emu10k1_pcm { 923 - emu10k1_t *emu; 924 - snd_emu10k1_pcm_type_t type; 925 - snd_pcm_substream_t *substream; 926 - emu10k1_voice_t *voices[NUM_EFX_PLAYBACK]; 927 - emu10k1_voice_t *extra; 920 + struct snd_emu10k1_pcm { 921 + struct snd_emu10k1 *emu; 922 + int type; 923 + struct snd_pcm_substream *substream; 924 + struct snd_emu10k1_voice *voices[NUM_EFX_PLAYBACK]; 925 + struct snd_emu10k1_voice *extra; 928 926 unsigned short running; 929 927 unsigned short first_ptr; 930 - snd_util_memblk_t *memblk; 928 + struct snd_util_memblk *memblk; 931 929 unsigned int start_addr; 932 930 unsigned int ccca_start_addr; 933 931 unsigned int capture_ipr; /* interrupt acknowledge mask */ ··· 939 941 unsigned int capture_bufsize; /* buffer size in bytes */ 940 942 }; 941 943 942 - typedef struct { 944 + struct snd_emu10k1_pcm_mixer { 943 945 /* mono, left, right x 8 sends (4 on emu10k1) */ 944 946 unsigned char send_routing[3][8]; 945 947 unsigned char send_volume[3][8]; 946 948 unsigned short attn[3]; 947 - emu10k1_pcm_t *epcm; 948 - } emu10k1_pcm_mixer_t; 949 + struct snd_emu10k1_pcm *epcm; 950 + }; 949 951 950 952 #define snd_emu10k1_compose_send_routing(route) \ 951 953 ((route[0] | (route[1] << 4) | (route[2] << 8) | (route[3] << 12)) << 16) ··· 956 958 #define snd_emu10k1_compose_audigy_fxrt2(route) \ 957 959 ((unsigned int)route[4] | ((unsigned int)route[5] << 8) | ((unsigned int)route[6] << 16) | ((unsigned int)route[7] << 24)) 958 960 959 - typedef struct snd_emu10k1_memblk { 960 - snd_util_memblk_t mem; 961 + struct snd_emu10k1_memblk { 962 + struct snd_util_memblk mem; 961 963 /* private part */ 962 964 int first_page, last_page, pages, mapped_page; 963 965 unsigned int map_locked; 964 966 struct list_head mapped_link; 965 967 struct list_head mapped_order_link; 966 - } emu10k1_memblk_t; 968 + }; 967 969 968 970 #define snd_emu10k1_memblk_offset(blk) (((blk)->mapped_page << PAGE_SHIFT) | ((blk)->mem.offset & (PAGE_SIZE - 1))) 969 971 970 972 #define EMU10K1_MAX_TRAM_BLOCKS_PER_CODE 16 971 973 972 - typedef struct { 974 + struct snd_emu10k1_fx8010_ctl { 973 975 struct list_head list; /* list link container */ 974 976 unsigned int vcount; 975 977 unsigned int count; /* count of GPR (1..16) */ ··· 978 980 unsigned int min; /* minimum range */ 979 981 unsigned int max; /* maximum range */ 980 982 unsigned int translation; /* translation type (EMU10K1_GPR_TRANSLATION*) */ 981 - snd_kcontrol_t *kcontrol; 982 - } snd_emu10k1_fx8010_ctl_t; 983 + struct snd_kcontrol *kcontrol; 984 + }; 983 985 984 - typedef void (snd_fx8010_irq_handler_t)(emu10k1_t *emu, void *private_data); 986 + typedef void (snd_fx8010_irq_handler_t)(struct snd_emu10k1 *emu, void *private_data); 985 987 986 - typedef struct _snd_emu10k1_fx8010_irq { 987 - struct _snd_emu10k1_fx8010_irq *next; 988 + struct snd_emu10k1_fx8010_irq { 989 + struct snd_emu10k1_fx8010_irq *next; 988 990 snd_fx8010_irq_handler_t *handler; 989 991 unsigned short gpr_running; 990 992 void *private_data; 991 - } snd_emu10k1_fx8010_irq_t; 993 + }; 992 994 993 - typedef struct { 995 + struct snd_emu10k1_fx8010_pcm { 994 996 unsigned int valid: 1, 995 997 opened: 1, 996 998 active: 1; ··· 1004 1006 unsigned short gpr_trigger; /* GPR containing trigger (activate) information (host) */ 1005 1007 unsigned short gpr_running; /* GPR containing info if PCM is running (FX8010) */ 1006 1008 unsigned char etram[32]; /* external TRAM address & data */ 1007 - snd_pcm_indirect_t pcm_rec; 1009 + struct snd_pcm_indirect pcm_rec; 1008 1010 unsigned int tram_pos; 1009 1011 unsigned int tram_shift; 1010 - snd_emu10k1_fx8010_irq_t *irq; 1011 - } snd_emu10k1_fx8010_pcm_t; 1012 + struct snd_emu10k1_fx8010_irq *irq; 1013 + }; 1012 1014 1013 - typedef struct { 1015 + struct snd_emu10k1_fx8010 { 1014 1016 unsigned short fxbus_mask; /* used FX buses (bitmask) */ 1015 1017 unsigned short extin_mask; /* used external inputs (bitmask) */ 1016 1018 unsigned short extout_mask; /* used external outputs (bitmask) */ ··· 1023 1025 int gpr_count; /* count of used kcontrols */ 1024 1026 struct list_head gpr_ctl; /* GPR controls */ 1025 1027 struct semaphore lock; 1026 - snd_emu10k1_fx8010_pcm_t pcm[8]; 1028 + struct snd_emu10k1_fx8010_pcm pcm[8]; 1027 1029 spinlock_t irq_lock; 1028 - snd_emu10k1_fx8010_irq_t *irq_handlers; 1029 - } snd_emu10k1_fx8010_t; 1030 + struct snd_emu10k1_fx8010_irq *irq_handlers; 1031 + }; 1030 1032 1031 - #define emu10k1_gpr_ctl(n) list_entry(n, snd_emu10k1_fx8010_ctl_t, list) 1033 + #define emu10k1_gpr_ctl(n) list_entry(n, struct snd_emu10k1_fx8010_ctl, list) 1032 1034 1033 - typedef struct { 1034 - struct _snd_emu10k1 *emu; 1035 - snd_rawmidi_t *rmidi; 1036 - snd_rawmidi_substream_t *substream_input; 1037 - snd_rawmidi_substream_t *substream_output; 1035 + struct snd_emu10k1_midi { 1036 + struct snd_emu10k1 *emu; 1037 + struct snd_rawmidi *rmidi; 1038 + struct snd_rawmidi_substream *substream_input; 1039 + struct snd_rawmidi_substream *substream_output; 1038 1040 unsigned int midi_mode; 1039 1041 spinlock_t input_lock; 1040 1042 spinlock_t output_lock; ··· 1042 1044 int tx_enable, rx_enable; 1043 1045 int port; 1044 1046 int ipr_tx, ipr_rx; 1045 - void (*interrupt)(emu10k1_t *emu, unsigned int status); 1046 - } emu10k1_midi_t; 1047 + void (*interrupt)(struct snd_emu10k1 *emu, unsigned int status); 1048 + }; 1047 1049 1048 - typedef struct { 1050 + struct snd_emu_chip_details { 1049 1051 u32 vendor; 1050 1052 u32 device; 1051 1053 u32 subsystem; ··· 1064 1066 const char *driver; 1065 1067 const char *name; 1066 1068 const char *id; /* for backward compatibility - can be NULL if not needed */ 1067 - } emu_chip_details_t; 1069 + }; 1068 1070 1069 - struct _snd_emu10k1 { 1071 + struct snd_emu10k1 { 1070 1072 int irq; 1071 1073 1072 1074 unsigned long port; /* I/O port number */ 1073 1075 unsigned int tos_link: 1, /* tos link detected */ 1074 1076 rear_ac97: 1; /* rear channels are on AC'97 */ 1075 - const emu_chip_details_t *card_capabilities; /* Contains profile of card capabilities */ 1077 + /* Contains profile of card capabilities */ 1078 + const struct snd_emu_chip_details *card_capabilities; 1076 1079 unsigned int audigy; /* is Audigy? */ 1077 1080 unsigned int revision; /* chip revision */ 1078 1081 unsigned int serial; /* serial number */ ··· 1087 1088 struct snd_dma_device p16v_dma_dev; 1088 1089 struct snd_dma_buffer p16v_buffer; 1089 1090 1090 - snd_util_memhdr_t *memhdr; /* page allocation list */ 1091 - emu10k1_memblk_t *reserved_page; /* reserved page */ 1091 + struct snd_util_memhdr *memhdr; /* page allocation list */ 1092 + struct snd_emu10k1_memblk *reserved_page; /* reserved page */ 1092 1093 1093 1094 struct list_head mapped_link_head; 1094 1095 struct list_head mapped_order_link_head; ··· 1098 1099 1099 1100 unsigned int spdif_bits[3]; /* s/pdif out setup */ 1100 1101 1101 - snd_emu10k1_fx8010_t fx8010; /* FX8010 info */ 1102 + struct snd_emu10k1_fx8010 fx8010; /* FX8010 info */ 1102 1103 int gpr_base; 1103 1104 1104 - ac97_t *ac97; 1105 + struct snd_ac97 *ac97; 1105 1106 1106 1107 struct pci_dev *pci; 1107 - snd_card_t *card; 1108 - snd_pcm_t *pcm; 1109 - snd_pcm_t *pcm_mic; 1110 - snd_pcm_t *pcm_efx; 1111 - snd_pcm_t *pcm_p16v; 1108 + struct snd_card *card; 1109 + struct snd_pcm *pcm; 1110 + struct snd_pcm *pcm_mic; 1111 + struct snd_pcm *pcm_efx; 1112 + struct snd_pcm *pcm_p16v; 1112 1113 1113 1114 spinlock_t synth_lock; 1114 1115 void *synth; 1115 - int (*get_synth_voice)(emu10k1_t *emu); 1116 + int (*get_synth_voice)(struct snd_emu10k1 *emu); 1116 1117 1117 1118 spinlock_t reg_lock; 1118 1119 spinlock_t emu_lock; 1119 1120 spinlock_t voice_lock; 1120 1121 struct semaphore ptb_lock; 1121 1122 1122 - emu10k1_voice_t voices[NUM_G]; 1123 - emu10k1_voice_t p16v_voices[4]; 1124 - emu10k1_voice_t p16v_capture_voice; 1123 + struct snd_emu10k1_voice voices[NUM_G]; 1124 + struct snd_emu10k1_voice p16v_voices[4]; 1125 + struct snd_emu10k1_voice p16v_capture_voice; 1125 1126 int p16v_device_offset; 1126 1127 u32 p16v_capture_source; 1127 1128 u32 p16v_capture_channel; 1128 - emu10k1_pcm_mixer_t pcm_mixer[32]; 1129 - emu10k1_pcm_mixer_t efx_pcm_mixer[NUM_EFX_PLAYBACK]; 1130 - snd_kcontrol_t *ctl_send_routing; 1131 - snd_kcontrol_t *ctl_send_volume; 1132 - snd_kcontrol_t *ctl_attn; 1133 - snd_kcontrol_t *ctl_efx_send_routing; 1134 - snd_kcontrol_t *ctl_efx_send_volume; 1135 - snd_kcontrol_t *ctl_efx_attn; 1129 + struct snd_emu10k1_pcm_mixer pcm_mixer[32]; 1130 + struct snd_emu10k1_pcm_mixer efx_pcm_mixer[NUM_EFX_PLAYBACK]; 1131 + struct snd_kcontrol *ctl_send_routing; 1132 + struct snd_kcontrol *ctl_send_volume; 1133 + struct snd_kcontrol *ctl_attn; 1134 + struct snd_kcontrol *ctl_efx_send_routing; 1135 + struct snd_kcontrol *ctl_efx_send_volume; 1136 + struct snd_kcontrol *ctl_efx_attn; 1136 1137 1137 - void (*hwvol_interrupt)(emu10k1_t *emu, unsigned int status); 1138 - void (*capture_interrupt)(emu10k1_t *emu, unsigned int status); 1139 - void (*capture_mic_interrupt)(emu10k1_t *emu, unsigned int status); 1140 - void (*capture_efx_interrupt)(emu10k1_t *emu, unsigned int status); 1141 - void (*spdif_interrupt)(emu10k1_t *emu, unsigned int status); 1142 - void (*dsp_interrupt)(emu10k1_t *emu); 1138 + void (*hwvol_interrupt)(struct snd_emu10k1 *emu, unsigned int status); 1139 + void (*capture_interrupt)(struct snd_emu10k1 *emu, unsigned int status); 1140 + void (*capture_mic_interrupt)(struct snd_emu10k1 *emu, unsigned int status); 1141 + void (*capture_efx_interrupt)(struct snd_emu10k1 *emu, unsigned int status); 1142 + void (*spdif_interrupt)(struct snd_emu10k1 *emu, unsigned int status); 1143 + void (*dsp_interrupt)(struct snd_emu10k1 *emu); 1143 1144 1144 - snd_pcm_substream_t *pcm_capture_substream; 1145 - snd_pcm_substream_t *pcm_capture_mic_substream; 1146 - snd_pcm_substream_t *pcm_capture_efx_substream; 1147 - snd_pcm_substream_t *pcm_playback_efx_substream; 1145 + struct snd_pcm_substream *pcm_capture_substream; 1146 + struct snd_pcm_substream *pcm_capture_mic_substream; 1147 + struct snd_pcm_substream *pcm_capture_efx_substream; 1148 + struct snd_pcm_substream *pcm_playback_efx_substream; 1148 1149 1149 - snd_timer_t *timer; 1150 + struct snd_timer *timer; 1150 1151 1151 - emu10k1_midi_t midi; 1152 - emu10k1_midi_t midi2; /* for audigy */ 1152 + struct snd_emu10k1_midi midi; 1153 + struct snd_emu10k1_midi midi2; /* for audigy */ 1153 1154 1154 1155 unsigned int efx_voices_mask[2]; 1155 1156 unsigned int next_free_voice; 1156 1157 }; 1157 1158 1158 - int snd_emu10k1_create(snd_card_t * card, 1159 + int snd_emu10k1_create(struct snd_card *card, 1159 1160 struct pci_dev *pci, 1160 1161 unsigned short extin_mask, 1161 1162 unsigned short extout_mask, 1162 1163 long max_cache_bytes, 1163 1164 int enable_ir, 1164 1165 uint subsystem, 1165 - emu10k1_t ** remu); 1166 + struct snd_emu10k1 ** remu); 1166 1167 1167 - int snd_emu10k1_pcm(emu10k1_t * emu, int device, snd_pcm_t ** rpcm); 1168 - int snd_emu10k1_pcm_mic(emu10k1_t * emu, int device, snd_pcm_t ** rpcm); 1169 - int snd_emu10k1_pcm_efx(emu10k1_t * emu, int device, snd_pcm_t ** rpcm); 1170 - int snd_p16v_pcm(emu10k1_t * emu, int device, snd_pcm_t ** rpcm); 1171 - int snd_p16v_free(emu10k1_t * emu); 1172 - int snd_p16v_mixer(emu10k1_t * emu); 1173 - int snd_emu10k1_pcm_multi(emu10k1_t * emu, int device, snd_pcm_t ** rpcm); 1174 - int snd_emu10k1_fx8010_pcm(emu10k1_t * emu, int device, snd_pcm_t ** rpcm); 1175 - int snd_emu10k1_mixer(emu10k1_t * emu, int pcm_device, int multi_device); 1176 - int snd_emu10k1_timer(emu10k1_t * emu, int device); 1177 - int snd_emu10k1_fx8010_new(emu10k1_t *emu, int device, snd_hwdep_t ** rhwdep); 1168 + int snd_emu10k1_pcm(struct snd_emu10k1 * emu, int device, struct snd_pcm ** rpcm); 1169 + int snd_emu10k1_pcm_mic(struct snd_emu10k1 * emu, int device, struct snd_pcm ** rpcm); 1170 + int snd_emu10k1_pcm_efx(struct snd_emu10k1 * emu, int device, struct snd_pcm ** rpcm); 1171 + int snd_p16v_pcm(struct snd_emu10k1 * emu, int device, struct snd_pcm ** rpcm); 1172 + int snd_p16v_free(struct snd_emu10k1 * emu); 1173 + int snd_p16v_mixer(struct snd_emu10k1 * emu); 1174 + int snd_emu10k1_pcm_multi(struct snd_emu10k1 * emu, int device, struct snd_pcm ** rpcm); 1175 + int snd_emu10k1_fx8010_pcm(struct snd_emu10k1 * emu, int device, struct snd_pcm ** rpcm); 1176 + int snd_emu10k1_mixer(struct snd_emu10k1 * emu, int pcm_device, int multi_device); 1177 + int snd_emu10k1_timer(struct snd_emu10k1 * emu, int device); 1178 + int snd_emu10k1_fx8010_new(struct snd_emu10k1 *emu, int device, struct snd_hwdep ** rhwdep); 1178 1179 1179 1180 irqreturn_t snd_emu10k1_interrupt(int irq, void *dev_id, struct pt_regs *regs); 1180 1181 1181 1182 /* initialization */ 1182 - void snd_emu10k1_voice_init(emu10k1_t * emu, int voice); 1183 - int snd_emu10k1_init_efx(emu10k1_t *emu); 1184 - void snd_emu10k1_free_efx(emu10k1_t *emu); 1185 - int snd_emu10k1_fx8010_tram_setup(emu10k1_t *emu, u32 size); 1183 + void snd_emu10k1_voice_init(struct snd_emu10k1 * emu, int voice); 1184 + int snd_emu10k1_init_efx(struct snd_emu10k1 *emu); 1185 + void snd_emu10k1_free_efx(struct snd_emu10k1 *emu); 1186 + int snd_emu10k1_fx8010_tram_setup(struct snd_emu10k1 *emu, u32 size); 1186 1187 1187 1188 /* I/O functions */ 1188 - unsigned int snd_emu10k1_ptr_read(emu10k1_t * emu, unsigned int reg, unsigned int chn); 1189 - void snd_emu10k1_ptr_write(emu10k1_t *emu, unsigned int reg, unsigned int chn, unsigned int data); 1190 - unsigned int snd_emu10k1_ptr20_read(emu10k1_t * emu, unsigned int reg, unsigned int chn); 1191 - void snd_emu10k1_ptr20_write(emu10k1_t *emu, unsigned int reg, unsigned int chn, unsigned int data); 1192 - unsigned int snd_emu10k1_efx_read(emu10k1_t *emu, unsigned int pc); 1193 - void snd_emu10k1_intr_enable(emu10k1_t *emu, unsigned int intrenb); 1194 - void snd_emu10k1_intr_disable(emu10k1_t *emu, unsigned int intrenb); 1195 - void snd_emu10k1_voice_intr_enable(emu10k1_t *emu, unsigned int voicenum); 1196 - void snd_emu10k1_voice_intr_disable(emu10k1_t *emu, unsigned int voicenum); 1197 - void snd_emu10k1_voice_intr_ack(emu10k1_t *emu, unsigned int voicenum); 1198 - void snd_emu10k1_voice_half_loop_intr_enable(emu10k1_t *emu, unsigned int voicenum); 1199 - void snd_emu10k1_voice_half_loop_intr_disable(emu10k1_t *emu, unsigned int voicenum); 1200 - void snd_emu10k1_voice_half_loop_intr_ack(emu10k1_t *emu, unsigned int voicenum); 1201 - void snd_emu10k1_voice_set_loop_stop(emu10k1_t *emu, unsigned int voicenum); 1202 - void snd_emu10k1_voice_clear_loop_stop(emu10k1_t *emu, unsigned int voicenum); 1203 - void snd_emu10k1_wait(emu10k1_t *emu, unsigned int wait); 1204 - static inline unsigned int snd_emu10k1_wc(emu10k1_t *emu) { return (inl(emu->port + WC) >> 6) & 0xfffff; } 1205 - unsigned short snd_emu10k1_ac97_read(ac97_t *ac97, unsigned short reg); 1206 - void snd_emu10k1_ac97_write(ac97_t *ac97, unsigned short reg, unsigned short data); 1189 + unsigned int snd_emu10k1_ptr_read(struct snd_emu10k1 * emu, unsigned int reg, unsigned int chn); 1190 + void snd_emu10k1_ptr_write(struct snd_emu10k1 *emu, unsigned int reg, unsigned int chn, unsigned int data); 1191 + unsigned int snd_emu10k1_ptr20_read(struct snd_emu10k1 * emu, unsigned int reg, unsigned int chn); 1192 + void snd_emu10k1_ptr20_write(struct snd_emu10k1 *emu, unsigned int reg, unsigned int chn, unsigned int data); 1193 + unsigned int snd_emu10k1_efx_read(struct snd_emu10k1 *emu, unsigned int pc); 1194 + void snd_emu10k1_intr_enable(struct snd_emu10k1 *emu, unsigned int intrenb); 1195 + void snd_emu10k1_intr_disable(struct snd_emu10k1 *emu, unsigned int intrenb); 1196 + void snd_emu10k1_voice_intr_enable(struct snd_emu10k1 *emu, unsigned int voicenum); 1197 + void snd_emu10k1_voice_intr_disable(struct snd_emu10k1 *emu, unsigned int voicenum); 1198 + void snd_emu10k1_voice_intr_ack(struct snd_emu10k1 *emu, unsigned int voicenum); 1199 + void snd_emu10k1_voice_half_loop_intr_enable(struct snd_emu10k1 *emu, unsigned int voicenum); 1200 + void snd_emu10k1_voice_half_loop_intr_disable(struct snd_emu10k1 *emu, unsigned int voicenum); 1201 + void snd_emu10k1_voice_half_loop_intr_ack(struct snd_emu10k1 *emu, unsigned int voicenum); 1202 + void snd_emu10k1_voice_set_loop_stop(struct snd_emu10k1 *emu, unsigned int voicenum); 1203 + void snd_emu10k1_voice_clear_loop_stop(struct snd_emu10k1 *emu, unsigned int voicenum); 1204 + void snd_emu10k1_wait(struct snd_emu10k1 *emu, unsigned int wait); 1205 + static inline unsigned int snd_emu10k1_wc(struct snd_emu10k1 *emu) { return (inl(emu->port + WC) >> 6) & 0xfffff; } 1206 + unsigned short snd_emu10k1_ac97_read(struct snd_ac97 *ac97, unsigned short reg); 1207 + void snd_emu10k1_ac97_write(struct snd_ac97 *ac97, unsigned short reg, unsigned short data); 1207 1208 unsigned int snd_emu10k1_rate_to_pitch(unsigned int rate); 1208 1209 1209 1210 /* memory allocation */ 1210 - snd_util_memblk_t *snd_emu10k1_alloc_pages(emu10k1_t *emu, snd_pcm_substream_t *substream); 1211 - int snd_emu10k1_free_pages(emu10k1_t *emu, snd_util_memblk_t *blk); 1212 - snd_util_memblk_t *snd_emu10k1_synth_alloc(emu10k1_t *emu, unsigned int size); 1213 - int snd_emu10k1_synth_free(emu10k1_t *emu, snd_util_memblk_t *blk); 1214 - int snd_emu10k1_synth_bzero(emu10k1_t *emu, snd_util_memblk_t *blk, int offset, int size); 1215 - int snd_emu10k1_synth_copy_from_user(emu10k1_t *emu, snd_util_memblk_t *blk, int offset, const char __user *data, int size); 1216 - int snd_emu10k1_memblk_map(emu10k1_t *emu, emu10k1_memblk_t *blk); 1211 + struct snd_util_memblk *snd_emu10k1_alloc_pages(struct snd_emu10k1 *emu, struct snd_pcm_substream *substream); 1212 + int snd_emu10k1_free_pages(struct snd_emu10k1 *emu, struct snd_util_memblk *blk); 1213 + struct snd_util_memblk *snd_emu10k1_synth_alloc(struct snd_emu10k1 *emu, unsigned int size); 1214 + int snd_emu10k1_synth_free(struct snd_emu10k1 *emu, struct snd_util_memblk *blk); 1215 + int snd_emu10k1_synth_bzero(struct snd_emu10k1 *emu, struct snd_util_memblk *blk, int offset, int size); 1216 + int snd_emu10k1_synth_copy_from_user(struct snd_emu10k1 *emu, struct snd_util_memblk *blk, int offset, const char __user *data, int size); 1217 + int snd_emu10k1_memblk_map(struct snd_emu10k1 *emu, struct snd_emu10k1_memblk *blk); 1217 1218 1218 1219 /* voice allocation */ 1219 - int snd_emu10k1_voice_alloc(emu10k1_t *emu, emu10k1_voice_type_t type, int pair, emu10k1_voice_t **rvoice); 1220 - int snd_emu10k1_voice_free(emu10k1_t *emu, emu10k1_voice_t *pvoice); 1220 + int snd_emu10k1_voice_alloc(struct snd_emu10k1 *emu, int type, int pair, struct snd_emu10k1_voice **rvoice); 1221 + int snd_emu10k1_voice_free(struct snd_emu10k1 *emu, struct snd_emu10k1_voice *pvoice); 1221 1222 1222 1223 /* MIDI uart */ 1223 - int snd_emu10k1_midi(emu10k1_t * emu); 1224 - int snd_emu10k1_audigy_midi(emu10k1_t * emu); 1224 + int snd_emu10k1_midi(struct snd_emu10k1 * emu); 1225 + int snd_emu10k1_audigy_midi(struct snd_emu10k1 * emu); 1225 1226 1226 1227 /* proc interface */ 1227 - int snd_emu10k1_proc_init(emu10k1_t * emu); 1228 + int snd_emu10k1_proc_init(struct snd_emu10k1 * emu); 1228 1229 1229 1230 /* fx8010 irq handler */ 1230 - int snd_emu10k1_fx8010_register_irq_handler(emu10k1_t *emu, 1231 + int snd_emu10k1_fx8010_register_irq_handler(struct snd_emu10k1 *emu, 1231 1232 snd_fx8010_irq_handler_t *handler, 1232 1233 unsigned char gpr_running, 1233 1234 void *private_data, 1234 - snd_emu10k1_fx8010_irq_t **r_irq); 1235 - int snd_emu10k1_fx8010_unregister_irq_handler(emu10k1_t *emu, 1236 - snd_emu10k1_fx8010_irq_t *irq); 1235 + struct snd_emu10k1_fx8010_irq **r_irq); 1236 + int snd_emu10k1_fx8010_unregister_irq_handler(struct snd_emu10k1 *emu, 1237 + struct snd_emu10k1_fx8010_irq *irq); 1237 1238 1238 1239 #endif /* __KERNEL__ */ 1239 1240 ··· 1468 1469 #define TANKMEMADDRREG_READ 0x00100000 /* Read from tank memory */ 1469 1470 #endif 1470 1471 1471 - typedef struct { 1472 + struct snd_emu10k1_fx8010_info { 1472 1473 unsigned int internal_tram_size; /* in samples */ 1473 1474 unsigned int external_tram_size; /* in samples */ 1474 1475 char fxbus_names[16][32]; /* names of FXBUSes */ 1475 1476 char extin_names[16][32]; /* names of external inputs */ 1476 1477 char extout_names[32][32]; /* names of external outputs */ 1477 1478 unsigned int gpr_controls; /* count of GPR controls */ 1478 - } emu10k1_fx8010_info_t; 1479 + }; 1479 1480 1480 1481 #define EMU10K1_GPR_TRANSLATION_NONE 0 1481 1482 #define EMU10K1_GPR_TRANSLATION_TABLE100 1 ··· 1483 1484 #define EMU10K1_GPR_TRANSLATION_TREBLE 3 1484 1485 #define EMU10K1_GPR_TRANSLATION_ONOFF 4 1485 1486 1486 - typedef struct { 1487 - snd_ctl_elem_id_t id; /* full control ID definition */ 1487 + struct snd_emu10k1_fx8010_control_gpr { 1488 + struct snd_ctl_elem_id id; /* full control ID definition */ 1488 1489 unsigned int vcount; /* visible count */ 1489 1490 unsigned int count; /* count of GPR (1..16) */ 1490 1491 unsigned short gpr[32]; /* GPR number(s) */ ··· 1492 1493 unsigned int min; /* minimum range */ 1493 1494 unsigned int max; /* maximum range */ 1494 1495 unsigned int translation; /* translation type (EMU10K1_GPR_TRANSLATION*) */ 1495 - } emu10k1_fx8010_control_gpr_t; 1496 + }; 1496 1497 1497 - typedef struct { 1498 + struct snd_emu10k1_fx8010_code { 1498 1499 char name[128]; 1499 1500 1500 1501 DECLARE_BITMAP(gpr_valid, 0x200); /* bitmask of valid initializers */ 1501 1502 u_int32_t __user *gpr_map; /* initializers */ 1502 1503 1503 1504 unsigned int gpr_add_control_count; /* count of GPR controls to add/replace */ 1504 - emu10k1_fx8010_control_gpr_t __user *gpr_add_controls; /* GPR controls to add/replace */ 1505 + struct snd_emu10k1_fx8010_control_gpr __user *gpr_add_controls; /* GPR controls to add/replace */ 1505 1506 1506 1507 unsigned int gpr_del_control_count; /* count of GPR controls to remove */ 1507 - snd_ctl_elem_id_t __user *gpr_del_controls; /* IDs of GPR controls to remove */ 1508 + struct snd_ctl_elem_id __user *gpr_del_controls; /* IDs of GPR controls to remove */ 1508 1509 1509 1510 unsigned int gpr_list_control_count; /* count of GPR controls to list */ 1510 1511 unsigned int gpr_list_control_total; /* total count of GPR controls */ 1511 - emu10k1_fx8010_control_gpr_t __user *gpr_list_controls; /* listed GPR controls */ 1512 + struct snd_emu10k1_fx8010_control_gpr __user *gpr_list_controls; /* listed GPR controls */ 1512 1513 1513 1514 DECLARE_BITMAP(tram_valid, 0x100); /* bitmask of valid initializers */ 1514 1515 u_int32_t __user *tram_data_map; /* data initializers */ ··· 1516 1517 1517 1518 DECLARE_BITMAP(code_valid, 1024); /* bitmask of valid instructions */ 1518 1519 u_int32_t __user *code; /* one instruction - 64 bits */ 1519 - } emu10k1_fx8010_code_t; 1520 + }; 1520 1521 1521 - typedef struct { 1522 + struct snd_emu10k1_fx8010_tram { 1522 1523 unsigned int address; /* 31.bit == 1 -> external TRAM */ 1523 1524 unsigned int size; /* size in samples (4 bytes) */ 1524 1525 unsigned int *samples; /* pointer to samples (20-bit) */ 1525 1526 /* NULL->clear memory */ 1526 - } emu10k1_fx8010_tram_t; 1527 + }; 1527 1528 1528 - typedef struct { 1529 + struct snd_emu10k1_fx8010_pcm_rec { 1529 1530 unsigned int substream; /* substream number */ 1530 1531 unsigned int res1; /* reserved */ 1531 1532 unsigned int channels; /* 16-bit channels count, zero = remove this substream */ ··· 1540 1541 unsigned char pad; /* reserved */ 1541 1542 unsigned char etram[32]; /* external TRAM address & data (one per channel) */ 1542 1543 unsigned int res2; /* reserved */ 1543 - } emu10k1_fx8010_pcm_t; 1544 + }; 1544 1545 1545 - #define SNDRV_EMU10K1_IOCTL_INFO _IOR ('H', 0x10, emu10k1_fx8010_info_t) 1546 - #define SNDRV_EMU10K1_IOCTL_CODE_POKE _IOW ('H', 0x11, emu10k1_fx8010_code_t) 1547 - #define SNDRV_EMU10K1_IOCTL_CODE_PEEK _IOWR('H', 0x12, emu10k1_fx8010_code_t) 1546 + #define SNDRV_EMU10K1_IOCTL_INFO _IOR ('H', 0x10, struct snd_emu10k1_fx8010_info) 1547 + #define SNDRV_EMU10K1_IOCTL_CODE_POKE _IOW ('H', 0x11, struct snd_emu10k1_fx8010_code) 1548 + #define SNDRV_EMU10K1_IOCTL_CODE_PEEK _IOWR('H', 0x12, struct snd_emu10k1_fx8010_code) 1548 1549 #define SNDRV_EMU10K1_IOCTL_TRAM_SETUP _IOW ('H', 0x20, int) 1549 - #define SNDRV_EMU10K1_IOCTL_TRAM_POKE _IOW ('H', 0x21, emu10k1_fx8010_tram_t) 1550 - #define SNDRV_EMU10K1_IOCTL_TRAM_PEEK _IOWR('H', 0x22, emu10k1_fx8010_tram_t) 1551 - #define SNDRV_EMU10K1_IOCTL_PCM_POKE _IOW ('H', 0x30, emu10k1_fx8010_pcm_t) 1552 - #define SNDRV_EMU10K1_IOCTL_PCM_PEEK _IOWR('H', 0x31, emu10k1_fx8010_pcm_t) 1550 + #define SNDRV_EMU10K1_IOCTL_TRAM_POKE _IOW ('H', 0x21, struct snd_emu10k1_fx8010_tram) 1551 + #define SNDRV_EMU10K1_IOCTL_TRAM_PEEK _IOWR('H', 0x22, struct snd_emu10k1_fx8010_tram) 1552 + #define SNDRV_EMU10K1_IOCTL_PCM_POKE _IOW ('H', 0x30, struct snd_emu10k1_fx8010_pcm_rec) 1553 + #define SNDRV_EMU10K1_IOCTL_PCM_PEEK _IOWR('H', 0x31, struct snd_emu10k1_fx8010_pcm_rec) 1553 1554 #define SNDRV_EMU10K1_IOCTL_STOP _IO ('H', 0x80) 1554 1555 #define SNDRV_EMU10K1_IOCTL_CONTINUE _IO ('H', 0x81) 1555 1556 #define SNDRV_EMU10K1_IOCTL_ZERO_TRAM_COUNTER _IO ('H', 0x82) 1556 1557 #define SNDRV_EMU10K1_IOCTL_SINGLE_STEP _IOW ('H', 0x83, int) 1557 1558 #define SNDRV_EMU10K1_IOCTL_DBG_READ _IOR ('H', 0x84, int) 1559 + 1560 + /* typedefs for compatibility to user-space */ 1561 + typedef struct snd_emu10k1_fx8010_info emu10k1_fx8010_info_t; 1562 + typedef struct snd_emu10k1_fx8010_control_gpr emu10k1_fx8010_control_gpr_t; 1563 + typedef struct snd_emu10k1_fx8010_code emu10k1_fx8010_code_t; 1564 + typedef struct snd_emu10k1_fx8010_tram emu10k1_fx8010_tram_t; 1565 + typedef struct snd_emu10k1_fx8010_pcm_rec emu10k1_fx8010_pcm_t; 1558 1566 1559 1567 #endif /* __SOUND_EMU10K1_H */
+3 -3
include/sound/emu10k1_synth.h
··· 27 27 #define SNDRV_SEQ_DEV_ID_EMU10K1_SYNTH "emu10k1-synth" 28 28 29 29 /* argument for snd_seq_device_new */ 30 - typedef struct snd_emu10k1_synth_arg { 31 - emu10k1_t *hwptr; /* chip */ 30 + struct snd_emu10k1_synth_arg { 31 + struct snd_emu10k1 *hwptr; /* chip */ 32 32 int index; /* sequencer client index */ 33 33 int seq_ports; /* number of sequencer ports to be created */ 34 34 int max_voices; /* maximum number of voices for wavetable */ 35 - } snd_emu10k1_synth_arg_t; 35 + }; 36 36 37 37 #define EMU10K1_MAX_MEMSIZE (32 * 1024 * 1024) /* 32MB */ 38 38
+5 -5
sound/pci/emu10k1/emu10k1.c
··· 101 101 const struct pci_device_id *pci_id) 102 102 { 103 103 static int dev; 104 - snd_card_t *card; 105 - emu10k1_t *emu; 104 + struct snd_card *card; 105 + struct snd_emu10k1 *emu; 106 106 #ifdef ENABLE_SYNTH 107 - snd_seq_device_t *wave = NULL; 107 + struct snd_seq_device *wave = NULL; 108 108 #endif 109 109 int err; 110 110 ··· 186 186 } 187 187 #ifdef ENABLE_SYNTH 188 188 if (snd_seq_device_new(card, 1, SNDRV_SEQ_DEV_ID_EMU10K1_SYNTH, 189 - sizeof(snd_emu10k1_synth_arg_t), &wave) < 0 || 189 + sizeof(struct snd_emu10k1_synth_arg), &wave) < 0 || 190 190 wave == NULL) { 191 191 snd_printk(KERN_WARNING "can't initialize Emu10k1 wavetable synth\n"); 192 192 } else { 193 - snd_emu10k1_synth_arg_t *arg; 193 + struct snd_emu10k1_synth_arg *arg; 194 194 arg = SNDRV_SEQ_DEVICE_ARGPTR(wave); 195 195 strcpy(wave->name, "Emu-10k1 Synth"); 196 196 arg->hwptr = emu;
+53 -50
sound/pci/emu10k1/emu10k1_callback.c
··· 27 27 }; 28 28 29 29 /* Keeps track of what we are finding */ 30 - typedef struct best_voice { 30 + struct best_voice { 31 31 unsigned int time; 32 32 int voice; 33 - } best_voice_t; 33 + }; 34 34 35 35 /* 36 36 * prototypes 37 37 */ 38 - static void lookup_voices(snd_emux_t *emu, emu10k1_t *hw, best_voice_t *best, int active_only); 39 - static snd_emux_voice_t *get_voice(snd_emux_t *emu, snd_emux_port_t *port); 40 - static int start_voice(snd_emux_voice_t *vp); 41 - static void trigger_voice(snd_emux_voice_t *vp); 42 - static void release_voice(snd_emux_voice_t *vp); 43 - static void update_voice(snd_emux_voice_t *vp, int update); 44 - static void terminate_voice(snd_emux_voice_t *vp); 45 - static void free_voice(snd_emux_voice_t *vp); 38 + static void lookup_voices(struct snd_emux *emu, struct snd_emu10k1 *hw, 39 + struct best_voice *best, int active_only); 40 + static struct snd_emux_voice *get_voice(struct snd_emux *emu, 41 + struct snd_emux_port *port); 42 + static int start_voice(struct snd_emux_voice *vp); 43 + static void trigger_voice(struct snd_emux_voice *vp); 44 + static void release_voice(struct snd_emux_voice *vp); 45 + static void update_voice(struct snd_emux_voice *vp, int update); 46 + static void terminate_voice(struct snd_emux_voice *vp); 47 + static void free_voice(struct snd_emux_voice *vp); 46 48 47 - static void set_fmmod(emu10k1_t *hw, snd_emux_voice_t *vp); 48 - static void set_fm2frq2(emu10k1_t *hw, snd_emux_voice_t *vp); 49 - static void set_filterQ(emu10k1_t *hw, snd_emux_voice_t *vp); 49 + static void set_fmmod(struct snd_emu10k1 *hw, struct snd_emux_voice *vp); 50 + static void set_fm2frq2(struct snd_emu10k1 *hw, struct snd_emux_voice *vp); 51 + static void set_filterQ(struct snd_emu10k1 *hw, struct snd_emux_voice *vp); 50 52 51 53 /* 52 54 * Ensure a value is between two points ··· 61 59 /* 62 60 * set up operators 63 61 */ 64 - static snd_emux_operators_t emu10k1_ops = { 62 + static struct snd_emux_operators emu10k1_ops = { 65 63 .owner = THIS_MODULE, 66 64 .get_voice = get_voice, 67 65 .prepare = start_voice, ··· 75 73 }; 76 74 77 75 void 78 - snd_emu10k1_ops_setup(snd_emux_t *emu) 76 + snd_emu10k1_ops_setup(struct snd_emux *emu) 79 77 { 80 78 emu->ops = emu10k1_ops; 81 79 } ··· 87 85 * terminate most inactive voice and give it as a pcm voice. 88 86 */ 89 87 int 90 - snd_emu10k1_synth_get_voice(emu10k1_t *hw) 88 + snd_emu10k1_synth_get_voice(struct snd_emu10k1 *hw) 91 89 { 92 - snd_emux_t *emu; 93 - snd_emux_voice_t *vp; 94 - best_voice_t best[V_END]; 90 + struct snd_emux *emu; 91 + struct snd_emux_voice *vp; 92 + struct best_voice best[V_END]; 95 93 unsigned long flags; 96 94 int i; 97 95 ··· 125 123 * turn off the voice (not terminated) 126 124 */ 127 125 static void 128 - release_voice(snd_emux_voice_t *vp) 126 + release_voice(struct snd_emux_voice *vp) 129 127 { 130 128 int dcysusv; 131 - emu10k1_t *hw; 129 + struct snd_emu10k1 *hw; 132 130 133 131 hw = vp->hw; 134 132 dcysusv = 0x8000 | (unsigned char)vp->reg.parm.modrelease; ··· 142 140 * terminate the voice 143 141 */ 144 142 static void 145 - terminate_voice(snd_emux_voice_t *vp) 143 + terminate_voice(struct snd_emux_voice *vp) 146 144 { 147 - emu10k1_t *hw; 145 + struct snd_emu10k1 *hw; 148 146 149 147 snd_assert(vp, return); 150 148 hw = vp->hw; 151 149 snd_emu10k1_ptr_write(hw, DCYSUSV, vp->ch, 0x807f | DCYSUSV_CHANNELENABLE_MASK); 152 150 if (vp->block) { 153 - emu10k1_memblk_t *emem; 154 - emem = (emu10k1_memblk_t *)vp->block; 151 + struct snd_emu10k1_memblk *emem; 152 + emem = (struct snd_emu10k1_memblk *)vp->block; 155 153 if (emem->map_locked > 0) 156 154 emem->map_locked--; 157 155 } ··· 161 159 * release the voice to system 162 160 */ 163 161 static void 164 - free_voice(snd_emux_voice_t *vp) 162 + free_voice(struct snd_emux_voice *vp) 165 163 { 166 - emu10k1_t *hw; 164 + struct snd_emu10k1 *hw; 167 165 168 166 hw = vp->hw; 169 167 if (vp->ch >= 0) { ··· 183 181 * update registers 184 182 */ 185 183 static void 186 - update_voice(snd_emux_voice_t *vp, int update) 184 + update_voice(struct snd_emux_voice *vp, int update) 187 185 { 188 - emu10k1_t *hw; 186 + struct snd_emu10k1 *hw; 189 187 190 188 hw = vp->hw; 191 189 if (update & SNDRV_EMUX_UPDATE_VOLUME) ··· 212 210 */ 213 211 /* spinlock held! */ 214 212 static void 215 - lookup_voices(snd_emux_t *emu, emu10k1_t *hw, best_voice_t *best, int active_only) 213 + lookup_voices(struct snd_emux *emu, struct snd_emu10k1 *hw, 214 + struct best_voice *best, int active_only) 216 215 { 217 - snd_emux_voice_t *vp; 218 - best_voice_t *bp; 216 + struct snd_emux_voice *vp; 217 + struct best_voice *bp; 219 218 int i; 220 219 221 220 for (i = 0; i < V_END; i++) { ··· 277 274 * 278 275 * emu->voice_lock is already held. 279 276 */ 280 - static snd_emux_voice_t * 281 - get_voice(snd_emux_t *emu, snd_emux_port_t *port) 277 + static struct snd_emux_voice * 278 + get_voice(struct snd_emux *emu, struct snd_emux_port *port) 282 279 { 283 - emu10k1_t *hw; 284 - snd_emux_voice_t *vp; 285 - best_voice_t best[V_END]; 280 + struct snd_emu10k1 *hw; 281 + struct snd_emux_voice *vp; 282 + struct best_voice best[V_END]; 286 283 int i; 287 284 288 285 hw = emu->hw; ··· 293 290 vp = &emu->voices[best[i].voice]; 294 291 if (vp->ch < 0) { 295 292 /* allocate a voice */ 296 - emu10k1_voice_t *hwvoice; 293 + struct snd_emu10k1_voice *hwvoice; 297 294 if (snd_emu10k1_voice_alloc(hw, EMU10K1_SYNTH, 1, &hwvoice) < 0 || hwvoice == NULL) 298 295 continue; 299 296 vp->ch = hwvoice->number; ··· 311 308 * prepare envelopes and LFOs 312 309 */ 313 310 static int 314 - start_voice(snd_emux_voice_t *vp) 311 + start_voice(struct snd_emux_voice *vp) 315 312 { 316 313 unsigned int temp; 317 314 int ch; 318 315 unsigned int addr, mapped_offset; 319 - snd_midi_channel_t *chan; 320 - emu10k1_t *hw; 321 - emu10k1_memblk_t *emem; 316 + struct snd_midi_channel *chan; 317 + struct snd_emu10k1 *hw; 318 + struct snd_emu10k1_memblk *emem; 322 319 323 320 hw = vp->hw; 324 321 ch = vp->ch; 325 322 snd_assert(ch >= 0, return -EINVAL); 326 323 chan = vp->chan; 327 324 328 - emem = (emu10k1_memblk_t *)vp->block; 325 + emem = (struct snd_emu10k1_memblk *)vp->block; 329 326 if (emem == NULL) 330 327 return -EINVAL; 331 328 emem->map_locked++; ··· 466 463 * Start envelope 467 464 */ 468 465 static void 469 - trigger_voice(snd_emux_voice_t *vp) 466 + trigger_voice(struct snd_emux_voice *vp) 470 467 { 471 468 unsigned int temp, ptarget; 472 - emu10k1_t *hw; 473 - emu10k1_memblk_t *emem; 469 + struct snd_emu10k1 *hw; 470 + struct snd_emu10k1_memblk *emem; 474 471 475 472 hw = vp->hw; 476 473 477 - emem = (emu10k1_memblk_t *)vp->block; 474 + emem = (struct snd_emu10k1_memblk *)vp->block; 478 475 if (! emem || emem->mapped_page < 0) 479 476 return; /* not mapped */ 480 477 ··· 498 495 499 496 /* set lfo1 modulation height and cutoff */ 500 497 static void 501 - set_fmmod(emu10k1_t *hw, snd_emux_voice_t *vp) 498 + set_fmmod(struct snd_emu10k1 *hw, struct snd_emux_voice *vp) 502 499 { 503 500 unsigned short fmmod; 504 501 short pitch; ··· 516 513 517 514 /* set lfo2 pitch & frequency */ 518 515 static void 519 - set_fm2frq2(emu10k1_t *hw, snd_emux_voice_t *vp) 516 + set_fm2frq2(struct snd_emu10k1 *hw, struct snd_emux_voice *vp) 520 517 { 521 518 unsigned short fm2frq2; 522 519 short pitch; ··· 534 531 535 532 /* set filterQ */ 536 533 static void 537 - set_filterQ(emu10k1_t *hw, snd_emux_voice_t *vp) 534 + set_filterQ(struct snd_emu10k1 *hw, struct snd_emux_voice *vp) 538 535 { 539 536 unsigned int val; 540 537 val = snd_emu10k1_ptr_read(hw, CCCA, vp->ch) & ~CCCA_RESONANCE;
+20 -19
sound/pci/emu10k1/emu10k1_main.c
··· 52 52 * EMU10K1 init / done 53 53 *************************************************************************/ 54 54 55 - void snd_emu10k1_voice_init(emu10k1_t * emu, int ch) 55 + void snd_emu10k1_voice_init(struct snd_emu10k1 * emu, int ch) 56 56 { 57 57 snd_emu10k1_ptr_write(emu, DCYSUSV, ch, 0); 58 58 snd_emu10k1_ptr_write(emu, IP, ch, 0); ··· 97 97 } 98 98 } 99 99 100 - static int __devinit snd_emu10k1_init(emu10k1_t * emu, int enable_ir) 100 + static int __devinit snd_emu10k1_init(struct snd_emu10k1 * emu, int enable_ir) 101 101 { 102 102 int ch, idx, err; 103 103 unsigned int silent_page; ··· 336 336 337 337 snd_emu10k1_intr_enable(emu, INTE_PCIERRORENABLE); 338 338 339 - emu->reserved_page = (emu10k1_memblk_t *)snd_emu10k1_synth_alloc(emu, 4096); 339 + emu->reserved_page = (struct snd_emu10k1_memblk *)snd_emu10k1_synth_alloc(emu, 4096); 340 340 if (emu->reserved_page) 341 341 emu->reserved_page->map_locked = 1; 342 342 343 343 return 0; 344 344 } 345 345 346 - static int snd_emu10k1_done(emu10k1_t * emu) 346 + static int snd_emu10k1_done(struct snd_emu10k1 * emu) 347 347 { 348 348 int ch; 349 349 ··· 384 384 385 385 /* remove reserved page */ 386 386 if (emu->reserved_page != NULL) { 387 - snd_emu10k1_synth_free(emu, (snd_util_memblk_t *)emu->reserved_page); 387 + snd_emu10k1_synth_free(emu, (struct snd_util_memblk *)emu->reserved_page); 388 388 emu->reserved_page = NULL; 389 389 } 390 390 ··· 474 474 * register. 475 475 */ 476 476 477 - static void snd_emu10k1_ecard_write(emu10k1_t * emu, unsigned int value) 477 + static void snd_emu10k1_ecard_write(struct snd_emu10k1 * emu, unsigned int value) 478 478 { 479 479 unsigned short count; 480 480 unsigned int data; ··· 512 512 * channel. 513 513 */ 514 514 515 - static void snd_emu10k1_ecard_setadcgain(emu10k1_t * emu, 515 + static void snd_emu10k1_ecard_setadcgain(struct snd_emu10k1 * emu, 516 516 unsigned short gain) 517 517 { 518 518 unsigned int bit; ··· 540 540 snd_emu10k1_ecard_write(emu, emu->ecard_ctrl); 541 541 } 542 542 543 - static int __devinit snd_emu10k1_ecard_init(emu10k1_t * emu) 543 + static int __devinit snd_emu10k1_ecard_init(struct snd_emu10k1 * emu) 544 544 { 545 545 unsigned int hc_value; 546 546 ··· 580 580 return 0; 581 581 } 582 582 583 - static int __devinit snd_emu10k1_cardbus_init(emu10k1_t * emu) 583 + static int __devinit snd_emu10k1_cardbus_init(struct snd_emu10k1 * emu) 584 584 { 585 585 unsigned long special_port; 586 586 unsigned int value; ··· 609 609 * Create the EMU10K1 instance 610 610 */ 611 611 612 - static int snd_emu10k1_free(emu10k1_t *emu) 612 + static int snd_emu10k1_free(struct snd_emu10k1 *emu) 613 613 { 614 614 if (emu->port) { /* avoid access to already used hardware */ 615 615 snd_emu10k1_fx8010_tram_setup(emu, 0); ··· 634 634 return 0; 635 635 } 636 636 637 - static int snd_emu10k1_dev_free(snd_device_t *device) 637 + static int snd_emu10k1_dev_free(struct snd_device *device) 638 638 { 639 - emu10k1_t *emu = device->device_data; 639 + struct snd_emu10k1 *emu = device->device_data; 640 640 return snd_emu10k1_free(emu); 641 641 } 642 642 643 - static emu_chip_details_t emu_chip_details[] = { 643 + static struct snd_emu_chip_details emu_chip_details[] = { 644 644 /* Audigy 2 Value AC3 out does not work yet. Need to find out how to turn off interpolators.*/ 645 645 /* Tested by James@superbug.co.uk 3rd July 2005 */ 646 646 {.vendor = 0x1102, .device = 0x0008, .subsystem = 0x10011102, ··· 890 890 { } /* terminator */ 891 891 }; 892 892 893 - int __devinit snd_emu10k1_create(snd_card_t * card, 893 + int __devinit snd_emu10k1_create(struct snd_card *card, 894 894 struct pci_dev * pci, 895 895 unsigned short extin_mask, 896 896 unsigned short extout_mask, 897 897 long max_cache_bytes, 898 898 int enable_ir, 899 899 uint subsystem, 900 - emu10k1_t ** remu) 900 + struct snd_emu10k1 ** remu) 901 901 { 902 - emu10k1_t *emu; 902 + struct snd_emu10k1 *emu; 903 903 int err; 904 904 int is_audigy; 905 905 unsigned char revision; 906 - const emu_chip_details_t *c; 907 - static snd_device_ops_t ops = { 906 + const struct snd_emu_chip_details *c; 907 + static struct snd_device_ops ops = { 908 908 .dev_free = snd_emu10k1_dev_free, 909 909 }; 910 910 ··· 1041 1041 snd_emu10k1_free(emu); 1042 1042 return -ENOMEM; 1043 1043 } 1044 - emu->memhdr->block_extra_size = sizeof(emu10k1_memblk_t) - sizeof(snd_util_memblk_t); 1044 + emu->memhdr->block_extra_size = sizeof(struct snd_emu10k1_memblk) - 1045 + sizeof(struct snd_util_memblk); 1045 1046 1046 1047 pci_set_master(pci); 1047 1048
+7 -6
sound/pci/emu10k1/emu10k1_patch.c
··· 35 35 * allocate a sample block and copy data from userspace 36 36 */ 37 37 int 38 - snd_emu10k1_sample_new(snd_emux_t *rec, snd_sf_sample_t *sp, 39 - snd_util_memhdr_t *hdr, const void __user *data, long count) 38 + snd_emu10k1_sample_new(struct snd_emux *rec, struct snd_sf_sample *sp, 39 + struct snd_util_memhdr *hdr, 40 + const void __user *data, long count) 40 41 { 41 42 int offset; 42 43 int truesize, size, loopsize, blocksize; 43 44 int loopend, sampleend; 44 45 unsigned int start_addr; 45 - emu10k1_t *emu; 46 + struct snd_emu10k1 *emu; 46 47 47 48 emu = rec->hw; 48 49 snd_assert(sp != NULL, return -EINVAL); ··· 206 205 * free a sample block 207 206 */ 208 207 int 209 - snd_emu10k1_sample_free(snd_emux_t *rec, snd_sf_sample_t *sp, 210 - snd_util_memhdr_t *hdr) 208 + snd_emu10k1_sample_free(struct snd_emux *rec, struct snd_sf_sample *sp, 209 + struct snd_util_memhdr *hdr) 211 210 { 212 - emu10k1_t *emu; 211 + struct snd_emu10k1 *emu; 213 212 214 213 emu = rec->hw; 215 214 snd_assert(sp != NULL, return -EINVAL);
+10 -9
sound/pci/emu10k1/emu10k1_synth.c
··· 28 28 /* 29 29 * create a new hardware dependent device for Emu10k1 30 30 */ 31 - static int snd_emu10k1_synth_new_device(snd_seq_device_t *dev) 31 + static int snd_emu10k1_synth_new_device(struct snd_seq_device *dev) 32 32 { 33 - snd_emux_t *emu; 34 - emu10k1_t *hw; 35 - snd_emu10k1_synth_arg_t *arg; 33 + struct snd_emux *emu; 34 + struct snd_emu10k1 *hw; 35 + struct snd_emu10k1_synth_arg *arg; 36 36 unsigned long flags; 37 37 38 38 arg = SNDRV_SEQ_DEVICE_ARGPTR(dev); ··· 76 76 return 0; 77 77 } 78 78 79 - static int snd_emu10k1_synth_delete_device(snd_seq_device_t *dev) 79 + static int snd_emu10k1_synth_delete_device(struct snd_seq_device *dev) 80 80 { 81 - snd_emux_t *emu; 82 - emu10k1_t *hw; 81 + struct snd_emux *emu; 82 + struct snd_emu10k1 *hw; 83 83 unsigned long flags; 84 84 85 85 if (dev->driver_data == NULL) ··· 104 104 static int __init alsa_emu10k1_synth_init(void) 105 105 { 106 106 107 - static snd_seq_dev_ops_t ops = { 107 + static struct snd_seq_dev_ops ops = { 108 108 snd_emu10k1_synth_new_device, 109 109 snd_emu10k1_synth_delete_device, 110 110 }; 111 - return snd_seq_device_register_driver(SNDRV_SEQ_DEV_ID_EMU10K1_SYNTH, &ops, sizeof(snd_emu10k1_synth_arg_t)); 111 + return snd_seq_device_register_driver(SNDRV_SEQ_DEV_ID_EMU10K1_SYNTH, &ops, 112 + sizeof(struct snd_emu10k1_synth_arg)); 112 113 } 113 114 114 115 static void __exit alsa_emu10k1_synth_exit(void)
+10 -5
sound/pci/emu10k1/emu10k1_synth_local.h
··· 26 26 #include <sound/emu10k1_synth.h> 27 27 28 28 /* emu10k1_patch.c */ 29 - int snd_emu10k1_sample_new(snd_emux_t *private_data, snd_sf_sample_t *sp, snd_util_memhdr_t *hdr, const void __user *_data, long count); 30 - int snd_emu10k1_sample_free(snd_emux_t *private_data, snd_sf_sample_t *sp, snd_util_memhdr_t *hdr); 31 - int snd_emu10k1_memhdr_init(snd_emux_t *emu); 29 + int snd_emu10k1_sample_new(struct snd_emux *private_data, 30 + struct snd_sf_sample *sp, 31 + struct snd_util_memhdr *hdr, 32 + const void __user *_data, long count); 33 + int snd_emu10k1_sample_free(struct snd_emux *private_data, 34 + struct snd_sf_sample *sp, 35 + struct snd_util_memhdr *hdr); 36 + int snd_emu10k1_memhdr_init(struct snd_emux *emu); 32 37 33 38 /* emu10k1_callback.c */ 34 - void snd_emu10k1_ops_setup(snd_emux_t *emu); 35 - int snd_emu10k1_synth_get_voice(emu10k1_t *hw); 39 + void snd_emu10k1_ops_setup(struct snd_emux *emu); 40 + int snd_emu10k1_synth_get_voice(struct snd_emu10k1 *hw); 36 41 37 42 38 43 #endif /* __EMU10K1_SYNTH_LOCAL_H */
+140 -104
sound/pci/emu10k1/emufx.c
··· 309 309 * controls 310 310 */ 311 311 312 - static int snd_emu10k1_gpr_ctl_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) 312 + static int snd_emu10k1_gpr_ctl_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) 313 313 { 314 - snd_emu10k1_fx8010_ctl_t *ctl = (snd_emu10k1_fx8010_ctl_t *)kcontrol->private_value; 314 + struct snd_emu10k1_fx8010_ctl *ctl = 315 + (struct snd_emu10k1_fx8010_ctl *) kcontrol->private_value; 315 316 316 317 if (ctl->min == 0 && ctl->max == 1) 317 318 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; ··· 324 323 return 0; 325 324 } 326 325 327 - static int snd_emu10k1_gpr_ctl_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 326 + static int snd_emu10k1_gpr_ctl_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 328 327 { 329 - emu10k1_t *emu = snd_kcontrol_chip(kcontrol); 330 - snd_emu10k1_fx8010_ctl_t *ctl = (snd_emu10k1_fx8010_ctl_t *)kcontrol->private_value; 328 + struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol); 329 + struct snd_emu10k1_fx8010_ctl *ctl = 330 + (struct snd_emu10k1_fx8010_ctl *) kcontrol->private_value; 331 331 unsigned long flags; 332 332 unsigned int i; 333 333 ··· 339 337 return 0; 340 338 } 341 339 342 - static int snd_emu10k1_gpr_ctl_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 340 + static int snd_emu10k1_gpr_ctl_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 343 341 { 344 - emu10k1_t *emu = snd_kcontrol_chip(kcontrol); 345 - snd_emu10k1_fx8010_ctl_t *ctl = (snd_emu10k1_fx8010_ctl_t *)kcontrol->private_value; 342 + struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol); 343 + struct snd_emu10k1_fx8010_ctl *ctl = 344 + (struct snd_emu10k1_fx8010_ctl *) kcontrol->private_value; 346 345 unsigned long flags; 347 346 unsigned int nval, val; 348 347 unsigned int i, j; ··· 396 393 * Interrupt handler 397 394 */ 398 395 399 - static void snd_emu10k1_fx8010_interrupt(emu10k1_t *emu) 396 + static void snd_emu10k1_fx8010_interrupt(struct snd_emu10k1 *emu) 400 397 { 401 - snd_emu10k1_fx8010_irq_t *irq, *nirq; 398 + struct snd_emu10k1_fx8010_irq *irq, *nirq; 402 399 403 400 irq = emu->fx8010.irq_handlers; 404 401 while (irq) { ··· 412 409 } 413 410 } 414 411 415 - int snd_emu10k1_fx8010_register_irq_handler(emu10k1_t *emu, 416 - snd_fx8010_irq_handler_t *handler, 417 - unsigned char gpr_running, 418 - void *private_data, 419 - snd_emu10k1_fx8010_irq_t **r_irq) 412 + int snd_emu10k1_fx8010_register_irq_handler(struct snd_emu10k1 *emu, 413 + snd_fx8010_irq_handler_t *handler, 414 + unsigned char gpr_running, 415 + void *private_data, 416 + struct snd_emu10k1_fx8010_irq **r_irq) 420 417 { 421 - snd_emu10k1_fx8010_irq_t *irq; 418 + struct snd_emu10k1_fx8010_irq *irq; 422 419 unsigned long flags; 423 420 424 421 irq = kmalloc(sizeof(*irq), GFP_ATOMIC); ··· 443 440 return 0; 444 441 } 445 442 446 - int snd_emu10k1_fx8010_unregister_irq_handler(emu10k1_t *emu, 447 - snd_emu10k1_fx8010_irq_t *irq) 443 + int snd_emu10k1_fx8010_unregister_irq_handler(struct snd_emu10k1 *emu, 444 + struct snd_emu10k1_fx8010_irq *irq) 448 445 { 449 - snd_emu10k1_fx8010_irq_t *tmp; 446 + struct snd_emu10k1_fx8010_irq *tmp; 450 447 unsigned long flags; 451 448 452 449 spin_lock_irqsave(&emu->fx8010.irq_lock, flags); ··· 471 468 * EMU10K1 effect manager 472 469 *************************************************************************/ 473 470 474 - static void snd_emu10k1_write_op(emu10k1_fx8010_code_t *icode, unsigned int *ptr, 471 + static void snd_emu10k1_write_op(struct snd_emu10k1_fx8010_code *icode, 472 + unsigned int *ptr, 475 473 u32 op, u32 r, u32 a, u32 x, u32 y) 476 474 { 477 475 u_int32_t *code; ··· 487 483 #define OP(icode, ptr, op, r, a, x, y) \ 488 484 snd_emu10k1_write_op(icode, ptr, op, r, a, x, y) 489 485 490 - static void snd_emu10k1_audigy_write_op(emu10k1_fx8010_code_t *icode, unsigned int *ptr, 486 + static void snd_emu10k1_audigy_write_op(struct snd_emu10k1_fx8010_code *icode, 487 + unsigned int *ptr, 491 488 u32 op, u32 r, u32 a, u32 x, u32 y) 492 489 { 493 490 u_int32_t *code; ··· 503 498 #define A_OP(icode, ptr, op, r, a, x, y) \ 504 499 snd_emu10k1_audigy_write_op(icode, ptr, op, r, a, x, y) 505 500 506 - static void snd_emu10k1_efx_write(emu10k1_t *emu, unsigned int pc, unsigned int data) 501 + static void snd_emu10k1_efx_write(struct snd_emu10k1 *emu, unsigned int pc, unsigned int data) 507 502 { 508 503 pc += emu->audigy ? A_MICROCODEBASE : MICROCODEBASE; 509 504 snd_emu10k1_ptr_write(emu, pc, 0, data); 510 505 } 511 506 512 - unsigned int snd_emu10k1_efx_read(emu10k1_t *emu, unsigned int pc) 507 + unsigned int snd_emu10k1_efx_read(struct snd_emu10k1 *emu, unsigned int pc) 513 508 { 514 509 pc += emu->audigy ? A_MICROCODEBASE : MICROCODEBASE; 515 510 return snd_emu10k1_ptr_read(emu, pc, 0); 516 511 } 517 512 518 - static int snd_emu10k1_gpr_poke(emu10k1_t *emu, emu10k1_fx8010_code_t *icode) 513 + static int snd_emu10k1_gpr_poke(struct snd_emu10k1 *emu, 514 + struct snd_emu10k1_fx8010_code *icode) 519 515 { 520 516 int gpr; 521 517 u32 val; ··· 531 525 return 0; 532 526 } 533 527 534 - static int snd_emu10k1_gpr_peek(emu10k1_t *emu, emu10k1_fx8010_code_t *icode) 528 + static int snd_emu10k1_gpr_peek(struct snd_emu10k1 *emu, 529 + struct snd_emu10k1_fx8010_code *icode) 535 530 { 536 531 int gpr; 537 532 u32 val; ··· 546 539 return 0; 547 540 } 548 541 549 - static int snd_emu10k1_tram_poke(emu10k1_t *emu, emu10k1_fx8010_code_t *icode) 542 + static int snd_emu10k1_tram_poke(struct snd_emu10k1 *emu, 543 + struct snd_emu10k1_fx8010_code *icode) 550 544 { 551 545 int tram; 552 546 u32 addr, val; ··· 569 561 return 0; 570 562 } 571 563 572 - static int snd_emu10k1_tram_peek(emu10k1_t *emu, emu10k1_fx8010_code_t *icode) 564 + static int snd_emu10k1_tram_peek(struct snd_emu10k1 *emu, 565 + struct snd_emu10k1_fx8010_code *icode) 573 566 { 574 567 int tram; 575 568 u32 val, addr; ··· 592 583 return 0; 593 584 } 594 585 595 - static int snd_emu10k1_code_poke(emu10k1_t *emu, emu10k1_fx8010_code_t *icode) 586 + static int snd_emu10k1_code_poke(struct snd_emu10k1 *emu, 587 + struct snd_emu10k1_fx8010_code *icode) 596 588 { 597 589 u32 pc, lo, hi; 598 590 ··· 609 599 return 0; 610 600 } 611 601 612 - static int snd_emu10k1_code_peek(emu10k1_t *emu, emu10k1_fx8010_code_t *icode) 602 + static int snd_emu10k1_code_peek(struct snd_emu10k1 *emu, 603 + struct snd_emu10k1_fx8010_code *icode) 613 604 { 614 605 u32 pc; 615 606 ··· 625 614 return 0; 626 615 } 627 616 628 - static snd_emu10k1_fx8010_ctl_t *snd_emu10k1_look_for_ctl(emu10k1_t *emu, snd_ctl_elem_id_t *id) 617 + static struct snd_emu10k1_fx8010_ctl * 618 + snd_emu10k1_look_for_ctl(struct snd_emu10k1 *emu, struct snd_ctl_elem_id *id) 629 619 { 630 - snd_emu10k1_fx8010_ctl_t *ctl; 631 - snd_kcontrol_t *kcontrol; 620 + struct snd_emu10k1_fx8010_ctl *ctl; 621 + struct snd_kcontrol *kcontrol; 632 622 struct list_head *list; 633 623 634 624 list_for_each(list, &emu->fx8010.gpr_ctl) { ··· 643 631 return NULL; 644 632 } 645 633 646 - static int snd_emu10k1_verify_controls(emu10k1_t *emu, emu10k1_fx8010_code_t *icode) 634 + static int snd_emu10k1_verify_controls(struct snd_emu10k1 *emu, 635 + struct snd_emu10k1_fx8010_code *icode) 647 636 { 648 637 unsigned int i; 649 - snd_ctl_elem_id_t __user *_id; 650 - snd_ctl_elem_id_t id; 651 - emu10k1_fx8010_control_gpr_t __user *_gctl; 652 - emu10k1_fx8010_control_gpr_t *gctl; 638 + struct snd_ctl_elem_id __user *_id; 639 + struct snd_ctl_elem_id id; 640 + struct snd_emu10k1_fx8010_control_gpr __user *_gctl; 641 + struct snd_emu10k1_fx8010_control_gpr *gctl; 653 642 int err; 654 643 655 644 for (i = 0, _id = icode->gpr_del_controls; ··· 698 685 return err; 699 686 } 700 687 701 - static void snd_emu10k1_ctl_private_free(snd_kcontrol_t *kctl) 688 + static void snd_emu10k1_ctl_private_free(struct snd_kcontrol *kctl) 702 689 { 703 - snd_emu10k1_fx8010_ctl_t *ctl; 690 + struct snd_emu10k1_fx8010_ctl *ctl; 704 691 705 - ctl = (snd_emu10k1_fx8010_ctl_t *)kctl->private_value; 692 + ctl = (struct snd_emu10k1_fx8010_ctl *) kctl->private_value; 706 693 kctl->private_value = 0; 707 694 list_del(&ctl->list); 708 695 kfree(ctl); 709 696 } 710 697 711 - static int snd_emu10k1_add_controls(emu10k1_t *emu, emu10k1_fx8010_code_t *icode) 698 + static int snd_emu10k1_add_controls(struct snd_emu10k1 *emu, 699 + struct snd_emu10k1_fx8010_code *icode) 712 700 { 713 701 unsigned int i, j; 714 - emu10k1_fx8010_control_gpr_t __user *_gctl; 715 - emu10k1_fx8010_control_gpr_t *gctl; 716 - snd_emu10k1_fx8010_ctl_t *ctl, *nctl; 717 - snd_kcontrol_new_t knew; 718 - snd_kcontrol_t *kctl; 719 - snd_ctl_elem_value_t *val; 702 + struct snd_emu10k1_fx8010_control_gpr __user *_gctl; 703 + struct snd_emu10k1_fx8010_control_gpr *gctl; 704 + struct snd_emu10k1_fx8010_ctl *ctl, *nctl; 705 + struct snd_kcontrol_new knew; 706 + struct snd_kcontrol *kctl; 707 + struct snd_ctl_elem_value *val; 720 708 int err = 0; 721 709 722 - val = (snd_ctl_elem_value_t *)kmalloc(sizeof(*val), GFP_KERNEL); 710 + val = kmalloc(sizeof(*val), GFP_KERNEL); 723 711 gctl = kmalloc(sizeof(*gctl), GFP_KERNEL); 724 712 nctl = kmalloc(sizeof(*nctl), GFP_KERNEL); 725 713 if (!val || !gctl || !nctl) { ··· 765 751 nctl->max = gctl->max; 766 752 nctl->translation = gctl->translation; 767 753 if (ctl == NULL) { 768 - ctl = (snd_emu10k1_fx8010_ctl_t *)kmalloc(sizeof(*ctl), GFP_KERNEL); 754 + ctl = kmalloc(sizeof(*ctl), GFP_KERNEL); 769 755 if (ctl == NULL) { 770 756 err = -ENOMEM; 771 757 goto __error; ··· 796 782 return err; 797 783 } 798 784 799 - static int snd_emu10k1_del_controls(emu10k1_t *emu, emu10k1_fx8010_code_t *icode) 785 + static int snd_emu10k1_del_controls(struct snd_emu10k1 *emu, 786 + struct snd_emu10k1_fx8010_code *icode) 800 787 { 801 788 unsigned int i; 802 - snd_ctl_elem_id_t id; 803 - snd_ctl_elem_id_t __user *_id; 804 - snd_emu10k1_fx8010_ctl_t *ctl; 805 - snd_card_t *card = emu->card; 789 + struct snd_ctl_elem_id id; 790 + struct snd_ctl_elem_id __user *_id; 791 + struct snd_emu10k1_fx8010_ctl *ctl; 792 + struct snd_card *card = emu->card; 806 793 807 794 for (i = 0, _id = icode->gpr_del_controls; 808 795 i < icode->gpr_del_control_count; i++, _id++) { ··· 818 803 return 0; 819 804 } 820 805 821 - static int snd_emu10k1_list_controls(emu10k1_t *emu, emu10k1_fx8010_code_t *icode) 806 + static int snd_emu10k1_list_controls(struct snd_emu10k1 *emu, 807 + struct snd_emu10k1_fx8010_code *icode) 822 808 { 823 809 unsigned int i = 0, j; 824 810 unsigned int total = 0; 825 - emu10k1_fx8010_control_gpr_t *gctl; 826 - emu10k1_fx8010_control_gpr_t __user *_gctl; 827 - snd_emu10k1_fx8010_ctl_t *ctl; 828 - snd_ctl_elem_id_t *id; 811 + struct snd_emu10k1_fx8010_control_gpr *gctl; 812 + struct snd_emu10k1_fx8010_control_gpr __user *_gctl; 813 + struct snd_emu10k1_fx8010_ctl *ctl; 814 + struct snd_ctl_elem_id *id; 829 815 struct list_head *list; 830 816 831 817 gctl = kmalloc(sizeof(*gctl), GFP_KERNEL); ··· 867 851 return 0; 868 852 } 869 853 870 - static int snd_emu10k1_icode_poke(emu10k1_t *emu, emu10k1_fx8010_code_t *icode) 854 + static int snd_emu10k1_icode_poke(struct snd_emu10k1 *emu, 855 + struct snd_emu10k1_fx8010_code *icode) 871 856 { 872 857 int err = 0; 873 858 ··· 899 882 return err; 900 883 } 901 884 902 - static int snd_emu10k1_icode_peek(emu10k1_t *emu, emu10k1_fx8010_code_t *icode) 885 + static int snd_emu10k1_icode_peek(struct snd_emu10k1 *emu, 886 + struct snd_emu10k1_fx8010_code *icode) 903 887 { 904 888 int err; 905 889 ··· 918 900 return err; 919 901 } 920 902 921 - static int snd_emu10k1_ipcm_poke(emu10k1_t *emu, emu10k1_fx8010_pcm_t *ipcm) 903 + static int snd_emu10k1_ipcm_poke(struct snd_emu10k1 *emu, 904 + struct snd_emu10k1_fx8010_pcm_rec *ipcm) 922 905 { 923 906 unsigned int i; 924 907 int err = 0; 925 - snd_emu10k1_fx8010_pcm_t *pcm; 908 + struct snd_emu10k1_fx8010_pcm *pcm; 926 909 927 910 if (ipcm->substream >= EMU10K1_FX8010_PCM_COUNT) 928 911 return -EINVAL; ··· 964 945 return err; 965 946 } 966 947 967 - static int snd_emu10k1_ipcm_peek(emu10k1_t *emu, emu10k1_fx8010_pcm_t *ipcm) 948 + static int snd_emu10k1_ipcm_peek(struct snd_emu10k1 *emu, 949 + struct snd_emu10k1_fx8010_pcm_rec *ipcm) 968 950 { 969 951 unsigned int i; 970 952 int err = 0; 971 - snd_emu10k1_fx8010_pcm_t *pcm; 953 + struct snd_emu10k1_fx8010_pcm *pcm; 972 954 973 955 if (ipcm->substream >= EMU10K1_FX8010_PCM_COUNT) 974 956 return -EINVAL; ··· 999 979 #define SND_EMU10K1_PLAYBACK_CHANNELS 8 1000 980 #define SND_EMU10K1_CAPTURE_CHANNELS 4 1001 981 1002 - static void __devinit snd_emu10k1_init_mono_control(emu10k1_fx8010_control_gpr_t *ctl, const char *name, int gpr, int defval) 982 + static void __devinit 983 + snd_emu10k1_init_mono_control(struct snd_emu10k1_fx8010_control_gpr *ctl, 984 + const char *name, int gpr, int defval) 1003 985 { 1004 986 ctl->id.iface = SNDRV_CTL_ELEM_IFACE_MIXER; 1005 987 strcpy(ctl->id.name, name); ··· 1012 990 ctl->translation = EMU10K1_GPR_TRANSLATION_TABLE100; 1013 991 } 1014 992 1015 - static void __devinit snd_emu10k1_init_stereo_control(emu10k1_fx8010_control_gpr_t *ctl, const char *name, int gpr, int defval) 993 + static void __devinit 994 + snd_emu10k1_init_stereo_control(struct snd_emu10k1_fx8010_control_gpr *ctl, 995 + const char *name, int gpr, int defval) 1016 996 { 1017 997 ctl->id.iface = SNDRV_CTL_ELEM_IFACE_MIXER; 1018 998 strcpy(ctl->id.name, name); ··· 1026 1002 ctl->translation = EMU10K1_GPR_TRANSLATION_TABLE100; 1027 1003 } 1028 1004 1029 - static void __devinit snd_emu10k1_init_mono_onoff_control(emu10k1_fx8010_control_gpr_t *ctl, const char *name, int gpr, int defval) 1005 + static void __devinit 1006 + snd_emu10k1_init_mono_onoff_control(struct snd_emu10k1_fx8010_control_gpr *ctl, 1007 + const char *name, int gpr, int defval) 1030 1008 { 1031 1009 ctl->id.iface = SNDRV_CTL_ELEM_IFACE_MIXER; 1032 1010 strcpy(ctl->id.name, name); ··· 1039 1013 ctl->translation = EMU10K1_GPR_TRANSLATION_ONOFF; 1040 1014 } 1041 1015 1042 - static void __devinit snd_emu10k1_init_stereo_onoff_control(emu10k1_fx8010_control_gpr_t *ctl, const char *name, int gpr, int defval) 1016 + static void __devinit 1017 + snd_emu10k1_init_stereo_onoff_control(struct snd_emu10k1_fx8010_control_gpr *ctl, 1018 + const char *name, int gpr, int defval) 1043 1019 { 1044 1020 ctl->id.iface = SNDRV_CTL_ELEM_IFACE_MIXER; 1045 1021 strcpy(ctl->id.name, name); ··· 1058 1030 * initial DSP configuration for Audigy 1059 1031 */ 1060 1032 1061 - static int __devinit _snd_emu10k1_audigy_init_efx(emu10k1_t *emu) 1033 + static int __devinit _snd_emu10k1_audigy_init_efx(struct snd_emu10k1 *emu) 1062 1034 { 1063 1035 int err, i, z, gpr, nctl; 1064 1036 const int playback = 10; ··· 1066 1038 const int stereo_mix = capture + 2; 1067 1039 const int tmp = 0x88; 1068 1040 u32 ptr; 1069 - emu10k1_fx8010_code_t *icode = NULL; 1070 - emu10k1_fx8010_control_gpr_t *controls = NULL, *ctl; 1041 + struct snd_emu10k1_fx8010_code *icode = NULL; 1042 + struct snd_emu10k1_fx8010_control_gpr *controls = NULL, *ctl; 1071 1043 u32 *gpr_map; 1072 1044 mm_segment_t seg; 1073 1045 ··· 1075 1047 INIT_LIST_HEAD(&emu->fx8010.gpr_ctl); 1076 1048 1077 1049 if ((icode = kzalloc(sizeof(*icode), GFP_KERNEL)) == NULL || 1078 - (icode->gpr_map = (u_int32_t __user *)kcalloc(512 + 256 + 256 + 2 * 1024, sizeof(u_int32_t), GFP_KERNEL)) == NULL || 1079 - (controls = kcalloc(SND_EMU10K1_GPR_CONTROLS, sizeof(*controls), GFP_KERNEL)) == NULL) { 1050 + (icode->gpr_map = (u_int32_t __user *) 1051 + kcalloc(512 + 256 + 256 + 2 * 1024, sizeof(u_int32_t), 1052 + GFP_KERNEL)) == NULL || 1053 + (controls = kcalloc(SND_EMU10K1_GPR_CONTROLS, 1054 + sizeof(*controls), GFP_KERNEL)) == NULL) { 1080 1055 err = -ENOMEM; 1081 1056 goto __err; 1082 1057 } ··· 1465 1434 1466 1435 seg = snd_enter_user(); 1467 1436 icode->gpr_add_control_count = nctl; 1468 - icode->gpr_add_controls = (emu10k1_fx8010_control_gpr_t __user *)controls; 1437 + icode->gpr_add_controls = (struct snd_emu10k1_fx8010_control_gpr __user *)controls; 1469 1438 err = snd_emu10k1_icode_poke(emu, icode); 1470 1439 snd_leave_user(seg); 1471 1440 ··· 1485 1454 1486 1455 /* when volume = max, then copy only to avoid volume modification */ 1487 1456 /* with iMAC0 (negative values) */ 1488 - static void __devinit _volume(emu10k1_fx8010_code_t *icode, u32 *ptr, u32 dst, u32 src, u32 vol) 1457 + static void __devinit _volume(struct snd_emu10k1_fx8010_code *icode, u32 *ptr, u32 dst, u32 src, u32 vol) 1489 1458 { 1490 1459 OP(icode, ptr, iMAC0, dst, C_00000000, src, vol); 1491 1460 OP(icode, ptr, iANDXOR, C_00000000, vol, C_ffffffff, C_7fffffff); 1492 1461 OP(icode, ptr, iSKIP, GPR_COND, GPR_COND, CC_REG_NONZERO, C_00000001); 1493 1462 OP(icode, ptr, iACC3, dst, src, C_00000000, C_00000000); 1494 1463 } 1495 - static void __devinit _volume_add(emu10k1_fx8010_code_t *icode, u32 *ptr, u32 dst, u32 src, u32 vol) 1464 + static void __devinit _volume_add(struct snd_emu10k1_fx8010_code *icode, u32 *ptr, u32 dst, u32 src, u32 vol) 1496 1465 { 1497 1466 OP(icode, ptr, iANDXOR, C_00000000, vol, C_ffffffff, C_7fffffff); 1498 1467 OP(icode, ptr, iSKIP, GPR_COND, GPR_COND, CC_REG_NONZERO, C_00000002); ··· 1500 1469 OP(icode, ptr, iSKIP, C_00000000, C_7fffffff, C_7fffffff, C_00000001); 1501 1470 OP(icode, ptr, iMAC0, dst, dst, src, vol); 1502 1471 } 1503 - static void __devinit _volume_out(emu10k1_fx8010_code_t *icode, u32 *ptr, u32 dst, u32 src, u32 vol) 1472 + static void __devinit _volume_out(struct snd_emu10k1_fx8010_code *icode, u32 *ptr, u32 dst, u32 src, u32 vol) 1504 1473 { 1505 1474 OP(icode, ptr, iANDXOR, C_00000000, vol, C_ffffffff, C_7fffffff); 1506 1475 OP(icode, ptr, iSKIP, GPR_COND, GPR_COND, CC_REG_NONZERO, C_00000002); ··· 1531 1500 _SWITCH_NEG(icode, ptr, GPR(dst), GPR(src)) 1532 1501 1533 1502 1534 - static int __devinit _snd_emu10k1_init_efx(emu10k1_t *emu) 1503 + static int __devinit _snd_emu10k1_init_efx(struct snd_emu10k1 *emu) 1535 1504 { 1536 1505 int err, i, z, gpr, tmp, playback, capture; 1537 1506 u32 ptr; 1538 - emu10k1_fx8010_code_t *icode; 1539 - emu10k1_fx8010_pcm_t *ipcm = NULL; 1540 - emu10k1_fx8010_control_gpr_t *controls = NULL, *ctl; 1507 + struct snd_emu10k1_fx8010_code *icode; 1508 + struct snd_emu10k1_fx8010_pcm_rec *ipcm = NULL; 1509 + struct snd_emu10k1_fx8010_control_gpr *controls = NULL, *ctl; 1541 1510 u32 *gpr_map; 1542 1511 mm_segment_t seg; 1543 1512 ··· 1546 1515 1547 1516 if ((icode = kzalloc(sizeof(*icode), GFP_KERNEL)) == NULL) 1548 1517 return -ENOMEM; 1549 - if ((icode->gpr_map = (u_int32_t __user *)kcalloc(256 + 160 + 160 + 2 * 512, sizeof(u_int32_t), GFP_KERNEL)) == NULL || 1550 - (controls = kcalloc(SND_EMU10K1_GPR_CONTROLS, sizeof(emu10k1_fx8010_control_gpr_t), GFP_KERNEL)) == NULL || 1518 + if ((icode->gpr_map = (u_int32_t __user *) 1519 + kcalloc(256 + 160 + 160 + 2 * 512, sizeof(u_int32_t), 1520 + GFP_KERNEL)) == NULL || 1521 + (controls = kcalloc(SND_EMU10K1_GPR_CONTROLS, 1522 + sizeof(struct snd_emu10k1_fx8010_control_gpr), 1523 + GFP_KERNEL)) == NULL || 1551 1524 (ipcm = kzalloc(sizeof(*ipcm), GFP_KERNEL)) == NULL) { 1552 1525 err = -ENOMEM; 1553 1526 goto __err; ··· 2085 2050 goto __err; 2086 2051 seg = snd_enter_user(); 2087 2052 icode->gpr_add_control_count = i; 2088 - icode->gpr_add_controls = (emu10k1_fx8010_control_gpr_t __user *)controls; 2053 + icode->gpr_add_controls = (struct snd_emu10k1_fx8010_control_gpr __user *)controls; 2089 2054 err = snd_emu10k1_icode_poke(emu, icode); 2090 2055 snd_leave_user(seg); 2091 2056 if (err >= 0) ··· 2100 2065 return err; 2101 2066 } 2102 2067 2103 - int __devinit snd_emu10k1_init_efx(emu10k1_t *emu) 2068 + int __devinit snd_emu10k1_init_efx(struct snd_emu10k1 *emu) 2104 2069 { 2105 2070 if (emu->audigy) 2106 2071 return _snd_emu10k1_audigy_init_efx(emu); ··· 2108 2073 return _snd_emu10k1_init_efx(emu); 2109 2074 } 2110 2075 2111 - void snd_emu10k1_free_efx(emu10k1_t *emu) 2076 + void snd_emu10k1_free_efx(struct snd_emu10k1 *emu) 2112 2077 { 2113 2078 /* stop processor */ 2114 2079 if (emu->audigy) ··· 2118 2083 } 2119 2084 2120 2085 #if 0 // FIXME: who use them? 2121 - int snd_emu10k1_fx8010_tone_control_activate(emu10k1_t *emu, int output) 2086 + int snd_emu10k1_fx8010_tone_control_activate(struct snd_emu10k1 *emu, int output) 2122 2087 { 2123 2088 if (output < 0 || output >= 6) 2124 2089 return -EINVAL; ··· 2126 2091 return 0; 2127 2092 } 2128 2093 2129 - int snd_emu10k1_fx8010_tone_control_deactivate(emu10k1_t *emu, int output) 2094 + int snd_emu10k1_fx8010_tone_control_deactivate(struct snd_emu10k1 *emu, int output) 2130 2095 { 2131 2096 if (output < 0 || output >= 6) 2132 2097 return -EINVAL; ··· 2135 2100 } 2136 2101 #endif 2137 2102 2138 - int snd_emu10k1_fx8010_tram_setup(emu10k1_t *emu, u32 size) 2103 + int snd_emu10k1_fx8010_tram_setup(struct snd_emu10k1 *emu, u32 size) 2139 2104 { 2140 2105 u8 size_reg = 0; 2141 2106 ··· 2177 2142 return 0; 2178 2143 } 2179 2144 2180 - static int snd_emu10k1_fx8010_open(snd_hwdep_t * hw, struct file *file) 2145 + static int snd_emu10k1_fx8010_open(struct snd_hwdep * hw, struct file *file) 2181 2146 { 2182 2147 return 0; 2183 2148 } ··· 2190 2155 strcpy(dst, src); 2191 2156 } 2192 2157 2193 - static int snd_emu10k1_fx8010_info(emu10k1_t *emu, emu10k1_fx8010_info_t *info) 2158 + static int snd_emu10k1_fx8010_info(struct snd_emu10k1 *emu, 2159 + struct snd_emu10k1_fx8010_info *info) 2194 2160 { 2195 2161 char **fxbus, **extin, **extout; 2196 2162 unsigned short fxbus_mask, extin_mask, extout_mask; ··· 2217 2181 return 0; 2218 2182 } 2219 2183 2220 - static int snd_emu10k1_fx8010_ioctl(snd_hwdep_t * hw, struct file *file, unsigned int cmd, unsigned long arg) 2184 + static int snd_emu10k1_fx8010_ioctl(struct snd_hwdep * hw, struct file *file, unsigned int cmd, unsigned long arg) 2221 2185 { 2222 - emu10k1_t *emu = hw->private_data; 2223 - emu10k1_fx8010_info_t *info; 2224 - emu10k1_fx8010_code_t *icode; 2225 - emu10k1_fx8010_pcm_t *ipcm; 2186 + struct snd_emu10k1 *emu = hw->private_data; 2187 + struct snd_emu10k1_fx8010_info *info; 2188 + struct snd_emu10k1_fx8010_code *icode; 2189 + struct snd_emu10k1_fx8010_pcm_rec *ipcm; 2226 2190 unsigned int addr; 2227 2191 void __user *argp = (void __user *)arg; 2228 2192 int res; 2229 2193 2230 2194 switch (cmd) { 2231 2195 case SNDRV_EMU10K1_IOCTL_INFO: 2232 - info = (emu10k1_fx8010_info_t *)kmalloc(sizeof(*info), GFP_KERNEL); 2196 + info = kmalloc(sizeof(*info), GFP_KERNEL); 2233 2197 if (!info) 2234 2198 return -ENOMEM; 2235 2199 if ((res = snd_emu10k1_fx8010_info(emu, info)) < 0) { ··· 2245 2209 case SNDRV_EMU10K1_IOCTL_CODE_POKE: 2246 2210 if (!capable(CAP_SYS_ADMIN)) 2247 2211 return -EPERM; 2248 - icode = (emu10k1_fx8010_code_t *)kmalloc(sizeof(*icode), GFP_KERNEL); 2212 + icode = kmalloc(sizeof(*icode), GFP_KERNEL); 2249 2213 if (icode == NULL) 2250 2214 return -ENOMEM; 2251 2215 if (copy_from_user(icode, argp, sizeof(*icode))) { ··· 2256 2220 kfree(icode); 2257 2221 return res; 2258 2222 case SNDRV_EMU10K1_IOCTL_CODE_PEEK: 2259 - icode = (emu10k1_fx8010_code_t *)kmalloc(sizeof(*icode), GFP_KERNEL); 2223 + icode = kmalloc(sizeof(*icode), GFP_KERNEL); 2260 2224 if (icode == NULL) 2261 2225 return -ENOMEM; 2262 2226 if (copy_from_user(icode, argp, sizeof(*icode))) { ··· 2271 2235 kfree(icode); 2272 2236 return res; 2273 2237 case SNDRV_EMU10K1_IOCTL_PCM_POKE: 2274 - ipcm = (emu10k1_fx8010_pcm_t *)kmalloc(sizeof(*ipcm), GFP_KERNEL); 2238 + ipcm = kmalloc(sizeof(*ipcm), GFP_KERNEL); 2275 2239 if (ipcm == NULL) 2276 2240 return -ENOMEM; 2277 2241 if (copy_from_user(ipcm, argp, sizeof(*ipcm))) { ··· 2363 2327 return -ENOTTY; 2364 2328 } 2365 2329 2366 - static int snd_emu10k1_fx8010_release(snd_hwdep_t * hw, struct file *file) 2330 + static int snd_emu10k1_fx8010_release(struct snd_hwdep * hw, struct file *file) 2367 2331 { 2368 2332 return 0; 2369 2333 } 2370 2334 2371 - int __devinit snd_emu10k1_fx8010_new(emu10k1_t *emu, int device, snd_hwdep_t ** rhwdep) 2335 + int __devinit snd_emu10k1_fx8010_new(struct snd_emu10k1 *emu, int device, struct snd_hwdep ** rhwdep) 2372 2336 { 2373 - snd_hwdep_t *hw; 2337 + struct snd_hwdep *hw; 2374 2338 int err; 2375 2339 2376 2340 if (rhwdep)
+119 -110
sound/pci/emu10k1/emumixer.c
··· 35 35 36 36 #define AC97_ID_STAC9758 0x83847658 37 37 38 - static int snd_emu10k1_spdif_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) 38 + static int snd_emu10k1_spdif_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) 39 39 { 40 40 uinfo->type = SNDRV_CTL_ELEM_TYPE_IEC958; 41 41 uinfo->count = 1; 42 42 return 0; 43 43 } 44 44 45 - static int snd_emu10k1_spdif_get(snd_kcontrol_t * kcontrol, 46 - snd_ctl_elem_value_t * ucontrol) 45 + static int snd_emu10k1_spdif_get(struct snd_kcontrol *kcontrol, 46 + struct snd_ctl_elem_value *ucontrol) 47 47 { 48 - emu10k1_t *emu = snd_kcontrol_chip(kcontrol); 48 + struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol); 49 49 unsigned int idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id); 50 50 unsigned long flags; 51 51 ··· 58 58 return 0; 59 59 } 60 60 61 - static int snd_emu10k1_spdif_get_mask(snd_kcontrol_t * kcontrol, 62 - snd_ctl_elem_value_t * ucontrol) 61 + static int snd_emu10k1_spdif_get_mask(struct snd_kcontrol *kcontrol, 62 + struct snd_ctl_elem_value *ucontrol) 63 63 { 64 64 ucontrol->value.iec958.status[0] = 0xff; 65 65 ucontrol->value.iec958.status[1] = 0xff; ··· 69 69 } 70 70 71 71 #if 0 72 - static int snd_audigy_spdif_output_rate_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) 72 + static int snd_audigy_spdif_output_rate_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) 73 73 { 74 74 static char *texts[] = {"44100", "48000", "96000"}; 75 75 ··· 82 82 return 0; 83 83 } 84 84 85 - static int snd_audigy_spdif_output_rate_get(snd_kcontrol_t * kcontrol, 86 - snd_ctl_elem_value_t * ucontrol) 85 + static int snd_audigy_spdif_output_rate_get(struct snd_kcontrol *kcontrol, 86 + struct snd_ctl_elem_value *ucontrol) 87 87 { 88 - emu10k1_t *emu = snd_kcontrol_chip(kcontrol); 88 + struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol); 89 89 unsigned int tmp; 90 90 unsigned long flags; 91 91 ··· 109 109 return 0; 110 110 } 111 111 112 - static int snd_audigy_spdif_output_rate_put(snd_kcontrol_t * kcontrol, 113 - snd_ctl_elem_value_t * ucontrol) 112 + static int snd_audigy_spdif_output_rate_put(struct snd_kcontrol *kcontrol, 113 + struct snd_ctl_elem_value *ucontrol) 114 114 { 115 - emu10k1_t *emu = snd_kcontrol_chip(kcontrol); 115 + struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol); 116 116 int change; 117 117 unsigned int reg, val, tmp; 118 118 unsigned long flags; ··· 143 143 return change; 144 144 } 145 145 146 - static snd_kcontrol_new_t snd_audigy_spdif_output_rate = 146 + static struct snd_kcontrol_new snd_audigy_spdif_output_rate = 147 147 { 148 148 .access = SNDRV_CTL_ELEM_ACCESS_READWRITE, 149 149 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, ··· 155 155 }; 156 156 #endif 157 157 158 - static int snd_emu10k1_spdif_put(snd_kcontrol_t * kcontrol, 159 - snd_ctl_elem_value_t * ucontrol) 158 + static int snd_emu10k1_spdif_put(struct snd_kcontrol *kcontrol, 159 + struct snd_ctl_elem_value *ucontrol) 160 160 { 161 - emu10k1_t *emu = snd_kcontrol_chip(kcontrol); 161 + struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol); 162 162 unsigned int idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id); 163 163 int change; 164 164 unsigned int val; ··· 178 178 return change; 179 179 } 180 180 181 - static snd_kcontrol_new_t snd_emu10k1_spdif_mask_control = 181 + static struct snd_kcontrol_new snd_emu10k1_spdif_mask_control = 182 182 { 183 183 .access = SNDRV_CTL_ELEM_ACCESS_READ, 184 184 .iface = SNDRV_CTL_ELEM_IFACE_PCM, ··· 188 188 .get = snd_emu10k1_spdif_get_mask 189 189 }; 190 190 191 - static snd_kcontrol_new_t snd_emu10k1_spdif_control = 191 + static struct snd_kcontrol_new snd_emu10k1_spdif_control = 192 192 { 193 193 .iface = SNDRV_CTL_ELEM_IFACE_PCM, 194 194 .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,DEFAULT), ··· 199 199 }; 200 200 201 201 202 - static void update_emu10k1_fxrt(emu10k1_t *emu, int voice, unsigned char *route) 202 + static void update_emu10k1_fxrt(struct snd_emu10k1 *emu, int voice, unsigned char *route) 203 203 { 204 204 if (emu->audigy) { 205 205 snd_emu10k1_ptr_write(emu, A_FXRT1, voice, ··· 212 212 } 213 213 } 214 214 215 - static void update_emu10k1_send_volume(emu10k1_t *emu, int voice, unsigned char *volume) 215 + static void update_emu10k1_send_volume(struct snd_emu10k1 *emu, int voice, unsigned char *volume) 216 216 { 217 217 snd_emu10k1_ptr_write(emu, PTRX_FXSENDAMOUNT_A, voice, volume[0]); 218 218 snd_emu10k1_ptr_write(emu, PTRX_FXSENDAMOUNT_B, voice, volume[1]); ··· 229 229 230 230 /* PCM stream controls */ 231 231 232 - static int snd_emu10k1_send_routing_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) 232 + static int snd_emu10k1_send_routing_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) 233 233 { 234 - emu10k1_t *emu = snd_kcontrol_chip(kcontrol); 234 + struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol); 235 235 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; 236 236 uinfo->count = emu->audigy ? 3*8 : 3*4; 237 237 uinfo->value.integer.min = 0; ··· 239 239 return 0; 240 240 } 241 241 242 - static int snd_emu10k1_send_routing_get(snd_kcontrol_t * kcontrol, 243 - snd_ctl_elem_value_t * ucontrol) 242 + static int snd_emu10k1_send_routing_get(struct snd_kcontrol *kcontrol, 243 + struct snd_ctl_elem_value *ucontrol) 244 244 { 245 245 unsigned long flags; 246 - emu10k1_t *emu = snd_kcontrol_chip(kcontrol); 247 - emu10k1_pcm_mixer_t *mix = &emu->pcm_mixer[snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)]; 246 + struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol); 247 + struct snd_emu10k1_pcm_mixer *mix = 248 + &emu->pcm_mixer[snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)]; 248 249 int voice, idx; 249 250 int num_efx = emu->audigy ? 8 : 4; 250 251 int mask = emu->audigy ? 0x3f : 0x0f; ··· 259 258 return 0; 260 259 } 261 260 262 - static int snd_emu10k1_send_routing_put(snd_kcontrol_t * kcontrol, 263 - snd_ctl_elem_value_t * ucontrol) 261 + static int snd_emu10k1_send_routing_put(struct snd_kcontrol *kcontrol, 262 + struct snd_ctl_elem_value *ucontrol) 264 263 { 265 264 unsigned long flags; 266 - emu10k1_t *emu = snd_kcontrol_chip(kcontrol); 267 - emu10k1_pcm_mixer_t *mix = &emu->pcm_mixer[snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)]; 265 + struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol); 266 + struct snd_emu10k1_pcm_mixer *mix = 267 + &emu->pcm_mixer[snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)]; 268 268 int change = 0, voice, idx, val; 269 269 int num_efx = emu->audigy ? 8 : 4; 270 270 int mask = emu->audigy ? 0x3f : 0x0f; ··· 294 292 return change; 295 293 } 296 294 297 - static snd_kcontrol_new_t snd_emu10k1_send_routing_control = 295 + static struct snd_kcontrol_new snd_emu10k1_send_routing_control = 298 296 { 299 297 .access = SNDRV_CTL_ELEM_ACCESS_READWRITE | SNDRV_CTL_ELEM_ACCESS_INACTIVE, 300 298 .iface = SNDRV_CTL_ELEM_IFACE_PCM, ··· 305 303 .put = snd_emu10k1_send_routing_put 306 304 }; 307 305 308 - static int snd_emu10k1_send_volume_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) 306 + static int snd_emu10k1_send_volume_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) 309 307 { 310 - emu10k1_t *emu = snd_kcontrol_chip(kcontrol); 308 + struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol); 311 309 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; 312 310 uinfo->count = emu->audigy ? 3*8 : 3*4; 313 311 uinfo->value.integer.min = 0; ··· 315 313 return 0; 316 314 } 317 315 318 - static int snd_emu10k1_send_volume_get(snd_kcontrol_t * kcontrol, 319 - snd_ctl_elem_value_t * ucontrol) 316 + static int snd_emu10k1_send_volume_get(struct snd_kcontrol *kcontrol, 317 + struct snd_ctl_elem_value *ucontrol) 320 318 { 321 319 unsigned long flags; 322 - emu10k1_t *emu = snd_kcontrol_chip(kcontrol); 323 - emu10k1_pcm_mixer_t *mix = &emu->pcm_mixer[snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)]; 320 + struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol); 321 + struct snd_emu10k1_pcm_mixer *mix = 322 + &emu->pcm_mixer[snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)]; 324 323 int idx; 325 324 int num_efx = emu->audigy ? 8 : 4; 326 325 ··· 332 329 return 0; 333 330 } 334 331 335 - static int snd_emu10k1_send_volume_put(snd_kcontrol_t * kcontrol, 336 - snd_ctl_elem_value_t * ucontrol) 332 + static int snd_emu10k1_send_volume_put(struct snd_kcontrol *kcontrol, 333 + struct snd_ctl_elem_value *ucontrol) 337 334 { 338 335 unsigned long flags; 339 - emu10k1_t *emu = snd_kcontrol_chip(kcontrol); 340 - emu10k1_pcm_mixer_t *mix = &emu->pcm_mixer[snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)]; 336 + struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol); 337 + struct snd_emu10k1_pcm_mixer *mix = 338 + &emu->pcm_mixer[snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)]; 341 339 int change = 0, idx, val; 342 340 int num_efx = emu->audigy ? 8 : 4; 343 341 ··· 365 361 return change; 366 362 } 367 363 368 - static snd_kcontrol_new_t snd_emu10k1_send_volume_control = 364 + static struct snd_kcontrol_new snd_emu10k1_send_volume_control = 369 365 { 370 366 .access = SNDRV_CTL_ELEM_ACCESS_READWRITE | SNDRV_CTL_ELEM_ACCESS_INACTIVE, 371 367 .iface = SNDRV_CTL_ELEM_IFACE_PCM, ··· 376 372 .put = snd_emu10k1_send_volume_put 377 373 }; 378 374 379 - static int snd_emu10k1_attn_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) 375 + static int snd_emu10k1_attn_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) 380 376 { 381 377 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; 382 378 uinfo->count = 3; ··· 385 381 return 0; 386 382 } 387 383 388 - static int snd_emu10k1_attn_get(snd_kcontrol_t * kcontrol, 389 - snd_ctl_elem_value_t * ucontrol) 384 + static int snd_emu10k1_attn_get(struct snd_kcontrol *kcontrol, 385 + struct snd_ctl_elem_value *ucontrol) 390 386 { 391 - emu10k1_t *emu = snd_kcontrol_chip(kcontrol); 392 - emu10k1_pcm_mixer_t *mix = &emu->pcm_mixer[snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)]; 387 + struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol); 388 + struct snd_emu10k1_pcm_mixer *mix = 389 + &emu->pcm_mixer[snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)]; 393 390 unsigned long flags; 394 391 int idx; 395 392 ··· 401 396 return 0; 402 397 } 403 398 404 - static int snd_emu10k1_attn_put(snd_kcontrol_t * kcontrol, 405 - snd_ctl_elem_value_t * ucontrol) 399 + static int snd_emu10k1_attn_put(struct snd_kcontrol *kcontrol, 400 + struct snd_ctl_elem_value *ucontrol) 406 401 { 407 402 unsigned long flags; 408 - emu10k1_t *emu = snd_kcontrol_chip(kcontrol); 409 - emu10k1_pcm_mixer_t *mix = &emu->pcm_mixer[snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)]; 403 + struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol); 404 + struct snd_emu10k1_pcm_mixer *mix = 405 + &emu->pcm_mixer[snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)]; 410 406 int change = 0, idx, val; 411 407 412 408 spin_lock_irqsave(&emu->reg_lock, flags); ··· 430 424 return change; 431 425 } 432 426 433 - static snd_kcontrol_new_t snd_emu10k1_attn_control = 427 + static struct snd_kcontrol_new snd_emu10k1_attn_control = 434 428 { 435 429 .access = SNDRV_CTL_ELEM_ACCESS_READWRITE | SNDRV_CTL_ELEM_ACCESS_INACTIVE, 436 430 .iface = SNDRV_CTL_ELEM_IFACE_PCM, ··· 443 437 444 438 /* Mutichannel PCM stream controls */ 445 439 446 - static int snd_emu10k1_efx_send_routing_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) 440 + static int snd_emu10k1_efx_send_routing_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) 447 441 { 448 - emu10k1_t *emu = snd_kcontrol_chip(kcontrol); 442 + struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol); 449 443 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; 450 444 uinfo->count = emu->audigy ? 8 : 4; 451 445 uinfo->value.integer.min = 0; ··· 453 447 return 0; 454 448 } 455 449 456 - static int snd_emu10k1_efx_send_routing_get(snd_kcontrol_t * kcontrol, 457 - snd_ctl_elem_value_t * ucontrol) 450 + static int snd_emu10k1_efx_send_routing_get(struct snd_kcontrol *kcontrol, 451 + struct snd_ctl_elem_value *ucontrol) 458 452 { 459 453 unsigned long flags; 460 - emu10k1_t *emu = snd_kcontrol_chip(kcontrol); 461 - emu10k1_pcm_mixer_t *mix = &emu->efx_pcm_mixer[snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)]; 454 + struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol); 455 + struct snd_emu10k1_pcm_mixer *mix = 456 + &emu->efx_pcm_mixer[snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)]; 462 457 int idx; 463 458 int num_efx = emu->audigy ? 8 : 4; 464 459 int mask = emu->audigy ? 0x3f : 0x0f; ··· 472 465 return 0; 473 466 } 474 467 475 - static int snd_emu10k1_efx_send_routing_put(snd_kcontrol_t * kcontrol, 476 - snd_ctl_elem_value_t * ucontrol) 468 + static int snd_emu10k1_efx_send_routing_put(struct snd_kcontrol *kcontrol, 469 + struct snd_ctl_elem_value *ucontrol) 477 470 { 478 471 unsigned long flags; 479 - emu10k1_t *emu = snd_kcontrol_chip(kcontrol); 472 + struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol); 480 473 int ch = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id); 481 - emu10k1_pcm_mixer_t *mix = &emu->efx_pcm_mixer[ch]; 474 + struct snd_emu10k1_pcm_mixer *mix = &emu->efx_pcm_mixer[ch]; 482 475 int change = 0, idx, val; 483 476 int num_efx = emu->audigy ? 8 : 4; 484 477 int mask = emu->audigy ? 0x3f : 0x0f; ··· 502 495 return change; 503 496 } 504 497 505 - static snd_kcontrol_new_t snd_emu10k1_efx_send_routing_control = 498 + static struct snd_kcontrol_new snd_emu10k1_efx_send_routing_control = 506 499 { 507 500 .access = SNDRV_CTL_ELEM_ACCESS_READWRITE | SNDRV_CTL_ELEM_ACCESS_INACTIVE, 508 501 .iface = SNDRV_CTL_ELEM_IFACE_PCM, ··· 513 506 .put = snd_emu10k1_efx_send_routing_put 514 507 }; 515 508 516 - static int snd_emu10k1_efx_send_volume_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) 509 + static int snd_emu10k1_efx_send_volume_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) 517 510 { 518 - emu10k1_t *emu = snd_kcontrol_chip(kcontrol); 511 + struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol); 519 512 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; 520 513 uinfo->count = emu->audigy ? 8 : 4; 521 514 uinfo->value.integer.min = 0; ··· 523 516 return 0; 524 517 } 525 518 526 - static int snd_emu10k1_efx_send_volume_get(snd_kcontrol_t * kcontrol, 527 - snd_ctl_elem_value_t * ucontrol) 519 + static int snd_emu10k1_efx_send_volume_get(struct snd_kcontrol *kcontrol, 520 + struct snd_ctl_elem_value *ucontrol) 528 521 { 529 522 unsigned long flags; 530 - emu10k1_t *emu = snd_kcontrol_chip(kcontrol); 531 - emu10k1_pcm_mixer_t *mix = &emu->efx_pcm_mixer[snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)]; 523 + struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol); 524 + struct snd_emu10k1_pcm_mixer *mix = 525 + &emu->efx_pcm_mixer[snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)]; 532 526 int idx; 533 527 int num_efx = emu->audigy ? 8 : 4; 534 528 ··· 540 532 return 0; 541 533 } 542 534 543 - static int snd_emu10k1_efx_send_volume_put(snd_kcontrol_t * kcontrol, 544 - snd_ctl_elem_value_t * ucontrol) 535 + static int snd_emu10k1_efx_send_volume_put(struct snd_kcontrol *kcontrol, 536 + struct snd_ctl_elem_value *ucontrol) 545 537 { 546 538 unsigned long flags; 547 - emu10k1_t *emu = snd_kcontrol_chip(kcontrol); 539 + struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol); 548 540 int ch = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id); 549 - emu10k1_pcm_mixer_t *mix = &emu->efx_pcm_mixer[ch]; 541 + struct snd_emu10k1_pcm_mixer *mix = &emu->efx_pcm_mixer[ch]; 550 542 int change = 0, idx, val; 551 543 int num_efx = emu->audigy ? 8 : 4; 552 544 ··· 569 561 } 570 562 571 563 572 - static snd_kcontrol_new_t snd_emu10k1_efx_send_volume_control = 564 + static struct snd_kcontrol_new snd_emu10k1_efx_send_volume_control = 573 565 { 574 566 .access = SNDRV_CTL_ELEM_ACCESS_READWRITE | SNDRV_CTL_ELEM_ACCESS_INACTIVE, 575 567 .iface = SNDRV_CTL_ELEM_IFACE_PCM, ··· 580 572 .put = snd_emu10k1_efx_send_volume_put 581 573 }; 582 574 583 - static int snd_emu10k1_efx_attn_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) 575 + static int snd_emu10k1_efx_attn_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) 584 576 { 585 577 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; 586 578 uinfo->count = 1; ··· 589 581 return 0; 590 582 } 591 583 592 - static int snd_emu10k1_efx_attn_get(snd_kcontrol_t * kcontrol, 593 - snd_ctl_elem_value_t * ucontrol) 584 + static int snd_emu10k1_efx_attn_get(struct snd_kcontrol *kcontrol, 585 + struct snd_ctl_elem_value *ucontrol) 594 586 { 595 - emu10k1_t *emu = snd_kcontrol_chip(kcontrol); 596 - emu10k1_pcm_mixer_t *mix = &emu->efx_pcm_mixer[snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)]; 587 + struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol); 588 + struct snd_emu10k1_pcm_mixer *mix = 589 + &emu->efx_pcm_mixer[snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)]; 597 590 unsigned long flags; 598 591 599 592 spin_lock_irqsave(&emu->reg_lock, flags); ··· 603 594 return 0; 604 595 } 605 596 606 - static int snd_emu10k1_efx_attn_put(snd_kcontrol_t * kcontrol, 607 - snd_ctl_elem_value_t * ucontrol) 597 + static int snd_emu10k1_efx_attn_put(struct snd_kcontrol *kcontrol, 598 + struct snd_ctl_elem_value *ucontrol) 608 599 { 609 600 unsigned long flags; 610 - emu10k1_t *emu = snd_kcontrol_chip(kcontrol); 601 + struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol); 611 602 int ch = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id); 612 - emu10k1_pcm_mixer_t *mix = &emu->efx_pcm_mixer[ch]; 603 + struct snd_emu10k1_pcm_mixer *mix = &emu->efx_pcm_mixer[ch]; 613 604 int change = 0, val; 614 605 615 606 spin_lock_irqsave(&emu->reg_lock, flags); ··· 627 618 return change; 628 619 } 629 620 630 - static snd_kcontrol_new_t snd_emu10k1_efx_attn_control = 621 + static struct snd_kcontrol_new snd_emu10k1_efx_attn_control = 631 622 { 632 623 .access = SNDRV_CTL_ELEM_ACCESS_READWRITE | SNDRV_CTL_ELEM_ACCESS_INACTIVE, 633 624 .iface = SNDRV_CTL_ELEM_IFACE_PCM, ··· 638 629 .put = snd_emu10k1_efx_attn_put 639 630 }; 640 631 641 - static int snd_emu10k1_shared_spdif_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) 632 + static int snd_emu10k1_shared_spdif_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) 642 633 { 643 634 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; 644 635 uinfo->count = 1; ··· 647 638 return 0; 648 639 } 649 640 650 - static int snd_emu10k1_shared_spdif_get(snd_kcontrol_t * kcontrol, 651 - snd_ctl_elem_value_t * ucontrol) 641 + static int snd_emu10k1_shared_spdif_get(struct snd_kcontrol *kcontrol, 642 + struct snd_ctl_elem_value *ucontrol) 652 643 { 653 - emu10k1_t *emu = snd_kcontrol_chip(kcontrol); 644 + struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol); 654 645 655 646 if (emu->audigy) 656 647 ucontrol->value.integer.value[0] = inl(emu->port + A_IOCFG) & A_IOCFG_GPOUT0 ? 1 : 0; ··· 659 650 return 0; 660 651 } 661 652 662 - static int snd_emu10k1_shared_spdif_put(snd_kcontrol_t * kcontrol, 663 - snd_ctl_elem_value_t * ucontrol) 653 + static int snd_emu10k1_shared_spdif_put(struct snd_kcontrol *kcontrol, 654 + struct snd_ctl_elem_value *ucontrol) 664 655 { 665 656 unsigned long flags; 666 - emu10k1_t *emu = snd_kcontrol_chip(kcontrol); 657 + struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol); 667 658 unsigned int reg, val; 668 659 int change = 0; 669 660 ··· 690 681 return change; 691 682 } 692 683 693 - static snd_kcontrol_new_t snd_emu10k1_shared_spdif __devinitdata = 684 + static struct snd_kcontrol_new snd_emu10k1_shared_spdif __devinitdata = 694 685 { 695 686 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 696 687 .name = "SB Live Analog/Digital Output Jack", ··· 699 690 .put = snd_emu10k1_shared_spdif_put 700 691 }; 701 692 702 - static snd_kcontrol_new_t snd_audigy_shared_spdif __devinitdata = 693 + static struct snd_kcontrol_new snd_audigy_shared_spdif __devinitdata = 703 694 { 704 695 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 705 696 .name = "Audigy Analog/Digital Output Jack", ··· 710 701 711 702 /* 712 703 */ 713 - static void snd_emu10k1_mixer_free_ac97(ac97_t *ac97) 704 + static void snd_emu10k1_mixer_free_ac97(struct snd_ac97 *ac97) 714 705 { 715 - emu10k1_t *emu = ac97->private_data; 706 + struct snd_emu10k1 *emu = ac97->private_data; 716 707 emu->ac97 = NULL; 717 708 } 718 709 719 710 /* 720 711 */ 721 - static int remove_ctl(snd_card_t *card, const char *name) 712 + static int remove_ctl(struct snd_card *card, const char *name) 722 713 { 723 - snd_ctl_elem_id_t id; 714 + struct snd_ctl_elem_id id; 724 715 memset(&id, 0, sizeof(id)); 725 716 strcpy(id.name, name); 726 717 id.iface = SNDRV_CTL_ELEM_IFACE_MIXER; 727 718 return snd_ctl_remove_id(card, &id); 728 719 } 729 720 730 - static snd_kcontrol_t *ctl_find(snd_card_t *card, const char *name) 721 + static struct snd_kcontrol *ctl_find(struct snd_card *card, const char *name) 731 722 { 732 - snd_ctl_elem_id_t sid; 723 + struct snd_ctl_elem_id sid; 733 724 memset(&sid, 0, sizeof(sid)); 734 725 strcpy(sid.name, name); 735 726 sid.iface = SNDRV_CTL_ELEM_IFACE_MIXER; 736 727 return snd_ctl_find_id(card, &sid); 737 728 } 738 729 739 - static int rename_ctl(snd_card_t *card, const char *src, const char *dst) 730 + static int rename_ctl(struct snd_card *card, const char *src, const char *dst) 740 731 { 741 - snd_kcontrol_t *kctl = ctl_find(card, src); 732 + struct snd_kcontrol *kctl = ctl_find(card, src); 742 733 if (kctl) { 743 734 strcpy(kctl->id.name, dst); 744 735 return 0; ··· 746 737 return -ENOENT; 747 738 } 748 739 749 - int __devinit snd_emu10k1_mixer(emu10k1_t *emu, 740 + int __devinit snd_emu10k1_mixer(struct snd_emu10k1 *emu, 750 741 int pcm_device, int multi_device) 751 742 { 752 743 int err, pcm; 753 - snd_kcontrol_t *kctl; 754 - snd_card_t *card = emu->card; 744 + struct snd_kcontrol *kctl; 745 + struct snd_card *card = emu->card; 755 746 char **c; 756 747 static char *emu10k1_remove_ctls[] = { 757 748 /* no AC97 mono, surround, center/lfe */ ··· 804 795 }; 805 796 806 797 if (emu->card_capabilities->ac97_chip) { 807 - ac97_bus_t *pbus; 808 - ac97_template_t ac97; 809 - static ac97_bus_ops_t ops = { 798 + struct snd_ac97_bus *pbus; 799 + struct snd_ac97_template ac97; 800 + static struct snd_ac97_bus_ops ops = { 810 801 .write = snd_emu10k1_ac97_write, 811 802 .read = snd_emu10k1_ac97_read, 812 803 }; ··· 903 894 904 895 /* initialize the routing and volume table for each pcm playback stream */ 905 896 for (pcm = 0; pcm < 32; pcm++) { 906 - emu10k1_pcm_mixer_t *mix; 897 + struct snd_emu10k1_pcm_mixer *mix; 907 898 int v; 908 899 909 900 mix = &emu->pcm_mixer[pcm]; ··· 923 914 924 915 /* initialize the routing and volume table for the multichannel playback stream */ 925 916 for (pcm = 0; pcm < NUM_EFX_PLAYBACK; pcm++) { 926 - emu10k1_pcm_mixer_t *mix; 917 + struct snd_emu10k1_pcm_mixer *mix; 927 918 int v; 928 919 929 920 mix = &emu->efx_pcm_mixer[pcm];
+37 -35
sound/pci/emu10k1/emumpu401.c
··· 28 28 #define EMU10K1_MIDI_MODE_INPUT (1<<0) 29 29 #define EMU10K1_MIDI_MODE_OUTPUT (1<<1) 30 30 31 - static inline unsigned char mpu401_read(emu10k1_t *emu, emu10k1_midi_t *mpu, int idx) 31 + static inline unsigned char mpu401_read(struct snd_emu10k1 *emu, 32 + struct snd_emu10k1_midi *mpu, int idx) 32 33 { 33 34 if (emu->audigy) 34 35 return (unsigned char)snd_emu10k1_ptr_read(emu, mpu->port + idx, 0); ··· 37 36 return inb(emu->port + mpu->port + idx); 38 37 } 39 38 40 - static inline void mpu401_write(emu10k1_t *emu, emu10k1_midi_t *mpu, int data, int idx) 39 + static inline void mpu401_write(struct snd_emu10k1 *emu, 40 + struct snd_emu10k1_midi *mpu, int data, int idx) 41 41 { 42 42 if (emu->audigy) 43 43 snd_emu10k1_ptr_write(emu, mpu->port + idx, 0, data); ··· 58 56 #define MPU401_ENTER_UART 0x3f 59 57 #define MPU401_ACK 0xfe 60 58 61 - static void mpu401_clear_rx(emu10k1_t *emu, emu10k1_midi_t *mpu) 59 + static void mpu401_clear_rx(struct snd_emu10k1 *emu, struct snd_emu10k1_midi *mpu) 62 60 { 63 61 int timeout = 100000; 64 62 for (; timeout > 0 && mpu401_input_avail(emu, mpu); timeout--) ··· 73 71 74 72 */ 75 73 76 - static void do_emu10k1_midi_interrupt(emu10k1_t *emu, emu10k1_midi_t *midi, unsigned int status) 74 + static void do_emu10k1_midi_interrupt(struct snd_emu10k1 *emu, struct snd_emu10k1_midi *midi, unsigned int status) 77 75 { 78 76 unsigned char byte; 79 77 ··· 106 104 spin_unlock(&midi->output_lock); 107 105 } 108 106 109 - static void snd_emu10k1_midi_interrupt(emu10k1_t *emu, unsigned int status) 107 + static void snd_emu10k1_midi_interrupt(struct snd_emu10k1 *emu, unsigned int status) 110 108 { 111 109 do_emu10k1_midi_interrupt(emu, &emu->midi, status); 112 110 } 113 111 114 - static void snd_emu10k1_midi_interrupt2(emu10k1_t *emu, unsigned int status) 112 + static void snd_emu10k1_midi_interrupt2(struct snd_emu10k1 *emu, unsigned int status) 115 113 { 116 114 do_emu10k1_midi_interrupt(emu, &emu->midi2, status); 117 115 } 118 116 119 - static void snd_emu10k1_midi_cmd(emu10k1_t * emu, emu10k1_midi_t *midi, unsigned char cmd, int ack) 117 + static void snd_emu10k1_midi_cmd(struct snd_emu10k1 * emu, struct snd_emu10k1_midi *midi, unsigned char cmd, int ack) 120 118 { 121 119 unsigned long flags; 122 120 int timeout, ok; ··· 148 146 mpu401_read_data(emu, midi)); 149 147 } 150 148 151 - static int snd_emu10k1_midi_input_open(snd_rawmidi_substream_t * substream) 149 + static int snd_emu10k1_midi_input_open(struct snd_rawmidi_substream *substream) 152 150 { 153 - emu10k1_t *emu; 154 - emu10k1_midi_t *midi = (emu10k1_midi_t *)substream->rmidi->private_data; 151 + struct snd_emu10k1 *emu; 152 + struct snd_emu10k1_midi *midi = (struct snd_emu10k1_midi *)substream->rmidi->private_data; 155 153 unsigned long flags; 156 154 157 155 emu = midi->emu; ··· 169 167 return 0; 170 168 } 171 169 172 - static int snd_emu10k1_midi_output_open(snd_rawmidi_substream_t * substream) 170 + static int snd_emu10k1_midi_output_open(struct snd_rawmidi_substream *substream) 173 171 { 174 - emu10k1_t *emu; 175 - emu10k1_midi_t *midi = (emu10k1_midi_t *)substream->rmidi->private_data; 172 + struct snd_emu10k1 *emu; 173 + struct snd_emu10k1_midi *midi = (struct snd_emu10k1_midi *)substream->rmidi->private_data; 176 174 unsigned long flags; 177 175 178 176 emu = midi->emu; ··· 190 188 return 0; 191 189 } 192 190 193 - static int snd_emu10k1_midi_input_close(snd_rawmidi_substream_t * substream) 191 + static int snd_emu10k1_midi_input_close(struct snd_rawmidi_substream *substream) 194 192 { 195 - emu10k1_t *emu; 196 - emu10k1_midi_t *midi = (emu10k1_midi_t *)substream->rmidi->private_data; 193 + struct snd_emu10k1 *emu; 194 + struct snd_emu10k1_midi *midi = (struct snd_emu10k1_midi *)substream->rmidi->private_data; 197 195 unsigned long flags; 198 196 199 197 emu = midi->emu; ··· 211 209 return 0; 212 210 } 213 211 214 - static int snd_emu10k1_midi_output_close(snd_rawmidi_substream_t * substream) 212 + static int snd_emu10k1_midi_output_close(struct snd_rawmidi_substream *substream) 215 213 { 216 - emu10k1_t *emu; 217 - emu10k1_midi_t *midi = (emu10k1_midi_t *)substream->rmidi->private_data; 214 + struct snd_emu10k1 *emu; 215 + struct snd_emu10k1_midi *midi = (struct snd_emu10k1_midi *)substream->rmidi->private_data; 218 216 unsigned long flags; 219 217 220 218 emu = midi->emu; ··· 232 230 return 0; 233 231 } 234 232 235 - static void snd_emu10k1_midi_input_trigger(snd_rawmidi_substream_t * substream, int up) 233 + static void snd_emu10k1_midi_input_trigger(struct snd_rawmidi_substream *substream, int up) 236 234 { 237 - emu10k1_t *emu; 238 - emu10k1_midi_t *midi = (emu10k1_midi_t *)substream->rmidi->private_data; 235 + struct snd_emu10k1 *emu; 236 + struct snd_emu10k1_midi *midi = (struct snd_emu10k1_midi *)substream->rmidi->private_data; 239 237 emu = midi->emu; 240 238 snd_assert(emu, return); 241 239 ··· 245 243 snd_emu10k1_intr_disable(emu, midi->rx_enable); 246 244 } 247 245 248 - static void snd_emu10k1_midi_output_trigger(snd_rawmidi_substream_t * substream, int up) 246 + static void snd_emu10k1_midi_output_trigger(struct snd_rawmidi_substream *substream, int up) 249 247 { 250 - emu10k1_t *emu; 251 - emu10k1_midi_t *midi = (emu10k1_midi_t *)substream->rmidi->private_data; 248 + struct snd_emu10k1 *emu; 249 + struct snd_emu10k1_midi *midi = (struct snd_emu10k1_midi *)substream->rmidi->private_data; 252 250 unsigned long flags; 253 251 254 252 emu = midi->emu; ··· 285 283 286 284 */ 287 285 288 - static snd_rawmidi_ops_t snd_emu10k1_midi_output = 286 + static struct snd_rawmidi_ops snd_emu10k1_midi_output = 289 287 { 290 288 .open = snd_emu10k1_midi_output_open, 291 289 .close = snd_emu10k1_midi_output_close, 292 290 .trigger = snd_emu10k1_midi_output_trigger, 293 291 }; 294 292 295 - static snd_rawmidi_ops_t snd_emu10k1_midi_input = 293 + static struct snd_rawmidi_ops snd_emu10k1_midi_input = 296 294 { 297 295 .open = snd_emu10k1_midi_input_open, 298 296 .close = snd_emu10k1_midi_input_close, 299 297 .trigger = snd_emu10k1_midi_input_trigger, 300 298 }; 301 299 302 - static void snd_emu10k1_midi_free(snd_rawmidi_t *rmidi) 300 + static void snd_emu10k1_midi_free(struct snd_rawmidi *rmidi) 303 301 { 304 - emu10k1_midi_t *midi = (emu10k1_midi_t *)rmidi->private_data; 302 + struct snd_emu10k1_midi *midi = (struct snd_emu10k1_midi *)rmidi->private_data; 305 303 midi->interrupt = NULL; 306 304 midi->rmidi = NULL; 307 305 } 308 306 309 - static int __devinit emu10k1_midi_init(emu10k1_t *emu, emu10k1_midi_t *midi, int device, char *name) 307 + static int __devinit emu10k1_midi_init(struct snd_emu10k1 *emu, struct snd_emu10k1_midi *midi, int device, char *name) 310 308 { 311 - snd_rawmidi_t *rmidi; 309 + struct snd_rawmidi *rmidi; 312 310 int err; 313 311 314 312 if ((err = snd_rawmidi_new(emu->card, name, device, 1, 1, &rmidi)) < 0) ··· 329 327 return 0; 330 328 } 331 329 332 - int __devinit snd_emu10k1_midi(emu10k1_t *emu) 330 + int __devinit snd_emu10k1_midi(struct snd_emu10k1 *emu) 333 331 { 334 - emu10k1_midi_t *midi = &emu->midi; 332 + struct snd_emu10k1_midi *midi = &emu->midi; 335 333 int err; 336 334 337 335 if ((err = emu10k1_midi_init(emu, midi, 0, "EMU10K1 MPU-401 (UART)")) < 0) ··· 346 344 return 0; 347 345 } 348 346 349 - int __devinit snd_emu10k1_audigy_midi(emu10k1_t *emu) 347 + int __devinit snd_emu10k1_audigy_midi(struct snd_emu10k1 *emu) 350 348 { 351 - emu10k1_midi_t *midi; 349 + struct snd_emu10k1_midi *midi; 352 350 int err; 353 351 354 352 midi = &emu->midi;
+179 -175
sound/pci/emu10k1/emupcm.c
··· 35 35 #include <sound/core.h> 36 36 #include <sound/emu10k1.h> 37 37 38 - static void snd_emu10k1_pcm_interrupt(emu10k1_t *emu, emu10k1_voice_t *voice) 38 + static void snd_emu10k1_pcm_interrupt(struct snd_emu10k1 *emu, 39 + struct snd_emu10k1_voice *voice) 39 40 { 40 - emu10k1_pcm_t *epcm; 41 + struct snd_emu10k1_pcm *epcm; 41 42 42 43 if ((epcm = voice->epcm) == NULL) 43 44 return; ··· 53 52 snd_pcm_period_elapsed(epcm->substream); 54 53 } 55 54 56 - static void snd_emu10k1_pcm_ac97adc_interrupt(emu10k1_t *emu, unsigned int status) 55 + static void snd_emu10k1_pcm_ac97adc_interrupt(struct snd_emu10k1 *emu, 56 + unsigned int status) 57 57 { 58 58 #if 0 59 59 if (status & IPR_ADCBUFHALFFULL) { ··· 65 63 snd_pcm_period_elapsed(emu->pcm_capture_substream); 66 64 } 67 65 68 - static void snd_emu10k1_pcm_ac97mic_interrupt(emu10k1_t *emu, unsigned int status) 66 + static void snd_emu10k1_pcm_ac97mic_interrupt(struct snd_emu10k1 *emu, 67 + unsigned int status) 69 68 { 70 69 #if 0 71 70 if (status & IPR_MICBUFHALFFULL) { ··· 77 74 snd_pcm_period_elapsed(emu->pcm_capture_mic_substream); 78 75 } 79 76 80 - static void snd_emu10k1_pcm_efx_interrupt(emu10k1_t *emu, unsigned int status) 77 + static void snd_emu10k1_pcm_efx_interrupt(struct snd_emu10k1 *emu, 78 + unsigned int status) 81 79 { 82 80 #if 0 83 81 if (status & IPR_EFXBUFHALFFULL) { ··· 89 85 snd_pcm_period_elapsed(emu->pcm_capture_efx_substream); 90 86 } 91 87 92 - static snd_pcm_uframes_t snd_emu10k1_efx_playback_pointer(snd_pcm_substream_t * substream) 88 + static snd_pcm_uframes_t snd_emu10k1_efx_playback_pointer(struct snd_pcm_substream *substream) 93 89 { 94 - emu10k1_t *emu = snd_pcm_substream_chip(substream); 95 - snd_pcm_runtime_t *runtime = substream->runtime; 96 - emu10k1_pcm_t *epcm = runtime->private_data; 90 + struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); 91 + struct snd_pcm_runtime *runtime = substream->runtime; 92 + struct snd_emu10k1_pcm *epcm = runtime->private_data; 97 93 unsigned int ptr; 98 94 99 95 if (!epcm->running) ··· 106 102 return ptr; 107 103 } 108 104 109 - static int snd_emu10k1_pcm_channel_alloc(emu10k1_pcm_t * epcm, int voices) 105 + static int snd_emu10k1_pcm_channel_alloc(struct snd_emu10k1_pcm * epcm, int voices) 110 106 { 111 107 int err, i; 112 108 ··· 171 167 384*128,448*128,512*128 172 168 }; 173 169 174 - static snd_pcm_hw_constraint_list_t hw_constraints_capture_period_sizes = { 170 + static struct snd_pcm_hw_constraint_list hw_constraints_capture_period_sizes = { 175 171 .count = 31, 176 172 .list = capture_period_sizes, 177 173 .mask = 0 ··· 181 177 8000, 11025, 16000, 22050, 24000, 32000, 44100, 48000 182 178 }; 183 179 184 - static snd_pcm_hw_constraint_list_t hw_constraints_capture_rates = { 180 + static struct snd_pcm_hw_constraint_list hw_constraints_capture_rates = { 185 181 .count = 8, 186 182 .list = capture_rates, 187 183 .mask = 0 ··· 275 271 } 276 272 } 277 273 278 - static void snd_emu10k1_pcm_init_voice(emu10k1_t *emu, 274 + static void snd_emu10k1_pcm_init_voice(struct snd_emu10k1 *emu, 279 275 int master, int extra, 280 - emu10k1_voice_t *evoice, 276 + struct snd_emu10k1_voice *evoice, 281 277 unsigned int start_addr, 282 278 unsigned int end_addr, 283 - emu10k1_pcm_mixer_t *mix) 279 + struct snd_emu10k1_pcm_mixer *mix) 284 280 { 285 - snd_pcm_substream_t *substream = evoice->epcm->substream; 286 - snd_pcm_runtime_t *runtime = substream->runtime; 281 + struct snd_pcm_substream *substream = evoice->epcm->substream; 282 + struct snd_pcm_runtime *runtime = substream->runtime; 287 283 unsigned int silent_page, tmp; 288 284 int voice, stereo, w_16; 289 285 unsigned char attn, send_amount[8]; ··· 396 392 spin_unlock_irqrestore(&emu->reg_lock, flags); 397 393 } 398 394 399 - static int snd_emu10k1_playback_hw_params(snd_pcm_substream_t * substream, 400 - snd_pcm_hw_params_t * hw_params) 395 + static int snd_emu10k1_playback_hw_params(struct snd_pcm_substream *substream, 396 + struct snd_pcm_hw_params *hw_params) 401 397 { 402 - emu10k1_t *emu = snd_pcm_substream_chip(substream); 403 - snd_pcm_runtime_t *runtime = substream->runtime; 404 - emu10k1_pcm_t *epcm = runtime->private_data; 398 + struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); 399 + struct snd_pcm_runtime *runtime = substream->runtime; 400 + struct snd_emu10k1_pcm *epcm = runtime->private_data; 405 401 int err; 406 402 407 403 if ((err = snd_emu10k1_pcm_channel_alloc(epcm, params_channels(hw_params))) < 0) ··· 416 412 epcm->start_addr = 0; 417 413 if (! epcm->memblk) 418 414 return -ENOMEM; 419 - mapped = ((emu10k1_memblk_t *)epcm->memblk)->mapped_page; 415 + mapped = ((struct snd_emu10k1_memblk *)epcm->memblk)->mapped_page; 420 416 if (mapped < 0) 421 417 return -ENOMEM; 422 418 epcm->start_addr = mapped << PAGE_SHIFT; ··· 424 420 return 0; 425 421 } 426 422 427 - static int snd_emu10k1_playback_hw_free(snd_pcm_substream_t * substream) 423 + static int snd_emu10k1_playback_hw_free(struct snd_pcm_substream *substream) 428 424 { 429 - emu10k1_t *emu = snd_pcm_substream_chip(substream); 430 - snd_pcm_runtime_t *runtime = substream->runtime; 431 - emu10k1_pcm_t *epcm; 425 + struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); 426 + struct snd_pcm_runtime *runtime = substream->runtime; 427 + struct snd_emu10k1_pcm *epcm; 432 428 433 429 if (runtime->private_data == NULL) 434 430 return 0; ··· 454 450 return 0; 455 451 } 456 452 457 - static int snd_emu10k1_efx_playback_hw_free(snd_pcm_substream_t * substream) 453 + static int snd_emu10k1_efx_playback_hw_free(struct snd_pcm_substream *substream) 458 454 { 459 - emu10k1_t *emu = snd_pcm_substream_chip(substream); 460 - snd_pcm_runtime_t *runtime = substream->runtime; 461 - emu10k1_pcm_t *epcm; 455 + struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); 456 + struct snd_pcm_runtime *runtime = substream->runtime; 457 + struct snd_emu10k1_pcm *epcm; 462 458 int i; 463 459 464 460 if (runtime->private_data == NULL) ··· 483 479 return 0; 484 480 } 485 481 486 - static int snd_emu10k1_playback_prepare(snd_pcm_substream_t * substream) 482 + static int snd_emu10k1_playback_prepare(struct snd_pcm_substream *substream) 487 483 { 488 - emu10k1_t *emu = snd_pcm_substream_chip(substream); 489 - snd_pcm_runtime_t *runtime = substream->runtime; 490 - emu10k1_pcm_t *epcm = runtime->private_data; 484 + struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); 485 + struct snd_pcm_runtime *runtime = substream->runtime; 486 + struct snd_emu10k1_pcm *epcm = runtime->private_data; 491 487 unsigned int start_addr, end_addr; 492 488 493 489 start_addr = epcm->start_addr; ··· 511 507 return 0; 512 508 } 513 509 514 - static int snd_emu10k1_efx_playback_prepare(snd_pcm_substream_t * substream) 510 + static int snd_emu10k1_efx_playback_prepare(struct snd_pcm_substream *substream) 515 511 { 516 - emu10k1_t *emu = snd_pcm_substream_chip(substream); 517 - snd_pcm_runtime_t *runtime = substream->runtime; 518 - emu10k1_pcm_t *epcm = runtime->private_data; 512 + struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); 513 + struct snd_pcm_runtime *runtime = substream->runtime; 514 + struct snd_emu10k1_pcm *epcm = runtime->private_data; 519 515 unsigned int start_addr, end_addr; 520 516 unsigned int channel_size; 521 517 int i; ··· 547 543 return 0; 548 544 } 549 545 550 - static snd_pcm_hardware_t snd_emu10k1_efx_playback = 546 + static struct snd_pcm_hardware snd_emu10k1_efx_playback = 551 547 { 552 548 .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_NONINTERLEAVED | 553 549 SNDRV_PCM_INFO_BLOCK_TRANSFER | ··· 566 562 .fifo_size = 0, 567 563 }; 568 564 569 - static int snd_emu10k1_capture_hw_params(snd_pcm_substream_t * substream, 570 - snd_pcm_hw_params_t * hw_params) 565 + static int snd_emu10k1_capture_hw_params(struct snd_pcm_substream *substream, 566 + struct snd_pcm_hw_params *hw_params) 571 567 { 572 568 return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params)); 573 569 } 574 570 575 - static int snd_emu10k1_capture_hw_free(snd_pcm_substream_t * substream) 571 + static int snd_emu10k1_capture_hw_free(struct snd_pcm_substream *substream) 576 572 { 577 573 return snd_pcm_lib_free_pages(substream); 578 574 } 579 575 580 - static int snd_emu10k1_capture_prepare(snd_pcm_substream_t * substream) 576 + static int snd_emu10k1_capture_prepare(struct snd_pcm_substream *substream) 581 577 { 582 - emu10k1_t *emu = snd_pcm_substream_chip(substream); 583 - snd_pcm_runtime_t *runtime = substream->runtime; 584 - emu10k1_pcm_t *epcm = runtime->private_data; 578 + struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); 579 + struct snd_pcm_runtime *runtime = substream->runtime; 580 + struct snd_emu10k1_pcm *epcm = runtime->private_data; 585 581 int idx; 586 582 587 583 /* zeroing the buffer size will stop capture */ ··· 624 620 return 0; 625 621 } 626 622 627 - static void snd_emu10k1_playback_invalidate_cache(emu10k1_t *emu, int extra, emu10k1_voice_t *evoice) 623 + static void snd_emu10k1_playback_invalidate_cache(struct snd_emu10k1 *emu, int extra, struct snd_emu10k1_voice *evoice) 628 624 { 629 - snd_pcm_runtime_t *runtime; 625 + struct snd_pcm_runtime *runtime; 630 626 unsigned int voice, stereo, i, ccis, cra = 64, cs, sample; 631 627 632 628 if (evoice == NULL) ··· 659 655 } 660 656 } 661 657 662 - static void snd_emu10k1_playback_prepare_voice(emu10k1_t *emu, emu10k1_voice_t *evoice, 658 + static void snd_emu10k1_playback_prepare_voice(struct snd_emu10k1 *emu, struct snd_emu10k1_voice *evoice, 663 659 int master, int extra, 664 - emu10k1_pcm_mixer_t *mix) 660 + struct snd_emu10k1_pcm_mixer *mix) 665 661 { 666 - snd_pcm_substream_t *substream; 667 - snd_pcm_runtime_t *runtime; 662 + struct snd_pcm_substream *substream; 663 + struct snd_pcm_runtime *runtime; 668 664 unsigned int attn, vattn; 669 665 unsigned int voice, tmp; 670 666 ··· 684 680 snd_emu10k1_voice_clear_loop_stop(emu, voice); 685 681 } 686 682 687 - static void snd_emu10k1_playback_trigger_voice(emu10k1_t *emu, emu10k1_voice_t *evoice, int master, int extra) 683 + static void snd_emu10k1_playback_trigger_voice(struct snd_emu10k1 *emu, struct snd_emu10k1_voice *evoice, int master, int extra) 688 684 { 689 - snd_pcm_substream_t *substream; 690 - snd_pcm_runtime_t *runtime; 685 + struct snd_pcm_substream *substream; 686 + struct snd_pcm_runtime *runtime; 691 687 unsigned int voice, pitch, pitch_target; 692 688 693 689 if (evoice == NULL) /* skip second voice for mono */ ··· 706 702 snd_emu10k1_voice_intr_enable(emu, voice); 707 703 } 708 704 709 - static void snd_emu10k1_playback_stop_voice(emu10k1_t *emu, emu10k1_voice_t *evoice) 705 + static void snd_emu10k1_playback_stop_voice(struct snd_emu10k1 *emu, struct snd_emu10k1_voice *evoice) 710 706 { 711 707 unsigned int voice; 712 708 ··· 722 718 snd_emu10k1_ptr_write(emu, IP, voice, 0); 723 719 } 724 720 725 - static int snd_emu10k1_playback_trigger(snd_pcm_substream_t * substream, 721 + static int snd_emu10k1_playback_trigger(struct snd_pcm_substream *substream, 726 722 int cmd) 727 723 { 728 - emu10k1_t *emu = snd_pcm_substream_chip(substream); 729 - snd_pcm_runtime_t *runtime = substream->runtime; 730 - emu10k1_pcm_t *epcm = runtime->private_data; 731 - emu10k1_pcm_mixer_t *mix; 724 + struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); 725 + struct snd_pcm_runtime *runtime = substream->runtime; 726 + struct snd_emu10k1_pcm *epcm = runtime->private_data; 727 + struct snd_emu10k1_pcm_mixer *mix; 732 728 int result = 0; 733 729 734 730 // printk("trigger - emu10k1 = 0x%x, cmd = %i, pointer = %i\n", (int)emu, cmd, substream->ops->pointer(substream)); ··· 763 759 return result; 764 760 } 765 761 766 - static int snd_emu10k1_capture_trigger(snd_pcm_substream_t * substream, 762 + static int snd_emu10k1_capture_trigger(struct snd_pcm_substream *substream, 767 763 int cmd) 768 764 { 769 - emu10k1_t *emu = snd_pcm_substream_chip(substream); 770 - snd_pcm_runtime_t *runtime = substream->runtime; 771 - emu10k1_pcm_t *epcm = runtime->private_data; 765 + struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); 766 + struct snd_pcm_runtime *runtime = substream->runtime; 767 + struct snd_emu10k1_pcm *epcm = runtime->private_data; 772 768 int result = 0; 773 769 774 770 spin_lock(&emu->reg_lock); ··· 823 819 return result; 824 820 } 825 821 826 - static snd_pcm_uframes_t snd_emu10k1_playback_pointer(snd_pcm_substream_t * substream) 822 + static snd_pcm_uframes_t snd_emu10k1_playback_pointer(struct snd_pcm_substream *substream) 827 823 { 828 - emu10k1_t *emu = snd_pcm_substream_chip(substream); 829 - snd_pcm_runtime_t *runtime = substream->runtime; 830 - emu10k1_pcm_t *epcm = runtime->private_data; 824 + struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); 825 + struct snd_pcm_runtime *runtime = substream->runtime; 826 + struct snd_emu10k1_pcm *epcm = runtime->private_data; 831 827 unsigned int ptr; 832 828 833 829 if (!epcm->running) ··· 851 847 } 852 848 853 849 854 - static int snd_emu10k1_efx_playback_trigger(snd_pcm_substream_t * substream, 850 + static int snd_emu10k1_efx_playback_trigger(struct snd_pcm_substream *substream, 855 851 int cmd) 856 852 { 857 - emu10k1_t *emu = snd_pcm_substream_chip(substream); 858 - snd_pcm_runtime_t *runtime = substream->runtime; 859 - emu10k1_pcm_t *epcm = runtime->private_data; 853 + struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); 854 + struct snd_pcm_runtime *runtime = substream->runtime; 855 + struct snd_emu10k1_pcm *epcm = runtime->private_data; 860 856 int i; 861 857 int result = 0; 862 858 ··· 900 896 } 901 897 902 898 903 - static snd_pcm_uframes_t snd_emu10k1_capture_pointer(snd_pcm_substream_t * substream) 899 + static snd_pcm_uframes_t snd_emu10k1_capture_pointer(struct snd_pcm_substream *substream) 904 900 { 905 - emu10k1_t *emu = snd_pcm_substream_chip(substream); 906 - snd_pcm_runtime_t *runtime = substream->runtime; 907 - emu10k1_pcm_t *epcm = runtime->private_data; 901 + struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); 902 + struct snd_pcm_runtime *runtime = substream->runtime; 903 + struct snd_emu10k1_pcm *epcm = runtime->private_data; 908 904 unsigned int ptr; 909 905 910 906 if (!epcm->running) ··· 921 917 * Playback support device description 922 918 */ 923 919 924 - static snd_pcm_hardware_t snd_emu10k1_playback = 920 + static struct snd_pcm_hardware snd_emu10k1_playback = 925 921 { 926 922 .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | 927 923 SNDRV_PCM_INFO_BLOCK_TRANSFER | ··· 944 940 * Capture support device description 945 941 */ 946 942 947 - static snd_pcm_hardware_t snd_emu10k1_capture = 943 + static struct snd_pcm_hardware snd_emu10k1_capture = 948 944 { 949 945 .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | 950 946 SNDRV_PCM_INFO_BLOCK_TRANSFER | ··· 967 963 * 968 964 */ 969 965 970 - static void snd_emu10k1_pcm_mixer_notify1(emu10k1_t *emu, snd_kcontrol_t *kctl, int idx, int activate) 966 + static void snd_emu10k1_pcm_mixer_notify1(struct snd_emu10k1 *emu, struct snd_kcontrol *kctl, int idx, int activate) 971 967 { 972 - snd_ctl_elem_id_t id; 968 + struct snd_ctl_elem_id id; 973 969 974 970 if (! kctl) 975 971 return; ··· 982 978 snd_ctl_build_ioff(&id, kctl, idx)); 983 979 } 984 980 985 - static void snd_emu10k1_pcm_mixer_notify(emu10k1_t *emu, int idx, int activate) 981 + static void snd_emu10k1_pcm_mixer_notify(struct snd_emu10k1 *emu, int idx, int activate) 986 982 { 987 983 snd_emu10k1_pcm_mixer_notify1(emu, emu->ctl_send_routing, idx, activate); 988 984 snd_emu10k1_pcm_mixer_notify1(emu, emu->ctl_send_volume, idx, activate); 989 985 snd_emu10k1_pcm_mixer_notify1(emu, emu->ctl_attn, idx, activate); 990 986 } 991 987 992 - static void snd_emu10k1_pcm_efx_mixer_notify(emu10k1_t *emu, int idx, int activate) 988 + static void snd_emu10k1_pcm_efx_mixer_notify(struct snd_emu10k1 *emu, int idx, int activate) 993 989 { 994 990 snd_emu10k1_pcm_mixer_notify1(emu, emu->ctl_efx_send_routing, idx, activate); 995 991 snd_emu10k1_pcm_mixer_notify1(emu, emu->ctl_efx_send_volume, idx, activate); 996 992 snd_emu10k1_pcm_mixer_notify1(emu, emu->ctl_efx_attn, idx, activate); 997 993 } 998 994 999 - static void snd_emu10k1_pcm_free_substream(snd_pcm_runtime_t *runtime) 995 + static void snd_emu10k1_pcm_free_substream(struct snd_pcm_runtime *runtime) 1000 996 { 1001 997 kfree(runtime->private_data); 1002 998 } 1003 999 1004 - static int snd_emu10k1_efx_playback_close(snd_pcm_substream_t * substream) 1000 + static int snd_emu10k1_efx_playback_close(struct snd_pcm_substream *substream) 1005 1001 { 1006 - emu10k1_t *emu = snd_pcm_substream_chip(substream); 1007 - emu10k1_pcm_mixer_t *mix; 1002 + struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); 1003 + struct snd_emu10k1_pcm_mixer *mix; 1008 1004 int i; 1009 1005 1010 1006 for (i=0; i < NUM_EFX_PLAYBACK; i++) { ··· 1015 1011 return 0; 1016 1012 } 1017 1013 1018 - static int snd_emu10k1_efx_playback_open(snd_pcm_substream_t * substream) 1014 + static int snd_emu10k1_efx_playback_open(struct snd_pcm_substream *substream) 1019 1015 { 1020 - emu10k1_t *emu = snd_pcm_substream_chip(substream); 1021 - emu10k1_pcm_t *epcm; 1022 - emu10k1_pcm_mixer_t *mix; 1023 - snd_pcm_runtime_t *runtime = substream->runtime; 1016 + struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); 1017 + struct snd_emu10k1_pcm *epcm; 1018 + struct snd_emu10k1_pcm_mixer *mix; 1019 + struct snd_pcm_runtime *runtime = substream->runtime; 1024 1020 int i; 1025 1021 1026 1022 epcm = kzalloc(sizeof(*epcm), GFP_KERNEL); ··· 1048 1044 return 0; 1049 1045 } 1050 1046 1051 - static int snd_emu10k1_playback_open(snd_pcm_substream_t * substream) 1047 + static int snd_emu10k1_playback_open(struct snd_pcm_substream *substream) 1052 1048 { 1053 - emu10k1_t *emu = snd_pcm_substream_chip(substream); 1054 - emu10k1_pcm_t *epcm; 1055 - emu10k1_pcm_mixer_t *mix; 1056 - snd_pcm_runtime_t *runtime = substream->runtime; 1049 + struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); 1050 + struct snd_emu10k1_pcm *epcm; 1051 + struct snd_emu10k1_pcm_mixer *mix; 1052 + struct snd_pcm_runtime *runtime = substream->runtime; 1057 1053 int i, err; 1058 1054 1059 1055 epcm = kzalloc(sizeof(*epcm), GFP_KERNEL); ··· 1085 1081 return 0; 1086 1082 } 1087 1083 1088 - static int snd_emu10k1_playback_close(snd_pcm_substream_t * substream) 1084 + static int snd_emu10k1_playback_close(struct snd_pcm_substream *substream) 1089 1085 { 1090 - emu10k1_t *emu = snd_pcm_substream_chip(substream); 1091 - emu10k1_pcm_mixer_t *mix = &emu->pcm_mixer[substream->number]; 1086 + struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); 1087 + struct snd_emu10k1_pcm_mixer *mix = &emu->pcm_mixer[substream->number]; 1092 1088 1093 1089 mix->epcm = NULL; 1094 1090 snd_emu10k1_pcm_mixer_notify(emu, substream->number, 0); 1095 1091 return 0; 1096 1092 } 1097 1093 1098 - static int snd_emu10k1_capture_open(snd_pcm_substream_t * substream) 1094 + static int snd_emu10k1_capture_open(struct snd_pcm_substream *substream) 1099 1095 { 1100 - emu10k1_t *emu = snd_pcm_substream_chip(substream); 1101 - snd_pcm_runtime_t *runtime = substream->runtime; 1102 - emu10k1_pcm_t *epcm; 1096 + struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); 1097 + struct snd_pcm_runtime *runtime = substream->runtime; 1098 + struct snd_emu10k1_pcm *epcm; 1103 1099 1104 1100 epcm = kzalloc(sizeof(*epcm), GFP_KERNEL); 1105 1101 if (epcm == NULL) ··· 1122 1118 return 0; 1123 1119 } 1124 1120 1125 - static int snd_emu10k1_capture_close(snd_pcm_substream_t * substream) 1121 + static int snd_emu10k1_capture_close(struct snd_pcm_substream *substream) 1126 1122 { 1127 - emu10k1_t *emu = snd_pcm_substream_chip(substream); 1123 + struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); 1128 1124 1129 1125 emu->capture_interrupt = NULL; 1130 1126 emu->pcm_capture_substream = NULL; 1131 1127 return 0; 1132 1128 } 1133 1129 1134 - static int snd_emu10k1_capture_mic_open(snd_pcm_substream_t * substream) 1130 + static int snd_emu10k1_capture_mic_open(struct snd_pcm_substream *substream) 1135 1131 { 1136 - emu10k1_t *emu = snd_pcm_substream_chip(substream); 1137 - emu10k1_pcm_t *epcm; 1138 - snd_pcm_runtime_t *runtime = substream->runtime; 1132 + struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); 1133 + struct snd_emu10k1_pcm *epcm; 1134 + struct snd_pcm_runtime *runtime = substream->runtime; 1139 1135 1140 1136 epcm = kzalloc(sizeof(*epcm), GFP_KERNEL); 1141 1137 if (epcm == NULL) ··· 1160 1156 return 0; 1161 1157 } 1162 1158 1163 - static int snd_emu10k1_capture_mic_close(snd_pcm_substream_t * substream) 1159 + static int snd_emu10k1_capture_mic_close(struct snd_pcm_substream *substream) 1164 1160 { 1165 - emu10k1_t *emu = snd_pcm_substream_chip(substream); 1161 + struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); 1166 1162 1167 1163 emu->capture_interrupt = NULL; 1168 1164 emu->pcm_capture_mic_substream = NULL; 1169 1165 return 0; 1170 1166 } 1171 1167 1172 - static int snd_emu10k1_capture_efx_open(snd_pcm_substream_t * substream) 1168 + static int snd_emu10k1_capture_efx_open(struct snd_pcm_substream *substream) 1173 1169 { 1174 - emu10k1_t *emu = snd_pcm_substream_chip(substream); 1175 - emu10k1_pcm_t *epcm; 1176 - snd_pcm_runtime_t *runtime = substream->runtime; 1170 + struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); 1171 + struct snd_emu10k1_pcm *epcm; 1172 + struct snd_pcm_runtime *runtime = substream->runtime; 1177 1173 int nefx = emu->audigy ? 64 : 32; 1178 1174 int idx; 1179 1175 ··· 1210 1206 return 0; 1211 1207 } 1212 1208 1213 - static int snd_emu10k1_capture_efx_close(snd_pcm_substream_t * substream) 1209 + static int snd_emu10k1_capture_efx_close(struct snd_pcm_substream *substream) 1214 1210 { 1215 - emu10k1_t *emu = snd_pcm_substream_chip(substream); 1211 + struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); 1216 1212 1217 1213 emu->capture_interrupt = NULL; 1218 1214 emu->pcm_capture_efx_substream = NULL; 1219 1215 return 0; 1220 1216 } 1221 1217 1222 - static snd_pcm_ops_t snd_emu10k1_playback_ops = { 1218 + static struct snd_pcm_ops snd_emu10k1_playback_ops = { 1223 1219 .open = snd_emu10k1_playback_open, 1224 1220 .close = snd_emu10k1_playback_close, 1225 1221 .ioctl = snd_pcm_lib_ioctl, ··· 1231 1227 .page = snd_pcm_sgbuf_ops_page, 1232 1228 }; 1233 1229 1234 - static snd_pcm_ops_t snd_emu10k1_capture_ops = { 1230 + static struct snd_pcm_ops snd_emu10k1_capture_ops = { 1235 1231 .open = snd_emu10k1_capture_open, 1236 1232 .close = snd_emu10k1_capture_close, 1237 1233 .ioctl = snd_pcm_lib_ioctl, ··· 1243 1239 }; 1244 1240 1245 1241 /* EFX playback */ 1246 - static snd_pcm_ops_t snd_emu10k1_efx_playback_ops = { 1242 + static struct snd_pcm_ops snd_emu10k1_efx_playback_ops = { 1247 1243 .open = snd_emu10k1_efx_playback_open, 1248 1244 .close = snd_emu10k1_efx_playback_close, 1249 1245 .ioctl = snd_pcm_lib_ioctl, ··· 1255 1251 .page = snd_pcm_sgbuf_ops_page, 1256 1252 }; 1257 1253 1258 - int __devinit snd_emu10k1_pcm(emu10k1_t * emu, int device, snd_pcm_t ** rpcm) 1254 + int __devinit snd_emu10k1_pcm(struct snd_emu10k1 * emu, int device, struct snd_pcm ** rpcm) 1259 1255 { 1260 - snd_pcm_t *pcm; 1261 - snd_pcm_substream_t *substream; 1256 + struct snd_pcm *pcm; 1257 + struct snd_pcm_substream *substream; 1262 1258 int err; 1263 1259 1264 1260 if (rpcm) ··· 1290 1286 return 0; 1291 1287 } 1292 1288 1293 - int __devinit snd_emu10k1_pcm_multi(emu10k1_t * emu, int device, snd_pcm_t ** rpcm) 1289 + int __devinit snd_emu10k1_pcm_multi(struct snd_emu10k1 * emu, int device, struct snd_pcm ** rpcm) 1294 1290 { 1295 - snd_pcm_t *pcm; 1296 - snd_pcm_substream_t *substream; 1291 + struct snd_pcm *pcm; 1292 + struct snd_pcm_substream *substream; 1297 1293 int err; 1298 1294 1299 1295 if (rpcm) ··· 1322 1318 } 1323 1319 1324 1320 1325 - static snd_pcm_ops_t snd_emu10k1_capture_mic_ops = { 1321 + static struct snd_pcm_ops snd_emu10k1_capture_mic_ops = { 1326 1322 .open = snd_emu10k1_capture_mic_open, 1327 1323 .close = snd_emu10k1_capture_mic_close, 1328 1324 .ioctl = snd_pcm_lib_ioctl, ··· 1333 1329 .pointer = snd_emu10k1_capture_pointer, 1334 1330 }; 1335 1331 1336 - int __devinit snd_emu10k1_pcm_mic(emu10k1_t * emu, int device, snd_pcm_t ** rpcm) 1332 + int __devinit snd_emu10k1_pcm_mic(struct snd_emu10k1 * emu, int device, struct snd_pcm ** rpcm) 1337 1333 { 1338 - snd_pcm_t *pcm; 1334 + struct snd_pcm *pcm; 1339 1335 int err; 1340 1336 1341 1337 if (rpcm) ··· 1359 1355 return 0; 1360 1356 } 1361 1357 1362 - static int snd_emu10k1_pcm_efx_voices_mask_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) 1358 + static int snd_emu10k1_pcm_efx_voices_mask_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) 1363 1359 { 1364 - emu10k1_t *emu = snd_kcontrol_chip(kcontrol); 1360 + struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol); 1365 1361 int nefx = emu->audigy ? 64 : 32; 1366 1362 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; 1367 1363 uinfo->count = nefx; ··· 1370 1366 return 0; 1371 1367 } 1372 1368 1373 - static int snd_emu10k1_pcm_efx_voices_mask_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 1369 + static int snd_emu10k1_pcm_efx_voices_mask_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 1374 1370 { 1375 - emu10k1_t *emu = snd_kcontrol_chip(kcontrol); 1371 + struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol); 1376 1372 int nefx = emu->audigy ? 64 : 32; 1377 1373 int idx; 1378 1374 ··· 1383 1379 return 0; 1384 1380 } 1385 1381 1386 - static int snd_emu10k1_pcm_efx_voices_mask_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 1382 + static int snd_emu10k1_pcm_efx_voices_mask_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 1387 1383 { 1388 - emu10k1_t *emu = snd_kcontrol_chip(kcontrol); 1384 + struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol); 1389 1385 unsigned int nval[2], bits; 1390 1386 int nefx = emu->audigy ? 64 : 32; 1391 1387 int nefxb = emu->audigy ? 7 : 6; ··· 1414 1410 return change; 1415 1411 } 1416 1412 1417 - static snd_kcontrol_new_t snd_emu10k1_pcm_efx_voices_mask = { 1413 + static struct snd_kcontrol_new snd_emu10k1_pcm_efx_voices_mask = { 1418 1414 .iface = SNDRV_CTL_ELEM_IFACE_PCM, 1419 1415 .name = "Captured FX8010 Outputs", 1420 1416 .info = snd_emu10k1_pcm_efx_voices_mask_info, ··· 1422 1418 .put = snd_emu10k1_pcm_efx_voices_mask_put 1423 1419 }; 1424 1420 1425 - static snd_pcm_ops_t snd_emu10k1_capture_efx_ops = { 1421 + static struct snd_pcm_ops snd_emu10k1_capture_efx_ops = { 1426 1422 .open = snd_emu10k1_capture_efx_open, 1427 1423 .close = snd_emu10k1_capture_efx_close, 1428 1424 .ioctl = snd_pcm_lib_ioctl, ··· 1439 1435 #define INITIAL_TRAM_SHIFT 14 1440 1436 #define INITIAL_TRAM_POS(size) ((((size) / 2) - INITIAL_TRAM_SHIFT) - 1) 1441 1437 1442 - static void snd_emu10k1_fx8010_playback_irq(emu10k1_t *emu, void *private_data) 1438 + static void snd_emu10k1_fx8010_playback_irq(struct snd_emu10k1 *emu, void *private_data) 1443 1439 { 1444 - snd_pcm_substream_t *substream = private_data; 1440 + struct snd_pcm_substream *substream = private_data; 1445 1441 snd_pcm_period_elapsed(substream); 1446 1442 } 1447 1443 ··· 1465 1461 } 1466 1462 } 1467 1463 1468 - static void fx8010_pb_trans_copy(snd_pcm_substream_t *substream, 1469 - snd_pcm_indirect_t *rec, size_t bytes) 1464 + static void fx8010_pb_trans_copy(struct snd_pcm_substream *substream, 1465 + struct snd_pcm_indirect *rec, size_t bytes) 1470 1466 { 1471 - emu10k1_t *emu = snd_pcm_substream_chip(substream); 1472 - snd_emu10k1_fx8010_pcm_t *pcm = &emu->fx8010.pcm[substream->number]; 1467 + struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); 1468 + struct snd_emu10k1_fx8010_pcm *pcm = &emu->fx8010.pcm[substream->number]; 1473 1469 unsigned int tram_size = pcm->buffer_size; 1474 1470 unsigned short *src = (unsigned short *)(substream->runtime->dma_area + rec->sw_data); 1475 1471 unsigned int frames = bytes >> 2, count; ··· 1494 1490 pcm->tram_shift = tram_shift; 1495 1491 } 1496 1492 1497 - static int snd_emu10k1_fx8010_playback_transfer(snd_pcm_substream_t *substream) 1493 + static int snd_emu10k1_fx8010_playback_transfer(struct snd_pcm_substream *substream) 1498 1494 { 1499 - emu10k1_t *emu = snd_pcm_substream_chip(substream); 1500 - snd_emu10k1_fx8010_pcm_t *pcm = &emu->fx8010.pcm[substream->number]; 1495 + struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); 1496 + struct snd_emu10k1_fx8010_pcm *pcm = &emu->fx8010.pcm[substream->number]; 1501 1497 1502 1498 snd_pcm_indirect_playback_transfer(substream, &pcm->pcm_rec, fx8010_pb_trans_copy); 1503 1499 return 0; 1504 1500 } 1505 1501 1506 - static int snd_emu10k1_fx8010_playback_hw_params(snd_pcm_substream_t * substream, 1507 - snd_pcm_hw_params_t * hw_params) 1502 + static int snd_emu10k1_fx8010_playback_hw_params(struct snd_pcm_substream *substream, 1503 + struct snd_pcm_hw_params *hw_params) 1508 1504 { 1509 1505 return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params)); 1510 1506 } 1511 1507 1512 - static int snd_emu10k1_fx8010_playback_hw_free(snd_pcm_substream_t * substream) 1508 + static int snd_emu10k1_fx8010_playback_hw_free(struct snd_pcm_substream *substream) 1513 1509 { 1514 - emu10k1_t *emu = snd_pcm_substream_chip(substream); 1515 - snd_emu10k1_fx8010_pcm_t *pcm = &emu->fx8010.pcm[substream->number]; 1510 + struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); 1511 + struct snd_emu10k1_fx8010_pcm *pcm = &emu->fx8010.pcm[substream->number]; 1516 1512 unsigned int i; 1517 1513 1518 1514 for (i = 0; i < pcm->channels; i++) ··· 1521 1517 return 0; 1522 1518 } 1523 1519 1524 - static int snd_emu10k1_fx8010_playback_prepare(snd_pcm_substream_t * substream) 1520 + static int snd_emu10k1_fx8010_playback_prepare(struct snd_pcm_substream *substream) 1525 1521 { 1526 - emu10k1_t *emu = snd_pcm_substream_chip(substream); 1527 - snd_pcm_runtime_t *runtime = substream->runtime; 1528 - snd_emu10k1_fx8010_pcm_t *pcm = &emu->fx8010.pcm[substream->number]; 1522 + struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); 1523 + struct snd_pcm_runtime *runtime = substream->runtime; 1524 + struct snd_emu10k1_fx8010_pcm *pcm = &emu->fx8010.pcm[substream->number]; 1529 1525 unsigned int i; 1530 1526 1531 1527 // printk("prepare: etram_pages = 0x%p, dma_area = 0x%x, buffer_size = 0x%x (0x%x)\n", emu->fx8010.etram_pages, runtime->dma_area, runtime->buffer_size, runtime->buffer_size << 2); ··· 1545 1541 return 0; 1546 1542 } 1547 1543 1548 - static int snd_emu10k1_fx8010_playback_trigger(snd_pcm_substream_t * substream, int cmd) 1544 + static int snd_emu10k1_fx8010_playback_trigger(struct snd_pcm_substream *substream, int cmd) 1549 1545 { 1550 - emu10k1_t *emu = snd_pcm_substream_chip(substream); 1551 - snd_emu10k1_fx8010_pcm_t *pcm = &emu->fx8010.pcm[substream->number]; 1546 + struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); 1547 + struct snd_emu10k1_fx8010_pcm *pcm = &emu->fx8010.pcm[substream->number]; 1552 1548 int result = 0; 1553 1549 1554 1550 spin_lock(&emu->reg_lock); ··· 1590 1586 return result; 1591 1587 } 1592 1588 1593 - static snd_pcm_uframes_t snd_emu10k1_fx8010_playback_pointer(snd_pcm_substream_t * substream) 1589 + static snd_pcm_uframes_t snd_emu10k1_fx8010_playback_pointer(struct snd_pcm_substream *substream) 1594 1590 { 1595 - emu10k1_t *emu = snd_pcm_substream_chip(substream); 1596 - snd_emu10k1_fx8010_pcm_t *pcm = &emu->fx8010.pcm[substream->number]; 1591 + struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); 1592 + struct snd_emu10k1_fx8010_pcm *pcm = &emu->fx8010.pcm[substream->number]; 1597 1593 size_t ptr; /* byte pointer */ 1598 1594 1599 1595 if (!snd_emu10k1_ptr_read(emu, emu->gpr_base + pcm->gpr_trigger, 0)) ··· 1602 1598 return snd_pcm_indirect_playback_pointer(substream, &pcm->pcm_rec, ptr); 1603 1599 } 1604 1600 1605 - static snd_pcm_hardware_t snd_emu10k1_fx8010_playback = 1601 + static struct snd_pcm_hardware snd_emu10k1_fx8010_playback = 1606 1602 { 1607 1603 .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | 1608 1604 /* SNDRV_PCM_INFO_MMAP_VALID | */ SNDRV_PCM_INFO_PAUSE), ··· 1620 1616 .fifo_size = 0, 1621 1617 }; 1622 1618 1623 - static int snd_emu10k1_fx8010_playback_open(snd_pcm_substream_t * substream) 1619 + static int snd_emu10k1_fx8010_playback_open(struct snd_pcm_substream *substream) 1624 1620 { 1625 - emu10k1_t *emu = snd_pcm_substream_chip(substream); 1626 - snd_pcm_runtime_t *runtime = substream->runtime; 1627 - snd_emu10k1_fx8010_pcm_t *pcm = &emu->fx8010.pcm[substream->number]; 1621 + struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); 1622 + struct snd_pcm_runtime *runtime = substream->runtime; 1623 + struct snd_emu10k1_fx8010_pcm *pcm = &emu->fx8010.pcm[substream->number]; 1628 1624 1629 1625 runtime->hw = snd_emu10k1_fx8010_playback; 1630 1626 runtime->hw.channels_min = runtime->hw.channels_max = pcm->channels; ··· 1639 1635 return 0; 1640 1636 } 1641 1637 1642 - static int snd_emu10k1_fx8010_playback_close(snd_pcm_substream_t * substream) 1638 + static int snd_emu10k1_fx8010_playback_close(struct snd_pcm_substream *substream) 1643 1639 { 1644 - emu10k1_t *emu = snd_pcm_substream_chip(substream); 1645 - snd_emu10k1_fx8010_pcm_t *pcm = &emu->fx8010.pcm[substream->number]; 1640 + struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); 1641 + struct snd_emu10k1_fx8010_pcm *pcm = &emu->fx8010.pcm[substream->number]; 1646 1642 1647 1643 spin_lock_irq(&emu->reg_lock); 1648 1644 pcm->opened = 0; ··· 1650 1646 return 0; 1651 1647 } 1652 1648 1653 - static snd_pcm_ops_t snd_emu10k1_fx8010_playback_ops = { 1649 + static struct snd_pcm_ops snd_emu10k1_fx8010_playback_ops = { 1654 1650 .open = snd_emu10k1_fx8010_playback_open, 1655 1651 .close = snd_emu10k1_fx8010_playback_close, 1656 1652 .ioctl = snd_pcm_lib_ioctl, ··· 1662 1658 .ack = snd_emu10k1_fx8010_playback_transfer, 1663 1659 }; 1664 1660 1665 - int __devinit snd_emu10k1_pcm_efx(emu10k1_t * emu, int device, snd_pcm_t ** rpcm) 1661 + int __devinit snd_emu10k1_pcm_efx(struct snd_emu10k1 * emu, int device, struct snd_pcm ** rpcm) 1666 1662 { 1667 - snd_pcm_t *pcm; 1668 - snd_kcontrol_t *kctl; 1663 + struct snd_pcm *pcm; 1664 + struct snd_kcontrol *kctl; 1669 1665 int err; 1670 1666 1671 1667 if (rpcm)
+51 -50
sound/pci/emu10k1/emuproc.c
··· 32 32 #include <sound/emu10k1.h> 33 33 #include "p16v.h" 34 34 35 - static void snd_emu10k1_proc_spdif_status(emu10k1_t * emu, 36 - snd_info_buffer_t * buffer, 35 + static void snd_emu10k1_proc_spdif_status(struct snd_emu10k1 * emu, 36 + struct snd_info_buffer *buffer, 37 37 char *title, 38 38 int status_reg, 39 39 int rate_reg) ··· 75 75 76 76 } 77 77 78 - static void snd_emu10k1_proc_read(snd_info_entry_t *entry, 79 - snd_info_buffer_t * buffer) 78 + static void snd_emu10k1_proc_read(struct snd_info_entry *entry, 79 + struct snd_info_buffer *buffer) 80 80 { 81 81 /* FIXME - output names are in emufx.c too */ 82 82 static char *creative_outs[32] = { ··· 181 181 /* 63 */ "FXBUS2_31" 182 182 }; 183 183 184 - emu10k1_t *emu = entry->private_data; 184 + struct snd_emu10k1 *emu = entry->private_data; 185 185 unsigned int val, val1; 186 186 int nefx = emu->audigy ? 64 : 32; 187 187 char **outputs = emu->audigy ? audigy_outs : creative_outs; ··· 232 232 snd_iprintf(buffer, " Output %02i [%s]\n", idx, outputs[idx]); 233 233 } 234 234 235 - static void snd_emu10k1_proc_spdif_read(snd_info_entry_t *entry, 236 - snd_info_buffer_t * buffer) 235 + static void snd_emu10k1_proc_spdif_read(struct snd_info_entry *entry, 236 + struct snd_info_buffer *buffer) 237 237 { 238 - emu10k1_t *emu = entry->private_data; 238 + struct snd_emu10k1 *emu = entry->private_data; 239 239 snd_emu10k1_proc_spdif_status(emu, buffer, "CD-ROM S/PDIF In", CDCS, CDSRCS); 240 240 snd_emu10k1_proc_spdif_status(emu, buffer, "Optical or Coax S/PDIF In", GPSCS, GPSRCS); 241 241 #if 0 ··· 246 246 #endif 247 247 } 248 248 249 - static void snd_emu10k1_proc_rates_read(snd_info_entry_t *entry, 250 - snd_info_buffer_t * buffer) 249 + static void snd_emu10k1_proc_rates_read(struct snd_info_entry *entry, 250 + struct snd_info_buffer *buffer) 251 251 { 252 252 static int samplerate[8] = { 44100, 48000, 96000, 192000, 4, 5, 6, 7 }; 253 - emu10k1_t *emu = entry->private_data; 253 + struct snd_emu10k1 *emu = entry->private_data; 254 254 unsigned int val, tmp, n; 255 255 val = snd_emu10k1_ptr20_read(emu, CAPTURE_RATE_STATUS, 0); 256 256 tmp = (val >> 16) & 0x8; ··· 261 261 } 262 262 } 263 263 264 - static void snd_emu10k1_proc_acode_read(snd_info_entry_t *entry, 265 - snd_info_buffer_t * buffer) 264 + static void snd_emu10k1_proc_acode_read(struct snd_info_entry *entry, 265 + struct snd_info_buffer *buffer) 266 266 { 267 267 u32 pc; 268 - emu10k1_t *emu = entry->private_data; 268 + struct snd_emu10k1 *emu = entry->private_data; 269 269 270 270 snd_iprintf(buffer, "FX8010 Instruction List '%s'\n", emu->fx8010.name); 271 271 snd_iprintf(buffer, " Code dump :\n"); ··· 304 304 #define TOTAL_SIZE_CODE (0x200*8) 305 305 #define A_TOTAL_SIZE_CODE (0x400*8) 306 306 307 - static long snd_emu10k1_fx8010_read(snd_info_entry_t *entry, void *file_private_data, 307 + static long snd_emu10k1_fx8010_read(struct snd_info_entry *entry, 308 + void *file_private_data, 308 309 struct file *file, char __user *buf, 309 310 unsigned long count, unsigned long pos) 310 311 { 311 312 long size; 312 - emu10k1_t *emu = entry->private_data; 313 + struct snd_emu10k1 *emu = entry->private_data; 313 314 unsigned int offset; 314 315 int tram_addr = 0; 315 316 ··· 350 349 return 0; 351 350 } 352 351 353 - static void snd_emu10k1_proc_voices_read(snd_info_entry_t *entry, 354 - snd_info_buffer_t * buffer) 352 + static void snd_emu10k1_proc_voices_read(struct snd_info_entry *entry, 353 + struct snd_info_buffer *buffer) 355 354 { 356 - emu10k1_t *emu = entry->private_data; 357 - emu10k1_voice_t *voice; 355 + struct snd_emu10k1 *emu = entry->private_data; 356 + struct snd_emu10k1_voice *voice; 358 357 int idx; 359 358 360 359 snd_iprintf(buffer, "ch\tuse\tpcm\tefx\tsynth\tmidi\n"); ··· 371 370 } 372 371 373 372 #ifdef CONFIG_SND_DEBUG 374 - static void snd_emu_proc_io_reg_read(snd_info_entry_t *entry, 375 - snd_info_buffer_t * buffer) 373 + static void snd_emu_proc_io_reg_read(struct snd_info_entry *entry, 374 + struct snd_info_buffer *buffer) 376 375 { 377 - emu10k1_t *emu = entry->private_data; 376 + struct snd_emu10k1 *emu = entry->private_data; 378 377 unsigned long value; 379 378 unsigned long flags; 380 379 int i; ··· 387 386 } 388 387 } 389 388 390 - static void snd_emu_proc_io_reg_write(snd_info_entry_t *entry, 391 - snd_info_buffer_t * buffer) 389 + static void snd_emu_proc_io_reg_write(struct snd_info_entry *entry, 390 + struct snd_info_buffer *buffer) 392 391 { 393 - emu10k1_t *emu = entry->private_data; 392 + struct snd_emu10k1 *emu = entry->private_data; 394 393 unsigned long flags; 395 394 char line[64]; 396 395 u32 reg, val; ··· 405 404 } 406 405 } 407 406 408 - static unsigned int snd_ptr_read(emu10k1_t * emu, 407 + static unsigned int snd_ptr_read(struct snd_emu10k1 * emu, 409 408 unsigned int iobase, 410 409 unsigned int reg, 411 410 unsigned int chn) ··· 422 421 return val; 423 422 } 424 423 425 - static void snd_ptr_write(emu10k1_t *emu, 424 + static void snd_ptr_write(struct snd_emu10k1 *emu, 426 425 unsigned int iobase, 427 426 unsigned int reg, 428 427 unsigned int chn, ··· 440 439 } 441 440 442 441 443 - static void snd_emu_proc_ptr_reg_read(snd_info_entry_t *entry, 444 - snd_info_buffer_t * buffer, int iobase, int offset, int length, int voices) 442 + static void snd_emu_proc_ptr_reg_read(struct snd_info_entry *entry, 443 + struct snd_info_buffer *buffer, int iobase, int offset, int length, int voices) 445 444 { 446 - emu10k1_t *emu = entry->private_data; 445 + struct snd_emu10k1 *emu = entry->private_data; 447 446 unsigned long value; 448 447 int i,j; 449 448 if (offset+length > 0xa0) { ··· 464 463 } 465 464 } 466 465 467 - static void snd_emu_proc_ptr_reg_write(snd_info_entry_t *entry, 468 - snd_info_buffer_t * buffer, int iobase) 466 + static void snd_emu_proc_ptr_reg_write(struct snd_info_entry *entry, 467 + struct snd_info_buffer *buffer, int iobase) 469 468 { 470 - emu10k1_t *emu = entry->private_data; 469 + struct snd_emu10k1 *emu = entry->private_data; 471 470 char line[64]; 472 471 unsigned int reg, channel_id , val; 473 472 while (!snd_info_get_line(buffer, line, sizeof(line))) { ··· 478 477 } 479 478 } 480 479 481 - static void snd_emu_proc_ptr_reg_write00(snd_info_entry_t *entry, 482 - snd_info_buffer_t * buffer) 480 + static void snd_emu_proc_ptr_reg_write00(struct snd_info_entry *entry, 481 + struct snd_info_buffer *buffer) 483 482 { 484 483 snd_emu_proc_ptr_reg_write(entry, buffer, 0); 485 484 } 486 485 487 - static void snd_emu_proc_ptr_reg_write20(snd_info_entry_t *entry, 488 - snd_info_buffer_t * buffer) 486 + static void snd_emu_proc_ptr_reg_write20(struct snd_info_entry *entry, 487 + struct snd_info_buffer *buffer) 489 488 { 490 489 snd_emu_proc_ptr_reg_write(entry, buffer, 0x20); 491 490 } 492 491 493 492 494 - static void snd_emu_proc_ptr_reg_read00a(snd_info_entry_t *entry, 495 - snd_info_buffer_t * buffer) 493 + static void snd_emu_proc_ptr_reg_read00a(struct snd_info_entry *entry, 494 + struct snd_info_buffer *buffer) 496 495 { 497 496 snd_emu_proc_ptr_reg_read(entry, buffer, 0, 0, 0x40, 64); 498 497 } 499 498 500 - static void snd_emu_proc_ptr_reg_read00b(snd_info_entry_t *entry, 501 - snd_info_buffer_t * buffer) 499 + static void snd_emu_proc_ptr_reg_read00b(struct snd_info_entry *entry, 500 + struct snd_info_buffer *buffer) 502 501 { 503 502 snd_emu_proc_ptr_reg_read(entry, buffer, 0, 0x40, 0x40, 64); 504 503 } 505 504 506 - static void snd_emu_proc_ptr_reg_read20a(snd_info_entry_t *entry, 507 - snd_info_buffer_t * buffer) 505 + static void snd_emu_proc_ptr_reg_read20a(struct snd_info_entry *entry, 506 + struct snd_info_buffer *buffer) 508 507 { 509 508 snd_emu_proc_ptr_reg_read(entry, buffer, 0x20, 0, 0x40, 4); 510 509 } 511 510 512 - static void snd_emu_proc_ptr_reg_read20b(snd_info_entry_t *entry, 513 - snd_info_buffer_t * buffer) 511 + static void snd_emu_proc_ptr_reg_read20b(struct snd_info_entry *entry, 512 + struct snd_info_buffer *buffer) 514 513 { 515 514 snd_emu_proc_ptr_reg_read(entry, buffer, 0x20, 0x40, 0x40, 4); 516 515 } 517 516 518 - static void snd_emu_proc_ptr_reg_read20c(snd_info_entry_t *entry, 519 - snd_info_buffer_t * buffer) 517 + static void snd_emu_proc_ptr_reg_read20c(struct snd_info_entry *entry, 518 + struct snd_info_buffer * buffer) 520 519 { 521 520 snd_emu_proc_ptr_reg_read(entry, buffer, 0x20, 0x80, 0x20, 4); 522 521 } ··· 526 525 .read = snd_emu10k1_fx8010_read, 527 526 }; 528 527 529 - int __devinit snd_emu10k1_proc_init(emu10k1_t * emu) 528 + int __devinit snd_emu10k1_proc_init(struct snd_emu10k1 * emu) 530 529 { 531 - snd_info_entry_t *entry; 530 + struct snd_info_entry *entry; 532 531 #ifdef CONFIG_SND_DEBUG 533 532 if (! snd_card_proc_new(emu->card, "io_regs", &entry)) { 534 533 snd_info_set_text_ops(entry, emu, 1024, snd_emu_proc_io_reg_read);
+19 -19
sound/pci/emu10k1/io.c
··· 30 30 #include <sound/core.h> 31 31 #include <sound/emu10k1.h> 32 32 33 - unsigned int snd_emu10k1_ptr_read(emu10k1_t * emu, unsigned int reg, unsigned int chn) 33 + unsigned int snd_emu10k1_ptr_read(struct snd_emu10k1 * emu, unsigned int reg, unsigned int chn) 34 34 { 35 35 unsigned long flags; 36 36 unsigned int regptr, val; ··· 61 61 } 62 62 } 63 63 64 - void snd_emu10k1_ptr_write(emu10k1_t *emu, unsigned int reg, unsigned int chn, unsigned int data) 64 + void snd_emu10k1_ptr_write(struct snd_emu10k1 *emu, unsigned int reg, unsigned int chn, unsigned int data) 65 65 { 66 66 unsigned int regptr; 67 67 unsigned long flags; ··· 91 91 } 92 92 } 93 93 94 - unsigned int snd_emu10k1_ptr20_read(emu10k1_t * emu, 94 + unsigned int snd_emu10k1_ptr20_read(struct snd_emu10k1 * emu, 95 95 unsigned int reg, 96 96 unsigned int chn) 97 97 { ··· 107 107 return val; 108 108 } 109 109 110 - void snd_emu10k1_ptr20_write(emu10k1_t *emu, 110 + void snd_emu10k1_ptr20_write(struct snd_emu10k1 *emu, 111 111 unsigned int reg, 112 112 unsigned int chn, 113 113 unsigned int data) ··· 123 123 spin_unlock_irqrestore(&emu->emu_lock, flags); 124 124 } 125 125 126 - void snd_emu10k1_intr_enable(emu10k1_t *emu, unsigned int intrenb) 126 + void snd_emu10k1_intr_enable(struct snd_emu10k1 *emu, unsigned int intrenb) 127 127 { 128 128 unsigned long flags; 129 129 unsigned int enable; ··· 134 134 spin_unlock_irqrestore(&emu->emu_lock, flags); 135 135 } 136 136 137 - void snd_emu10k1_intr_disable(emu10k1_t *emu, unsigned int intrenb) 137 + void snd_emu10k1_intr_disable(struct snd_emu10k1 *emu, unsigned int intrenb) 138 138 { 139 139 unsigned long flags; 140 140 unsigned int enable; ··· 145 145 spin_unlock_irqrestore(&emu->emu_lock, flags); 146 146 } 147 147 148 - void snd_emu10k1_voice_intr_enable(emu10k1_t *emu, unsigned int voicenum) 148 + void snd_emu10k1_voice_intr_enable(struct snd_emu10k1 *emu, unsigned int voicenum) 149 149 { 150 150 unsigned long flags; 151 151 unsigned int val; ··· 165 165 spin_unlock_irqrestore(&emu->emu_lock, flags); 166 166 } 167 167 168 - void snd_emu10k1_voice_intr_disable(emu10k1_t *emu, unsigned int voicenum) 168 + void snd_emu10k1_voice_intr_disable(struct snd_emu10k1 *emu, unsigned int voicenum) 169 169 { 170 170 unsigned long flags; 171 171 unsigned int val; ··· 185 185 spin_unlock_irqrestore(&emu->emu_lock, flags); 186 186 } 187 187 188 - void snd_emu10k1_voice_intr_ack(emu10k1_t *emu, unsigned int voicenum) 188 + void snd_emu10k1_voice_intr_ack(struct snd_emu10k1 *emu, unsigned int voicenum) 189 189 { 190 190 unsigned long flags; 191 191 ··· 202 202 spin_unlock_irqrestore(&emu->emu_lock, flags); 203 203 } 204 204 205 - void snd_emu10k1_voice_half_loop_intr_enable(emu10k1_t *emu, unsigned int voicenum) 205 + void snd_emu10k1_voice_half_loop_intr_enable(struct snd_emu10k1 *emu, unsigned int voicenum) 206 206 { 207 207 unsigned long flags; 208 208 unsigned int val; ··· 222 222 spin_unlock_irqrestore(&emu->emu_lock, flags); 223 223 } 224 224 225 - void snd_emu10k1_voice_half_loop_intr_disable(emu10k1_t *emu, unsigned int voicenum) 225 + void snd_emu10k1_voice_half_loop_intr_disable(struct snd_emu10k1 *emu, unsigned int voicenum) 226 226 { 227 227 unsigned long flags; 228 228 unsigned int val; ··· 242 242 spin_unlock_irqrestore(&emu->emu_lock, flags); 243 243 } 244 244 245 - void snd_emu10k1_voice_half_loop_intr_ack(emu10k1_t *emu, unsigned int voicenum) 245 + void snd_emu10k1_voice_half_loop_intr_ack(struct snd_emu10k1 *emu, unsigned int voicenum) 246 246 { 247 247 unsigned long flags; 248 248 ··· 259 259 spin_unlock_irqrestore(&emu->emu_lock, flags); 260 260 } 261 261 262 - void snd_emu10k1_voice_set_loop_stop(emu10k1_t *emu, unsigned int voicenum) 262 + void snd_emu10k1_voice_set_loop_stop(struct snd_emu10k1 *emu, unsigned int voicenum) 263 263 { 264 264 unsigned long flags; 265 265 unsigned int sol; ··· 279 279 spin_unlock_irqrestore(&emu->emu_lock, flags); 280 280 } 281 281 282 - void snd_emu10k1_voice_clear_loop_stop(emu10k1_t *emu, unsigned int voicenum) 282 + void snd_emu10k1_voice_clear_loop_stop(struct snd_emu10k1 *emu, unsigned int voicenum) 283 283 { 284 284 unsigned long flags; 285 285 unsigned int sol; ··· 299 299 spin_unlock_irqrestore(&emu->emu_lock, flags); 300 300 } 301 301 302 - void snd_emu10k1_wait(emu10k1_t *emu, unsigned int wait) 302 + void snd_emu10k1_wait(struct snd_emu10k1 *emu, unsigned int wait) 303 303 { 304 304 volatile unsigned count; 305 305 unsigned int newtime = 0, curtime; ··· 318 318 } 319 319 } 320 320 321 - unsigned short snd_emu10k1_ac97_read(ac97_t *ac97, unsigned short reg) 321 + unsigned short snd_emu10k1_ac97_read(struct snd_ac97 *ac97, unsigned short reg) 322 322 { 323 - emu10k1_t *emu = ac97->private_data; 323 + struct snd_emu10k1 *emu = ac97->private_data; 324 324 unsigned long flags; 325 325 unsigned short val; 326 326 ··· 331 331 return val; 332 332 } 333 333 334 - void snd_emu10k1_ac97_write(ac97_t *ac97, unsigned short reg, unsigned short data) 334 + void snd_emu10k1_ac97_write(struct snd_ac97 *ac97, unsigned short reg, unsigned short data) 335 335 { 336 - emu10k1_t *emu = ac97->private_data; 336 + struct snd_emu10k1 *emu = ac97->private_data; 337 337 unsigned long flags; 338 338 339 339 spin_lock_irqsave(&emu->emu_lock, flags);
+4 -4
sound/pci/emu10k1/irq.c
··· 32 32 33 33 irqreturn_t snd_emu10k1_interrupt(int irq, void *dev_id, struct pt_regs *regs) 34 34 { 35 - emu10k1_t *emu = dev_id; 35 + struct snd_emu10k1 *emu = dev_id; 36 36 unsigned int status, status2, orig_status, orig_status2; 37 37 int handled = 0; 38 38 ··· 56 56 int voice; 57 57 int voice_max = status & IPR_CHANNELNUMBERMASK; 58 58 u32 val; 59 - emu10k1_voice_t *pvoice = emu->voices; 59 + struct snd_emu10k1_voice *pvoice = emu->voices; 60 60 61 61 val = snd_emu10k1_ptr_read(emu, CLIPL, 0); 62 62 for (voice = 0; voice <= voice_max; voice++) { ··· 150 150 if (status & IPR_P16V) { 151 151 while ((status2 = inl(emu->port + IPR2)) != 0) { 152 152 u32 mask = INTE2_PLAYBACK_CH_0_LOOP; /* Full Loop */ 153 - emu10k1_voice_t *pvoice = &(emu->p16v_voices[0]); 154 - emu10k1_voice_t *cvoice = &(emu->p16v_capture_voice); 153 + struct snd_emu10k1_voice *pvoice = &(emu->p16v_voices[0]); 154 + struct snd_emu10k1_voice *cvoice = &(emu->p16v_capture_voice); 155 155 156 156 //printk(KERN_INFO "status2=0x%x\n", status2); 157 157 orig_status2 = status2;
+49 -45
sound/pci/emu10k1/memory.c
··· 48 48 #define set_silent_ptb(emu,page) __set_ptb_entry(emu,page,emu->silent_page.addr) 49 49 #else 50 50 /* fill PTB entries -- we need to fill UNIT_PAGES entries */ 51 - static inline void set_ptb_entry(emu10k1_t *emu, int page, dma_addr_t addr) 51 + static inline void set_ptb_entry(struct snd_emu10k1 *emu, int page, dma_addr_t addr) 52 52 { 53 53 int i; 54 54 page *= UNIT_PAGES; ··· 57 57 addr += EMUPAGESIZE; 58 58 } 59 59 } 60 - static inline void set_silent_ptb(emu10k1_t *emu, int page) 60 + static inline void set_silent_ptb(struct snd_emu10k1 *emu, int page) 61 61 { 62 62 int i; 63 63 page *= UNIT_PAGES; ··· 70 70 71 71 /* 72 72 */ 73 - static int synth_alloc_pages(emu10k1_t *hw, emu10k1_memblk_t *blk); 74 - static int synth_free_pages(emu10k1_t *hw, emu10k1_memblk_t *blk); 73 + static int synth_alloc_pages(struct snd_emu10k1 *hw, struct snd_emu10k1_memblk *blk); 74 + static int synth_free_pages(struct snd_emu10k1 *hw, struct snd_emu10k1_memblk *blk); 75 75 76 - #define get_emu10k1_memblk(l,member) list_entry(l, emu10k1_memblk_t, member) 76 + #define get_emu10k1_memblk(l,member) list_entry(l, struct snd_emu10k1_memblk, member) 77 77 78 78 79 79 /* initialize emu10k1 part */ 80 - static void emu10k1_memblk_init(emu10k1_memblk_t *blk) 80 + static void emu10k1_memblk_init(struct snd_emu10k1_memblk *blk) 81 81 { 82 82 blk->mapped_page = -1; 83 83 INIT_LIST_HEAD(&blk->mapped_link); ··· 96 96 * in nextp 97 97 * if not found, return a negative error code. 98 98 */ 99 - static int search_empty_map_area(emu10k1_t *emu, int npages, struct list_head **nextp) 99 + static int search_empty_map_area(struct snd_emu10k1 *emu, int npages, struct list_head **nextp) 100 100 { 101 101 int page = 0, found_page = -ENOMEM; 102 102 int max_size = npages; ··· 105 105 struct list_head *pos; 106 106 107 107 list_for_each (pos, &emu->mapped_link_head) { 108 - emu10k1_memblk_t *blk = get_emu10k1_memblk(pos, mapped_link); 108 + struct snd_emu10k1_memblk *blk = get_emu10k1_memblk(pos, mapped_link); 109 109 snd_assert(blk->mapped_page >= 0, continue); 110 110 size = blk->mapped_page - page; 111 111 if (size == npages) { ··· 134 134 * 135 135 * call with memblk_lock held 136 136 */ 137 - static int map_memblk(emu10k1_t *emu, emu10k1_memblk_t *blk) 137 + static int map_memblk(struct snd_emu10k1 *emu, struct snd_emu10k1_memblk *blk) 138 138 { 139 139 int page, pg; 140 140 struct list_head *next; ··· 161 161 * 162 162 * call with memblk_lock held 163 163 */ 164 - static int unmap_memblk(emu10k1_t *emu, emu10k1_memblk_t *blk) 164 + static int unmap_memblk(struct snd_emu10k1 *emu, struct snd_emu10k1_memblk *blk) 165 165 { 166 166 int start_page, end_page, mpage, pg; 167 167 struct list_head *p; 168 - emu10k1_memblk_t *q; 168 + struct snd_emu10k1_memblk *q; 169 169 170 170 /* calculate the expected size of empty region */ 171 171 if ((p = blk->mapped_link.prev) != &emu->mapped_link_head) { ··· 197 197 * 198 198 * unlike synth_alloc the memory block is aligned to the page start 199 199 */ 200 - static emu10k1_memblk_t * 201 - search_empty(emu10k1_t *emu, int size) 200 + static struct snd_emu10k1_memblk * 201 + search_empty(struct snd_emu10k1 *emu, int size) 202 202 { 203 203 struct list_head *p; 204 - emu10k1_memblk_t *blk; 204 + struct snd_emu10k1_memblk *blk; 205 205 int page, psize; 206 206 207 207 psize = get_aligned_page(size + PAGE_SIZE -1); ··· 217 217 218 218 __found_pages: 219 219 /* create a new memory block */ 220 - blk = (emu10k1_memblk_t *)__snd_util_memblk_new(emu->memhdr, psize << PAGE_SHIFT, p->prev); 220 + blk = (struct snd_emu10k1_memblk *)__snd_util_memblk_new(emu->memhdr, psize << PAGE_SHIFT, p->prev); 221 221 if (blk == NULL) 222 222 return NULL; 223 223 blk->mem.offset = aligned_page_offset(page); /* set aligned offset */ ··· 229 229 /* 230 230 * check if the given pointer is valid for pages 231 231 */ 232 - static int is_valid_page(emu10k1_t *emu, dma_addr_t addr) 232 + static int is_valid_page(struct snd_emu10k1 *emu, dma_addr_t addr) 233 233 { 234 234 if (addr & ~emu->dma_mask) { 235 235 snd_printk(KERN_ERR "max memory size is 0x%lx (addr = 0x%lx)!!\n", emu->dma_mask, (unsigned long)addr); ··· 248 248 * if no empty pages are found, tries to release unsed memory blocks 249 249 * and retry the mapping. 250 250 */ 251 - int snd_emu10k1_memblk_map(emu10k1_t *emu, emu10k1_memblk_t *blk) 251 + int snd_emu10k1_memblk_map(struct snd_emu10k1 *emu, struct snd_emu10k1_memblk *blk) 252 252 { 253 253 int err; 254 254 int size; 255 255 struct list_head *p, *nextp; 256 - emu10k1_memblk_t *deleted; 256 + struct snd_emu10k1_memblk *deleted; 257 257 unsigned long flags; 258 258 259 259 spin_lock_irqsave(&emu->memblk_lock, flags); ··· 288 288 /* 289 289 * page allocation for DMA 290 290 */ 291 - snd_util_memblk_t * 292 - snd_emu10k1_alloc_pages(emu10k1_t *emu, snd_pcm_substream_t *substream) 291 + struct snd_util_memblk * 292 + snd_emu10k1_alloc_pages(struct snd_emu10k1 *emu, struct snd_pcm_substream *substream) 293 293 { 294 - snd_pcm_runtime_t *runtime = substream->runtime; 294 + struct snd_pcm_runtime *runtime = substream->runtime; 295 295 struct snd_sg_buf *sgbuf = snd_pcm_substream_sgbuf(substream); 296 - snd_util_memhdr_t *hdr; 297 - emu10k1_memblk_t *blk; 296 + struct snd_util_memhdr *hdr; 297 + struct snd_emu10k1_memblk *blk; 298 298 int page, err, idx; 299 299 300 300 snd_assert(emu, return NULL); ··· 336 336 blk->map_locked = 1; /* do not unmap this block! */ 337 337 err = snd_emu10k1_memblk_map(emu, blk); 338 338 if (err < 0) { 339 - __snd_util_mem_free(hdr, (snd_util_memblk_t *)blk); 339 + __snd_util_mem_free(hdr, (struct snd_util_memblk *)blk); 340 340 up(&hdr->block_mutex); 341 341 return NULL; 342 342 } 343 343 up(&hdr->block_mutex); 344 - return (snd_util_memblk_t *)blk; 344 + return (struct snd_util_memblk *)blk; 345 345 } 346 346 347 347 348 348 /* 349 349 * release DMA buffer from page table 350 350 */ 351 - int snd_emu10k1_free_pages(emu10k1_t *emu, snd_util_memblk_t *blk) 351 + int snd_emu10k1_free_pages(struct snd_emu10k1 *emu, struct snd_util_memblk *blk) 352 352 { 353 353 snd_assert(emu && blk, return -EINVAL); 354 354 return snd_emu10k1_synth_free(emu, blk); ··· 363 363 /* 364 364 * allocate a synth sample area 365 365 */ 366 - snd_util_memblk_t * 367 - snd_emu10k1_synth_alloc(emu10k1_t *hw, unsigned int size) 366 + struct snd_util_memblk * 367 + snd_emu10k1_synth_alloc(struct snd_emu10k1 *hw, unsigned int size) 368 368 { 369 - emu10k1_memblk_t *blk; 370 - snd_util_memhdr_t *hdr = hw->memhdr; 369 + struct snd_emu10k1_memblk *blk; 370 + struct snd_util_memhdr *hdr = hw->memhdr; 371 371 372 372 down(&hdr->block_mutex); 373 - blk = (emu10k1_memblk_t *)__snd_util_mem_alloc(hdr, size); 373 + blk = (struct snd_emu10k1_memblk *)__snd_util_mem_alloc(hdr, size); 374 374 if (blk == NULL) { 375 375 up(&hdr->block_mutex); 376 376 return NULL; 377 377 } 378 378 if (synth_alloc_pages(hw, blk)) { 379 - __snd_util_mem_free(hdr, (snd_util_memblk_t *)blk); 379 + __snd_util_mem_free(hdr, (struct snd_util_memblk *)blk); 380 380 up(&hdr->block_mutex); 381 381 return NULL; 382 382 } 383 383 snd_emu10k1_memblk_map(hw, blk); 384 384 up(&hdr->block_mutex); 385 - return (snd_util_memblk_t *)blk; 385 + return (struct snd_util_memblk *)blk; 386 386 } 387 387 388 388 ··· 390 390 * free a synth sample area 391 391 */ 392 392 int 393 - snd_emu10k1_synth_free(emu10k1_t *emu, snd_util_memblk_t *memblk) 393 + snd_emu10k1_synth_free(struct snd_emu10k1 *emu, struct snd_util_memblk *memblk) 394 394 { 395 - snd_util_memhdr_t *hdr = emu->memhdr; 396 - emu10k1_memblk_t *blk = (emu10k1_memblk_t *)memblk; 395 + struct snd_util_memhdr *hdr = emu->memhdr; 396 + struct snd_emu10k1_memblk *blk = (struct snd_emu10k1_memblk *)memblk; 397 397 unsigned long flags; 398 398 399 399 down(&hdr->block_mutex); ··· 409 409 410 410 411 411 /* check new allocation range */ 412 - static void get_single_page_range(snd_util_memhdr_t *hdr, emu10k1_memblk_t *blk, int *first_page_ret, int *last_page_ret) 412 + static void get_single_page_range(struct snd_util_memhdr *hdr, 413 + struct snd_emu10k1_memblk *blk, 414 + int *first_page_ret, int *last_page_ret) 413 415 { 414 416 struct list_head *p; 415 - emu10k1_memblk_t *q; 417 + struct snd_emu10k1_memblk *q; 416 418 int first_page, last_page; 417 419 first_page = blk->first_page; 418 420 if ((p = blk->mem.list.prev) != &hdr->block) { ··· 435 433 /* 436 434 * allocate kernel pages 437 435 */ 438 - static int synth_alloc_pages(emu10k1_t *emu, emu10k1_memblk_t *blk) 436 + static int synth_alloc_pages(struct snd_emu10k1 *emu, struct snd_emu10k1_memblk *blk) 439 437 { 440 438 int page, first_page, last_page; 441 439 struct snd_dma_buffer dmab; ··· 474 472 /* 475 473 * free pages 476 474 */ 477 - static int synth_free_pages(emu10k1_t *emu, emu10k1_memblk_t *blk) 475 + static int synth_free_pages(struct snd_emu10k1 *emu, struct snd_emu10k1_memblk *blk) 478 476 { 479 477 int page, first_page, last_page; 480 478 struct snd_dma_buffer dmab; ··· 497 495 } 498 496 499 497 /* calculate buffer pointer from offset address */ 500 - static inline void *offset_ptr(emu10k1_t *emu, int page, int offset) 498 + static inline void *offset_ptr(struct snd_emu10k1 *emu, int page, int offset) 501 499 { 502 500 char *ptr; 503 501 snd_assert(page >= 0 && page < emu->max_cache_pages, return NULL); ··· 513 511 /* 514 512 * bzero(blk + offset, size) 515 513 */ 516 - int snd_emu10k1_synth_bzero(emu10k1_t *emu, snd_util_memblk_t *blk, int offset, int size) 514 + int snd_emu10k1_synth_bzero(struct snd_emu10k1 *emu, struct snd_util_memblk *blk, 515 + int offset, int size) 517 516 { 518 517 int page, nextofs, end_offset, temp, temp1; 519 518 void *ptr; 520 - emu10k1_memblk_t *p = (emu10k1_memblk_t *)blk; 519 + struct snd_emu10k1_memblk *p = (struct snd_emu10k1_memblk *)blk; 521 520 522 521 offset += blk->offset & (PAGE_SIZE - 1); 523 522 end_offset = offset + size; ··· 541 538 /* 542 539 * copy_from_user(blk + offset, data, size) 543 540 */ 544 - int snd_emu10k1_synth_copy_from_user(emu10k1_t *emu, snd_util_memblk_t *blk, int offset, const char __user *data, int size) 541 + int snd_emu10k1_synth_copy_from_user(struct snd_emu10k1 *emu, struct snd_util_memblk *blk, 542 + int offset, const char __user *data, int size) 545 543 { 546 544 int page, nextofs, end_offset, temp, temp1; 547 545 void *ptr; 548 - emu10k1_memblk_t *p = (emu10k1_memblk_t *)blk; 546 + struct snd_emu10k1_memblk *p = (struct snd_emu10k1_memblk *)blk; 549 547 550 548 offset += blk->offset & (PAGE_SIZE - 1); 551 549 end_offset = offset + size;
+127 -127
sound/pci/emu10k1/p16v.c
··· 121 121 */ 122 122 123 123 /* hardware definition */ 124 - static snd_pcm_hardware_t snd_p16v_playback_hw = { 124 + static struct snd_pcm_hardware snd_p16v_playback_hw = { 125 125 .info = (SNDRV_PCM_INFO_MMAP | 126 126 SNDRV_PCM_INFO_INTERLEAVED | 127 127 SNDRV_PCM_INFO_BLOCK_TRANSFER | ··· 140 140 .fifo_size = 0, 141 141 }; 142 142 143 - static snd_pcm_hardware_t snd_p16v_capture_hw = { 143 + static struct snd_pcm_hardware snd_p16v_capture_hw = { 144 144 .info = (SNDRV_PCM_INFO_MMAP | 145 145 SNDRV_PCM_INFO_INTERLEAVED | 146 146 SNDRV_PCM_INFO_BLOCK_TRANSFER | ··· 159 159 .fifo_size = 0, 160 160 }; 161 161 162 - static void snd_p16v_pcm_free_substream(snd_pcm_runtime_t *runtime) 162 + static void snd_p16v_pcm_free_substream(struct snd_pcm_runtime *runtime) 163 163 { 164 - emu10k1_pcm_t *epcm = runtime->private_data; 164 + struct snd_emu10k1_pcm *epcm = runtime->private_data; 165 165 166 166 if (epcm) { 167 167 //snd_printk("epcm free: %p\n", epcm); ··· 170 170 } 171 171 172 172 /* open_playback callback */ 173 - static int snd_p16v_pcm_open_playback_channel(snd_pcm_substream_t *substream, int channel_id) 173 + static int snd_p16v_pcm_open_playback_channel(struct snd_pcm_substream *substream, int channel_id) 174 174 { 175 - emu10k1_t *emu = snd_pcm_substream_chip(substream); 176 - emu10k1_voice_t *channel = &(emu->p16v_voices[channel_id]); 177 - emu10k1_pcm_t *epcm; 178 - snd_pcm_runtime_t *runtime = substream->runtime; 175 + struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); 176 + struct snd_emu10k1_voice *channel = &(emu->p16v_voices[channel_id]); 177 + struct snd_emu10k1_pcm *epcm; 178 + struct snd_pcm_runtime *runtime = substream->runtime; 179 179 int err; 180 180 181 181 epcm = kzalloc(sizeof(*epcm), GFP_KERNEL); ··· 206 206 return 0; 207 207 } 208 208 /* open_capture callback */ 209 - static int snd_p16v_pcm_open_capture_channel(snd_pcm_substream_t *substream, int channel_id) 209 + static int snd_p16v_pcm_open_capture_channel(struct snd_pcm_substream *substream, int channel_id) 210 210 { 211 - emu10k1_t *emu = snd_pcm_substream_chip(substream); 212 - emu10k1_voice_t *channel = &(emu->p16v_capture_voice); 213 - emu10k1_pcm_t *epcm; 214 - snd_pcm_runtime_t *runtime = substream->runtime; 211 + struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); 212 + struct snd_emu10k1_voice *channel = &(emu->p16v_capture_voice); 213 + struct snd_emu10k1_pcm *epcm; 214 + struct snd_pcm_runtime *runtime = substream->runtime; 215 215 int err; 216 216 217 217 epcm = kzalloc(sizeof(*epcm), GFP_KERNEL); ··· 244 244 245 245 246 246 /* close callback */ 247 - static int snd_p16v_pcm_close_playback(snd_pcm_substream_t *substream) 247 + static int snd_p16v_pcm_close_playback(struct snd_pcm_substream *substream) 248 248 { 249 - emu10k1_t *emu = snd_pcm_substream_chip(substream); 250 - //snd_pcm_runtime_t *runtime = substream->runtime; 251 - //emu10k1_pcm_t *epcm = runtime->private_data; 249 + struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); 250 + //struct snd_pcm_runtime *runtime = substream->runtime; 251 + //struct snd_emu10k1_pcm *epcm = runtime->private_data; 252 252 emu->p16v_voices[substream->pcm->device - emu->p16v_device_offset].use=0; 253 253 /* FIXME: maybe zero others */ 254 254 return 0; 255 255 } 256 256 257 257 /* close callback */ 258 - static int snd_p16v_pcm_close_capture(snd_pcm_substream_t *substream) 258 + static int snd_p16v_pcm_close_capture(struct snd_pcm_substream *substream) 259 259 { 260 - emu10k1_t *emu = snd_pcm_substream_chip(substream); 261 - //snd_pcm_runtime_t *runtime = substream->runtime; 262 - //emu10k1_pcm_t *epcm = runtime->private_data; 260 + struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); 261 + //struct snd_pcm_runtime *runtime = substream->runtime; 262 + //struct snd_emu10k1_pcm *epcm = runtime->private_data; 263 263 emu->p16v_capture_voice.use=0; 264 264 /* FIXME: maybe zero others */ 265 265 return 0; 266 266 } 267 267 268 - static int snd_p16v_pcm_open_playback_front(snd_pcm_substream_t *substream) 268 + static int snd_p16v_pcm_open_playback_front(struct snd_pcm_substream *substream) 269 269 { 270 270 return snd_p16v_pcm_open_playback_channel(substream, PCM_FRONT_CHANNEL); 271 271 } 272 272 273 - static int snd_p16v_pcm_open_capture(snd_pcm_substream_t *substream) 273 + static int snd_p16v_pcm_open_capture(struct snd_pcm_substream *substream) 274 274 { 275 275 // Only using channel 0 for now, but the card has 2 channels. 276 276 return snd_p16v_pcm_open_capture_channel(substream, 0); 277 277 } 278 278 279 279 /* hw_params callback */ 280 - static int snd_p16v_pcm_hw_params_playback(snd_pcm_substream_t *substream, 281 - snd_pcm_hw_params_t * hw_params) 280 + static int snd_p16v_pcm_hw_params_playback(struct snd_pcm_substream *substream, 281 + struct snd_pcm_hw_params *hw_params) 282 282 { 283 283 int result; 284 284 result = snd_pcm_lib_malloc_pages(substream, ··· 287 287 } 288 288 289 289 /* hw_params callback */ 290 - static int snd_p16v_pcm_hw_params_capture(snd_pcm_substream_t *substream, 291 - snd_pcm_hw_params_t * hw_params) 290 + static int snd_p16v_pcm_hw_params_capture(struct snd_pcm_substream *substream, 291 + struct snd_pcm_hw_params *hw_params) 292 292 { 293 293 int result; 294 294 result = snd_pcm_lib_malloc_pages(substream, ··· 298 298 299 299 300 300 /* hw_free callback */ 301 - static int snd_p16v_pcm_hw_free_playback(snd_pcm_substream_t *substream) 301 + static int snd_p16v_pcm_hw_free_playback(struct snd_pcm_substream *substream) 302 302 { 303 303 int result; 304 304 result = snd_pcm_lib_free_pages(substream); ··· 306 306 } 307 307 308 308 /* hw_free callback */ 309 - static int snd_p16v_pcm_hw_free_capture(snd_pcm_substream_t *substream) 309 + static int snd_p16v_pcm_hw_free_capture(struct snd_pcm_substream *substream) 310 310 { 311 311 int result; 312 312 result = snd_pcm_lib_free_pages(substream); ··· 315 315 316 316 317 317 /* prepare playback callback */ 318 - static int snd_p16v_pcm_prepare_playback(snd_pcm_substream_t *substream) 318 + static int snd_p16v_pcm_prepare_playback(struct snd_pcm_substream *substream) 319 319 { 320 - emu10k1_t *emu = snd_pcm_substream_chip(substream); 321 - snd_pcm_runtime_t *runtime = substream->runtime; 320 + struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); 321 + struct snd_pcm_runtime *runtime = substream->runtime; 322 322 int channel = substream->pcm->device - emu->p16v_device_offset; 323 323 u32 *table_base = (u32 *)(emu->p16v_buffer.area+(8*16*channel)); 324 324 u32 period_size_bytes = frames_to_bytes(runtime, runtime->period_size); ··· 364 364 } 365 365 366 366 /* prepare capture callback */ 367 - static int snd_p16v_pcm_prepare_capture(snd_pcm_substream_t *substream) 367 + static int snd_p16v_pcm_prepare_capture(struct snd_pcm_substream *substream) 368 368 { 369 - emu10k1_t *emu = snd_pcm_substream_chip(substream); 370 - snd_pcm_runtime_t *runtime = substream->runtime; 369 + struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); 370 + struct snd_pcm_runtime *runtime = substream->runtime; 371 371 int channel = substream->pcm->device - emu->p16v_device_offset; 372 372 u32 tmp; 373 373 //printk("prepare capture:channel_number=%d, rate=%d, format=0x%x, channels=%d, buffer_size=%ld, period_size=%ld, frames_to_bytes=%d\n",channel, runtime->rate, runtime->format, runtime->channels, runtime->buffer_size, runtime->period_size, frames_to_bytes(runtime, 1)); ··· 398 398 return 0; 399 399 } 400 400 401 - static void snd_p16v_intr_enable(emu10k1_t *emu, unsigned int intrenb) 401 + static void snd_p16v_intr_enable(struct snd_emu10k1 *emu, unsigned int intrenb) 402 402 { 403 403 unsigned long flags; 404 404 unsigned int enable; ··· 409 409 spin_unlock_irqrestore(&emu->emu_lock, flags); 410 410 } 411 411 412 - static void snd_p16v_intr_disable(emu10k1_t *emu, unsigned int intrenb) 412 + static void snd_p16v_intr_disable(struct snd_emu10k1 *emu, unsigned int intrenb) 413 413 { 414 414 unsigned long flags; 415 415 unsigned int disable; ··· 421 421 } 422 422 423 423 /* trigger_playback callback */ 424 - static int snd_p16v_pcm_trigger_playback(snd_pcm_substream_t *substream, 424 + static int snd_p16v_pcm_trigger_playback(struct snd_pcm_substream *substream, 425 425 int cmd) 426 426 { 427 - emu10k1_t *emu = snd_pcm_substream_chip(substream); 428 - snd_pcm_runtime_t *runtime; 429 - emu10k1_pcm_t *epcm; 427 + struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); 428 + struct snd_pcm_runtime *runtime; 429 + struct snd_emu10k1_pcm *epcm; 430 430 int channel; 431 431 int result = 0; 432 432 struct list_head *pos; 433 - snd_pcm_substream_t *s; 433 + struct snd_pcm_substream *s; 434 434 u32 basic = 0; 435 435 u32 inte = 0; 436 436 int running=0; ··· 474 474 } 475 475 476 476 /* trigger_capture callback */ 477 - static int snd_p16v_pcm_trigger_capture(snd_pcm_substream_t *substream, 477 + static int snd_p16v_pcm_trigger_capture(struct snd_pcm_substream *substream, 478 478 int cmd) 479 479 { 480 - emu10k1_t *emu = snd_pcm_substream_chip(substream); 481 - snd_pcm_runtime_t *runtime = substream->runtime; 482 - emu10k1_pcm_t *epcm = runtime->private_data; 480 + struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); 481 + struct snd_pcm_runtime *runtime = substream->runtime; 482 + struct snd_emu10k1_pcm *epcm = runtime->private_data; 483 483 int channel = 0; 484 484 int result = 0; 485 485 u32 inte = INTE2_CAPTURE_CH_0_LOOP | INTE2_CAPTURE_CH_0_HALF_LOOP; ··· 505 505 506 506 /* pointer_playback callback */ 507 507 static snd_pcm_uframes_t 508 - snd_p16v_pcm_pointer_playback(snd_pcm_substream_t *substream) 508 + snd_p16v_pcm_pointer_playback(struct snd_pcm_substream *substream) 509 509 { 510 - emu10k1_t *emu = snd_pcm_substream_chip(substream); 511 - snd_pcm_runtime_t *runtime = substream->runtime; 512 - emu10k1_pcm_t *epcm = runtime->private_data; 510 + struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); 511 + struct snd_pcm_runtime *runtime = substream->runtime; 512 + struct snd_emu10k1_pcm *epcm = runtime->private_data; 513 513 snd_pcm_uframes_t ptr, ptr1, ptr2,ptr3,ptr4 = 0; 514 514 int channel = substream->pcm->device - emu->p16v_device_offset; 515 515 if (!epcm->running) ··· 530 530 531 531 /* pointer_capture callback */ 532 532 static snd_pcm_uframes_t 533 - snd_p16v_pcm_pointer_capture(snd_pcm_substream_t *substream) 533 + snd_p16v_pcm_pointer_capture(struct snd_pcm_substream *substream) 534 534 { 535 - emu10k1_t *emu = snd_pcm_substream_chip(substream); 536 - snd_pcm_runtime_t *runtime = substream->runtime; 537 - emu10k1_pcm_t *epcm = runtime->private_data; 535 + struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); 536 + struct snd_pcm_runtime *runtime = substream->runtime; 537 + struct snd_emu10k1_pcm *epcm = runtime->private_data; 538 538 snd_pcm_uframes_t ptr, ptr1, ptr2 = 0; 539 539 int channel = 0; 540 540 ··· 554 554 } 555 555 556 556 /* operators */ 557 - static snd_pcm_ops_t snd_p16v_playback_front_ops = { 557 + static struct snd_pcm_ops snd_p16v_playback_front_ops = { 558 558 .open = snd_p16v_pcm_open_playback_front, 559 559 .close = snd_p16v_pcm_close_playback, 560 560 .ioctl = snd_pcm_lib_ioctl, ··· 565 565 .pointer = snd_p16v_pcm_pointer_playback, 566 566 }; 567 567 568 - static snd_pcm_ops_t snd_p16v_capture_ops = { 568 + static struct snd_pcm_ops snd_p16v_capture_ops = { 569 569 .open = snd_p16v_pcm_open_capture, 570 570 .close = snd_p16v_pcm_close_capture, 571 571 .ioctl = snd_pcm_lib_ioctl, ··· 577 577 }; 578 578 579 579 580 - int snd_p16v_free(emu10k1_t *chip) 580 + int snd_p16v_free(struct snd_emu10k1 *chip) 581 581 { 582 582 // release the data 583 583 if (chip->p16v_buffer.area) { ··· 587 587 return 0; 588 588 } 589 589 590 - int snd_p16v_pcm(emu10k1_t *emu, int device, snd_pcm_t **rpcm) 590 + int snd_p16v_pcm(struct snd_emu10k1 *emu, int device, struct snd_pcm **rpcm) 591 591 { 592 - snd_pcm_t *pcm; 593 - snd_pcm_substream_t *substream; 592 + struct snd_pcm *pcm; 593 + struct snd_pcm_substream *substream; 594 594 int err; 595 595 int capture=1; 596 596 ··· 641 641 return 0; 642 642 } 643 643 644 - static int snd_p16v_volume_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) 644 + static int snd_p16v_volume_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) 645 645 { 646 646 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; 647 647 uinfo->count = 2; ··· 650 650 return 0; 651 651 } 652 652 653 - static int snd_p16v_volume_get(snd_kcontrol_t * kcontrol, 654 - snd_ctl_elem_value_t * ucontrol, int reg, int high_low) 653 + static int snd_p16v_volume_get(struct snd_kcontrol *kcontrol, 654 + struct snd_ctl_elem_value *ucontrol, int reg, int high_low) 655 655 { 656 - emu10k1_t *emu = snd_kcontrol_chip(kcontrol); 656 + struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol); 657 657 u32 value; 658 658 659 659 value = snd_emu10k1_ptr20_read(emu, reg, high_low); ··· 667 667 return 0; 668 668 } 669 669 670 - static int snd_p16v_volume_get_spdif_front(snd_kcontrol_t * kcontrol, 671 - snd_ctl_elem_value_t * ucontrol) 670 + static int snd_p16v_volume_get_spdif_front(struct snd_kcontrol *kcontrol, 671 + struct snd_ctl_elem_value *ucontrol) 672 672 { 673 673 int high_low = 0; 674 674 int reg = PLAYBACK_VOLUME_MIXER7; 675 675 return snd_p16v_volume_get(kcontrol, ucontrol, reg, high_low); 676 676 } 677 677 678 - static int snd_p16v_volume_get_spdif_center_lfe(snd_kcontrol_t * kcontrol, 679 - snd_ctl_elem_value_t * ucontrol) 678 + static int snd_p16v_volume_get_spdif_center_lfe(struct snd_kcontrol *kcontrol, 679 + struct snd_ctl_elem_value *ucontrol) 680 680 { 681 681 int high_low = 1; 682 682 int reg = PLAYBACK_VOLUME_MIXER7; 683 683 return snd_p16v_volume_get(kcontrol, ucontrol, reg, high_low); 684 684 } 685 - static int snd_p16v_volume_get_spdif_unknown(snd_kcontrol_t * kcontrol, 686 - snd_ctl_elem_value_t * ucontrol) 685 + static int snd_p16v_volume_get_spdif_unknown(struct snd_kcontrol *kcontrol, 686 + struct snd_ctl_elem_value *ucontrol) 687 687 { 688 688 int high_low = 0; 689 689 int reg = PLAYBACK_VOLUME_MIXER8; 690 690 return snd_p16v_volume_get(kcontrol, ucontrol, reg, high_low); 691 691 } 692 - static int snd_p16v_volume_get_spdif_rear(snd_kcontrol_t * kcontrol, 693 - snd_ctl_elem_value_t * ucontrol) 692 + static int snd_p16v_volume_get_spdif_rear(struct snd_kcontrol *kcontrol, 693 + struct snd_ctl_elem_value *ucontrol) 694 694 { 695 695 int high_low = 1; 696 696 int reg = PLAYBACK_VOLUME_MIXER8; 697 697 return snd_p16v_volume_get(kcontrol, ucontrol, reg, high_low); 698 698 } 699 699 700 - static int snd_p16v_volume_get_analog_front(snd_kcontrol_t * kcontrol, 701 - snd_ctl_elem_value_t * ucontrol) 700 + static int snd_p16v_volume_get_analog_front(struct snd_kcontrol *kcontrol, 701 + struct snd_ctl_elem_value *ucontrol) 702 702 { 703 703 int high_low = 0; 704 704 int reg = PLAYBACK_VOLUME_MIXER9; 705 705 return snd_p16v_volume_get(kcontrol, ucontrol, reg, high_low); 706 706 } 707 707 708 - static int snd_p16v_volume_get_analog_center_lfe(snd_kcontrol_t * kcontrol, 709 - snd_ctl_elem_value_t * ucontrol) 708 + static int snd_p16v_volume_get_analog_center_lfe(struct snd_kcontrol *kcontrol, 709 + struct snd_ctl_elem_value *ucontrol) 710 710 { 711 711 int high_low = 1; 712 712 int reg = PLAYBACK_VOLUME_MIXER9; 713 713 return snd_p16v_volume_get(kcontrol, ucontrol, reg, high_low); 714 714 } 715 - static int snd_p16v_volume_get_analog_rear(snd_kcontrol_t * kcontrol, 716 - snd_ctl_elem_value_t * ucontrol) 715 + static int snd_p16v_volume_get_analog_rear(struct snd_kcontrol *kcontrol, 716 + struct snd_ctl_elem_value *ucontrol) 717 717 { 718 718 int high_low = 1; 719 719 int reg = PLAYBACK_VOLUME_MIXER10; 720 720 return snd_p16v_volume_get(kcontrol, ucontrol, reg, high_low); 721 721 } 722 722 723 - static int snd_p16v_volume_get_analog_unknown(snd_kcontrol_t * kcontrol, 724 - snd_ctl_elem_value_t * ucontrol) 723 + static int snd_p16v_volume_get_analog_unknown(struct snd_kcontrol *kcontrol, 724 + struct snd_ctl_elem_value *ucontrol) 725 725 { 726 726 int high_low = 0; 727 727 int reg = PLAYBACK_VOLUME_MIXER10; 728 728 return snd_p16v_volume_get(kcontrol, ucontrol, reg, high_low); 729 729 } 730 730 731 - static int snd_p16v_volume_put(snd_kcontrol_t * kcontrol, 732 - snd_ctl_elem_value_t * ucontrol, int reg, int high_low) 731 + static int snd_p16v_volume_put(struct snd_kcontrol *kcontrol, 732 + struct snd_ctl_elem_value *ucontrol, int reg, int high_low) 733 733 { 734 - emu10k1_t *emu = snd_kcontrol_chip(kcontrol); 734 + struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol); 735 735 u32 value; 736 736 value = snd_emu10k1_ptr20_read(emu, reg, 0); 737 737 //value = value & 0xffff; ··· 746 746 return 1; 747 747 } 748 748 749 - static int snd_p16v_volume_put_spdif_front(snd_kcontrol_t * kcontrol, 750 - snd_ctl_elem_value_t * ucontrol) 749 + static int snd_p16v_volume_put_spdif_front(struct snd_kcontrol *kcontrol, 750 + struct snd_ctl_elem_value *ucontrol) 751 751 { 752 752 int high_low = 0; 753 753 int reg = PLAYBACK_VOLUME_MIXER7; 754 754 return snd_p16v_volume_put(kcontrol, ucontrol, reg, high_low); 755 755 } 756 756 757 - static int snd_p16v_volume_put_spdif_center_lfe(snd_kcontrol_t * kcontrol, 758 - snd_ctl_elem_value_t * ucontrol) 757 + static int snd_p16v_volume_put_spdif_center_lfe(struct snd_kcontrol *kcontrol, 758 + struct snd_ctl_elem_value *ucontrol) 759 759 { 760 760 int high_low = 1; 761 761 int reg = PLAYBACK_VOLUME_MIXER7; 762 762 return snd_p16v_volume_put(kcontrol, ucontrol, reg, high_low); 763 763 } 764 764 765 - static int snd_p16v_volume_put_spdif_unknown(snd_kcontrol_t * kcontrol, 766 - snd_ctl_elem_value_t * ucontrol) 765 + static int snd_p16v_volume_put_spdif_unknown(struct snd_kcontrol *kcontrol, 766 + struct snd_ctl_elem_value *ucontrol) 767 767 { 768 768 int high_low = 0; 769 769 int reg = PLAYBACK_VOLUME_MIXER8; 770 770 return snd_p16v_volume_put(kcontrol, ucontrol, reg, high_low); 771 771 } 772 772 773 - static int snd_p16v_volume_put_spdif_rear(snd_kcontrol_t * kcontrol, 774 - snd_ctl_elem_value_t * ucontrol) 773 + static int snd_p16v_volume_put_spdif_rear(struct snd_kcontrol *kcontrol, 774 + struct snd_ctl_elem_value *ucontrol) 775 775 { 776 776 int high_low = 1; 777 777 int reg = PLAYBACK_VOLUME_MIXER8; 778 778 return snd_p16v_volume_put(kcontrol, ucontrol, reg, high_low); 779 779 } 780 780 781 - static int snd_p16v_volume_put_analog_front(snd_kcontrol_t * kcontrol, 782 - snd_ctl_elem_value_t * ucontrol) 781 + static int snd_p16v_volume_put_analog_front(struct snd_kcontrol *kcontrol, 782 + struct snd_ctl_elem_value *ucontrol) 783 783 { 784 784 int high_low = 0; 785 785 int reg = PLAYBACK_VOLUME_MIXER9; 786 786 return snd_p16v_volume_put(kcontrol, ucontrol, reg, high_low); 787 787 } 788 788 789 - static int snd_p16v_volume_put_analog_center_lfe(snd_kcontrol_t * kcontrol, 790 - snd_ctl_elem_value_t * ucontrol) 789 + static int snd_p16v_volume_put_analog_center_lfe(struct snd_kcontrol *kcontrol, 790 + struct snd_ctl_elem_value *ucontrol) 791 791 { 792 792 int high_low = 1; 793 793 int reg = PLAYBACK_VOLUME_MIXER9; 794 794 return snd_p16v_volume_put(kcontrol, ucontrol, reg, high_low); 795 795 } 796 796 797 - static int snd_p16v_volume_put_analog_rear(snd_kcontrol_t * kcontrol, 798 - snd_ctl_elem_value_t * ucontrol) 797 + static int snd_p16v_volume_put_analog_rear(struct snd_kcontrol *kcontrol, 798 + struct snd_ctl_elem_value *ucontrol) 799 799 { 800 800 int high_low = 1; 801 801 int reg = PLAYBACK_VOLUME_MIXER10; 802 802 return snd_p16v_volume_put(kcontrol, ucontrol, reg, high_low); 803 803 } 804 804 805 - static int snd_p16v_volume_put_analog_unknown(snd_kcontrol_t * kcontrol, 806 - snd_ctl_elem_value_t * ucontrol) 805 + static int snd_p16v_volume_put_analog_unknown(struct snd_kcontrol *kcontrol, 806 + struct snd_ctl_elem_value *ucontrol) 807 807 { 808 808 int high_low = 0; 809 809 int reg = PLAYBACK_VOLUME_MIXER10; 810 810 return snd_p16v_volume_put(kcontrol, ucontrol, reg, high_low); 811 811 } 812 812 813 - static snd_kcontrol_new_t snd_p16v_volume_control_analog_front = 813 + static struct snd_kcontrol_new snd_p16v_volume_control_analog_front = 814 814 { 815 815 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 816 816 .name = "HD Analog Front Playback Volume", ··· 819 819 .put = snd_p16v_volume_put_analog_front 820 820 }; 821 821 822 - static snd_kcontrol_new_t snd_p16v_volume_control_analog_center_lfe = 822 + static struct snd_kcontrol_new snd_p16v_volume_control_analog_center_lfe = 823 823 { 824 824 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 825 825 .name = "HD Analog Center/LFE Playback Volume", ··· 828 828 .put = snd_p16v_volume_put_analog_center_lfe 829 829 }; 830 830 831 - static snd_kcontrol_new_t snd_p16v_volume_control_analog_unknown = 831 + static struct snd_kcontrol_new snd_p16v_volume_control_analog_unknown = 832 832 { 833 833 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 834 834 .name = "HD Analog Unknown Playback Volume", ··· 837 837 .put = snd_p16v_volume_put_analog_unknown 838 838 }; 839 839 840 - static snd_kcontrol_new_t snd_p16v_volume_control_analog_rear = 840 + static struct snd_kcontrol_new snd_p16v_volume_control_analog_rear = 841 841 { 842 842 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 843 843 .name = "HD Analog Rear Playback Volume", ··· 846 846 .put = snd_p16v_volume_put_analog_rear 847 847 }; 848 848 849 - static snd_kcontrol_new_t snd_p16v_volume_control_spdif_front = 849 + static struct snd_kcontrol_new snd_p16v_volume_control_spdif_front = 850 850 { 851 851 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 852 852 .name = "HD SPDIF Front Playback Volume", ··· 855 855 .put = snd_p16v_volume_put_spdif_front 856 856 }; 857 857 858 - static snd_kcontrol_new_t snd_p16v_volume_control_spdif_center_lfe = 858 + static struct snd_kcontrol_new snd_p16v_volume_control_spdif_center_lfe = 859 859 { 860 860 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 861 861 .name = "HD SPDIF Center/LFE Playback Volume", ··· 864 864 .put = snd_p16v_volume_put_spdif_center_lfe 865 865 }; 866 866 867 - static snd_kcontrol_new_t snd_p16v_volume_control_spdif_unknown = 867 + static struct snd_kcontrol_new snd_p16v_volume_control_spdif_unknown = 868 868 { 869 869 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 870 870 .name = "HD SPDIF Unknown Playback Volume", ··· 873 873 .put = snd_p16v_volume_put_spdif_unknown 874 874 }; 875 875 876 - static snd_kcontrol_new_t snd_p16v_volume_control_spdif_rear = 876 + static struct snd_kcontrol_new snd_p16v_volume_control_spdif_rear = 877 877 { 878 878 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 879 879 .name = "HD SPDIF Rear Playback Volume", ··· 882 882 .put = snd_p16v_volume_put_spdif_rear 883 883 }; 884 884 885 - static int snd_p16v_capture_source_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) 885 + static int snd_p16v_capture_source_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) 886 886 { 887 887 static char *texts[8] = { "SPDIF", "I2S", "SRC48", "SRCMulti_SPDIF", "SRCMulti_I2S", "CDIF", "FX", "AC97" }; 888 888 ··· 895 895 return 0; 896 896 } 897 897 898 - static int snd_p16v_capture_source_get(snd_kcontrol_t * kcontrol, 899 - snd_ctl_elem_value_t * ucontrol) 898 + static int snd_p16v_capture_source_get(struct snd_kcontrol *kcontrol, 899 + struct snd_ctl_elem_value *ucontrol) 900 900 { 901 - emu10k1_t *emu = snd_kcontrol_chip(kcontrol); 901 + struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol); 902 902 903 903 ucontrol->value.enumerated.item[0] = emu->p16v_capture_source; 904 904 return 0; 905 905 } 906 906 907 - static int snd_p16v_capture_source_put(snd_kcontrol_t * kcontrol, 908 - snd_ctl_elem_value_t * ucontrol) 907 + static int snd_p16v_capture_source_put(struct snd_kcontrol *kcontrol, 908 + struct snd_ctl_elem_value *ucontrol) 909 909 { 910 - emu10k1_t *emu = snd_kcontrol_chip(kcontrol); 910 + struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol); 911 911 unsigned int val; 912 912 int change = 0; 913 913 u32 mask; ··· 924 924 return change; 925 925 } 926 926 927 - static snd_kcontrol_new_t snd_p16v_capture_source __devinitdata = 927 + static struct snd_kcontrol_new snd_p16v_capture_source __devinitdata = 928 928 { 929 929 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 930 930 .name = "HD source Capture", ··· 933 933 .put = snd_p16v_capture_source_put 934 934 }; 935 935 936 - static int snd_p16v_capture_channel_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) 936 + static int snd_p16v_capture_channel_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) 937 937 { 938 938 static char *texts[4] = { "0", "1", "2", "3", }; 939 939 ··· 946 946 return 0; 947 947 } 948 948 949 - static int snd_p16v_capture_channel_get(snd_kcontrol_t * kcontrol, 950 - snd_ctl_elem_value_t * ucontrol) 949 + static int snd_p16v_capture_channel_get(struct snd_kcontrol *kcontrol, 950 + struct snd_ctl_elem_value *ucontrol) 951 951 { 952 - emu10k1_t *emu = snd_kcontrol_chip(kcontrol); 952 + struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol); 953 953 954 954 ucontrol->value.enumerated.item[0] = emu->p16v_capture_channel; 955 955 return 0; 956 956 } 957 957 958 - static int snd_p16v_capture_channel_put(snd_kcontrol_t * kcontrol, 959 - snd_ctl_elem_value_t * ucontrol) 958 + static int snd_p16v_capture_channel_put(struct snd_kcontrol *kcontrol, 959 + struct snd_ctl_elem_value *ucontrol) 960 960 { 961 - emu10k1_t *emu = snd_kcontrol_chip(kcontrol); 961 + struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol); 962 962 unsigned int val; 963 963 int change = 0; 964 964 u32 tmp; ··· 973 973 return change; 974 974 } 975 975 976 - static snd_kcontrol_new_t snd_p16v_capture_channel __devinitdata = 976 + static struct snd_kcontrol_new snd_p16v_capture_channel __devinitdata = 977 977 { 978 978 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 979 979 .name = "HD channel Capture", ··· 982 982 .put = snd_p16v_capture_channel_put 983 983 }; 984 984 985 - int snd_p16v_mixer(emu10k1_t *emu) 985 + int snd_p16v_mixer(struct snd_emu10k1 *emu) 986 986 { 987 987 int err; 988 - snd_kcontrol_t *kctl; 989 - snd_card_t *card = emu->card; 988 + struct snd_kcontrol *kctl; 989 + struct snd_card *card = emu->card; 990 990 if ((kctl = snd_ctl_new1(&snd_p16v_volume_control_analog_front, emu)) == NULL) 991 991 return -ENOMEM; 992 992 if ((err = snd_ctl_add(card, kctl)))
+9 -9
sound/pci/emu10k1/timer.c
··· 30 30 #include <sound/core.h> 31 31 #include <sound/emu10k1.h> 32 32 33 - static int snd_emu10k1_timer_start(snd_timer_t *timer) 33 + static int snd_emu10k1_timer_start(struct snd_timer *timer) 34 34 { 35 - emu10k1_t *emu; 35 + struct snd_emu10k1 *emu; 36 36 unsigned long flags; 37 37 unsigned int delay; 38 38 ··· 47 47 return 0; 48 48 } 49 49 50 - static int snd_emu10k1_timer_stop(snd_timer_t *timer) 50 + static int snd_emu10k1_timer_stop(struct snd_timer *timer) 51 51 { 52 - emu10k1_t *emu; 52 + struct snd_emu10k1 *emu; 53 53 unsigned long flags; 54 54 55 55 emu = snd_timer_chip(timer); ··· 59 59 return 0; 60 60 } 61 61 62 - static int snd_emu10k1_timer_precise_resolution(snd_timer_t *timer, 62 + static int snd_emu10k1_timer_precise_resolution(struct snd_timer *timer, 63 63 unsigned long *num, unsigned long *den) 64 64 { 65 65 *num = 1; ··· 67 67 return 0; 68 68 } 69 69 70 - static struct _snd_timer_hardware snd_emu10k1_timer_hw = { 70 + static struct snd_timer_hardware snd_emu10k1_timer_hw = { 71 71 .flags = SNDRV_TIMER_HW_AUTO, 72 72 .resolution = 20833, /* 1 sample @ 48KHZ = 20.833...us */ 73 73 .ticks = 1024, ··· 76 76 .precise_resolution = snd_emu10k1_timer_precise_resolution, 77 77 }; 78 78 79 - int __devinit snd_emu10k1_timer(emu10k1_t *emu, int device) 79 + int __devinit snd_emu10k1_timer(struct snd_emu10k1 *emu, int device) 80 80 { 81 - snd_timer_t *timer = NULL; 82 - snd_timer_id_t tid; 81 + struct snd_timer *timer = NULL; 82 + struct snd_timer_id tid; 83 83 int err; 84 84 85 85 tid.dev_class = SNDRV_TIMER_CLASS_CARD;
+8 -5
sound/pci/emu10k1/voice.c
··· 45 45 * --rlrevell 46 46 */ 47 47 48 - static int voice_alloc(emu10k1_t *emu, emu10k1_voice_type_t type, int number, emu10k1_voice_t **rvoice) 48 + static int voice_alloc(struct snd_emu10k1 *emu, int type, int number, 49 + struct snd_emu10k1_voice **rvoice) 49 50 { 50 - emu10k1_voice_t *voice; 51 + struct snd_emu10k1_voice *voice; 51 52 int i, j, k, first_voice, last_voice, skip; 52 53 53 54 *rvoice = NULL; ··· 106 105 return 0; 107 106 } 108 107 109 - int snd_emu10k1_voice_alloc(emu10k1_t *emu, emu10k1_voice_type_t type, int number, emu10k1_voice_t **rvoice) 108 + int snd_emu10k1_voice_alloc(struct snd_emu10k1 *emu, int type, int number, 109 + struct snd_emu10k1_voice **rvoice) 110 110 { 111 111 unsigned long flags; 112 112 int result; ··· 125 123 if (emu->get_synth_voice) { 126 124 result = emu->get_synth_voice(emu); 127 125 if (result >= 0) { 128 - emu10k1_voice_t *pvoice = &emu->voices[result]; 126 + struct snd_emu10k1_voice *pvoice = &emu->voices[result]; 129 127 pvoice->interrupt = NULL; 130 128 pvoice->use = pvoice->pcm = pvoice->synth = pvoice->midi = pvoice->efx = 0; 131 129 pvoice->epcm = NULL; ··· 139 137 return result; 140 138 } 141 139 142 - int snd_emu10k1_voice_free(emu10k1_t *emu, emu10k1_voice_t *pvoice) 140 + int snd_emu10k1_voice_free(struct snd_emu10k1 *emu, 141 + struct snd_emu10k1_voice *pvoice) 143 142 { 144 143 unsigned long flags; 145 144