diff options
Diffstat (limited to 'include/sound/cs46xx_dsp_spos.h')
| -rw-r--r-- | include/sound/cs46xx_dsp_spos.h | 119 |
1 files changed, 58 insertions, 61 deletions
diff --git a/include/sound/cs46xx_dsp_spos.h b/include/sound/cs46xx_dsp_spos.h index 10014cb62423..da934def31e9 100644 --- a/include/sound/cs46xx_dsp_spos.h +++ b/include/sound/cs46xx_dsp_spos.h | |||
| @@ -65,133 +65,130 @@ | |||
| 65 | #define DSP_SPDIF_STATUS_HW_ENABLED 4 | 65 | #define DSP_SPDIF_STATUS_HW_ENABLED 4 |
| 66 | #define DSP_SPDIF_STATUS_INPUT_CTRL_ENABLED 8 | 66 | #define DSP_SPDIF_STATUS_INPUT_CTRL_ENABLED 8 |
| 67 | 67 | ||
| 68 | struct _dsp_module_desc_t; | 68 | struct dsp_symbol_entry { |
| 69 | |||
| 70 | typedef struct _symbol_entry_t { | ||
| 71 | u32 address; | 69 | u32 address; |
| 72 | char symbol_name[DSP_MAX_SYMBOL_NAME]; | 70 | char symbol_name[DSP_MAX_SYMBOL_NAME]; |
| 73 | int symbol_type; | 71 | int symbol_type; |
| 74 | 72 | ||
| 75 | /* initialized by driver */ | 73 | /* initialized by driver */ |
| 76 | struct _dsp_module_desc_t * module; | 74 | struct dsp_module_desc * module; |
| 77 | int deleted; | 75 | int deleted; |
| 78 | } symbol_entry_t; | 76 | }; |
| 79 | 77 | ||
| 80 | typedef struct _symbol_desc_t { | 78 | struct dsp_symbol_desc { |
| 81 | int nsymbols; | 79 | int nsymbols; |
| 82 | 80 | ||
| 83 | symbol_entry_t * symbols; | 81 | struct dsp_symbol_entry *symbols; |
| 84 | 82 | ||
| 85 | /* initialized by driver */ | 83 | /* initialized by driver */ |
| 86 | int highest_frag_index; | 84 | int highest_frag_index; |
| 87 | } symbol_desc_t; | 85 | }; |
| 88 | |||
| 89 | 86 | ||
| 90 | typedef struct _segment_desc_t { | 87 | struct dsp_segment_desc { |
| 91 | int segment_type; | 88 | int segment_type; |
| 92 | u32 offset; | 89 | u32 offset; |
| 93 | u32 size; | 90 | u32 size; |
| 94 | u32 * data; | 91 | u32 * data; |
| 95 | } segment_desc_t; | 92 | }; |
| 96 | 93 | ||
| 97 | typedef struct _dsp_module_desc_t { | 94 | struct dsp_module_desc { |
| 98 | char * module_name; | 95 | char * module_name; |
| 99 | symbol_desc_t symbol_table; | 96 | struct dsp_symbol_desc symbol_table; |
| 100 | int nsegments; | 97 | int nsegments; |
| 101 | segment_desc_t * segments; | 98 | struct dsp_segment_desc * segments; |
| 102 | 99 | ||
| 103 | /* initialized by driver */ | 100 | /* initialized by driver */ |
| 104 | u32 overlay_begin_address; | 101 | u32 overlay_begin_address; |
| 105 | u32 load_address; | 102 | u32 load_address; |
| 106 | int nfixups; | 103 | int nfixups; |
| 107 | } dsp_module_desc_t; | 104 | }; |
| 108 | 105 | ||
| 109 | typedef struct _dsp_scb_descriptor_t { | 106 | struct dsp_scb_descriptor { |
| 110 | char scb_name[DSP_MAX_SCB_NAME]; | 107 | char scb_name[DSP_MAX_SCB_NAME]; |
| 111 | u32 address; | 108 | u32 address; |
| 112 | int index; | 109 | int index; |
| 113 | 110 | ||
| 114 | struct _dsp_scb_descriptor_t * sub_list_ptr; | 111 | struct dsp_scb_descriptor * sub_list_ptr; |
| 115 | struct _dsp_scb_descriptor_t * next_scb_ptr; | 112 | struct dsp_scb_descriptor * next_scb_ptr; |
| 116 | struct _dsp_scb_descriptor_t * parent_scb_ptr; | 113 | struct dsp_scb_descriptor * parent_scb_ptr; |
| 117 | 114 | ||
| 118 | symbol_entry_t * task_entry; | 115 | struct dsp_symbol_entry * task_entry; |
| 119 | symbol_entry_t * scb_symbol; | 116 | struct dsp_symbol_entry * scb_symbol; |
| 120 | 117 | ||
| 121 | snd_info_entry_t *proc_info; | 118 | struct snd_info_entry *proc_info; |
| 122 | int ref_count; | 119 | int ref_count; |
| 123 | spinlock_t lock; | 120 | spinlock_t lock; |
| 124 | 121 | ||
| 125 | int deleted; | 122 | int deleted; |
| 126 | } dsp_scb_descriptor_t; | 123 | }; |
| 127 | 124 | ||
| 128 | typedef struct _dsp_task_descriptor_t { | 125 | struct dsp_task_descriptor { |
| 129 | char task_name[DSP_MAX_TASK_NAME]; | 126 | char task_name[DSP_MAX_TASK_NAME]; |
| 130 | int size; | 127 | int size; |
| 131 | u32 address; | 128 | u32 address; |
| 132 | int index; | 129 | int index; |
| 133 | } dsp_task_descriptor_t; | 130 | }; |
| 134 | 131 | ||
| 135 | typedef struct _pcm_channel_descriptor_t { | 132 | struct dsp_pcm_channel_descriptor { |
| 136 | int active; | 133 | int active; |
| 137 | int src_slot; | 134 | int src_slot; |
| 138 | int pcm_slot; | 135 | int pcm_slot; |
| 139 | u32 sample_rate; | 136 | u32 sample_rate; |
| 140 | u32 unlinked; | 137 | u32 unlinked; |
| 141 | dsp_scb_descriptor_t * pcm_reader_scb; | 138 | struct dsp_scb_descriptor * pcm_reader_scb; |
| 142 | dsp_scb_descriptor_t * src_scb; | 139 | struct dsp_scb_descriptor * src_scb; |
| 143 | dsp_scb_descriptor_t * mixer_scb; | 140 | struct dsp_scb_descriptor * mixer_scb; |
| 144 | 141 | ||
| 145 | void * private_data; | 142 | void * private_data; |
| 146 | } pcm_channel_descriptor_t; | 143 | }; |
| 147 | 144 | ||
| 148 | typedef struct _dsp_spos_instance_t { | 145 | struct dsp_spos_instance { |
| 149 | symbol_desc_t symbol_table; /* currently availble loaded symbols in SP */ | 146 | struct dsp_symbol_desc symbol_table; /* currently availble loaded symbols in SP */ |
| 150 | 147 | ||
| 151 | int nmodules; | 148 | int nmodules; |
| 152 | dsp_module_desc_t * modules; /* modules loaded into SP */ | 149 | struct dsp_module_desc * modules; /* modules loaded into SP */ |
| 153 | 150 | ||
| 154 | segment_desc_t code; | 151 | struct dsp_segment_desc code; |
| 155 | 152 | ||
| 156 | /* Main PCM playback mixer */ | 153 | /* Main PCM playback mixer */ |
| 157 | dsp_scb_descriptor_t * master_mix_scb; | 154 | struct dsp_scb_descriptor * master_mix_scb; |
| 158 | u16 dac_volume_right; | 155 | u16 dac_volume_right; |
| 159 | u16 dac_volume_left; | 156 | u16 dac_volume_left; |
| 160 | 157 | ||
| 161 | /* Rear/surround PCM playback mixer */ | 158 | /* Rear/surround PCM playback mixer */ |
| 162 | dsp_scb_descriptor_t * rear_mix_scb; | 159 | struct dsp_scb_descriptor * rear_mix_scb; |
| 163 | 160 | ||
| 164 | /* Center/LFE mixer */ | 161 | /* Center/LFE mixer */ |
| 165 | dsp_scb_descriptor_t * center_lfe_mix_scb; | 162 | struct dsp_scb_descriptor * center_lfe_mix_scb; |
| 166 | 163 | ||
| 167 | int npcm_channels; | 164 | int npcm_channels; |
| 168 | int nsrc_scb; | 165 | int nsrc_scb; |
| 169 | pcm_channel_descriptor_t pcm_channels[DSP_MAX_PCM_CHANNELS]; | 166 | struct dsp_pcm_channel_descriptor pcm_channels[DSP_MAX_PCM_CHANNELS]; |
| 170 | int src_scb_slots[DSP_MAX_SRC_NR]; | 167 | int src_scb_slots[DSP_MAX_SRC_NR]; |
| 171 | 168 | ||
| 172 | /* cache this symbols */ | 169 | /* cache this symbols */ |
| 173 | symbol_entry_t * null_algorithm; /* used by PCMreaderSCB's */ | 170 | struct dsp_symbol_entry * null_algorithm; /* used by PCMreaderSCB's */ |
| 174 | symbol_entry_t * s16_up; /* used by SRCtaskSCB's */ | 171 | struct dsp_symbol_entry * s16_up; /* used by SRCtaskSCB's */ |
| 175 | 172 | ||
| 176 | /* proc fs */ | 173 | /* proc fs */ |
| 177 | snd_card_t * snd_card; | 174 | struct snd_card *snd_card; |
| 178 | snd_info_entry_t * proc_dsp_dir; | 175 | struct snd_info_entry * proc_dsp_dir; |
| 179 | snd_info_entry_t * proc_sym_info_entry; | 176 | struct snd_info_entry * proc_sym_info_entry; |
| 180 | snd_info_entry_t * proc_modules_info_entry; | 177 | struct snd_info_entry * proc_modules_info_entry; |
| 181 | snd_info_entry_t * proc_parameter_dump_info_entry; | 178 | struct snd_info_entry * proc_parameter_dump_info_entry; |
| 182 | snd_info_entry_t * proc_sample_dump_info_entry; | 179 | struct snd_info_entry * proc_sample_dump_info_entry; |
| 183 | 180 | ||
| 184 | /* SCB's descriptors */ | 181 | /* SCB's descriptors */ |
| 185 | int nscb; | 182 | int nscb; |
| 186 | int scb_highest_frag_index; | 183 | int scb_highest_frag_index; |
| 187 | dsp_scb_descriptor_t scbs[DSP_MAX_SCB_DESC]; | 184 | struct dsp_scb_descriptor scbs[DSP_MAX_SCB_DESC]; |
| 188 | snd_info_entry_t * proc_scb_info_entry; | 185 | struct snd_info_entry * proc_scb_info_entry; |
| 189 | dsp_scb_descriptor_t * the_null_scb; | 186 | struct dsp_scb_descriptor * the_null_scb; |
| 190 | 187 | ||
| 191 | /* Task's descriptors */ | 188 | /* Task's descriptors */ |
| 192 | int ntask; | 189 | int ntask; |
| 193 | dsp_task_descriptor_t tasks[DSP_MAX_TASK_DESC]; | 190 | struct dsp_task_descriptor tasks[DSP_MAX_TASK_DESC]; |
| 194 | snd_info_entry_t * proc_task_info_entry; | 191 | struct snd_info_entry * proc_task_info_entry; |
| 195 | 192 | ||
| 196 | /* SPDIF status */ | 193 | /* SPDIF status */ |
| 197 | int spdif_status_out; | 194 | int spdif_status_out; |
| @@ -204,30 +201,30 @@ typedef struct _dsp_spos_instance_t { | |||
| 204 | unsigned int spdif_csuv_stream; | 201 | unsigned int spdif_csuv_stream; |
| 205 | 202 | ||
| 206 | /* SPDIF input sample rate converter */ | 203 | /* SPDIF input sample rate converter */ |
| 207 | dsp_scb_descriptor_t * spdif_in_src; | 204 | struct dsp_scb_descriptor * spdif_in_src; |
| 208 | /* SPDIF input asynch. receiver */ | 205 | /* SPDIF input asynch. receiver */ |
| 209 | dsp_scb_descriptor_t * asynch_rx_scb; | 206 | struct dsp_scb_descriptor * asynch_rx_scb; |
| 210 | 207 | ||
| 211 | /* Capture record mixer SCB */ | 208 | /* Capture record mixer SCB */ |
| 212 | dsp_scb_descriptor_t * record_mixer_scb; | 209 | struct dsp_scb_descriptor * record_mixer_scb; |
| 213 | 210 | ||
| 214 | /* CODEC input SCB */ | 211 | /* CODEC input SCB */ |
| 215 | dsp_scb_descriptor_t * codec_in_scb; | 212 | struct dsp_scb_descriptor * codec_in_scb; |
| 216 | 213 | ||
| 217 | /* reference snooper */ | 214 | /* reference snooper */ |
| 218 | dsp_scb_descriptor_t * ref_snoop_scb; | 215 | struct dsp_scb_descriptor * ref_snoop_scb; |
| 219 | 216 | ||
| 220 | /* SPDIF output PCM reference */ | 217 | /* SPDIF output PCM reference */ |
| 221 | dsp_scb_descriptor_t * spdif_pcm_input_scb; | 218 | struct dsp_scb_descriptor * spdif_pcm_input_scb; |
| 222 | 219 | ||
| 223 | /* asynch TX task */ | 220 | /* asynch TX task */ |
| 224 | dsp_scb_descriptor_t * asynch_tx_scb; | 221 | struct dsp_scb_descriptor * asynch_tx_scb; |
| 225 | 222 | ||
| 226 | /* record sources */ | 223 | /* record sources */ |
| 227 | dsp_scb_descriptor_t * pcm_input; | 224 | struct dsp_scb_descriptor * pcm_input; |
| 228 | dsp_scb_descriptor_t * adc_input; | 225 | struct dsp_scb_descriptor * adc_input; |
| 229 | 226 | ||
| 230 | int spdif_in_sample_rate; | 227 | int spdif_in_sample_rate; |
| 231 | } dsp_spos_instance_t; | 228 | }; |
| 232 | 229 | ||
| 233 | #endif /* __DSP_SPOS_H__ */ | 230 | #endif /* __DSP_SPOS_H__ */ |
