[ALSA] Remove xxx_t typedefs: PCI CS46xx
[linux-2.6.git] / sound / pci / cs46xx / dsp_spos_scb_lib.c
index 92849e1..6e86500 100644 (file)
 #include "cs46xx_lib.h"
 #include "dsp_spos.h"
 
-typedef struct _proc_scb_info_t {
-       dsp_scb_descriptor_t * scb_desc;
-       cs46xx_t *chip;
-} proc_scb_info_t;
+struct proc_scb_info {
+       struct dsp_scb_descriptor * scb_desc;
+       struct snd_cs46xx *chip;
+};
 
-static void remove_symbol (cs46xx_t * chip,symbol_entry_t * symbol)
+static void remove_symbol (struct snd_cs46xx * chip, struct dsp_symbol_entry * symbol)
 {
-       dsp_spos_instance_t * ins = chip->dsp_spos_instance;
+       struct dsp_spos_instance * ins = chip->dsp_spos_instance;
        int symbol_index = (int)(symbol - ins->symbol_table.symbols);
 
        snd_assert(ins->symbol_table.nsymbols > 0,return);
@@ -64,12 +64,13 @@ static void remove_symbol (cs46xx_t * chip,symbol_entry_t * symbol)
 
 }
 
-static void cs46xx_dsp_proc_scb_info_read (snd_info_entry_t *entry, snd_info_buffer_t * buffer)
+static void cs46xx_dsp_proc_scb_info_read (struct snd_info_entry *entry,
+                                          struct snd_info_buffer *buffer)
 {
-       proc_scb_info_t * scb_info  = (proc_scb_info_t *)entry->private_data;
-       dsp_scb_descriptor_t * scb = scb_info->scb_desc;
-       dsp_spos_instance_t * ins;
-       cs46xx_t *chip = scb_info->chip;
+       struct proc_scb_info * scb_info  = entry->private_data;
+       struct dsp_scb_descriptor * scb = scb_info->scb_desc;
+       struct dsp_spos_instance * ins;
+       struct snd_cs46xx *chip = scb_info->chip;
        int j,col;
        void __iomem *dst = chip->region.idx[1].remap_addr + DSP_PARAMETER_BYTE_OFFSET;
 
@@ -106,9 +107,9 @@ static void cs46xx_dsp_proc_scb_info_read (snd_info_entry_t *entry, snd_info_buf
        up(&chip->spos_mutex);
 }
 
-static void _dsp_unlink_scb (cs46xx_t *chip,dsp_scb_descriptor_t * scb)
+static void _dsp_unlink_scb (struct snd_cs46xx *chip, struct dsp_scb_descriptor * scb)
 {
-       dsp_spos_instance_t * ins = chip->dsp_spos_instance;
+       struct dsp_spos_instance * ins = chip->dsp_spos_instance;
        unsigned long flags;
 
        if ( scb->parent_scb_ptr ) {
@@ -160,7 +161,8 @@ static void _dsp_unlink_scb (cs46xx_t *chip,dsp_scb_descriptor_t * scb)
        }
 }
 
-static void _dsp_clear_sample_buffer (cs46xx_t *chip, u32 sample_buffer_addr, int dword_count) 
+static void _dsp_clear_sample_buffer (struct snd_cs46xx *chip, u32 sample_buffer_addr,
+                                     int dword_count) 
 {
        void __iomem *dst = chip->region.idx[2].remap_addr + sample_buffer_addr;
        int i;
@@ -171,9 +173,9 @@ static void _dsp_clear_sample_buffer (cs46xx_t *chip, u32 sample_buffer_addr, in
        }  
 }
 
-void cs46xx_dsp_remove_scb (cs46xx_t *chip, dsp_scb_descriptor_t * scb)
+void cs46xx_dsp_remove_scb (struct snd_cs46xx *chip, struct dsp_scb_descriptor * scb)
 {
-       dsp_spos_instance_t * ins = chip->dsp_spos_instance;
+       struct dsp_spos_instance * ins = chip->dsp_spos_instance;
 
        /* check integrety */
        snd_assert ( (scb->index >= 0 && 
@@ -218,10 +220,10 @@ void cs46xx_dsp_remove_scb (cs46xx_t *chip, dsp_scb_descriptor_t * scb)
 }
 
 
-void cs46xx_dsp_proc_free_scb_desc (dsp_scb_descriptor_t * scb)
+void cs46xx_dsp_proc_free_scb_desc (struct dsp_scb_descriptor * scb)
 {
        if (scb->proc_info) {
-               proc_scb_info_t * scb_info  = (proc_scb_info_t *)scb->proc_info->private_data;
+               struct proc_scb_info * scb_info = scb->proc_info->private_data;
 
                snd_printdd("cs46xx_dsp_proc_free_scb_desc: freeing %s\n",scb->scb_name);
 
@@ -233,11 +235,12 @@ void cs46xx_dsp_proc_free_scb_desc (dsp_scb_descriptor_t * scb)
        }
 }
 
-void cs46xx_dsp_proc_register_scb_desc (cs46xx_t *chip,dsp_scb_descriptor_t * scb)
+void cs46xx_dsp_proc_register_scb_desc (struct snd_cs46xx *chip,
+                                       struct dsp_scb_descriptor * scb)
 {
-       dsp_spos_instance_t * ins = chip->dsp_spos_instance;
-       snd_info_entry_t * entry;
-       proc_scb_info_t * scb_info;
+       struct dsp_spos_instance * ins = chip->dsp_spos_instance;
+       struct snd_info_entry * entry;
+       struct proc_scb_info * scb_info;
 
        /* register to proc */
        if (ins->snd_card != NULL && ins->proc_dsp_dir != NULL &&
@@ -245,7 +248,7 @@ void cs46xx_dsp_proc_register_scb_desc (cs46xx_t *chip,dsp_scb_descriptor_t * sc
   
                if ((entry = snd_info_create_card_entry(ins->snd_card, scb->scb_name, 
                                                        ins->proc_dsp_dir)) != NULL) {
-                       scb_info = kmalloc(sizeof(proc_scb_info_t), GFP_KERNEL);
+                       scb_info = kmalloc(sizeof(struct proc_scb_info), GFP_KERNEL);
                        if (!scb_info) {
                                snd_info_free_entry(entry);
                                entry = NULL;
@@ -273,14 +276,14 @@ out:
        }
 }
 
-static dsp_scb_descriptor_t * 
-_dsp_create_generic_scb (cs46xx_t *chip,char * name, u32 * scb_data,u32 dest,
-                         symbol_entry_t * task_entry,
-                         dsp_scb_descriptor_t * parent_scb,
+static struct dsp_scb_descriptor * 
+_dsp_create_generic_scb (struct snd_cs46xx *chip, char * name, u32 * scb_data, u32 dest,
+                         struct dsp_symbol_entry * task_entry,
+                         struct dsp_scb_descriptor * parent_scb,
                          int scb_child_type)
 {
-       dsp_spos_instance_t * ins = chip->dsp_spos_instance;
-       dsp_scb_descriptor_t * scb;
+       struct dsp_spos_instance * ins = chip->dsp_spos_instance;
+       struct dsp_scb_descriptor * scb;
   
        unsigned long flags;
 
@@ -342,13 +345,13 @@ _dsp_create_generic_scb (cs46xx_t *chip,char * name, u32 * scb_data,u32 dest,
        return scb;
 }
 
-static dsp_scb_descriptor_t * 
-cs46xx_dsp_create_generic_scb (cs46xx_t *chip,char * name, u32 * scb_data,u32 dest,
-                               char * task_entry_name,
-                               dsp_scb_descriptor_t * parent_scb,
+static struct dsp_scb_descriptor * 
+cs46xx_dsp_create_generic_scb (struct snd_cs46xx *chip, char * name, u32 * scb_data,
+                              u32 dest, char * task_entry_name,
+                               struct dsp_scb_descriptor * parent_scb,
                                int scb_child_type)
 {
-       symbol_entry_t * task_entry;
+       struct dsp_symbol_entry * task_entry;
 
        task_entry = cs46xx_dsp_lookup_symbol (chip,task_entry_name,
                                               SYMBOL_CODE);
@@ -362,12 +365,12 @@ cs46xx_dsp_create_generic_scb (cs46xx_t *chip,char * name, u32 * scb_data,u32 de
                                        parent_scb,scb_child_type);
 }
 
-dsp_scb_descriptor_t * 
-cs46xx_dsp_create_timing_master_scb (cs46xx_t *chip)
+struct dsp_scb_descriptor * 
+cs46xx_dsp_create_timing_master_scb (struct snd_cs46xx *chip)
 {
-       dsp_scb_descriptor_t * scb;
+       struct dsp_scb_descriptor * scb;
   
-       timing_master_scb_t timing_master_scb = {
+       struct dsp_timing_master_scb timing_master_scb = {
                { 0,
                  0,
                  0,
@@ -396,16 +399,15 @@ cs46xx_dsp_create_timing_master_scb (cs46xx_t *chip)
 }
 
 
-dsp_scb_descriptor_t * 
-cs46xx_dsp_create_codec_out_scb(cs46xx_t * chip,char * codec_name,
-                                u16 channel_disp,u16 fifo_addr,
-                                u16 child_scb_addr,
-                                u32 dest,dsp_scb_descriptor_t * parent_scb,
+struct dsp_scb_descriptor * 
+cs46xx_dsp_create_codec_out_scb(struct snd_cs46xx * chip, char * codec_name,
+                                u16 channel_disp, u16 fifo_addr, u16 child_scb_addr,
+                                u32 dest, struct dsp_scb_descriptor * parent_scb,
                                 int scb_child_type)
 {
-       dsp_scb_descriptor_t * scb;
+       struct dsp_scb_descriptor * scb;
   
-       codec_output_scb_t codec_out_scb = {
+       struct dsp_codec_output_scb codec_out_scb = {
                { 0,
                  0,
                  0,
@@ -435,16 +437,15 @@ cs46xx_dsp_create_codec_out_scb(cs46xx_t * chip,char * codec_name,
        return scb;
 }
 
-dsp_scb_descriptor_t * 
-cs46xx_dsp_create_codec_in_scb(cs46xx_t * chip,char * codec_name,
-                                u16 channel_disp,u16 fifo_addr,
-                                u16 sample_buffer_addr,
-                                u32 dest,dsp_scb_descriptor_t * parent_scb,
-                                int scb_child_type)
+struct dsp_scb_descriptor * 
+cs46xx_dsp_create_codec_in_scb(struct snd_cs46xx * chip, char * codec_name,
+                              u16 channel_disp, u16 fifo_addr, u16 sample_buffer_addr,
+                              u32 dest, struct dsp_scb_descriptor * parent_scb,
+                              int scb_child_type)
 {
 
-       dsp_scb_descriptor_t * scb;
-       codec_input_scb_t codec_input_scb = {
+       struct dsp_scb_descriptor * scb;
+       struct dsp_codec_input_scb codec_input_scb = {
                { 0,
                  0,
                  0,
@@ -481,17 +482,17 @@ cs46xx_dsp_create_codec_in_scb(cs46xx_t * chip,char * codec_name,
 }
 
 
-static dsp_scb_descriptor_t * 
-cs46xx_dsp_create_pcm_reader_scb(cs46xx_t * chip,char * scb_name,
-                                 u16 sample_buffer_addr,u32 dest,
+static struct dsp_scb_descriptor * 
+cs46xx_dsp_create_pcm_reader_scb(struct snd_cs46xx * chip, char * scb_name,
+                                 u16 sample_buffer_addr, u32 dest,
                                  int virtual_channel, u32 playback_hw_addr,
-                                 dsp_scb_descriptor_t * parent_scb,
+                                 struct dsp_scb_descriptor * parent_scb,
                                  int scb_child_type)
 {
-       dsp_spos_instance_t * ins = chip->dsp_spos_instance;
-       dsp_scb_descriptor_t * scb;
+       struct dsp_spos_instance * ins = chip->dsp_spos_instance;
+       struct dsp_scb_descriptor * scb;
   
-       generic_scb_t pcm_reader_scb = {
+       struct dsp_generic_scb pcm_reader_scb = {
     
                /*
                  Play DMA Task xfers data from host buffer to SP buffer
@@ -584,18 +585,18 @@ cs46xx_dsp_create_pcm_reader_scb(cs46xx_t * chip,char * scb_name,
 
 #define GOF_PER_SEC 200
 
-dsp_scb_descriptor_t * 
-cs46xx_dsp_create_src_task_scb(cs46xx_t * chip,char * scb_name,
+struct dsp_scb_descriptor * 
+cs46xx_dsp_create_src_task_scb(struct snd_cs46xx * chip, char * scb_name,
                               int rate,
                                u16 src_buffer_addr,
-                               u16 src_delay_buffer_addr,u32 dest,
-                               dsp_scb_descriptor_t * parent_scb,
+                               u16 src_delay_buffer_addr, u32 dest,
+                               struct dsp_scb_descriptor * parent_scb,
                                int scb_child_type,
                               int pass_through)
 {
 
-       dsp_spos_instance_t * ins = chip->dsp_spos_instance;
-       dsp_scb_descriptor_t * scb;
+       struct dsp_spos_instance * ins = chip->dsp_spos_instance;
+       struct dsp_scb_descriptor * scb;
        unsigned int tmp1, tmp2;
        unsigned int phiIncr;
        unsigned int correctionPerGOF, correctionPerSec;
@@ -632,7 +633,7 @@ cs46xx_dsp_create_src_task_scb(cs46xx_t * chip,char * scb_name,
        correctionPerSec = tmp1;
 
        {
-               src_task_scb_t src_task_scb = {
+               struct dsp_src_task_scb src_task_scb = {
                        0x0028,0x00c8,
                        0x5555,0x0000,
                        0x0000,0x0000,
@@ -688,14 +689,14 @@ cs46xx_dsp_create_src_task_scb(cs46xx_t * chip,char * scb_name,
 }
 
 #if 0 /* not used */
-dsp_scb_descriptor_t * 
-cs46xx_dsp_create_filter_scb(cs46xx_t * chip,char * scb_name,
-                            u16 buffer_addr,u32 dest,
-                            dsp_scb_descriptor_t * parent_scb,
+struct dsp_scb_descriptor * 
+cs46xx_dsp_create_filter_scb(struct snd_cs46xx * chip, char * scb_name,
+                            u16 buffer_addr, u32 dest,
+                            struct dsp_scb_descriptor * parent_scb,
                             int scb_child_type) {
-       dsp_scb_descriptor_t * scb;
+       struct dsp_scb_descriptor * scb;
        
-       filter_scb_t filter_scb = {
+       struct dsp_filter_scb filter_scb = {
                .a0_right            = 0x41a9,
                .a0_left             = 0x41a9,
                .a1_right            = 0xb8e4,
@@ -738,15 +739,15 @@ cs46xx_dsp_create_filter_scb(cs46xx_t * chip,char * scb_name,
 }
 #endif /* not used */
 
-dsp_scb_descriptor_t * 
-cs46xx_dsp_create_mix_only_scb(cs46xx_t * chip,char * scb_name,
-                               u16 mix_buffer_addr,u32 dest,
-                               dsp_scb_descriptor_t * parent_scb,
+struct dsp_scb_descriptor * 
+cs46xx_dsp_create_mix_only_scb(struct snd_cs46xx * chip, char * scb_name,
+                               u16 mix_buffer_addr, u32 dest,
+                               struct dsp_scb_descriptor * parent_scb,
                                int scb_child_type)
 {
-       dsp_scb_descriptor_t * scb;
+       struct dsp_scb_descriptor * scb;
   
-       mix_only_scb_t master_mix_scb = {
+       struct dsp_mix_only_scb master_mix_scb = {
                /* 0 */ { 0,
                          /* 1 */   0,
                          /* 2 */  mix_buffer_addr,
@@ -778,15 +779,15 @@ cs46xx_dsp_create_mix_only_scb(cs46xx_t * chip,char * scb_name,
 }
 
 
-dsp_scb_descriptor_t * 
-cs46xx_dsp_create_mix_to_ostream_scb(cs46xx_t * chip,char * scb_name,
-                                     u16 mix_buffer_addr,u16 writeback_spb,u32 dest,
-                                     dsp_scb_descriptor_t * parent_scb,
+struct dsp_scb_descriptor * 
+cs46xx_dsp_create_mix_to_ostream_scb(struct snd_cs46xx * chip, char * scb_name,
+                                     u16 mix_buffer_addr, u16 writeback_spb, u32 dest,
+                                     struct dsp_scb_descriptor * parent_scb,
                                      int scb_child_type)
 {
-       dsp_scb_descriptor_t * scb;
+       struct dsp_scb_descriptor * scb;
 
-       mix2_ostream_scb_t mix2_ostream_scb = {
+       struct dsp_mix2_ostream_scb mix2_ostream_scb = {
                /* Basic (non scatter/gather) DMA requestor (4 ints) */
                { 
                        DMA_RQ_C1_SOURCE_MOD64 +
@@ -832,18 +833,18 @@ cs46xx_dsp_create_mix_to_ostream_scb(cs46xx_t * chip,char * scb_name,
 }
 
 
-dsp_scb_descriptor_t * 
-cs46xx_dsp_create_vari_decimate_scb(cs46xx_t * chip,char * scb_name,
+struct dsp_scb_descriptor * 
+cs46xx_dsp_create_vari_decimate_scb(struct snd_cs46xx * chip,char * scb_name,
                                     u16 vari_buffer_addr0,
                                     u16 vari_buffer_addr1,
                                     u32 dest,
-                                    dsp_scb_descriptor_t * parent_scb,
+                                    struct dsp_scb_descriptor * parent_scb,
                                     int scb_child_type)
 {
 
-       dsp_scb_descriptor_t * scb;
+       struct dsp_scb_descriptor * scb;
   
-       vari_decimate_scb_t vari_decimate_scb = {
+       struct dsp_vari_decimate_scb vari_decimate_scb = {
                0x0028,0x00c8,
                0x5555,0x0000,
                0x0000,0x0000,
@@ -876,17 +877,17 @@ cs46xx_dsp_create_vari_decimate_scb(cs46xx_t * chip,char * scb_name,
 }
 
 
-static dsp_scb_descriptor_t * 
-cs46xx_dsp_create_pcm_serial_input_scb(cs46xx_t * chip,char * scb_name,u32 dest,
-                                       dsp_scb_descriptor_t * input_scb,
-                                       dsp_scb_descriptor_t * parent_scb,
+static struct dsp_scb_descriptor * 
+cs46xx_dsp_create_pcm_serial_input_scb(struct snd_cs46xx * chip, char * scb_name, u32 dest,
+                                       struct dsp_scb_descriptor * input_scb,
+                                       struct dsp_scb_descriptor * parent_scb,
                                        int scb_child_type)
 {
 
-       dsp_scb_descriptor_t * scb;
+       struct dsp_scb_descriptor * scb;
 
 
-       pcm_serial_input_scb_t pcm_serial_input_scb = {
+       struct dsp_pcm_serial_input_scb pcm_serial_input_scb = {
                { 0,
                  0,
                  0,
@@ -919,17 +920,17 @@ cs46xx_dsp_create_pcm_serial_input_scb(cs46xx_t * chip,char * scb_name,u32 dest,
 }
 
 
-static dsp_scb_descriptor_t * 
-cs46xx_dsp_create_asynch_fg_tx_scb(cs46xx_t * chip,char * scb_name,u32 dest,
+static struct dsp_scb_descriptor * 
+cs46xx_dsp_create_asynch_fg_tx_scb(struct snd_cs46xx * chip, char * scb_name, u32 dest,
                                    u16 hfg_scb_address,
                                    u16 asynch_buffer_address,
-                                   dsp_scb_descriptor_t * parent_scb,
+                                   struct dsp_scb_descriptor * parent_scb,
                                    int scb_child_type)
 {
 
-       dsp_scb_descriptor_t * scb;
+       struct dsp_scb_descriptor * scb;
 
-       asynch_fg_tx_scb_t asynch_fg_tx_scb = {
+       struct dsp_asynch_fg_tx_scb asynch_fg_tx_scb = {
                0xfc00,0x03ff,      /*  Prototype sample buffer size of 256 dwords */
                0x0058,0x0028,      /* Min Delta 7 dwords == 28 bytes */
                /* : Max delta 25 dwords == 100 bytes */
@@ -966,17 +967,17 @@ cs46xx_dsp_create_asynch_fg_tx_scb(cs46xx_t * chip,char * scb_name,u32 dest,
 }
 
 
-dsp_scb_descriptor_t * 
-cs46xx_dsp_create_asynch_fg_rx_scb(cs46xx_t * chip,char * scb_name,u32 dest,
+struct dsp_scb_descriptor * 
+cs46xx_dsp_create_asynch_fg_rx_scb(struct snd_cs46xx * chip, char * scb_name, u32 dest,
                                    u16 hfg_scb_address,
                                    u16 asynch_buffer_address,
-                                   dsp_scb_descriptor_t * parent_scb,
+                                   struct dsp_scb_descriptor * parent_scb,
                                    int scb_child_type)
 {
-       dsp_spos_instance_t * ins = chip->dsp_spos_instance;
-       dsp_scb_descriptor_t * scb;
+       struct dsp_spos_instance * ins = chip->dsp_spos_instance;
+       struct dsp_scb_descriptor * scb;
 
-       asynch_fg_rx_scb_t asynch_fg_rx_scb = {
+       struct dsp_asynch_fg_rx_scb asynch_fg_rx_scb = {
                0xfe00,0x01ff,      /*  Prototype sample buffer size of 128 dwords */
                0x0064,0x001c,      /* Min Delta 7 dwords == 28 bytes */
                                    /* : Max delta 25 dwords == 100 bytes */
@@ -1016,17 +1017,17 @@ cs46xx_dsp_create_asynch_fg_rx_scb(cs46xx_t * chip,char * scb_name,u32 dest,
 
 
 #if 0 /* not used */
-dsp_scb_descriptor_t * 
-cs46xx_dsp_create_output_snoop_scb(cs46xx_t * chip,char * scb_name,u32 dest,
+struct dsp_scb_descriptor * 
+cs46xx_dsp_create_output_snoop_scb(struct snd_cs46xx * chip, char * scb_name, u32 dest,
                                    u16 snoop_buffer_address,
-                                   dsp_scb_descriptor_t * snoop_scb,
-                                   dsp_scb_descriptor_t * parent_scb,
+                                   struct dsp_scb_descriptor * snoop_scb,
+                                   struct dsp_scb_descriptor * parent_scb,
                                    int scb_child_type)
 {
 
-       dsp_scb_descriptor_t * scb;
+       struct dsp_scb_descriptor * scb;
   
-       output_snoop_scb_t output_snoop_scb = {
+       struct dsp_output_snoop_scb output_snoop_scb = {
                { 0,    /*  not used.  Zero */
                  0,
                  0,
@@ -1058,14 +1059,14 @@ cs46xx_dsp_create_output_snoop_scb(cs46xx_t * chip,char * scb_name,u32 dest,
 #endif /* not used */
 
 
-dsp_scb_descriptor_t * 
-cs46xx_dsp_create_spio_write_scb(cs46xx_t * chip,char * scb_name,u32 dest,
-                                 dsp_scb_descriptor_t * parent_scb,
+struct dsp_scb_descriptor * 
+cs46xx_dsp_create_spio_write_scb(struct snd_cs46xx * chip, char * scb_name, u32 dest,
+                                 struct dsp_scb_descriptor * parent_scb,
                                  int scb_child_type)
 {
-       dsp_scb_descriptor_t * scb;
+       struct dsp_scb_descriptor * scb;
   
-       spio_write_scb_t spio_write_scb = {
+       struct dsp_spio_write_scb spio_write_scb = {
                0,0,         /*   SPIOWAddress2:SPIOWAddress1; */
                0,           /*   SPIOWData1; */
                0,           /*   SPIOWData2; */
@@ -1094,15 +1095,16 @@ cs46xx_dsp_create_spio_write_scb(cs46xx_t * chip,char * scb_name,u32 dest,
        return scb;
 }
 
-dsp_scb_descriptor_t *  cs46xx_dsp_create_magic_snoop_scb(cs46xx_t * chip,char * scb_name,u32 dest,
-                                                          u16 snoop_buffer_address,
-                                                          dsp_scb_descriptor_t * snoop_scb,
-                                                          dsp_scb_descriptor_t * parent_scb,
-                                                          int scb_child_type)
+struct dsp_scb_descriptor *
+cs46xx_dsp_create_magic_snoop_scb(struct snd_cs46xx * chip, char * scb_name, u32 dest,
+                                 u16 snoop_buffer_address,
+                                 struct dsp_scb_descriptor * snoop_scb,
+                                 struct dsp_scb_descriptor * parent_scb,
+                                 int scb_child_type)
 {
-       dsp_scb_descriptor_t * scb;
+       struct dsp_scb_descriptor * scb;
   
-       magic_snoop_task_t magic_snoop_scb = {
+       struct dsp_magic_snoop_task magic_snoop_scb = {
                /* 0 */ 0, /* i0 */
                /* 1 */ 0, /* i1 */
                /* 2 */ snoop_buffer_address << 0x10,
@@ -1129,10 +1131,11 @@ dsp_scb_descriptor_t *  cs46xx_dsp_create_magic_snoop_scb(cs46xx_t * chip,char *
        return scb;
 }
 
-static dsp_scb_descriptor_t * find_next_free_scb (cs46xx_t * chip,dsp_scb_descriptor_t * from)
+static struct dsp_scb_descriptor *
+find_next_free_scb (struct snd_cs46xx * chip, struct dsp_scb_descriptor * from)
 {
-       dsp_spos_instance_t * ins = chip->dsp_spos_instance;
-       dsp_scb_descriptor_t * scb = from;
+       struct dsp_spos_instance * ins = chip->dsp_spos_instance;
+       struct dsp_scb_descriptor * scb = from;
 
        while (scb->next_scb_ptr != ins->the_null_scb) {
                snd_assert (scb->next_scb_ptr != NULL, return NULL);
@@ -1212,18 +1215,19 @@ static u32 src_delay_buffer_addr[DSP_MAX_SRC_NR] = {
        0x2B00
 };
 
-pcm_channel_descriptor_t * cs46xx_dsp_create_pcm_channel (cs46xx_t * chip,
-                                                          u32 sample_rate, void * private_data, 
-                                                          u32 hw_dma_addr,
-                                                          int pcm_channel_id)
+struct dsp_pcm_channel_descriptor *
+cs46xx_dsp_create_pcm_channel (struct snd_cs46xx * chip,
+                              u32 sample_rate, void * private_data, 
+                              u32 hw_dma_addr,
+                              int pcm_channel_id)
 {
-       dsp_spos_instance_t * ins = chip->dsp_spos_instance;
-       dsp_scb_descriptor_t * src_scb = NULL,* pcm_scb, * mixer_scb = NULL;
-       dsp_scb_descriptor_t * src_parent_scb = NULL;
+       struct dsp_spos_instance * ins = chip->dsp_spos_instance;
+       struct dsp_scb_descriptor * src_scb = NULL, * pcm_scb, * mixer_scb = NULL;
+       struct dsp_scb_descriptor * src_parent_scb = NULL;
 
-       /* dsp_scb_descriptor_t * pcm_parent_scb; */
+       /* struct dsp_scb_descriptor * pcm_parent_scb; */
        char scb_name[DSP_MAX_SCB_NAME];
-       int i,pcm_index = -1, insert_point, src_index = -1,pass_through = 0;
+       int i, pcm_index = -1, insert_point, src_index = -1, pass_through = 0;
        unsigned long flags;
 
        switch (pcm_channel_id) {
@@ -1371,8 +1375,8 @@ pcm_channel_descriptor_t * cs46xx_dsp_create_pcm_channel (cs46xx_t * chip,
        return (ins->pcm_channels + pcm_index);
 }
 
-int cs46xx_dsp_pcm_channel_set_period (cs46xx_t * chip,
-                                      pcm_channel_descriptor_t * pcm_channel,
+int cs46xx_dsp_pcm_channel_set_period (struct snd_cs46xx * chip,
+                                      struct dsp_pcm_channel_descriptor * pcm_channel,
                                       int period_size)
 {
        u32 temp = snd_cs46xx_peek (chip,pcm_channel->pcm_reader_scb->address << 2);
@@ -1410,7 +1414,7 @@ int cs46xx_dsp_pcm_channel_set_period (cs46xx_t * chip,
        return 0;
 }
 
-int cs46xx_dsp_pcm_ostream_set_period (cs46xx_t * chip,
+int cs46xx_dsp_pcm_ostream_set_period (struct snd_cs46xx * chip,
                                       int period_size)
 {
        u32 temp = snd_cs46xx_peek (chip,WRITEBACK_SCB_ADDR << 2);
@@ -1448,9 +1452,10 @@ int cs46xx_dsp_pcm_ostream_set_period (cs46xx_t * chip,
        return 0;
 }
 
-void cs46xx_dsp_destroy_pcm_channel (cs46xx_t * chip,pcm_channel_descriptor_t * pcm_channel)
+void cs46xx_dsp_destroy_pcm_channel (struct snd_cs46xx * chip,
+                                    struct dsp_pcm_channel_descriptor * pcm_channel)
 {
-       dsp_spos_instance_t * ins = chip->dsp_spos_instance;
+       struct dsp_spos_instance * ins = chip->dsp_spos_instance;
        unsigned long flags;
 
        snd_assert(pcm_channel->active, return );
@@ -1478,9 +1483,10 @@ void cs46xx_dsp_destroy_pcm_channel (cs46xx_t * chip,pcm_channel_descriptor_t *
        }
 }
 
-int cs46xx_dsp_pcm_unlink (cs46xx_t * chip,pcm_channel_descriptor_t * pcm_channel)
+int cs46xx_dsp_pcm_unlink (struct snd_cs46xx * chip,
+                          struct dsp_pcm_channel_descriptor * pcm_channel)
 {
-       dsp_spos_instance_t * ins = chip->dsp_spos_instance;
+       struct dsp_spos_instance * ins = chip->dsp_spos_instance;
        unsigned long flags;
 
        snd_assert(pcm_channel->active,return -EIO);
@@ -1503,11 +1509,12 @@ int cs46xx_dsp_pcm_unlink (cs46xx_t * chip,pcm_channel_descriptor_t * pcm_channe
        return 0;
 }
 
-int cs46xx_dsp_pcm_link (cs46xx_t * chip,pcm_channel_descriptor_t * pcm_channel)
+int cs46xx_dsp_pcm_link (struct snd_cs46xx * chip,
+                        struct dsp_pcm_channel_descriptor * pcm_channel)
 {
-       dsp_spos_instance_t * ins = chip->dsp_spos_instance;
-       dsp_scb_descriptor_t * parent_scb;
-       dsp_scb_descriptor_t * src_scb = pcm_channel->src_scb;
+       struct dsp_spos_instance * ins = chip->dsp_spos_instance;
+       struct dsp_scb_descriptor * parent_scb;
+       struct dsp_scb_descriptor * src_scb = pcm_channel->src_scb;
        unsigned long flags;
 
        spin_lock(&pcm_channel->src_scb->lock);
@@ -1544,12 +1551,13 @@ int cs46xx_dsp_pcm_link (cs46xx_t * chip,pcm_channel_descriptor_t * pcm_channel)
        return 0;
 }
 
-dsp_scb_descriptor_t * cs46xx_add_record_source (cs46xx_t *chip,dsp_scb_descriptor_t * source,
-                                                 u16 addr,char * scb_name)
+struct dsp_scb_descriptor *
+cs46xx_add_record_source (struct snd_cs46xx *chip, struct dsp_scb_descriptor * source,
+                         u16 addr, char * scb_name)
 {
-       dsp_spos_instance_t * ins = chip->dsp_spos_instance;
-       dsp_scb_descriptor_t * parent;
-       dsp_scb_descriptor_t * pcm_input;
+       struct dsp_spos_instance * ins = chip->dsp_spos_instance;
+       struct dsp_scb_descriptor * parent;
+       struct dsp_scb_descriptor * pcm_input;
        int insert_point;
 
        snd_assert (ins->record_mixer_scb != NULL,return NULL);
@@ -1569,7 +1577,7 @@ dsp_scb_descriptor_t * cs46xx_add_record_source (cs46xx_t *chip,dsp_scb_descript
        return pcm_input;
 }
 
-int cs46xx_src_unlink(cs46xx_t *chip,dsp_scb_descriptor_t * src)
+int cs46xx_src_unlink(struct snd_cs46xx *chip, struct dsp_scb_descriptor * src)
 {
        snd_assert (src->parent_scb_ptr != NULL,  return -EINVAL );
 
@@ -1581,10 +1589,10 @@ int cs46xx_src_unlink(cs46xx_t *chip,dsp_scb_descriptor_t * src)
        return 0;
 }
 
-int cs46xx_src_link(cs46xx_t *chip,dsp_scb_descriptor_t * src)
+int cs46xx_src_link(struct snd_cs46xx *chip, struct dsp_scb_descriptor * src)
 {
-       dsp_spos_instance_t * ins = chip->dsp_spos_instance;
-       dsp_scb_descriptor_t * parent_scb;
+       struct dsp_spos_instance * ins = chip->dsp_spos_instance;
+       struct dsp_scb_descriptor * parent_scb;
 
        snd_assert (src->parent_scb_ptr == NULL,   return -EINVAL );
        snd_assert(ins->master_mix_scb !=NULL,   return -EINVAL );
@@ -1605,9 +1613,9 @@ int cs46xx_src_link(cs46xx_t *chip,dsp_scb_descriptor_t * src)
        return 0;
 }
 
-int cs46xx_dsp_enable_spdif_out (cs46xx_t *chip)
+int cs46xx_dsp_enable_spdif_out (struct snd_cs46xx *chip)
 {
-       dsp_spos_instance_t * ins = chip->dsp_spos_instance;
+       struct dsp_spos_instance * ins = chip->dsp_spos_instance;
 
        if ( ! (ins->spdif_status_out & DSP_SPDIF_STATUS_HW_ENABLED) ) {
                cs46xx_dsp_enable_spdif_hw (chip);
@@ -1653,9 +1661,9 @@ int cs46xx_dsp_enable_spdif_out (cs46xx_t *chip)
        return 0;
 }
 
-int  cs46xx_dsp_disable_spdif_out (cs46xx_t *chip)
+int  cs46xx_dsp_disable_spdif_out (struct snd_cs46xx *chip)
 {
-       dsp_spos_instance_t * ins = chip->dsp_spos_instance;
+       struct dsp_spos_instance * ins = chip->dsp_spos_instance;
 
        /* dont touch anything if SPDIF is open */
        if ( ins->spdif_status_out & DSP_SPDIF_STATUS_PLAYBACK_OPEN) {
@@ -1685,9 +1693,9 @@ int  cs46xx_dsp_disable_spdif_out (cs46xx_t *chip)
        return 0;
 }
 
-int cs46xx_iec958_pre_open (cs46xx_t *chip)
+int cs46xx_iec958_pre_open (struct snd_cs46xx *chip)
 {
-       dsp_spos_instance_t * ins = chip->dsp_spos_instance;
+       struct dsp_spos_instance * ins = chip->dsp_spos_instance;
 
        if ( ins->spdif_status_out & DSP_SPDIF_STATUS_OUTPUT_ENABLED ) {
                /* remove AsynchFGTxSCB and and PCMSerialInput_II */
@@ -1718,9 +1726,9 @@ int cs46xx_iec958_pre_open (cs46xx_t *chip)
        return 0;
 }
 
-int cs46xx_iec958_post_close (cs46xx_t *chip)
+int cs46xx_iec958_post_close (struct snd_cs46xx *chip)
 {
-       dsp_spos_instance_t * ins = chip->dsp_spos_instance;
+       struct dsp_spos_instance * ins = chip->dsp_spos_instance;
 
        snd_assert (ins->asynch_tx_scb != NULL, return -EINVAL);