diff --git a/include/sound/cs46xx.h b/include/sound/cs46xx.h index 08f62c25df32ff5e172f3774baed07632232a1f4..828c1d2614ef1f47b158c9e664492e3dbb278347 100644 --- a/include/sound/cs46xx.h +++ b/include/sound/cs46xx.h @@ -26,6 +26,7 @@ #include "pcm.h" #include "rawmidi.h" #include "ac97_codec.h" +#include "cs46xx_dsp_spos.h" #ifndef PCI_VENDOR_ID_CIRRUS #define PCI_VENDOR_ID_CIRRUS 0x1013 @@ -936,9 +937,10 @@ #define SERACC_CHIP_TYPE_MASK 0x00000001 #define SERACC_CHIP_TYPE_1_03 0x00000000 #define SERACC_CHIP_TYPE_2_0 0x00000001 -#define SERACC_TWO_CODECS 0x00000002 -#define SERACC_MDM 0x00000004 -#define SERACC_HSP 0x00000008 +#define SERACC_TWO_CODECS 0x00000002 +#define SERACC_MDM 0x00000004 +#define SERACC_HSP 0x00000008 +#define SERACC_ODT 0x00000010 /* only CS4630 */ #endif /* @@ -1626,12 +1628,38 @@ #define SAVE_REG_MAX 0x10 #define POWER_DOWN_ALL 0x7f0f +/* maxinum number of AC97 codecs connected, AC97 2.0 defined 4 */ +#define MAX_NR_AC97 4 +#define CS46XX_PRIMARY_CODEC_INDEX 0 +#define CS46XX_SECONDARY_CODEC_INDEX 1 +#define CS46XX_SECONDARY_CODEC_OFFSET 0x80 + /* * */ typedef struct _snd_cs46xx cs46xx_t; +typedef struct _snd_cs46xx_pcm_t { + unsigned char *hw_area; + dma_addr_t hw_addr; /* PCI bus address, not accessible */ + unsigned long hw_size; + + unsigned int ctl; + unsigned int shift; /* Shift count to trasform frames in bytes */ + unsigned int sw_bufsize; + unsigned int sw_data; /* Offset to next dst (or src) in sw ring buffer */ + unsigned int sw_io; + int sw_ready; /* Bytes ready to be transferred to/from hw */ + unsigned int hw_data; /* Offset to next dst (or src) in hw ring buffer */ + unsigned int hw_io; /* Ring buffer hw pointer */ + int hw_ready; /* Bytes ready for play (or captured) in hw ring buffer */ + size_t appl_ptr; /* Last seen appl_ptr */ + snd_pcm_substream_t *substream; + + pcm_channel_descriptor_t * pcm_channel; +} cs46xx_pcm_t; + typedef struct { char name[24]; unsigned long base; @@ -1674,10 +1702,11 @@ struct _snd_cs46xx { int hw_ready; /* Bytes ready for play (or captured) in hw ring buffer */ size_t appl_ptr; /* Last seen appl_ptr */ snd_pcm_substream_t *substream; - } play, capt; + } capt; - ac97_t *ac97; + int nr_ac97_codecs; + ac97_t *ac97[MAX_NR_AC97]; struct pci_dev *pci; snd_card_t *card; @@ -1704,6 +1733,13 @@ struct _snd_cs46xx { #ifdef CONFIG_PM struct pm_dev *pm_dev; #endif + +#ifdef CONFIG_SND_CS46XX_NEW_DSP + dsp_spos_instance_t * dsp_spos_instance; +#else /* for compatibility */ + cs46xx_pcm_t *playback_pcm; + unsigned int play_ctl; +#endif }; int snd_cs46xx_create(snd_card_t *card, diff --git a/include/sound/cs46xx_dsp_scb_types.h b/include/sound/cs46xx_dsp_scb_types.h new file mode 100644 index 0000000000000000000000000000000000000000..30457420de51e2afcd96b0d9d9aa6a6c648c991b --- /dev/null +++ b/include/sound/cs46xx_dsp_scb_types.h @@ -0,0 +1,936 @@ +/* + * The driver for the Cirrus Logic's Sound Fusion CS46XX based soundcards + * Copyright (c) by Jaroslav Kysela <perex@suse.cz> + * + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * + * NOTE: comments are copy/paste from cwcemb80.lst + * provided by Tom Woller at Cirrus (my only + * documentation about the SP OS running inside + * the DSP) + */ + +#ifndef __CS46XX_DSP_SCB_TYPES_H__ +#define __CS46XX_DSP_SCB_TYPES_H__ + +/* This structs are used internally by the SP */ + +typedef struct _basic_dma_req_t { + /* DMA Requestor Word 0 (DCW) fields: + + 31 [30-28]27 [26:24] 23 22 21 20 [19:18] [17:16] 15 14 13 12 11 10 9 8 7 6 [5:0] + _______________________________________________________________________________________ + |S| SBT |D| DBT |wb|wb| | | LS | SS |Opt|Do|SSG|DSG| | | | | | | Dword | + |H|_____ |H|_________|S_|D |__|__|______|_______|___|ne|__ |__ |__|__|_|_|_|_|_Count -1| + */ + u32 dcw; /* DMA Control Word */ + u32 dmw; /* DMA Mode Word */ + u32 saw; /* Source Address Word */ + u32 daw; /* Destination Address Word */ +} basic_dma_req_t; + +typedef struct _scatter_gather_ext_t { + u32 npaw; /* Next-Page Address Word */ + + /* DMA Requestor Word 5 (NPCW) fields: + + 31-30 29 28 [27:16] [15:12] [11:3] [2:0] + _________________________________________________________________________________________ + |SV |LE|SE| Sample-end byte offset | | Page-map entry offset for next | | + |page|__|__| ___________________________|_________|__page, if !sample-end___________|____| + */ + u32 npcw; /* Next-Page Control Word */ + u32 lbaw; /* Loop-Begin Address Word */ + u32 nplbaw; /* Next-Page after Loop-Begin Address Word */ + u32 sgaw; /* Scatter/Gather Address Word */ +} scatter_gather_ext_t; + +typedef struct _volume_control_t { + u16 rightTarg; /* Target volume for left & right channels */ + u16 leftTarg; + + u16 rightVol; /* Current left & right channel volumes */ + u16 leftVol; +} volume_control_t; + +/* Generic stream control block (SCB) structure definition */ +typedef struct _generic_scb_t { + /* For streaming I/O, the DSP should never alter any words in the DMA + requestor or the scatter/gather extension. Only ad hoc DMA request + streams are free to alter the requestor (currently only occur in the + DOS-based MIDI controller and in debugger-inserted code). + + If an SCB does not have any associated DMA requestor, these 9 ints + may be freed for use by other tasks, but the pointer to the SCB must + still be such that the insOrd:nextSCB appear at offset 9 from the + SCB pointer. + + Basic (non scatter/gather) DMA requestor (4 ints) + */ + + /* Initialized by the host, only modified by DMA + R/O for the DSP task */ + basic_dma_req_t basic_req; /* Optional */ + + /* Scatter/gather DMA requestor extension (5 ints) + Initialized by the host, only modified by DMA + DSP task never needs to even read these. + */ + scatter_gather_ext_t sg_ext; /* Optional */ + + /* Sublist pointer & next stream control block (SCB) link. + Initialized & modified by the host R/O for the DSP task + */ + u16 next_scb; /* REQUIRED */ + u16 sub_list_ptr; /* REQUIRED */ + + + /* Pointer to this tasks parameter block & stream function pointer + Initialized by the host R/O for the DSP task */ + u16 entry_point; /* REQUIRED */ + u16 this_spb; /* REQUIRED */ + + + /* rsConfig register for stream buffer (rsDMA reg. + is loaded from basicReq.daw for incoming streams, or + basicReq.saw, for outgoing streams) + + 31 30 29 [28:24] [23:16] 15 14 13 12 11 10 9 8 7 6 5 4 [3:0] + ______________________________________________________________________________ + |DMA |D|maxDMAsize| streamNum|dir|p| | | | | | |ds |shr 1|rev Cy | mod | + |prio |_|__________|__________|___|_|__|__|__|__|_|_|___|_____|_______|_______| + 31 30 29 [28:24] [23:16] 15 14 13 12 11 10 9 8 7 6 5 4 [3:0] + + + Initialized by the host R/O for the DSP task + */ + u32 strm_rs_config; /* REQUIRED */ + // + /* On mixer input streams: indicates mixer input stream configuration + On Tees, this is copied from the stream being snooped + + Stream sample pointer & MAC-unit mode for this stream + + Initialized by the host Updated by the DSP task + */ + u32 strm_buf_ptr; /* REQUIRED */ + + /* On mixer input streams: points to next mixer input and is updated by the + mixer subroutine in the "parent" DSP task + (least-significant 16 bits are preserved, unused) + + On Tees, the pointer is copied from the stream being snooped on + initialization, and, subsequently, it is copied into the + stream being snooped. + + On wavetable/3D voices: the strmBufPtr will use all 32 bits to allow for + fractional phase accumulation + + Fractional increment per output sample in the input sample buffer + + (Not used on mixer input streams & redefined on Tees) + On wavetable/3D voices: this 32-bit word specifies the integer.fractional + increment per output sample. + */ + u32 strmPhiIncr; + + + /* Standard stereo volume control + Initialized by the host (host updates target volumes) + + Current volumes update by the DSP task + On mixer input streams: required & updated by the mixer subroutine in the + "parent" DSP task + + On Tees, both current & target volumes are copied up on initialization, + and, subsequently, the target volume is copied up while the current + volume is copied down. + + These two 32-bit words are redefined for wavetable & 3-D voices. + */ + volume_control_t vol_ctrl_t; /* Optional */ +} generic_scb_t; + + +typedef struct _spos_control_block_t { + /* WARNING: Certain items in this structure are modified by the host + Any dword that can be modified by the host, must not be + modified by the SP as the host can only do atomic dword + writes, and to do otherwise, even a read modify write, + may lead to corrupted data on the SP. + + This rule does not apply to one off boot time initialisation prior to starting the SP + */ + + + /* First element on the Hyper forground task tree */ + u16 hfg_tree_root_ptr; /* HOST */ + /* First 3 dwords are written by the host and read-only on the DSP */ + u16 hfg_stack_base; /* HOST */ + + /* Point to this data structure to enable easy access */ + u16 spos_cb_ptr; /* SP */ + u16 prev_task_tree_ptr; /* SP && HOST */ + + + /* Currently Unused */ + u16 xxinterval_timer_period; + /* Enable extension of SPOS data structure */ + u16 HFGSPB_ptr; + + + u16 xxnum_HFG_ticks_thisInterval; + /* Modified by the DSP */ + u16 xxnum_tntervals; + + + /* Set by DSP upon encountering a trap (breakpoint) or a spurious + interrupt. The host must clear this dword after reading it + upon receiving spInt1. */ + u16 spurious_int_flag; /* (Host & SP) Nature of the spurious interrupt */ + u16 trap_flag; /* (Host & SP) Nature of detected Trap */ + + + u16 unused2; + u16 invalid_IP_flag; /* (Host & SP ) Indicate detection of invalid instruction pointer */ + + + /* pointer to forground task tree header for use in next task search */ + u16 fg_task_tree_hdr_ptr; /* HOST */ + /* Data structure for controlling synchronous link update */ + u16 hfg_sync_update_ptr; /* HOST */ + + u16 begin_foreground_FCNT; /* SP */ + /* Place holder for holding sleep timing */ + u16 last_FCNT_before_sleep; /* SP */ + + u16 unused7; /* SP */ + u16 next_task_treePtr; /* SP */ + + u32 nused5; + + u16 active_flags; /* SP */ + /* State flags, used to assist control of execution of Hyper Forground */ + u16 HFG_flags; /* SP */ + + u16 unused9; + u16 unused8; + + /* Space for saving enough context so that we can set up enough + to save some more context. + */ + u32 rFE_save_for_invalid_IP; + u32 r32_save_for_spurious_int; + u32 r32_save_for_trap; + u32 r32_save_for_HFG; +} spos_control_block_t; + +/* SPB for MIX_TO_OSTREAM algorithm family */ +typedef struct _mix2_ostream_spb_t +{ + /* 16b.16b integer.frac approximation to the + number of 3 sample triplets to output each + frame. (approximation must be floor, to + insure that the fractional error is always + positive) + */ + long outTripletsPerFrame; + + /* 16b.16b integer.frac accumulated number of + output triplets since the start of group + */ + long accumOutTriplets; +} mix2_ostream_spb_t; + +/* SCB for Timing master algorithm */ +typedef struct _timing_master_scb_t { + /* First 12 dwords from generic_scb_t */ + basic_dma_req_t basic_req; /* Optional */ + scatter_gather_ext_t sg_ext; /* Optional */ + u16 next_scb; /* REQUIRED */ + u16 sub_list_ptr; /* REQUIRED */ + + u16 entry_point; /* REQUIRED */ + u16 this_spb; /* REQUIRED */ + + + /* Initial values are 0000:xxxx */ + u16 reserved; + u16 extra_sample_accum; + + + /* Initial values are xxxx:0000 + hi: Current CODEC output FIFO pointer + (0 to 0x0f) + lo: Flag indicating that the CODEC + FIFO is sync'd (host clears to + resynchronize the FIFO pointer + upon start/restart) + */ + u16 codec_FIFO_syncd; + u16 codec_FIFO_ptr; + + + /* Init. 8000:0005 for 44.1k + 8000:0001 for 48k + hi: Fractional sample accumulator 0.16b + lo: Number of frames remaining to be + processed in the current group of + frames + */ + u16 frac_samp_accum_qm1; + u16 TM_frms_left_in_group; + + /* Init. 0001:0005 for 44.1k + 0000:0001 for 48k + hi: Fractional sample correction factor 0.16b + to be added every frameGroupLength frames + to correct for truncation error in + nsamp_per_frm_q15 + lo: Number of frames in the group + */ + u16 frac_samp_correction_qm1; + u16 TM_frm_group_length; + + /* Init. 44.1k*65536/8k = 0x00058333 for 44.1k + 48k*65536/8k = 0x00060000 for 48k + 16b.16b integer.frac approximation to the + number of samples to output each frame. + (approximation must be floor, to insure */ + u32 nsamp_per_frm_q15; +} timing_master_scb_t; + +/* SCB for CODEC output algorithm */ +typedef struct _codec_output_scb_t { + /* First 13 dwords from generic_scb_t */ + basic_dma_req_t basic_req; /* Optional */ + scatter_gather_ext_t sg_ext; /* Optional */ + u16 next_scb; /* REQUIRED */ + u16 sub_list_ptr; /* REQUIRED */ + + u16 entry_point; /* REQUIRED */ + u16 this_spb; /* REQUIRED */ + + u32 strm_rs_config; /* REQUIRED */ + u32 strm_buf_ptr; /* REQUIRED */ + + /* NOTE: The CODEC output task reads samples from the first task on its + sublist at the stream buffer pointer (init. to lag DMA destination + address word). After the required number of samples is transferred, + the CODEC output task advances sub_list_ptr->strm_buf_ptr past the samples + consumed. + */ + + /* Init. 0000:0010 for SDout + 0060:0010 for SDout2 + 0080:0010 for SDout3 + hi: Base IO address of FIFO to which + the left-channel samples are to + be written. + lo: Displacement for the base IO + address for left-channel to obtain + the base IO address for the FIFO + to which the right-channel samples + are to be written. + */ + u16 left_chan_base_IO_addr; + u16 right_chan_IO_disp; + + + /* Init: 0x0080:0004 for non-AC-97 + Init: 0x0080:0000 for AC-97 + hi: Exponential volume change rate + for input stream + lo: Positive shift count to shift the + 16-bit input sample to obtain the + 32-bit output word + */ + u16 CO_scale_shift_count; + u16 CO_exp_vol_change_rate; + + /* Pointer to SCB at end of input chain */ + u16 reserved; + u16 last_sub_ptr; +} codec_output_scb_t; + +/* SCB for CODEC input algorithm */ +typedef struct _codec_input_scb_t { + /* First 13 dwords from generic_scb_t */ + basic_dma_req_t basic_req; /* Optional */ + scatter_gather_ext_t sg_ext; /* Optional */ + u16 next_scb; /* REQUIRED */ + u16 sub_list_ptr; /* REQUIRED */ + + u16 entry_point; /* REQUIRED */ + u16 this_spb; /* REQUIRED */ + + u32 strm_rs_config; /* REQUIRED */ + u32 strm_buf_ptr; /* REQUIRED */ + + /* NOTE: The CODEC input task reads samples from the hardware FIFO + sublist at the DMA source address word (sub_list_ptr->basic_req.saw). + After the required number of samples is transferred, the CODEC + output task advances sub_list_ptr->basic_req.saw past the samples + consumed. SPuD must initialize the sub_list_ptr->basic_req.saw + to point half-way around from the initial sub_list_ptr->strm_nuf_ptr + to allow for lag/lead. + */ + + /* Init. 0000:0010 for SDout + 0060:0010 for SDout2 + 0080:0010 for SDout3 + hi: Base IO address of FIFO to which + the left-channel samples are to + be written. + lo: Displacement for the base IO + address for left-channel to obtain + the base IO address for the FIFO + to which the right-channel samples + are to be written. + */ + u16 rightChanINdisp; + u16 left_chan_base_IN_addr; + + /* Init. ?:fffc + lo: Negative shift count to shift the + 32-bit input dword to obtain the + 16-bit sample msb-aligned (count + is negative to shift left) + */ + u16 scaleShiftCount; + u16 reserver1; + + u32 reserved2; +} codec_input_scb_t; + + +typedef struct _pcm_serial_input_scb_t { + /* First 13 dwords from generic_scb_t */ + basic_dma_req_t basic_req; /* Optional */ + scatter_gather_ext_t sg_ext; /* Optional */ + u16 next_scb; /* REQUIRED */ + u16 sub_list_ptr; /* REQUIRED */ + + u16 entry_point; /* REQUIRED */ + u16 this_spb; /* REQUIRED */ + + u32 strm_buf_ptr; /* REQUIRED */ + u32 strm_rs_config; /* REQUIRED */ + + /* Init. Ptr to CODEC input SCB + hi: Pointer to the SCB containing the + input buffer to which CODEC input + samples are written + lo: Flag indicating the link to the CODEC + input task is to be initialized + */ + u16 init_codec_input_link; + u16 codec_input_buf_scb; + + /* Initialized by the host (host updates target volumes) */ + volume_control_t psi_vol_ctrl; + +} pcm_serial_input_scb_t; + +typedef struct _src_task_scb_t { + u16 frames_left_in_gof; + u16 gofs_left_in_sec; + + u16 const2_thirds; + u16 num_extra_tnput_samples; + + u16 cor_per_gof; + u16 correction_per_sec; + + u16 output_buf_producer_ptr; + u16 junk_DMA_MID; + + u16 gof_length; + u16 gofs_per_sec; + + u32 input_buf_strm_config; + + u16 reserved_for_SRC_use; + u16 input_buf_consumer_ptr; + + u32 accum_phi; + + u16 exp_src_vol_change_rate; + u16 input_buf_producer_ptr; + + u16 src_next_scb; + u16 src_sub_list_ptr; + + u16 src_entry_point; + u16 src_this_sbp; + + u32 src_strm_rs_config; + u32 src_strm_buf_ptr; + + u32 phiIncr6int_26frac; + + volume_control_t src_vol_ctrl; +} src_task_scb_t; + +typedef struct _decimate_by_pow2_scb_t { + /* decimationFactor = 2, 4, or 8 (larger factors waste too much memory + when compared to cascading decimators) + */ + u16 dec2_coef_base_ptr; + u16 dec2_coef_increment; + /* coefIncrement = 128 / decimationFactor (for our ROM filter) + coefBasePtr = 0x8000 (for our ROM filter) + */ + + u16 dec2_in_samples_per_out_triplet; + u16 dec2_extra_in_samples; + /* extraInSamples: # of accumulated, unused input samples (init. to 0) + inSamplesPerOutTriplet = 3 * decimationFactor + */ + + u16 dec2_const2_thirds; + u16 dec2_half_num_taps_mp5; + /* halfNumTapsM5: (1/2 number of taps in decimation filter) minus 5 + const2thirds: constant 2/3 in 16Q0 format (sign.15) + */ + + u16 dec2_output_buf_producer_ptr; + u16 dec2_junkdma_mid; + + u32 dec2_reserved2; + + u32 dec2_input_nuf_strm_config; + /* inputBufStrmConfig: rsConfig for the input buffer to the decimator + (buffer size = decimationFactor * 32 dwords) + */ + + u16 dec2_phi_incr; + u16 dec2_input_buf_consumer_ptr; + /* inputBufConsumerPtr: Input buffer read pointer (into SRC filter) + phiIncr = decimationFactor * 4 + */ + + u32 dec2_reserved3; + + u16 dec2_exp_vol_change_rate; + u16 dec2_input_buf_producer_ptr; + /* inputBufProducerPtr: Input buffer write pointer + expVolChangeRate: Exponential volume change rate for possible + future mixer on input streams + */ + + u16 dec2_next_scb; + u16 dec2_sub_list_ptr; + + u16 dec2_entry_point; + u16 dec2_this_spb; + + u32 dec2_strm_rs_config; + u32 dec2_strm_buf_ptr; + + u32 dec2_reserved4; + + volume_control_t dec2_vol_ctrl; /* Not used! */ +} decimate_by_pow2_scb_t; + +typedef struct _vari_decimate_scb_t { + u16 vdec_frames_left_in_gof; + u16 vdec_gofs_left_in_sec; + + u16 vdec_const2_thirds; + u16 vdec_extra_in_samples; + /* extraInSamples: # of accumulated, unused input samples (init. to 0) + const2thirds: constant 2/3 in 16Q0 format (sign.15) */ + + u16 vdec_cor_per_gof; + u16 vdec_correction_per_sec; + + u16 vdec_output_buf_producer_ptr; + u16 vdec_input_buf_consumer_ptr; + /* inputBufConsumerPtr: Input buffer read pointer (into SRC filter) */ + + u16 vdec_gof_length; + u16 vdec_gofs_per_sec; + + u32 vdec_input_buf_strm_config; + /* inputBufStrmConfig: rsConfig for the input buffer to the decimator + (buffer size = 64 dwords) */ + long vdec_coef_increment; + /* coefIncrement = - 128.0 / decimationFactor (as a 32Q15 number) */ + + long vdec_accumphi; + /* accumPhi: accumulated fractional phase increment (6.26) */ + + u16 vdec_exp_vol_change_rate; + u16 vdec_input_buf_producer_ptr; + /* inputBufProducerPtr: Input buffer write pointer + expVolChangeRate: Exponential volume change rate for possible + future mixer on input streams */ + + u16 vdec_next_scb; + u16 vdec_sub_list_ptr; + + u16 vdec_entry_point; + u16 vdec_this_spb; + + u32 vdec_strm_rs_config; + u32 vdec_strm_buf_ptr; + + u32 vdec_phi_incr_6int_26frac; + + volume_control_t vdec_vol_ctrl; +} vari_decimate_scb_t; + + +/* SCB for MIX_TO_OSTREAM algorithm family */ +typedef struct _mix2_ostream_scb_t { + /* First 13 dwords from generic_scb_t */ + basic_dma_req_t basic_req; /* Optional */ + scatter_gather_ext_t sg_ext; /* Optional */ + u16 next_scb; /* REQUIRED */ + u16 sub_list_ptr; /* REQUIRED */ + + u16 entry_point; /* REQUIRED */ + u16 this_spb; /* REQUIRED */ + + u32 strm_rs_config; /* REQUIRED */ + u32 strm_buf_ptr; /* REQUIRED */ + + + /* hi: Number of mixed-down input triplets + computed since start of group + lo: Number of frames remaining to be + processed in the current group of + frames + */ + u16 frames_left_in_group; + u16 accum_input_triplets; + + /* hi: Exponential volume change rate + for mixer on input streams + lo: Number of frames in the group + */ + u16 frame_group_length; + u16 exp_vol_change_rate; + + u16 const_FFFF; + u16 const_zero; +} mix2_ostream_scb_t; + + +/* SCB for S16_MIX algorithm */ +typedef struct _mix_only_scb_t { + /* First 13 dwords from generic_scb_t */ + basic_dma_req_t basic_req; /* Optional */ + scatter_gather_ext_t sg_ext; /* Optional */ + u16 next_scb; /* REQUIRED */ + u16 sub_list_ptr; /* REQUIRED */ + + u16 entry_point; /* REQUIRED */ + u16 this_spb; /* REQUIRED */ + + u32 strm_rs_config; /* REQUIRED */ + u32 strm_buf_ptr; /* REQUIRED */ + + u32 reserved; + volume_control_t vol_ctrl; +} mix_only_scb_t; + +/* SCB for the async. CODEC input algorithm */ +typedef struct _async_codec_input_scb_t { + u32 io_free2; + + u32 io_current_total; + u32 io_previous_total; + + u16 io_count; + u16 io_count_limit; + + u16 o_fifo_base_addr; + u16 ost_mo_format; + /* 1 = stereo; 0 = mono + xxx for ASER 1 (not allowed); 118 for ASER2 */ + + u32 ostrm_rs_config; + u32 ostrm_buf_ptr; + + u16 io_sclks_per_lr_clk; + u16 io_io_enable; + + u32 io_free4; + + u16 io_next_scb; + u16 io_sub_list_ptr; + + u16 io_entry_point; + u16 io_this_spb; + + u32 istrm_rs_config; + u32 istrm_buf_ptr; + + /* Init. 0000:8042: for ASER1 + 0000:8044: for ASER2 */ + u16 io_stat_reg_addr; + u16 iofifo_pointer; + + /* Init 1 stero:100 ASER1 + Init 0 mono:110 ASER2 + */ + u16 ififo_base_addr; + u16 ist_mo_format; + + u32 i_free; +} async_codec_input_scb_t; + + +/* SCB for the SP/DIF CODEC input and output */ +typedef struct _spdifiscb_t { + u16 status_ptr; + u16 status_start_ptr; + + u32 current_total; + u32 previous_total; + + u16 count; + u16 count_limit; + + u32 status_data; + + u16 status; + u16 free4; + + u32 free3; + + u16 free2; + u16 bit_count; + + u32 temp_status; + + u16 next_SCB; + u16 sub_list_ptr; + + u16 entry_point; + u16 this_spb; + + u32 strm_rs_config; + u32 strm_buf_ptr; + + u16 stat_reg_addr; + u16 fifo_pointer; + + u16 fifo_base_addr; + u16 st_mo_format; + + u32 Free1; +} spdifiscb_t; + + +/* SCB for the SP/DIF CODEC input and output */ +typedef struct _spdifoscb_t { + + + u32 free2; + + u32 free3[4]; + + /* Need to be here for compatibility with AsynchFGTxCode */ + u32 strm_rs_config; + + u32 strm_buf_ptr; + + u16 status; + u16 free5; + + u32 free4; + + u16 next_scb; + u16 sub_list_ptr; + + u16 entry_point; + u16 this_spb; + + u32 free6[2]; + + u16 stat_reg_addr; + u16 fifo_pointer; + + u16 fifo_base_addr; + u16 st_mo_format; + + u32 free1; +} spdifoscb_t; + + + +typedef struct _asynch_fg_rx_scb_t { + + u16 bot_buf_mask; + u16 buf_Mask; + + u16 max; + u16 min; + + u16 old_producer_pointer; + u16 hfg_scb_ptr; + + u16 delta; + u16 adjust_count; + + u32 unused2[5]; + + u16 sibling_ptr; + u16 child_ptr; + + u16 code_ptr; + u16 this_ptr; + + u32 strm_rs_config; + + u32 strm_buf_ptr; + + u32 unused_phi_incr; + + u16 righttarg; + u16 left_targ; + + u16 rightVol; + u16 leftVol; +} asynch_fg_rx_scb_t; + + + +typedef struct _asynch_fg_tx_scb_t { + u16 not_buf_mask; + u16 buf_mask; + + u16 Max; + u16 min; + + u16 unused1; + u16 hfg_scb_ptr; + + u16 delta; + u16 adjust_count; + + u32 accum_phi; + + u16 unused2; + u16 const_one_third; + + u32 unused3[3]; + + u16 sibling_ptr; + u16 child_ptr; + + u16 codePtr; + u16 this_ptr; + + u32 strm_rs_config; + + u32 strm_buf_ptr; + + u32 phi_incr; + + u16 unused_right_targ; + u16 unused_left_targ; + + u16 unused_right_vol; + u16 unused_left_vol; +} asynch_fg_tx_scb_t; + + +typedef struct _output_snoop_scb_t { + /* First 13 dwords from generic_scb_t */ + basic_dma_req_t basic_req; /* Optional */ + scatter_gather_ext_t sg_ext; /* Optional */ + u16 next_scb; /* REQUIRED */ + u16 sub_list_ptr; /* REQUIRED */ + + u16 entry_point; /* REQUIRED */ + u16 this_spb; /* REQUIRED */ + + u32 strm_rs_config; /* REQUIRED */ + u32 strm_buf_ptr; /* REQUIRED */ + + u16 init_snoop_input_link; + u16 snoop_child_input_scb; + + u32 snoop_input_buf_ptr; + + u16 reserved; + u16 input_scb; +} output_snoop_scb_t; + +typedef struct _spio_write_scb_t { + u16 address1; + u16 address2; + + u32 data1; + + u32 data2; + + u16 address3; + u16 address4; + + u32 data3; + + u32 data4; + + u16 unused1; + u16 data_ptr; + + u32 unused2[2]; + + u16 sibling_ptr; + u16 child_ptr; + + u16 entry_point; + u16 this_ptr; + + u32 unused3[5]; +} spio_write_scb_t; + +typedef struct _magic_snoop_task_t { + u32 i0; + u32 i1; + + u32 strm_buf_ptr1; + + u16 i2; + u16 snoop_scb; + + u32 i3; + u32 i4; + u32 i5; + u32 i6; + + u32 i7; + + u16 next_scb; + u16 sub_list_ptr; + + u16 entry_point; + u16 this_ptr; + + u32 strm_buf_config; + u32 strm_buf_ptr2; + + u32 i8; + + volume_control_t vdec_vol_ctrl; +} magic_snoop_task_t; +#endif /* __DSP_SCB_TYPES_H__ */ diff --git a/include/sound/cs46xx_dsp_spos.h b/include/sound/cs46xx_dsp_spos.h new file mode 100644 index 0000000000000000000000000000000000000000..a1ae8ebe0bd498460152520441b3d38849ffadc5 --- /dev/null +++ b/include/sound/cs46xx_dsp_spos.h @@ -0,0 +1,183 @@ +/* + * The driver for the Cirrus Logic's Sound Fusion CS46XX based soundcards + * Copyright (c) by Jaroslav Kysela <perex@suse.cz> + * + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +#ifndef __CS46XX_DSP_SPOS_H__ +#define __CS46XX_DSP_SPOS_H__ + +#include "cs46xx_dsp_scb_types.h" +#include "cs46xx_dsp_task_types.h" + +#define SYMBOL_CONSTANT 0x0 +#define SYMBOL_SAMPLE 0x1 +#define SYMBOL_PARAMETER 0x2 +#define SYMBOL_CODE 0x3 + +#define SEGTYPE_SP_PROGRAM 0x00000001 +#define SEGTYPE_SP_PARAMETER 0x00000002 +#define SEGTYPE_SP_SAMPLE 0x00000003 +#define SEGTYPE_SP_COEFFICIENT 0x00000004 + +#define DSP_SPOS_UU 0x0deadul /* unused */ +#define DSP_SPOS_DC 0x0badul /* dont care */ +#define DSP_SPOS_DC_DC 0x0bad0badul /* dont care */ +#define DSP_SPOS_UUUU 0xdeadc0edul /* unused */ +#define DSP_SPOS_UUHI 0xdeadul +#define DSP_SPOS_UULO 0xc0edul +#define DSP_SPOS_DCDC 0x0badf1d0ul /* dont care */ +#define DSP_SPOS_DCDCHI 0x0badul +#define DSP_SPOS_DCDCLO 0xf1d0ul + +#define DSP_MAX_TASK_NAME 60 +#define DSP_MAX_SYMBOL_NAME 100 +#define DSP_MAX_SCB_NAME 60 +#define DSP_MAX_SCB_DESC 200 +#define DSP_MAX_TASK_DESC 50 + +#define DSP_MAX_PCM_CHANNELS 32 +#define DSP_MAX_SRC_NR 6 + +struct _dsp_module_desc_t; + +typedef struct _symbol_entry_t { + u32 address; + char symbol_name[DSP_MAX_SYMBOL_NAME]; + int symbol_type; + + /* initialized by driver */ + struct _dsp_module_desc_t * module; + int deleted; +} symbol_entry_t; + +typedef struct _symbol_desc_t { + int nsymbols; + + symbol_entry_t * symbols; + + /* initialized by driver */ + int highest_frag_index; +} symbol_desc_t; + + +typedef struct _segment_desc_t { + int segment_type; + u32 offset; + u32 size; + u32 * data; +} segment_desc_t; + +typedef struct _dsp_module_desc_t { + char * module_name; + symbol_desc_t symbol_table; + int nsegments; + segment_desc_t * segments; + + /* initialized by driver */ + u32 overlay_begin_address; + u32 load_address; + int nfixups; +} dsp_module_desc_t; + +typedef struct _dsp_scb_descriptor_t { + char scb_name[DSP_MAX_SCB_NAME]; + u32 address; + int index; + + struct _dsp_scb_descriptor_t * sub_list_ptr; + struct _dsp_scb_descriptor_t * next_scb_ptr; + struct _dsp_scb_descriptor_t * parent_scb_ptr; + + symbol_entry_t * task_entry; + symbol_entry_t * scb_symbol; + + snd_info_entry_t *proc_info; + int ref_count; + + int deleted; +} dsp_scb_descriptor_t; + +typedef struct _dsp_task_descriptor_t { + char task_name[DSP_MAX_TASK_NAME]; + int size; + u32 address; + int index; +} dsp_task_descriptor_t; + +typedef struct _pcm_channel_descriptor_t { + int active; + int src_slot; + int pcm_slot; + u32 sample_rate; + u32 unlinked; + dsp_scb_descriptor_t * pcm_reader_scb; + dsp_scb_descriptor_t * src_scb; + + void * private_data; +} pcm_channel_descriptor_t; + +typedef struct _dsp_spos_instance_t { + symbol_desc_t symbol_table; /* currently availble loaded symbols in SP */ + + int nmodules; + dsp_module_desc_t * modules; /* modules loaded into SP */ + + segment_desc_t code; + + /* PCM playback */ + struct semaphore pcm_mutex; + + dsp_scb_descriptor_t * master_mix_scb; + int npcm_channels; + int nsrc_scb; + pcm_channel_descriptor_t pcm_channels[DSP_MAX_PCM_CHANNELS]; + int src_scb_slots[DSP_MAX_SRC_NR]; + + /* cache this symbols */ + symbol_entry_t * null_algorithm; /* used by PCMreaderSCB's */ + symbol_entry_t * s16_up; /* used by SRCtaskSCB's */ + + /* proc fs */ + snd_card_t * snd_card; + snd_info_entry_t * proc_dsp_dir; + snd_info_entry_t * proc_sym_info_entry; + snd_info_entry_t * proc_modules_info_entry; + snd_info_entry_t * proc_parameter_dump_info_entry; + snd_info_entry_t * proc_sample_dump_info_entry; + + /* SCB's descriptors */ + struct semaphore scb_mutex; + int nscb; + int scb_highest_frag_index; + dsp_scb_descriptor_t scbs[DSP_MAX_SCB_DESC]; + snd_info_entry_t * proc_scb_info_entry; + dsp_scb_descriptor_t * the_null_scb; + + /* Task's descriptors */ + int ntask; + dsp_task_descriptor_t tasks[DSP_MAX_TASK_DESC]; + snd_info_entry_t * proc_task_info_entry; + + /* SPDIF status */ + int spdif_status_out; + int spdif_status_in; +} dsp_spos_instance_t; + +#endif /* __DSP_SPOS_H__ */ + diff --git a/include/sound/cs46xx_dsp_task_types.h b/include/sound/cs46xx_dsp_task_types.h new file mode 100644 index 0000000000000000000000000000000000000000..b97a65ac01e68f2cd57aeeea7cc776cc7d368dd9 --- /dev/null +++ b/include/sound/cs46xx_dsp_task_types.h @@ -0,0 +1,215 @@ +/* + * The driver for the Cirrus Logic's Sound Fusion CS46XX based soundcards + * Copyright (c) by Jaroslav Kysela <perex@suse.cz> + * + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * + * NOTE: comments are copy/paste from cwcemb80.lst + * provided by Tom Woller at Cirrus (my only + * documentation about the SP OS running inside + * the DSP) + */ + +#ifndef __CS46XX_DSP_TASK_TYPES_H__ +#define __CS46XX_DSP_TASK_TYPES_H__ + +/********************************************************************************************* +Example hierarchy of stream control blocks in the SP + +hfgTree +Ptr____Call (c) + \ + -------+------ ------------- ------------- ------------- ----- +| SBlaster IF |______\| Foreground |___\| Middlegr'nd |___\| Background |___\| Nul | +| |Goto /| tree header |g /| tree header |g /| tree header |g /| SCB |r + -------------- (g) ------------- ------------- ------------- ----- + |c |c |c |c + | | | | + \/ ------------- ------------- ------------- + | Foreground |_\ | Middlegr'nd |_\ | Background |_\ + | tree |g/ | tree |g/ | tree |g/ + ------------- ------------- ------------- + |c |c |c + | | | + \/ \/ \/ + +*********************************************************************************************/ + +#define HFG_FIRST_EXECUTE_MODE 0x0001 +#define HFG_FIRST_EXECUTE_MODE_BIT 0 +#define HFG_CONTEXT_SWITCH_MODE 0x0002 +#define HFG_CONTEXT_SWITCH_MODE_BIT 1 + +#define MAX_FG_STACK_SIZE 32 // THESE NEED TO BE COMPUTED PROPERLY +#define MAX_MG_STACK_SIZE 16 +#define MAX_BG_STACK_SIZE 9 +#define MAX_HFG_STACK_SIZE 4 + +#define SLEEP_ACTIVE_INCREMENT 0 /* Enable task tree thread to go to sleep + This should only ever be used on the Background thread */ +#define STANDARD_ACTIVE_INCREMENT 1 /* Task tree thread normal operation */ +#define SUSPEND_ACTIVE_INCREMENT 2 /* Cause execution to suspend in the task tree thread + This should only ever be used on the Background thread */ + +#define HOSTFLAGS_DISABLE_BG_SLEEP 0 /* Host-controlled flag that determines whether we go to sleep + at the end of BG */ + +/* Minimal context save area for Hyper Forground */ +typedef struct _hf_save_area_t { + u32 r10_save; + u32 r54_save; + u32 r98_save; + + u16 status_save; + u16 ind_save; + + u16 rci1_save; + u16 rci0_save; + + u32 r32_save; + u32 r76_save; + u32 rsd2_save; + + u16 rsi2_save; /* See TaskTreeParameterBlock for + remainder of registers */ + u16 rsa2Save; + /* saved as part of HFG context */ +} hf_save_area_t; + + +/* Task link data structure */ +typedef struct _tree_link_t { + /* Pointer to sibling task control block */ + u16 next_scb; + /* Pointer to child task control block */ + u16 sub_ptr; + + /* Pointer to code entry point */ + u16 entry_point; + /* Pointer to local data */ + u16 this_spb; +} tree_link_t; + + +typedef struct _task_tree_data_t { + /* Initial tock count; controls task tree execution rate */ + u16 tock_count_limit; + /* Tock down counter */ + u16 tock_count; + + /* Add to ActiveCount when TockCountLimit reached: + Subtract on task tree termination */ + u16 active_tncrement; + /* Number of pending activations for task tree */ + u16 active_count; + + /* BitNumber to enable modification of correct bit in ActiveTaskFlags */ + u16 active_bit; + /* Pointer to OS location for indicating current activity on task level */ + u16 active_task_flags_ptr; + + /* Data structure for controlling movement of memory blocks:- + currently unused */ + u16 mem_upd_ptr; + /* Data structure for controlling synchronous link update */ + u16 link_upd_ptr; + + /* Save area for remainder of full context. */ + u16 save_area; + /* Address of start of local stack for data storage */ + u16 data_stack_base_ptr; + +} task_tree_data_t; + + + +typedef struct _interval_timer_data_t +{ + /* These data items have the same relative locations to those */ + u16 interval_timer_period; + u16 itd_unused; + + /* used for this data in the SPOS control block for SPOS 1.0 */ + u16 num_FG_ticks_this_interval; + u16 num_intervals; +} interval_timer_data_t; + + +/* This structure contains extra storage for the task tree + Currently, this additional data is related only to a full context save */ +typedef struct _task_tree_context_block_t { + /* Up to 10 values are saved onto the stack. 8 for the task tree, 1 for + The access to the context switch (call or interrupt), and 1 spare that + users should never use. This last may be required by the system */ + u16 stack1; + u16 stack0; + u16 stack3; + u16 stack2; + u16 stack5; + u16 stack4; + u16 stack7; + u16 stack6; + u16 stack9; + u16 stack8; + + u32 saverfe; + + /* Value may be overwriten by stack save algorithm. + Retain the size of the stack data saved here if used */ + u16 reserved1; + u16 stack_size; + u32 saverba; /* (HFG) */ + u32 saverdc; + u32 savers_config_23; /* (HFG) */ + u32 savers_DMA23; /* (HFG) */ + u32 saversa0; + u32 saversi0; + u32 saversa1; + u32 saversi1; + u32 saversa3; + u32 saversd0; + u32 saversd1; + u32 saversd3; + u32 savers_config01; + u32 savers_DMA01; + u32 saveacc0hl; + u32 saveacc1hl; + u32 saveacc0xacc1x; + u32 saveacc2hl; + u32 saveacc3hl; + u32 saveacc2xacc3x; + u32 saveaux0hl; + u32 saveaux1hl; + u32 saveaux0xaux1x; + u32 saveaux2hl; + u32 saveaux3hl; + u32 saveaux2xaux3x; + u32 savershouthl; + u32 savershoutxmacmode; +} task_tree_context_block_t; + + +typedef struct _task_tree_control_block_t { + hf_save_area_t context; + tree_link_t links; + task_tree_data_t data; + task_tree_context_block_t context_blk; + interval_timer_data_t int_timer; +} task_tree_control_block_t; + + +#endif /* __DSP_TASK_TYPES_H__ */ diff --git a/include/sound/sndmagic.h b/include/sound/sndmagic.h index 2e928d9de58df4305543f18da64b3c175a1d99b7..145f663ebceddc39cda4eef511175077813269e5 100644 --- a/include/sound/sndmagic.h +++ b/include/sound/sndmagic.h @@ -79,6 +79,7 @@ static inline int _snd_magic_bad(void *obj, unsigned long magic) #define trident_t_magic 0xa15a1201 #define es1938_t_magic 0xa15a1301 #define cs46xx_t_magic 0xa15a1401 +#define cs46xx_pcm_t_magic 0xa15a1402 #define ensoniq_t_magic 0xa15a1501 #define sonicvibes_t_magic 0xa15a1601 #define mpu401_t_magic 0xa15a1701 diff --git a/include/sound/version.h b/include/sound/version.h index e2a4f6c66e75138ab80f587184f536be04341846..18e90df3f4ef2febb3040236f7522b7a2fd6aec9 100644 --- a/include/sound/version.h +++ b/include/sound/version.h @@ -1,3 +1,3 @@ /* include/version.h. Generated automatically by configure. */ #define CONFIG_SND_VERSION "0.9.0rc2" -#define CONFIG_SND_DATE " (Wed Jul 31 15:28:28 2002 UTC)" +#define CONFIG_SND_DATE " (Thu Aug 01 15:59:56 2002 UTC)" diff --git a/sound/core/seq/seq_queue.c b/sound/core/seq/seq_queue.c index a3c7bb213553c72bfc5ae0e02e6e8b5c853e8e50..46f8fdc1eb6f6db8d0e3282497ae905a6974f3d7 100644 --- a/sound/core/seq/seq_queue.c +++ b/sound/core/seq/seq_queue.c @@ -149,7 +149,7 @@ static queue_t *queue_new(int owner, int locked) static void queue_delete(queue_t *q) { /* stop and release the timer */ - snd_seq_timer_stop(q->timer); + snd_seq_timer_stop(q->timer, 0); snd_seq_timer_close(q); /* wait until access free */ snd_use_lock_sync(&q->use_lock); @@ -348,7 +348,7 @@ static void snd_seq_check_queue_in_tasklet(unsigned long private_data) /* enqueue a event to singe queue */ int snd_seq_enqueue_event(snd_seq_event_cell_t *cell, int atomic, int hop) { - int dest; + int dest, err; queue_t *q; snd_assert(cell != NULL, return -EINVAL); @@ -373,14 +373,20 @@ int snd_seq_enqueue_event(snd_seq_event_cell_t *cell, int atomic, int hop) /* enqueue event in the real-time or midi queue */ switch (cell->event.flags & SNDRV_SEQ_TIME_STAMP_MASK) { case SNDRV_SEQ_TIME_STAMP_TICK: - snd_seq_prioq_cell_in(q->tickq, cell); + err = snd_seq_prioq_cell_in(q->tickq, cell); break; case SNDRV_SEQ_TIME_STAMP_REAL: - snd_seq_prioq_cell_in(q->timeq, cell); + default: + err = snd_seq_prioq_cell_in(q->timeq, cell); break; } + if (err < 0) { + queuefree(q); /* unlock */ + return err; + } + /* trigger dispatching */ snd_seq_check_queue(q, atomic, hop); @@ -601,7 +607,7 @@ void snd_seq_queue_client_termination(int client) spin_unlock_irqrestore(&q->owner_lock, flags); if (q->owner == client) { if (q->timer->running) - snd_seq_timer_stop(q->timer); + snd_seq_timer_stop(q->timer, 0); snd_seq_timer_reset(q->timer); } queuefree(q); @@ -711,17 +717,17 @@ void snd_seq_queue_process_event(queue_t *q, snd_seq_event_t *ev, int from_timer case SNDRV_SEQ_EVENT_START: snd_seq_prioq_leave(q->tickq, ev->source.client, 1); snd_seq_prioq_leave(q->timeq, ev->source.client, 1); - snd_seq_timer_start(q->timer); - queue_broadcast_event(q, ev, from_timer_port, atomic, hop); + if (! snd_seq_timer_start(q->timer, atomic)) + queue_broadcast_event(q, ev, from_timer_port, atomic, hop); break; case SNDRV_SEQ_EVENT_CONTINUE: - snd_seq_timer_continue(q->timer); - queue_broadcast_event(q, ev, from_timer_port, atomic, hop); + if (! snd_seq_timer_continue(q->timer, atomic)) + queue_broadcast_event(q, ev, from_timer_port, atomic, hop); break; case SNDRV_SEQ_EVENT_STOP: - snd_seq_timer_stop(q->timer); + snd_seq_timer_stop(q->timer, atomic); queue_broadcast_event(q, ev, from_timer_port, atomic, hop); break; diff --git a/sound/core/seq/seq_timer.c b/sound/core/seq/seq_timer.c index 26781eeac32429d40c7cf286673668ced26c55c1..083197c672afe8e995cba357c7ff86df1199497d 100644 --- a/sound/core/seq/seq_timer.c +++ b/sound/core/seq/seq_timer.c @@ -89,7 +89,7 @@ void snd_seq_timer_delete(seq_timer_t **tmr) t->running = 0; /* reset time */ - snd_seq_timer_stop(t); + snd_seq_timer_stop(t, 0); snd_seq_timer_reset(t); kfree(t); @@ -313,14 +313,18 @@ int snd_seq_timer_close(queue_t *q) return 0; } -void snd_seq_timer_stop(seq_timer_t * tmr) +int snd_seq_timer_stop(seq_timer_t * tmr, int in_callback) { if (! tmr->timeri) - return; + return -EINVAL; if (!tmr->running) - return; + return 0; tmr->running = 0; - snd_timer_stop(tmr->timeri); + if (in_callback) + snd_timer_del(tmr->timeri); + else + snd_timer_stop(tmr->timeri); + return 0; } static int initialize_timer(seq_timer_t *tmr) @@ -345,34 +349,36 @@ static int initialize_timer(seq_timer_t *tmr) return 0; } -void snd_seq_timer_start(seq_timer_t * tmr) +int snd_seq_timer_start(seq_timer_t * tmr, int in_callback) { if (! tmr->timeri) - return; + return -EINVAL; if (tmr->running) - snd_seq_timer_stop(tmr); + snd_seq_timer_stop(tmr, in_callback); snd_seq_timer_reset(tmr); if (initialize_timer(tmr) < 0) - return; + return -EINVAL; snd_timer_start(tmr->timeri, tmr->ticks); tmr->running = 1; do_gettimeofday(&tmr->last_update); + return 0; } -void snd_seq_timer_continue(seq_timer_t * tmr) +int snd_seq_timer_continue(seq_timer_t * tmr, int in_callback) { if (! tmr->timeri) - return; + return -EINVAL; if (tmr->running) - return; + return -EBUSY; if (! tmr->initialized) { snd_seq_timer_reset(tmr); if (initialize_timer(tmr) < 0) - return; + return -EINVAL; } snd_timer_start(tmr->timeri, tmr->ticks); tmr->running = 1; do_gettimeofday(&tmr->last_update); + return 0; } /* return current 'real' time. use timeofday() to get better granularity. */ diff --git a/sound/core/seq/seq_timer.h b/sound/core/seq/seq_timer.h index e181aaf32ae9453646c1f43b69bafc0085d8ca34..4484ef50fb24d2e4fbbea4291d59a740ee885562 100644 --- a/sound/core/seq/seq_timer.h +++ b/sound/core/seq/seq_timer.h @@ -127,9 +127,9 @@ int snd_seq_timer_midi_open(queue_t *q); int snd_seq_timer_midi_close(queue_t *q); void snd_seq_timer_defaults(seq_timer_t *tmr); void snd_seq_timer_reset(seq_timer_t *tmr); -void snd_seq_timer_stop(seq_timer_t *tmr); -void snd_seq_timer_start(seq_timer_t *tmr); -void snd_seq_timer_continue(seq_timer_t *tmr); +int snd_seq_timer_stop(seq_timer_t *tmr, int in_callback); +int snd_seq_timer_start(seq_timer_t *tmr, int in_callback); +int snd_seq_timer_continue(seq_timer_t *tmr, int in_callback); int snd_seq_timer_set_tempo(seq_timer_t *tmr, int tempo); int snd_seq_timer_set_ppq(seq_timer_t *tmr, int ppq); int snd_seq_timer_set_position_tick(seq_timer_t *tmr, snd_seq_tick_time_t position); diff --git a/sound/isa/wavefront/wavefront.c b/sound/isa/wavefront/wavefront.c index 11293d80e593ae59e871f34e5c1eefe996412dfb..7907dfa33e7d565fd1e94c732834f337a341a669 100644 --- a/sound/isa/wavefront/wavefront.c +++ b/sound/isa/wavefront/wavefront.c @@ -71,8 +71,8 @@ MODULE_PARM_DESC(snd_isapnp, "ISA PnP detection for WaveFront soundcards."); MODULE_PARM_SYNTAX(snd_isapnp, SNDRV_ISAPNP_DESC); #endif MODULE_PARM(snd_cs4232_pcm_port, "1-" __MODULE_STRING(SNDRV_CARDS) "l"); -MODULE_PARM_DESC(snd_4232_port, "Port # for CS4232 PCM interface."); -MODULE_PARM_SYNTAX(snd_cs4232_port, SNDRV_PORT12_DESC); +MODULE_PARM_DESC(snd_cs4232_pcm_port, "Port # for CS4232 PCM interface."); +MODULE_PARM_SYNTAX(snd_cs4232_pcm_port, SNDRV_PORT12_DESC); MODULE_PARM(snd_cs4232_pcm_irq, "1-" __MODULE_STRING(SNDRV_CARDS) "i"); MODULE_PARM_DESC(snd_cs4232_pcm_irq, "IRQ # for CS4232 PCM interface."); MODULE_PARM_SYNTAX(snd_cs4232_pcm_irq, SNDRV_ENABLED ",allows:{{5},{7},{9},{11},{12},{15}},dialog:list"); diff --git a/sound/pci/Config.help b/sound/pci/Config.help index aa1d1465ed6f7669b384f21a090c6254ed9a7775..6241d287669f2ee1b70f72b3b8d5581f19213282 100644 --- a/sound/pci/Config.help +++ b/sound/pci/Config.help @@ -5,9 +5,8 @@ CONFIG_SND_CS46XX Say 'Y' or 'M' to include support for Cirrus Logic CS4610 / CS4612 / CS4614 / CS4615 / CS4622 / CS4624 / CS4630 / CS4280 chips. -CONFIG_SND_CS46XX_ACCEPT_VALID - Say 'Y' to allow sample resolution for mmap() transfers. - Note: This can be also specified via module option snd_mmap_valid. +CONFIG_SND_CS46XX_NEW_DSP + Say 'Y' to use a new DSP image for SPDIF and dual codecs. CONFIG_SND_CS4281 Say 'Y' or 'M' to include support for Cirrus Logic CS4281. @@ -39,6 +38,8 @@ CONFIG_SND_HDSP soundcards. CONFIG_SND_TRIDENT + Say 'Y' or 'M' to include support for Trident 4D-Wave DX/NX and + SiS 7018 soundcards. CONFIG_SND_YMFPCI Say 'Y' or 'M' to include support for Yamaha PCI audio chips - @@ -75,7 +76,8 @@ CONFIG_SND_ICE1712 Say 'Y' or 'M' to include support for ICE1712 (Envy24) based soundcards. CONFIG_SND_INTEL8X0 - Say 'Y' or 'M' to include support for Intel8x0 based soundcards. + Say 'Y' or 'M' to include support for Intel8x0 based soundcards, + SiS 7012, AMD768/8111 and NVidia NForce chips. CONFIG_SND_SONICVIBES Say 'Y' or 'M' to include support for S3 SonicVibes based soundcards. diff --git a/sound/pci/Config.in b/sound/pci/Config.in index 183ae5a4206882e968aa723e38b3d047941bbe14..4b34ef68d74a182ffc3be1eba7bf319b5f9b76ba 100644 --- a/sound/pci/Config.in +++ b/sound/pci/Config.in @@ -5,9 +5,7 @@ comment 'PCI devices' dep_tristate 'ALi PCI Audio M5451' CONFIG_SND_ALI5451 $CONFIG_SND dep_tristate 'Cirrus Logic (Sound Fusion) CS4280/CS461x/CS462x/CS463x' CONFIG_SND_CS46XX $CONFIG_SND -if [ "$CONFIG_SND_CS46XX" != "n" ]; then - bool ' Cirrus Logic (Sound Fusion) MMAP support for OSS' CONFIG_SND_CS46XX_ACCEPT_VALID -fi +dep_mbool ' Cirrus Logic (Sound Fusion) New DSP support (EXPERIMENTAL)' CONFIG_SND_CS46XX_NEW_DSP $CONFIG_SND_CS46XX $CONFIG_EXPERIMENTAL dep_tristate 'Cirrus Logic CS4281' CONFIG_SND_CS4281 $CONFIG_SND dep_tristate 'EMU10K1 (SB Live!, E-mu APS)' CONFIG_SND_EMU10K1 $CONFIG_SND dep_tristate 'Korg 1212 IO' CONFIG_SND_KORG1212 $CONFIG_SND diff --git a/sound/pci/cs46xx/Makefile b/sound/pci/cs46xx/Makefile index ffe03b3c1b4dbed000e2908fe5682e419e36150b..203540cad3b3cca15bc42a91a0a7dfe7b284e4ce 100644 --- a/sound/pci/cs46xx/Makefile +++ b/sound/pci/cs46xx/Makefile @@ -4,6 +4,9 @@ # snd-cs46xx-objs := cs46xx.o cs46xx_lib.o +ifeq ($(CONFIG_SND_CS46XX_NEW_DSP),y) + snd-cs46xx-objs += dsp_spos.o dsp_spos_scb_lib.o +endif # Toplevel Module Dependency obj-$(CONFIG_SND_CS46XX) += snd-cs46xx.o diff --git a/sound/pci/cs46xx/cs46xx.c b/sound/pci/cs46xx/cs46xx.c index 668b965968a0e1e0c27800d7f50e964b8949f772..6d4564cb1329bdbf7b2cd48f49274f8e1f2adf24 100644 --- a/sound/pci/cs46xx/cs46xx.c +++ b/sound/pci/cs46xx/cs46xx.c @@ -51,9 +51,7 @@ static char *snd_id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; /* ID for this card */ static int snd_enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP; /* Enable this card */ static int snd_external_amp[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 0}; static int snd_thinkpad[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 0}; -#ifndef CONFIG_SND_CS46XX_ACCEPT_VALID static int snd_mmap_valid[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 0}; -#endif MODULE_PARM(snd_index, "1-" __MODULE_STRING(SNDRV_CARDS) "i"); MODULE_PARM_DESC(snd_index, "Index value for the CS46xx soundcard."); @@ -70,11 +68,9 @@ MODULE_PARM_SYNTAX(snd_external_amp, SNDRV_ENABLED "," SNDRV_BOOLEAN_FALSE_DESC) MODULE_PARM(snd_thinkpad, "1-" __MODULE_STRING(SNDRV_CARDS) "i"); MODULE_PARM_DESC(snd_thinkpad, "Force to enable Thinkpad's CLKRUN control."); MODULE_PARM_SYNTAX(snd_thinkpad, SNDRV_ENABLED "," SNDRV_BOOLEAN_FALSE_DESC); -#ifndef CONFIG_SND_CS46XX_ACCEPT_VALID MODULE_PARM(snd_mmap_valid, "1-" __MODULE_STRING(SNDRV_CARDS) "i"); MODULE_PARM_DESC(snd_mmap_valid, "Support OSS mmap."); MODULE_PARM_SYNTAX(snd_mmap_valid, SNDRV_ENABLED "," SNDRV_BOOLEAN_FALSE_DESC); -#endif static struct pci_device_id snd_cs46xx_ids[] __devinitdata = { { 0x1013, 0x6001, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* CS4280 */ @@ -109,11 +105,7 @@ static int __devinit snd_card_cs46xx_probe(struct pci_dev *pci, snd_card_free(card); return err; } -#ifdef CONFIG_SND_CS46XX_ACCEPT_VALID - chip->accept_valid = 1; -#else chip->accept_valid = snd_mmap_valid[dev]; -#endif if ((err = snd_cs46xx_pcm(chip, 0, NULL)) < 0) { snd_card_free(card); return err; diff --git a/sound/pci/cs46xx/cs46xx_image.h b/sound/pci/cs46xx/cs46xx_image.h index 4bd2e589fd96ec4632849f98839e4c59847fa1a8..dc93f62db2c2b6ec624eda7bcb80a38baee5f47e 100644 --- a/sound/pci/cs46xx/cs46xx_image.h +++ b/sound/pci/cs46xx/cs46xx_image.h @@ -1,4 +1,13 @@ -struct BA1struct BA1Struct = { +struct BA1struct { + struct { + unsigned long offset; + unsigned long size; + } memory[BA1_MEMORY_COUNT]; + u32 map[BA1_DWORD_SIZE]; +}; + + +static struct BA1struct BA1Struct = { {{ 0x00000000, 0x00003000 },{ 0x00010000, 0x00003800 },{ 0x00020000, 0x00007000 }}, {0x00000000,0x00000000,0x00000000,0x00000000, 0x00000000,0x00000000,0x00000000,0x00000000, diff --git a/sound/pci/cs46xx/cs46xx_lib.c b/sound/pci/cs46xx/cs46xx_lib.c index 3a67ec3a12b46529d341ec95ea7a70637aa052e3..2631346fef48e9bb2eb9186a98c0e932a86c3c1f 100644 --- a/sound/pci/cs46xx/cs46xx_lib.c +++ b/sound/pci/cs46xx/cs46xx_lib.c @@ -45,75 +45,42 @@ #ifndef LINUX_2_2 #include <linux/gameport.h> #endif - -#define chip_t cs46xx_t - -/* - * constants - */ - -#define CS46XX_BA0_SIZE 0x1000 -#define CS46XX_BA1_DATA0_SIZE 0x3000 -#define CS46XX_BA1_DATA1_SIZE 0x3800 -#define CS46XX_BA1_PRG_SIZE 0x7000 -#define CS46XX_BA1_REG_SIZE 0x0100 - - -#define CS46XX_PERIOD_SIZE 2048 -#define CS46XX_FRAGS 2 -#define CS46XX_BUFFER_SIZE CS46XX_PERIOD_SIZE * CS46XX_FRAGS - -extern snd_pcm_ops_t snd_cs46xx_playback_ops; -extern snd_pcm_ops_t snd_cs46xx_playback_indirect_ops; -extern snd_pcm_ops_t snd_cs46xx_capture_ops; -extern snd_pcm_ops_t snd_cs46xx_capture_indirect_ops; - - -/* - * common I/O routines - */ - -static inline void snd_cs46xx_poke(cs46xx_t *chip, unsigned long reg, unsigned int val) -{ - unsigned int bank = reg >> 16; - unsigned int offset = reg & 0xffff; - writel(val, chip->region.idx[bank+1].remap_addr + offset); -} - -static inline unsigned int snd_cs46xx_peek(cs46xx_t *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) -{ - writel(val, chip->region.name.ba0.remap_addr + offset); -} - -static inline unsigned int snd_cs46xx_peekBA0(cs46xx_t *chip, unsigned long offset) -{ - return readl(chip->region.name.ba0.remap_addr + offset); -} - +#include "cs46xx_lib.h" static unsigned short snd_cs46xx_codec_read(cs46xx_t *chip, - unsigned short reg) + unsigned short reg, + int codec_index) { int count; - unsigned short result; + unsigned short result,tmp; + u32 offset = 0; + snd_assert ( (codec_index == CS46XX_PRIMARY_CODEC_INDEX) || + (codec_index == CS46XX_SECONDARY_CODEC_INDEX), + return -EINVAL); + + if (codec_index == CS46XX_SECONDARY_CODEC_INDEX) + offset = CS46XX_SECONDARY_CODEC_OFFSET; /* * 1. Write ACCAD = Command Address Register = 46Ch for AC97 register address * 2. Write ACCDA = Command Data Register = 470h for data to write to AC97 - * 3. Write ACCTL = Control Register = 460h for initiating the write + * 3. Write ACCTL = Control Register = 460h for initiating the write7---55 * 4. Read ACCTL = 460h, DCV should be reset by now and 460h = 17h * 5. if DCV not cleared, break and return error * 6. Read ACSTS = Status Register = 464h, check VSTS bit */ - snd_cs46xx_peekBA0(chip, BA0_ACSDA); + snd_cs46xx_peekBA0(chip, BA0_ACSDA + offset); + + tmp = snd_cs46xx_peekBA0(chip, BA0_ACCTL); + if ((tmp & ACCTL_VFRM) == 0) { + snd_printk(KERN_WARNING "cs46xx: ACCTL_VFRM not set 0x%x\n",tmp); + snd_cs46xx_pokeBA0(chip, BA0_ACCTL, (tmp & (~ACCTL_ESYN)) | ACCTL_VFRM ); + mdelay(50); + tmp = snd_cs46xx_peekBA0(chip, BA0_ACCTL + offset); + snd_cs46xx_pokeBA0(chip, BA0_ACCTL, tmp | ACCTL_ESYN | ACCTL_VFRM ); + + } /* * Setup the AC97 control registers on the CS461x to send the @@ -130,10 +97,18 @@ static unsigned short snd_cs46xx_codec_read(cs46xx_t *chip, snd_cs46xx_pokeBA0(chip, BA0_ACCAD, reg); snd_cs46xx_pokeBA0(chip, BA0_ACCDA, 0); - snd_cs46xx_pokeBA0(chip, BA0_ACCTL, ACCTL_DCV | ACCTL_CRW | - ACCTL_VFRM | ACCTL_ESYN | - ACCTL_RSTN); - + if (codec_index == CS46XX_PRIMARY_CODEC_INDEX) { + snd_cs46xx_pokeBA0(chip, BA0_ACCTL,/* clear ACCTL_DCV */ ACCTL_CRW | + ACCTL_VFRM | ACCTL_ESYN | + ACCTL_RSTN); + snd_cs46xx_pokeBA0(chip, BA0_ACCTL, ACCTL_DCV | ACCTL_CRW | + ACCTL_VFRM | ACCTL_ESYN | + ACCTL_RSTN); + } else { + snd_cs46xx_pokeBA0(chip, BA0_ACCTL, ACCTL_DCV | ACCTL_TC | + ACCTL_CRW | ACCTL_VFRM | ACCTL_ESYN | + ACCTL_RSTN); + } /* * Wait for the read to occur. @@ -165,12 +140,12 @@ static unsigned short snd_cs46xx_codec_read(cs46xx_t *chip, * ACSTS = Status Register = 464h * VSTS - Valid Status */ - if (snd_cs46xx_peekBA0(chip, BA0_ACSTS) & ACSTS_VSTS) + if (snd_cs46xx_peekBA0(chip, BA0_ACSTS + offset) & ACSTS_VSTS) goto ok2; udelay(10); } - snd_printk("AC'97 read problem (ACSTS_VSTS), reg = 0x%x\n", reg); + snd_printk("AC'97 read problem (ACSTS_VSTS), codec_index %d, reg = 0x%x\n", codec_index, reg); result = 0xffff; goto end; @@ -184,7 +159,9 @@ static unsigned short snd_cs46xx_codec_read(cs46xx_t *chip, snd_cs46xx_peekBA0(chip, BA0_ACSDA), snd_cs46xx_peekBA0(chip, BA0_ACCAD)); #endif - result = snd_cs46xx_peekBA0(chip, BA0_ACSDA); + + //snd_cs46xx_peekBA0(chip, BA0_ACCAD); + result = snd_cs46xx_peekBA0(chip, BA0_ACSDA + offset); end: return result; } @@ -194,8 +171,18 @@ static unsigned short snd_cs46xx_ac97_read(ac97_t * ac97, { cs46xx_t *chip = snd_magic_cast(cs46xx_t, ac97->private_data, return -ENXIO); unsigned short val; + int codec_index = -1; + + /* UGGLY: nr_ac97_codecs == 0 primery codec detection is in progress */ + if (ac97 == chip->ac97[CS46XX_PRIMARY_CODEC_INDEX] || chip->nr_ac97_codecs == 0) + codec_index = CS46XX_PRIMARY_CODEC_INDEX; + /* UGGLY: nr_ac97_codecs == 1 secondary codec detection is in progress */ + else if (ac97 == chip->ac97[CS46XX_SECONDARY_CODEC_INDEX] || chip->nr_ac97_codecs == 1) + codec_index = CS46XX_SECONDARY_CODEC_INDEX; + else + snd_assert(0, return 0xffff); chip->active_ctrl(chip, 1); - val = snd_cs46xx_codec_read(chip, reg); + val = snd_cs46xx_codec_read(chip, reg, codec_index); chip->active_ctrl(chip, -1); return val; } @@ -203,8 +190,15 @@ static unsigned short snd_cs46xx_ac97_read(ac97_t * ac97, static void snd_cs46xx_codec_write(cs46xx_t *chip, unsigned short reg, - unsigned short val) + unsigned short val, + int codec_index) { + int count; + + snd_assert ((codec_index == CS46XX_PRIMARY_CODEC_INDEX) || + (codec_index == CS46XX_SECONDARY_CODEC_INDEX), + return); + /* * 1. Write ACCAD = Command Address Register = 46Ch for AC97 register address * 2. Write ACCDA = Command Data Register = 470h for data to write to AC97 @@ -212,7 +206,6 @@ static void snd_cs46xx_codec_write(cs46xx_t *chip, * 4. Read ACCTL = 460h, DCV should be reset by now and 460h = 07h * 5. if DCV not cleared, break and return error */ - int count; /* * Setup the AC97 control registers on the CS461x to send the @@ -226,10 +219,20 @@ static void snd_cs46xx_codec_write(cs46xx_t *chip, * set ESYN - ASYNC generation enabled * set RSTN - ARST# inactive, AC97 codec not reset */ - snd_cs46xx_pokeBA0(chip, BA0_ACCAD, reg); - snd_cs46xx_pokeBA0(chip, BA0_ACCDA, val); - snd_cs46xx_pokeBA0(chip, BA0_ACCTL, ACCTL_DCV | ACCTL_VFRM | - ACCTL_ESYN | ACCTL_RSTN); + snd_cs46xx_pokeBA0(chip, BA0_ACCAD , reg); + snd_cs46xx_pokeBA0(chip, BA0_ACCDA , val); + snd_cs46xx_peekBA0(chip, BA0_ACCTL); + + if (codec_index == CS46XX_PRIMARY_CODEC_INDEX) { + snd_cs46xx_pokeBA0(chip, BA0_ACCTL, /* clear ACCTL_DCV */ ACCTL_VFRM | + ACCTL_ESYN | ACCTL_RSTN); + snd_cs46xx_pokeBA0(chip, BA0_ACCTL, ACCTL_DCV | ACCTL_VFRM | + ACCTL_ESYN | ACCTL_RSTN); + } else { + snd_cs46xx_pokeBA0(chip, BA0_ACCTL, ACCTL_DCV | ACCTL_TC | + ACCTL_VFRM | ACCTL_ESYN | ACCTL_RSTN); + } + for (count = 0; count < 4000; count++) { /* * First, we want to wait for a short time. @@ -243,7 +246,7 @@ static void snd_cs46xx_codec_write(cs46xx_t *chip, return; } } - snd_printk("AC'97 write problem, reg = 0x%x, val = 0x%x\n", reg, val); + snd_printk("AC'97 write problem, codec_index = %d, reg = 0x%x, val = 0x%x\n", codec_index, reg, val); } static void snd_cs46xx_ac97_write(ac97_t *ac97, @@ -252,12 +255,21 @@ static void snd_cs46xx_ac97_write(ac97_t *ac97, { cs46xx_t *chip = snd_magic_cast(cs46xx_t, ac97->private_data, return); int val2 = 0; - + int codec_index = -1; + + /* UGGLY: nr_ac97_codecs == 0 primery codec detection is in progress */ + if (ac97 == chip->ac97[CS46XX_PRIMARY_CODEC_INDEX] || chip->nr_ac97_codecs == 0) + codec_index = CS46XX_PRIMARY_CODEC_INDEX; + /* UGGLY: nr_ac97_codecs == 0 secondary codec detection is in progress */ + else if (ac97 == chip->ac97[CS46XX_SECONDARY_CODEC_INDEX] || chip->nr_ac97_codecs == 1) + codec_index = CS46XX_SECONDARY_CODEC_INDEX; + else + snd_assert(0,return); chip->active_ctrl(chip, 1); if (reg == AC97_CD) - val2 = snd_cs46xx_codec_read(chip, AC97_CD); + val2 = snd_cs46xx_codec_read(chip, AC97_CD, codec_index); - snd_cs46xx_codec_write(chip, reg, val); + snd_cs46xx_codec_write(chip, reg, val, codec_index); /* @@ -320,19 +332,36 @@ int snd_cs46xx_download(cs46xx_t *chip, return 0; } -/* 3*1024 parameter, 3.5*1024 sample, 2*3.5*1024 code */ -#define BA1_DWORD_SIZE (13 * 1024 + 512) -#define BA1_MEMORY_COUNT 3 +#ifdef CONFIG_SND_CS46XX_NEW_DSP -struct BA1struct { - struct { - unsigned long offset; - unsigned long size; - } memory[BA1_MEMORY_COUNT]; - u32 map[BA1_DWORD_SIZE]; -}; +// #include "imgs/cwcemb80.h" +#include "imgs/cwc4630.h" +#include "imgs/cwcasync.h" +#include "imgs/cwcsnoop.h" +#include "imgs/cwcbinhack.h" + +int snd_cs46xx_clear_BA1(cs46xx_t *chip, + unsigned long offset, + unsigned long len) +{ + unsigned long dst; + unsigned int bank = offset >> 16; + offset = offset & 0xffff; + + snd_assert(!(offset & 3) && !(len & 3), return -EINVAL); + dst = chip->region.idx[bank+1].remap_addr + offset; + len /= sizeof(u32); + + /* writel already converts 32-bit value to right endianess */ + while (len-- > 0) { + writel(0, dst); + dst += sizeof(u32); + } + return 0; +} + +#else /* old DSP image */ -static #include "cs46xx_image.h" int snd_cs46xx_download_image(cs46xx_t *chip) @@ -350,6 +379,7 @@ int snd_cs46xx_download_image(cs46xx_t *chip) } return 0; } +#endif /* CONFIG_SND_CS46XX_NEW_DSP */ /* * Chip reset @@ -640,38 +670,42 @@ static void snd_cs46xx_set_capture_sample_rate(cs46xx_t *chip, unsigned int rate static int snd_cs46xx_playback_transfer(snd_pcm_substream_t *substream, snd_pcm_uframes_t frames) { - cs46xx_t *chip = snd_pcm_substream_chip(substream); + /* cs46xx_t *chip = snd_pcm_substream_chip(substream); */ snd_pcm_runtime_t *runtime = substream->runtime; - snd_pcm_sframes_t diff = runtime->control->appl_ptr - chip->play.appl_ptr; + snd_pcm_sframes_t diff; + cs46xx_pcm_t * cpcm; + cpcm = snd_magic_cast(cs46xx_pcm_t, substream->runtime->private_data, return -ENXIO); + + diff = runtime->control->appl_ptr - cpcm->appl_ptr; if (diff) { if (diff < -(snd_pcm_sframes_t) (runtime->boundary / 2)) diff += runtime->boundary; - chip->play.sw_ready += diff << chip->play.shift; - } - chip->play.sw_ready += frames << chip->play.shift; - chip->play.appl_ptr = runtime->control->appl_ptr + frames; - while (chip->play.hw_ready < CS46XX_BUFFER_SIZE && - chip->play.sw_ready > 0) { - size_t hw_to_end = CS46XX_BUFFER_SIZE - chip->play.hw_data; - size_t sw_to_end = chip->play.sw_bufsize - chip->play.sw_data; - size_t bytes = CS46XX_BUFFER_SIZE - chip->play.hw_ready; - if (chip->play.sw_ready < bytes) - bytes = chip->play.sw_ready; + cpcm->sw_ready += diff << cpcm->shift; + } + cpcm->sw_ready += frames << cpcm->shift; + cpcm->appl_ptr = runtime->control->appl_ptr + frames; + while (cpcm->hw_ready < CS46XX_BUFFER_SIZE && + cpcm->sw_ready > 0) { + size_t hw_to_end = CS46XX_BUFFER_SIZE - cpcm->hw_data; + size_t sw_to_end = cpcm->sw_bufsize - cpcm->sw_data; + size_t bytes = CS46XX_BUFFER_SIZE - cpcm->hw_ready; + if (cpcm->sw_ready < bytes) + bytes = cpcm->sw_ready; if (hw_to_end < bytes) bytes = hw_to_end; if (sw_to_end < bytes) bytes = sw_to_end; - memcpy(chip->play.hw_area + chip->play.hw_data, - runtime->dma_area + chip->play.sw_data, + memcpy(cpcm->hw_area + cpcm->hw_data, + runtime->dma_area + cpcm->sw_data, bytes); - chip->play.hw_data += bytes; - if (chip->play.hw_data == CS46XX_BUFFER_SIZE) - chip->play.hw_data = 0; - chip->play.sw_data += bytes; - if (chip->play.sw_data == chip->play.sw_bufsize) - chip->play.sw_data = 0; - chip->play.hw_ready += bytes; - chip->play.sw_ready -= bytes; + cpcm->hw_data += bytes; + if (cpcm->hw_data == CS46XX_BUFFER_SIZE) + cpcm->hw_data = 0; + cpcm->sw_data += bytes; + if (cpcm->sw_data == cpcm->sw_bufsize) + cpcm->sw_data = 0; + cpcm->hw_ready += bytes; + cpcm->sw_ready -= bytes; } return 0; } @@ -718,24 +752,45 @@ static int snd_cs46xx_capture_transfer(snd_pcm_substream_t *substream, static snd_pcm_uframes_t snd_cs46xx_playback_direct_pointer(snd_pcm_substream_t * substream) { cs46xx_t *chip = snd_pcm_substream_chip(substream); - size_t ptr = snd_cs46xx_peek(chip, BA1_PBA) - chip->play.hw_addr; - return ptr >> chip->play.shift; + size_t ptr; + cs46xx_pcm_t *cpcm = snd_magic_cast(cs46xx_pcm_t, substream->runtime->private_data, return -ENXIO); + snd_assert (cpcm->pcm_channel,return -ENXIO); + +#ifdef CONFIG_SND_CS46XX_NEW_DSP + ptr = snd_cs46xx_peek(chip, (cpcm->pcm_channel->pcm_reader_scb->address + 2) << 2); +#else + ptr = snd_cs46xx_peek(chip, BA1_PBA); +#endif + ptr -= cpcm->hw_addr; + return ptr >> cpcm->shift; } static snd_pcm_uframes_t snd_cs46xx_playback_indirect_pointer(snd_pcm_substream_t * substream) { cs46xx_t *chip = snd_pcm_substream_chip(substream); - size_t ptr = snd_cs46xx_peek(chip, BA1_PBA) - chip->play.hw_addr; - ssize_t bytes = ptr - chip->play.hw_io; + size_t ptr; + cs46xx_pcm_t *cpcm = snd_magic_cast(cs46xx_pcm_t, substream->runtime->private_data, return -ENXIO); + ssize_t bytes; + +#ifdef CONFIG_SND_CS46XX_NEW_DSP + snd_assert (cpcm->pcm_channel,return -ENXIO); + ptr = snd_cs46xx_peek(chip, (cpcm->pcm_channel->pcm_reader_scb->address + 2) << 2); +#else + ptr = snd_cs46xx_peek(chip, BA1_PBA); +#endif + ptr -= cpcm->hw_addr; + + bytes = ptr - cpcm->hw_io; + if (bytes < 0) bytes += CS46XX_BUFFER_SIZE; - chip->play.hw_io = ptr; - chip->play.hw_ready -= bytes; - chip->play.sw_io += bytes; - if (chip->play.sw_io > chip->play.sw_bufsize) - chip->play.sw_io -= chip->play.sw_bufsize; + cpcm->hw_io = ptr; + cpcm->hw_ready -= bytes; + cpcm->sw_io += bytes; + if (cpcm->sw_io > cpcm->sw_bufsize) + cpcm->sw_io -= cpcm->sw_bufsize; snd_cs46xx_playback_transfer(substream, 0); - return chip->play.sw_io >> chip->play.shift; + return cpcm->sw_io >> cpcm->shift; } static snd_pcm_uframes_t snd_cs46xx_capture_direct_pointer(snd_pcm_substream_t * substream) @@ -768,10 +823,16 @@ static int snd_cs46xx_playback_copy(snd_pcm_substream_t *substream, snd_pcm_uframes_t frames) { snd_pcm_runtime_t *runtime = substream->runtime; - cs46xx_t *chip = snd_pcm_substream_chip(substream); - size_t hwoffb = hwoff << chip->play.shift; - size_t bytes = frames << chip->play.shift; - char *hwbuf = runtime->dma_area + hwoffb; + /*cs46xx_t *chip = snd_pcm_substream_chip(substream); */ + size_t hwoffb; + size_t bytes; + char *hwbuf; + cs46xx_pcm_t *cpcm = snd_magic_cast(cs46xx_pcm_t, substream->runtime->private_data, return -ENXIO); + + hwoffb = hwoff << cpcm->shift; + bytes = frames << cpcm->shift; + hwbuf = runtime->dma_area + hwoffb; + if (copy_from_user(hwbuf, src, bytes)) return -EFAULT; spin_lock_irq(&runtime->lock); @@ -803,24 +864,47 @@ static int snd_cs46xx_playback_trigger(snd_pcm_substream_t * substream, int cmd) { cs46xx_t *chip = snd_pcm_substream_chip(substream); - unsigned int tmp; + /*snd_pcm_runtime_t *runtime = substream->runtime;*/ +#ifdef CONFIG_SND_CS46XX_NEW_DSP + cs46xx_pcm_t *cpcm = snd_magic_cast(cs46xx_pcm_t, substream->runtime->private_data, return -ENXIO); +#endif int result = 0; spin_lock(&chip->reg_lock); +#ifdef CONFIG_SND_CS46XX_NEW_DSP + if (! cpcm->pcm_channel) { + spin_unlock(&chip->reg_lock); + return -ENXIO; + } +#endif switch (cmd) { case SNDRV_PCM_TRIGGER_START: case SNDRV_PCM_TRIGGER_RESUME: if (substream->runtime->periods != CS46XX_FRAGS) snd_cs46xx_playback_transfer(substream, 0); +#ifdef CONFIG_SND_CS46XX_NEW_DSP + if (cpcm->pcm_channel->unlinked) + cs46xx_dsp_pcm_link(chip,cpcm->pcm_channel); +#else + { unsigned int tmp; tmp = snd_cs46xx_peek(chip, BA1_PCTL); tmp &= 0x0000ffff; - snd_cs46xx_poke(chip, BA1_PCTL, chip->play.ctl | tmp); + snd_cs46xx_poke(chip, BA1_PCTL, chip->play_ctl | tmp); + } +#endif break; case SNDRV_PCM_TRIGGER_STOP: case SNDRV_PCM_TRIGGER_SUSPEND: +#ifdef CONFIG_SND_CS46XX_NEW_DSP + if (!cpcm->pcm_channel->unlinked) + cs46xx_dsp_pcm_unlink(chip,cpcm->pcm_channel); +#else + { unsigned int tmp; tmp = snd_cs46xx_peek(chip, BA1_PCTL); tmp &= 0x0000ffff; snd_cs46xx_poke(chip, BA1_PCTL, tmp); + } +#endif break; default: result = -EINVAL; @@ -862,19 +946,22 @@ static int snd_cs46xx_capture_trigger(snd_pcm_substream_t * substream, static int snd_cs46xx_playback_hw_params(snd_pcm_substream_t * substream, snd_pcm_hw_params_t * hw_params) { - cs46xx_t *chip = snd_pcm_substream_chip(substream); + /*cs46xx_t *chip = snd_pcm_substream_chip(substream);*/ snd_pcm_runtime_t *runtime = substream->runtime; + cs46xx_pcm_t *cpcm; int err; + cpcm = snd_magic_cast(cs46xx_pcm_t, runtime->private_data, return -ENXIO); + if (params_periods(hw_params) == CS46XX_FRAGS) { - if (runtime->dma_area != chip->play.hw_area) + if (runtime->dma_area != cpcm->hw_area) snd_pcm_lib_free_pages(substream); - runtime->dma_area = chip->play.hw_area; - runtime->dma_addr = chip->play.hw_addr; - runtime->dma_bytes = chip->play.hw_size; + runtime->dma_area = cpcm->hw_area; + runtime->dma_addr = cpcm->hw_addr; + runtime->dma_bytes = cpcm->hw_size; substream->ops = &snd_cs46xx_playback_ops; } else { - if (runtime->dma_area == chip->play.hw_area) { + if (runtime->dma_area == cpcm->hw_area) { runtime->dma_area = NULL; runtime->dma_addr = 0; runtime->dma_bytes = 0; @@ -888,11 +975,15 @@ static int snd_cs46xx_playback_hw_params(snd_pcm_substream_t * substream, static int snd_cs46xx_playback_hw_free(snd_pcm_substream_t * substream) { - cs46xx_t *chip = snd_pcm_substream_chip(substream); + /*cs46xx_t *chip = snd_pcm_substream_chip(substream);*/ snd_pcm_runtime_t *runtime = substream->runtime; + cs46xx_pcm_t *cpcm; - if (runtime->dma_area != chip->play.hw_area) + cpcm = snd_magic_cast(cs46xx_pcm_t, runtime->private_data, return -ENXIO); + + if (runtime->dma_area != cpcm->hw_area) snd_pcm_lib_free_pages(substream); + runtime->dma_area = NULL; runtime->dma_addr = 0; runtime->dma_bytes = 0; @@ -905,39 +996,92 @@ static int snd_cs46xx_playback_prepare(snd_pcm_substream_t * substream) unsigned int pfie; cs46xx_t *chip = snd_pcm_substream_chip(substream); snd_pcm_runtime_t *runtime = substream->runtime; + cs46xx_pcm_t *cpcm; - pfie = snd_cs46xx_peek(chip, BA1_PFIE); + cpcm = snd_magic_cast(cs46xx_pcm_t, runtime->private_data, return -ENXIO); + +#ifdef CONFIG_SND_CS46XX_NEW_DSP + down (&chip->dsp_spos_instance->pcm_mutex); + if ( cpcm->pcm_channel->src_scb->ref_count == 1 && + cpcm->pcm_channel->sample_rate != runtime->rate) { + /* sample rate not set or we can reuse + the same SRC*/ + + cs46xx_dsp_set_src_sample_rate (chip,cpcm->pcm_channel->src_scb,runtime->rate); + cpcm->pcm_channel->sample_rate = runtime->rate; + } + up (&chip->dsp_spos_instance->pcm_mutex); + + if (cpcm->pcm_channel->sample_rate != runtime->rate && + cpcm->pcm_channel->src_scb->ref_count != 1) { + cs46xx_dsp_destroy_pcm_channel (chip,cpcm->pcm_channel); + + if ( (cpcm->pcm_channel = cs46xx_dsp_create_pcm_channel (chip,runtime->rate,cpcm)) == NULL) { + snd_printk(KERN_ERR "cs46xx: failed to re-create virtual PCM channel\n"); + return -ENXIO; + } + + cs46xx_dsp_pcm_unlink (chip,cpcm->pcm_channel); + cpcm->pcm_channel->sample_rate = runtime->rate; + } + + pfie = snd_cs46xx_peek(chip, (cpcm->pcm_channel->pcm_reader_scb->address + 1) << 2 ); pfie &= ~0x0000f03f; +#else + /* old dsp */ + pfie = snd_cs46xx_peek(chip, BA1_PFIE); + pfie &= ~0x0000f03f; +#endif - chip->play.shift = 2; + cpcm->shift = 2; + /* if to convert from stereo to mono */ if (runtime->channels == 1) { - chip->play.shift--; + cpcm->shift--; pfie |= 0x00002000; } + /* if to convert from 8 bit to 16 bit */ if (snd_pcm_format_width(runtime->format) == 8) { - chip->play.shift--; + cpcm->shift--; pfie |= 0x00001000; } + /* if to convert to unsigned */ if (snd_pcm_format_unsigned(runtime->format)) pfie |= 0x00008000; - if (snd_pcm_format_big_endian(runtime->format)) - pfie |= 0x00004000; + /* Never convert byte order when sample stream is 8 bit */ + if (snd_pcm_format_width(runtime->format) != 8) { + /* convert from big endian to little endian */ + if (snd_pcm_format_big_endian(runtime->format)) + pfie |= 0x00004000; + } - chip->play.sw_bufsize = snd_pcm_lib_buffer_bytes(substream); - chip->play.sw_data = chip->play.sw_io = chip->play.sw_ready = 0; - chip->play.hw_data = chip->play.hw_io = chip->play.hw_ready = 0; - chip->play.appl_ptr = 0; - snd_cs46xx_poke(chip, BA1_PBA, chip->play.hw_addr); + cpcm->sw_bufsize = snd_pcm_lib_buffer_bytes(substream); + cpcm->sw_data = cpcm->sw_io = cpcm->sw_ready = 0; + cpcm->hw_data = cpcm->hw_io = cpcm->hw_ready = 0; + cpcm->appl_ptr = 0; +#ifdef CONFIG_SND_CS46XX_NEW_DSP + /* playback address */ + snd_cs46xx_poke(chip, (cpcm->pcm_channel->pcm_reader_scb->address + 2) << 2, cpcm->hw_addr); + + tmp = snd_cs46xx_peek(chip, (cpcm->pcm_channel->pcm_reader_scb->address) << 2); + tmp &= ~0x000003ff; + tmp |= (4 << cpcm->shift) - 1; + /* playback transaction count register */ + snd_cs46xx_poke(chip, (cpcm->pcm_channel->pcm_reader_scb->address) << 2, tmp); + + /* playback format && interrupt enable */ + snd_cs46xx_poke(chip, (cpcm->pcm_channel->pcm_reader_scb->address + 1) << 2, pfie | cpcm->pcm_channel->pcm_slot); +#else + snd_cs46xx_poke(chip, BA1_PBA, cpcm->hw_addr); tmp = snd_cs46xx_peek(chip, BA1_PDTC); tmp &= ~0x000003ff; - tmp |= (4 << chip->play.shift) - 1; + tmp |= (4 << cpcm->shift) - 1; snd_cs46xx_poke(chip, BA1_PDTC, tmp); - snd_cs46xx_poke(chip, BA1_PFIE, pfie); - snd_cs46xx_set_play_sample_rate(chip, runtime->rate); +#endif + return 0; } @@ -999,26 +1143,68 @@ static int snd_cs46xx_capture_prepare(snd_pcm_substream_t * substream) static void snd_cs46xx_interrupt(int irq, void *dev_id, struct pt_regs *regs) { cs46xx_t *chip = snd_magic_cast(cs46xx_t, dev_id, return); - unsigned int status; + u32 status1; +#ifdef CONFIG_SND_CS46XX_NEW_DSP + dsp_spos_instance_t * ins = chip->dsp_spos_instance; + u32 status2; + int i; + cs46xx_pcm_t *cpcm = NULL; +#endif /* * Read the Interrupt Status Register to clear the interrupt */ - status = snd_cs46xx_peekBA0(chip, BA0_HISR); - if ((status & 0x7fffffff) == 0) { + status1 = snd_cs46xx_peekBA0(chip, BA0_HISR); + if ((status1 & 0x7fffffff) == 0) { snd_cs46xx_pokeBA0(chip, BA0_HICR, HICR_CHGM | HICR_IEV); return; } - if ((status & HISR_VC0) && chip->pcm) { - if (chip->play.substream) - snd_pcm_period_elapsed(chip->play.substream); +#ifdef CONFIG_SND_CS46XX_NEW_DSP + status2 = snd_cs46xx_peekBA0(chip, BA0_HSR0); + for (i = 0; i < DSP_MAX_PCM_CHANNELS; ++i) { + if (i <= 15) { + if ( status1 & (1 << i) ) { + if (i == 1) { + if (chip->capt.substream) + snd_pcm_period_elapsed(chip->capt.substream); + } else { + if (ins->pcm_channels[i].active && + ins->pcm_channels[i].private_data && + !ins->pcm_channels[i].unlinked) { + cpcm = snd_magic_cast(cs46xx_pcm_t, ins->pcm_channels[i].private_data, goto _invalid_pointer); + snd_pcm_period_elapsed(cpcm->substream); + } + } + } + } else { + if ( status2 & (1 << (i - 16))) { + if (ins->pcm_channels[i].active && + ins->pcm_channels[i].private_data && + !ins->pcm_channels[i].unlinked) { + cpcm = snd_magic_cast(cs46xx_pcm_t, ins->pcm_channels[i].private_data, goto _invalid_pointer); + snd_pcm_period_elapsed(cpcm->substream); + } + } + } + + continue; + _invalid_pointer: + printk (KERN_ERR "cs46xx: (interrupt) invalid pointer at pcm_channel[%d]\n",i); } - if ((status & HISR_VC1) && chip->pcm) { +#else + /* old dsp */ + if ((status1 & HISR_VC0) && chip->playback_pcm) { + if (chip->playback_pcm->substream) + snd_pcm_period_elapsed(chip->playback_pcm->substream); + } + if ((status1 & HISR_VC1) && chip->pcm) { if (chip->capt.substream) snd_pcm_period_elapsed(chip->capt.substream); } - if ((status & HISR_MIDI) && chip->rmidi) { +#endif + + if ((status1 & HISR_MIDI) && chip->rmidi) { unsigned char c; spin_lock(&chip->reg_lock); @@ -1088,14 +1274,49 @@ static snd_pcm_hardware_t snd_cs46xx_capture = .fifo_size = 0, }; +static void snd_cs46xx_pcm_free_substream(snd_pcm_runtime_t *runtime) +{ + cs46xx_pcm_t * cpcm = snd_magic_cast(cs46xx_pcm_t, runtime->private_data, return); + + if (cpcm) + snd_magic_kfree(cpcm); +} + static int snd_cs46xx_playback_open(snd_pcm_substream_t * substream) { cs46xx_t *chip = snd_pcm_substream_chip(substream); + cs46xx_pcm_t * cpcm; + snd_pcm_runtime_t *runtime = substream->runtime; - if ((chip->play.hw_area = snd_malloc_pci_pages(chip->pci, chip->play.hw_size, &chip->play.hw_addr)) == NULL) + cpcm = snd_magic_kcalloc(cs46xx_pcm_t, 0, GFP_KERNEL); + if (cpcm == NULL) + return -ENOMEM; + cpcm->hw_size = PAGE_SIZE; + if ((cpcm->hw_area = snd_malloc_pci_pages(chip->pci, cpcm->hw_size, &cpcm->hw_addr)) == NULL) { + snd_magic_kfree(cpcm); return -ENOMEM; - chip->play.substream = substream; - substream->runtime->hw = snd_cs46xx_playback; + } + + runtime->hw = snd_cs46xx_playback; + runtime->private_data = cpcm; + runtime->private_free = snd_cs46xx_pcm_free_substream; + + cpcm->substream = substream; +#ifdef CONFIG_SND_CS46XX_NEW_DSP + cpcm->pcm_channel = cs46xx_dsp_create_pcm_channel (chip,runtime->rate,cpcm); + + if (cpcm->pcm_channel == NULL) { + snd_printk(KERN_ERR "cs46xx: failed to create virtual PCM channel\n"); + snd_free_pci_pages(chip->pci, cpcm->hw_size, cpcm->hw_area, cpcm->hw_addr); + snd_magic_kfree(cpcm); + return -ENOMEM; + } + + cs46xx_dsp_pcm_unlink (chip,cpcm->pcm_channel); +#else + chip->playback_pcm = cpcm; /* HACK */ +#endif + if (chip->accept_valid) substream->runtime->hw.info |= SNDRV_PCM_INFO_MMAP_VALID; chip->active_ctrl(chip, 1); @@ -1121,9 +1342,22 @@ static int snd_cs46xx_capture_open(snd_pcm_substream_t * substream) static int snd_cs46xx_playback_close(snd_pcm_substream_t * substream) { cs46xx_t *chip = snd_pcm_substream_chip(substream); + snd_pcm_runtime_t *runtime = substream->runtime; + cs46xx_pcm_t * cpcm; + + cpcm = snd_magic_cast(cs46xx_pcm_t, runtime->private_data, return -ENXIO); - chip->play.substream = NULL; - snd_free_pci_pages(chip->pci, chip->play.hw_size, chip->play.hw_area, chip->play.hw_addr); +#ifdef CONFIG_SND_CS46XX_NEW_DSP + if (cpcm->pcm_channel) { + cs46xx_dsp_destroy_pcm_channel(chip,cpcm->pcm_channel); + cpcm->pcm_channel = NULL; + } +#else + chip->playback_pcm = NULL; +#endif + + cpcm->substream = NULL; + snd_free_pci_pages(chip->pci, cpcm->hw_size, cpcm->hw_area, cpcm->hw_addr); chip->active_ctrl(chip, -1); chip->amplifier_ctrl(chip, -1); return 0; @@ -1193,6 +1427,12 @@ static void snd_cs46xx_pcm_free(snd_pcm_t *pcm) snd_pcm_lib_preallocate_free_for_all(pcm); } +#ifdef CONFIG_SND_CS46XX_NEW_DSP +#define MAX_PLAYBACK_CHANNELS (DSP_MAX_PCM_CHANNELS - 1) +#else +#define MAX_PLAYBACK_CHANNELS 1 +#endif + int __devinit snd_cs46xx_pcm(cs46xx_t *chip, int device, snd_pcm_t ** rpcm) { snd_pcm_t *pcm; @@ -1200,7 +1440,7 @@ int __devinit snd_cs46xx_pcm(cs46xx_t *chip, int device, snd_pcm_t ** rpcm) if (rpcm) *rpcm = NULL; - if ((err = snd_pcm_new(chip->card, "CS46xx", device, 1, 1, &pcm)) < 0) + if ((err = snd_pcm_new(chip->card, "CS46xx", device, MAX_PLAYBACK_CHANNELS, 1, &pcm)) < 0) return err; pcm->private_data = chip; pcm->private_free = snd_cs46xx_pcm_free; @@ -1227,8 +1467,17 @@ int __devinit snd_cs46xx_pcm(cs46xx_t *chip, int device, snd_pcm_t ** rpcm) static void snd_cs46xx_mixer_free_ac97(ac97_t *ac97) { cs46xx_t *chip = snd_magic_cast(cs46xx_t, ac97->private_data, return); - chip->ac97 = NULL; - chip->eapd_switch = NULL; + + snd_assert ((ac97 == chip->ac97[CS46XX_PRIMARY_CODEC_INDEX]) || + (ac97 == chip->ac97[CS46XX_SECONDARY_CODEC_INDEX]), + return); + + if (ac97 == chip->ac97[CS46XX_PRIMARY_CODEC_INDEX]) { + chip->ac97[CS46XX_PRIMARY_CODEC_INDEX] = NULL; + chip->eapd_switch = NULL; + } + else + chip->ac97[CS46XX_SECONDARY_CODEC_INDEX] = NULL; } static int snd_cs46xx_vol_info(snd_kcontrol_t *kcontrol, @@ -1264,6 +1513,41 @@ static int snd_cs46xx_vol_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * return change; } +#ifdef CONFIG_SND_CS46XX_NEW_DSP + +static int snd_cs46xx_iec958_info(snd_kcontrol_t *kcontrol, + snd_ctl_elem_info_t *uinfo) +{ + uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; + uinfo->count = 1; + uinfo->value.integer.min = 0; + uinfo->value.integer.max = 1; + return 0; +} + +static int snd_cs46xx_iec958_get(snd_kcontrol_t *kcontrol, + snd_ctl_elem_value_t *ucontrol) +{ + cs46xx_t *chip = snd_kcontrol_chip(kcontrol); + ucontrol->value.integer.value[0] = chip->dsp_spos_instance->spdif_status_out; + return 0; +} + +static int snd_cs46xx_iec958_put(snd_kcontrol_t *kcontrol, + snd_ctl_elem_value_t *ucontrol) +{ + cs46xx_t *chip = snd_kcontrol_chip(kcontrol); + int change = chip->dsp_spos_instance->spdif_status_out; + + if (ucontrol->value.integer.value[0] && !change) + cs46xx_dsp_enable_spdif_out(chip); + else if (change) + cs46xx_dsp_disable_spdif_out(chip); + return (change != chip->dsp_spos_instance->spdif_status_out); +} + +#endif /* CONFIG_SND_CS46XX_NEW_DSP */ + static snd_kcontrol_new_t snd_cs46xx_controls[] __devinitdata = { { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, @@ -1280,7 +1564,17 @@ static snd_kcontrol_new_t snd_cs46xx_controls[] __devinitdata = { .get = snd_cs46xx_vol_get, .put = snd_cs46xx_vol_put, .private_value = BA1_CVOL, -}}; +}, +#ifdef CONFIG_SND_CS46XX_NEW_DSP +{ + .iface = SNDRV_CTL_ELEM_IFACE_MIXER, + .name = "IEC 958 output", + .info = snd_cs46xx_iec958_info, + .get = snd_cs46xx_iec958_get, + .put = snd_cs46xx_iec958_put, +}, +#endif + }; int __devinit snd_cs46xx_mixer(cs46xx_t *chip) { @@ -1290,12 +1584,17 @@ int __devinit snd_cs46xx_mixer(cs46xx_t *chip) int err; int idx; + /* detect primary codec */ + chip->nr_ac97_codecs = 0; + snd_printdd("snd_cs46xx: detecting primary codec\n"); memset(&ac97, 0, sizeof(ac97)); ac97.write = snd_cs46xx_ac97_write; ac97.read = snd_cs46xx_ac97_read; ac97.private_data = chip; ac97.private_free = snd_cs46xx_mixer_free_ac97; + chip->ac97[CS46XX_PRIMARY_CODEC_INDEX] = &ac97; + snd_cs46xx_ac97_write(&ac97, AC97_MASTER, 0x8000); for (idx = 0; idx < 100; ++idx) { if (snd_cs46xx_ac97_read(&ac97, AC97_MASTER) == 0x8000) @@ -1303,11 +1602,60 @@ int __devinit snd_cs46xx_mixer(cs46xx_t *chip) set_current_state(TASK_INTERRUPTIBLE); schedule_timeout(HZ/100); } + chip->ac97[CS46XX_PRIMARY_CODEC_INDEX] = NULL; return -ENXIO; _ok: - if ((err = snd_ac97_mixer(card, &ac97, &chip->ac97)) < 0) + if ((err = snd_ac97_mixer(card, &ac97, &chip->ac97[CS46XX_PRIMARY_CODEC_INDEX])) < 0) return err; + snd_printdd("snd_cs46xx: primary codec phase one\n"); + chip->nr_ac97_codecs = 1; + +#ifdef CONFIG_SND_CS46XX_NEW_DSP + snd_printdd("snd_cs46xx: detecting seconadry codec\n"); + /* try detect a secondary codec */ + memset(&ac97, 0, sizeof(ac97)); + ac97.write = snd_cs46xx_ac97_write; + ac97.read = snd_cs46xx_ac97_read; + ac97.private_data = chip; + ac97.private_free = snd_cs46xx_mixer_free_ac97; + ac97.num = CS46XX_SECONDARY_CODEC_INDEX; + + snd_cs46xx_ac97_write(&ac97, AC97_RESET, 0); + udelay(10); + + if (snd_cs46xx_ac97_read(&ac97, AC97_RESET) & 0x8000) { + snd_printdd("snd_cs46xx: seconadry codec not present\n"); + goto _no_sec_codec; + } + + chip->ac97[CS46XX_SECONDARY_CODEC_INDEX] = &ac97; + snd_cs46xx_ac97_write(&ac97, AC97_MASTER, 0x8000); + for (idx = 0; idx < 100; ++idx) { + if (snd_cs46xx_ac97_read(&ac97, AC97_MASTER) == 0x8000) { + goto _ok2; + } + set_current_state(TASK_INTERRUPTIBLE); + schedule_timeout(HZ/100); + } + + _no_sec_codec: + snd_printdd("snd_cs46xx: secondary codec did not respond ...\n"); + + chip->ac97[CS46XX_SECONDARY_CODEC_INDEX] = NULL; + chip->nr_ac97_codecs = 1; + + /* well, one codec only ... */ + goto _end; + _ok2: + if ((err = snd_ac97_mixer(card, &ac97, &chip->ac97[CS46XX_SECONDARY_CODEC_INDEX])) < 0) + return err; + chip->nr_ac97_codecs = 2; + + /* add cs4630 mixer controls */ + _end: +#endif /* CONFIG_SND_CS46XX_NEW_DSP */ + for (idx = 0; idx < sizeof(snd_cs46xx_controls) / sizeof(snd_cs46xx_controls[0]); idx++) { snd_kcontrol_t *kctl; @@ -1652,6 +2000,9 @@ static int __devinit snd_cs46xx_proc_init(snd_card_t * card, cs46xx_t *chip) } region->proc_entry = entry; } +#ifdef CONFIG_SND_CS46XX_NEW_DSP + cs46xx_dsp_proc_init(card, chip); +#endif return 0; } @@ -1666,6 +2017,9 @@ static int snd_cs46xx_proc_done(cs46xx_t *chip) region->proc_entry = NULL; } } +#ifdef CONFIG_SND_CS46XX_NEW_DSP + cs46xx_dsp_proc_done(chip); +#endif return 0; } @@ -1761,6 +2115,9 @@ static int snd_cs46xx_free(cs46xx_t *chip) if (chip->active_ctrl) chip->active_ctrl(chip, -chip->amplifier); +#ifdef CONFIG_SND_CS46XX_NEW_DSP + cs46xx_dsp_spos_destroy(chip->dsp_spos_instance); +#endif snd_magic_kfree(chip); return 0; } @@ -1792,8 +2149,13 @@ static int snd_cs46xx_chip_init(cs46xx_t *chip, int busywait) * If we are in AC97 mode, then we must set the part to a host controlled * AC-link. Otherwise, we won't be able to bring up the link. */ - snd_cs46xx_pokeBA0(chip, BA0_SERACC, SERACC_HSP | SERACC_CHIP_TYPE_1_03); /* 1.03 codec */ - /* snd_cs46xx_pokeBA0(chip, BA0_SERACC, SERACC_HSP | SERACC_CHIP_TYPE_2_0); */ /* 2.00 codec */ +#ifdef CONFIG_SND_CS46XX_NEW_DSP + snd_cs46xx_pokeBA0(chip, BA0_SERACC, SERACC_HSP | SERACC_CHIP_TYPE_2_0 | + SERACC_TWO_CODECS); /* 2.00 dual codecs */ + /* snd_cs46xx_pokeBA0(chip, BA0_SERACC, SERACC_HSP | SERACC_CHIP_TYPE_2_0); */ /* 2.00 codec */ +#else + snd_cs46xx_pokeBA0(chip, BA0_SERACC, SERACC_HSP | SERACC_CHIP_TYPE_1_03); /* 1.03 codec */ +#endif /* * Drive the ARST# pin low for a minimum of 1uS (as defined in the AC97 @@ -1801,23 +2163,32 @@ static int snd_cs46xx_chip_init(cs46xx_t *chip, int busywait) * there might be logic external to the CS461x that uses the ARST# line * for a reset. */ - snd_cs46xx_pokeBA0(chip, BA0_ACCTL, 0); - udelay(50); - snd_cs46xx_pokeBA0(chip, BA0_ACCTL, ACCTL_RSTN); - + snd_cs46xx_pokeBA0(chip, BA0_ACCTL, 0); +#ifdef CONFIG_SND_CS46XX_NEW_DSP + snd_cs46xx_pokeBA0(chip, BA0_ACCTL2, 0); +#endif + udelay(50); + snd_cs46xx_pokeBA0(chip, BA0_ACCTL, ACCTL_RSTN); +#ifdef CONFIG_SND_CS46XX_NEW_DSP + snd_cs46xx_pokeBA0(chip, BA0_ACCTL2, ACCTL_RSTN); +#endif + /* * The first thing we do here is to enable sync generation. As soon * as we start receiving bit clock, we'll start producing the SYNC * signal. */ snd_cs46xx_pokeBA0(chip, BA0_ACCTL, ACCTL_ESYN | ACCTL_RSTN); +#ifdef CONFIG_SND_CS46XX_NEW_DSP + snd_cs46xx_pokeBA0(chip, BA0_ACCTL2, ACCTL_ESYN | ACCTL_RSTN); +#endif /* * Now wait for a short while to allow the AC97 part to start * generating bit clock (so we don't try to start the PLL without an * input clock). */ - mdelay(1); + mdelay(10); /* * Set the serial port timing configuration, so that @@ -1842,7 +2213,7 @@ static int snd_cs46xx_chip_init(cs46xx_t *chip, int busywait) /* * Wait until the PLL has stabilized. */ - mdelay(1); + mdelay(100); /* FIXME: schedule? */ /* * Turn on clocking of the core so that we can setup the serial ports. @@ -1867,6 +2238,16 @@ static int snd_cs46xx_chip_init(cs46xx_t *chip, int busywait) snd_cs46xx_pokeBA0(chip, BA0_SERC2, SERC2_SI1F_AC97 | SERC1_SO1EN); snd_cs46xx_pokeBA0(chip, BA0_SERMC1, SERMC1_PTC_AC97 | SERMC1_MSPE); +#ifdef CONFIG_SND_CS46XX_NEW_DSP + snd_cs46xx_pokeBA0(chip, BA0_SERC7, SERC7_ASDI2EN); + snd_cs46xx_pokeBA0(chip, BA0_SERC3, 0); + snd_cs46xx_pokeBA0(chip, BA0_SERC4, 0); + snd_cs46xx_pokeBA0(chip, BA0_SERC5, 0); + snd_cs46xx_pokeBA0(chip, BA0_SERC6, 1); +#endif + + mdelay(5); + /* * Wait for the codec ready signal from the AC97 codec. */ @@ -1889,14 +2270,35 @@ static int snd_cs46xx_chip_init(cs46xx_t *chip, int busywait) snd_printk("create - never read codec ready from AC'97\n"); snd_printk("it is not probably bug, try to use CS4236 driver\n"); - snd_cs46xx_free(chip); return -EIO; ok1: +#ifdef CONFIG_SND_CS46XX_NEW_DSP + { + int count; + for (count = 0; count < 150; count++) { + /* First, we want to wait for a short time. */ + udelay(25); + + if (snd_cs46xx_peekBA0(chip, BA0_ACSTS2) & ACSTS_CRDY) + break; + } + + /* + * Make sure CODEC is READY. + */ + if (!(snd_cs46xx_peekBA0(chip, BA0_ACSTS2) & ACSTS_CRDY)) + snd_printdd("cs46xx: never read card ready from secondary AC'97\n"); + } +#endif + /* * Assert the vaid frame signal so that we can start sending commands * to the AC97 codec. */ snd_cs46xx_pokeBA0(chip, BA0_ACCTL, ACCTL_VFRM | ACCTL_ESYN | ACCTL_RSTN); +#ifdef CONFIG_SND_CS46XX_NEW_DSP + snd_cs46xx_pokeBA0(chip, BA0_ACCTL2, ACCTL_VFRM | ACCTL_ESYN | ACCTL_RSTN); +#endif /* * Wait until we've sampled input slots 3 and 4 as valid, meaning that @@ -1919,7 +2321,6 @@ static int snd_cs46xx_chip_init(cs46xx_t *chip, int busywait) } snd_printk("create - never read ISV3 & ISV4 from AC'97\n"); - snd_cs46xx_free(chip); return -EIO; ok2: @@ -1927,7 +2328,7 @@ static int snd_cs46xx_chip_init(cs46xx_t *chip, int busywait) * Now, assert valid frame and the slot 3 and 4 valid bits. This will * commense the transfer of digital audio data to the AC97 codec. */ - snd_cs46xx_pokeBA0(chip, BA0_ACOSV, ACOSV_SLV3 | ACOSV_SLV4); + snd_cs46xx_pokeBA0(chip, BA0_ACOSV, ACOSV_SLV3 | ACOSV_SLV4 | ACOSV_SLV7 | ACOSV_SLV8); /* * Power down the DAC and ADC. We will power them up (if) when we need @@ -1950,9 +2351,41 @@ static int snd_cs46xx_chip_init(cs46xx_t *chip, int busywait) /* * Download the image to the processor. */ +#ifdef CONFIG_SND_CS46XX_NEW_DSP +#if 0 + if (cs46xx_dsp_load_module(chip, &cwcemb80_module) < 0) { + snd_printk(KERN_ERR "image download error\n"); + return -EIO; + } +#endif + + if (cs46xx_dsp_load_module(chip, &cwc4630_module) < 0) { + snd_printk(KERN_ERR "image download error [cwc4630]\n"); + return -EIO; + } + + if (cs46xx_dsp_load_module(chip, &cwcasync_module) < 0) { + snd_printk(KERN_ERR "image download error [cwcasync]\n"); + return -EIO; + } + + if (cs46xx_dsp_load_module(chip, &cwcsnoop_module) < 0) { + snd_printk(KERN_ERR "image download error [cwcsnoop]\n"); + return -EIO; + } + + if (cs46xx_dsp_load_module(chip, &cwcbinhack_module) < 0) { + snd_printk(KERN_ERR "image download error [cwcbinhack]\n"); + return -EIO; + } + + if (cs46xx_dsp_scb_and_task_init(chip) < 0) + return -EIO; + snd_printdd("[get here]\n"); +#else + /* old image */ if (snd_cs46xx_download_image(chip) < 0) { snd_printk("image download error\n"); - snd_cs46xx_free(chip); return -EIO; } @@ -1960,8 +2393,9 @@ static int snd_cs46xx_chip_init(cs46xx_t *chip, int busywait) * Stop playback DMA. */ tmp = snd_cs46xx_peek(chip, BA1_PCTL); - chip->play.ctl = tmp & 0xffff0000; + chip->play_ctl = tmp & 0xffff0000; snd_cs46xx_poke(chip, BA1_PCTL, tmp & 0x0000ffff); +#endif /* * Stop capture DMA. @@ -1970,6 +2404,8 @@ static int snd_cs46xx_chip_init(cs46xx_t *chip, int busywait) chip->capt.ctl = tmp & 0x0000ffff; snd_cs46xx_poke(chip, BA1_CCTL, tmp & 0xffff0000); + mdelay(5); + snd_cs46xx_set_play_sample_rate(chip, 8000); snd_cs46xx_set_capture_sample_rate(chip, 8000); @@ -1993,6 +2429,12 @@ static int snd_cs46xx_chip_init(cs46xx_t *chip, int busywait) snd_cs46xx_poke(chip, BA1_PVOL, 0x80008000); snd_cs46xx_poke(chip, BA1_CVOL, 0x80008000); +#ifdef CONFIG_SND_CS46XX_NEW_DSP + /* mute spdif out */ + cs46xx_dsp_disable_spdif_out(chip); + cs46xx_dsp_disable_spdif_in(chip); +#endif + return 0; } @@ -2018,7 +2460,8 @@ static void amp_voyetra(cs46xx_t *chip, int change) int oval, val; chip->amplifier += change; - oval = snd_cs46xx_codec_read(chip, AC97_POWERDOWN); + oval = snd_cs46xx_codec_read(chip, AC97_POWERDOWN, + CS46XX_PRIMARY_CODEC_INDEX); val = oval; if (chip->amplifier && !old) { /* Turn the EAPD amp on */ @@ -2028,7 +2471,8 @@ static void amp_voyetra(cs46xx_t *chip, int change) val &= ~0x8000; } if (val != oval) { - snd_cs46xx_codec_write(chip, AC97_POWERDOWN, val); + snd_cs46xx_codec_write(chip, AC97_POWERDOWN, val, + CS46XX_PRIMARY_CODEC_INDEX); if (chip->eapd_switch) snd_ctl_notify(chip->card, SNDRV_CTL_EVENT_MASK_VALUE, &chip->eapd_switch->id); @@ -2222,7 +2666,7 @@ void snd_cs46xx_resume(cs46xx_t *chip) mdelay(5); #endif - snd_ac97_resume(chip->ac97); + snd_ac97_resume(chip->ac97[CS46XX_PRIMARY_CODEC_INDEX]); if (amp_saved) chip->amplifier_ctrl(chip, 1); /* try to turn on */ @@ -2286,7 +2730,6 @@ int __devinit snd_cs46xx_create(snd_card_t * card, spin_lock_init(&chip->reg_lock); chip->card = card; chip->pci = pci; - chip->play.hw_size = PAGE_SIZE; chip->capt.hw_size = PAGE_SIZE; chip->irq = -1; chip->ba0_addr = pci_resource_start(pci, 0); @@ -2379,6 +2822,14 @@ int __devinit snd_cs46xx_create(snd_card_t * card, } chip->irq = pci->irq; +#ifdef CONFIG_SND_CS46XX_NEW_DSP + chip->dsp_spos_instance = cs46xx_dsp_spos_create(chip); + if (chip->dsp_spos_instance == NULL) { + snd_cs46xx_free(chip); + return -ENOMEM; + } +#endif + err = snd_cs46xx_chip_init(chip, 0); if (err < 0) { snd_cs46xx_free(chip); diff --git a/sound/pci/cs46xx/cs46xx_lib.h b/sound/pci/cs46xx/cs46xx_lib.h new file mode 100644 index 0000000000000000000000000000000000000000..6c1a0a8effb965349bdaa7513c1092c77e4edeca --- /dev/null +++ b/sound/pci/cs46xx/cs46xx_lib.h @@ -0,0 +1,191 @@ +/* + * The driver for the Cirrus Logic's Sound Fusion CS46XX based soundcards + * Copyright (c) by Jaroslav Kysela <perex@suse.cz> + * + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +#ifndef __CS46XX_LIB_H__ +#define __CS46XX_LIB_H__ + +#define chip_t cs46xx_t + +/* + * constants + */ + +#define CS46XX_BA0_SIZE 0x1000 +#define CS46XX_BA1_DATA0_SIZE 0x3000 +#define CS46XX_BA1_DATA1_SIZE 0x3800 +#define CS46XX_BA1_PRG_SIZE 0x7000 +#define CS46XX_BA1_REG_SIZE 0x0100 + + +#define CS46XX_PERIOD_SIZE 2048 +#define CS46XX_FRAGS 2 +#define CS46XX_BUFFER_SIZE CS46XX_PERIOD_SIZE * CS46XX_FRAGS + +#define SCB_NO_PARENT 0 +#define SCB_ON_PARENT_NEXT_SCB 1 +#define SCB_ON_PARENT_SUBLIST_SCB 2 + +/* 3*1024 parameter, 3.5*1024 sample, 2*3.5*1024 code */ +#define BA1_DWORD_SIZE (13 * 1024 + 512) +#define BA1_MEMORY_COUNT 3 + +extern snd_pcm_ops_t snd_cs46xx_playback_ops; +extern snd_pcm_ops_t snd_cs46xx_playback_indirect_ops; +extern snd_pcm_ops_t snd_cs46xx_capture_ops; +extern snd_pcm_ops_t snd_cs46xx_capture_indirect_ops; + + +/* + * common I/O routines + */ + +static inline void snd_cs46xx_poke(cs46xx_t *chip, unsigned long reg, unsigned int val) +{ + unsigned int bank = reg >> 16; + unsigned int offset = reg & 0xffff; + + /*if (bank == 0) printk("snd_cs46xx_poke: %04X - %08X\n",reg >> 2,val); */ + writel(val, chip->region.idx[bank+1].remap_addr + offset); +} + +static inline unsigned int snd_cs46xx_peek(cs46xx_t *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) +{ + writel(val, chip->region.name.ba0.remap_addr + offset); +} + +static inline unsigned int snd_cs46xx_peekBA0(cs46xx_t *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 (dsp_spos_instance_t * instance); +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); +symbol_entry_t * cs46xx_dsp_lookup_symbol_addr (cs46xx_t * chip,u32 address,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 cs46xx_dsp_async_init (cs46xx_t *chip,dsp_scb_descriptor_t * fg_entry); +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_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_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_task_descriptor_t * cs46xx_dsp_create_task_tree (cs46xx_t *chip,char * name, + u32 * task_data,u32 dest,int size); +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_generic_scb (cs46xx_t *chip,char * name, + u32 * scb_data,u32 dest, + char * task_entry_name, + 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); +dsp_scb_descriptor_t * cs46xx_dsp_create_pcm_reader_scb(cs46xx_t * chip,char * scb_name, + u16 sample_buffer_addr,u32 dest, + int virtual_channel,u32 playback_hw_addr, + 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, + u16 src_buffer_addr, + u16 src_delay_buffer_addr,u32 dest, + dsp_scb_descriptor_t * parent_scb, + int scb_child_type); +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); + +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_pcm_serial_input_scb(cs46xx_t * chip,char * scb_name,u32 dest, + dsp_scb_descriptor_t * input_scb, + dsp_scb_descriptor_t * parent_scb, + int scb_child_type); +dsp_scb_descriptor_t * cs46xx_dsp_create_asynch_fg_tx_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_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_output_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); +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); +void cs46xx_dsp_destroy_pcm_channel (cs46xx_t * chip, + pcm_channel_descriptor_t * pcm_channel); +void cs46xx_dsp_set_src_sample_rate(cs46xx_t * chip,dsp_scb_descriptor_t * src, + u32 rate); +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); +#endif /* __CS46XX_LIB_H__ */ diff --git a/sound/pci/cs46xx/dsp_spos.c b/sound/pci/cs46xx/dsp_spos.c new file mode 100644 index 0000000000000000000000000000000000000000..0668779ea53f4d9fdce7b2785862d16ff7a9671f --- /dev/null +++ b/sound/pci/cs46xx/dsp_spos.c @@ -0,0 +1,1740 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* + * 2002-07 Benny Sjostrand benny@hostmobility.com + */ + + +#define __NO_VERSION__ +#include <sound/driver.h> +#include <asm/io.h> +#include <linux/delay.h> +#include <linux/pci.h> +#include <linux/pm.h> +#include <linux/init.h> +#include <linux/slab.h> +#include <sound/core.h> +#include <sound/control.h> +#include <sound/info.h> +#include <sound/cs46xx.h> + +#include "cs46xx_lib.h" +#include "dsp_spos.h" + +#if 0 +/* OBSOLETE NOW */ + +static void handle_goto (cs46xx_t * chip,u32 * hival,u32 * loval,char * format, u32 overlay_begin_address); + +typedef struct _dsp_opcode_desc_t { + u32 hival,loval; + u32 himask,lomask; + void (*handler_func)(cs46xx_t * chip,u32 * hival,u32 * loval,char * format, u32 overlay_begin_address); + char * format; +} dsp_opcode_desc_t; + +/* NOTE: theese opcodes are known needed to be reallocated, + there may be more. */ +dsp_opcode_desc_t dsp_opcodes[] = { + { 0x01000,0x02730, 0xFF000,0x07FFF,handle_goto,"goto %s" }, + { 0x01000,0x00730, 0xFF000,0x07FFF,handle_goto,"goto %s after" }, + { 0x01000,0x02630, 0xFF000,0x07FFF,handle_goto,"if (tb) goto %s" }, + { 0x01000,0x00630, 0xFF000,0x07FFF,handle_goto,"if (tb) goto %s after" }, + { 0x01000,0x00530, 0xFF000,0x07FFF,handle_goto,"if (lt) goto %s after" }, + { 0x01000,0x02530, 0xFF000,0x07FFF,handle_goto,"if (lt) goto %s" }, + { 0x01000,0x006B0, 0xFF000,0x07FFF,handle_goto,"if (!tb) goto %s after" }, + { 0x01000,0x026B0, 0xFF000,0x07FFF,handle_goto,"if (!tb) goto %s" }, + { 0x01000,0x00FB0, 0xFF000,0x07FFF,handle_goto,"if (gt) goto %s after" }, + { 0x01000,0x02FB0, 0xFF000,0x07FFF,handle_goto,"if (gt) goto %s" }, + { 0x01000,0x02734, 0xFF000,0x07FFF,NULL,"goto *ind" }, + { 0x01000,0x00734, 0xFF000,0x07FFF,NULL,"goto *ind after" }, + { 0x01000,0x02130, 0xFF000,0x07FFF,handle_goto,"if (N) goto %s" }, + { 0x01000,0x00130, 0xFF000,0x07FFF,handle_goto,"if (N) goto %s after" }, + { 0x01000,0x020F2, 0xFF000,0x07FFF,handle_goto,"tb = Z, if(!Z) goto %s" }, + { 0x01000,0x000F2, 0xFF000,0x07FFF,handle_goto,"tb = Z, if(!Z) goto %s after" }, + { 0x01000,0x04030, 0xFF000,0x07FFF,handle_goto,"if(Z) goto %s" }, + { 0x01000,0x00030, 0xFF000,0x07FFF,handle_goto,"if(Z) goto %s after" }, + { 0x01000,0x020B0, 0xFF000,0x07FFF,handle_goto,"if(!Z) goto %s" }, + { 0x01000,0x000B0, 0xFF000,0x07FFF,handle_goto,"if(!Z) goto %s after" }, + { 0x01000,0x02731, 0xFF000,0x07FFF,handle_goto,"%s();" }, +}; + +static void handle_goto (cs46xx_t * chip,u32 * hival,u32 * loval, + char * format, u32 overlay_begin_address) +{ + u32 address ; + dsp_spos_instance_t * ins = chip->dsp_spos_instance; + + address = (*hival & 0x00FFF) << 5; + address |= *loval >> 15; + + snd_printdd("handle_goto[1]: %05x:%05x addr %04x\n",*hival,*loval,address); + + if ( !(address & 0x8000) ) { + address += (ins->code.offset / 2) - overlay_begin_address; + } else { + snd_printdd("handle_goto[1]: ROM symbol not reallocated\n"); + } + + *hival &= 0xFF000; + *loval &= 0x07FFF; + + *hival |= ( (address >> 5) & 0x00FFF); + *loval |= ( (address << 15) & 0xF8000); + + address = (*hival & 0x00FFF) << 5; + address |= *loval >> 15; + + snd_printdd("handle_goto:[2] %05x:%05x addr %04x\n",*hival,*loval,address); +} +#endif /* #if 0 */ + +static wide_opcode_t wide_opcodes[] = { + WIDE_FOR_BEGIN_LOOP, + WIDE_FOR_BEGIN_LOOP2, + WIDE_COND_GOTO_ADDR, + WIDE_COND_GOTO_CALL, + WIDE_TBEQ_COND_GOTO_ADDR, + WIDE_TBEQ_COND_CALL_ADDR, + WIDE_TBEQ_NCOND_GOTO_ADDR, + WIDE_TBEQ_NCOND_CALL_ADDR, + WIDE_TBEQ_COND_GOTO1_ADDR, + WIDE_TBEQ_COND_CALL1_ADDR, + WIDE_TBEQ_NCOND_GOTOI_ADDR, + WIDE_TBEQ_NCOND_CALL1_ADDR +}; + +static int shadow_and_reallocate_code (cs46xx_t * chip,u32 * data,u32 size, u32 overlay_begin_address) +{ + 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; + + snd_assert( ((size % 2) == 0), return -EINVAL); + + while (i < size) { + loval = data[i++]; + hival = data[i++]; + + if (ins->code.offset > 0) { +#if 0 + /* OBSOLETE NOW */ + for (j = 0;j < sizeof(dsp_opcodes) / sizeof(dsp_opcode_desc_t); ++j) { + if ( (hival & dsp_opcodes[j].himask) == dsp_opcodes[j].hival && + (loval & dsp_opcodes[j].lomask) == dsp_opcodes[j].loval && + dsp_opcodes[j].handler_func != NULL) { + dsp_opcodes[j].handler_func (chip,&hival,&loval,dsp_opcodes[j].format, overlay_begin_address); + nreallocated ++; + } + } +#endif + + mop_operands = (hival >> 6) & 0x03fff; + mop_type = mop_operands >> 10; + + /* check for wide type instruction */ + if (mop_type == 0 && + (mop_operands & WIDE_LADD_INSTR_MASK) == 0 && + (mop_operands & WIDE_INSTR_MASK) != 0) { + wide_op = loval & 0x7f; + for (j = 0;j < sizeof(wide_opcodes) / sizeof(wide_opcode_t); ++j) { + if (wide_opcodes[j] == wide_op) { + /* need to reallocate instruction */ + address = (hival & 0x00FFF) << 5; + address |= loval >> 15; + + snd_printdd("handle_wideop[1]: %05x:%05x addr %04x\n",hival,loval,address); + + if ( !(address & 0x8000) ) { + address += (ins->code.offset / 2) - overlay_begin_address; + } else { + snd_printdd("handle_wideop[1]: ROM symbol not reallocated\n"); + } + + hival &= 0xFF000; + loval &= 0x07FFF; + + hival |= ( (address >> 5) & 0x00FFF); + loval |= ( (address << 15) & 0xF8000); + + address = (hival & 0x00FFF) << 5; + address |= loval >> 15; + + snd_printdd("handle_wideop:[2] %05x:%05x addr %04x\n",hival,loval,address); + nreallocated ++; + } /* wide_opcodes[j] == wide_op */ + } /* for */ + } /* mod_type == 0 ... */ + } /* ins->code.offset > 0 */ + + ins->code.data[ins->code.size++] = loval; + ins->code.data[ins->code.size++] = hival; + } + + snd_printdd("dsp_spos: %d instructions reallocated\n",nreallocated); + return nreallocated; +} + +static segment_desc_t * get_segment_desc (dsp_module_desc_t * module, int seg_type) +{ + int i; + for (i = 0;i < module->nsegments; ++i) { + if (module->segments[i].segment_type == seg_type) { + return (module->segments + i); + } + } + + return NULL; +}; + +static int find_free_symbol_index (dsp_spos_instance_t * ins) +{ + int index = ins->symbol_table.nsymbols,i; + + for (i = ins->symbol_table.highest_frag_index; i < ins->symbol_table.nsymbols; ++i) { + if (ins->symbol_table.symbols[i].deleted) { + index = i; + break; + } + } + + return index; +} + +static int add_symbols (cs46xx_t * chip, dsp_module_desc_t * module) +{ + int i; + dsp_spos_instance_t * ins = chip->dsp_spos_instance; + + if (module->symbol_table.nsymbols > 0) { + if (!strcmp(module->symbol_table.symbols[0].symbol_name, "OVERLAYBEGINADDRESS") && + module->symbol_table.symbols[0].symbol_type == SYMBOL_CONSTANT ) { + module->overlay_begin_address = module->symbol_table.symbols[0].address; + } + } + + for (i = 0;i < module->symbol_table.nsymbols; ++i) { + if (ins->symbol_table.nsymbols == (DSP_MAX_SYMBOLS - 1)) { + snd_printk(KERN_ERR "dsp_spos: symbol table is full\n"); + return -ENOMEM; + } + + + if (cs46xx_dsp_lookup_symbol(chip, + module->symbol_table.symbols[i].symbol_name, + module->symbol_table.symbols[i].symbol_type) == NULL) { + + ins->symbol_table.symbols[ins->symbol_table.nsymbols] = module->symbol_table.symbols[i]; + ins->symbol_table.symbols[ins->symbol_table.nsymbols].address += ((ins->code.offset / 2) - module->overlay_begin_address); + ins->symbol_table.symbols[ins->symbol_table.nsymbols].module = module; + ins->symbol_table.symbols[ins->symbol_table.nsymbols].deleted = 0; + + if (ins->symbol_table.nsymbols > ins->symbol_table.highest_frag_index) + ins->symbol_table.highest_frag_index = ins->symbol_table.nsymbols; + + ins->symbol_table.nsymbols++; + } else { + // if (0) printk ("dsp_spos: symbol <%s> duplicated, probably nothing wrong with that (Cirrus?)\n", + // module->symbol_table.symbols[i].symbol_name); + } + } + + return 0; +} + +static symbol_entry_t * add_symbol (cs46xx_t * chip, char * symbol_name, u32 address, int type) +{ + dsp_spos_instance_t * ins = chip->dsp_spos_instance; + symbol_entry_t * symbol = NULL; + int index; + + if (ins->symbol_table.nsymbols == (DSP_MAX_SYMBOLS - 1)) { + snd_printk(KERN_ERR "dsp_spos: symbol table is full\n"); + return NULL; + } + + if (cs46xx_dsp_lookup_symbol(chip, + symbol_name, + type) != NULL) { + snd_printk(KERN_ERR "dsp_spos: symbol <%s> duplicated\n", symbol_name); + return NULL; + } + + index = find_free_symbol_index (ins); + + strcpy (ins->symbol_table.symbols[index].symbol_name, symbol_name); + ins->symbol_table.symbols[index].address = address; + ins->symbol_table.symbols[index].symbol_type = type; + ins->symbol_table.symbols[index].module = NULL; + ins->symbol_table.symbols[index].deleted = 0; + symbol = (ins->symbol_table.symbols + index); + + if (index > ins->symbol_table.highest_frag_index) + ins->symbol_table.highest_frag_index = index; + + if (index == ins->symbol_table.nsymbols) + ins->symbol_table.nsymbols++; /* no frag. in list */ + + return symbol; +} + +dsp_spos_instance_t * cs46xx_dsp_spos_create (cs46xx_t * chip) +{ + dsp_spos_instance_t * ins = kmalloc(sizeof(dsp_spos_instance_t), GFP_KERNEL); + + if (ins == NULL) + return NULL; + memset(ins, 0, sizeof(*ins)); + + init_MUTEX(&ins->scb_mutex); + init_MUTEX(&ins->pcm_mutex); + + /* 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.highest_frag_index = 0; + + if (ins->symbol_table.symbols == NULL) { + cs46xx_dsp_spos_destroy(ins); + return NULL; + } + + ins->code.offset = 0; + ins->code.size = 0; + ins->code.data = kmalloc(DSP_CODE_BYTE_SIZE, GFP_KERNEL); + + if (ins->code.data == NULL) { + cs46xx_dsp_spos_destroy(ins); + return NULL; + } + + ins->nscb = 0; + ins->ntask = 0; + + ins->nmodules = 0; + ins->modules = kmalloc(sizeof(dsp_module_desc_t) * DSP_MAX_MODULES, GFP_KERNEL); + + if (ins->modules == NULL) { + cs46xx_dsp_spos_destroy(ins); + return NULL; + } + + return ins; +} + +void cs46xx_dsp_spos_destroy (dsp_spos_instance_t * ins) +{ + int i; + + snd_assert(ins != NULL, return); + + down(&ins->scb_mutex); + for (i = 0; i < ins->nscb; ++i) { + if (ins->scbs[i].deleted) continue; + + cs46xx_dsp_proc_free_scb_desc ( (ins->scbs + i) ); + } + up(&ins->scb_mutex); + + if (ins->code.data) + kfree(ins->code.data); + if (ins->symbol_table.symbols) + vfree(ins->symbol_table.symbols); + if (ins->modules) + kfree(ins->modules); + kfree(ins); +} + +int cs46xx_dsp_load_module (cs46xx_t * chip, dsp_module_desc_t * 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); + u32 doffset, dsize; + + if (ins->nmodules == DSP_MAX_MODULES - 1) { + snd_printk(KERN_ERR "dsp_spos: to many modules loaded into DSP\n"); + return -ENOMEM; + } + + snd_printdd("dsp_spos: loading module %s into DSP\n", module->module_name); + + if (ins->nmodules == 0) { + snd_printdd("dsp_spos: clearing parameter area\n"); + snd_cs46xx_clear_BA1(chip, DSP_PARAMETER_BYTE_OFFSET, DSP_PARAMETER_BYTE_SIZE); + } + + if (parameter == NULL) { + snd_printdd("dsp_spos: module got no parameter segment\n"); + } else { + if (ins->nmodules > 0) { + snd_printk(KERN_WARNING "dsp_spos: WARNING current parameter data may be overwriten!\n"); + } + + doffset = (parameter->offset * 4 + DSP_PARAMETER_BYTE_OFFSET); + dsize = parameter->size * 4; + + snd_printdd("dsp_spos: downloading parameter data to chip (%08x-%08x)\n", + doffset,doffset + dsize); + + if (snd_cs46xx_download (chip, parameter->data, doffset, dsize)) { + snd_printk(KERN_ERR "dsp_spos: failed to download parameter data to DSP\n"); + return -EINVAL; + } + } + + if (ins->nmodules == 0) { + snd_printdd("dsp_spos: clearing sample area\n"); + snd_cs46xx_clear_BA1(chip, DSP_SAMPLE_BYTE_OFFSET, DSP_SAMPLE_BYTE_SIZE); + } + + if (sample == NULL) { + snd_printdd("dsp_spos: module got no sample segment\n"); + } else { + if (ins->nmodules > 0) { + snd_printk(KERN_WARNING "dsp_spos: WARNING current sample data may be overwriten\n"); + } + + doffset = (sample->offset * 4 + DSP_SAMPLE_BYTE_OFFSET); + dsize = sample->size * 4; + + snd_printdd("dsp_spos: downloading sample data to chip (%08x-%08x)\n", + doffset,doffset + dsize); + + if (snd_cs46xx_download (chip,sample->data,doffset,dsize)) { + snd_printk(KERN_ERR "dsp_spos: failed to sample data to DSP\n"); + return -EINVAL; + } + } + + + if (ins->nmodules == 0) { + snd_printdd("dsp_spos: clearing code area\n"); + snd_cs46xx_clear_BA1(chip, DSP_CODE_BYTE_OFFSET, DSP_CODE_BYTE_SIZE); + } + + if (code == NULL) { + snd_printdd("dsp_spos: module got no code segment\n"); + } else { + if (ins->code.offset + code->size > DSP_CODE_BYTE_SIZE) { + snd_printk(KERN_ERR "dsp_spos: no space available in DSP\n"); + return -ENOMEM; + } + + module->load_address = ins->code.offset; + module->overlay_begin_address = 0x000; + + /* if module has a code segment it must have + symbol table */ + snd_assert(module->symbol_table.symbols != NULL ,return -ENOMEM); + if (add_symbols(chip,module)) { + snd_printk(KERN_ERR "dsp_spos: failed to load symbol table\n"); + return -ENOMEM; + } + + doffset = (code->offset * 4 + ins->code.offset * 4 + DSP_CODE_BYTE_OFFSET); + dsize = code->size * 4; + snd_printdd("dsp_spos: downloading code to chip (%08x-%08x)\n", + doffset,doffset + dsize); + + module->nfixups = shadow_and_reallocate_code(chip,code->data,code->size,module->overlay_begin_address); + + if (snd_cs46xx_download (chip,(ins->code.data + ins->code.offset),doffset,dsize)) { + snd_printk(KERN_ERR "dsp_spos: failed to download code to DSP\n"); + return -EINVAL; + } + + ins->code.offset += code->size; + } + + /* NOTE: module segments and symbol table must be + statically allocated. Case that module data is + not generated by the ospparser */ + ins->modules[ins->nmodules] = *module; + ins->nmodules++; + + return 0; +} + +symbol_entry_t * cs46xx_dsp_lookup_symbol (cs46xx_t * chip, char * symbol_name, int symbol_type) +{ + int i; + dsp_spos_instance_t * ins = chip->dsp_spos_instance; + + for ( i = 0; i < ins->symbol_table.nsymbols; ++i ) { + + if (ins->symbol_table.symbols[i].deleted) + continue; + + if (!strcmp(ins->symbol_table.symbols[i].symbol_name,symbol_name) && + ins->symbol_table.symbols[i].symbol_type == symbol_type) { + return (ins->symbol_table.symbols + i); + } + } + +#if 0 + printk ("dsp_spos: symbol <%s> type %02x not found\n", + symbol_name,symbol_type); +#endif + + return NULL; +} + + +symbol_entry_t * cs46xx_dsp_lookup_symbol_addr (cs46xx_t * chip, u32 address, int symbol_type) +{ + int i; + dsp_spos_instance_t * ins = chip->dsp_spos_instance; + + for ( i = 0; i < ins->symbol_table.nsymbols; ++i ) { + + if (ins->symbol_table.symbols[i].deleted) + continue; + + if (ins->symbol_table.symbols[i].address == address && + ins->symbol_table.symbols[i].symbol_type == symbol_type) { + return (ins->symbol_table.symbols + i); + } + } + + + return NULL; +} + + +static void cs46xx_dsp_proc_symbol_table_read (snd_info_entry_t *entry, snd_info_buffer_t * buffer) +{ + cs46xx_t *chip = snd_magic_cast(cs46xx_t, entry->private_data, return); + dsp_spos_instance_t * ins = chip->dsp_spos_instance; + int i; + + snd_iprintf(buffer, "SYMBOLS:\n"); + for ( i = 0; i < ins->symbol_table.nsymbols; ++i ) { + char *module_str = "system"; + + if (ins->symbol_table.symbols[i].deleted) + continue; + + if (ins->symbol_table.symbols[i].module != NULL) { + module_str = ins->symbol_table.symbols[i].module->module_name; + } + + + snd_iprintf(buffer, "%04X <%02X> %s [%s]\n", + ins->symbol_table.symbols[i].address, + ins->symbol_table.symbols[i].symbol_type, + ins->symbol_table.symbols[i].symbol_name, + module_str); + } +} + + +static void cs46xx_dsp_proc_modules_read (snd_info_entry_t *entry, snd_info_buffer_t * buffer) +{ + cs46xx_t *chip = snd_magic_cast(cs46xx_t, entry->private_data, return); + dsp_spos_instance_t * ins = chip->dsp_spos_instance; + int i,j; + + snd_iprintf(buffer, "MODULES:\n"); + for ( i = 0; i < ins->nmodules; ++i ) { + snd_iprintf(buffer, "\n%s:\n", ins->modules[i].module_name); + snd_iprintf(buffer, " %d symbols\n", ins->modules[i].symbol_table.nsymbols); + 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); + snd_iprintf(buffer, " segment %02x offset %08x size %08x\n", + desc->segment_type,desc->offset, desc->size); + } + } +} + +static void cs46xx_dsp_proc_task_tree_read (snd_info_entry_t *entry, snd_info_buffer_t * buffer) +{ + cs46xx_t *chip = snd_magic_cast(cs46xx_t, entry->private_data, return); + dsp_spos_instance_t * ins = chip->dsp_spos_instance; + int i,j,col; + unsigned long dst = chip->region.idx[1].remap_addr + DSP_PARAMETER_BYTE_OFFSET; + + snd_iprintf(buffer, "TASK TREES:\n"); + for ( i = 0; i < ins->ntask; ++i) { + snd_iprintf(buffer,"\n%04x %s:\n",ins->tasks[i].address,ins->tasks[i].task_name); + + for (col = 0,j = 0;j < ins->tasks[i].size; j++,col++) { + u32 val; + if (col == 4) { + snd_iprintf(buffer,"\n"); + col = 0; + } + val = readl(dst + (ins->tasks[i].address + j) * sizeof(u32)); + snd_iprintf(buffer,"%08x ",val); + } + } + + snd_iprintf(buffer,"\n"); +} + +static void cs46xx_dsp_proc_scb_read (snd_info_entry_t *entry, snd_info_buffer_t * buffer) +{ + cs46xx_t *chip = snd_magic_cast(cs46xx_t, entry->private_data, return); + dsp_spos_instance_t * ins = chip->dsp_spos_instance; + int i; + + snd_iprintf(buffer, "SCB's:\n"); + for ( i = 0; i < ins->nscb; ++i) { + if (ins->scbs[i].deleted) + continue; + snd_iprintf(buffer,"\n%04x %s:\n\n",ins->scbs[i].address,ins->scbs[i].scb_name); + + if (ins->scbs[i].parent_scb_ptr != NULL) { + snd_iprintf(buffer,"parent [%s:%04x] ", + ins->scbs[i].parent_scb_ptr->scb_name, + ins->scbs[i].parent_scb_ptr->address); + } else snd_iprintf(buffer,"parent [none] "); + + snd_iprintf(buffer,"sub_list_ptr [%s:%04x]\nnext_scb_ptr [%s:%04x] task_entry [%s:%04x]\n", + ins->scbs[i].sub_list_ptr->scb_name, + ins->scbs[i].sub_list_ptr->address, + ins->scbs[i].next_scb_ptr->scb_name, + ins->scbs[i].next_scb_ptr->address, + ins->scbs[i].task_entry->symbol_name, + ins->scbs[i].task_entry->address); + } + + snd_iprintf(buffer,"\n"); +} + +static void cs46xx_dsp_proc_parameter_dump_read (snd_info_entry_t *entry, snd_info_buffer_t * buffer) +{ + cs46xx_t *chip = snd_magic_cast(cs46xx_t, entry->private_data, return); + /*dsp_spos_instance_t * ins = chip->dsp_spos_instance; */ + int i,col = 0; + unsigned long dst = chip->region.idx[1].remap_addr + DSP_PARAMETER_BYTE_OFFSET; + symbol_entry_t * symbol; + + for (i = 0;i < DSP_PARAMETER_BYTE_SIZE; i += sizeof(u32),col ++) { + if (col == 4) { + snd_iprintf(buffer,"\n"); + col = 0; + } + + if ( (symbol = cs46xx_dsp_lookup_symbol_addr (chip,i / sizeof(u32), SYMBOL_PARAMETER)) != NULL) { + col = 0; + snd_iprintf (buffer,"\n%s:\n",symbol->symbol_name); + } + + if (col == 0) { + snd_iprintf(buffer, "%04X ",i / sizeof(u32)); + } + + snd_iprintf(buffer,"%08X ",readl(dst + i)); + } +} + +static void cs46xx_dsp_proc_sample_dump_read (snd_info_entry_t *entry, snd_info_buffer_t * buffer) +{ + cs46xx_t *chip = snd_magic_cast(cs46xx_t, entry->private_data, return); + /*dsp_spos_instance_t * ins = chip->dsp_spos_instance; */ + int i,col = 0; + unsigned long dst = chip->region.idx[2].remap_addr; + + snd_iprintf(buffer,"PCMREADER:\n"); + for (i = PCM_READER_BUF1;i < PCM_READER_BUF1 + 0x30; i += sizeof(u32),col ++) { + if (col == 4) { + snd_iprintf(buffer,"\n"); + col = 0; + } + + if (col == 0) { + snd_iprintf(buffer, "%04X ",i); + } + + snd_iprintf(buffer,"%08X ",readl(dst + i)); + } + + snd_iprintf(buffer,"\nMIX_SAMPLE_BUF1:\n"); + + col = 0; + for (i = MIX_SAMPLE_BUF1;i < MIX_SAMPLE_BUF1 + 0x30; i += sizeof(u32),col ++) { + if (col == 4) { + snd_iprintf(buffer,"\n"); + col = 0; + } + + if (col == 0) { + snd_iprintf(buffer, "%04X ",i); + } + + snd_iprintf(buffer,"%08X ",readl(dst + i)); + } + + snd_iprintf(buffer,"\n\n"); + col = 0; + for (i = SPDIFO_IP_OUTPUT_BUFFER1 - 0x80;i < SPDIFO_IP_OUTPUT_BUFFER1; i += sizeof(u32),col ++) { + if (col == 4) { + snd_iprintf(buffer,"\n"); + col = 0; + } + + if (col == 0) { + snd_iprintf(buffer, "%04X ",i); + } + + snd_iprintf(buffer,"%08X ",readl(dst + i)); + } + + + snd_iprintf(buffer,"\nSPDIFO_BUFFER:\n"); + col = 0; + for (i = SPDIFO_IP_OUTPUT_BUFFER1;i < SPDIFO_IP_OUTPUT_BUFFER1 + 0x40; i += sizeof(u32),col ++) { + if (col == 4) { + snd_iprintf(buffer,"\n"); + col = 0; + } + + if (col == 0) { + snd_iprintf(buffer, "%04X ",i); + } + + snd_iprintf(buffer,"%08X ",readl(dst + i)); + } + + snd_iprintf(buffer,"\n...\n"); + col = 0; + + for (i = SPDIFO_IP_OUTPUT_BUFFER1+0xD0;i < SPDIFO_IP_OUTPUT_BUFFER1 + 0x110; i += sizeof(u32),col ++) { + if (col == 4) { + snd_iprintf(buffer,"\n"); + col = 0; + } + + if (col == 0) { + snd_iprintf(buffer, "%04X ",i); + } + + snd_iprintf(buffer,"%08X ",readl(dst + i)); + } + + + snd_iprintf(buffer,"\nOUTPUT_SNOOP:\n"); + col = 0; + for (i = 0x1200;i < 0x1240; i += sizeof(u32),col ++) { + if (col == 4) { + snd_iprintf(buffer,"\n"); + col = 0; + } + + if (col == 0) { + snd_iprintf(buffer, "%04X ",i); + } + + snd_iprintf(buffer,"%08X ",readl(dst + i)); + } + + snd_iprintf(buffer,"\n...\n"); + col = 0; + for (i = 0x12D0;i < 0x1310; i += sizeof(u32),col ++) { + if (col == 4) { + snd_iprintf(buffer,"\n"); + col = 0; + } + + if (col == 0) { + snd_iprintf(buffer, "%04X ",i); + } + + snd_iprintf(buffer,"%08X ",readl(dst + i)); + } + + snd_iprintf(buffer,"\n"); +} + +#if 0 +static void snd_ac97_proc_regs_read_main(ac97_t *ac97, snd_info_buffer_t * buffer, int subidx) +{ + int reg, val; + + for (reg = 0; reg < 0x80; reg += 2) { + val = snd_ac97_read(ac97, reg); + snd_iprintf(buffer, "%i:%02x = %04x\n", subidx, reg, val); + } +} +#endif + +int cs46xx_dsp_proc_init (snd_card_t * card, cs46xx_t *chip) +{ + snd_info_entry_t *entry; + dsp_spos_instance_t * ins = chip->dsp_spos_instance; + int i; + + ins->snd_card = card; + + if ((entry = snd_info_create_card_entry(card, "dsp", card->proc_root)) != NULL) { + entry->content = SNDRV_INFO_CONTENT_TEXT; + entry->mode = S_IFDIR | S_IRUGO | S_IXUGO; + entry->c.text.read_size = 512; + + if (snd_info_register(entry) < 0) { + snd_info_free_entry(entry); + entry = NULL; + } + } + + ins->proc_dsp_dir = entry; + + if (!ins->proc_dsp_dir) + return -ENOMEM; + + if ((entry = snd_info_create_card_entry(card, "spos_symbols", ins->proc_dsp_dir)) != NULL) { + entry->content = SNDRV_INFO_CONTENT_TEXT; + entry->private_data = chip; + entry->mode = S_IFREG | S_IRUGO | S_IWUSR; + entry->c.text.read_size = 512; + entry->c.text.read = cs46xx_dsp_proc_symbol_table_read; + if (snd_info_register(entry) < 0) { + snd_info_free_entry(entry); + entry = NULL; + } + } + ins->proc_sym_info_entry = entry; + + if ((entry = snd_info_create_card_entry(card, "spos_modules", ins->proc_dsp_dir)) != NULL) { + entry->content = SNDRV_INFO_CONTENT_TEXT; + entry->private_data = chip; + entry->mode = S_IFREG | S_IRUGO | S_IWUSR; + entry->c.text.read_size = 512; + entry->c.text.read = cs46xx_dsp_proc_modules_read; + if (snd_info_register(entry) < 0) { + snd_info_free_entry(entry); + entry = NULL; + } + } + ins->proc_modules_info_entry = entry; + + if ((entry = snd_info_create_card_entry(card, "parameter", ins->proc_dsp_dir)) != NULL) { + entry->content = SNDRV_INFO_CONTENT_TEXT; + entry->private_data = chip; + entry->mode = S_IFREG | S_IRUGO | S_IWUSR; + entry->c.text.read_size = 512; + entry->c.text.read = cs46xx_dsp_proc_parameter_dump_read; + if (snd_info_register(entry) < 0) { + snd_info_free_entry(entry); + entry = NULL; + } + } + ins->proc_parameter_dump_info_entry = entry; + + if ((entry = snd_info_create_card_entry(card, "sample", ins->proc_dsp_dir)) != NULL) { + entry->content = SNDRV_INFO_CONTENT_TEXT; + entry->private_data = chip; + entry->mode = S_IFREG | S_IRUGO | S_IWUSR; + entry->c.text.read_size = 512; + entry->c.text.read = cs46xx_dsp_proc_sample_dump_read; + if (snd_info_register(entry) < 0) { + snd_info_free_entry(entry); + entry = NULL; + } + } + ins->proc_sample_dump_info_entry = entry; + + if ((entry = snd_info_create_card_entry(card, "task_tree", ins->proc_dsp_dir)) != NULL) { + entry->content = SNDRV_INFO_CONTENT_TEXT; + entry->private_data = chip; + entry->mode = S_IFREG | S_IRUGO | S_IWUSR; + entry->c.text.read_size = 512; + entry->c.text.read = cs46xx_dsp_proc_task_tree_read;; + if (snd_info_register(entry) < 0) { + snd_info_free_entry(entry); + entry = NULL; + } + } + ins->proc_task_info_entry = entry; + + if ((entry = snd_info_create_card_entry(card, "scb_info", ins->proc_dsp_dir)) != NULL) { + entry->content = SNDRV_INFO_CONTENT_TEXT; + entry->private_data = chip; + entry->mode = S_IFREG | S_IRUGO | S_IWUSR; + entry->c.text.read_size = 1024; + entry->c.text.read = cs46xx_dsp_proc_scb_read;; + if (snd_info_register(entry) < 0) { + snd_info_free_entry(entry); + entry = NULL; + } + } + ins->proc_scb_info_entry = entry; + + /* register/update SCB's entries on proc */ + for (i = 0; i < ins->nscb; ++i) { + if (ins->scbs[i].deleted) continue; + + cs46xx_dsp_proc_register_scb_desc (chip, (ins->scbs + i)); + } + + return 0; +} + +int cs46xx_dsp_proc_done (cs46xx_t *chip) +{ + dsp_spos_instance_t * ins = chip->dsp_spos_instance; + int i; + + if (ins->proc_sym_info_entry) { + snd_info_unregister(ins->proc_sym_info_entry); + ins->proc_sym_info_entry = NULL; + } + + if (ins->proc_modules_info_entry) { + snd_info_unregister(ins->proc_modules_info_entry); + ins->proc_modules_info_entry = NULL; + } + + if (ins->proc_parameter_dump_info_entry) { + snd_info_unregister(ins->proc_parameter_dump_info_entry); + ins->proc_parameter_dump_info_entry = NULL; + } + + if (ins->proc_sample_dump_info_entry) { + snd_info_unregister(ins->proc_sample_dump_info_entry); + ins->proc_sample_dump_info_entry = NULL; + } + + if (ins->proc_scb_info_entry) { + snd_info_unregister(ins->proc_scb_info_entry); + ins->proc_scb_info_entry = NULL; + } + + if (ins->proc_task_info_entry) { + snd_info_unregister(ins->proc_task_info_entry); + ins->proc_task_info_entry = NULL; + } + + down(&ins->scb_mutex); + for (i = 0; i < ins->nscb; ++i) { + if (ins->scbs[i].deleted) continue; + cs46xx_dsp_proc_free_scb_desc ( (ins->scbs + i) ); + } + up(&ins->scb_mutex); + + if (ins->proc_dsp_dir) { + snd_info_unregister (ins->proc_dsp_dir); + ins->proc_dsp_dir = NULL; + } + + return 0; +} + +static int debug_tree = 0; +static void _dsp_create_task_tree (cs46xx_t *chip,u32 * task_data, u32 dest, int size) +{ + unsigned long spdst = chip->region.idx[1].remap_addr + + DSP_PARAMETER_BYTE_OFFSET + dest * sizeof(u32); + int i; + + for (i = 0; i < size; ++i) { + if (debug_tree) printk ("addr %08x, val %08x\n",(int)spdst,task_data[i]); + writel(task_data[i],spdst); + spdst += sizeof(u32); + } +} + +static int debug_scb = 0; +static void _dsp_create_scb (cs46xx_t *chip,u32 * scb_data, u32 dest) +{ + unsigned long spdst = chip->region.idx[1].remap_addr + + DSP_PARAMETER_BYTE_OFFSET + dest * sizeof(u32); + int i; + + for (i = 0; i < 0x10; ++i) { + if (debug_scb) printk ("addr %08x, val %08x\n",(int)spdst,scb_data[i]); + writel(scb_data[i],spdst); + spdst += sizeof(u32); + } +} + +static int find_free_scb_index (dsp_spos_instance_t * ins) +{ + int index = ins->nscb, i; + + for (i = ins->scb_highest_frag_index; i < ins->nscb; ++i) { + if (ins->scbs[i].deleted) { + index = i; + break; + } + } + + return index; +} + +static dsp_scb_descriptor_t * _map_scb (cs46xx_t *chip,char * name,u32 dest) +{ + dsp_spos_instance_t * ins = chip->dsp_spos_instance; + dsp_scb_descriptor_t * desc = NULL; + int index; + + if (ins->nscb == DSP_MAX_SCB_DESC - 1) { + snd_printk(KERN_ERR "dsp_spos: got no place for other SCB\n"); + return NULL; + } + + index = find_free_scb_index (ins); + + strcpy(ins->scbs[index].scb_name, name); + ins->scbs[index].address = dest; + ins->scbs[index].index = index; + ins->scbs[index].proc_info = NULL; + ins->scbs[index].ref_count = 1; + ins->scbs[index].deleted = 0; + + desc = (ins->scbs + index); + ins->scbs[index].scb_symbol = add_symbol (chip, name, dest, SYMBOL_PARAMETER); + + if (index > ins->scb_highest_frag_index) + ins->scb_highest_frag_index = index; + + if (index == ins->nscb) + ins->nscb++; + + return desc; +} + +static dsp_task_descriptor_t * _map_task_tree (cs46xx_t *chip,char * name,u32 dest,u32 size) +{ + dsp_spos_instance_t * ins = chip->dsp_spos_instance; + dsp_task_descriptor_t * desc = NULL; + + if (ins->ntask == DSP_MAX_TASK_DESC - 1) { + snd_printk(KERN_ERR "dsp_spos: got no place for other TASK\n"); + return NULL; + } + + strcpy(ins->tasks[ins->ntask].task_name,name); + ins->tasks[ins->ntask].address = dest; + ins->tasks[ins->ntask].size = size; + + /* quick find in list */ + ins->tasks[ins->ntask].index = ins->ntask; + desc = (ins->tasks + ins->ntask); + ins->ntask++; + + add_symbol (chip,name,dest,SYMBOL_PARAMETER); + return desc; +} + +dsp_scb_descriptor_t * cs46xx_dsp_create_scb (cs46xx_t *chip,char * name, u32 * scb_data,u32 dest) +{ + dsp_scb_descriptor_t * desc; + + desc = _map_scb (chip,name,dest); + if (desc) { + _dsp_create_scb(chip,scb_data,dest); + } else { + snd_printk(KERN_ERR "dsp_spos: failed to map SCB\n"); + } + + return desc; +} + + +dsp_task_descriptor_t * cs46xx_dsp_create_task_tree (cs46xx_t *chip,char * name, u32 * task_data,u32 dest,int size) +{ + dsp_task_descriptor_t * desc; + + desc = _map_task_tree (chip,name,dest,size); + if (desc) { + _dsp_create_task_tree(chip,task_data,dest,size); + } else { + snd_printk(KERN_ERR "dsp_spos: failed to map TASK\n"); + } + + return desc; +} + + +int cs46xx_dsp_scb_and_task_init (cs46xx_t *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; + + 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 * pcm_reader_scb; + dsp_scb_descriptor_t * src_task_scb; + dsp_scb_descriptor_t * master_mix_scb; + dsp_scb_descriptor_t * write_back_scb; + dsp_scb_descriptor_t * vari_decimate_scb; + dsp_scb_descriptor_t * pcm_serial_input_task; + dsp_scb_descriptor_t * asynch_tx_scb; + dsp_scb_descriptor_t * asynch_rx_scb; + dsp_scb_descriptor_t * sec_codec_out_scb; + dsp_scb_descriptor_t * magic_snoop_scb; + dsp_scb_descriptor_t * sec_magic_snoop_scb; + + spos_control_block_t sposcb = { + /* 0 */ HFG_TREE_SCB,HFG_STACK, + /* 1 */ SPOSCB_ADDR,BG_TREE_SCB_ADDR, + /* 2 */ DSP_SPOS_DC,0, + /* 3 */ DSP_SPOS_DC,DSP_SPOS_DC, + /* 4 */ 0,0, + /* 5 */ DSP_SPOS_UU,0, + /* 6 */ FG_TASK_HEADER_ADDR,0, + /* 7 */ 0,0, + /* 8 */ DSP_SPOS_UU,DSP_SPOS_DC, + /* 9 */ 0, + /* A */ 0,HFG_FIRST_EXECUTE_MODE, + /* B */ DSP_SPOS_UU,DSP_SPOS_UU, + /* C */ DSP_SPOS_DC_DC, + /* D */ DSP_SPOS_DC_DC, + /* E */ DSP_SPOS_DC_DC, + /* F */ DSP_SPOS_DC_DC + }; + + cs46xx_dsp_create_task_tree(chip, "sposCB", (u32 *)&sposcb, SPOSCB_ADDR, 0x10); + + null_algorithm = cs46xx_dsp_lookup_symbol(chip, "NULLALGORITHM", SYMBOL_CODE); + if (null_algorithm == NULL) { + snd_printk(KERN_ERR "dsp_spos: symbol NULLALGORITHM not found\n"); + return -EIO; + } + + fg_task_tree_header_code = cs46xx_dsp_lookup_symbol(chip, "FGTASKTREEHEADERCODE", SYMBOL_CODE); + if (fg_task_tree_header_code == NULL) { + snd_printk(KERN_ERR "dsp_spos: symbol FGTASKTREEHEADERCODE not found\n"); + return -EIO; + } + + task_tree_header_code = cs46xx_dsp_lookup_symbol(chip, "TASKTREEHEADERCODE", SYMBOL_CODE); + if (task_tree_header_code == NULL) { + snd_printk(KERN_ERR "dsp_spos: symbol TASKTREEHEADERCODE not found\n"); + return -EIO; + } + + task_tree_thread = cs46xx_dsp_lookup_symbol(chip, "TASKTREETHREAD", SYMBOL_CODE); + if (task_tree_thread == NULL) { + snd_printk(KERN_ERR "dsp_spos: symbol TASKTREETHREAD not found\n"); + return -EIO; + } + + magic_snoop_task = cs46xx_dsp_lookup_symbol(chip, "MAGICSNOOPTASK", SYMBOL_CODE); + if (magic_snoop_task == NULL) { + snd_printk(KERN_ERR "dsp_spos: symbol MAGICSNOOPTASK not found\n"); + return -EIO; + } + + { + /* create the null SCB */ + generic_scb_t null_scb = { + { 0, 0, 0, 0 }, + { 0, 0, 0, 0, 0 }, + NULL_SCB_ADDR, NULL_SCB_ADDR, + null_algorithm->address, 0, + 0,0,0, + { + 0,0, + 0,0, + } + }; + + ins->the_null_scb = cs46xx_dsp_create_scb(chip, "nullSCB", (u32 *)&null_scb, NULL_SCB_ADDR); + ins->the_null_scb->task_entry = null_algorithm; + ins->the_null_scb->sub_list_ptr = ins->the_null_scb; + ins->the_null_scb->next_scb_ptr = ins->the_null_scb; + ins->the_null_scb->parent_scb_ptr = NULL; + } + + { + /* setup foreground task tree */ + task_tree_control_block_t fg_task_tree_hdr = { + { FG_TASK_HEADER_ADDR | (DSP_SPOS_DC << 0x10), + DSP_SPOS_DC_DC, + DSP_SPOS_DC_DC, + 0x0000,DSP_SPOS_DC, + DSP_SPOS_DC, DSP_SPOS_DC, + DSP_SPOS_DC_DC, + DSP_SPOS_DC_DC, + DSP_SPOS_DC_DC, + DSP_SPOS_DC,DSP_SPOS_DC }, + + { + BG_TREE_SCB_ADDR,TIMINGMASTER_SCB_ADDR, + fg_task_tree_header_code->address, + FG_TASK_HEADER_ADDR + TCBData, + }, + + { + 4,0, + 1,0, + 2,SPOSCB_ADDR + HFGFlags, + 0,0, + FG_TASK_HEADER_ADDR + TCBContextBlk,FG_STACK + }, + + { + DSP_SPOS_DC,task_tree_thread->address, + DSP_SPOS_DC,DSP_SPOS_DC, + DSP_SPOS_DC,DSP_SPOS_DC, + DSP_SPOS_DC,DSP_SPOS_DC, + DSP_SPOS_DC,DSP_SPOS_DC, + DSP_SPOS_DCDC, + DSP_SPOS_UU,1, + DSP_SPOS_DCDC, + DSP_SPOS_DCDC, + DSP_SPOS_DCDC, + DSP_SPOS_DCDC, + DSP_SPOS_DCDC, + DSP_SPOS_DCDC, + DSP_SPOS_DCDC, + DSP_SPOS_DCDC, + DSP_SPOS_DCDC, + DSP_SPOS_DCDC, + DSP_SPOS_DCDC, + DSP_SPOS_DCDC, + DSP_SPOS_DCDC, + DSP_SPOS_DCDC, + DSP_SPOS_DCDC, + DSP_SPOS_DCDC, + DSP_SPOS_DCDC, + DSP_SPOS_DCDC, + DSP_SPOS_DCDC, + DSP_SPOS_DCDC, + DSP_SPOS_DCDC, + DSP_SPOS_DCDC, + DSP_SPOS_DCDC, + DSP_SPOS_DCDC, + DSP_SPOS_DCDC, + DSP_SPOS_DCDC, + DSP_SPOS_DCDC, + DSP_SPOS_DCDC + }, + { + FG_INTERVAL_TIMER_PERIOD,DSP_SPOS_UU, + 0,0 + } + }; + + cs46xx_dsp_create_task_tree(chip,"FGtaskTreeHdr",(u32 *)&fg_task_tree_hdr,FG_TASK_HEADER_ADDR,0x35); + } + + + { + /* setup foreground task tree */ + task_tree_control_block_t bg_task_tree_hdr = { + { DSP_SPOS_DC_DC, + DSP_SPOS_DC_DC, + DSP_SPOS_DC_DC, + DSP_SPOS_DC, DSP_SPOS_DC, + DSP_SPOS_DC, DSP_SPOS_DC, + DSP_SPOS_DC_DC, + DSP_SPOS_DC_DC, + DSP_SPOS_DC_DC, + DSP_SPOS_DC,DSP_SPOS_DC }, + + { + NULL_SCB_ADDR,NULL_SCB_ADDR, /* Set up the background to do nothing */ + task_tree_header_code->address, + BG_TREE_SCB_ADDR + TCBData, + }, + + { + 9999,0, + 0,1, + 0,SPOSCB_ADDR + HFGFlags, + 0,0, + BG_TREE_SCB_ADDR + TCBContextBlk,BG_STACK + }, + + { + DSP_SPOS_DC,task_tree_thread->address, + DSP_SPOS_DC,DSP_SPOS_DC, + DSP_SPOS_DC,DSP_SPOS_DC, + DSP_SPOS_DC,DSP_SPOS_DC, + DSP_SPOS_DC,DSP_SPOS_DC, + DSP_SPOS_DCDC, + DSP_SPOS_UU,1, + DSP_SPOS_DCDC, + DSP_SPOS_DCDC, + DSP_SPOS_DCDC, + DSP_SPOS_DCDC, + DSP_SPOS_DCDC, + DSP_SPOS_DCDC, + DSP_SPOS_DCDC, + DSP_SPOS_DCDC, + DSP_SPOS_DCDC, + DSP_SPOS_DCDC, + DSP_SPOS_DCDC, + DSP_SPOS_DCDC, + DSP_SPOS_DCDC, + DSP_SPOS_DCDC, + DSP_SPOS_DCDC, + DSP_SPOS_DCDC, + DSP_SPOS_DCDC, + DSP_SPOS_DCDC, + DSP_SPOS_DCDC, + DSP_SPOS_DCDC, + DSP_SPOS_DCDC, + DSP_SPOS_DCDC, + DSP_SPOS_DCDC, + DSP_SPOS_DCDC, + DSP_SPOS_DCDC, + DSP_SPOS_DCDC, + DSP_SPOS_DCDC, + DSP_SPOS_DCDC + }, + { + BG_INTERVAL_TIMER_PERIOD,DSP_SPOS_UU, + 0,0 + } + }; + // debug_tree = 1; + cs46xx_dsp_create_task_tree(chip,"BGtaskTreeHdr",(u32 *)&bg_task_tree_hdr,BG_TREE_SCB_ADDR,0x35); + // debug_tree = 0; + + } + + //debug_scb = 1; + /* create timing master SCB */ + timing_master_scb = cs46xx_dsp_create_timing_master_scb(chip); + + /* create the CODEC output task */ + codec_out_scb = cs46xx_dsp_create_codec_out_scb(chip,"CodecOutSCB_I",0x0010,0x0000, + MASTERMIX_SCB_ADDR, + CODECOUT_SCB_ADDR,timing_master_scb, + SCB_ON_PARENT_SUBLIST_SCB); + + if (!codec_out_scb) goto _fail_end; + /* create the master mix SCB */ + master_mix_scb = cs46xx_dsp_create_mix_only_scb(chip,"MasterMixSCB", + MIX_SAMPLE_BUF1,MASTERMIX_SCB_ADDR, + codec_out_scb, + SCB_ON_PARENT_SUBLIST_SCB); + ins->master_mix_scb = master_mix_scb; + + if (!master_mix_scb) goto _fail_end; +#if 0 + /* the sample rate converter SCB */ + src_task_scb = cs46xx_dsp_create_src_task_scb(chip,"SrcTaskSCB_I", + SRC_OUTPUT_BUF1, + SRC_DELAY_BUF1,SRCTASK_SCB_ADDR, + asynch_tx_scb, + + SCB_ON_PARENT_SUBLIST_SCB); + /* create the PCM reader SCB */ + pcm_reader_scb = cs46xx_dsp_create_pcm_reader_scb(chip,"PCMReaderSCB_I", + PCM_READER_BUF1,PCMREADER_SCB_ADDR, + 0, /* playback how hw addr */ + src_task_scb, + SCB_ON_PARENT_SUBLIST_SCB); +#endif + + /* create codec in */ + codec_in_scb = cs46xx_dsp_create_codec_in_scb(chip,"CodecInSCB",0x0010,0x00A0, + MIX_SAMPLE_BUF1, + CODECIN_SCB_ADDR,codec_out_scb, + SCB_ON_PARENT_NEXT_SCB); + if (!codec_in_scb) goto _fail_end; + + /* create write back scb */ + write_back_scb = cs46xx_dsp_create_mix_to_ostream_scb(chip,"WriteBackSCB", + WRITE_BACK_BUF1,WRITE_BACK_SPB, + WRITEBACK_SCB_ADDR, + timing_master_scb, + SCB_ON_PARENT_NEXT_SCB); + if (!write_back_scb) goto _fail_end; + + { + mix2_ostream_spb_t mix2_ostream_spb = { + 0x00020000, + 0x0000ffff + }; + + /* dirty hack ... */ + _dsp_create_task_tree (chip,(u32 *)&mix2_ostream_spb,WRITE_BACK_SPB,2); + } + + /* input sample converter */ + vari_decimate_scb = cs46xx_dsp_create_vari_decimate_scb(chip,"VariDecimateSCB", + VARI_DECIMATE_BUF0, + VARI_DECIMATE_BUF1, + VARIDECIMATE_SCB_ADDR, + write_back_scb, + SCB_ON_PARENT_SUBLIST_SCB); + if (!vari_decimate_scb) goto _fail_end; + + + /* pcm input */ + pcm_serial_input_task = cs46xx_dsp_create_pcm_serial_input_scb(chip,"PCMSerialInput", + PCMSERIALIN_SCB_ADDR, + codec_in_scb, vari_decimate_scb, + SCB_ON_PARENT_SUBLIST_SCB); + if (!pcm_serial_input_task) goto _fail_end; + + +#if 0 /* asynch. receive task */ + asynch_rx_scb = cs46xx_dsp_create_asynch_fg_rx_scb(chip,"AsynchFGRxSCB", + ASYNCRX_SCB_ADDR, + SPDIFI_SCB_INST, + SPDIFI_IP_OUTPUT_BUFFER1, + master_mix_scb, + SCB_ON_PARENT_NEXT_SCB); + if (!asynch_rx_scb) goto _fail_end; +#endif + + + /* create secondary CODEC output */ + sec_codec_out_scb = cs46xx_dsp_create_codec_out_scb(chip,"CodecOutSCB_II",0x0010,0x0040, + OUTPUTSNOOP_SCB_ADDR, + SEC_CODECOUT_SCB_ADDR,codec_in_scb, + SCB_ON_PARENT_NEXT_SCB); + if (!sec_codec_out_scb) goto _fail_end; + + /* the magic snooper */ + magic_snoop_scb = cs46xx_dsp_create_magic_snoop_scb (chip,"MagicSnoopSCB_I",OUTPUTSNOOP_SCB_ADDR, + OUTPUT_SNOOP_BUFFER, + codec_out_scb, + sec_codec_out_scb, + SCB_ON_PARENT_SUBLIST_SCB); + if (!magic_snoop_scb) goto _fail_end; + + /* The asynch. transfer task */ + asynch_tx_scb = cs46xx_dsp_create_asynch_fg_tx_scb(chip,"AsynchFGTxSCB",ASYNCTX_SCB_ADDR, + SPDIFO_SCB_INST, + SPDIFO_IP_OUTPUT_BUFFER1, + magic_snoop_scb, + SCB_ON_PARENT_NEXT_SCB); + + if (!asynch_tx_scb) goto _fail_end; + + /* pcm input */ + pcm_serial_input_task = cs46xx_dsp_create_pcm_serial_input_scb(chip,"PCMSerialInput_II", + PCMSERIALINII_SCB_ADDR, + magic_snoop_scb,asynch_tx_scb, + SCB_ON_PARENT_SUBLIST_SCB); + + if (!pcm_serial_input_task) goto _fail_end; + + /* SP IO access */ + if (!cs46xx_dsp_create_spio_write_scb(chip,"SPIOWriteSCB",SPIOWRITE_SCB_ADDR, + asynch_tx_scb, + SCB_ON_PARENT_NEXT_SCB)) + goto _fail_end; + + + /* the magic snooper */ +#if 0 + sec_magic_snoop_scb = cs46xx_dsp_create_magic_snoop_scb (chip,"MagicSnoopSCB_II",OUTPUTSNOOPII_SCB_ADDR, + MIX_SAMPLE_BUF1, + master_mix_scb, + asynch_tx_scb, + SCB_ON_PARENT_SUBLIST_SCB); + if (!sec_magic_scb) goto _fail_end; +#endif + + //debug_scb = 0; + cs46xx_dsp_async_init(chip,timing_master_scb); + return 0; + + _fail_end: + snd_printk(KERN_ERR "dsp_spos: failed to setup SCB's in DSP\n"); + return -EINVAL; +} + +int cs46xx_dsp_async_init (cs46xx_t *chip, dsp_scb_descriptor_t * 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; + + s16_async_codec_input_task = cs46xx_dsp_lookup_symbol(chip, "S16_ASYNCCODECINPUTTASK", SYMBOL_CODE); + if (s16_async_codec_input_task == NULL) { + snd_printk(KERN_ERR "dsp_spos: symbol S16_ASYNCCODECINPUTTASK not found\n"); + return -EIO; + } + spdifo_task = cs46xx_dsp_lookup_symbol(chip, "SPDIFOTASK", SYMBOL_CODE); + if (spdifo_task == NULL) { + snd_printk(KERN_ERR "dsp_spos: symbol SPDIFOTASK not found\n"); + return -EIO; + } + + spdifi_task = cs46xx_dsp_lookup_symbol(chip, "SPDIFITASK", SYMBOL_CODE); + if (spdifi_task == NULL) { + snd_printk(KERN_ERR "dsp_spos: symbol SPDIFITASK not found\n"); + return -EIO; + } + + { + /* 0xBC0 */ + spdifoscb_t spdifo_scb = { + /* 0 */ DSP_SPOS_UUUU, + { + /* 1 */ 0xb0, //DSP_SPOS_UUUU, + /* 2 */ 0, //DSP_SPOS_UUUU, + /* 3 */ 0, //DSP_SPOS_UUUU, + /* 4 */ 0, //DSP_SPOS_UUUU, + }, + /* 5 */ 0x00000085, + /* 6 */ ( SPDIFO_IP_OUTPUT_BUFFER1 << 0x10 ) | 0xFFFC, + /* 7 */ 0,0, // DSP_SPOS_UU,1, //DSP_SPOS_DC,DSP_SPOS_UU, + /* 8 */ 0, //DSP_SPOS_UUUU, + /* 9 */ FG_TASK_HEADER_ADDR, NULL_SCB_ADDR, + /* A */ spdifo_task->address, + SPDIFO_SCB_INST + SPDIFOFIFOPointer, + { + /* B */ 0x0040, /*DSP_SPOS_UUUU,*/ + /* C */ 0x20ff, /*DSP_SPOS_UUUU,*/ + }, + /* D */ 0x804c,0, /* SPDIFOFIFOPointer:SPDIFOStatRegAddr; */ + /* E */ 0x0108,0x0001, /* SPDIFOStMoFormat:SPDIFOFIFOBaseAddr; */ + /* F */ DSP_SPOS_UUUU /* SPDIFOFree; */ + }; + + /* 0xBB0 */ + spdifiscb_t spdifi_scb = { + /* 0 */ DSP_SPOS_UULO,DSP_SPOS_UUHI, + /* 1 */ 0, + /* 2 */ 0, + /* 3 */ 1,4000, + /* 4 */ DSP_SPOS_UUUU, + /* 5 */ DSP_SPOS_UULO,DSP_SPOS_UUHI, + /* 6 */ DSP_SPOS_UUUU, + /* 7 */ DSP_SPOS_UU,DSP_SPOS_DC, + /* 8 */ DSP_SPOS_UUUU, + /* 9 */ SPDIFO_SCB_INST, NULL_SCB_ADDR, + /* A */ spdifi_task->address, + SPDIFI_SCB_INST + SPDIFIFIFOPointer, + + /* B */ 0x00000083, + /* C */ (SPDIFI_IP_OUTPUT_BUFFER1 << 0x10) | 0xFFFC, + /* D */ 0x8048,0, + /* E */ 0x01f0,0x0001, + /* F */ DSP_SPOS_UUUU + }; + + /* 0xBA0 */ + async_codec_input_scb_t async_codec_input_scb = { + /* 0 */ DSP_SPOS_UUUU, + /* 1 */ 0, + /* 2 */ 0, + /* 3 */ 1,4000, + /* 4 */ 0x0118,0x0001, + /* 5 */ 0x00000083, + /* 6 */ (ASYNC_IP_OUTPUT_BUFFER1 << 0x10) | 0xFFFC, + /* 7 */ DSP_SPOS_UU,0x3, + /* 8 */ DSP_SPOS_UUUU, + /* 9 */ SPDIFI_SCB_INST,NULL_SCB_ADDR, + /* A */ s16_async_codec_input_task->address, + HFG_TREE_SCB + AsyncCIOFIFOPointer, + + /* B */ RSCONFIG_SAMPLE_16STEREO + RSCONFIG_MODULO_64, + /* C */ (ASYNC_IP_OUTPUT_BUFFER1 << 0x10), /*(ASYNC_IP_OUTPUT_BUFFER1 << 0x10) | 0xFFFC,*/ + +#ifdef UseASER1Input + /* short AsyncCIFIFOPointer:AsyncCIStatRegAddr; + Init. 0000:8042: for ASER1 + 0000:8044: for ASER2 */ + /* D */ 0x8042,0, + + /* short AsyncCIStMoFormat:AsyncCIFIFOBaseAddr; + Init 1 stero:8050 ASER1 + Init 0 mono:8070 ASER2 + Init 1 Stereo : 0100 ASER1 (Set by script) */ + /* E */ 0x0100,0x0001, + +#endif + +#ifdef UseASER2Input + /* short AsyncCIFIFOPointer:AsyncCIStatRegAddr; + Init. 0000:8042: for ASER1 + 0000:8044: for ASER2 */ + /* D */ 0x8044,0, + + /* short AsyncCIStMoFormat:AsyncCIFIFOBaseAddr; + Init 1 stero:8050 ASER1 + Init 0 mono:8070 ASER2 + Init 1 Stereo : 0100 ASER1 (Set by script) */ + /* E */ 0x0110,0x0001, + +#endif + + /* short AsyncCIOutputBufModulo:AsyncCIFree; + AsyncCIOutputBufModulo: The modulo size for + the output buffer of this task */ + /* F */ 0, /* DSP_SPOS_UUUU */ + }; + + spdifo_scb_desc = cs46xx_dsp_create_scb(chip,"SPDIFOSCB",(u32 *)&spdifo_scb,SPDIFO_SCB_INST); + snd_assert(spdifo_scb_desc, return -EIO); + spdifi_scb_desc = cs46xx_dsp_create_scb(chip,"SPDIFISCB",(u32 *)&spdifi_scb,SPDIFI_SCB_INST); + snd_assert(spdifi_scb_desc, return -EIO); + async_codec_scb_desc = cs46xx_dsp_create_scb(chip,"AsynCodecInputSCB",(u32 *)&async_codec_input_scb, HFG_TREE_SCB); + snd_assert(async_codec_scb_desc, return -EIO); + + async_codec_scb_desc->parent_scb_ptr = NULL; + async_codec_scb_desc->next_scb_ptr = spdifi_scb_desc; + async_codec_scb_desc->sub_list_ptr = ins->the_null_scb; + async_codec_scb_desc->task_entry = s16_async_codec_input_task; + + spdifi_scb_desc->parent_scb_ptr = async_codec_scb_desc; + spdifi_scb_desc->next_scb_ptr = spdifo_scb_desc; + spdifi_scb_desc->sub_list_ptr = ins->the_null_scb; + spdifi_scb_desc->task_entry = spdifi_task; + + spdifo_scb_desc->parent_scb_ptr = spdifi_scb_desc; + spdifo_scb_desc->next_scb_ptr = fg_entry; + spdifo_scb_desc->sub_list_ptr = ins->the_null_scb; + spdifo_scb_desc->task_entry = spdifo_task; + + /* this one is faked, as the parnet of SPDIFO task + is the FG task tree */ + fg_entry->parent_scb_ptr = spdifo_scb_desc; + + /* dirty hack to start forground task ... */ + //snd_cs46xx_poke(chip,DSP_PARAMETER_BYTE_OFFSET + 0x070 * sizeof(u32),0x066a0ba0); + } + + return 0; +} + +int cs46xx_dsp_enable_spdif_out (cs46xx_t *chip) +{ + dsp_spos_instance_t * ins = chip->dsp_spos_instance; + + /* set SPDIF output FIFO slot */ + snd_cs46xx_pokeBA0(chip, BA0_ASER_FADDR, ( 0x8100 | ((SP_SPDOUT_FIFO >> 4) << 4) )); + + /* Async MASTER ENABLE */ + snd_cs46xx_pokeBA0(chip, BA0_ASER_MASTER, 0x1 ); + +#if 0 + /* reset buffers */ + snd_cs46xx_poke (chip, (SPDIFO_SCB_INST + 6) << 2,(SPDIFO_IP_OUTPUT_BUFFER1 << 0x10) | 0xFFFC); + snd_cs46xx_poke (chip, (ASYNCTX_SCB_ADDR + 12) << 2, (SPDIFO_IP_OUTPUT_BUFFER1) << 0x10); + + /* insert the foreground asynch tranfer task */ + snd_cs46xx_poke (chip, (MASTERMIX_SCB_ADDR + 9) << 2, ASYNCTX_SCB_ADDR << 0x10 /*| ASYNCRX_SCB_ADDR*/); +#endif + + /* SPDIF output MASTER ENABLE */ + cs46xx_poke_via_dsp (chip,SP_SPDOUT_CONTROL, 0x80000000); + + /* right and left validate bit + NOTE: 0x80000000 and enables the SCMC protection on stream + */ + cs46xx_poke_via_dsp (chip,SP_SPDOUT_CSUV, 0x00000000 | (1 << 13) | (1 << 12)); + + /* monitor state */ + ins->spdif_status_out = 1; + + return 0; +} + +int cs46xx_dsp_disable_spdif_out (cs46xx_t *chip) +{ + dsp_spos_instance_t * ins = chip->dsp_spos_instance; + +#if 0 + /* unlink the foreground asynch tranfer task */ + snd_cs46xx_poke (chip, (MASTERMIX_SCB_ADDR + 9) << 2, SRCTASK_SCB_ADDR << 0x10 /* | ASYNCRX_SCB_ADDR*/); +#endif + + /* Async MASTER DISABLE */ + snd_cs46xx_pokeBA0(chip, BA0_ASER_MASTER, 0x0 ); + + /* SPDIF output MASTER DISABLE */ + cs46xx_poke_via_dsp (chip,SP_SPDOUT_CONTROL, 0x0); + + /* monitor state */ + ins->spdif_status_out = 0; + + return 0; +} + +int cs46xx_dsp_enable_spdif_in (cs46xx_t *chip) +{ + dsp_spos_instance_t * ins = chip->dsp_spos_instance; + + /* Async MASTER ENABLE */ + snd_cs46xx_pokeBA0(chip, BA0_ASER_MASTER, 0x1 ); + + /* Time countdown enable */ + cs46xx_poke_via_dsp (chip,SP_ASER_COUNTDOWN, 0x80000000); + + /* SPDIF input MASTER ENABLE */ + cs46xx_poke_via_dsp (chip,SP_SPDIN_CONTROL, 0x800003ff); + + /* monitor state */ + ins->spdif_status_in = 1; + + return 0; +} + +int cs46xx_dsp_disable_spdif_in (cs46xx_t *chip) +{ + dsp_spos_instance_t * ins = chip->dsp_spos_instance; + + /* SPDIF input MASTER DISABLE */ + cs46xx_poke_via_dsp (chip,SP_SPDIN_CONTROL, 0x000003ff); + + /* monitor state */ + ins->spdif_status_in = 0; + return 0; +} + +int cs46xx_poke_via_dsp (cs46xx_t *chip,u32 address,u32 data) +{ + u32 temp; + int i; + + /* santiy check the parameters. (These numbers are not 100% correct. They are + a rough guess from looking at the controller spec.) */ + if (address < 0x8000 || address >= 0x9000) + return -EINVAL; + + /* initialize the SP_IO_WRITE SCB with the data. */ + temp = ( address << 16 ) | ( address & 0x0000FFFF); /* offset 0 <-- address2 : address1 */ + + snd_cs46xx_poke(chip,( SPIOWRITE_SCB_ADDR << 2), temp); + snd_cs46xx_poke(chip,((SPIOWRITE_SCB_ADDR + 1) << 2), data); /* offset 1 <-- data1 */ + snd_cs46xx_poke(chip,((SPIOWRITE_SCB_ADDR + 2) << 2), data); /* offset 1 <-- data2*/ + + /* Poke this location to tell the task to start */ + snd_cs46xx_poke(chip,((SPIOWRITE_SCB_ADDR + 6) << 2), SPIOWRITE_SCB_ADDR << 0x10); + + /* Verify that the task ran */ + for (i=0; i<25; i++) { + udelay(125); + + temp = snd_cs46xx_peek(chip,((SPIOWRITE_SCB_ADDR + 6) << 2)); + if (temp == 0x00000000) + break; + } + + if (i == 25) { + snd_printk(KERN_ERR "dsp_spos: SPIOWriteTask not responding\n"); + return -EBUSY; + } + + return 0; +} diff --git a/sound/pci/cs46xx/dsp_spos.h b/sound/pci/cs46xx/dsp_spos.h new file mode 100644 index 0000000000000000000000000000000000000000..feef9778d9f473c4f3bf404f0728b5c5340486f2 --- /dev/null +++ b/sound/pci/cs46xx/dsp_spos.h @@ -0,0 +1,150 @@ +/* + * The driver for the Cirrus Logic's Sound Fusion CS46XX based soundcards + * Copyright (c) by Jaroslav Kysela <perex@suse.cz> + * + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* + * 2002-07 Benny Sjostrand benny@hostmobility.com + */ + +#define DSP_MAX_SYMBOLS 1024 +#define DSP_MAX_MODULES 64 + +#define DSP_CODE_BYTE_SIZE 0x00007000UL +#define DSP_PARAMETER_BYTE_SIZE 0x00003000UL +#define DSP_SAMPLE_BYTE_SIZE 0x00003800UL +#define DSP_PARAMETER_BYTE_OFFSET 0x00000000UL +#define DSP_SAMPLE_BYTE_OFFSET 0x00010000UL +#define DSP_CODE_BYTE_OFFSET 0x00020000UL + +#define WIDE_INSTR_MASK 0x0040 +#define WIDE_LADD_INSTR_MASK 0x0380 + +/* this instruction types + needs to be reallocated when load + code into DSP */ +typedef enum { + WIDE_FOR_BEGIN_LOOP = 0x20, + WIDE_FOR_BEGIN_LOOP2, + + WIDE_COND_GOTO_ADDR = 0x30, + WIDE_COND_GOTO_CALL, + + WIDE_TBEQ_COND_GOTO_ADDR = 0x70, + WIDE_TBEQ_COND_CALL_ADDR, + WIDE_TBEQ_NCOND_GOTO_ADDR, + WIDE_TBEQ_NCOND_CALL_ADDR, + WIDE_TBEQ_COND_GOTO1_ADDR, + 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 +#define WRITE_BACK_BUF1 0x0400 +#define CODEC_INPUT_BUF1 0x0500 +#define PCM_READER_BUF1 0x0600 +#define SRC_DELAY_BUF1 0x0680 +#define VARI_DECIMATE_BUF0 0x0780 +#define SRC_OUTPUT_BUF1 0x07A0 +#define ASYNC_IP_OUTPUT_BUFFER1 0x0A00 +#define OUTPUT_SNOOP_BUFFER 0x0B00 +#define SPDIFI_IP_OUTPUT_BUFFER1 0x0E00 +#define SPDIFO_IP_OUTPUT_BUFFER1 0x1000 +#define MIX_SAMPLE_BUF1 0x1400 + +// #define SRC_OUTPUT_BUF2 0x1280 +// #define SRC_DELAY_BUF2 0x1288 + +/* Task stack address */ +#define HFG_STACK 0x066A +#define FG_STACK 0x066E +#define BG_STACK 0x068E + +/* SCB's addresses */ +#define SPOSCB_ADDR 0x070 +#define BG_TREE_SCB_ADDR 0x635 +#define NULL_SCB_ADDR 0x000 +#define TIMINGMASTER_SCB_ADDR 0x010 +#define CODECOUT_SCB_ADDR 0x020 +#define PCMREADER_SCB_ADDR 0x030 +#define WRITEBACK_SCB_ADDR 0x040 +#define CODECIN_SCB_ADDR 0x080 +#define MASTERMIX_SCB_ADDR 0x090 +#define SRCTASK_SCB_ADDR 0x0A0 +#define VARIDECIMATE_SCB_ADDR 0x0B0 +#define PCMSERIALIN_SCB_ADDR 0x0C0 +#define FG_TASK_HEADER_ADDR 0x600 +#define ASYNCTX_SCB_ADDR 0x0E0 +#define ASYNCRX_SCB_ADDR 0x0F0 +#define SRCTASKII_SCB_ADDR 0x100 +#define OUTPUTSNOOP_SCB_ADDR 0x110 +#define PCMSERIALINII_SCB_ADDR 0x120 +#define SPIOWRITE_SCB_ADDR 0x130 +#define SEC_CODECOUT_SCB_ADDR 0x140 +#define OUTPUTSNOOPII_SCB_ADDR 0x150 + +/* hyperforground SCB's*/ +#define HFG_TREE_SCB 0xBA0 +#define SPDIFI_SCB_INST 0xBB0 +#define SPDIFO_SCB_INST 0xBC0 +#define WRITE_BACK_SPB 0x0D0 + +/* offsets */ +#define AsyncCIOFIFOPointer 0xd +#define SPDIFOFIFOPointer 0xd +#define SPDIFIFIFOPointer 0xd +#define TCBData 0xb +#define HFGFlags 0xa +#define TCBContextBlk 0x10 +#define AFGTxAccumPhi 0x4 +#define SCBsubListPtr 0x9 +#define SCBfuncEntryPtr 0xA +#define SRCCorPerGof 0x2 +#define SRCPhiIncr6Int26Frac 0xd + +/* conf */ +#define UseASER1Input 1 + +/* constants */ +#define FG_INTERVAL_TIMER_PERIOD 0x0051 +#define BG_INTERVAL_TIMER_PERIOD 0x0100 +#define RSCONFIG_MODULO_32 0x00000002 +#define RSCONFIG_MODULO_64 0x00000003 +#define RSCONFIG_MODULO_256 0x00000005 +#define RSCONFIG_MODULO_8 0x00000009 +#define RSCONFIG_SAMPLE_16STEREO 0x000000C0 +#define RSCONFIG_SAMPLE_16MONO 0x00000080 +#define RSCONFIG_DMA_TO_HOST 0x00008000 +#define RSCONFIG_DMA_ENABLE 0x20000000 +#define RSCONFIG_STREAM_NUM_SHIFT 16 +#define RSCONFIG_MAX_DMA_SIZE_SHIFT 24 + +/* Only SP accesible registers */ +#define SP_ASER_COUNTDOWN 0x8040 +#define SP_SPDOUT_FIFO 0x0108 +#define SP_SPDIN_MI_FIFO 0x01E0 +#define SP_SPDIN_D_FIFO 0x01F0 +#define SP_SPDIN_STATUS 0x8048 +#define SP_SPDIN_CONTROL 0x8049 +#define SP_SPDIN_FIFOPTR 0x804A +#define SP_SPDOUT_STATUS 0x804C +#define SP_SPDOUT_CONTROL 0x804D +#define SP_SPDOUT_CSUV 0x808E diff --git a/sound/pci/cs46xx/dsp_spos_scb_lib.c b/sound/pci/cs46xx/dsp_spos_scb_lib.c new file mode 100644 index 0000000000000000000000000000000000000000..331e7d7a740ac5cbe26ce1b984c6a7a60b0ca00b --- /dev/null +++ b/sound/pci/cs46xx/dsp_spos_scb_lib.c @@ -0,0 +1,1383 @@ +/* + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* + * 2002-07 Benny Sjostrand benny@hostmobility.com + */ + + +#define __NO_VERSION__ +#include <sound/driver.h> +#include <asm/io.h> +#include <linux/delay.h> +#include <linux/pci.h> +#include <linux/pm.h> +#include <linux/init.h> +#include <linux/slab.h> +#include <sound/core.h> +#include <sound/control.h> +#include <sound/info.h> +#include <sound/cs46xx.h> + +#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; + +static void remove_symbol (cs46xx_t * chip,symbol_entry_t * symbol) +{ + dsp_spos_instance_t * ins = chip->dsp_spos_instance; + int symbol_index = (int)(symbol - ins->symbol_table.symbols); + + snd_assert(ins->symbol_table.nsymbols > 0,return); + snd_assert(symbol_index >= 0 && symbol_index < ins->symbol_table.nsymbols, return); + + ins->symbol_table.symbols[symbol_index].deleted = 1; + + if (symbol_index < ins->symbol_table.highest_frag_index) { + ins->symbol_table.highest_frag_index = symbol_index; + } + + if (symbol_index == ins->symbol_table.nsymbols - 1) + ins->symbol_table.nsymbols --; + + if (ins->symbol_table.highest_frag_index > ins->symbol_table.nsymbols) { + ins->symbol_table.highest_frag_index = ins->symbol_table.nsymbols; + } + +} + +static void cs46xx_dsp_proc_scb_info_read (snd_info_entry_t *entry, snd_info_buffer_t * 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 = snd_magic_cast(cs46xx_t, scb_info->chip, return); + int j,col; + unsigned long dst = chip->region.idx[1].remap_addr + DSP_PARAMETER_BYTE_OFFSET; + + ins = chip->dsp_spos_instance; + + down(&ins->scb_mutex); + snd_iprintf(buffer,"%04x %s:\n",scb->address,scb->scb_name); + + for (col = 0,j = 0;j < 0x10; j++,col++) { + if (col == 4) { + snd_iprintf(buffer,"\n"); + col = 0; + } + snd_iprintf(buffer,"%08x ",readl(dst + (scb->address + j) * sizeof(u32))); + } + + snd_iprintf(buffer,"\n"); + + if (scb->parent_scb_ptr != NULL) { + snd_iprintf(buffer,"parent [%s:%04x] ", + scb->parent_scb_ptr->scb_name, + scb->parent_scb_ptr->address); + } else snd_iprintf(buffer,"parent [none] "); + + snd_iprintf(buffer,"sub_list_ptr [%s:%04x]\nnext_scb_ptr [%s:%04x] task_entry [%s:%04x]\n", + scb->sub_list_ptr->scb_name, + scb->sub_list_ptr->address, + scb->next_scb_ptr->scb_name, + scb->next_scb_ptr->address, + scb->task_entry->symbol_name, + scb->task_entry->address); + + snd_iprintf(buffer,"index [%d] ref_count [%d]\n",scb->index,scb->ref_count); + up(&ins->scb_mutex); +} + +static void _dsp_unlink_scb (cs46xx_t *chip,dsp_scb_descriptor_t * scb) +{ + dsp_spos_instance_t * ins = chip->dsp_spos_instance; + unsigned long flags; + + if ( scb->parent_scb_ptr ) { + /* unlink parent SCB */ + snd_assert ((scb->parent_scb_ptr->sub_list_ptr == scb || + scb->parent_scb_ptr->next_scb_ptr == scb),return); + + if (scb->parent_scb_ptr->sub_list_ptr == scb) { + + if (scb->next_scb_ptr == ins->the_null_scb) { + /* last and only node in parent sublist */ + scb->parent_scb_ptr->sub_list_ptr = scb->sub_list_ptr; + + if (scb->sub_list_ptr != ins->the_null_scb) { + scb->sub_list_ptr->parent_scb_ptr = scb->parent_scb_ptr; + } + scb->sub_list_ptr = ins->the_null_scb; + } else { + /* first node in parent sublist */ + scb->parent_scb_ptr->sub_list_ptr = scb->next_scb_ptr; + + if (scb->next_scb_ptr != ins->the_null_scb) { + /* update next node parent ptr. */ + scb->next_scb_ptr->parent_scb_ptr = scb->parent_scb_ptr; + } + scb->next_scb_ptr = ins->the_null_scb; + } + } else { + snd_assert ( (scb->sub_list_ptr == ins->the_null_scb), return); + scb->parent_scb_ptr->next_scb_ptr = scb->next_scb_ptr; + + if (scb->next_scb_ptr != ins->the_null_scb) { + /* update next node parent ptr. */ + scb->next_scb_ptr->parent_scb_ptr = scb->parent_scb_ptr; + } + scb->next_scb_ptr = ins->the_null_scb; + } + + spin_lock_irqsave(&chip->reg_lock, flags); + /* update entry in DSP RAM */ + snd_cs46xx_poke(chip, + (scb->address + SCBsubListPtr) << 2, + (scb->sub_list_ptr->address << 0x10) | + (scb->next_scb_ptr->address)); + /* update parent entry in DSP RAM */ + snd_cs46xx_poke(chip, + (scb->parent_scb_ptr->address + SCBsubListPtr) << 2, + (scb->parent_scb_ptr->sub_list_ptr->address << 0x10) | + (scb->parent_scb_ptr->next_scb_ptr->address)); + + scb->parent_scb_ptr = NULL; + spin_unlock_irqrestore(&chip->reg_lock, flags); + } +} + +void cs46xx_dsp_remove_scb (cs46xx_t *chip, dsp_scb_descriptor_t * scb) +{ + dsp_spos_instance_t * ins = chip->dsp_spos_instance; + + down(&ins->scb_mutex); + /* check integrety */ + snd_assert ( (scb->index >= 0 && + scb->index < ins->nscb && + (ins->scbs + scb->index) == scb), goto _end ); + +#if 0 + /* cant remove a SCB with childs before + removing childs first */ + snd_assert ( (scb->sub_list_ptr == ins->the_null_scb && + scb->next_scb_ptr == ins->the_null_scb), + goto _end); +#endif + + _dsp_unlink_scb (chip,scb); + + cs46xx_dsp_proc_free_scb_desc(scb); + snd_assert (scb->scb_symbol != NULL, goto _end); + remove_symbol (chip,scb->scb_symbol); + + ins->scbs[scb->index].deleted = 1; + + if (scb->index < ins->scb_highest_frag_index) + ins->scb_highest_frag_index = scb->index; + + if (scb->index == ins->nscb - 1) { + ins->nscb --; + } + + if (ins->scb_highest_frag_index > ins->nscb) { + ins->scb_highest_frag_index = ins->nscb; + } + +#if 0 + /* !!!! THIS IS A PIECE OF SHIT MADE BY ME !!! */ + for(i = scb->index + 1;i < ins->nscb; ++i) { + ins->scbs[i - 1].index = i - 1; + } +#endif + +#ifdef CONFIG_SND_DEBUG + _end: +#endif + up(&ins->scb_mutex); +} + + +void cs46xx_dsp_proc_free_scb_desc (dsp_scb_descriptor_t * scb) +{ + if (scb->proc_info) { + proc_scb_info_t * scb_info = (proc_scb_info_t *)scb->proc_info->private_data; + + snd_printdd("cs46xx_dsp_proc_free_scb_desc: freeing %s\n",scb->scb_name); + + snd_info_unregister(scb->proc_info); + scb->proc_info = NULL; + + snd_assert (scb_info != NULL, return); + kfree (scb_info); + } +} + +void cs46xx_dsp_proc_register_scb_desc (cs46xx_t *chip,dsp_scb_descriptor_t * scb) +{ + dsp_spos_instance_t * ins = chip->dsp_spos_instance; + snd_info_entry_t * entry; + proc_scb_info_t * scb_info; + + down(&ins->scb_mutex); + /* register to proc */ + if (ins->snd_card != NULL && ins->proc_dsp_dir != NULL && + scb->proc_info == NULL) { + + 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->chip = chip; + scb_info->scb_desc = scb; + + entry->content = SNDRV_INFO_CONTENT_TEXT; + entry->private_data = scb_info; + entry->mode = S_IFREG | S_IRUGO | S_IWUSR; + + entry->c.text.read_size = 512; + entry->c.text.read = cs46xx_dsp_proc_scb_info_read; + + if (snd_info_register(entry) < 0) { + snd_info_free_entry(entry); + kfree (scb_info); + entry = NULL; + } + } + + scb->proc_info = entry; + } + up(&ins->scb_mutex); +} + +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, + int scb_child_type) +{ + dsp_spos_instance_t * ins = chip->dsp_spos_instance; + dsp_scb_descriptor_t * scb; + + unsigned long flags; + + down(&ins->scb_mutex); + snd_assert (ins->the_null_scb != NULL,goto _fail_end); + + /* fill the data that will be wroten to DSP */ + scb_data[SCBsubListPtr] = + (ins->the_null_scb->address << 0x10) | ins->the_null_scb->address; + + scb_data[SCBfuncEntryPtr] &= 0xFFFF0000; + scb_data[SCBfuncEntryPtr] |= task_entry->address; + + snd_printdd("dsp_spos: creating SCB <%s>\n",name); + + scb = cs46xx_dsp_create_scb(chip,name,scb_data,dest); + + + scb->sub_list_ptr = ins->the_null_scb; + scb->next_scb_ptr = ins->the_null_scb; + + scb->parent_scb_ptr = parent_scb; + scb->task_entry = task_entry; + + + /* update parent SCB */ + if (scb->parent_scb_ptr) { +#if 0 + printk ("scb->parent_scb_ptr = %s\n",scb->parent_scb_ptr->scb_name); + printk ("scb->parent_scb_ptr->next_scb_ptr = %s\n",scb->parent_scb_ptr->next_scb_ptr->scb_name); + printk ("scb->parent_scb_ptr->sub_list_ptr = %s\n",scb->parent_scb_ptr->sub_list_ptr->scb_name); +#endif + /* link to parent SCB */ + if (scb_child_type == SCB_ON_PARENT_NEXT_SCB) { + snd_assert ( (scb->parent_scb_ptr->next_scb_ptr == ins->the_null_scb), + goto _fail_end); + + scb->parent_scb_ptr->next_scb_ptr = scb; + + } else if (scb_child_type == SCB_ON_PARENT_SUBLIST_SCB) { + snd_assert ( (scb->parent_scb_ptr->sub_list_ptr == ins->the_null_scb), + goto _fail_end); + + scb->parent_scb_ptr->sub_list_ptr = scb; + } else { + snd_assert (0,goto _fail_end); + } + + spin_lock_irqsave(&chip->reg_lock, flags); + /* update entry in DSP RAM */ + snd_cs46xx_poke(chip, + (scb->parent_scb_ptr->address + SCBsubListPtr) << 2, + (scb->parent_scb_ptr->sub_list_ptr->address << 0x10) | + (scb->parent_scb_ptr->next_scb_ptr->address)); + + spin_unlock_irqrestore(&chip->reg_lock, flags); + } + + + up(&ins->scb_mutex); + + cs46xx_dsp_proc_register_scb_desc (chip,scb); + + return scb; +#ifdef CONFIG_SND_DEBUG + _fail_end: + + up(&ins->scb_mutex); + return NULL; +#endif +} + +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, + int scb_child_type) +{ + symbol_entry_t * task_entry; + + task_entry = cs46xx_dsp_lookup_symbol (chip,task_entry_name, + SYMBOL_CODE); + + if (task_entry == NULL) { + snd_printk (KERN_ERR "dsp_spos: symbol %s not found\n",task_entry_name); + return NULL; + } + + return _dsp_create_generic_scb (chip,name,scb_data,dest,task_entry, + parent_scb,scb_child_type); +} + +dsp_scb_descriptor_t * +cs46xx_dsp_create_timing_master_scb (cs46xx_t *chip) +{ + dsp_scb_descriptor_t * scb; + + timing_master_scb_t timing_master_scb = { + { 0, + 0, + 0, + 0 + }, + { 0, + 0, + 0, + 0, + 0 + }, + 0,0, + 0,NULL_SCB_ADDR, + 0,0, /* extraSampleAccum:TMreserved */ + 0,0, /* codecFIFOptr:codecFIFOsyncd */ + 0x0001,0x8000, /* fracSampAccumQm1:TMfrmsLeftInGroup */ + 0x0001,0x0000, /* fracSampCorrectionQm1:TMfrmGroupLength */ + 0x00060000 /* nSampPerFrmQ15 */ + }; + + scb = cs46xx_dsp_create_generic_scb(chip,"TimingMasterSCBInst",(u32 *)&timing_master_scb, + TIMINGMASTER_SCB_ADDR, + "TIMINGMASTER",NULL,SCB_NO_PARENT); + + return scb; +} + + +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 * scb; + + codec_output_scb_t codec_out_scb = { + { 0, + 0, + 0, + 0 + }, + { + 0, + 0, + 0, + 0, + 0 + }, + 0,0, + 0,NULL_SCB_ADDR, + 0, /* COstrmRsConfig */ + 0, /* COstrmBufPtr */ + channel_disp,fifo_addr, /* leftChanBaseIOaddr:rightChanIOdisp */ + 0x0000,0x0080, /* (!AC97!) COexpVolChangeRate:COscaleShiftCount */ + 0,child_scb_addr /* COreserved - need child scb to work with rom code */ + }; + + + scb = cs46xx_dsp_create_generic_scb(chip,codec_name,(u32 *)&codec_out_scb, + dest,"S16_CODECOUTPUTTASK",parent_scb, + scb_child_type); + + 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) +{ + + dsp_scb_descriptor_t * scb; + codec_input_scb_t codec_input_scb = { + { 0, + 0, + 0, + 0 + }, + { + 0, + 0, + 0, + 0, + 0 + }, + +#if 0 /* cs4620 */ + SyncIOSCB,NULL_SCB_ADDR +#else + 0 , 0, +#endif + 0,0, + + RSCONFIG_SAMPLE_16STEREO + RSCONFIG_MODULO_64, /* strmRsConfig */ + sample_buffer_addr << 0x10, /* strmBufPtr; defined as a dword ptr, used as a byte ptr */ + channel_disp,fifo_addr, /* (!AC97!) leftChanBaseINaddr=AC97primary + link input slot 3 :rightChanINdisp=""slot 4 */ + 0x0000,0x0000, /* (!AC97!) ????:scaleShiftCount; no shift needed + because AC97 is already 20 bits */ + 0x80008000 /* ??clw cwcgame.scb has 0 */ + }; + + scb = cs46xx_dsp_create_generic_scb(chip,codec_name,(u32 *)&codec_input_scb, + dest,"S16_CODECINPUTTASK",parent_scb, + scb_child_type); + return scb; +} + + +dsp_scb_descriptor_t * +cs46xx_dsp_create_pcm_reader_scb(cs46xx_t * chip,char * scb_name, + u16 sample_buffer_addr,u32 dest, + int virtual_channel, u32 playback_hw_addr, + dsp_scb_descriptor_t * parent_scb, + int scb_child_type) +{ + dsp_spos_instance_t * ins = chip->dsp_spos_instance; + dsp_scb_descriptor_t * scb; + + generic_scb_t pcm_reader_scb = { + + /* + Play DMA Task xfers data from host buffer to SP buffer + init/runtime variables: + PlayAC: Play Audio Data Conversion - SCB loc: 2nd dword, mask: 0x0000F000L + DATA_FMT_16BIT_ST_LTLEND(0x00000000L) from 16-bit stereo, little-endian + DATA_FMT_8_BIT_ST_SIGNED(0x00001000L) from 8-bit stereo, signed + DATA_FMT_16BIT_MN_LTLEND(0x00002000L) from 16-bit mono, little-endian + DATA_FMT_8_BIT_MN_SIGNED(0x00003000L) from 8-bit mono, signed + DATA_FMT_16BIT_ST_BIGEND(0x00004000L) from 16-bit stereo, big-endian + DATA_FMT_16BIT_MN_BIGEND(0x00006000L) from 16-bit mono, big-endian + DATA_FMT_8_BIT_ST_UNSIGNED(0x00009000L) from 8-bit stereo, unsigned + DATA_FMT_8_BIT_MN_UNSIGNED(0x0000b000L) from 8-bit mono, unsigned + ? Other combinations possible from: + DMA_RQ_C2_AUDIO_CONVERT_MASK 0x0000F000L + DMA_RQ_C2_AC_NONE 0x00000000L + DMA_RQ_C2_AC_8_TO_16_BIT 0x00001000L + DMA_RQ_C2_AC_MONO_TO_STEREO 0x00002000L + DMA_RQ_C2_AC_ENDIAN_CONVERT 0x00004000L + DMA_RQ_C2_AC_SIGNED_CONVERT 0x00008000L + + HostBuffAddr: Host Buffer Physical Byte Address - SCB loc:3rd dword, Mask: 0xFFFFFFFFL + aligned to dword boundary + */ + /* Basic (non scatter/gather) DMA requestor (4 ints) */ + { DMA_RQ_C1_SOURCE_ON_HOST + /* source buffer is on the host */ + DMA_RQ_C1_SOURCE_MOD1024 + /* source buffer is 1024 dwords (4096 bytes) */ + DMA_RQ_C1_DEST_MOD32 + /* dest buffer(PCMreaderBuf) is 32 dwords*/ + DMA_RQ_C1_WRITEBACK_SRC_FLAG + /* ?? */ + DMA_RQ_C1_WRITEBACK_DEST_FLAG + /* ?? */ + 15, /* DwordCount-1: picked 16 for DwordCount because Jim */ + /* Barnette said that is what we should use since */ + /* we are not running in optimized mode? */ + DMA_RQ_C2_AC_NONE + + DMA_RQ_C2_SIGNAL_SOURCE_PINGPONG + /* set play interrupt (bit0) in HISR when source */ + /* buffer (on host) crosses half-way point */ + virtual_channel, /* Play DMA channel arbitrarily set to 0 */ + playback_hw_addr, /* HostBuffAddr (source) */ + DMA_RQ_SD_SP_SAMPLE_ADDR + /* destination buffer is in SP Sample Memory */ + sample_buffer_addr /* SP Buffer Address (destination) */ + }, + /* Scatter/gather DMA requestor extension (5 ints) */ + { + 0, + 0, + 0, + 0, + 0 + }, + /* Sublist pointer & next stream control block (SCB) link. */ + NULL_SCB_ADDR,NULL_SCB_ADDR, + /* Pointer to this tasks parameter block & stream function pointer */ + 0,NULL_SCB_ADDR, + /* rsConfig register for stream buffer (rsDMA reg. is loaded from basicReq.daw */ + /* for incoming streams, or basicReq.saw, for outgoing streams) */ + RSCONFIG_DMA_ENABLE + /* enable DMA */ + (19 << RSCONFIG_MAX_DMA_SIZE_SHIFT) + /* MAX_DMA_SIZE picked to be 19 since SPUD */ + /* uses it for some reason */ + ((dest >> 4) << RSCONFIG_STREAM_NUM_SHIFT) + /* stream number = SCBaddr/16 */ + RSCONFIG_SAMPLE_16STEREO + + RSCONFIG_MODULO_32, /* dest buffer(PCMreaderBuf) is 32 dwords (256 bytes) */ + /* Stream sample pointer & MAC-unit mode for this stream */ + (sample_buffer_addr << 0x10), + /* Fractional increment per output sample in the input sample buffer */ + 0, + { + /* Standard stereo volume control */ + 0x8000,0x8000, + 0x8000,0x8000 + } + }; + + if (ins->null_algorithm == NULL) { + ins->null_algorithm = cs46xx_dsp_lookup_symbol (chip,"NULLALGORITHM", + SYMBOL_CODE); + + if (ins->null_algorithm == NULL) { + snd_printk (KERN_ERR "dsp_spos: symbol NULLALGORITHM not found\n"); + return NULL; + } + } + + scb = _dsp_create_generic_scb(chip,scb_name,(u32 *)&pcm_reader_scb, + dest,ins->null_algorithm,parent_scb, + scb_child_type); + + return scb; +} + +dsp_scb_descriptor_t * +cs46xx_dsp_create_src_task_scb(cs46xx_t * chip,char * scb_name, + u16 src_buffer_addr, + u16 src_delay_buffer_addr,u32 dest, + dsp_scb_descriptor_t * parent_scb, + int scb_child_type) +{ + + dsp_spos_instance_t * ins = chip->dsp_spos_instance; + dsp_scb_descriptor_t * scb; + + src_task_scb_t src_task_scb = { + 0x0028,0x00c8, + 0x5555,0x0000, + 0x0000,0x0000, + src_buffer_addr,1, + 0x0028,0x00c8, + RSCONFIG_SAMPLE_16STEREO + RSCONFIG_MODULO_32, + 0x0000,src_delay_buffer_addr, + 0x0, + 0x80,(src_delay_buffer_addr + (24 * 4)), + 0,0, /* next_scb, sub_list_ptr */ + 0,0, /* entry, this_spb */ + RSCONFIG_SAMPLE_16STEREO + RSCONFIG_MODULO_8, + src_buffer_addr << 0x10, + 0x04000000, + { + 0x8000,0x8000, + 0xFFFF,0xFFFF + } + }; + + if (ins->s16_up == NULL) { + ins->s16_up = cs46xx_dsp_lookup_symbol (chip,"S16_UPSRC", + SYMBOL_CODE); + + if (ins->s16_up == NULL) { + snd_printk (KERN_ERR "dsp_spos: symbol S16_UPSRC not found\n"); + return NULL; + } + } + + scb = _dsp_create_generic_scb(chip,scb_name,(u32 *)&src_task_scb, + dest,ins->s16_up,parent_scb, + scb_child_type); + + return scb; +} + + +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) +{ + dsp_scb_descriptor_t * scb; + + mix_only_scb_t master_mix_scb = { + /* 0 */ { 0, + /* 1 */ 0, + /* 2 */ mix_buffer_addr, + /* 3 */ 0 + /* */ }, + { + /* 4 */ 0, + /* 5 */ 0, + /* 6 */ 0, + /* 7 */ 0, + /* 8 */ 0x00000080 + }, + /* 9 */ 0,0, + /* A */ 0,0, + /* B */ RSCONFIG_SAMPLE_16STEREO + RSCONFIG_MODULO_64, + /* C */ (mix_buffer_addr + (32 * 4)) << 0x10, + /* D */ 0, + { + /* E */ 0x8000,0x8000, + /* F */ 0xFFFF,0xFFFF + } + }; + + + scb = cs46xx_dsp_create_generic_scb(chip,scb_name,(u32 *)&master_mix_scb, + dest,"S16_MIX",parent_scb, + scb_child_type); + return scb; +} + + +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 * scb; + + mix2_ostream_scb_t mix2_ostream_scb = { + /* Basic (non scatter/gather) DMA requestor (4 ints) */ + { + DMA_RQ_C1_SOURCE_MOD64 + + DMA_RQ_C1_DEST_ON_HOST + + DMA_RQ_C1_DEST_MOD1024 + + DMA_RQ_C1_WRITEBACK_SRC_FLAG + + DMA_RQ_C1_WRITEBACK_DEST_FLAG + + 15, + + DMA_RQ_C2_AC_NONE + + DMA_RQ_C2_SIGNAL_DEST_PINGPONG + + + 1, + DMA_RQ_SD_SP_SAMPLE_ADDR + + mix_buffer_addr, + 0x0 + }, + + { 0, 0, 0, 0, 0, }, + 0,0, + 0,writeback_spb, + + RSCONFIG_DMA_ENABLE + + (19 << RSCONFIG_MAX_DMA_SIZE_SHIFT) + + + ((dest >> 4) << RSCONFIG_STREAM_NUM_SHIFT) + + RSCONFIG_DMA_TO_HOST + + RSCONFIG_SAMPLE_16STEREO + + RSCONFIG_MODULO_64, + (mix_buffer_addr + (32 * 4)) << 0x10, + 1,0, + 0x0001,0x0080, + 0xFFFF,0 + }; + + + scb = cs46xx_dsp_create_generic_scb(chip,scb_name,(u32 *)&mix2_ostream_scb, + dest,"S16_MIX_TO_OSTREAM",parent_scb, + scb_child_type); + + return scb; +} + + +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 * scb; + + vari_decimate_scb_t vari_decimate_scb = { + 0x0028,0x00c8, + 0x5555,0x0000, + 0x0000,0x0000, + vari_buffer_addr0,vari_buffer_addr1, + + 0x0028,0x00c8, + RSCONFIG_SAMPLE_16STEREO + RSCONFIG_MODULO_256, + + 0xFF800000, + 0, + 0x0080,vari_buffer_addr1 + (25 * 4), + + 0,0, + 0,0, + + RSCONFIG_SAMPLE_16STEREO + RSCONFIG_MODULO_8, + vari_buffer_addr0 << 0x10, + 0x04000000, + { + 0x8000,0x8000, + 0xFFFF,0xFFFF + } + }; + + scb = cs46xx_dsp_create_generic_scb(chip,scb_name,(u32 *)&vari_decimate_scb, + dest,"VARIDECIMATE",parent_scb, + scb_child_type); + + return scb; +} + + +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, + int scb_child_type) +{ + + dsp_scb_descriptor_t * scb; + + + pcm_serial_input_scb_t pcm_serial_input_scb = { + { 0, + 0, + 0, + 0 + }, + { + 0, + 0, + 0, + 0, + 0 + }, + + 0,0, + 0,0, + + 0x000000c1, + 0, + 0,input_scb->address, + { + 0x8000,0x8000, + 0x8000,0x8000 + } + }; + + scb = cs46xx_dsp_create_generic_scb(chip,scb_name,(u32 *)&pcm_serial_input_scb, + dest,"PCMSERIALINPUTTASK",parent_scb, + scb_child_type); + return scb; +} + + +dsp_scb_descriptor_t * +cs46xx_dsp_create_asynch_fg_tx_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 * scb; + + asynch_fg_tx_scb_t 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 */ + 0,hfg_scb_address, /* Point to HFG task SCB */ + 0,0, /* Initialize current Delta and Consumer ptr adjustment count */ + 0, /* Initialize accumulated Phi to 0 */ + 0,0x2aab, /* Const 1/3 */ + + { + 0, /* Define the unused elements */ + 0, + 0 + }, + + 0,0, + 0,dest + AFGTxAccumPhi, + + 0x000000c5, /* Stereo, 256 dword */ + (asynch_buffer_address) << 0x10, /* This should be automagically synchronized + to the producer pointer */ + + /* There is no correct initial value, it will depend upon the detected + rate etc */ + 0x18000000, /* Phi increment for approx 32k operation */ + 0x8000,0x8000, /* Volume controls are unused at this time */ + 0x8000,0x8000 + }; + + scb = cs46xx_dsp_create_generic_scb(chip,scb_name,(u32 *)&asynch_fg_tx_scb, + dest,"ASYNCHFGTXCODE",parent_scb, + scb_child_type); + + return scb; +} + + +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 * scb; + + asynch_fg_rx_scb_t asynch_fg_rx_scb = { + 0xff00,0x00ff, /* Prototype sample buffer size of 512 dwords */ + 0x0064,0x001c, /* Min Delta 7 dwords == 28 bytes */ + /* : Max delta 25 dwords == 100 bytes */ + 0,hfg_scb_address, /* Point to HFG task SCB */ + 0,0, /* Initialize current Delta and Consumer ptr adjustment count */ + { + 0, /* Define the unused elements */ + 0, + 0, + 0, + 0 + }, + + 0,0, + 0,dest, + + 0x000000c3, /* Stereo, 512 dword */ + (asynch_buffer_address << 0x10), /* This should be automagically + synchrinized to the producer pointer */ + + /* There is no correct initial value, it will depend upon the detected + rate etc */ + 0, + 0x8000,0x8000, + 0xFFFF,0xFFFF + }; + + scb = cs46xx_dsp_create_generic_scb(chip,scb_name,(u32 *)&asynch_fg_rx_scb, + dest,"ASYNCHFGRXCODE",parent_scb, + scb_child_type); + + return scb; +} + + +dsp_scb_descriptor_t * +cs46xx_dsp_create_output_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) +{ + + dsp_scb_descriptor_t * scb; + + output_snoop_scb_t output_snoop_scb = { + { 0, /* not used. Zero */ + 0, + 0, + 0, + }, + { + 0, /* not used. Zero */ + 0, + 0, + 0, + 0 + }, + + 0,0, + 0,0, + + 0x000000c3, + snoop_buffer_address << 0x10, + 0,0, + 0, + 0,snoop_scb->address + }; + + scb = cs46xx_dsp_create_generic_scb(chip,scb_name,(u32 *)&output_snoop_scb, + dest,"OUTPUTSNOOP",parent_scb, + scb_child_type); + return scb; +} + + +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 * scb; + + spio_write_scb_t spio_write_scb = { + 0,0, /* SPIOWAddress2:SPIOWAddress1; */ + 0, /* SPIOWData1; */ + 0, /* SPIOWData2; */ + 0,0, /* SPIOWAddress4:SPIOWAddress3; */ + 0, /* SPIOWData3; */ + 0, /* SPIOWData4; */ + 0,0, /* SPIOWDataPtr:Unused1; */ + { 0,0 }, /* Unused2[2]; */ + + 0,0, /* SPIOWChildPtr:SPIOWSiblingPtr; */ + 0,0, /* SPIOWThisPtr:SPIOWEntryPoint; */ + + { + 0, + 0, + 0, + 0, + 0 /* Unused3[5]; */ + } + }; + + scb = cs46xx_dsp_create_generic_scb(chip,scb_name,(u32 *)&spio_write_scb, + dest,"SPIOWRITE",parent_scb, + scb_child_type); + + 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) +{ + dsp_scb_descriptor_t * scb; + + magic_snoop_task_t magic_snoop_scb = { + /* 0 */ 0, /* i0 */ + /* 1 */ 0, /* i1 */ + /* 2 */ snoop_buffer_address << 0x10, + /* 3 */ 0,snoop_scb->address, + /* 4 */ 0, /* i3 */ + /* 5 */ 0, /* i4 */ + /* 6 */ 0, /* i5 */ + /* 7 */ 0, /* i6 */ + /* 8 */ 0, /* i7 */ + /* 9 */ 0,0, /* next_scb, sub_list_ptr */ + /* A */ 0,0, /* entry_point, this_ptr */ + /* B */ RSCONFIG_SAMPLE_16STEREO + RSCONFIG_MODULO_64, + /* C */ snoop_buffer_address << 0x10, + /* D */ 0, + /* E */ { 0x8000,0x8000, + /* F */ 0xffff,0xffff + } + }; + + scb = cs46xx_dsp_create_generic_scb(chip,scb_name,(u32 *)&magic_snoop_scb, + dest,"MAGICSNOOPTASK",parent_scb, + scb_child_type); + + return scb; +} + +static dsp_scb_descriptor_t * find_next_free_scb (cs46xx_t * chip,dsp_scb_descriptor_t * from) +{ + dsp_spos_instance_t * ins = chip->dsp_spos_instance; + dsp_scb_descriptor_t * scb = from; + + while (scb->next_scb_ptr != ins->the_null_scb) { + snd_assert (scb->next_scb_ptr != NULL, return NULL); + + scb = scb->next_scb_ptr; + } + + return scb; +} + +static u32 pcm_reader_buffer_addr[DSP_MAX_PCM_CHANNELS] = { + 0x0600, /* 1 */ + 0x1500, /* 2 */ + 0x1580, /* 3 */ + 0x1600, /* 4 */ + 0x1680, /* 5 */ + 0x1700, /* 6 */ + 0x1780, /* 7 */ + 0x1800, /* 8 */ + 0x1880, /* 9 */ + 0x1900, /* 10 */ + 0x1980, /* 11 */ + 0x1A00, /* 12 */ + 0x1A80, /* 13 */ + 0x1B00, /* 14 */ + 0x1B80, /* 15 */ + 0x1C00, /* 16 */ + 0x1C80, /* 17 */ + 0x1D00, /* 18 */ + 0x1D80, /* 19 */ + 0x1E00, /* 20 */ + 0x1E80, /* 21 */ + 0x1F00, /* 22 */ + 0x1F80, /* 23 */ + 0x2000, /* 24 */ + 0x2080, /* 25 */ + 0x2100, /* 26 */ + 0x2180, /* 27 */ + 0x2200, /* 28 */ + 0x2280, /* 29 */ + 0x2300, /* 30 */ + 0x2380, /* 31 */ + 0x2400, /* 32 */ +}; + +static u32 src_output_buffer_addr[DSP_MAX_SRC_NR] = { + 0x2580, + 0x2680, + 0x2780, + 0x2980, + 0x2A80, + 0x2B80, +}; + +static u32 src_delay_buffer_addr[DSP_MAX_SRC_NR] = { + 0x2600, + 0x2700, + 0x2800, + 0x2900, + 0x2A00, + 0x2B00, +}; + +pcm_channel_descriptor_t * cs46xx_dsp_create_pcm_channel (cs46xx_t * chip,u32 sample_rate, void * private_data) +{ + dsp_spos_instance_t * ins = chip->dsp_spos_instance; + dsp_scb_descriptor_t * src_scb = NULL,* pcm_scb; + dsp_scb_descriptor_t * pcm_parent_scb; + char scb_name[DSP_MAX_SCB_NAME]; + int i,pcm_index = -1, insert_point, src_index = -1; + unsigned long flags; + + down(&ins->pcm_mutex); + + /* default sample rate is 44100 */ + if (!sample_rate) sample_rate = 44100; + + /* search for a already created SRC SCB with the same sample rate */ + for (i = 0; i < DSP_MAX_PCM_CHANNELS && + (pcm_index == -1 || src_scb == NULL); ++i) { + + /* virtual channel reserved + for capture */ + if (i == 1) continue; + + if (ins->pcm_channels[i].active) { + if (!src_scb && ins->pcm_channels[i].sample_rate == sample_rate) { + src_scb = ins->pcm_channels[i].src_scb; + ins->pcm_channels[i].src_scb->ref_count ++; + src_index = ins->pcm_channels[i].src_slot; + } + } else if (pcm_index == -1) { + pcm_index = i; + } + } + + if (pcm_index == -1) { + snd_printk (KERN_ERR "dsp_spos: no free PCM channel\n"); + goto _end; + } + + if (src_scb == NULL) { + dsp_scb_descriptor_t * src_parent_scb; + + if (ins->nsrc_scb >= DSP_MAX_SRC_NR) { + snd_printk(KERN_ERR "dsp_spos: to many SRC instances\n!"); + goto _end; + } + + /* find a free slot */ + for (i = 0; i < DSP_MAX_SRC_NR; ++i) { + if (ins->src_scb_slots[i] == 0) { + src_index = i; + ins->src_scb_slots[i] = 1; + break; + } + } + snd_assert (src_index != -1,goto _end); + + /* we need to create a new SRC SCB */ + if (ins->master_mix_scb->sub_list_ptr == ins->the_null_scb) { + src_parent_scb = ins->master_mix_scb; + insert_point = SCB_ON_PARENT_SUBLIST_SCB; + } else { + src_parent_scb = find_next_free_scb(chip,ins->master_mix_scb->sub_list_ptr); + insert_point = SCB_ON_PARENT_NEXT_SCB; + } + + snprintf (scb_name,DSP_MAX_SCB_NAME,"SrcTask_SCB%d",src_index); + + snd_printdd( "dsp_spos: creating SRC \"%s\"\n",scb_name); + src_scb = cs46xx_dsp_create_src_task_scb(chip,scb_name, + src_output_buffer_addr[src_index], + src_delay_buffer_addr[src_index], + /* 0x400 - 0x600 source SCBs */ + 0x400 + (src_index * 0x10) , + src_parent_scb, + insert_point); + + if (!src_scb) { + snd_printk (KERN_ERR "dsp_spos: failed to create SRCtaskSCB\n"); + goto _end; + } + + cs46xx_dsp_set_src_sample_rate(chip,src_scb,sample_rate); + + ins->nsrc_scb ++; + + /* insert point for the PCMreader task */ + pcm_parent_scb = src_scb; + insert_point = SCB_ON_PARENT_SUBLIST_SCB; + } else { + snd_assert (src_scb->sub_list_ptr != ins->the_null_scb, goto _end); + pcm_parent_scb = find_next_free_scb(chip,src_scb->sub_list_ptr); + + insert_point = SCB_ON_PARENT_NEXT_SCB; + } + + + + snprintf (scb_name,DSP_MAX_SCB_NAME,"PCMReader_SCB%d",pcm_index); + + snd_printdd( "dsp_spos: creating PCM \"%s\"\n",scb_name); + + pcm_scb = cs46xx_dsp_create_pcm_reader_scb(chip,scb_name, + pcm_reader_buffer_addr[pcm_index], + /* 0x200 - 400 PCMreader SCBs */ + (pcm_index * 0x10) + 0x200, + pcm_index, /* virtual channel 0-31 */ + 0, /* pcm hw addr */ + pcm_parent_scb, + insert_point); + + if (!pcm_scb) { + snd_printk (KERN_ERR "dsp_spos: failed to create PCMreaderSCB\n"); + goto _end; + } + + spin_lock_irqsave(&chip->reg_lock, flags); + ins->pcm_channels[pcm_index].sample_rate = sample_rate; + ins->pcm_channels[pcm_index].pcm_reader_scb = pcm_scb; + ins->pcm_channels[pcm_index].src_scb = src_scb; + ins->pcm_channels[pcm_index].unlinked = 0; + ins->pcm_channels[pcm_index].private_data = private_data; + ins->pcm_channels[pcm_index].src_slot = src_index; + ins->pcm_channels[pcm_index].active = 1; + ins->pcm_channels[pcm_index].pcm_slot = pcm_index; + ins->npcm_channels ++; + spin_unlock_irqrestore(&chip->reg_lock, flags); + + up(&ins->pcm_mutex); + return (ins->pcm_channels + pcm_index); + _end: + + up(&ins->pcm_mutex); + return NULL; +} + +void cs46xx_dsp_destroy_pcm_channel (cs46xx_t * chip,pcm_channel_descriptor_t * pcm_channel) +{ + dsp_spos_instance_t * ins = chip->dsp_spos_instance; + unsigned long flags; + + down(&ins->pcm_mutex); + + snd_assert(pcm_channel->active,goto _end); + snd_assert(ins->npcm_channels > 0,goto _end); + snd_assert(pcm_channel->src_scb->ref_count > 0,goto _end); + + spin_lock_irqsave(&chip->reg_lock, flags); + pcm_channel->unlinked = 1; + pcm_channel->active = 0; + pcm_channel->private_data = NULL; + pcm_channel->src_scb->ref_count --; + ins->npcm_channels --; + spin_unlock_irqrestore(&chip->reg_lock, flags); + + cs46xx_dsp_remove_scb(chip,pcm_channel->pcm_reader_scb); + + if (!pcm_channel->src_scb->ref_count) { + cs46xx_dsp_remove_scb(chip,pcm_channel->src_scb); + + snd_assert (pcm_channel->src_slot >= 0 && pcm_channel->src_slot <= DSP_MAX_SRC_NR, + goto _end); + + ins->src_scb_slots[pcm_channel->src_slot] = 0; + ins->nsrc_scb --; + } + + +#ifdef CONFIG_SND_DEBUG + _end: +#endif + + up(&ins->pcm_mutex); +} + +int cs46xx_dsp_pcm_unlink (cs46xx_t * chip,pcm_channel_descriptor_t * pcm_channel) +{ + dsp_spos_instance_t * ins = chip->dsp_spos_instance; + unsigned long flags; + + down(&ins->pcm_mutex); + down(&ins->scb_mutex); + + snd_assert(pcm_channel->active,goto _end); + snd_assert(ins->npcm_channels > 0,goto _end); + + if (pcm_channel->unlinked) + goto _end; + + spin_lock_irqsave(&chip->reg_lock, flags); + pcm_channel->unlinked = 1; + spin_unlock_irqrestore(&chip->reg_lock, flags); + + _dsp_unlink_scb (chip,pcm_channel->pcm_reader_scb); + + _end: + up(&ins->scb_mutex); + up(&ins->pcm_mutex); + + return 0; +} + +int cs46xx_dsp_pcm_link (cs46xx_t * chip,pcm_channel_descriptor_t * 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; + unsigned long flags; + + down(&ins->pcm_mutex); + down(&ins->scb_mutex); + + if (pcm_channel->unlinked == 0) + goto _end; + + if (src_scb->sub_list_ptr == ins->the_null_scb) { + parent_scb = src_scb; + parent_scb->sub_list_ptr = pcm_channel->pcm_reader_scb; + } else { + parent_scb = find_next_free_scb(chip,src_scb->sub_list_ptr); + parent_scb->next_scb_ptr = pcm_channel->pcm_reader_scb; + } + + snd_assert (pcm_channel->pcm_reader_scb->parent_scb_ptr == NULL, ; ); + pcm_channel->pcm_reader_scb->parent_scb_ptr = parent_scb; + + /* update entry in DSP RAM */ + spin_lock_irqsave(&chip->reg_lock, flags); + snd_cs46xx_poke(chip, + (parent_scb->address + SCBsubListPtr) << 2, + (parent_scb->sub_list_ptr->address << 0x10) | + (parent_scb->next_scb_ptr->address)); + + pcm_channel->unlinked = 0; + spin_unlock_irqrestore(&chip->reg_lock, flags); + + _end: + up(&ins->scb_mutex); + up(&ins->pcm_mutex); + + return 0; +} + +#define GOF_PER_SEC 200 + +void cs46xx_dsp_set_src_sample_rate(cs46xx_t *chip,dsp_scb_descriptor_t * src, u32 rate) +{ + unsigned long flags; + unsigned int tmp1, tmp2; + unsigned int phiIncr; + unsigned int correctionPerGOF, correctionPerSec; + + snd_printdd( "dsp_spos: setting SRC rate to %u\n",rate); + /* + * Compute the values used to drive the actual sample rate conversion. + * The following formulas are being computed, using inline assembly + * since we need to use 64 bit arithmetic to compute the values: + * + * phiIncr = floor((Fs,in * 2^26) / Fs,out) + * correctionPerGOF = floor((Fs,in * 2^26 - Fs,out * phiIncr) / + * GOF_PER_SEC) + * ulCorrectionPerSec = Fs,in * 2^26 - Fs,out * phiIncr -M + * GOF_PER_SEC * correctionPerGOF + * + * i.e. + * + * phiIncr:other = dividend:remainder((Fs,in * 2^26) / Fs,out) + * correctionPerGOF:correctionPerSec = + * dividend:remainder(ulOther / GOF_PER_SEC) + */ + tmp1 = rate << 16; + phiIncr = tmp1 / 48000; + tmp1 -= phiIncr * 48000; + tmp1 <<= 10; + phiIncr <<= 10; + tmp2 = tmp1 / 48000; + phiIncr += tmp2; + tmp1 -= tmp2 * 48000; + correctionPerGOF = tmp1 / GOF_PER_SEC; + tmp1 -= correctionPerGOF * GOF_PER_SEC; + correctionPerSec = tmp1; + + /* + * Fill in the SampleRateConverter control block. + */ + spin_lock_irqsave(&chip->reg_lock, flags); + + snd_cs46xx_poke(chip, (src->address + SRCCorPerGof) << 2, + ((correctionPerSec << 16) & 0xFFFF0000) | (correctionPerGOF & 0xFFFF)); + + snd_cs46xx_poke(chip, (src->address + SRCPhiIncr6Int26Frac) << 2, phiIncr); + + spin_unlock_irqrestore(&chip->reg_lock, flags); +} diff --git a/sound/pci/cs46xx/imgs/cwc4630.h b/sound/pci/cs46xx/imgs/cwc4630.h new file mode 100644 index 0000000000000000000000000000000000000000..8bed07f9996e70043a2ab5c23f8bfc01a1018fef --- /dev/null +++ b/sound/pci/cs46xx/imgs/cwc4630.h @@ -0,0 +1,320 @@ +/* generated from cwc4630.osp DO NOT MODIFY */ + +#ifndef __HEADER_cwc4630_H__ +#define __HEADER_cwc4630_H__ + +static symbol_entry_t cwc4630_symbols[] = { + { 0x0000, "BEGINADDRESS",0x00 }, + { 0x8000, "EXECCHILD",0x03 }, + { 0x8001, "EXECCHILD_98",0x03 }, + { 0x8003, "EXECCHILD_PUSH1IND",0x03 }, + { 0x8008, "EXECSIBLING",0x03 }, + { 0x800a, "EXECSIBLING_298",0x03 }, + { 0x800b, "EXECSIBLING_2IND1",0x03 }, + { 0x8010, "TIMINGMASTER",0x03 }, + { 0x804f, "S16_CODECINPUTTASK",0x03 }, + { 0x805e, "PCMSERIALINPUTTASK",0x03 }, + { 0x806d, "S16_MIX_TO_OSTREAM",0x03 }, + { 0x809a, "S16_MIX",0x03 }, + { 0x80bb, "S16_UPSRC",0x03 }, + { 0x813b, "MIX3_EXP",0x03 }, + { 0x8164, "DECIMATEBYPOW2",0x03 }, + { 0x8197, "VARIDECIMATE",0x03 }, + { 0x81f2, "_3DINPUTTASK",0x03 }, + { 0x820a, "_3DPRLGCINPTASK",0x03 }, + { 0x8227, "_3DSTEREOINPUTTASK",0x03 }, + { 0x8242, "_3DOUTPUTTASK",0x03 }, + { 0x82c4, "HRTF_MORPH_TASK",0x03 }, + { 0x82c6, "WAIT4DATA",0x03 }, + { 0x82fa, "PROLOGIC",0x03 }, + { 0x8496, "DECORRELATOR",0x03 }, + { 0x84a4, "STEREO2MONO",0x03 }, + { 0x0070, "SPOSCB",0x02 }, + { 0x0107, "TASKTREETHREAD",0x03 }, + { 0x013c, "TASKTREEHEADERCODE",0x03 }, + { 0x0145, "FGTASKTREEHEADERCODE",0x03 }, + { 0x0169, "NULLALGORITHM",0x03 }, + { 0x016d, "HFGEXECCHILD",0x03 }, + { 0x016e, "HFGEXECCHILD_98",0x03 }, + { 0x0170, "HFGEXECCHILD_PUSH1IND",0x03 }, + { 0x0173, "HFGEXECSIBLING",0x03 }, + { 0x0175, "HFGEXECSIBLING_298",0x03 }, + { 0x0176, "HFGEXECSIBLING_2IND1",0x03 }, + { 0x0179, "S16_CODECOUTPUTTASK",0x03 }, + { 0x0194, "#CODE_END",0x00 }, +}; /* cwc4630 symbols */ + +static u32 cwc4630_code[] = { +/* BEGINADDRESS */ +/* 0000 */ 0x00040730,0x00001002,0x000f619e,0x00001003, +/* 0002 */ 0x00001705,0x00001400,0x000a411e,0x00001003, +/* 0004 */ 0x00040730,0x00001002,0x000f619e,0x00001003, +/* 0006 */ 0x00009705,0x00001400,0x000a411e,0x00001003, +/* 0008 */ 0x00040730,0x00001002,0x000f619e,0x00001003, +/* 000A */ 0x00011705,0x00001400,0x000a411e,0x00001003, +/* 000C */ 0x00040730,0x00001002,0x000f619e,0x00001003, +/* 000E */ 0x00019705,0x00001400,0x000a411e,0x00001003, +/* 0010 */ 0x00040730,0x00001002,0x000f619e,0x00001003, +/* 0012 */ 0x00021705,0x00001400,0x000a411e,0x00001003, +/* 0014 */ 0x00040730,0x00001002,0x000f619e,0x00001003, +/* 0016 */ 0x00029705,0x00001400,0x000a411e,0x00001003, +/* 0018 */ 0x00040730,0x00001002,0x000f619e,0x00001003, +/* 001A */ 0x00031705,0x00001400,0x000a411e,0x00001003, +/* 001C */ 0x00040730,0x00001002,0x000f619e,0x00001003, +/* 001E */ 0x00039705,0x00001400,0x000a411e,0x00001003, +/* 0020 */ 0x000fe19e,0x00001003,0x0009c730,0x00001003, +/* 0022 */ 0x0008e19c,0x00001003,0x000083c1,0x00093040, +/* 0024 */ 0x00098730,0x00001002,0x000ee19e,0x00001003, +/* 0026 */ 0x00009705,0x00001400,0x000a211e,0x00001003, +/* 0028 */ 0x00098730,0x00001002,0x000ee19e,0x00001003, +/* 002A */ 0x00011705,0x00001400,0x000a211e,0x00001003, +/* 002C */ 0x00098730,0x00001002,0x000ee19e,0x00001003, +/* 002E */ 0x00019705,0x00001400,0x000a211e,0x00001003, +/* 0030 */ 0x00098730,0x00001002,0x000ee19e,0x00001003, +/* 0032 */ 0x00021705,0x00001400,0x000a211e,0x00001003, +/* 0034 */ 0x00098730,0x00001002,0x000ee19e,0x00001003, +/* 0036 */ 0x00029705,0x00001400,0x000a211e,0x00001003, +/* 0038 */ 0x00098730,0x00001002,0x000ee19e,0x00001003, +/* 003A */ 0x00031705,0x00001400,0x000a211e,0x00001003, +/* 003C */ 0x00098730,0x00001002,0x000ee19e,0x00001003, +/* 003E */ 0x00039705,0x00001400,0x000a211e,0x00001003, +/* 0040 */ 0x0001a730,0x00001008,0x000e2730,0x00001002, +/* 0042 */ 0x0000a731,0x00001002,0x0000a731,0x00001002, +/* 0044 */ 0x0000a731,0x00001002,0x0000a731,0x00001002, +/* 0046 */ 0x0000a731,0x00001002,0x0000a731,0x00001002, +/* 0048 */ 0x00000000,0x00000000,0x000f619c,0x00001003, +/* 004A */ 0x0007f801,0x000c0000,0x00000037,0x00001000, +/* 004C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 004E */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0050 */ 0x00000000,0x000c0000,0x00000000,0x00000000, +/* 0052 */ 0x0000373c,0x00001000,0x00000000,0x00000000, +/* 0054 */ 0x000ee19c,0x00001003,0x0007f801,0x000c0000, +/* 0056 */ 0x00000037,0x00001000,0x00000000,0x00000000, +/* 0058 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 005A */ 0x00000000,0x00000000,0x0000273c,0x00001000, +/* 005C */ 0x00000033,0x00001000,0x000e679e,0x00001003, +/* 005E */ 0x00007705,0x00001400,0x000ac71e,0x00001003, +/* 0060 */ 0x00087fc1,0x000c3be0,0x0007f801,0x000c0000, +/* 0062 */ 0x00000037,0x00001000,0x00000000,0x00000000, +/* 0064 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0066 */ 0x00000000,0x00000000,0x0000a730,0x00001003, +/* 0068 */ 0x00000033,0x00001000,0x0007f801,0x000c0000, +/* 006A */ 0x00000037,0x00001000,0x00000000,0x00000000, +/* 006C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 006E */ 0x00000000,0x00000000,0x00000000,0x000c0000, +/* 0070 */ 0x00000032,0x00001000,0x0000273d,0x00001000, +/* 0072 */ 0x0004a730,0x00001003,0x00000f41,0x00097140, +/* 0074 */ 0x0000a841,0x0009b240,0x0000a0c1,0x0009f040, +/* 0076 */ 0x0001c641,0x00093540,0x0001cec1,0x0009b5c0, +/* 0078 */ 0x00000000,0x00000000,0x0001bf05,0x0003fc40, +/* 007A */ 0x00002725,0x000aa400,0x00013705,0x00093a00, +/* 007C */ 0x0000002e,0x0009d6c0,0x0002ef8a,0x00000000, +/* 007E */ 0x00040630,0x00001004,0x0004ef0a,0x000eb785, +/* 0080 */ 0x0003fc8a,0x00000000,0x00000000,0x000c70e0, +/* 0082 */ 0x0007d182,0x0002c640,0x00008630,0x00001004, +/* 0084 */ 0x000799b8,0x0002c6c0,0x00031705,0x00092240, +/* 0086 */ 0x00039f05,0x000932c0,0x0003520a,0x00000000, +/* 0088 */ 0x00070731,0x0000100b,0x00010705,0x000b20c0, +/* 008A */ 0x00000000,0x000eba44,0x00032108,0x000c60c4, +/* 008C */ 0x00065208,0x000c2917,0x000486b0,0x00001007, +/* 008E */ 0x00012f05,0x00036880,0x0002818e,0x000c0000, +/* 0090 */ 0x0004410a,0x00000000,0x00048630,0x00001007, +/* 0092 */ 0x00029705,0x000c0000,0x00000000,0x00000000, +/* 0094 */ 0x00003fc1,0x0003fc40,0x000037c1,0x00091b40, +/* 0096 */ 0x00003fc1,0x000911c0,0x000037c1,0x000957c0, +/* 0098 */ 0x00003fc1,0x000951c0,0x000037c1,0x00000000, +/* 009A */ 0x00003fc1,0x000991c0,0x000037c1,0x00000000, +/* 009C */ 0x00003fc1,0x0009d1c0,0x000037c1,0x00000000, +/* 009E */ 0x0001ccc1,0x000915c0,0x0001c441,0x0009d800, +/* 00A0 */ 0x0009cdc1,0x00091240,0x0001c541,0x00091d00, +/* 00A2 */ 0x0009cfc1,0x00095240,0x0001c741,0x00095c80, +/* 00A4 */ 0x000e8ca9,0x00099240,0x000e85ad,0x00095640, +/* 00A6 */ 0x00069ca9,0x00099d80,0x000e952d,0x00099640, +/* 00A8 */ 0x000eaca9,0x0009d6c0,0x000ea5ad,0x00091a40, +/* 00AA */ 0x0006bca9,0x0009de80,0x000eb52d,0x00095a40, +/* 00AC */ 0x000ecca9,0x00099ac0,0x000ec5ad,0x0009da40, +/* 00AE */ 0x000edca9,0x0009d300,0x000a6e0a,0x00001000, +/* 00B0 */ 0x000ed52d,0x00091e40,0x000eeca9,0x00095ec0, +/* 00B2 */ 0x000ee5ad,0x00099e40,0x0006fca9,0x00002500, +/* 00B4 */ 0x000fb208,0x000c59a0,0x000ef52d,0x0009de40, +/* 00B6 */ 0x00068ca9,0x000912c1,0x000683ad,0x00095241, +/* 00B8 */ 0x00020f05,0x000991c1,0x00000000,0x00000000, +/* 00BA */ 0x00086f88,0x00001000,0x0009cf81,0x000b5340, +/* 00BC */ 0x0009c701,0x000b92c0,0x0009de81,0x000bd300, +/* 00BE */ 0x0009d601,0x000b1700,0x0001fd81,0x000b9d80, +/* 00C0 */ 0x0009f501,0x000b57c0,0x000a0f81,0x000bd740, +/* 00C2 */ 0x00020701,0x000b5c80,0x000a1681,0x000b97c0, +/* 00C4 */ 0x00021601,0x00002500,0x000a0701,0x000b9b40, +/* 00C6 */ 0x000a0f81,0x000b1bc0,0x00021681,0x00002d00, +/* 00C8 */ 0x00020f81,0x000bd800,0x000a0701,0x000b5bc0, +/* 00CA */ 0x00021601,0x00003500,0x000a0f81,0x000b5f40, +/* 00CC */ 0x000a0701,0x000bdbc0,0x00021681,0x00003d00, +/* 00CE */ 0x00020f81,0x000b1d00,0x000a0701,0x000b1fc0, +/* 00D0 */ 0x00021601,0x00020500,0x00020f81,0x000b1341, +/* 00D2 */ 0x000a0701,0x000b9fc0,0x00021681,0x00020d00, +/* 00D4 */ 0x00020f81,0x000bde80,0x000a0701,0x000bdfc0, +/* 00D6 */ 0x00021601,0x00021500,0x00020f81,0x000b9341, +/* 00D8 */ 0x00020701,0x000b53c1,0x00021681,0x00021d00, +/* 00DA */ 0x000a0f81,0x000d0380,0x0000b601,0x000b15c0, +/* 00DC */ 0x00007b01,0x00000000,0x00007b81,0x000bd1c0, +/* 00DE */ 0x00007b01,0x00000000,0x00007b81,0x000b91c0, +/* 00E0 */ 0x00007b01,0x000b57c0,0x00007b81,0x000b51c0, +/* 00E2 */ 0x00007b01,0x000b1b40,0x00007b81,0x000b11c0, +/* 00E4 */ 0x00087b01,0x000c3dc0,0x0007e488,0x000d7e45, +/* 00E6 */ 0x00000000,0x000d7a44,0x0007e48a,0x00000000, +/* 00E8 */ 0x00011f05,0x00084080,0x00000000,0x00000000, +/* 00EA */ 0x00001705,0x000b3540,0x00008a01,0x000bf040, +/* 00EC */ 0x00007081,0x000bb5c0,0x00055488,0x00000000, +/* 00EE */ 0x0000d482,0x0003fc40,0x0003fc88,0x00000000, +/* 00F0 */ 0x0001e401,0x000b3a00,0x0001ec81,0x000bd6c0, +/* 00F2 */ 0x0002ef88,0x000e7784,0x00056f08,0x00000000, +/* 00F4 */ 0x000d86b0,0x00001007,0x00008281,0x000bb240, +/* 00F6 */ 0x0000b801,0x000b7140,0x00007888,0x00000000, +/* 00F8 */ 0x0000073c,0x00001000,0x0007f188,0x000c0000, +/* 00FA */ 0x00000000,0x00000000,0x00055288,0x000c555c, +/* 00FC */ 0x0005528a,0x000c0000,0x0009fa88,0x000c5d00, +/* 00FE */ 0x0000fa88,0x00000000,0x00000032,0x00001000, +/* 0100 */ 0x0000073d,0x00001000,0x0007f188,0x000c0000, +/* 0102 */ 0x00000000,0x00000000,0x0008c01c,0x00001003, +/* 0104 */ 0x00002705,0x00001008,0x0008b201,0x000c1392, +/* 0106 */ 0x0000ba01,0x00000000, +/* TASKTREETHREAD */ +/* 0107 */ 0x00008731,0x00001400,0x0004c108,0x000fe0c4, +/* 0109 */ 0x00057488,0x00000000,0x000a6388,0x00001001, +/* 010B */ 0x0008b334,0x000bc141,0x0003020e,0x00000000, +/* 010D */ 0x000986b0,0x00001008,0x00003625,0x000c5dfa, +/* 010F */ 0x000a638a,0x00001001,0x0008020e,0x00001002, +/* 0111 */ 0x0009a6b0,0x00001008,0x0007f301,0x00000000, +/* 0113 */ 0x00000000,0x00000000,0x00002725,0x000a8c40, +/* 0115 */ 0x000000ae,0x00000000,0x000e8630,0x00001008, +/* 0117 */ 0x00000000,0x000c74e0,0x0007d182,0x0002d640, +/* 0119 */ 0x000b8630,0x00001008,0x000799b8,0x0002d6c0, +/* 011B */ 0x0000748a,0x000c3ec5,0x0007420a,0x000c0000, +/* 011D */ 0x00062208,0x000c4117,0x000a0630,0x00001009, +/* 011F */ 0x00000000,0x000c0000,0x0001022e,0x00000000, +/* 0121 */ 0x0006a630,0x00001009,0x00000032,0x00001000, +/* 0123 */ 0x000ca21c,0x00001003,0x00005a02,0x00000000, +/* 0125 */ 0x0001a630,0x00001009,0x00000000,0x000c0000, +/* 0127 */ 0x00000036,0x00001000,0x00000000,0x00000000, +/* 0129 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 012B */ 0x00000000,0x00000000,0x0003a730,0x00001008, +/* 012D */ 0x0007f801,0x000c0000,0x00000037,0x00001000, +/* 012F */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0131 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0133 */ 0x0003a730,0x00001008,0x00000033,0x00001000, +/* 0135 */ 0x0003a705,0x00001008,0x00007a01,0x000c0000, +/* 0137 */ 0x000e6288,0x000d550a,0x0006428a,0x00000000, +/* 0139 */ 0x00090730,0x0000100a,0x00000000,0x000c0000, +/* 013B */ 0x00000000,0x00000000, +/* TASKTREEHEADERCODE */ +/* 013C */ 0x0007aab0,0x00034880,0x000a8fb0,0x0000100b, +/* 013E */ 0x00057488,0x00000000,0x00033b94,0x00081140, +/* 0140 */ 0x000183ae,0x00000000,0x000a86b0,0x0000100b, +/* 0142 */ 0x00022f05,0x000c3545,0x0000eb8a,0x00000000, +/* 0144 */ 0x00042731,0x00001003, +/* FGTASKTREEHEADERCODE */ +/* 0145 */ 0x0007aab0,0x00034880,0x00078fb0,0x0000100a, +/* 0147 */ 0x00057488,0x00000000,0x00033b94,0x00081140, +/* 0149 */ 0x000183ae,0x00000000,0x000b06b0,0x0000100b, +/* 014B */ 0x00022f05,0x00000000,0x00007401,0x00091140, +/* 014D */ 0x00048f05,0x000951c0,0x00042731,0x00001003, +/* 014F */ 0x0000473d,0x00001000,0x000f19b0,0x000bbc47, +/* 0151 */ 0x00080000,0x000bffc7,0x000fe19e,0x00001003, +/* 0153 */ 0x00000000,0x00000000,0x0008e19c,0x00001003, +/* 0155 */ 0x000083c1,0x00093040,0x00000f41,0x00097140, +/* 0157 */ 0x0000a841,0x0009b240,0x0000a0c1,0x0009f040, +/* 0159 */ 0x0001c641,0x00093540,0x0001cec1,0x0009b5c0, +/* 015B */ 0x00000000,0x000fdc44,0x00055208,0x00000000, +/* 015D */ 0x00010705,0x000a2880,0x0000a23a,0x00093a00, +/* 015F */ 0x0003fc8a,0x000df6c5,0x0004ef0a,0x000c0000, +/* 0161 */ 0x00012f05,0x00036880,0x00065308,0x000c2997, +/* 0163 */ 0x000086b0,0x0000100b,0x0004410a,0x000d40c7, +/* 0165 */ 0x00000000,0x00000000,0x00088730,0x00001004, +/* 0167 */ 0x00056f0a,0x000ea105,0x00000000,0x00000000, +/* NULLALGORITHM */ +/* 0169 */ 0x0000473d,0x00001000,0x000f19b0,0x000bbc47, +/* 016B */ 0x00080000,0x000bffc7,0x0000273d,0x00001000, +/* HFGEXECCHILD */ +/* 016D */ 0x00000000,0x000eba44, +/* HFGEXECCHILD_98 */ +/* 016E */ 0x00048f05,0x0000f440,0x00007401,0x0000f7c0, +/* HFGEXECCHILD_PUSH1IND */ +/* 0170 */ 0x00000734,0x00001000,0x00010705,0x000a6880, +/* 0172 */ 0x00006a88,0x000c75c4, +/* HFGEXECSIBLING */ +/* 0173 */ 0x00000000,0x000e5084,0x00000000,0x000eba44, +/* HFGEXECSIBLING_298 */ +/* 0175 */ 0x00087401,0x000e4782, +/* HFGEXECSIBLING_2IND1 */ +/* 0176 */ 0x00000734,0x00001000,0x00010705,0x000a6880, +/* 0178 */ 0x00006a88,0x000c75c4, +/* S16_CODECOUTPUTTASK */ +/* 0179 */ 0x0007c108,0x000c0000,0x0007e721,0x000bed40, +/* 017B */ 0x00005f25,0x000badc0,0x0003ba97,0x000beb80, +/* 017D */ 0x00065590,0x000b2e00,0x00033217,0x00003ec0, +/* 017F */ 0x00065590,0x000b8e40,0x0003ed80,0x000491c0, +/* 0181 */ 0x00073fb0,0x00074c80,0x000583a0,0x0000100c, +/* 0183 */ 0x000ee388,0x00042970,0x00008301,0x00021ef2, +/* 0185 */ 0x000b8f14,0x0000000f,0x000c4d8d,0x0000001b, +/* 0187 */ 0x000d6dc2,0x000e06c6,0x000032ac,0x000c3916, +/* 0189 */ 0x0004edc2,0x00074c80,0x00078898,0x00001000, +/* 018B */ 0x00038894,0x00000032,0x000c4d8d,0x00092e1b, +/* 018D */ 0x000d6dc2,0x000e06c6,0x0004edc2,0x000c1956, +/* 018F */ 0x0000722c,0x00034a00,0x00041705,0x0009ed40, +/* 0191 */ 0x00058730,0x00001400,0x000d7488,0x000c3a00, +/* 0193 */ 0x00048f05,0x00000000 +}; +/* #CODE_END */ + +static u32 cwc4630_parameter[] = { +/* 0000 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0004 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0008 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 000C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0010 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0014 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0018 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 001C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0020 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0024 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0028 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 002C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0030 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0034 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0038 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 003C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0040 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0044 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0048 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 004C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0050 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0054 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0058 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 005C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0060 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0064 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0068 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 006C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0070 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0074 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0078 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 007C */ 0x00000000,0x00000000,0x00000000,0x00000000 +}; /* #PARAMETER_END */ + + +static segment_desc_t cwc4630_segments[] = { + { SEGTYPE_SP_PROGRAM, 0x00000000, 0x00000328, cwc4630_code }, + { SEGTYPE_SP_PARAMETER, 0x00000000, 0x00000080, cwc4630_parameter }, +}; + +static dsp_module_desc_t cwc4630_module = { + "cwc4630", + { + 38, + cwc4630_symbols + }, + 2, + cwc4630_segments, +}; + +#endif /* __HEADER_cwc4630_H__ */ diff --git a/sound/pci/cs46xx/imgs/cwcasync.h b/sound/pci/cs46xx/imgs/cwcasync.h new file mode 100644 index 0000000000000000000000000000000000000000..e01a7b66c4ffba6c5eafc930fb43a0b95afc8993 --- /dev/null +++ b/sound/pci/cs46xx/imgs/cwcasync.h @@ -0,0 +1,176 @@ +/* generated from cwcasync.osp DO NOT MODIFY */ + +#ifndef __HEADER_cwcasync_H__ +#define __HEADER_cwcasync_H__ + +static symbol_entry_t cwcasync_symbols[] = { + { 0x8000, "EXECCHILD",0x03 }, + { 0x8001, "EXECCHILD_98",0x03 }, + { 0x8003, "EXECCHILD_PUSH1IND",0x03 }, + { 0x8008, "EXECSIBLING",0x03 }, + { 0x800a, "EXECSIBLING_298",0x03 }, + { 0x800b, "EXECSIBLING_2IND1",0x03 }, + { 0x8010, "TIMINGMASTER",0x03 }, + { 0x804f, "S16_CODECINPUTTASK",0x03 }, + { 0x805e, "PCMSERIALINPUTTASK",0x03 }, + { 0x806d, "S16_MIX_TO_OSTREAM",0x03 }, + { 0x809a, "S16_MIX",0x03 }, + { 0x80bb, "S16_UPSRC",0x03 }, + { 0x813b, "MIX3_EXP",0x03 }, + { 0x8164, "DECIMATEBYPOW2",0x03 }, + { 0x8197, "VARIDECIMATE",0x03 }, + { 0x81f2, "_3DINPUTTASK",0x03 }, + { 0x820a, "_3DPRLGCINPTASK",0x03 }, + { 0x8227, "_3DSTEREOINPUTTASK",0x03 }, + { 0x8242, "_3DOUTPUTTASK",0x03 }, + { 0x82c4, "HRTF_MORPH_TASK",0x03 }, + { 0x82c6, "WAIT4DATA",0x03 }, + { 0x82fa, "PROLOGIC",0x03 }, + { 0x8496, "DECORRELATOR",0x03 }, + { 0x84a4, "STEREO2MONO",0x03 }, + { 0x0000, "OVERLAYBEGINADDRESS",0x00 }, + { 0x0000, "SPIOWRITE",0x03 }, + { 0x000d, "S16_ASYNCCODECINPUTTASK",0x03 }, + { 0x0043, "SPDIFITASK",0x03 }, + { 0x007b, "SPDIFOTASK",0x03 }, + { 0x0097, "ASYNCHFGTXCODE",0x03 }, + { 0x00be, "ASYNCHFGRXCODE",0x03 }, + { 0x00db, "#CODE_END",0x00 }, +}; /* cwcasync symbols */ + +static u32 cwcasync_code[] = { +/* OVERLAYBEGINADDRESS */ +/* 0000 */ 0x00002731,0x00001400,0x00003725,0x000a8440, +/* 0002 */ 0x000000ae,0x00000000,0x00060630,0x00001000, +/* 0004 */ 0x00000000,0x000c7560,0x00075282,0x0002d640, +/* 0006 */ 0x00021705,0x00000000,0x00072ab8,0x0002d6c0, +/* 0008 */ 0x00020630,0x00001000,0x000c74c2,0x000d4b82, +/* 000A */ 0x000475c2,0x00000000,0x0003430a,0x000c0000, +/* 000C */ 0x00042730,0x00001400, +/* S16_ASYNCCODECINPUTTASK */ +/* 000D */ 0x0006a108,0x000cf2c4,0x0004f4c0,0x00000000, +/* 000F */ 0x000fa418,0x0000101f,0x0005d402,0x0001c500, +/* 0011 */ 0x000f0630,0x00001000,0x00004418,0x00001380, +/* 0013 */ 0x000e243d,0x000d394a,0x00049705,0x00000000, +/* 0015 */ 0x0007d530,0x000b4240,0x000e00f2,0x00001000, +/* 0017 */ 0x00009134,0x000ca20a,0x00004c90,0x00001000, +/* 0019 */ 0x0005d705,0x00000000,0x00004f25,0x00098240, +/* 001B */ 0x00004725,0x00000000,0x0000e48a,0x00000000, +/* 001D */ 0x00027295,0x0009c2c0,0x0003df25,0x00000000, +/* 001F */ 0x000e8030,0x00001001,0x0005f718,0x000ac600, +/* 0021 */ 0x0007cf30,0x000c2a01,0x00082630,0x00001001, +/* 0023 */ 0x000504a0,0x00001001,0x00029314,0x000bcb80, +/* 0025 */ 0x0003cf25,0x000b0e00,0x0004f5c0,0x00000000, +/* 0027 */ 0x00049118,0x000d888a,0x0007dd02,0x000c6efa, +/* 0029 */ 0x00000000,0x00000000,0x0004f5c0,0x00069c80, +/* 002B */ 0x0000d402,0x00000000,0x000e8630,0x00001001, +/* 002D */ 0x00079130,0x00000000,0x00049118,0x00090e00, +/* 002F */ 0x0006c10a,0x00000000,0x00000000,0x000c0000, +/* 0031 */ 0x0007cf30,0x00030580,0x00005725,0x00000000, +/* 0033 */ 0x000d84a0,0x00001001,0x00029314,0x000b4780, +/* 0035 */ 0x0003cf25,0x000b8600,0x00000000,0x00000000, +/* 0037 */ 0x00000000,0x000c0000,0x00000000,0x00042c80, +/* 0039 */ 0x0001dec1,0x000e488c,0x00031114,0x00000000, +/* 003B */ 0x0004f5c2,0x00000000,0x0003640a,0x00000000, +/* 003D */ 0x00000000,0x000e5084,0x00000000,0x000eb844, +/* 003F */ 0x00007001,0x00000000,0x00000734,0x00001000, +/* 0041 */ 0x00010705,0x000a6880,0x00006a88,0x000c75c4, +/* SPDIFITASK */ +/* 0043 */ 0x0006a108,0x000cf2c4,0x0004f4c0,0x000d5384, +/* 0045 */ 0x0007e48a,0x00000000,0x00067718,0x00001000, +/* 0047 */ 0x0007a418,0x00001000,0x0007221a,0x00000000, +/* 0049 */ 0x0005d402,0x00014500,0x000b8630,0x00001002, +/* 004B */ 0x00004418,0x00001780,0x000e243d,0x000d394a, +/* 004D */ 0x00049705,0x00000000,0x0007d530,0x000b4240, +/* 004F */ 0x000ac0f2,0x00001002,0x00014414,0x00000000, +/* 0051 */ 0x00004c90,0x00001000,0x0005d705,0x00000000, +/* 0053 */ 0x00004f25,0x00098240,0x00004725,0x00000000, +/* 0055 */ 0x0000e48a,0x00000000,0x00027295,0x0009c2c0, +/* 0057 */ 0x0007df25,0x00000000,0x000ac030,0x00001003, +/* 0059 */ 0x0005f718,0x000fe798,0x00029314,0x000bcb80, +/* 005B */ 0x00000930,0x000b0e00,0x0004f5c0,0x000de204, +/* 005D */ 0x000884a0,0x00001003,0x0007cf25,0x000e3560, +/* 005F */ 0x00049118,0x00000000,0x00049118,0x000d888a, +/* 0061 */ 0x0007dd02,0x000c6efa,0x0000c434,0x00030040, +/* 0063 */ 0x000fda82,0x000c2312,0x000fdc0e,0x00001001, +/* 0065 */ 0x00083402,0x000c2b92,0x000706b0,0x00001003, +/* 0067 */ 0x00075a82,0x00000000,0x0000d625,0x000b0940, +/* 0069 */ 0x0000840e,0x00001002,0x0000aabc,0x000c511e, +/* 006B */ 0x00078730,0x00001003,0x0000aaf4,0x000e910a, +/* 006D */ 0x0004628a,0x00000000,0x00006aca,0x00000000, +/* 006F */ 0x00000930,0x00000000,0x0004f5c0,0x00069c80, +/* 0071 */ 0x00046ac0,0x00000000,0x0003c40a,0x000fc898, +/* 0073 */ 0x00049118,0x00090e00,0x0006c10a,0x00000000, +/* 0075 */ 0x00000000,0x000e5084,0x00000000,0x000eb844, +/* 0077 */ 0x00007001,0x00000000,0x00000734,0x00001000, +/* 0079 */ 0x00010705,0x000a6880,0x00006a88,0x000c75c4, +/* SPDIFOTASK */ +/* 007B */ 0x0006a108,0x000c0000,0x0004f4c0,0x000c3245, +/* 007D */ 0x0000a418,0x00001000,0x0003a20a,0x00000000, +/* 007F */ 0x00004418,0x00001380,0x000e243d,0x000d394a, +/* 0081 */ 0x000c9705,0x000def92,0x0008c030,0x00001004, +/* 0083 */ 0x0005f718,0x000fe798,0x00000000,0x000c0000, +/* 0085 */ 0x00005725,0x00000000,0x000704a0,0x00001004, +/* 0087 */ 0x00029314,0x000b4780,0x0003cf25,0x000b8600, +/* 0089 */ 0x00000000,0x00000000,0x00000000,0x000c0000, +/* 008B */ 0x00000000,0x00042c80,0x0001dec1,0x000e488c, +/* 008D */ 0x00031114,0x00000000,0x0004f5c2,0x00000000, +/* 008F */ 0x0004a918,0x00098600,0x0006c28a,0x00000000, +/* 0091 */ 0x00000000,0x000e5084,0x00000000,0x000eb844, +/* 0093 */ 0x00007001,0x00000000,0x00000734,0x00001000, +/* 0095 */ 0x00010705,0x000a6880,0x00006a88,0x000c75c4, +/* ASYNCHFGTXCODE */ +/* 0097 */ 0x0002a880,0x000b4e40,0x00042214,0x000e5548, +/* 0099 */ 0x000542bf,0x00000000,0x00000000,0x000481c0, +/* 009B */ 0x00000000,0x00000000,0x00000000,0x00000030, +/* 009D */ 0x0000072d,0x000fbf8a,0x00077f94,0x000ea7df, +/* 009F */ 0x0002ac95,0x000d3145,0x00002731,0x00001400, +/* 00A1 */ 0x00006288,0x000c71c4,0x00014108,0x000e6044, +/* 00A3 */ 0x00035408,0x00000000,0x00025418,0x000a0ec0, +/* 00A5 */ 0x0001443d,0x000ca21e,0x00046595,0x000d730c, +/* 00A7 */ 0x0006538e,0x00000000,0x00064630,0x00001005, +/* 00A9 */ 0x000e7b0e,0x000df782,0x000746b0,0x00001005, +/* 00AB */ 0x00036f05,0x000c0000,0x00043695,0x000d598c, +/* 00AD */ 0x0005331a,0x000f2185,0x00000000,0x00000000, +/* 00AF */ 0x000007ae,0x000bdb00,0x00040630,0x00001400, +/* 00B1 */ 0x0005e708,0x000c0000,0x0007ef30,0x000b1c00, +/* 00B3 */ 0x000d86a0,0x00001005,0x00066408,0x000c0000, +/* 00B5 */ 0x00000000,0x00000000,0x00021843,0x00000000, +/* 00B7 */ 0x00000cac,0x00062c00,0x00001dac,0x00063400, +/* 00B9 */ 0x00002cac,0x0006cc80,0x000db943,0x000e5ca1, +/* 00BB */ 0x00000000,0x00000000,0x0006680a,0x000f3205, +/* 00BD */ 0x00042730,0x00001400, +/* ASYNCHFGRXCODE */ +/* 00BE */ 0x00014108,0x000f2204,0x00025418,0x000a2ec0, +/* 00C0 */ 0x00015dbd,0x00038100,0x00015dbc,0x00000000, +/* 00C2 */ 0x0005e415,0x00034880,0x0001258a,0x000d730c, +/* 00C4 */ 0x0006538e,0x000baa40,0x00060630,0x00001006, +/* 00C6 */ 0x00067b0e,0x000ac380,0x0003ef05,0x00000000, +/* 00C8 */ 0x0000f734,0x0001c300,0x000586b0,0x00001400, +/* 00CA */ 0x000b6f05,0x000c3a00,0x00048f05,0x00000000, +/* 00CC */ 0x0005b695,0x0008c380,0x0002058e,0x00000000, +/* 00CE */ 0x000500b0,0x00001400,0x0002b318,0x000e998d, +/* 00D0 */ 0x0006430a,0x00000000,0x00000000,0x000ef384, +/* 00D2 */ 0x00004725,0x000c0000,0x00000000,0x000f3204, +/* 00D4 */ 0x00004f25,0x000c0000,0x00080000,0x000e5ca1, +/* 00D6 */ 0x000cb943,0x000e5ca1,0x0004b943,0x00000000, +/* 00D8 */ 0x00040730,0x00001400,0x000cb943,0x000e5ca1, +/* 00DA */ 0x0004b943,0x00000000 +}; +/* #CODE_END */ + +static segment_desc_t cwcasync_segments[] = { + { SEGTYPE_SP_PROGRAM, 0x00000000, 0x000001b6, cwcasync_code }, +}; + +static dsp_module_desc_t cwcasync_module = { + "cwcasync", + { + 32, + cwcasync_symbols + }, + 1, + cwcasync_segments, +}; + +#endif /* __HEADER_cwcasync_H__ */ diff --git a/sound/pci/cs46xx/imgs/cwcbinhack.h b/sound/pci/cs46xx/imgs/cwcbinhack.h new file mode 100644 index 0000000000000000000000000000000000000000..436b38bd246cca02fa4bd275f80c3dc1f9d107bc --- /dev/null +++ b/sound/pci/cs46xx/imgs/cwcbinhack.h @@ -0,0 +1,48 @@ +/* generated by Benny + MODIFY ON YOUR OWN RISK */ + +#ifndef __HEADER_cwcbinhack_H__ +#define __HEADER_cwcbinhack_H__ + +static symbol_entry_t cwcbinhack_symbols[] = { + { 0x02c8, "OVERLAYBEGINADDRESS",0x00 }, + { 0x02c8, "MAGICSNOOPTASK",0x03 }, + { 0x0308, "#CODE_END",0x00 }, +}; /* cwcbinhack symbols */ + +static u32 cwcbinhack_code[] = { + /* 0x02c8 */ + 0x0007bfb0,0x000bc240,0x00000c2e,0x000c6084, /* 1 */ + 0x000b8630,0x00001016,0x00006408,0x000efb84, /* 2 */ + 0x00016008,0x00000000,0x0001c088,0x000c0000, /* 3 */ + 0x000fc908,0x000e3392,0x0005f488,0x000efb84, /* 4 */ + 0x0001d402,0x000b2e00,0x0003d418,0x00001000, /* 5 */ + 0x0008d574,0x000c4293,0x00065625,0x000ea30e, /* 6 */ + 0x00096c01,0x000c6f92,0x0001a58a,0x000c6085, /* 7 */ + 0x00002f43,0x00000000,0x000e03a0,0x00001016, /* 8 */ + 0x0005e608,0x000c0000,0x00000000,0x00000000, /* 9 */ + 0x000ca108,0x000dcca1,0x00003bac,0x000c3205, /* 10 */ + 0x00073843,0x00000000,0x00010730,0x00001017, /* 11 */ + 0x0001600a,0x000c0000,0x00057488,0x00000000, /* 12 */ + 0x00000000,0x000e5084,0x00000000,0x000eba44, /* 13 */ + 0x00087401,0x000e4782,0x00000734,0x00001000, /* 14 */ + 0x00010705,0x000a6880,0x00006a88,0x000c75c4, /* 15 */ + 0x00000000,0x00000000,0x00000000,0x00000000, /* 16 */ +}; +/* #CODE_END */ + +static segment_desc_t cwcbinhack_segments[] = { + { SEGTYPE_SP_PROGRAM, 0x00000000, 64, cwcbinhack_code }, +}; + +static dsp_module_desc_t cwcbinhack_module = { + "cwcbinhack", + { + 3, + cwcbinhack_symbols + }, + 1, + cwcbinhack_segments, +}; + +#endif /* __HEADER_cwcbinhack_H__ */ diff --git a/sound/pci/cs46xx/imgs/cwcemb80.h b/sound/pci/cs46xx/imgs/cwcemb80.h new file mode 100644 index 0000000000000000000000000000000000000000..4b13551eae419dd9dbb98aa945f2e4d8d9803932 --- /dev/null +++ b/sound/pci/cs46xx/imgs/cwcemb80.h @@ -0,0 +1,1607 @@ +/* generated from cwcemb80.osp DO NOT MODIFY */ + +#ifndef __HEADER_cwcemb80_H__ +#define __HEADER_cwcemb80_H__ + +static symbol_entry_t cwcemb80_symbols[] = { + { 0x0000, "BEGINADDRESS",0x00 }, + { 0x8000, "EXECCHILD",0x03 }, + { 0x8001, "EXECCHILD_98",0x03 }, + { 0x8003, "EXECCHILD_PUSH1IND",0x03 }, + { 0x8008, "EXECSIBLING",0x03 }, + { 0x800a, "EXECSIBLING_298",0x03 }, + { 0x800b, "EXECSIBLING_2IND1",0x03 }, + { 0x8010, "TIMINGMASTER",0x03 }, + { 0x804f, "S16_CODECINPUTTASK",0x03 }, + { 0x805e, "PCMSERIALINPUTTASK",0x03 }, + { 0x806d, "S16_MIX_TO_OSTREAM",0x03 }, + { 0x809a, "S16_MIX",0x03 }, + { 0x80bb, "S16_UPSRC",0x03 }, + { 0x813b, "MIX3_EXP",0x03 }, + { 0x8164, "DECIMATEBYPOW2",0x03 }, + { 0x8197, "VARIDECIMATE",0x03 }, + { 0x81f2, "_3DINPUTTASK",0x03 }, + { 0x820a, "_3DPRLGCINPTASK",0x03 }, + { 0x8227, "_3DSTEREOINPUTTASK",0x03 }, + { 0x8242, "_3DOUTPUTTASK",0x03 }, + { 0x82c4, "HRTF_MORPH_TASK",0x03 }, + { 0x82c6, "WAIT4DATA",0x03 }, + { 0x82fa, "PROLOGIC",0x03 }, + { 0x8496, "DECORRELATOR",0x03 }, + { 0x84a4, "STEREO2MONO",0x03 }, + { 0x0070, "SPOSCB",0x02 }, + { 0x0105, "TASKTREETHREAD",0x03 }, + { 0x0136, "TASKTREEHEADERCODE",0x03 }, + { 0x013f, "FGTASKTREEHEADERCODE",0x03 }, + { 0x0163, "NULLALGORITHM",0x03 }, + { 0x0167, "HFGEXECCHILD",0x03 }, + { 0x0168, "HFGEXECCHILD_98",0x03 }, + { 0x016a, "HFGEXECCHILD_PUSH1IND",0x03 }, + { 0x016d, "HFGEXECSIBLING",0x03 }, + { 0x016f, "HFGEXECSIBLING_298",0x03 }, + { 0x0170, "HFGEXECSIBLING_2IND1",0x03 }, + { 0x0173, "S16_CODECOUTPUTTASK",0x03 }, + { 0x018e, "#CODE_END",0x00 }, +}; /* cwcemb80 symbols */ + +static u32 cwcemb80_code[] = { +/* BEGINADDRESS */ +/* 0000 */ 0x00040730,0x00001002,0x000f619e,0x00001003, +/* 0002 */ 0x00001705,0x00001400,0x000a411e,0x00001003, +/* 0004 */ 0x00040730,0x00001002,0x000f619e,0x00001003, +/* 0006 */ 0x00009705,0x00001400,0x000a411e,0x00001003, +/* 0008 */ 0x00040730,0x00001002,0x000f619e,0x00001003, +/* 000A */ 0x00011705,0x00001400,0x000a411e,0x00001003, +/* 000C */ 0x00040730,0x00001002,0x000f619e,0x00001003, +/* 000E */ 0x00019705,0x00001400,0x000a411e,0x00001003, +/* 0010 */ 0x00040730,0x00001002,0x000f619e,0x00001003, +/* 0012 */ 0x00021705,0x00001400,0x000a411e,0x00001003, +/* 0014 */ 0x00040730,0x00001002,0x000f619e,0x00001003, +/* 0016 */ 0x00029705,0x00001400,0x000a411e,0x00001003, +/* 0018 */ 0x00040730,0x00001002,0x000f619e,0x00001003, +/* 001A */ 0x00031705,0x00001400,0x000a411e,0x00001003, +/* 001C */ 0x00040730,0x00001002,0x000f619e,0x00001003, +/* 001E */ 0x00039705,0x00001400,0x000a411e,0x00001003, +/* 0020 */ 0x000fe19e,0x00001003,0x0009c730,0x00001003, +/* 0022 */ 0x0008e19c,0x00001003,0x000083c1,0x00093040, +/* 0024 */ 0x00098730,0x00001002,0x000ee19e,0x00001003, +/* 0026 */ 0x00009705,0x00001400,0x000a211e,0x00001003, +/* 0028 */ 0x00098730,0x00001002,0x000ee19e,0x00001003, +/* 002A */ 0x00011705,0x00001400,0x000a211e,0x00001003, +/* 002C */ 0x00098730,0x00001002,0x000ee19e,0x00001003, +/* 002E */ 0x00019705,0x00001400,0x000a211e,0x00001003, +/* 0030 */ 0x00098730,0x00001002,0x000ee19e,0x00001003, +/* 0032 */ 0x00021705,0x00001400,0x000a211e,0x00001003, +/* 0034 */ 0x00098730,0x00001002,0x000ee19e,0x00001003, +/* 0036 */ 0x00029705,0x00001400,0x000a211e,0x00001003, +/* 0038 */ 0x00098730,0x00001002,0x000ee19e,0x00001003, +/* 003A */ 0x00031705,0x00001400,0x000a211e,0x00001003, +/* 003C */ 0x00098730,0x00001002,0x000ee19e,0x00001003, +/* 003E */ 0x00039705,0x00001400,0x000a211e,0x00001003, +/* 0040 */ 0x0000a730,0x00001008,0x000e2730,0x00001002, +/* 0042 */ 0x0000a731,0x00001002,0x0000a731,0x00001002, +/* 0044 */ 0x0000a731,0x00001002,0x0000a731,0x00001002, +/* 0046 */ 0x0000a731,0x00001002,0x0000a731,0x00001002, +/* 0048 */ 0x00000000,0x00000000,0x000f619c,0x00001003, +/* 004A */ 0x0007f801,0x000c0000,0x00000037,0x00001000, +/* 004C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 004E */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0050 */ 0x00000000,0x000c0000,0x00000000,0x00000000, +/* 0052 */ 0x0000373c,0x00001000,0x00000000,0x00000000, +/* 0054 */ 0x000ee19c,0x00001003,0x0007f801,0x000c0000, +/* 0056 */ 0x00000037,0x00001000,0x00000000,0x00000000, +/* 0058 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 005A */ 0x00000000,0x00000000,0x0000273c,0x00001000, +/* 005C */ 0x00000033,0x00001000,0x000e679e,0x00001003, +/* 005E */ 0x00007705,0x00001400,0x000ac71e,0x00001003, +/* 0060 */ 0x00087fc1,0x000c3be0,0x0007f801,0x000c0000, +/* 0062 */ 0x00000037,0x00001000,0x00000000,0x00000000, +/* 0064 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0066 */ 0x00000000,0x00000000,0x0000a730,0x00001003, +/* 0068 */ 0x00000033,0x00001000,0x0007f801,0x000c0000, +/* 006A */ 0x00000037,0x00001000,0x00000000,0x00000000, +/* 006C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 006E */ 0x00000000,0x00000000,0x00000000,0x000c0000, +/* 0070 */ 0x00000032,0x00001000,0x0000273d,0x00001000, +/* 0072 */ 0x0004a730,0x00001003,0x00000f41,0x00097140, +/* 0074 */ 0x0000a841,0x0009b240,0x0000a0c1,0x0009f040, +/* 0076 */ 0x0001c641,0x00093540,0x0001cec1,0x0009b5c0, +/* 0078 */ 0x00000000,0x00000000,0x0001bf05,0x0003fc40, +/* 007A */ 0x00002725,0x000aa400,0x00013705,0x00093a00, +/* 007C */ 0x0000002e,0x0009d6c0,0x00038630,0x00001004, +/* 007E */ 0x0004ef0a,0x000eb785,0x0003fc8a,0x00000000, +/* 0080 */ 0x00000000,0x000c70e0,0x0007d182,0x0002c640, +/* 0082 */ 0x00000630,0x00001004,0x000799b8,0x0002c6c0, +/* 0084 */ 0x00031705,0x00092240,0x00039f05,0x000932c0, +/* 0086 */ 0x0003520a,0x00000000,0x00040731,0x0000100b, +/* 0088 */ 0x00010705,0x000b20c0,0x00000000,0x000eba44, +/* 008A */ 0x00032108,0x000c60c4,0x00065208,0x000c2917, +/* 008C */ 0x000406b0,0x00001007,0x00012f05,0x00036880, +/* 008E */ 0x0002818e,0x000c0000,0x0004410a,0x00000000, +/* 0090 */ 0x00040630,0x00001007,0x00029705,0x000c0000, +/* 0092 */ 0x00000000,0x00000000,0x00003fc1,0x0003fc40, +/* 0094 */ 0x000037c1,0x00091b40,0x00003fc1,0x000911c0, +/* 0096 */ 0x000037c1,0x000957c0,0x00003fc1,0x000951c0, +/* 0098 */ 0x000037c1,0x00000000,0x00003fc1,0x000991c0, +/* 009A */ 0x000037c1,0x00000000,0x00003fc1,0x0009d1c0, +/* 009C */ 0x000037c1,0x00000000,0x0001ccc1,0x000915c0, +/* 009E */ 0x0001c441,0x0009d800,0x0009cdc1,0x00091240, +/* 00A0 */ 0x0001c541,0x00091d00,0x0009cfc1,0x00095240, +/* 00A2 */ 0x0001c741,0x00095c80,0x000e8ca9,0x00099240, +/* 00A4 */ 0x000e85ad,0x00095640,0x00069ca9,0x00099d80, +/* 00A6 */ 0x000e952d,0x00099640,0x000eaca9,0x0009d6c0, +/* 00A8 */ 0x000ea5ad,0x00091a40,0x0006bca9,0x0009de80, +/* 00AA */ 0x000eb52d,0x00095a40,0x000ecca9,0x00099ac0, +/* 00AC */ 0x000ec5ad,0x0009da40,0x000edca9,0x0009d300, +/* 00AE */ 0x000a6e0a,0x00001000,0x000ed52d,0x00091e40, +/* 00B0 */ 0x000eeca9,0x00095ec0,0x000ee5ad,0x00099e40, +/* 00B2 */ 0x0006fca9,0x00002500,0x000fb208,0x000c59a0, +/* 00B4 */ 0x000ef52d,0x0009de40,0x00068ca9,0x000912c1, +/* 00B6 */ 0x000683ad,0x00095241,0x00020f05,0x000991c1, +/* 00B8 */ 0x00000000,0x00000000,0x00086f88,0x00001000, +/* 00BA */ 0x0009cf81,0x000b5340,0x0009c701,0x000b92c0, +/* 00BC */ 0x0009de81,0x000bd300,0x0009d601,0x000b1700, +/* 00BE */ 0x0001fd81,0x000b9d80,0x0009f501,0x000b57c0, +/* 00C0 */ 0x000a0f81,0x000bd740,0x00020701,0x000b5c80, +/* 00C2 */ 0x000a1681,0x000b97c0,0x00021601,0x00002500, +/* 00C4 */ 0x000a0701,0x000b9b40,0x000a0f81,0x000b1bc0, +/* 00C6 */ 0x00021681,0x00002d00,0x00020f81,0x000bd800, +/* 00C8 */ 0x000a0701,0x000b5bc0,0x00021601,0x00003500, +/* 00CA */ 0x000a0f81,0x000b5f40,0x000a0701,0x000bdbc0, +/* 00CC */ 0x00021681,0x00003d00,0x00020f81,0x000b1d00, +/* 00CE */ 0x000a0701,0x000b1fc0,0x00021601,0x00020500, +/* 00D0 */ 0x00020f81,0x000b1341,0x000a0701,0x000b9fc0, +/* 00D2 */ 0x00021681,0x00020d00,0x00020f81,0x000bde80, +/* 00D4 */ 0x000a0701,0x000bdfc0,0x00021601,0x00021500, +/* 00D6 */ 0x00020f81,0x000b9341,0x00020701,0x000b53c1, +/* 00D8 */ 0x00021681,0x00021d00,0x000a0f81,0x000d0380, +/* 00DA */ 0x0000b601,0x000b15c0,0x00007b01,0x00000000, +/* 00DC */ 0x00007b81,0x000bd1c0,0x00007b01,0x00000000, +/* 00DE */ 0x00007b81,0x000b91c0,0x00007b01,0x000b57c0, +/* 00E0 */ 0x00007b81,0x000b51c0,0x00007b01,0x000b1b40, +/* 00E2 */ 0x00007b81,0x000b11c0,0x00087b01,0x000c3dc0, +/* 00E4 */ 0x0007e488,0x000d7e45,0x00000000,0x000d7a44, +/* 00E6 */ 0x0007e48a,0x00000000,0x00011f05,0x00084080, +/* 00E8 */ 0x00000000,0x00000000,0x00001705,0x000b3540, +/* 00EA */ 0x00008a01,0x000bf040,0x00007081,0x000bb5c0, +/* 00EC */ 0x00055488,0x00000000,0x0000d482,0x0003fc40, +/* 00EE */ 0x0003fc88,0x00000000,0x0001e401,0x000b3a00, +/* 00F0 */ 0x0001ec81,0x000bd6c0,0x0004ef08,0x000eb784, +/* 00F2 */ 0x000c86b0,0x00001007,0x00008281,0x000bb240, +/* 00F4 */ 0x0000b801,0x000b7140,0x00007888,0x00000000, +/* 00F6 */ 0x0000073c,0x00001000,0x0007f188,0x000c0000, +/* 00F8 */ 0x00000000,0x00000000,0x00055288,0x000c555c, +/* 00FA */ 0x0005528a,0x000c0000,0x0009fa88,0x000c5d00, +/* 00FC */ 0x0000fa88,0x00000000,0x00000032,0x00001000, +/* 00FE */ 0x0000073d,0x00001000,0x0007f188,0x000c0000, +/* 0100 */ 0x00000000,0x00000000,0x0008c01c,0x00001003, +/* 0102 */ 0x00002705,0x00001008,0x0008b201,0x000c1392, +/* 0104 */ 0x0000ba01,0x00000000, +/* TASKTREETHREAD */ +/* 0105 */ 0x00008731,0x00001400,0x0004c108,0x000fe0c4, +/* 0107 */ 0x00057488,0x00000000,0x000a6388,0x00001001, +/* 0109 */ 0x0008b334,0x000bc141,0x0003020e,0x00000000, +/* 010B */ 0x000886b0,0x00001008,0x00003625,0x000c5dfa, +/* 010D */ 0x000a638a,0x00001001,0x0008020e,0x00001002, +/* 010F */ 0x0008a6b0,0x00001008,0x0007f301,0x00000000, +/* 0111 */ 0x00000000,0x00000000,0x00002725,0x000a8c40, +/* 0113 */ 0x000000ae,0x00000000,0x000d8630,0x00001008, +/* 0115 */ 0x00000000,0x000c74e0,0x0007d182,0x0002d640, +/* 0117 */ 0x000a8630,0x00001008,0x000799b8,0x0002d6c0, +/* 0119 */ 0x0000748a,0x000c3ec5,0x0007420a,0x000c0000, +/* 011B */ 0x00062208,0x000c4117,0x00070630,0x00001009, +/* 011D */ 0x00000000,0x000c0000,0x0001022e,0x00000000, +/* 011F */ 0x0003a630,0x00001009,0x00000000,0x000c0000, +/* 0121 */ 0x00000036,0x00001000,0x00000000,0x00000000, +/* 0123 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0125 */ 0x00000000,0x00000000,0x0002a730,0x00001008, +/* 0127 */ 0x0007f801,0x000c0000,0x00000037,0x00001000, +/* 0129 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 012B */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 012D */ 0x0002a730,0x00001008,0x00000033,0x00001000, +/* 012F */ 0x0002a705,0x00001008,0x00007a01,0x000c0000, +/* 0131 */ 0x000e6288,0x000d550a,0x0006428a,0x00000000, +/* 0133 */ 0x00060730,0x0000100a,0x00000000,0x000c0000, +/* 0135 */ 0x00000000,0x00000000, +/* TASKTREEHEADERCODE */ +/* 0136 */ 0x0007aab0,0x00034880,0x00078fb0,0x0000100b, +/* 0138 */ 0x00057488,0x00000000,0x00033b94,0x00081140, +/* 013A */ 0x000183ae,0x00000000,0x000786b0,0x0000100b, +/* 013C */ 0x00022f05,0x000c3545,0x0000eb8a,0x00000000, +/* 013E */ 0x00042731,0x00001003, +/* FGTASKTREEHEADERCODE */ +/* 013F */ 0x0007aab0,0x00034880,0x00048fb0,0x0000100a, +/* 0141 */ 0x00057488,0x00000000,0x00033b94,0x00081140, +/* 0143 */ 0x000183ae,0x00000000,0x000806b0,0x0000100b, +/* 0145 */ 0x00022f05,0x00000000,0x00007401,0x00091140, +/* 0147 */ 0x00048f05,0x000951c0,0x00042731,0x00001003, +/* 0149 */ 0x0000473d,0x00001000,0x000f19b0,0x000bbc47, +/* 014B */ 0x00080000,0x000bffc7,0x000fe19e,0x00001003, +/* 014D */ 0x00000000,0x00000000,0x0008e19c,0x00001003, +/* 014F */ 0x000083c1,0x00093040,0x00000f41,0x00097140, +/* 0151 */ 0x0000a841,0x0009b240,0x0000a0c1,0x0009f040, +/* 0153 */ 0x0001c641,0x00093540,0x0001cec1,0x0009b5c0, +/* 0155 */ 0x00000000,0x000fdc44,0x00055208,0x00000000, +/* 0157 */ 0x00010705,0x000a2880,0x0000a23a,0x00093a00, +/* 0159 */ 0x0003fc8a,0x000df6c5,0x0004ef0a,0x000c0000, +/* 015B */ 0x00012f05,0x00036880,0x00065308,0x000c2997, +/* 015D */ 0x000d86b0,0x0000100a,0x0004410a,0x000d40c7, +/* 015F */ 0x00000000,0x00000000,0x00080730,0x00001004, +/* 0161 */ 0x00056f0a,0x000ea105,0x00000000,0x00000000, +/* NULLALGORITHM */ +/* 0163 */ 0x0000473d,0x00001000,0x000f19b0,0x000bbc47, +/* 0165 */ 0x00080000,0x000bffc7,0x0000273d,0x00001000, +/* HFGEXECCHILD */ +/* 0167 */ 0x00000000,0x000eba44, +/* HFGEXECCHILD_98 */ +/* 0168 */ 0x00048f05,0x0000f440,0x00007401,0x0000f7c0, +/* HFGEXECCHILD_PUSH1IND */ +/* 016A */ 0x00000734,0x00001000,0x00010705,0x000a6880, +/* 016C */ 0x00006a88,0x000c75c4, +/* HFGEXECSIBLING */ +/* 016D */ 0x00000000,0x000e5084,0x00000000,0x000eba44, +/* HFGEXECSIBLING_298 */ +/* 016F */ 0x00087401,0x000e4782, +/* HFGEXECSIBLING_2IND1 */ +/* 0170 */ 0x00000734,0x00001000,0x00010705,0x000a6880, +/* 0172 */ 0x00006a88,0x000c75c4, +/* S16_CODECOUTPUTTASK */ +/* 0173 */ 0x0007c108,0x000c0000,0x0007e721,0x000bed40, +/* 0175 */ 0x00005f25,0x000badc0,0x0003ba97,0x000beb80, +/* 0177 */ 0x00065590,0x000b2e00,0x00033217,0x00003ec0, +/* 0179 */ 0x00065590,0x000b8e40,0x0003ed80,0x000491c0, +/* 017B */ 0x00073fb0,0x00074c80,0x000283a0,0x0000100c, +/* 017D */ 0x000ee388,0x00042970,0x00008301,0x00021ef2, +/* 017F */ 0x000b8f14,0x0000000f,0x000c4d8d,0x0000001b, +/* 0181 */ 0x000d6dc2,0x000e06c6,0x000032ac,0x000c3916, +/* 0183 */ 0x0004edc2,0x00074c80,0x00078898,0x00001000, +/* 0185 */ 0x00038894,0x00000032,0x000c4d8d,0x00092e1b, +/* 0187 */ 0x000d6dc2,0x000e06c6,0x0004edc2,0x000c1956, +/* 0189 */ 0x0000722c,0x00034a00,0x00041705,0x0009ed40, +/* 018B */ 0x00058730,0x00001400,0x000d7488,0x000c3a00, +/* 018D */ 0x00048f05,0x00000000 +}; +/* #CODE_END */ + +static u32 cwcemb80_parameter[] = { +/* 0000 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0004 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0008 */ 0x00000000,0x00000000,0x00000163,0x00000000, +/* 000C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0010 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0014 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0018 */ 0x00000000,0x00200040,0x00008010,0x00000000, +/* 001C */ 0x00000000,0x80000001,0x00000001,0x00060000, +/* 0020 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0024 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0028 */ 0x00000000,0x00900080,0x00000173,0x00000000, +/* 002C */ 0x00000000,0x00000010,0x00800000,0x00900000, +/* 0030 */ 0xf2c0000f,0x00000200,0x00000000,0x00010600, +/* 0034 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0038 */ 0x00000000,0x00000000,0x00000163,0x330300c2, +/* 003C */ 0x06000000,0x00000000,0x80008000,0x80008000, +/* 0040 */ 0x3fc0000f,0x00000301,0x00010400,0x00000000, +/* 0044 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0048 */ 0x00000000,0x00b00000,0x00d0806d,0x330480c3, +/* 004C */ 0x04800000,0x00000001,0x00800001,0x0000ffff, +/* 0050 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0054 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0058 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 005C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0060 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0064 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0068 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 006C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0070 */ 0x066a0600,0x06350070,0x0000929d,0x929d929d, +/* 0074 */ 0x00000000,0x0000735a,0x00000600,0x00000000, +/* 0078 */ 0x929d735a,0x00000000,0x00010000,0x735a735a, +/* 007C */ 0xa431ac75,0xa431ac75,0xa431ac75,0xa431ac75, +/* 0080 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0084 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0088 */ 0x00000000,0x00000000,0x0000804f,0x000000c3, +/* 008C */ 0x05000000,0x00a00010,0x00000000,0x80008000, +/* 0090 */ 0x00000000,0x00000000,0x00000700,0x00000000, +/* 0094 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0098 */ 0x00000080,0x00a00000,0x0000809a,0x000000c2, +/* 009C */ 0x07400000,0x00000000,0x80008000,0xffffffff, +/* 00A0 */ 0x00c80028,0x00005555,0x00000000,0x000107a0, +/* 00A4 */ 0x00c80028,0x000000c2,0x06800000,0x00000000, +/* 00A8 */ 0x06e00080,0x00300000,0x000080bb,0x000000c9, +/* 00AC */ 0x07a00000,0x04000000,0x80008000,0xffffffff, +/* 00B0 */ 0x00c80028,0x00005555,0x00000000,0x00000780, +/* 00B4 */ 0x00c80028,0x000000c5,0xff800000,0x00000000, +/* 00B8 */ 0x00640080,0x00c00000,0x00008197,0x000000c9, +/* 00BC */ 0x07800000,0x04000000,0x80008000,0xffffffff, +/* 00C0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 00C4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 00C8 */ 0x00000000,0x00000000,0x0000805e,0x000000c1, +/* 00CC */ 0x00000000,0x00800000,0x80008000,0x80008000, +/* 00D0 */ 0x00020000,0x0000ffff,0x00000000,0x00000000, +/* 00D4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 00D8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 00DC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 00E0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 00E4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 00E8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 00EC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 00F0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 00F4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 00F8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 00FC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0100 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0104 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0108 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 010C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0110 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0114 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0118 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 011C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0120 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0124 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0128 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 012C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0130 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0134 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0138 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 013C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0140 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0144 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0148 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 014C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0150 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0154 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0158 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 015C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0160 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0164 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0168 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 016C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0170 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0174 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0178 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 017C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0180 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0184 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0188 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 018C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0190 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0194 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0198 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 019C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 01A0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 01A4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 01A8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 01AC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 01B0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 01B4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 01B8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 01BC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 01C0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 01C4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 01C8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 01CC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 01D0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 01D4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 01D8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 01DC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 01E0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 01E4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 01E8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 01EC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 01F0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 01F4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 01F8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 01FC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0200 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0204 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0208 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 020C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0210 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0214 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0218 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 021C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0220 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0224 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0228 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 022C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0230 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0234 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0238 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 023C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0240 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0244 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0248 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 024C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0250 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0254 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0258 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 025C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0260 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0264 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0268 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 026C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0270 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0274 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0278 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 027C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0280 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0284 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0288 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 028C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0290 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0294 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0298 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 029C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 02A0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 02A4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 02A8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 02AC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 02B0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 02B4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 02B8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 02BC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 02C0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 02C4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 02C8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 02CC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 02D0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 02D4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 02D8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 02DC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 02E0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 02E4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 02E8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 02EC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 02F0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 02F4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 02F8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 02FC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0300 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0304 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0308 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 030C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0310 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0314 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0318 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 031C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0320 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0324 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0328 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 032C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0330 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0334 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0338 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 033C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0340 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0344 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0348 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 034C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0350 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0354 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0358 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 035C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0360 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0364 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0368 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 036C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0370 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0374 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0378 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 037C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0380 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0384 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0388 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 038C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0390 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0394 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0398 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 039C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 03A0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 03A4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 03A8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 03AC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 03B0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 03B4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 03B8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 03BC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 03C0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 03C4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 03C8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 03CC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 03D0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 03D4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 03D8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 03DC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 03E0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 03E4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 03E8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 03EC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 03F0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 03F4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 03F8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 03FC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0400 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0404 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0408 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 040C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0410 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0414 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0418 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 041C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0420 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0424 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0428 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 042C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0430 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0434 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0438 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 043C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0440 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0444 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0448 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 044C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0450 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0454 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0458 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 045C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0460 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0464 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0468 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 046C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0470 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0474 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0478 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 047C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0480 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0484 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0488 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 048C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0490 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0494 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0498 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 049C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 04A0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 04A4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 04A8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 04AC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 04B0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 04B4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 04B8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 04BC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 04C0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 04C4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 04C8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 04CC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 04D0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 04D4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 04D8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 04DC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 04E0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 04E4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 04E8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 04EC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 04F0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 04F4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 04F8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 04FC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0500 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0504 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0508 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 050C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0510 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0514 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0518 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 051C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0520 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0524 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0528 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 052C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0530 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0534 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0538 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 053C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0540 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0544 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0548 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 054C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0550 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0554 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0558 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 055C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0560 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0564 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0568 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 056C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0570 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0574 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0578 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 057C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0580 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0584 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0588 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 058C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0590 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0594 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0598 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 059C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 05A0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 05A4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 05A8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 05AC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 05B0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 05B4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 05B8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 05BC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 05C0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 05C4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 05C8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 05CC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 05D0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 05D4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 05D8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 05DC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 05E0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 05E4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 05E8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 05EC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 05F0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 05F4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 05F8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 05FC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0600 */ 0x929d0600,0x929d929d,0x929d929d,0x929d0000, +/* 0604 */ 0x929d929d,0x929d929d,0x929d929d,0x929d929d, +/* 0608 */ 0x929d929d,0x00100635,0x060b013f,0x00000004, +/* 060C */ 0x00000001,0x007a0002,0x00000000,0x066e0610, +/* 0610 */ 0x0105929d,0x929d929d,0x929d929d,0x929d929d, +/* 0614 */ 0x929d929d,0xa431ac75,0x0001735a,0xa431ac75, +/* 0618 */ 0xa431ac75,0xa431ac75,0xa431ac75,0xa431ac75, +/* 061C */ 0xa431ac75,0xa431ac75,0xa431ac75,0xa431ac75, +/* 0620 */ 0xa431ac75,0xa431ac75,0xa431ac75,0xa431ac75, +/* 0624 */ 0xa431ac75,0xa431ac75,0xa431ac75,0xa431ac75, +/* 0628 */ 0xa431ac75,0xa431ac75,0xa431ac75,0xa431ac75, +/* 062C */ 0xa431ac75,0xa431ac75,0xa431ac75,0xa431ac75, +/* 0630 */ 0xa431ac75,0xa431ac75,0xa431ac75,0x735a0051, +/* 0634 */ 0x00000000,0x929d929d,0x929d929d,0x929d929d, +/* 0638 */ 0x929d929d,0x929d929d,0x929d929d,0x929d929d, +/* 063C */ 0x929d929d,0x929d929d,0x00000000,0x06400136, +/* 0640 */ 0x0000270f,0x00010000,0x007a0000,0x00000000, +/* 0644 */ 0x068e0645,0x0105929d,0x929d929d,0x929d929d, +/* 0648 */ 0x929d929d,0x929d929d,0xa431ac75,0x0001735a, +/* 064C */ 0xa431ac75,0xa431ac75,0xa431ac75,0xa431ac75, +/* 0650 */ 0xa431ac75,0xa431ac75,0xa431ac75,0xa431ac75, +/* 0654 */ 0xa431ac75,0xa431ac75,0xa431ac75,0xa431ac75, +/* 0658 */ 0xa431ac75,0xa431ac75,0xa431ac75,0xa431ac75, +/* 065C */ 0xa431ac75,0xa431ac75,0xa431ac75,0xa431ac75, +/* 0660 */ 0xa431ac75,0xa431ac75,0xa431ac75,0xa431ac75, +/* 0664 */ 0xa431ac75,0xa431ac75,0xa431ac75,0xa431ac75, +/* 0668 */ 0x735a0100,0x00000000,0x00000000,0x00000000, +/* 066C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0670 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0674 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0678 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 067C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0680 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0684 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0688 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 068C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0690 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0694 */ 0x00000000,0x00000000,0x00000000 +}; /* #PARAMETER_END */ + +static u32 cwcemb80_sample[] = { +/* 0000 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0004 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0008 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 000C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0010 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0014 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0018 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 001C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0020 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0024 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0028 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 002C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0030 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0034 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0038 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 003C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0040 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0044 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0048 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 004C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0050 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0054 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0058 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 005C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0060 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0064 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0068 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 006C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0070 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0074 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0078 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 007C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0080 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0084 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0088 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 008C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0090 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0094 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0098 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 009C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 00A0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 00A4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 00A8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 00AC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 00B0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 00B4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 00B8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 00BC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 00C0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 00C4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 00C8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 00CC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 00D0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 00D4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 00D8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 00DC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 00E0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 00E4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 00E8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 00EC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 00F0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 00F4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 00F8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 00FC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0100 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0104 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0108 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 010C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0110 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0114 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0118 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 011C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0120 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0124 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0128 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 012C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0130 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0134 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0138 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 013C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0140 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0144 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0148 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 014C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0150 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0154 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0158 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 015C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0160 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0164 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0168 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 016C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0170 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0174 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0178 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 017C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0180 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0184 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0188 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 018C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0190 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0194 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0198 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 019C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 01A0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 01A4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 01A8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 01AC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 01B0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 01B4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 01B8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 01BC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 01C0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 01C4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 01C8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 01CC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 01D0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 01D4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 01D8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 01DC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 01E0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 01E4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 01E8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 01EC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 01F0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 01F4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 01F8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 01FC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0200 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0204 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0208 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 020C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0210 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0214 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0218 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 021C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0220 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0224 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0228 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 022C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0230 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0234 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0238 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 023C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0240 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0244 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0248 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 024C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0250 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0254 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0258 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 025C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0260 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0264 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0268 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 026C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0270 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0274 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0278 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 027C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0280 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0284 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0288 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 028C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0290 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0294 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0298 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 029C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 02A0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 02A4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 02A8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 02AC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 02B0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 02B4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 02B8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 02BC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 02C0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 02C4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 02C8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 02CC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 02D0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 02D4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 02D8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 02DC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 02E0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 02E4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 02E8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 02EC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 02F0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 02F4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 02F8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 02FC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0300 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0304 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0308 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 030C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0310 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0314 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0318 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 031C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0320 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0324 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0328 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 032C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0330 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0334 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0338 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 033C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0340 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0344 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0348 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 034C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0350 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0354 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0358 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 035C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0360 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0364 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0368 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 036C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0370 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0374 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0378 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 037C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0380 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0384 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0388 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 038C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0390 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0394 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0398 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 039C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 03A0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 03A4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 03A8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 03AC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 03B0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 03B4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 03B8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 03BC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 03C0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 03C4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 03C8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 03CC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 03D0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 03D4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 03D8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 03DC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 03E0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 03E4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 03E8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 03EC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 03F0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 03F4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 03F8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 03FC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0400 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0404 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0408 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 040C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0410 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0414 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0418 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 041C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0420 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0424 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0428 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 042C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0430 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0434 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0438 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 043C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0440 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0444 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0448 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 044C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0450 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0454 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0458 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 045C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0460 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0464 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0468 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 046C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0470 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0474 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0478 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 047C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0480 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0484 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0488 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 048C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0490 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0494 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0498 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 049C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 04A0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 04A4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 04A8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 04AC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 04B0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 04B4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 04B8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 04BC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 04C0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 04C4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 04C8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 04CC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 04D0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 04D4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 04D8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 04DC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 04E0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 04E4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 04E8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 04EC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 04F0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 04F4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 04F8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 04FC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0500 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0504 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0508 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 050C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0510 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0514 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0518 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 051C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0520 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0524 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0528 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 052C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0530 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0534 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0538 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 053C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0540 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0544 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0548 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 054C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0550 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0554 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0558 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 055C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0560 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0564 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0568 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 056C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0570 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0574 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0578 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 057C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0580 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0584 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0588 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 058C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0590 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0594 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0598 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 059C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 05A0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 05A4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 05A8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 05AC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 05B0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 05B4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 05B8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 05BC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 05C0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 05C4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 05C8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 05CC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 05D0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 05D4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 05D8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 05DC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 05E0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 05E4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 05E8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 05EC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 05F0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 05F4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 05F8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 05FC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0600 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0604 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0608 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 060C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0610 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0614 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0618 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 061C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0620 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0624 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0628 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 062C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0630 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0634 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0638 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 063C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0640 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0644 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0648 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 064C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0650 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0654 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0658 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 065C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0660 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0664 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0668 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 066C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0670 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0674 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0678 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 067C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0680 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0684 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0688 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 068C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0690 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0694 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0698 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 069C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 06A0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 06A4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 06A8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 06AC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 06B0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 06B4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 06B8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 06BC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 06C0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 06C4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 06C8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 06CC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 06D0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 06D4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 06D8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 06DC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 06E0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 06E4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 06E8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 06EC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 06F0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 06F4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 06F8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 06FC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0700 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0704 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0708 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 070C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0710 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0714 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0718 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 071C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0720 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0724 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0728 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 072C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0730 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0734 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0738 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 073C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0740 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0744 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0748 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 074C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0750 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0754 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0758 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 075C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0760 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0764 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0768 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 076C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0770 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0774 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0778 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 077C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0780 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0784 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0788 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 078C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0790 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0794 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0798 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 079C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 07A0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 07A4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 07A8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 07AC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 07B0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 07B4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 07B8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 07BC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 07C0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 07C4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 07C8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 07CC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 07D0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 07D4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 07D8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 07DC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 07E0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 07E4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 07E8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 07EC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 07F0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 07F4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 07F8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 07FC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0800 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0804 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0808 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 080C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0810 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0814 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0818 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 081C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0820 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0824 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0828 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 082C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0830 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0834 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0838 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 083C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0840 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0844 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0848 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 084C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0850 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0854 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0858 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 085C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0860 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0864 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0868 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 086C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0870 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0874 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0878 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 087C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0880 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0884 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0888 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 088C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0890 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0894 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0898 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 089C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 08A0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 08A4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 08A8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 08AC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 08B0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 08B4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 08B8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 08BC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 08C0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 08C4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 08C8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 08CC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 08D0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 08D4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 08D8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 08DC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 08E0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 08E4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 08E8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 08EC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 08F0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 08F4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 08F8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 08FC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0900 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0904 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0908 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 090C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0910 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0914 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0918 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 091C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0920 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0924 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0928 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 092C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0930 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0934 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0938 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 093C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0940 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0944 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0948 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 094C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0950 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0954 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0958 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 095C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0960 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0964 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0968 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 096C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0970 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0974 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0978 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 097C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0980 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0984 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0988 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 098C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0990 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0994 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0998 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 099C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 09A0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 09A4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 09A8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 09AC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 09B0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 09B4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 09B8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 09BC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 09C0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 09C4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 09C8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 09CC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 09D0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 09D4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 09D8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 09DC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 09E0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 09E4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 09E8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 09EC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 09F0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 09F4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 09F8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 09FC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0A00 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0A04 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0A08 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0A0C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0A10 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0A14 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0A18 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0A1C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0A20 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0A24 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0A28 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0A2C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0A30 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0A34 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0A38 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0A3C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0A40 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0A44 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0A48 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0A4C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0A50 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0A54 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0A58 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0A5C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0A60 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0A64 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0A68 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0A6C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0A70 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0A74 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0A78 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0A7C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0A80 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0A84 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0A88 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0A8C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0A90 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0A94 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0A98 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0A9C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0AA0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0AA4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0AA8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0AAC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0AB0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0AB4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0AB8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0ABC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0AC0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0AC4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0AC8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0ACC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0AD0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0AD4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0AD8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0ADC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0AE0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0AE4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0AE8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0AEC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0AF0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0AF4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0AF8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0AFC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0B00 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0B04 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0B08 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0B0C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0B10 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0B14 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0B18 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0B1C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0B20 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0B24 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0B28 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0B2C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0B30 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0B34 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0B38 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0B3C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0B40 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0B44 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0B48 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0B4C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0B50 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0B54 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0B58 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0B5C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0B60 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0B64 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0B68 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0B6C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0B70 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0B74 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0B78 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0B7C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0B80 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0B84 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0B88 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0B8C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0B90 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0B94 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0B98 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0B9C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0BA0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0BA4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0BA8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0BAC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0BB0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0BB4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0BB8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0BBC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0BC0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0BC4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0BC8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0BCC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0BD0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0BD4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0BD8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0BDC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0BE0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0BE4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0BE8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0BEC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0BF0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0BF4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0BF8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0BFC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0C00 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0C04 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0C08 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0C0C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0C10 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0C14 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0C18 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0C1C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0C20 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0C24 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0C28 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0C2C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0C30 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0C34 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0C38 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0C3C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0C40 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0C44 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0C48 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0C4C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0C50 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0C54 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0C58 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0C5C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0C60 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0C64 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0C68 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0C6C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0C70 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0C74 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0C78 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0C7C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0C80 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0C84 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0C88 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0C8C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0C90 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0C94 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0C98 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0C9C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0CA0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0CA4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0CA8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0CAC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0CB0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0CB4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0CB8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0CBC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0CC0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0CC4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0CC8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0CCC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0CD0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0CD4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0CD8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0CDC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0CE0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0CE4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0CE8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0CEC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0CF0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0CF4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0CF8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0CFC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0D00 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0D04 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0D08 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0D0C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0D10 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0D14 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0D18 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0D1C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0D20 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0D24 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0D28 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0D2C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0D30 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0D34 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0D38 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0D3C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0D40 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0D44 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0D48 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0D4C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0D50 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0D54 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0D58 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0D5C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0D60 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0D64 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0D68 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0D6C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0D70 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0D74 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0D78 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0D7C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0D80 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0D84 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0D88 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0D8C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0D90 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0D94 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0D98 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0D9C */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0DA0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0DA4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0DA8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0DAC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0DB0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0DB4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0DB8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0DBC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0DC0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0DC4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0DC8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0DCC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0DD0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0DD4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0DD8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0DDC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0DE0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0DE4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0DE8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0DEC */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0DF0 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0DF4 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0DF8 */ 0x00000000,0x00000000,0x00000000,0x00000000, +/* 0DFC */ 0x00000000,0x00000000,0x00000000,0x00010004 +}; /* #SAMPLE_END */ + + +static segment_desc_t 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 = { + "cwcemb80", + { + 38, + cwcemb80_symbols + }, + 3, + cwcemb80_segments, +}; + +#endif /* __HEADER_cwcemb80_H__ */ diff --git a/sound/pci/cs46xx/imgs/cwcsnoop.h b/sound/pci/cs46xx/imgs/cwcsnoop.h new file mode 100644 index 0000000000000000000000000000000000000000..be1162bbcb4519731b36775183a86b245dda0999 --- /dev/null +++ b/sound/pci/cs46xx/imgs/cwcsnoop.h @@ -0,0 +1,46 @@ +/* generated from cwcsnoop.osp DO NOT MODIFY */ + +#ifndef __HEADER_cwcsnoop_H__ +#define __HEADER_cwcsnoop_H__ + +static symbol_entry_t cwcsnoop_symbols[] = { + { 0x0500, "OVERLAYBEGINADDRESS",0x00 }, + { 0x0500, "OUTPUTSNOOP",0x03 }, + { 0x051f, "#CODE_END",0x00 }, +}; /* cwcsnoop symbols */ + +static u32 cwcsnoop_code[] = { +/* 0000 */ 0x0007bfb0,0x000b4e40,0x0007c088,0x000c0617, +/* 0002 */ 0x00049705,0x00000000,0x00080630,0x00001028, +/* 0004 */ 0x00076408,0x000efb84,0x00066008,0x00000000, +/* 0006 */ 0x0007c908,0x000c0000,0x00046725,0x000efa44, +/* 0008 */ 0x0005f708,0x00000000,0x0001d402,0x000b2e00, +/* 000A */ 0x0003d418,0x00001000,0x0008d574,0x000c4293, +/* 000C */ 0x00065625,0x000ea30e,0x00096c01,0x000c6f92, +/* 000E */ 0x0006a58a,0x000f6085,0x00002f43,0x00000000, +/* 0010 */ 0x000a83a0,0x00001028,0x0005e608,0x000c0000, +/* 0012 */ 0x00000000,0x00000000,0x000ca108,0x000dcca1, +/* 0014 */ 0x00003bac,0x000fb205,0x00073843,0x00000000, +/* 0016 */ 0x000d8730,0x00001028,0x0006600a,0x000c0000, +/* 0018 */ 0x00057488,0x00000000,0x00000000,0x000e5084, +/* 001A */ 0x00000000,0x000eba44,0x00087401,0x000e4782, +/* 001C */ 0x00000734,0x00001000,0x00010705,0x000a6880, +/* 001E */ 0x00006a88,0x000c75c4 +}; +/* #CODE_END */ + +static segment_desc_t cwcsnoop_segments[] = { + { SEGTYPE_SP_PROGRAM, 0x00000000, 0x0000003e, cwcsnoop_code }, +}; + +static dsp_module_desc_t cwcsnoop_module = { + "cwcsnoop", + { + 3, + cwcsnoop_symbols + }, + 1, + cwcsnoop_segments, +}; + +#endif /* __HEADER_cwcsnoop_H__ */