[ALSA] Remove xxx_t typedefs: PCI CS46xx
Modules: CS46xx driver Remove xxx_t typedefs from the PCI CS46xx driver. Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
committed by
Jaroslav Kysela
parent
af26367f69
commit
3d19f804ef
@@ -78,8 +78,8 @@ static int __devinit snd_card_cs46xx_probe(struct pci_dev *pci,
|
||||
const struct pci_device_id *pci_id)
|
||||
{
|
||||
static int dev;
|
||||
snd_card_t *card;
|
||||
cs46xx_t *chip;
|
||||
struct snd_card *card;
|
||||
struct snd_cs46xx *chip;
|
||||
int err;
|
||||
|
||||
if (dev >= SNDRV_CARDS)
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -57,7 +57,7 @@
|
||||
* common I/O routines
|
||||
*/
|
||||
|
||||
static inline void snd_cs46xx_poke(cs46xx_t *chip, unsigned long reg, unsigned int val)
|
||||
static inline void snd_cs46xx_poke(struct snd_cs46xx *chip, unsigned long reg, unsigned int val)
|
||||
{
|
||||
unsigned int bank = reg >> 16;
|
||||
unsigned int offset = reg & 0xffff;
|
||||
@@ -66,117 +66,128 @@ static inline void snd_cs46xx_poke(cs46xx_t *chip, unsigned long reg, unsigned i
|
||||
writel(val, chip->region.idx[bank+1].remap_addr + offset);
|
||||
}
|
||||
|
||||
static inline unsigned int snd_cs46xx_peek(cs46xx_t *chip, unsigned long reg)
|
||||
static inline unsigned int snd_cs46xx_peek(struct snd_cs46xx *chip, unsigned long reg)
|
||||
{
|
||||
unsigned int bank = reg >> 16;
|
||||
unsigned int offset = reg & 0xffff;
|
||||
return readl(chip->region.idx[bank+1].remap_addr + offset);
|
||||
}
|
||||
|
||||
static inline void snd_cs46xx_pokeBA0(cs46xx_t *chip, unsigned long offset, unsigned int val)
|
||||
static inline void snd_cs46xx_pokeBA0(struct snd_cs46xx *chip, unsigned long offset, unsigned int val)
|
||||
{
|
||||
writel(val, chip->region.name.ba0.remap_addr + offset);
|
||||
}
|
||||
|
||||
static inline unsigned int snd_cs46xx_peekBA0(cs46xx_t *chip, unsigned long offset)
|
||||
static inline unsigned int snd_cs46xx_peekBA0(struct snd_cs46xx *chip, unsigned long offset)
|
||||
{
|
||||
return readl(chip->region.name.ba0.remap_addr + offset);
|
||||
}
|
||||
|
||||
dsp_spos_instance_t * cs46xx_dsp_spos_create (cs46xx_t * chip);
|
||||
void cs46xx_dsp_spos_destroy (cs46xx_t * chip);
|
||||
int cs46xx_dsp_load_module (cs46xx_t * chip,dsp_module_desc_t * module);
|
||||
symbol_entry_t * cs46xx_dsp_lookup_symbol (cs46xx_t * chip,char * symbol_name,int symbol_type);
|
||||
int cs46xx_dsp_proc_init (snd_card_t * card, cs46xx_t *chip);
|
||||
int cs46xx_dsp_proc_done (cs46xx_t *chip);
|
||||
int cs46xx_dsp_scb_and_task_init (cs46xx_t *chip);
|
||||
int snd_cs46xx_download (cs46xx_t *chip,u32 *src,unsigned long offset,
|
||||
unsigned long len);
|
||||
int snd_cs46xx_clear_BA1(cs46xx_t *chip,unsigned long offset,unsigned long len);
|
||||
int cs46xx_dsp_enable_spdif_out (cs46xx_t *chip);
|
||||
int cs46xx_dsp_enable_spdif_hw (cs46xx_t *chip);
|
||||
int cs46xx_dsp_disable_spdif_out (cs46xx_t *chip);
|
||||
int cs46xx_dsp_enable_spdif_in (cs46xx_t *chip);
|
||||
int cs46xx_dsp_disable_spdif_in (cs46xx_t *chip);
|
||||
int cs46xx_dsp_enable_pcm_capture (cs46xx_t *chip);
|
||||
int cs46xx_dsp_disable_pcm_capture (cs46xx_t *chip);
|
||||
int cs46xx_dsp_enable_adc_capture (cs46xx_t *chip);
|
||||
int cs46xx_dsp_disable_adc_capture (cs46xx_t *chip);
|
||||
int cs46xx_poke_via_dsp (cs46xx_t *chip,u32 address,u32 data);
|
||||
dsp_scb_descriptor_t * cs46xx_dsp_create_scb (cs46xx_t *chip,char * name, u32 * scb_data,u32 dest);
|
||||
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);
|
||||
dsp_scb_descriptor_t * 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,
|
||||
int scb_child_type);
|
||||
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);
|
||||
void cs46xx_dsp_remove_scb (cs46xx_t *chip,dsp_scb_descriptor_t * 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);
|
||||
dsp_scb_descriptor_t * cs46xx_dsp_create_src_task_scb(cs46xx_t * chip,char * scb_name,
|
||||
int sample_rate,
|
||||
u16 src_buffer_addr,
|
||||
u16 src_delay_buffer_addr,u32 dest,
|
||||
dsp_scb_descriptor_t * parent_scb,
|
||||
int scb_child_type,
|
||||
int pass_through);
|
||||
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,
|
||||
int scb_child_type);
|
||||
struct dsp_spos_instance *cs46xx_dsp_spos_create (struct snd_cs46xx * chip);
|
||||
void cs46xx_dsp_spos_destroy (struct snd_cs46xx * chip);
|
||||
int cs46xx_dsp_load_module (struct snd_cs46xx * chip, struct dsp_module_desc * module);
|
||||
struct dsp_symbol_entry *cs46xx_dsp_lookup_symbol (struct snd_cs46xx * chip, char * symbol_name,
|
||||
int symbol_type);
|
||||
int cs46xx_dsp_proc_init (struct snd_card *card, struct snd_cs46xx *chip);
|
||||
int cs46xx_dsp_proc_done (struct snd_cs46xx *chip);
|
||||
int cs46xx_dsp_scb_and_task_init (struct snd_cs46xx *chip);
|
||||
int snd_cs46xx_download (struct snd_cs46xx *chip, u32 *src, unsigned long offset,
|
||||
unsigned long len);
|
||||
int snd_cs46xx_clear_BA1(struct snd_cs46xx *chip, unsigned long offset, unsigned long len);
|
||||
int cs46xx_dsp_enable_spdif_out (struct snd_cs46xx *chip);
|
||||
int cs46xx_dsp_enable_spdif_hw (struct snd_cs46xx *chip);
|
||||
int cs46xx_dsp_disable_spdif_out (struct snd_cs46xx *chip);
|
||||
int cs46xx_dsp_enable_spdif_in (struct snd_cs46xx *chip);
|
||||
int cs46xx_dsp_disable_spdif_in (struct snd_cs46xx *chip);
|
||||
int cs46xx_dsp_enable_pcm_capture (struct snd_cs46xx *chip);
|
||||
int cs46xx_dsp_disable_pcm_capture (struct snd_cs46xx *chip);
|
||||
int cs46xx_dsp_enable_adc_capture (struct snd_cs46xx *chip);
|
||||
int cs46xx_dsp_disable_adc_capture (struct snd_cs46xx *chip);
|
||||
int cs46xx_poke_via_dsp (struct snd_cs46xx *chip, u32 address, u32 data);
|
||||
struct dsp_scb_descriptor * cs46xx_dsp_create_scb (struct snd_cs46xx *chip, char * name,
|
||||
u32 * scb_data, u32 dest);
|
||||
void cs46xx_dsp_proc_free_scb_desc (struct dsp_scb_descriptor * scb);
|
||||
void cs46xx_dsp_proc_register_scb_desc (struct snd_cs46xx *chip,
|
||||
struct dsp_scb_descriptor * scb);
|
||||
struct dsp_scb_descriptor * cs46xx_dsp_create_timing_master_scb (struct snd_cs46xx *chip);
|
||||
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);
|
||||
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);
|
||||
void cs46xx_dsp_remove_scb (struct snd_cs46xx *chip,
|
||||
struct dsp_scb_descriptor * scb);
|
||||
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);
|
||||
struct dsp_scb_descriptor *
|
||||
cs46xx_dsp_create_src_task_scb(struct snd_cs46xx * chip, char * scb_name,
|
||||
int sample_rate, u16 src_buffer_addr,
|
||||
u16 src_delay_buffer_addr, u32 dest,
|
||||
struct dsp_scb_descriptor * parent_scb,
|
||||
int scb_child_type, int pass_through);
|
||||
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 * cs46xx_dsp_create_vari_decimate_scb(cs46xx_t * chip,char * scb_name,
|
||||
u16 vari_buffer_addr0,
|
||||
u16 vari_buffer_addr1,
|
||||
u32 dest,
|
||||
dsp_scb_descriptor_t * parent_scb,
|
||||
int scb_child_type);
|
||||
dsp_scb_descriptor_t * cs46xx_dsp_create_asynch_fg_rx_scb(cs46xx_t * chip,char * scb_name,u32 dest,
|
||||
u16 hfg_scb_address,
|
||||
u16 asynch_buffer_address,
|
||||
dsp_scb_descriptor_t * parent_scb,
|
||||
int scb_child_type);
|
||||
dsp_scb_descriptor_t * cs46xx_dsp_create_spio_write_scb(cs46xx_t * chip,char * scb_name,u32 dest,
|
||||
dsp_scb_descriptor_t * parent_scb,
|
||||
int scb_child_type);
|
||||
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,
|
||||
int scb_child_type);
|
||||
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);
|
||||
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);
|
||||
void cs46xx_dsp_destroy_pcm_channel (cs46xx_t * chip,
|
||||
pcm_channel_descriptor_t * pcm_channel);
|
||||
int cs46xx_dsp_pcm_unlink (cs46xx_t * chip,pcm_channel_descriptor_t * pcm_channel);
|
||||
int cs46xx_dsp_pcm_link (cs46xx_t * chip,pcm_channel_descriptor_t * pcm_channel);
|
||||
dsp_scb_descriptor_t * cs46xx_add_record_source (cs46xx_t *chip,dsp_scb_descriptor_t * source,
|
||||
u16 addr,char * scb_name);
|
||||
int cs46xx_src_unlink(cs46xx_t *chip,dsp_scb_descriptor_t * src);
|
||||
int cs46xx_src_link(cs46xx_t *chip,dsp_scb_descriptor_t * src);
|
||||
int cs46xx_iec958_pre_open (cs46xx_t *chip);
|
||||
int cs46xx_iec958_post_close (cs46xx_t *chip);
|
||||
int cs46xx_dsp_pcm_channel_set_period (cs46xx_t * chip,
|
||||
pcm_channel_descriptor_t * pcm_channel,
|
||||
int period_size);
|
||||
int cs46xx_dsp_pcm_ostream_set_period (cs46xx_t * chip,
|
||||
int period_size);
|
||||
int cs46xx_dsp_set_dac_volume (cs46xx_t * chip,u16 left,u16 right);
|
||||
int cs46xx_dsp_set_iec958_volume (cs46xx_t * chip,u16 left,u16 right);
|
||||
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,
|
||||
struct dsp_scb_descriptor * parent_scb,
|
||||
int scb_child_type);
|
||||
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,
|
||||
struct dsp_scb_descriptor * parent_scb,
|
||||
int scb_child_type);
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
void cs46xx_dsp_destroy_pcm_channel (struct snd_cs46xx * chip,
|
||||
struct dsp_pcm_channel_descriptor * pcm_channel);
|
||||
int cs46xx_dsp_pcm_unlink (struct snd_cs46xx * chip,
|
||||
struct dsp_pcm_channel_descriptor * pcm_channel);
|
||||
int cs46xx_dsp_pcm_link (struct snd_cs46xx * chip,
|
||||
struct dsp_pcm_channel_descriptor * pcm_channel);
|
||||
struct dsp_scb_descriptor *
|
||||
cs46xx_add_record_source (struct snd_cs46xx *chip, struct dsp_scb_descriptor * source,
|
||||
u16 addr, char * scb_name);
|
||||
int cs46xx_src_unlink(struct snd_cs46xx *chip, struct dsp_scb_descriptor * src);
|
||||
int cs46xx_src_link(struct snd_cs46xx *chip, struct dsp_scb_descriptor * src);
|
||||
int cs46xx_iec958_pre_open (struct snd_cs46xx *chip);
|
||||
int cs46xx_iec958_post_close (struct snd_cs46xx *chip);
|
||||
int cs46xx_dsp_pcm_channel_set_period (struct snd_cs46xx * chip,
|
||||
struct dsp_pcm_channel_descriptor * pcm_channel,
|
||||
int period_size);
|
||||
int cs46xx_dsp_pcm_ostream_set_period (struct snd_cs46xx * chip, int period_size);
|
||||
int cs46xx_dsp_set_dac_volume (struct snd_cs46xx * chip, u16 left, u16 right);
|
||||
int cs46xx_dsp_set_iec958_volume (struct snd_cs46xx * chip, u16 left, u16 right);
|
||||
#endif /* __CS46XX_LIB_H__ */
|
||||
|
@@ -37,9 +37,10 @@
|
||||
#include "cs46xx_lib.h"
|
||||
#include "dsp_spos.h"
|
||||
|
||||
static int cs46xx_dsp_async_init (cs46xx_t *chip, dsp_scb_descriptor_t * fg_entry);
|
||||
static int cs46xx_dsp_async_init (struct snd_cs46xx *chip,
|
||||
struct dsp_scb_descriptor * fg_entry);
|
||||
|
||||
static wide_opcode_t wide_opcodes[] = {
|
||||
static enum wide_opcode wide_opcodes[] = {
|
||||
WIDE_FOR_BEGIN_LOOP,
|
||||
WIDE_FOR_BEGIN_LOOP2,
|
||||
WIDE_COND_GOTO_ADDR,
|
||||
@@ -54,12 +55,13 @@ static wide_opcode_t wide_opcodes[] = {
|
||||
WIDE_TBEQ_NCOND_CALL1_ADDR
|
||||
};
|
||||
|
||||
static int shadow_and_reallocate_code (cs46xx_t * chip,u32 * data,u32 size, u32 overlay_begin_address)
|
||||
static int shadow_and_reallocate_code (struct snd_cs46xx * chip, u32 * data, u32 size,
|
||||
u32 overlay_begin_address)
|
||||
{
|
||||
unsigned int i = 0, j, nreallocated = 0;
|
||||
u32 hival,loval,address;
|
||||
u32 mop_operands,mop_type,wide_op;
|
||||
dsp_spos_instance_t * ins = chip->dsp_spos_instance;
|
||||
struct dsp_spos_instance * ins = chip->dsp_spos_instance;
|
||||
|
||||
snd_assert( ((size % 2) == 0), return -EINVAL);
|
||||
|
||||
@@ -114,7 +116,7 @@ static int shadow_and_reallocate_code (cs46xx_t * chip,u32 * data,u32 size, u32
|
||||
return nreallocated;
|
||||
}
|
||||
|
||||
static segment_desc_t * get_segment_desc (dsp_module_desc_t * module, int seg_type)
|
||||
static struct dsp_segment_desc * get_segment_desc (struct dsp_module_desc * module, int seg_type)
|
||||
{
|
||||
int i;
|
||||
for (i = 0;i < module->nsegments; ++i) {
|
||||
@@ -126,7 +128,7 @@ static segment_desc_t * get_segment_desc (dsp_module_desc_t * module, int seg_ty
|
||||
return NULL;
|
||||
};
|
||||
|
||||
static int find_free_symbol_index (dsp_spos_instance_t * ins)
|
||||
static int find_free_symbol_index (struct dsp_spos_instance * ins)
|
||||
{
|
||||
int index = ins->symbol_table.nsymbols,i;
|
||||
|
||||
@@ -140,10 +142,10 @@ static int find_free_symbol_index (dsp_spos_instance_t * ins)
|
||||
return index;
|
||||
}
|
||||
|
||||
static int add_symbols (cs46xx_t * chip, dsp_module_desc_t * module)
|
||||
static int add_symbols (struct snd_cs46xx * chip, struct dsp_module_desc * module)
|
||||
{
|
||||
int i;
|
||||
dsp_spos_instance_t * ins = chip->dsp_spos_instance;
|
||||
struct dsp_spos_instance * ins = chip->dsp_spos_instance;
|
||||
|
||||
if (module->symbol_table.nsymbols > 0) {
|
||||
if (!strcmp(module->symbol_table.symbols[0].symbol_name, "OVERLAYBEGINADDRESS") &&
|
||||
@@ -181,10 +183,11 @@ static int add_symbols (cs46xx_t * chip, dsp_module_desc_t * module)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static symbol_entry_t * add_symbol (cs46xx_t * chip, char * symbol_name, u32 address, int type)
|
||||
static struct dsp_symbol_entry *
|
||||
add_symbol (struct snd_cs46xx * chip, char * symbol_name, u32 address, int type)
|
||||
{
|
||||
dsp_spos_instance_t * ins = chip->dsp_spos_instance;
|
||||
symbol_entry_t * symbol = NULL;
|
||||
struct dsp_spos_instance * ins = chip->dsp_spos_instance;
|
||||
struct dsp_symbol_entry * symbol = NULL;
|
||||
int index;
|
||||
|
||||
if (ins->symbol_table.nsymbols == (DSP_MAX_SYMBOLS - 1)) {
|
||||
@@ -217,17 +220,17 @@ static symbol_entry_t * add_symbol (cs46xx_t * chip, char * symbol_name, u32 add
|
||||
return symbol;
|
||||
}
|
||||
|
||||
dsp_spos_instance_t * cs46xx_dsp_spos_create (cs46xx_t * chip)
|
||||
struct dsp_spos_instance *cs46xx_dsp_spos_create (struct snd_cs46xx * chip)
|
||||
{
|
||||
dsp_spos_instance_t * ins = kmalloc(sizeof(dsp_spos_instance_t), GFP_KERNEL);
|
||||
struct dsp_spos_instance * ins = kzalloc(sizeof(struct dsp_spos_instance), GFP_KERNEL);
|
||||
|
||||
if (ins == NULL)
|
||||
return NULL;
|
||||
memset(ins, 0, sizeof(*ins));
|
||||
|
||||
/* better to use vmalloc for this big table */
|
||||
ins->symbol_table.nsymbols = 0;
|
||||
ins->symbol_table.symbols = vmalloc(sizeof(symbol_entry_t) * DSP_MAX_SYMBOLS);
|
||||
ins->symbol_table.symbols = vmalloc(sizeof(struct dsp_symbol_entry) *
|
||||
DSP_MAX_SYMBOLS);
|
||||
ins->symbol_table.highest_frag_index = 0;
|
||||
|
||||
if (ins->symbol_table.symbols == NULL) {
|
||||
@@ -248,7 +251,7 @@ dsp_spos_instance_t * cs46xx_dsp_spos_create (cs46xx_t * chip)
|
||||
ins->ntask = 0;
|
||||
|
||||
ins->nmodules = 0;
|
||||
ins->modules = kmalloc(sizeof(dsp_module_desc_t) * DSP_MAX_MODULES, GFP_KERNEL);
|
||||
ins->modules = kmalloc(sizeof(struct dsp_module_desc) * DSP_MAX_MODULES, GFP_KERNEL);
|
||||
|
||||
if (ins->modules == NULL) {
|
||||
cs46xx_dsp_spos_destroy(chip);
|
||||
@@ -277,10 +280,10 @@ dsp_spos_instance_t * cs46xx_dsp_spos_create (cs46xx_t * chip)
|
||||
return ins;
|
||||
}
|
||||
|
||||
void cs46xx_dsp_spos_destroy (cs46xx_t * chip)
|
||||
void cs46xx_dsp_spos_destroy (struct snd_cs46xx * chip)
|
||||
{
|
||||
int i;
|
||||
dsp_spos_instance_t * ins = chip->dsp_spos_instance;
|
||||
struct dsp_spos_instance * ins = chip->dsp_spos_instance;
|
||||
|
||||
snd_assert(ins != NULL, return);
|
||||
|
||||
@@ -298,12 +301,12 @@ void cs46xx_dsp_spos_destroy (cs46xx_t * chip)
|
||||
up(&chip->spos_mutex);
|
||||
}
|
||||
|
||||
int cs46xx_dsp_load_module (cs46xx_t * chip, dsp_module_desc_t * module)
|
||||
int cs46xx_dsp_load_module (struct snd_cs46xx * chip, struct dsp_module_desc * module)
|
||||
{
|
||||
dsp_spos_instance_t * ins = chip->dsp_spos_instance;
|
||||
segment_desc_t * code = get_segment_desc (module,SEGTYPE_SP_PROGRAM);
|
||||
segment_desc_t * parameter = get_segment_desc (module,SEGTYPE_SP_PARAMETER);
|
||||
segment_desc_t * sample = get_segment_desc (module,SEGTYPE_SP_SAMPLE);
|
||||
struct dsp_spos_instance * ins = chip->dsp_spos_instance;
|
||||
struct dsp_segment_desc * code = get_segment_desc (module,SEGTYPE_SP_PROGRAM);
|
||||
struct dsp_segment_desc * parameter = get_segment_desc (module,SEGTYPE_SP_PARAMETER);
|
||||
struct dsp_segment_desc * sample = get_segment_desc (module,SEGTYPE_SP_SAMPLE);
|
||||
u32 doffset, dsize;
|
||||
|
||||
if (ins->nmodules == DSP_MAX_MODULES - 1) {
|
||||
@@ -410,10 +413,11 @@ int cs46xx_dsp_load_module (cs46xx_t * chip, dsp_module_desc_t * module)
|
||||
return 0;
|
||||
}
|
||||
|
||||
symbol_entry_t * cs46xx_dsp_lookup_symbol (cs46xx_t * chip, char * symbol_name, int symbol_type)
|
||||
struct dsp_symbol_entry *
|
||||
cs46xx_dsp_lookup_symbol (struct snd_cs46xx * chip, char * symbol_name, int symbol_type)
|
||||
{
|
||||
int i;
|
||||
dsp_spos_instance_t * ins = chip->dsp_spos_instance;
|
||||
struct dsp_spos_instance * ins = chip->dsp_spos_instance;
|
||||
|
||||
for ( i = 0; i < ins->symbol_table.nsymbols; ++i ) {
|
||||
|
||||
@@ -435,10 +439,11 @@ symbol_entry_t * cs46xx_dsp_lookup_symbol (cs46xx_t * chip, char * symbol_name,
|
||||
}
|
||||
|
||||
|
||||
static symbol_entry_t * cs46xx_dsp_lookup_symbol_addr (cs46xx_t * chip, u32 address, int symbol_type)
|
||||
static struct dsp_symbol_entry *
|
||||
cs46xx_dsp_lookup_symbol_addr (struct snd_cs46xx * chip, u32 address, int symbol_type)
|
||||
{
|
||||
int i;
|
||||
dsp_spos_instance_t * ins = chip->dsp_spos_instance;
|
||||
struct dsp_spos_instance * ins = chip->dsp_spos_instance;
|
||||
|
||||
for ( i = 0; i < ins->symbol_table.nsymbols; ++i ) {
|
||||
|
||||
@@ -456,10 +461,11 @@ static symbol_entry_t * cs46xx_dsp_lookup_symbol_addr (cs46xx_t * chip, u32 addr
|
||||
}
|
||||
|
||||
|
||||
static void cs46xx_dsp_proc_symbol_table_read (snd_info_entry_t *entry, snd_info_buffer_t * buffer)
|
||||
static void cs46xx_dsp_proc_symbol_table_read (struct snd_info_entry *entry,
|
||||
struct snd_info_buffer *buffer)
|
||||
{
|
||||
cs46xx_t *chip = entry->private_data;
|
||||
dsp_spos_instance_t * ins = chip->dsp_spos_instance;
|
||||
struct snd_cs46xx *chip = entry->private_data;
|
||||
struct dsp_spos_instance * ins = chip->dsp_spos_instance;
|
||||
int i;
|
||||
|
||||
snd_iprintf(buffer, "SYMBOLS:\n");
|
||||
@@ -483,10 +489,11 @@ static void cs46xx_dsp_proc_symbol_table_read (snd_info_entry_t *entry, snd_info
|
||||
}
|
||||
|
||||
|
||||
static void cs46xx_dsp_proc_modules_read (snd_info_entry_t *entry, snd_info_buffer_t * buffer)
|
||||
static void cs46xx_dsp_proc_modules_read (struct snd_info_entry *entry,
|
||||
struct snd_info_buffer *buffer)
|
||||
{
|
||||
cs46xx_t *chip = entry->private_data;
|
||||
dsp_spos_instance_t * ins = chip->dsp_spos_instance;
|
||||
struct snd_cs46xx *chip = entry->private_data;
|
||||
struct dsp_spos_instance * ins = chip->dsp_spos_instance;
|
||||
int i,j;
|
||||
|
||||
down(&chip->spos_mutex);
|
||||
@@ -497,7 +504,7 @@ static void cs46xx_dsp_proc_modules_read (snd_info_entry_t *entry, snd_info_buff
|
||||
snd_iprintf(buffer, " %d fixups\n", ins->modules[i].nfixups);
|
||||
|
||||
for (j = 0; j < ins->modules[i].nsegments; ++ j) {
|
||||
segment_desc_t * desc = (ins->modules[i].segments + j);
|
||||
struct dsp_segment_desc * desc = (ins->modules[i].segments + j);
|
||||
snd_iprintf(buffer, " segment %02x offset %08x size %08x\n",
|
||||
desc->segment_type,desc->offset, desc->size);
|
||||
}
|
||||
@@ -505,11 +512,12 @@ static void cs46xx_dsp_proc_modules_read (snd_info_entry_t *entry, snd_info_buff
|
||||
up(&chip->spos_mutex);
|
||||
}
|
||||
|
||||
static void cs46xx_dsp_proc_task_tree_read (snd_info_entry_t *entry, snd_info_buffer_t * buffer)
|
||||
static void cs46xx_dsp_proc_task_tree_read (struct snd_info_entry *entry,
|
||||
struct snd_info_buffer *buffer)
|
||||
{
|
||||
cs46xx_t *chip = entry->private_data;
|
||||
dsp_spos_instance_t * ins = chip->dsp_spos_instance;
|
||||
int i,j,col;
|
||||
struct snd_cs46xx *chip = entry->private_data;
|
||||
struct dsp_spos_instance * ins = chip->dsp_spos_instance;
|
||||
int i, j, col;
|
||||
void __iomem *dst = chip->region.idx[1].remap_addr + DSP_PARAMETER_BYTE_OFFSET;
|
||||
|
||||
down(&chip->spos_mutex);
|
||||
@@ -532,10 +540,11 @@ static void cs46xx_dsp_proc_task_tree_read (snd_info_entry_t *entry, snd_info_bu
|
||||
up(&chip->spos_mutex);
|
||||
}
|
||||
|
||||
static void cs46xx_dsp_proc_scb_read (snd_info_entry_t *entry, snd_info_buffer_t * buffer)
|
||||
static void cs46xx_dsp_proc_scb_read (struct snd_info_entry *entry,
|
||||
struct snd_info_buffer *buffer)
|
||||
{
|
||||
cs46xx_t *chip = entry->private_data;
|
||||
dsp_spos_instance_t * ins = chip->dsp_spos_instance;
|
||||
struct snd_cs46xx *chip = entry->private_data;
|
||||
struct dsp_spos_instance * ins = chip->dsp_spos_instance;
|
||||
int i;
|
||||
|
||||
down(&chip->spos_mutex);
|
||||
@@ -564,13 +573,14 @@ static void cs46xx_dsp_proc_scb_read (snd_info_entry_t *entry, snd_info_buffer_t
|
||||
up(&chip->spos_mutex);
|
||||
}
|
||||
|
||||
static void cs46xx_dsp_proc_parameter_dump_read (snd_info_entry_t *entry, snd_info_buffer_t * buffer)
|
||||
static void cs46xx_dsp_proc_parameter_dump_read (struct snd_info_entry *entry,
|
||||
struct snd_info_buffer *buffer)
|
||||
{
|
||||
cs46xx_t *chip = entry->private_data;
|
||||
/*dsp_spos_instance_t * ins = chip->dsp_spos_instance; */
|
||||
unsigned int i,col = 0;
|
||||
struct snd_cs46xx *chip = entry->private_data;
|
||||
/*struct dsp_spos_instance * ins = chip->dsp_spos_instance; */
|
||||
unsigned int i, col = 0;
|
||||
void __iomem *dst = chip->region.idx[1].remap_addr + DSP_PARAMETER_BYTE_OFFSET;
|
||||
symbol_entry_t * symbol;
|
||||
struct dsp_symbol_entry * symbol;
|
||||
|
||||
for (i = 0;i < DSP_PARAMETER_BYTE_SIZE; i += sizeof(u32),col ++) {
|
||||
if (col == 4) {
|
||||
@@ -591,9 +601,10 @@ static void cs46xx_dsp_proc_parameter_dump_read (snd_info_entry_t *entry, snd_in
|
||||
}
|
||||
}
|
||||
|
||||
static void cs46xx_dsp_proc_sample_dump_read (snd_info_entry_t *entry, snd_info_buffer_t * buffer)
|
||||
static void cs46xx_dsp_proc_sample_dump_read (struct snd_info_entry *entry,
|
||||
struct snd_info_buffer *buffer)
|
||||
{
|
||||
cs46xx_t *chip = entry->private_data;
|
||||
struct snd_cs46xx *chip = entry->private_data;
|
||||
int i,col = 0;
|
||||
void __iomem *dst = chip->region.idx[2].remap_addr;
|
||||
|
||||
@@ -738,10 +749,10 @@ static void cs46xx_dsp_proc_sample_dump_read (snd_info_entry_t *entry, snd_info_
|
||||
snd_iprintf(buffer,"\n");
|
||||
}
|
||||
|
||||
int cs46xx_dsp_proc_init (snd_card_t * card, cs46xx_t *chip)
|
||||
int cs46xx_dsp_proc_init (struct snd_card *card, struct snd_cs46xx *chip)
|
||||
{
|
||||
snd_info_entry_t *entry;
|
||||
dsp_spos_instance_t * ins = chip->dsp_spos_instance;
|
||||
struct snd_info_entry *entry;
|
||||
struct dsp_spos_instance * ins = chip->dsp_spos_instance;
|
||||
int i;
|
||||
|
||||
ins->snd_card = card;
|
||||
@@ -852,9 +863,9 @@ int cs46xx_dsp_proc_init (snd_card_t * card, cs46xx_t *chip)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int cs46xx_dsp_proc_done (cs46xx_t *chip)
|
||||
int cs46xx_dsp_proc_done (struct snd_cs46xx *chip)
|
||||
{
|
||||
dsp_spos_instance_t * ins = chip->dsp_spos_instance;
|
||||
struct dsp_spos_instance * ins = chip->dsp_spos_instance;
|
||||
int i;
|
||||
|
||||
if (ins->proc_sym_info_entry) {
|
||||
@@ -903,7 +914,8 @@ int cs46xx_dsp_proc_done (cs46xx_t *chip)
|
||||
}
|
||||
|
||||
static int debug_tree;
|
||||
static void _dsp_create_task_tree (cs46xx_t *chip,u32 * task_data, u32 dest, int size)
|
||||
static void _dsp_create_task_tree (struct snd_cs46xx *chip, u32 * task_data,
|
||||
u32 dest, int size)
|
||||
{
|
||||
void __iomem *spdst = chip->region.idx[1].remap_addr +
|
||||
DSP_PARAMETER_BYTE_OFFSET + dest * sizeof(u32);
|
||||
@@ -917,7 +929,7 @@ static void _dsp_create_task_tree (cs46xx_t *chip,u32 * task_data, u32 dest, in
|
||||
}
|
||||
|
||||
static int debug_scb;
|
||||
static void _dsp_create_scb (cs46xx_t *chip,u32 * scb_data, u32 dest)
|
||||
static void _dsp_create_scb (struct snd_cs46xx *chip, u32 * scb_data, u32 dest)
|
||||
{
|
||||
void __iomem *spdst = chip->region.idx[1].remap_addr +
|
||||
DSP_PARAMETER_BYTE_OFFSET + dest * sizeof(u32);
|
||||
@@ -930,7 +942,7 @@ static void _dsp_create_scb (cs46xx_t *chip,u32 * scb_data, u32 dest)
|
||||
}
|
||||
}
|
||||
|
||||
static int find_free_scb_index (dsp_spos_instance_t * ins)
|
||||
static int find_free_scb_index (struct dsp_spos_instance * ins)
|
||||
{
|
||||
int index = ins->nscb, i;
|
||||
|
||||
@@ -944,10 +956,10 @@ static int find_free_scb_index (dsp_spos_instance_t * ins)
|
||||
return index;
|
||||
}
|
||||
|
||||
static dsp_scb_descriptor_t * _map_scb (cs46xx_t *chip,char * name,u32 dest)
|
||||
static struct dsp_scb_descriptor * _map_scb (struct snd_cs46xx *chip, char * name, u32 dest)
|
||||
{
|
||||
dsp_spos_instance_t * ins = chip->dsp_spos_instance;
|
||||
dsp_scb_descriptor_t * desc = NULL;
|
||||
struct dsp_spos_instance * ins = chip->dsp_spos_instance;
|
||||
struct dsp_scb_descriptor * desc = NULL;
|
||||
int index;
|
||||
|
||||
if (ins->nscb == DSP_MAX_SCB_DESC - 1) {
|
||||
@@ -977,10 +989,11 @@ static dsp_scb_descriptor_t * _map_scb (cs46xx_t *chip,char * name,u32 dest)
|
||||
return desc;
|
||||
}
|
||||
|
||||
static dsp_task_descriptor_t * _map_task_tree (cs46xx_t *chip,char * name,u32 dest,u32 size)
|
||||
static struct dsp_task_descriptor *
|
||||
_map_task_tree (struct snd_cs46xx *chip, char * name, u32 dest, u32 size)
|
||||
{
|
||||
dsp_spos_instance_t * ins = chip->dsp_spos_instance;
|
||||
dsp_task_descriptor_t * desc = NULL;
|
||||
struct dsp_spos_instance * ins = chip->dsp_spos_instance;
|
||||
struct dsp_task_descriptor * desc = NULL;
|
||||
|
||||
if (ins->ntask == DSP_MAX_TASK_DESC - 1) {
|
||||
snd_printk(KERN_ERR "dsp_spos: got no place for other TASK\n");
|
||||
@@ -1000,9 +1013,10 @@ static dsp_task_descriptor_t * _map_task_tree (cs46xx_t *chip,char * name,u32 de
|
||||
return desc;
|
||||
}
|
||||
|
||||
dsp_scb_descriptor_t * cs46xx_dsp_create_scb (cs46xx_t *chip,char * name, u32 * scb_data,u32 dest)
|
||||
struct dsp_scb_descriptor *
|
||||
cs46xx_dsp_create_scb (struct snd_cs46xx *chip, char * name, u32 * scb_data, u32 dest)
|
||||
{
|
||||
dsp_scb_descriptor_t * desc;
|
||||
struct dsp_scb_descriptor * desc;
|
||||
|
||||
desc = _map_scb (chip,name,dest);
|
||||
if (desc) {
|
||||
@@ -1015,9 +1029,11 @@ dsp_scb_descriptor_t * cs46xx_dsp_create_scb (cs46xx_t *chip,char * name, u32 *
|
||||
}
|
||||
|
||||
|
||||
static dsp_task_descriptor_t * cs46xx_dsp_create_task_tree (cs46xx_t *chip,char * name, u32 * task_data,u32 dest,int size)
|
||||
static struct dsp_task_descriptor *
|
||||
cs46xx_dsp_create_task_tree (struct snd_cs46xx *chip, char * name, u32 * task_data,
|
||||
u32 dest, int size)
|
||||
{
|
||||
dsp_task_descriptor_t * desc;
|
||||
struct dsp_task_descriptor * desc;
|
||||
|
||||
desc = _map_task_tree (chip,name,dest,size);
|
||||
if (desc) {
|
||||
@@ -1029,31 +1045,31 @@ static dsp_task_descriptor_t * cs46xx_dsp_create_task_tree (cs46xx_t *chip,char
|
||||
return desc;
|
||||
}
|
||||
|
||||
int cs46xx_dsp_scb_and_task_init (cs46xx_t *chip)
|
||||
int cs46xx_dsp_scb_and_task_init (struct snd_cs46xx *chip)
|
||||
{
|
||||
dsp_spos_instance_t * ins = chip->dsp_spos_instance;
|
||||
symbol_entry_t * fg_task_tree_header_code;
|
||||
symbol_entry_t * task_tree_header_code;
|
||||
symbol_entry_t * task_tree_thread;
|
||||
symbol_entry_t * null_algorithm;
|
||||
symbol_entry_t * magic_snoop_task;
|
||||
struct dsp_spos_instance * ins = chip->dsp_spos_instance;
|
||||
struct dsp_symbol_entry * fg_task_tree_header_code;
|
||||
struct dsp_symbol_entry * task_tree_header_code;
|
||||
struct dsp_symbol_entry * task_tree_thread;
|
||||
struct dsp_symbol_entry * null_algorithm;
|
||||
struct dsp_symbol_entry * magic_snoop_task;
|
||||
|
||||
dsp_scb_descriptor_t * timing_master_scb;
|
||||
dsp_scb_descriptor_t * codec_out_scb;
|
||||
dsp_scb_descriptor_t * codec_in_scb;
|
||||
dsp_scb_descriptor_t * src_task_scb;
|
||||
dsp_scb_descriptor_t * master_mix_scb;
|
||||
dsp_scb_descriptor_t * rear_mix_scb;
|
||||
dsp_scb_descriptor_t * record_mix_scb;
|
||||
dsp_scb_descriptor_t * write_back_scb;
|
||||
dsp_scb_descriptor_t * vari_decimate_scb;
|
||||
dsp_scb_descriptor_t * rear_codec_out_scb;
|
||||
dsp_scb_descriptor_t * clfe_codec_out_scb;
|
||||
dsp_scb_descriptor_t * magic_snoop_scb;
|
||||
struct dsp_scb_descriptor * timing_master_scb;
|
||||
struct dsp_scb_descriptor * codec_out_scb;
|
||||
struct dsp_scb_descriptor * codec_in_scb;
|
||||
struct dsp_scb_descriptor * src_task_scb;
|
||||
struct dsp_scb_descriptor * master_mix_scb;
|
||||
struct dsp_scb_descriptor * rear_mix_scb;
|
||||
struct dsp_scb_descriptor * record_mix_scb;
|
||||
struct dsp_scb_descriptor * write_back_scb;
|
||||
struct dsp_scb_descriptor * vari_decimate_scb;
|
||||
struct dsp_scb_descriptor * rear_codec_out_scb;
|
||||
struct dsp_scb_descriptor * clfe_codec_out_scb;
|
||||
struct dsp_scb_descriptor * magic_snoop_scb;
|
||||
|
||||
int fifo_addr,fifo_span,valid_slots;
|
||||
int fifo_addr, fifo_span, valid_slots;
|
||||
|
||||
static spos_control_block_t sposcb = {
|
||||
static struct dsp_spos_control_block sposcb = {
|
||||
/* 0 */ HFG_TREE_SCB,HFG_STACK,
|
||||
/* 1 */ SPOSCB_ADDR,BG_TREE_SCB_ADDR,
|
||||
/* 2 */ DSP_SPOS_DC,0,
|
||||
@@ -1106,7 +1122,7 @@ int cs46xx_dsp_scb_and_task_init (cs46xx_t *chip)
|
||||
|
||||
{
|
||||
/* create the null SCB */
|
||||
static generic_scb_t null_scb = {
|
||||
static struct dsp_generic_scb null_scb = {
|
||||
{ 0, 0, 0, 0 },
|
||||
{ 0, 0, 0, 0, 0 },
|
||||
NULL_SCB_ADDR, NULL_SCB_ADDR,
|
||||
@@ -1128,7 +1144,7 @@ int cs46xx_dsp_scb_and_task_init (cs46xx_t *chip)
|
||||
|
||||
{
|
||||
/* setup foreground task tree */
|
||||
static task_tree_control_block_t fg_task_tree_hdr = {
|
||||
static struct dsp_task_tree_control_block fg_task_tree_hdr = {
|
||||
{ FG_TASK_HEADER_ADDR | (DSP_SPOS_DC << 0x10),
|
||||
DSP_SPOS_DC_DC,
|
||||
DSP_SPOS_DC_DC,
|
||||
@@ -1204,7 +1220,7 @@ int cs46xx_dsp_scb_and_task_init (cs46xx_t *chip)
|
||||
|
||||
{
|
||||
/* setup foreground task tree */
|
||||
static task_tree_control_block_t bg_task_tree_hdr = {
|
||||
static struct dsp_task_tree_control_block bg_task_tree_hdr = {
|
||||
{ DSP_SPOS_DC_DC,
|
||||
DSP_SPOS_DC_DC,
|
||||
DSP_SPOS_DC_DC,
|
||||
@@ -1313,7 +1329,7 @@ int cs46xx_dsp_scb_and_task_init (cs46xx_t *chip)
|
||||
if (!write_back_scb) goto _fail_end;
|
||||
|
||||
{
|
||||
static mix2_ostream_spb_t mix2_ostream_spb = {
|
||||
static struct dsp_mix2_ostream_spb mix2_ostream_spb = {
|
||||
0x00020000,
|
||||
0x0000ffff
|
||||
};
|
||||
@@ -1448,13 +1464,14 @@ int cs46xx_dsp_scb_and_task_init (cs46xx_t *chip)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
static int cs46xx_dsp_async_init (cs46xx_t *chip, dsp_scb_descriptor_t * fg_entry)
|
||||
static int cs46xx_dsp_async_init (struct snd_cs46xx *chip,
|
||||
struct dsp_scb_descriptor * fg_entry)
|
||||
{
|
||||
dsp_spos_instance_t * ins = chip->dsp_spos_instance;
|
||||
symbol_entry_t * s16_async_codec_input_task;
|
||||
symbol_entry_t * spdifo_task;
|
||||
symbol_entry_t * spdifi_task;
|
||||
dsp_scb_descriptor_t * spdifi_scb_desc,* spdifo_scb_desc,* async_codec_scb_desc;
|
||||
struct dsp_spos_instance * ins = chip->dsp_spos_instance;
|
||||
struct dsp_symbol_entry * s16_async_codec_input_task;
|
||||
struct dsp_symbol_entry * spdifo_task;
|
||||
struct dsp_symbol_entry * spdifi_task;
|
||||
struct dsp_scb_descriptor * spdifi_scb_desc, * spdifo_scb_desc, * async_codec_scb_desc;
|
||||
|
||||
s16_async_codec_input_task = cs46xx_dsp_lookup_symbol(chip, "S16_ASYNCCODECINPUTTASK", SYMBOL_CODE);
|
||||
if (s16_async_codec_input_task == NULL) {
|
||||
@@ -1475,7 +1492,7 @@ static int cs46xx_dsp_async_init (cs46xx_t *chip, dsp_scb_descriptor_t * fg_entr
|
||||
|
||||
{
|
||||
/* 0xBC0 */
|
||||
spdifoscb_t spdifo_scb = {
|
||||
struct dsp_spdifoscb spdifo_scb = {
|
||||
/* 0 */ DSP_SPOS_UUUU,
|
||||
{
|
||||
/* 1 */ 0xb0,
|
||||
@@ -1504,7 +1521,7 @@ static int cs46xx_dsp_async_init (cs46xx_t *chip, dsp_scb_descriptor_t * fg_entr
|
||||
};
|
||||
|
||||
/* 0xBB0 */
|
||||
spdifiscb_t spdifi_scb = {
|
||||
struct dsp_spdifiscb spdifi_scb = {
|
||||
/* 0 */ DSP_SPOS_UULO,DSP_SPOS_UUHI,
|
||||
/* 1 */ 0,
|
||||
/* 2 */ 0,
|
||||
@@ -1529,7 +1546,7 @@ static int cs46xx_dsp_async_init (cs46xx_t *chip, dsp_scb_descriptor_t * fg_entr
|
||||
};
|
||||
|
||||
/* 0xBA0 */
|
||||
async_codec_input_scb_t async_codec_input_scb = {
|
||||
struct dsp_async_codec_input_scb async_codec_input_scb = {
|
||||
/* 0 */ DSP_SPOS_UUUU,
|
||||
/* 1 */ 0,
|
||||
/* 2 */ 0,
|
||||
@@ -1620,9 +1637,9 @@ static int cs46xx_dsp_async_init (cs46xx_t *chip, dsp_scb_descriptor_t * fg_entr
|
||||
}
|
||||
|
||||
|
||||
static void cs46xx_dsp_disable_spdif_hw (cs46xx_t *chip)
|
||||
static void cs46xx_dsp_disable_spdif_hw (struct snd_cs46xx *chip)
|
||||
{
|
||||
dsp_spos_instance_t * ins = chip->dsp_spos_instance;
|
||||
struct dsp_spos_instance * ins = chip->dsp_spos_instance;
|
||||
|
||||
/* set SPDIF output FIFO slot */
|
||||
snd_cs46xx_pokeBA0(chip, BA0_ASER_FADDR, 0);
|
||||
@@ -1641,9 +1658,9 @@ static void cs46xx_dsp_disable_spdif_hw (cs46xx_t *chip)
|
||||
ins->spdif_status_out &= ~DSP_SPDIF_STATUS_HW_ENABLED;
|
||||
}
|
||||
|
||||
int cs46xx_dsp_enable_spdif_hw (cs46xx_t *chip)
|
||||
int cs46xx_dsp_enable_spdif_hw (struct snd_cs46xx *chip)
|
||||
{
|
||||
dsp_spos_instance_t * ins = chip->dsp_spos_instance;
|
||||
struct dsp_spos_instance * ins = chip->dsp_spos_instance;
|
||||
|
||||
/* if hw-ctrl already enabled, turn off to reset logic ... */
|
||||
cs46xx_dsp_disable_spdif_hw (chip);
|
||||
@@ -1664,9 +1681,9 @@ int cs46xx_dsp_enable_spdif_hw (cs46xx_t *chip)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int cs46xx_dsp_enable_spdif_in (cs46xx_t *chip)
|
||||
int cs46xx_dsp_enable_spdif_in (struct snd_cs46xx *chip)
|
||||
{
|
||||
dsp_spos_instance_t * ins = chip->dsp_spos_instance;
|
||||
struct dsp_spos_instance * ins = chip->dsp_spos_instance;
|
||||
|
||||
/* turn on amplifier */
|
||||
chip->active_ctrl(chip, 1);
|
||||
@@ -1724,9 +1741,9 @@ int cs46xx_dsp_enable_spdif_in (cs46xx_t *chip)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int cs46xx_dsp_disable_spdif_in (cs46xx_t *chip)
|
||||
int cs46xx_dsp_disable_spdif_in (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_rx_scb != NULL, return -EINVAL);
|
||||
snd_assert (ins->spdif_in_src != NULL,return -EINVAL);
|
||||
@@ -1750,9 +1767,9 @@ int cs46xx_dsp_disable_spdif_in (cs46xx_t *chip)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int cs46xx_dsp_enable_pcm_capture (cs46xx_t *chip)
|
||||
int cs46xx_dsp_enable_pcm_capture (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->pcm_input == NULL,return -EINVAL);
|
||||
snd_assert (ins->ref_snoop_scb != NULL,return -EINVAL);
|
||||
@@ -1765,9 +1782,9 @@ int cs46xx_dsp_enable_pcm_capture (cs46xx_t *chip)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int cs46xx_dsp_disable_pcm_capture (cs46xx_t *chip)
|
||||
int cs46xx_dsp_disable_pcm_capture (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->pcm_input != NULL,return -EINVAL);
|
||||
|
||||
@@ -1779,9 +1796,9 @@ int cs46xx_dsp_disable_pcm_capture (cs46xx_t *chip)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int cs46xx_dsp_enable_adc_capture (cs46xx_t *chip)
|
||||
int cs46xx_dsp_enable_adc_capture (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->adc_input == NULL,return -EINVAL);
|
||||
snd_assert (ins->codec_in_scb != NULL,return -EINVAL);
|
||||
@@ -1794,9 +1811,9 @@ int cs46xx_dsp_enable_adc_capture (cs46xx_t *chip)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int cs46xx_dsp_disable_adc_capture (cs46xx_t *chip)
|
||||
int cs46xx_dsp_disable_adc_capture (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->adc_input != NULL,return -EINVAL);
|
||||
|
||||
@@ -1808,7 +1825,7 @@ int cs46xx_dsp_disable_adc_capture (cs46xx_t *chip)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int cs46xx_poke_via_dsp (cs46xx_t *chip,u32 address,u32 data)
|
||||
int cs46xx_poke_via_dsp (struct snd_cs46xx *chip, u32 address, u32 data)
|
||||
{
|
||||
u32 temp;
|
||||
int i;
|
||||
@@ -1845,10 +1862,10 @@ int cs46xx_poke_via_dsp (cs46xx_t *chip,u32 address,u32 data)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int cs46xx_dsp_set_dac_volume (cs46xx_t * chip,u16 left,u16 right)
|
||||
int cs46xx_dsp_set_dac_volume (struct snd_cs46xx * chip, u16 left, u16 right)
|
||||
{
|
||||
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;
|
||||
|
||||
down(&chip->spos_mutex);
|
||||
|
||||
@@ -1874,8 +1891,9 @@ int cs46xx_dsp_set_dac_volume (cs46xx_t * chip,u16 left,u16 right)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int cs46xx_dsp_set_iec958_volume (cs46xx_t * chip,u16 left,u16 right) {
|
||||
dsp_spos_instance_t * ins = chip->dsp_spos_instance;
|
||||
int cs46xx_dsp_set_iec958_volume (struct snd_cs46xx * chip, u16 left, u16 right)
|
||||
{
|
||||
struct dsp_spos_instance * ins = chip->dsp_spos_instance;
|
||||
|
||||
down(&chip->spos_mutex);
|
||||
|
||||
|
@@ -43,7 +43,7 @@
|
||||
/* this instruction types
|
||||
needs to be reallocated when load
|
||||
code into DSP */
|
||||
typedef enum {
|
||||
enum wide_opcode {
|
||||
WIDE_FOR_BEGIN_LOOP = 0x20,
|
||||
WIDE_FOR_BEGIN_LOOP2,
|
||||
|
||||
@@ -58,7 +58,7 @@ typedef enum {
|
||||
WIDE_TBEQ_COND_CALL1_ADDR,
|
||||
WIDE_TBEQ_NCOND_GOTOI_ADDR,
|
||||
WIDE_TBEQ_NCOND_CALL1_ADDR,
|
||||
} wide_opcode_t;
|
||||
};
|
||||
|
||||
/* SAMPLE segment */
|
||||
#define VARI_DECIMATE_BUF1 0x0000
|
||||
@@ -186,7 +186,8 @@ typedef enum {
|
||||
#define SP_SPDOUT_CONTROL 0x804D
|
||||
#define SP_SPDOUT_CSUV 0x808E
|
||||
|
||||
static inline u8 _wrap_all_bits (u8 val) {
|
||||
static inline u8 _wrap_all_bits (u8 val)
|
||||
{
|
||||
u8 wrapped;
|
||||
|
||||
/* wrap all 8 bits */
|
||||
@@ -201,11 +202,10 @@ static inline u8 _wrap_all_bits (u8 val) {
|
||||
((val & 0x80) >> 7);
|
||||
|
||||
return wrapped;
|
||||
|
||||
}
|
||||
|
||||
|
||||
static inline void cs46xx_dsp_spos_update_scb (cs46xx_t * chip,dsp_scb_descriptor_t * scb)
|
||||
static inline void cs46xx_dsp_spos_update_scb (struct snd_cs46xx * chip,
|
||||
struct dsp_scb_descriptor * scb)
|
||||
{
|
||||
/* update nextSCB and subListPtr in SCB */
|
||||
snd_cs46xx_poke(chip,
|
||||
@@ -214,8 +214,10 @@ static inline void cs46xx_dsp_spos_update_scb (cs46xx_t * chip,dsp_scb_descripto
|
||||
(scb->next_scb_ptr->address));
|
||||
}
|
||||
|
||||
static inline void cs46xx_dsp_scb_set_volume (cs46xx_t * chip,dsp_scb_descriptor_t * scb,
|
||||
u16 left,u16 right) {
|
||||
static inline void cs46xx_dsp_scb_set_volume (struct snd_cs46xx * chip,
|
||||
struct dsp_scb_descriptor * scb,
|
||||
u16 left, u16 right)
|
||||
{
|
||||
unsigned int val = ((0xffff - left) << 16 | (0xffff - right));
|
||||
|
||||
snd_cs46xx_poke(chip, (scb->address + SCBVolumeCtrl) << 2, val);
|
||||
|
@@ -36,14 +36,14 @@
|
||||
#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);
|
||||
|
||||
|
@@ -3,7 +3,7 @@
|
||||
#ifndef __HEADER_cwc4630_H__
|
||||
#define __HEADER_cwc4630_H__
|
||||
|
||||
static symbol_entry_t cwc4630_symbols[] = {
|
||||
static struct dsp_symbol_entry cwc4630_symbols[] = {
|
||||
{ 0x0000, "BEGINADDRESS",0x00 },
|
||||
{ 0x8000, "EXECCHILD",0x03 },
|
||||
{ 0x8001, "EXECCHILD_98",0x03 },
|
||||
@@ -302,12 +302,12 @@ static u32 cwc4630_parameter[] = {
|
||||
}; /* #PARAMETER_END */
|
||||
|
||||
|
||||
static segment_desc_t cwc4630_segments[] = {
|
||||
static struct dsp_segment_desc cwc4630_segments[] = {
|
||||
{ SEGTYPE_SP_PROGRAM, 0x00000000, 0x00000328, cwc4630_code },
|
||||
{ SEGTYPE_SP_PARAMETER, 0x00000000, 0x00000080, cwc4630_parameter },
|
||||
};
|
||||
|
||||
static dsp_module_desc_t cwc4630_module = {
|
||||
static struct dsp_module_desc cwc4630_module = {
|
||||
"cwc4630",
|
||||
{
|
||||
38,
|
||||
|
@@ -3,7 +3,7 @@
|
||||
#ifndef __HEADER_cwcasync_H__
|
||||
#define __HEADER_cwcasync_H__
|
||||
|
||||
static symbol_entry_t cwcasync_symbols[] = {
|
||||
static struct dsp_symbol_entry cwcasync_symbols[] = {
|
||||
{ 0x8000, "EXECCHILD",0x03 },
|
||||
{ 0x8001, "EXECCHILD_98",0x03 },
|
||||
{ 0x8003, "EXECCHILD_PUSH1IND",0x03 },
|
||||
@@ -159,11 +159,11 @@ static u32 cwcasync_code[] = {
|
||||
};
|
||||
/* #CODE_END */
|
||||
|
||||
static segment_desc_t cwcasync_segments[] = {
|
||||
static struct dsp_segment_desc cwcasync_segments[] = {
|
||||
{ SEGTYPE_SP_PROGRAM, 0x00000000, 0x000001b6, cwcasync_code },
|
||||
};
|
||||
|
||||
static dsp_module_desc_t cwcasync_module = {
|
||||
static struct dsp_module_desc cwcasync_module = {
|
||||
"cwcasync",
|
||||
{
|
||||
32,
|
||||
|
@@ -4,7 +4,7 @@
|
||||
#ifndef __HEADER_cwcbinhack_H__
|
||||
#define __HEADER_cwcbinhack_H__
|
||||
|
||||
static symbol_entry_t cwcbinhack_symbols[] = {
|
||||
static struct dsp_symbol_entry cwcbinhack_symbols[] = {
|
||||
{ 0x02c8, "OVERLAYBEGINADDRESS",0x00 },
|
||||
{ 0x02c8, "MAGICSNOOPTASK",0x03 },
|
||||
{ 0x0308, "#CODE_END",0x00 },
|
||||
@@ -31,11 +31,11 @@ static u32 cwcbinhack_code[] = {
|
||||
};
|
||||
/* #CODE_END */
|
||||
|
||||
static segment_desc_t cwcbinhack_segments[] = {
|
||||
static struct dsp_segment_desc cwcbinhack_segments[] = {
|
||||
{ SEGTYPE_SP_PROGRAM, 0x00000000, 64, cwcbinhack_code },
|
||||
};
|
||||
|
||||
static dsp_module_desc_t cwcbinhack_module = {
|
||||
static struct dsp_module_desc cwcbinhack_module = {
|
||||
"cwcbinhack",
|
||||
{
|
||||
3,
|
||||
|
@@ -3,7 +3,7 @@
|
||||
#ifndef __HEADER_cwcdma_H__
|
||||
#define __HEADER_cwcdma_H__
|
||||
|
||||
static symbol_entry_t cwcdma_symbols[] = {
|
||||
static struct dsp_symbol_entry cwcdma_symbols[] = {
|
||||
{ 0x8000, "EXECCHILD",0x03 },
|
||||
{ 0x8001, "EXECCHILD_98",0x03 },
|
||||
{ 0x8003, "EXECCHILD_PUSH1IND",0x03 },
|
||||
@@ -51,11 +51,11 @@ static u32 cwcdma_code[] = {
|
||||
|
||||
/* #CODE_END */
|
||||
|
||||
static segment_desc_t cwcdma_segments[] = {
|
||||
static struct dsp_segment_desc cwcdma_segments[] = {
|
||||
{ SEGTYPE_SP_PROGRAM, 0x00000000, 0x00000030, cwcdma_code },
|
||||
};
|
||||
|
||||
static dsp_module_desc_t cwcdma_module = {
|
||||
static struct dsp_module_desc cwcdma_module = {
|
||||
"cwcdma",
|
||||
{
|
||||
27,
|
||||
|
@@ -3,7 +3,7 @@
|
||||
#ifndef __HEADER_cwcemb80_H__
|
||||
#define __HEADER_cwcemb80_H__
|
||||
|
||||
static symbol_entry_t cwcemb80_symbols[] = {
|
||||
static struct dsp_symbol_entry cwcemb80_symbols[] = {
|
||||
{ 0x0000, "BEGINADDRESS",0x00 },
|
||||
{ 0x8000, "EXECCHILD",0x03 },
|
||||
{ 0x8001, "EXECCHILD_98",0x03 },
|
||||
@@ -1588,13 +1588,13 @@ static u32 cwcemb80_sample[] = {
|
||||
}; /* #SAMPLE_END */
|
||||
|
||||
|
||||
static segment_desc_t cwcemb80_segments[] = {
|
||||
static struct dsp_segment_desc cwcemb80_segments[] = {
|
||||
{ SEGTYPE_SP_PROGRAM, 0x00000000, 0x0000031c, cwcemb80_code },
|
||||
{ SEGTYPE_SP_PARAMETER, 0x00000000, 0x00000697, cwcemb80_parameter },
|
||||
{ SEGTYPE_SP_SAMPLE, 0x00000000, 0x00000e00, cwcemb80_sample },
|
||||
};
|
||||
|
||||
static dsp_module_desc_t cwcemb80_module = {
|
||||
static struct dsp_module_desc cwcemb80_module = {
|
||||
"cwcemb80",
|
||||
{
|
||||
38,
|
||||
|
@@ -3,7 +3,7 @@
|
||||
#ifndef __HEADER_cwcsnoop_H__
|
||||
#define __HEADER_cwcsnoop_H__
|
||||
|
||||
static symbol_entry_t cwcsnoop_symbols[] = {
|
||||
static struct dsp_symbol_entry cwcsnoop_symbols[] = {
|
||||
{ 0x0500, "OVERLAYBEGINADDRESS",0x00 },
|
||||
{ 0x0500, "OUTPUTSNOOP",0x03 },
|
||||
{ 0x051f, "#CODE_END",0x00 },
|
||||
@@ -29,11 +29,11 @@ static u32 cwcsnoop_code[] = {
|
||||
};
|
||||
/* #CODE_END */
|
||||
|
||||
static segment_desc_t cwcsnoop_segments[] = {
|
||||
static struct dsp_segment_desc cwcsnoop_segments[] = {
|
||||
{ SEGTYPE_SP_PROGRAM, 0x00000000, 0x0000003e, cwcsnoop_code },
|
||||
};
|
||||
|
||||
static dsp_module_desc_t cwcsnoop_module = {
|
||||
static struct dsp_module_desc cwcsnoop_module = {
|
||||
"cwcsnoop",
|
||||
{
|
||||
3,
|
||||
|
Reference in New Issue
Block a user