diff options
author | Takashi Iwai <tiwai@suse.de> | 2005-11-17 09:01:08 -0500 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2006-01-03 06:19:16 -0500 |
commit | 67b48b880062ba1775f424c2dd2c68bc30ec180f (patch) | |
tree | 32a39285a55e57cecb773ee92bff82322faaf33a /sound/pci/mixart/mixart_hwdep.c | |
parent | fcfd3332e3bf5f63116044c168110820996cd1fe (diff) |
[ALSA] Remove xxx_t typedefs: PCI miXart
Modules: MIXART driver
Remove xxx_t typedefs from the PCI miXart driver.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/mixart/mixart_hwdep.c')
-rw-r--r-- | sound/pci/mixart/mixart_hwdep.c | 76 |
1 files changed, 38 insertions, 38 deletions
diff --git a/sound/pci/mixart/mixart_hwdep.c b/sound/pci/mixart/mixart_hwdep.c index edd1599fe45e..ca05075c67c6 100644 --- a/sound/pci/mixart/mixart_hwdep.c +++ b/sound/pci/mixart/mixart_hwdep.c | |||
@@ -40,7 +40,9 @@ | |||
40 | * @param value value | 40 | * @param value value |
41 | * @param timeout timeout in centisenconds | 41 | * @param timeout timeout in centisenconds |
42 | */ | 42 | */ |
43 | static int mixart_wait_nice_for_register_value(mixart_mgr_t *mgr, u32 offset, int is_egal, u32 value, unsigned long timeout) | 43 | static int mixart_wait_nice_for_register_value(struct mixart_mgr *mgr, |
44 | u32 offset, int is_egal, | ||
45 | u32 value, unsigned long timeout) | ||
44 | { | 46 | { |
45 | unsigned long end_time = jiffies + (timeout * HZ / 100); | 47 | unsigned long end_time = jiffies + (timeout * HZ / 100); |
46 | u32 read; | 48 | u32 read; |
@@ -66,8 +68,6 @@ static int mixart_wait_nice_for_register_value(mixart_mgr_t *mgr, u32 offset, in | |||
66 | /* | 68 | /* |
67 | structures needed to upload elf code packets | 69 | structures needed to upload elf code packets |
68 | */ | 70 | */ |
69 | typedef struct snd_mixart_elf32_ehdr snd_mixart_elf32_ehdr_t; | ||
70 | |||
71 | struct snd_mixart_elf32_ehdr { | 71 | struct snd_mixart_elf32_ehdr { |
72 | u8 e_ident[16]; | 72 | u8 e_ident[16]; |
73 | u16 e_type; | 73 | u16 e_type; |
@@ -85,8 +85,6 @@ struct snd_mixart_elf32_ehdr { | |||
85 | u16 e_shstrndx; | 85 | u16 e_shstrndx; |
86 | }; | 86 | }; |
87 | 87 | ||
88 | typedef struct snd_mixart_elf32_phdr snd_mixart_elf32_phdr_t; | ||
89 | |||
90 | struct snd_mixart_elf32_phdr { | 88 | struct snd_mixart_elf32_phdr { |
91 | u32 p_type; | 89 | u32 p_type; |
92 | u32 p_offset; | 90 | u32 p_offset; |
@@ -98,19 +96,19 @@ struct snd_mixart_elf32_phdr { | |||
98 | u32 p_align; | 96 | u32 p_align; |
99 | }; | 97 | }; |
100 | 98 | ||
101 | static int mixart_load_elf(mixart_mgr_t *mgr, const struct firmware *dsp ) | 99 | static int mixart_load_elf(struct mixart_mgr *mgr, const struct firmware *dsp ) |
102 | { | 100 | { |
103 | char elf32_magic_number[4] = {0x7f,'E','L','F'}; | 101 | char elf32_magic_number[4] = {0x7f,'E','L','F'}; |
104 | snd_mixart_elf32_ehdr_t *elf_header; | 102 | struct snd_mixart_elf32_ehdr *elf_header; |
105 | int i; | 103 | int i; |
106 | 104 | ||
107 | elf_header = (snd_mixart_elf32_ehdr_t *)dsp->data; | 105 | elf_header = (struct snd_mixart_elf32_ehdr *)dsp->data; |
108 | for( i=0; i<4; i++ ) | 106 | for( i=0; i<4; i++ ) |
109 | if ( elf32_magic_number[i] != elf_header->e_ident[i] ) | 107 | if ( elf32_magic_number[i] != elf_header->e_ident[i] ) |
110 | return -EINVAL; | 108 | return -EINVAL; |
111 | 109 | ||
112 | if( elf_header->e_phoff != 0 ) { | 110 | if( elf_header->e_phoff != 0 ) { |
113 | snd_mixart_elf32_phdr_t elf_programheader; | 111 | struct snd_mixart_elf32_phdr elf_programheader; |
114 | 112 | ||
115 | for( i=0; i < be16_to_cpu(elf_header->e_phnum); i++ ) { | 113 | for( i=0; i < be16_to_cpu(elf_header->e_phnum); i++ ) { |
116 | u32 pos = be32_to_cpu(elf_header->e_phoff) + (u32)(i * be16_to_cpu(elf_header->e_phentsize)); | 114 | u32 pos = be32_to_cpu(elf_header->e_phoff) + (u32)(i * be16_to_cpu(elf_header->e_phentsize)); |
@@ -137,14 +135,14 @@ static int mixart_load_elf(mixart_mgr_t *mgr, const struct firmware *dsp ) | |||
137 | #define MIXART_FIRST_ANA_AUDIO_ID 0 | 135 | #define MIXART_FIRST_ANA_AUDIO_ID 0 |
138 | #define MIXART_FIRST_DIG_AUDIO_ID 8 | 136 | #define MIXART_FIRST_DIG_AUDIO_ID 8 |
139 | 137 | ||
140 | static int mixart_enum_connectors(mixart_mgr_t *mgr) | 138 | static int mixart_enum_connectors(struct mixart_mgr *mgr) |
141 | { | 139 | { |
142 | u32 k; | 140 | u32 k; |
143 | int err; | 141 | int err; |
144 | mixart_msg_t request; | 142 | struct mixart_msg request; |
145 | mixart_enum_connector_resp_t *connector; | 143 | struct mixart_enum_connector_resp *connector; |
146 | mixart_audio_info_req_t *audio_info_req; | 144 | struct mixart_audio_info_req *audio_info_req; |
147 | mixart_audio_info_resp_t *audio_info; | 145 | struct mixart_audio_info_resp *audio_info; |
148 | 146 | ||
149 | connector = kmalloc(sizeof(*connector), GFP_KERNEL); | 147 | connector = kmalloc(sizeof(*connector), GFP_KERNEL); |
150 | audio_info_req = kmalloc(sizeof(*audio_info_req), GFP_KERNEL); | 148 | audio_info_req = kmalloc(sizeof(*audio_info_req), GFP_KERNEL); |
@@ -159,7 +157,7 @@ static int mixart_enum_connectors(mixart_mgr_t *mgr) | |||
159 | audio_info_req->cd_max_level = MIXART_FLOAT____0_0_TO_HEX; | 157 | audio_info_req->cd_max_level = MIXART_FLOAT____0_0_TO_HEX; |
160 | 158 | ||
161 | request.message_id = MSG_SYSTEM_ENUM_PLAY_CONNECTOR; | 159 | request.message_id = MSG_SYSTEM_ENUM_PLAY_CONNECTOR; |
162 | request.uid = (mixart_uid_t){0,0}; /* board num = 0 */ | 160 | request.uid = (struct mixart_uid){0,0}; /* board num = 0 */ |
163 | request.data = NULL; | 161 | request.data = NULL; |
164 | request.size = 0; | 162 | request.size = 0; |
165 | 163 | ||
@@ -171,7 +169,7 @@ static int mixart_enum_connectors(mixart_mgr_t *mgr) | |||
171 | } | 169 | } |
172 | 170 | ||
173 | for(k=0; k < connector->uid_count; k++) { | 171 | for(k=0; k < connector->uid_count; k++) { |
174 | mixart_pipe_t* pipe; | 172 | struct mixart_pipe *pipe; |
175 | 173 | ||
176 | if(k < MIXART_FIRST_DIG_AUDIO_ID) { | 174 | if(k < MIXART_FIRST_DIG_AUDIO_ID) { |
177 | pipe = &mgr->chip[k/2]->pipe_out_ana; | 175 | pipe = &mgr->chip[k/2]->pipe_out_ana; |
@@ -201,7 +199,7 @@ static int mixart_enum_connectors(mixart_mgr_t *mgr) | |||
201 | } | 199 | } |
202 | 200 | ||
203 | request.message_id = MSG_SYSTEM_ENUM_RECORD_CONNECTOR; | 201 | request.message_id = MSG_SYSTEM_ENUM_RECORD_CONNECTOR; |
204 | request.uid = (mixart_uid_t){0,0}; /* board num = 0 */ | 202 | request.uid = (struct mixart_uid){0,0}; /* board num = 0 */ |
205 | request.data = NULL; | 203 | request.data = NULL; |
206 | request.size = 0; | 204 | request.size = 0; |
207 | 205 | ||
@@ -213,7 +211,7 @@ static int mixart_enum_connectors(mixart_mgr_t *mgr) | |||
213 | } | 211 | } |
214 | 212 | ||
215 | for(k=0; k < connector->uid_count; k++) { | 213 | for(k=0; k < connector->uid_count; k++) { |
216 | mixart_pipe_t* pipe; | 214 | struct mixart_pipe *pipe; |
217 | 215 | ||
218 | if(k < MIXART_FIRST_DIG_AUDIO_ID) { | 216 | if(k < MIXART_FIRST_DIG_AUDIO_ID) { |
219 | pipe = &mgr->chip[k/2]->pipe_in_ana; | 217 | pipe = &mgr->chip[k/2]->pipe_in_ana; |
@@ -251,14 +249,14 @@ static int mixart_enum_connectors(mixart_mgr_t *mgr) | |||
251 | return err; | 249 | return err; |
252 | } | 250 | } |
253 | 251 | ||
254 | static int mixart_enum_physio(mixart_mgr_t *mgr) | 252 | static int mixart_enum_physio(struct mixart_mgr *mgr) |
255 | { | 253 | { |
256 | u32 k; | 254 | u32 k; |
257 | int err; | 255 | int err; |
258 | mixart_msg_t request; | 256 | struct mixart_msg request; |
259 | mixart_uid_t get_console_mgr; | 257 | struct mixart_uid get_console_mgr; |
260 | mixart_return_uid_t console_mgr; | 258 | struct mixart_return_uid console_mgr; |
261 | mixart_uid_enumeration_t phys_io; | 259 | struct mixart_uid_enumeration phys_io; |
262 | 260 | ||
263 | /* get the uid for the console manager */ | 261 | /* get the uid for the console manager */ |
264 | get_console_mgr.object_id = 0; | 262 | get_console_mgr.object_id = 0; |
@@ -280,7 +278,7 @@ static int mixart_enum_physio(mixart_mgr_t *mgr) | |||
280 | mgr->uid_console_manager = console_mgr.uid; | 278 | mgr->uid_console_manager = console_mgr.uid; |
281 | 279 | ||
282 | request.message_id = MSG_SYSTEM_ENUM_PHYSICAL_IO; | 280 | request.message_id = MSG_SYSTEM_ENUM_PHYSICAL_IO; |
283 | request.uid = (mixart_uid_t){0,0}; | 281 | request.uid = (struct mixart_uid){0,0}; |
284 | request.data = &console_mgr.uid; | 282 | request.data = &console_mgr.uid; |
285 | request.size = sizeof(console_mgr.uid); | 283 | request.size = sizeof(console_mgr.uid); |
286 | 284 | ||
@@ -301,11 +299,11 @@ static int mixart_enum_physio(mixart_mgr_t *mgr) | |||
301 | } | 299 | } |
302 | 300 | ||
303 | 301 | ||
304 | static int mixart_first_init(mixart_mgr_t *mgr) | 302 | static int mixart_first_init(struct mixart_mgr *mgr) |
305 | { | 303 | { |
306 | u32 k; | 304 | u32 k; |
307 | int err; | 305 | int err; |
308 | mixart_msg_t request; | 306 | struct mixart_msg request; |
309 | 307 | ||
310 | if((err = mixart_enum_connectors(mgr)) < 0) return err; | 308 | if((err = mixart_enum_connectors(mgr)) < 0) return err; |
311 | 309 | ||
@@ -314,7 +312,7 @@ static int mixart_first_init(mixart_mgr_t *mgr) | |||
314 | /* send a synchro command to card (necessary to do this before first MSG_STREAM_START_STREAM_GRP_PACKET) */ | 312 | /* send a synchro command to card (necessary to do this before first MSG_STREAM_START_STREAM_GRP_PACKET) */ |
315 | /* though why not here */ | 313 | /* though why not here */ |
316 | request.message_id = MSG_SYSTEM_SEND_SYNCHRO_CMD; | 314 | request.message_id = MSG_SYSTEM_SEND_SYNCHRO_CMD; |
317 | request.uid = (mixart_uid_t){0,0}; | 315 | request.uid = (struct mixart_uid){0,0}; |
318 | request.data = NULL; | 316 | request.data = NULL; |
319 | request.size = 0; | 317 | request.size = 0; |
320 | /* this command has no data. response is a 32 bit status */ | 318 | /* this command has no data. response is a 32 bit status */ |
@@ -331,7 +329,7 @@ static int mixart_first_init(mixart_mgr_t *mgr) | |||
331 | /* firmware base addresses (when hard coded) */ | 329 | /* firmware base addresses (when hard coded) */ |
332 | #define MIXART_MOTHERBOARD_XLX_BASE_ADDRESS 0x00600000 | 330 | #define MIXART_MOTHERBOARD_XLX_BASE_ADDRESS 0x00600000 |
333 | 331 | ||
334 | static int mixart_dsp_load(mixart_mgr_t* mgr, int index, const struct firmware *dsp) | 332 | static int mixart_dsp_load(struct mixart_mgr* mgr, int index, const struct firmware *dsp) |
335 | { | 333 | { |
336 | int err, card_index; | 334 | int err, card_index; |
337 | u32 status_xilinx, status_elf, status_daught; | 335 | u32 status_xilinx, status_elf, status_daught; |
@@ -513,7 +511,7 @@ static int mixart_dsp_load(mixart_mgr_t* mgr, int index, const struct firmware * | |||
513 | 511 | ||
514 | /* create devices and mixer in accordance with HW options*/ | 512 | /* create devices and mixer in accordance with HW options*/ |
515 | for (card_index = 0; card_index < mgr->num_cards; card_index++) { | 513 | for (card_index = 0; card_index < mgr->num_cards; card_index++) { |
516 | mixart_t *chip = mgr->chip[card_index]; | 514 | struct snd_mixart *chip = mgr->chip[card_index]; |
517 | 515 | ||
518 | if ((err = snd_mixart_create_pcm(chip)) < 0) | 516 | if ((err = snd_mixart_create_pcm(chip)) < 0) |
519 | return err; | 517 | return err; |
@@ -541,7 +539,7 @@ static int mixart_dsp_load(mixart_mgr_t* mgr, int index, const struct firmware * | |||
541 | 539 | ||
542 | #ifdef SND_MIXART_FW_LOADER | 540 | #ifdef SND_MIXART_FW_LOADER |
543 | 541 | ||
544 | int snd_mixart_setup_firmware(mixart_mgr_t *mgr) | 542 | int snd_mixart_setup_firmware(struct mixart_mgr *mgr) |
545 | { | 543 | { |
546 | static char *fw_files[3] = { | 544 | static char *fw_files[3] = { |
547 | "miXart8.xlx", "miXart8.elf", "miXart8AES.xlx" | 545 | "miXart8.xlx", "miXart8.elf", "miXart8AES.xlx" |
@@ -573,19 +571,20 @@ int snd_mixart_setup_firmware(mixart_mgr_t *mgr) | |||
573 | /* miXart hwdep interface id string */ | 571 | /* miXart hwdep interface id string */ |
574 | #define SND_MIXART_HWDEP_ID "miXart Loader" | 572 | #define SND_MIXART_HWDEP_ID "miXart Loader" |
575 | 573 | ||
576 | static int mixart_hwdep_open(snd_hwdep_t *hw, struct file *file) | 574 | static int mixart_hwdep_open(struct snd_hwdep *hw, struct file *file) |
577 | { | 575 | { |
578 | return 0; | 576 | return 0; |
579 | } | 577 | } |
580 | 578 | ||
581 | static int mixart_hwdep_release(snd_hwdep_t *hw, struct file *file) | 579 | static int mixart_hwdep_release(struct snd_hwdep *hw, struct file *file) |
582 | { | 580 | { |
583 | return 0; | 581 | return 0; |
584 | } | 582 | } |
585 | 583 | ||
586 | static int mixart_hwdep_dsp_status(snd_hwdep_t *hw, snd_hwdep_dsp_status_t *info) | 584 | static int mixart_hwdep_dsp_status(struct snd_hwdep *hw, |
585 | struct snd_hwdep_dsp_status *info) | ||
587 | { | 586 | { |
588 | mixart_mgr_t *mgr = hw->private_data; | 587 | struct mixart_mgr *mgr = hw->private_data; |
589 | 588 | ||
590 | strcpy(info->id, "miXart"); | 589 | strcpy(info->id, "miXart"); |
591 | info->num_dsps = MIXART_HARDW_FILES_MAX_INDEX; | 590 | info->num_dsps = MIXART_HARDW_FILES_MAX_INDEX; |
@@ -597,9 +596,10 @@ static int mixart_hwdep_dsp_status(snd_hwdep_t *hw, snd_hwdep_dsp_status_t *info | |||
597 | return 0; | 596 | return 0; |
598 | } | 597 | } |
599 | 598 | ||
600 | static int mixart_hwdep_dsp_load(snd_hwdep_t *hw, snd_hwdep_dsp_image_t *dsp) | 599 | static int mixart_hwdep_dsp_load(struct snd_hwdep *hw, |
600 | struct snd_hwdep_dsp_image *dsp) | ||
601 | { | 601 | { |
602 | mixart_mgr_t* mgr = hw->private_data; | 602 | struct mixart_mgr* mgr = hw->private_data; |
603 | struct firmware fw; | 603 | struct firmware fw; |
604 | int err; | 604 | int err; |
605 | 605 | ||
@@ -622,10 +622,10 @@ static int mixart_hwdep_dsp_load(snd_hwdep_t *hw, snd_hwdep_dsp_image_t *dsp) | |||
622 | return err; | 622 | return err; |
623 | } | 623 | } |
624 | 624 | ||
625 | int snd_mixart_setup_firmware(mixart_mgr_t *mgr) | 625 | int snd_mixart_setup_firmware(struct mixart_mgr *mgr) |
626 | { | 626 | { |
627 | int err; | 627 | int err; |
628 | snd_hwdep_t *hw; | 628 | struct snd_hwdep *hw; |
629 | 629 | ||
630 | /* only create hwdep interface for first cardX (see "index" module parameter)*/ | 630 | /* only create hwdep interface for first cardX (see "index" module parameter)*/ |
631 | if ((err = snd_hwdep_new(mgr->chip[0]->card, SND_MIXART_HWDEP_ID, 0, &hw)) < 0) | 631 | if ((err = snd_hwdep_new(mgr->chip[0]->card, SND_MIXART_HWDEP_ID, 0, &hw)) < 0) |