diff options
Diffstat (limited to 'sound/pci/cs46xx/cs46xx_lib.h')
-rw-r--r-- | sound/pci/cs46xx/cs46xx_lib.h | 211 |
1 files changed, 111 insertions, 100 deletions
diff --git a/sound/pci/cs46xx/cs46xx_lib.h b/sound/pci/cs46xx/cs46xx_lib.h index d7bec096d247..8b4a4aeaf85f 100644 --- a/sound/pci/cs46xx/cs46xx_lib.h +++ b/sound/pci/cs46xx/cs46xx_lib.h | |||
@@ -57,7 +57,7 @@ | |||
57 | * common I/O routines | 57 | * common I/O routines |
58 | */ | 58 | */ |
59 | 59 | ||
60 | static inline void snd_cs46xx_poke(cs46xx_t *chip, unsigned long reg, unsigned int val) | 60 | static inline void snd_cs46xx_poke(struct snd_cs46xx *chip, unsigned long reg, unsigned int val) |
61 | { | 61 | { |
62 | unsigned int bank = reg >> 16; | 62 | unsigned int bank = reg >> 16; |
63 | unsigned int offset = reg & 0xffff; | 63 | unsigned int offset = reg & 0xffff; |
@@ -66,117 +66,128 @@ static inline void snd_cs46xx_poke(cs46xx_t *chip, unsigned long reg, unsigned i | |||
66 | writel(val, chip->region.idx[bank+1].remap_addr + offset); | 66 | writel(val, chip->region.idx[bank+1].remap_addr + offset); |
67 | } | 67 | } |
68 | 68 | ||
69 | static inline unsigned int snd_cs46xx_peek(cs46xx_t *chip, unsigned long reg) | 69 | static inline unsigned int snd_cs46xx_peek(struct snd_cs46xx *chip, unsigned long reg) |
70 | { | 70 | { |
71 | unsigned int bank = reg >> 16; | 71 | unsigned int bank = reg >> 16; |
72 | unsigned int offset = reg & 0xffff; | 72 | unsigned int offset = reg & 0xffff; |
73 | return readl(chip->region.idx[bank+1].remap_addr + offset); | 73 | return readl(chip->region.idx[bank+1].remap_addr + offset); |
74 | } | 74 | } |
75 | 75 | ||
76 | static inline void snd_cs46xx_pokeBA0(cs46xx_t *chip, unsigned long offset, unsigned int val) | 76 | static inline void snd_cs46xx_pokeBA0(struct snd_cs46xx *chip, unsigned long offset, unsigned int val) |
77 | { | 77 | { |
78 | writel(val, chip->region.name.ba0.remap_addr + offset); | 78 | writel(val, chip->region.name.ba0.remap_addr + offset); |
79 | } | 79 | } |
80 | 80 | ||
81 | static inline unsigned int snd_cs46xx_peekBA0(cs46xx_t *chip, unsigned long offset) | 81 | static inline unsigned int snd_cs46xx_peekBA0(struct snd_cs46xx *chip, unsigned long offset) |
82 | { | 82 | { |
83 | return readl(chip->region.name.ba0.remap_addr + offset); | 83 | return readl(chip->region.name.ba0.remap_addr + offset); |
84 | } | 84 | } |
85 | 85 | ||
86 | dsp_spos_instance_t * cs46xx_dsp_spos_create (cs46xx_t * chip); | 86 | struct dsp_spos_instance *cs46xx_dsp_spos_create (struct snd_cs46xx * chip); |
87 | void cs46xx_dsp_spos_destroy (cs46xx_t * chip); | 87 | void cs46xx_dsp_spos_destroy (struct snd_cs46xx * chip); |
88 | int cs46xx_dsp_load_module (cs46xx_t * chip,dsp_module_desc_t * module); | 88 | int cs46xx_dsp_load_module (struct snd_cs46xx * chip, struct dsp_module_desc * module); |
89 | symbol_entry_t * cs46xx_dsp_lookup_symbol (cs46xx_t * chip,char * symbol_name,int symbol_type); | 89 | struct dsp_symbol_entry *cs46xx_dsp_lookup_symbol (struct snd_cs46xx * chip, char * symbol_name, |
90 | int cs46xx_dsp_proc_init (snd_card_t * card, cs46xx_t *chip); | 90 | int symbol_type); |
91 | int cs46xx_dsp_proc_done (cs46xx_t *chip); | 91 | int cs46xx_dsp_proc_init (struct snd_card *card, struct snd_cs46xx *chip); |
92 | int cs46xx_dsp_scb_and_task_init (cs46xx_t *chip); | 92 | int cs46xx_dsp_proc_done (struct snd_cs46xx *chip); |
93 | int snd_cs46xx_download (cs46xx_t *chip,u32 *src,unsigned long offset, | 93 | int cs46xx_dsp_scb_and_task_init (struct snd_cs46xx *chip); |
94 | unsigned long len); | 94 | int snd_cs46xx_download (struct snd_cs46xx *chip, u32 *src, unsigned long offset, |
95 | int snd_cs46xx_clear_BA1(cs46xx_t *chip,unsigned long offset,unsigned long len); | 95 | unsigned long len); |
96 | int cs46xx_dsp_enable_spdif_out (cs46xx_t *chip); | 96 | int snd_cs46xx_clear_BA1(struct snd_cs46xx *chip, unsigned long offset, unsigned long len); |
97 | int cs46xx_dsp_enable_spdif_hw (cs46xx_t *chip); | 97 | int cs46xx_dsp_enable_spdif_out (struct snd_cs46xx *chip); |
98 | int cs46xx_dsp_disable_spdif_out (cs46xx_t *chip); | 98 | int cs46xx_dsp_enable_spdif_hw (struct snd_cs46xx *chip); |
99 | int cs46xx_dsp_enable_spdif_in (cs46xx_t *chip); | 99 | int cs46xx_dsp_disable_spdif_out (struct snd_cs46xx *chip); |
100 | int cs46xx_dsp_disable_spdif_in (cs46xx_t *chip); | 100 | int cs46xx_dsp_enable_spdif_in (struct snd_cs46xx *chip); |
101 | int cs46xx_dsp_enable_pcm_capture (cs46xx_t *chip); | 101 | int cs46xx_dsp_disable_spdif_in (struct snd_cs46xx *chip); |
102 | int cs46xx_dsp_disable_pcm_capture (cs46xx_t *chip); | 102 | int cs46xx_dsp_enable_pcm_capture (struct snd_cs46xx *chip); |
103 | int cs46xx_dsp_enable_adc_capture (cs46xx_t *chip); | 103 | int cs46xx_dsp_disable_pcm_capture (struct snd_cs46xx *chip); |
104 | int cs46xx_dsp_disable_adc_capture (cs46xx_t *chip); | 104 | int cs46xx_dsp_enable_adc_capture (struct snd_cs46xx *chip); |
105 | int cs46xx_poke_via_dsp (cs46xx_t *chip,u32 address,u32 data); | 105 | int cs46xx_dsp_disable_adc_capture (struct snd_cs46xx *chip); |
106 | dsp_scb_descriptor_t * cs46xx_dsp_create_scb (cs46xx_t *chip,char * name, u32 * scb_data,u32 dest); | 106 | int cs46xx_poke_via_dsp (struct snd_cs46xx *chip, u32 address, u32 data); |
107 | void cs46xx_dsp_proc_free_scb_desc (dsp_scb_descriptor_t * scb); | 107 | struct dsp_scb_descriptor * cs46xx_dsp_create_scb (struct snd_cs46xx *chip, char * name, |
108 | void cs46xx_dsp_proc_register_scb_desc (cs46xx_t *chip,dsp_scb_descriptor_t * scb); | 108 | u32 * scb_data, u32 dest); |
109 | dsp_scb_descriptor_t * cs46xx_dsp_create_timing_master_scb (cs46xx_t *chip); | 109 | void cs46xx_dsp_proc_free_scb_desc (struct dsp_scb_descriptor * scb); |
110 | dsp_scb_descriptor_t * cs46xx_dsp_create_codec_out_scb(cs46xx_t * chip,char * codec_name, | 110 | void cs46xx_dsp_proc_register_scb_desc (struct snd_cs46xx *chip, |
111 | u16 channel_disp,u16 fifo_addr, | 111 | struct dsp_scb_descriptor * scb); |
112 | u16 child_scb_addr, | 112 | struct dsp_scb_descriptor * cs46xx_dsp_create_timing_master_scb (struct snd_cs46xx *chip); |
113 | u32 dest, | 113 | struct dsp_scb_descriptor * |
114 | dsp_scb_descriptor_t * parent_scb, | 114 | cs46xx_dsp_create_codec_out_scb(struct snd_cs46xx * chip, |
115 | int scb_child_type); | 115 | char * codec_name, u16 channel_disp, u16 fifo_addr, |
116 | dsp_scb_descriptor_t * cs46xx_dsp_create_codec_in_scb(cs46xx_t * chip,char * codec_name, | 116 | u16 child_scb_addr, u32 dest, |
117 | u16 channel_disp,u16 fifo_addr, | 117 | struct dsp_scb_descriptor * parent_scb, |
118 | u16 sample_buffer_addr, | 118 | int scb_child_type); |
119 | u32 dest, | 119 | struct dsp_scb_descriptor * |
120 | dsp_scb_descriptor_t * parent_scb, | 120 | cs46xx_dsp_create_codec_in_scb(struct snd_cs46xx * chip, char * codec_name, |
121 | int scb_child_type); | 121 | u16 channel_disp, u16 fifo_addr, |
122 | void cs46xx_dsp_remove_scb (cs46xx_t *chip,dsp_scb_descriptor_t * scb); | 122 | u16 sample_buffer_addr, u32 dest, |
123 | dsp_scb_descriptor_t * cs46xx_dsp_create_codec_in_scb(cs46xx_t * chip,char * codec_name, | 123 | struct dsp_scb_descriptor * parent_scb, |
124 | u16 channel_disp,u16 fifo_addr, | 124 | int scb_child_type); |
125 | u16 sample_buffer_addr, | 125 | void cs46xx_dsp_remove_scb (struct snd_cs46xx *chip, |
126 | u32 dest,dsp_scb_descriptor_t * parent_scb, | 126 | struct dsp_scb_descriptor * scb); |
127 | int scb_child_type); | 127 | struct dsp_scb_descriptor * |
128 | dsp_scb_descriptor_t * cs46xx_dsp_create_src_task_scb(cs46xx_t * chip,char * scb_name, | 128 | cs46xx_dsp_create_codec_in_scb(struct snd_cs46xx * chip, char * codec_name, |
129 | int sample_rate, | 129 | u16 channel_disp, u16 fifo_addr, |
130 | u16 src_buffer_addr, | 130 | u16 sample_buffer_addr, u32 dest, |
131 | u16 src_delay_buffer_addr,u32 dest, | 131 | struct dsp_scb_descriptor * parent_scb, |
132 | dsp_scb_descriptor_t * parent_scb, | 132 | int scb_child_type); |
133 | int scb_child_type, | 133 | struct dsp_scb_descriptor * |
134 | int pass_through); | 134 | cs46xx_dsp_create_src_task_scb(struct snd_cs46xx * chip, char * scb_name, |
135 | dsp_scb_descriptor_t * cs46xx_dsp_create_mix_only_scb(cs46xx_t * chip,char * scb_name, | 135 | int sample_rate, u16 src_buffer_addr, |
136 | u16 mix_buffer_addr,u32 dest, | 136 | u16 src_delay_buffer_addr, u32 dest, |
137 | dsp_scb_descriptor_t * parent_scb, | 137 | struct dsp_scb_descriptor * parent_scb, |
138 | int scb_child_type); | 138 | int scb_child_type, int pass_through); |
139 | 139 | struct dsp_scb_descriptor * | |
140 | dsp_scb_descriptor_t * cs46xx_dsp_create_vari_decimate_scb(cs46xx_t * chip,char * scb_name, | 140 | cs46xx_dsp_create_mix_only_scb(struct snd_cs46xx * chip, char * scb_name, |
141 | u16 vari_buffer_addr0, | 141 | u16 mix_buffer_addr, u32 dest, |
142 | u16 vari_buffer_addr1, | 142 | struct dsp_scb_descriptor * parent_scb, |
143 | u32 dest, | 143 | int scb_child_type); |
144 | dsp_scb_descriptor_t * parent_scb, | 144 | |
145 | int scb_child_type); | 145 | struct dsp_scb_descriptor * |
146 | dsp_scb_descriptor_t * cs46xx_dsp_create_asynch_fg_rx_scb(cs46xx_t * chip,char * scb_name,u32 dest, | 146 | cs46xx_dsp_create_vari_decimate_scb(struct snd_cs46xx * chip, char * scb_name, |
147 | u16 hfg_scb_address, | 147 | u16 vari_buffer_addr0, u16 vari_buffer_addr1, u32 dest, |
148 | u16 asynch_buffer_address, | 148 | struct dsp_scb_descriptor * parent_scb, |
149 | dsp_scb_descriptor_t * parent_scb, | 149 | int scb_child_type); |
150 | int scb_child_type); | 150 | struct dsp_scb_descriptor * |
151 | dsp_scb_descriptor_t * cs46xx_dsp_create_spio_write_scb(cs46xx_t * chip,char * scb_name,u32 dest, | 151 | cs46xx_dsp_create_asynch_fg_rx_scb(struct snd_cs46xx * chip, char * scb_name, |
152 | dsp_scb_descriptor_t * parent_scb, | 152 | u32 dest, u16 hfg_scb_address, u16 asynch_buffer_address, |
153 | int scb_child_type); | 153 | struct dsp_scb_descriptor * parent_scb, |
154 | dsp_scb_descriptor_t * cs46xx_dsp_create_mix_to_ostream_scb(cs46xx_t * chip,char * scb_name, | 154 | int scb_child_type); |
155 | u16 mix_buffer_addr,u16 writeback_spb,u32 dest, | 155 | struct dsp_scb_descriptor * |
156 | dsp_scb_descriptor_t * parent_scb, | 156 | cs46xx_dsp_create_spio_write_scb(struct snd_cs46xx * chip, char * scb_name, u32 dest, |
157 | int scb_child_type); | 157 | struct dsp_scb_descriptor * parent_scb, |
158 | dsp_scb_descriptor_t * cs46xx_dsp_create_magic_snoop_scb(cs46xx_t * chip,char * scb_name,u32 dest, | 158 | int scb_child_type); |
159 | u16 snoop_buffer_address, | 159 | struct dsp_scb_descriptor * |
160 | dsp_scb_descriptor_t * snoop_scb, | 160 | cs46xx_dsp_create_mix_to_ostream_scb(struct snd_cs46xx * chip, char * scb_name, |
161 | dsp_scb_descriptor_t * parent_scb, | 161 | u16 mix_buffer_addr, u16 writeback_spb, u32 dest, |
162 | int scb_child_type); | 162 | struct dsp_scb_descriptor * parent_scb, |
163 | pcm_channel_descriptor_t * cs46xx_dsp_create_pcm_channel (cs46xx_t * chip,u32 sample_rate, void * private_data, u32 hw_dma_addr, | 163 | int scb_child_type); |
164 | int pcm_channel_id); | 164 | struct dsp_scb_descriptor * |
165 | void cs46xx_dsp_destroy_pcm_channel (cs46xx_t * chip, | 165 | cs46xx_dsp_create_magic_snoop_scb(struct snd_cs46xx * chip, char * scb_name, |
166 | pcm_channel_descriptor_t * pcm_channel); | 166 | u32 dest, u16 snoop_buffer_address, |
167 | int cs46xx_dsp_pcm_unlink (cs46xx_t * chip,pcm_channel_descriptor_t * pcm_channel); | 167 | struct dsp_scb_descriptor * snoop_scb, |
168 | int cs46xx_dsp_pcm_link (cs46xx_t * chip,pcm_channel_descriptor_t * pcm_channel); | 168 | struct dsp_scb_descriptor * parent_scb, |
169 | dsp_scb_descriptor_t * cs46xx_add_record_source (cs46xx_t *chip,dsp_scb_descriptor_t * source, | 169 | int scb_child_type); |
170 | u16 addr,char * scb_name); | 170 | struct dsp_pcm_channel_descriptor * |
171 | int cs46xx_src_unlink(cs46xx_t *chip,dsp_scb_descriptor_t * src); | 171 | cs46xx_dsp_create_pcm_channel (struct snd_cs46xx * chip, u32 sample_rate, |
172 | int cs46xx_src_link(cs46xx_t *chip,dsp_scb_descriptor_t * src); | 172 | void * private_data, u32 hw_dma_addr, |
173 | int cs46xx_iec958_pre_open (cs46xx_t *chip); | 173 | int pcm_channel_id); |
174 | int cs46xx_iec958_post_close (cs46xx_t *chip); | 174 | void cs46xx_dsp_destroy_pcm_channel (struct snd_cs46xx * chip, |
175 | int cs46xx_dsp_pcm_channel_set_period (cs46xx_t * chip, | 175 | struct dsp_pcm_channel_descriptor * pcm_channel); |
176 | pcm_channel_descriptor_t * pcm_channel, | 176 | int cs46xx_dsp_pcm_unlink (struct snd_cs46xx * chip, |
177 | int period_size); | 177 | struct dsp_pcm_channel_descriptor * pcm_channel); |
178 | int cs46xx_dsp_pcm_ostream_set_period (cs46xx_t * chip, | 178 | int cs46xx_dsp_pcm_link (struct snd_cs46xx * chip, |
179 | int period_size); | 179 | struct dsp_pcm_channel_descriptor * pcm_channel); |
180 | int cs46xx_dsp_set_dac_volume (cs46xx_t * chip,u16 left,u16 right); | 180 | struct dsp_scb_descriptor * |
181 | int cs46xx_dsp_set_iec958_volume (cs46xx_t * chip,u16 left,u16 right); | 181 | cs46xx_add_record_source (struct snd_cs46xx *chip, struct dsp_scb_descriptor * source, |
182 | u16 addr, char * scb_name); | ||
183 | int cs46xx_src_unlink(struct snd_cs46xx *chip, struct dsp_scb_descriptor * src); | ||
184 | int cs46xx_src_link(struct snd_cs46xx *chip, struct dsp_scb_descriptor * src); | ||
185 | int cs46xx_iec958_pre_open (struct snd_cs46xx *chip); | ||
186 | int cs46xx_iec958_post_close (struct snd_cs46xx *chip); | ||
187 | int cs46xx_dsp_pcm_channel_set_period (struct snd_cs46xx * chip, | ||
188 | struct dsp_pcm_channel_descriptor * pcm_channel, | ||
189 | int period_size); | ||
190 | int cs46xx_dsp_pcm_ostream_set_period (struct snd_cs46xx * chip, int period_size); | ||
191 | int cs46xx_dsp_set_dac_volume (struct snd_cs46xx * chip, u16 left, u16 right); | ||
192 | int cs46xx_dsp_set_iec958_volume (struct snd_cs46xx * chip, u16 left, u16 right); | ||
182 | #endif /* __CS46XX_LIB_H__ */ | 193 | #endif /* __CS46XX_LIB_H__ */ |