1
2
3
4
5
6
7
8
9
10
11
12 #ifndef __CS46XX_DSP_SCB_TYPES_H__
13 #define __CS46XX_DSP_SCB_TYPES_H__
14
15 #include <asm/byteorder.h>
16
17 #ifndef ___DSP_DUAL_16BIT_ALLOC
18 #if defined(__LITTLE_ENDIAN)
19 #define ___DSP_DUAL_16BIT_ALLOC(a,b) u16 a; u16 b;
20 #elif defined(__BIG_ENDIAN)
21 #define ___DSP_DUAL_16BIT_ALLOC(a,b) u16 b; u16 a;
22 #else
23 #error Not __LITTLE_ENDIAN and not __BIG_ENDIAN, then what ???
24 #endif
25 #endif
26
27
28
29 struct dsp_basic_dma_req {
30
31
32
33
34
35
36
37 u32 dcw;
38 u32 dmw;
39 u32 saw;
40 u32 daw;
41 };
42
43 struct dsp_scatter_gather_ext {
44 u32 npaw;
45
46
47
48
49
50
51
52
53 u32 npcw;
54 u32 lbaw;
55 u32 nplbaw;
56 u32 sgaw;
57 };
58
59 struct dsp_volume_control {
60 ___DSP_DUAL_16BIT_ALLOC(
61 rightTarg,
62 leftTarg
63 )
64 ___DSP_DUAL_16BIT_ALLOC(
65 rightVol,
66 leftVol
67 )
68 };
69
70
71 struct dsp_generic_scb {
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87 struct dsp_basic_dma_req basic_req;
88
89
90
91
92
93 struct dsp_scatter_gather_ext sg_ext;
94
95
96
97
98 ___DSP_DUAL_16BIT_ALLOC(
99 next_scb,
100 sub_list_ptr
101 )
102
103
104
105 ___DSP_DUAL_16BIT_ALLOC(
106 entry_point,
107 this_spb
108 )
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123 u32 strm_rs_config;
124
125
126
127
128
129
130
131
132 u32 strm_buf_ptr;
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151 u32 strmPhiIncr;
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167 struct dsp_volume_control vol_ctrl_t;
168 };
169
170
171 struct dsp_spos_control_block {
172
173
174
175
176
177
178
179
180
181
182 ___DSP_DUAL_16BIT_ALLOC(
183
184 hfg_tree_root_ptr,
185
186 hfg_stack_base
187 )
188
189 ___DSP_DUAL_16BIT_ALLOC(
190
191 spos_cb_ptr,
192 prev_task_tree_ptr
193 )
194
195 ___DSP_DUAL_16BIT_ALLOC(
196
197 xxinterval_timer_period,
198
199 HFGSPB_ptr
200 )
201
202
203 ___DSP_DUAL_16BIT_ALLOC(
204 xxnum_HFG_ticks_thisInterval,
205
206 xxnum_tntervals
207 )
208
209
210
211
212
213 ___DSP_DUAL_16BIT_ALLOC(
214 spurious_int_flag,
215 trap_flag
216 )
217
218 ___DSP_DUAL_16BIT_ALLOC(
219 unused2,
220 invalid_IP_flag
221 )
222
223 ___DSP_DUAL_16BIT_ALLOC(
224
225 fg_task_tree_hdr_ptr,
226
227 hfg_sync_update_ptr
228 )
229
230 ___DSP_DUAL_16BIT_ALLOC(
231 begin_foreground_FCNT,
232
233 last_FCNT_before_sleep
234 )
235
236 ___DSP_DUAL_16BIT_ALLOC(
237 unused7,
238 next_task_treePtr
239 )
240
241 u32 unused5;
242
243 ___DSP_DUAL_16BIT_ALLOC(
244 active_flags,
245
246 HFG_flags
247 )
248
249 ___DSP_DUAL_16BIT_ALLOC(
250 unused9,
251 unused8
252 )
253
254
255
256
257 u32 rFE_save_for_invalid_IP;
258 u32 r32_save_for_spurious_int;
259 u32 r32_save_for_trap;
260 u32 r32_save_for_HFG;
261 };
262
263
264 struct dsp_mix2_ostream_spb
265 {
266
267
268
269
270
271
272 u32 outTripletsPerFrame;
273
274
275
276
277 u32 accumOutTriplets;
278 };
279
280
281 struct dsp_timing_master_scb {
282
283 struct dsp_basic_dma_req basic_req;
284 struct dsp_scatter_gather_ext sg_ext;
285 ___DSP_DUAL_16BIT_ALLOC(
286 next_scb,
287 sub_list_ptr
288 )
289
290 ___DSP_DUAL_16BIT_ALLOC(
291 entry_point,
292 this_spb
293 )
294
295 ___DSP_DUAL_16BIT_ALLOC(
296
297 reserved,
298 extra_sample_accum
299 )
300
301
302
303
304
305
306
307
308
309
310 ___DSP_DUAL_16BIT_ALLOC(
311 codec_FIFO_syncd,
312 codec_FIFO_ptr
313 )
314
315
316
317
318
319
320
321
322 ___DSP_DUAL_16BIT_ALLOC(
323 frac_samp_accum_qm1,
324 TM_frms_left_in_group
325 )
326
327
328
329
330
331
332
333
334
335 ___DSP_DUAL_16BIT_ALLOC(
336 frac_samp_correction_qm1,
337 TM_frm_group_length
338 )
339
340
341
342
343
344
345 u32 nsamp_per_frm_q15;
346 };
347
348
349 struct dsp_codec_output_scb {
350
351 struct dsp_basic_dma_req basic_req;
352 struct dsp_scatter_gather_ext sg_ext;
353 ___DSP_DUAL_16BIT_ALLOC(
354 next_scb,
355 sub_list_ptr
356 )
357
358 ___DSP_DUAL_16BIT_ALLOC(
359 entry_point,
360 this_spb
361 )
362
363 u32 strm_rs_config;
364
365 u32 strm_buf_ptr;
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386 ___DSP_DUAL_16BIT_ALLOC(
387 left_chan_base_IO_addr,
388 right_chan_IO_disp
389 )
390
391
392
393
394
395
396
397
398
399
400 ___DSP_DUAL_16BIT_ALLOC(
401 CO_scale_shift_count,
402 CO_exp_vol_change_rate
403 )
404
405
406 ___DSP_DUAL_16BIT_ALLOC(
407 reserved,
408 last_sub_ptr
409 )
410 };
411
412
413 struct dsp_codec_input_scb {
414
415 struct dsp_basic_dma_req basic_req;
416 struct dsp_scatter_gather_ext sg_ext;
417 ___DSP_DUAL_16BIT_ALLOC(
418 next_scb,
419 sub_list_ptr
420 )
421
422 ___DSP_DUAL_16BIT_ALLOC(
423 entry_point,
424 this_spb
425 )
426
427 u32 strm_rs_config;
428 u32 strm_buf_ptr;
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451 ___DSP_DUAL_16BIT_ALLOC(
452 rightChanINdisp,
453 left_chan_base_IN_addr
454 )
455
456
457
458
459
460
461 ___DSP_DUAL_16BIT_ALLOC(
462 scaleShiftCount,
463 reserver1
464 )
465
466 u32 reserved2;
467 };
468
469
470 struct dsp_pcm_serial_input_scb {
471
472 struct dsp_basic_dma_req basic_req;
473 struct dsp_scatter_gather_ext sg_ext;
474 ___DSP_DUAL_16BIT_ALLOC(
475 next_scb,
476 sub_list_ptr
477 )
478
479 ___DSP_DUAL_16BIT_ALLOC(
480 entry_point,
481 this_spb
482 )
483
484 u32 strm_buf_ptr;
485 u32 strm_rs_config;
486
487
488
489
490
491
492
493
494 ___DSP_DUAL_16BIT_ALLOC(
495 init_codec_input_link,
496 codec_input_buf_scb
497 )
498
499
500 struct dsp_volume_control psi_vol_ctrl;
501
502 };
503
504 struct dsp_src_task_scb {
505 ___DSP_DUAL_16BIT_ALLOC(
506 frames_left_in_gof,
507 gofs_left_in_sec
508 )
509
510 ___DSP_DUAL_16BIT_ALLOC(
511 const2_thirds,
512 num_extra_tnput_samples
513 )
514
515 ___DSP_DUAL_16BIT_ALLOC(
516 cor_per_gof,
517 correction_per_sec
518 )
519
520 ___DSP_DUAL_16BIT_ALLOC(
521 output_buf_producer_ptr,
522 junk_DMA_MID
523 )
524
525 ___DSP_DUAL_16BIT_ALLOC(
526 gof_length,
527 gofs_per_sec
528 )
529
530 u32 input_buf_strm_config;
531
532 ___DSP_DUAL_16BIT_ALLOC(
533 reserved_for_SRC_use,
534 input_buf_consumer_ptr
535 )
536
537 u32 accum_phi;
538
539 ___DSP_DUAL_16BIT_ALLOC(
540 exp_src_vol_change_rate,
541 input_buf_producer_ptr
542 )
543
544 ___DSP_DUAL_16BIT_ALLOC(
545 src_next_scb,
546 src_sub_list_ptr
547 )
548
549 ___DSP_DUAL_16BIT_ALLOC(
550 src_entry_point,
551 src_this_sbp
552 )
553
554 u32 src_strm_rs_config;
555 u32 src_strm_buf_ptr;
556
557 u32 phiIncr6int_26frac;
558
559 struct dsp_volume_control src_vol_ctrl;
560 };
561
562 struct dsp_decimate_by_pow2_scb {
563
564
565
566 ___DSP_DUAL_16BIT_ALLOC(
567 dec2_coef_base_ptr,
568 dec2_coef_increment
569 )
570
571
572
573
574 ___DSP_DUAL_16BIT_ALLOC(
575 dec2_in_samples_per_out_triplet,
576 dec2_extra_in_samples
577 )
578
579
580
581
582 ___DSP_DUAL_16BIT_ALLOC(
583 dec2_const2_thirds,
584 dec2_half_num_taps_mp5
585 )
586
587
588
589
590 ___DSP_DUAL_16BIT_ALLOC(
591 dec2_output_buf_producer_ptr,
592 dec2_junkdma_mid
593 )
594
595 u32 dec2_reserved2;
596
597 u32 dec2_input_nuf_strm_config;
598
599
600
601
602 ___DSP_DUAL_16BIT_ALLOC(
603 dec2_phi_incr,
604 dec2_input_buf_consumer_ptr
605 )
606
607
608
609
610 u32 dec2_reserved3;
611
612 ___DSP_DUAL_16BIT_ALLOC(
613 dec2_exp_vol_change_rate,
614 dec2_input_buf_producer_ptr
615 )
616
617
618
619
620
621 ___DSP_DUAL_16BIT_ALLOC(
622 dec2_next_scb,
623 dec2_sub_list_ptr
624 )
625
626 ___DSP_DUAL_16BIT_ALLOC(
627 dec2_entry_point,
628 dec2_this_spb
629 )
630
631 u32 dec2_strm_rs_config;
632 u32 dec2_strm_buf_ptr;
633
634 u32 dec2_reserved4;
635
636 struct dsp_volume_control dec2_vol_ctrl;
637 };
638
639 struct dsp_vari_decimate_scb {
640 ___DSP_DUAL_16BIT_ALLOC(
641 vdec_frames_left_in_gof,
642 vdec_gofs_left_in_sec
643 )
644
645 ___DSP_DUAL_16BIT_ALLOC(
646 vdec_const2_thirds,
647 vdec_extra_in_samples
648 )
649
650
651
652 ___DSP_DUAL_16BIT_ALLOC(
653 vdec_cor_per_gof,
654 vdec_correction_per_sec
655 )
656
657 ___DSP_DUAL_16BIT_ALLOC(
658 vdec_output_buf_producer_ptr,
659 vdec_input_buf_consumer_ptr
660 )
661
662 ___DSP_DUAL_16BIT_ALLOC(
663 vdec_gof_length,
664 vdec_gofs_per_sec
665 )
666
667 u32 vdec_input_buf_strm_config;
668
669
670 u32 vdec_coef_increment;
671
672
673 u32 vdec_accumphi;
674
675
676 ___DSP_DUAL_16BIT_ALLOC(
677 vdec_exp_vol_change_rate,
678 vdec_input_buf_producer_ptr
679 )
680
681
682
683
684 ___DSP_DUAL_16BIT_ALLOC(
685 vdec_next_scb,
686 vdec_sub_list_ptr
687 )
688
689 ___DSP_DUAL_16BIT_ALLOC(
690 vdec_entry_point,
691 vdec_this_spb
692 )
693
694 u32 vdec_strm_rs_config;
695 u32 vdec_strm_buf_ptr;
696
697 u32 vdec_phi_incr_6int_26frac;
698
699 struct dsp_volume_control vdec_vol_ctrl;
700 };
701
702
703
704 struct dsp_mix2_ostream_scb {
705
706 struct dsp_basic_dma_req basic_req;
707 struct dsp_scatter_gather_ext sg_ext;
708 ___DSP_DUAL_16BIT_ALLOC(
709 next_scb,
710 sub_list_ptr
711 )
712
713 ___DSP_DUAL_16BIT_ALLOC(
714 entry_point,
715 this_spb
716 )
717
718 u32 strm_rs_config;
719 u32 strm_buf_ptr;
720
721
722
723
724
725
726
727
728 ___DSP_DUAL_16BIT_ALLOC(
729 frames_left_in_group,
730 accum_input_triplets
731 )
732
733
734
735
736
737 ___DSP_DUAL_16BIT_ALLOC(
738 frame_group_length,
739 exp_vol_change_rate
740 )
741
742 ___DSP_DUAL_16BIT_ALLOC(
743 const_FFFF,
744 const_zero
745 )
746 };
747
748
749
750 struct dsp_mix_only_scb {
751
752 struct dsp_basic_dma_req basic_req;
753 struct dsp_scatter_gather_ext sg_ext;
754 ___DSP_DUAL_16BIT_ALLOC(
755 next_scb,
756 sub_list_ptr
757 )
758
759 ___DSP_DUAL_16BIT_ALLOC(
760 entry_point,
761 this_spb
762 )
763
764 u32 strm_rs_config;
765 u32 strm_buf_ptr;
766
767 u32 reserved;
768 struct dsp_volume_control vol_ctrl;
769 };
770
771
772 struct dsp_async_codec_input_scb {
773 u32 io_free2;
774
775 u32 io_current_total;
776 u32 io_previous_total;
777
778 u16 io_count;
779 u16 io_count_limit;
780
781 u16 o_fifo_base_addr;
782 u16 ost_mo_format;
783
784
785
786 u32 ostrm_rs_config;
787 u32 ostrm_buf_ptr;
788
789 ___DSP_DUAL_16BIT_ALLOC(
790 io_sclks_per_lr_clk,
791 io_io_enable
792 )
793
794 u32 io_free4;
795
796 ___DSP_DUAL_16BIT_ALLOC(
797 io_next_scb,
798 io_sub_list_ptr
799 )
800
801 ___DSP_DUAL_16BIT_ALLOC(
802 io_entry_point,
803 io_this_spb
804 )
805
806 u32 istrm_rs_config;
807 u32 istrm_buf_ptr;
808
809
810
811 ___DSP_DUAL_16BIT_ALLOC(
812 io_stat_reg_addr,
813 iofifo_pointer
814 )
815
816
817
818
819 ___DSP_DUAL_16BIT_ALLOC(
820 ififo_base_addr,
821 ist_mo_format
822 )
823
824 u32 i_free;
825 };
826
827
828
829 struct dsp_spdifiscb {
830 ___DSP_DUAL_16BIT_ALLOC(
831 status_ptr,
832 status_start_ptr
833 )
834
835 u32 current_total;
836 u32 previous_total;
837
838 ___DSP_DUAL_16BIT_ALLOC(
839 count,
840 count_limit
841 )
842
843 u32 status_data;
844
845 ___DSP_DUAL_16BIT_ALLOC(
846 status,
847 free4
848 )
849
850 u32 free3;
851
852 ___DSP_DUAL_16BIT_ALLOC(
853 free2,
854 bit_count
855 )
856
857 u32 temp_status;
858
859 ___DSP_DUAL_16BIT_ALLOC(
860 next_SCB,
861 sub_list_ptr
862 )
863
864 ___DSP_DUAL_16BIT_ALLOC(
865 entry_point,
866 this_spb
867 )
868
869 u32 strm_rs_config;
870 u32 strm_buf_ptr;
871
872 ___DSP_DUAL_16BIT_ALLOC(
873 stat_reg_addr,
874 fifo_pointer
875 )
876
877 ___DSP_DUAL_16BIT_ALLOC(
878 fifo_base_addr,
879 st_mo_format
880 )
881
882 u32 free1;
883 };
884
885
886
887 struct dsp_spdifoscb {
888
889 u32 free2;
890
891 u32 free3[4];
892
893
894 u32 strm_rs_config;
895
896 u32 strm_buf_ptr;
897
898 ___DSP_DUAL_16BIT_ALLOC(
899 status,
900 free5
901 )
902
903 u32 free4;
904
905 ___DSP_DUAL_16BIT_ALLOC(
906 next_scb,
907 sub_list_ptr
908 )
909
910 ___DSP_DUAL_16BIT_ALLOC(
911 entry_point,
912 this_spb
913 )
914
915 u32 free6[2];
916
917 ___DSP_DUAL_16BIT_ALLOC(
918 stat_reg_addr,
919 fifo_pointer
920 )
921
922 ___DSP_DUAL_16BIT_ALLOC(
923 fifo_base_addr,
924 st_mo_format
925 )
926
927 u32 free1;
928 };
929
930
931 struct dsp_asynch_fg_rx_scb {
932 ___DSP_DUAL_16BIT_ALLOC(
933 bot_buf_mask,
934 buf_Mask
935 )
936
937 ___DSP_DUAL_16BIT_ALLOC(
938 max,
939 min
940 )
941
942 ___DSP_DUAL_16BIT_ALLOC(
943 old_producer_pointer,
944 hfg_scb_ptr
945 )
946
947 ___DSP_DUAL_16BIT_ALLOC(
948 delta,
949 adjust_count
950 )
951
952 u32 unused2[5];
953
954 ___DSP_DUAL_16BIT_ALLOC(
955 sibling_ptr,
956 child_ptr
957 )
958
959 ___DSP_DUAL_16BIT_ALLOC(
960 code_ptr,
961 this_ptr
962 )
963
964 u32 strm_rs_config;
965
966 u32 strm_buf_ptr;
967
968 u32 unused_phi_incr;
969
970 ___DSP_DUAL_16BIT_ALLOC(
971 right_targ,
972 left_targ
973 )
974
975 ___DSP_DUAL_16BIT_ALLOC(
976 right_vol,
977 left_vol
978 )
979 };
980
981
982 struct dsp_asynch_fg_tx_scb {
983 ___DSP_DUAL_16BIT_ALLOC(
984 not_buf_mask,
985 buf_mask
986 )
987
988 ___DSP_DUAL_16BIT_ALLOC(
989 max,
990 min
991 )
992
993 ___DSP_DUAL_16BIT_ALLOC(
994 unused1,
995 hfg_scb_ptr
996 )
997
998 ___DSP_DUAL_16BIT_ALLOC(
999 delta,
1000 adjust_count
1001 )
1002
1003 u32 accum_phi;
1004
1005 ___DSP_DUAL_16BIT_ALLOC(
1006 unused2,
1007 const_one_third
1008 )
1009
1010 u32 unused3[3];
1011
1012 ___DSP_DUAL_16BIT_ALLOC(
1013 sibling_ptr,
1014 child_ptr
1015 )
1016
1017 ___DSP_DUAL_16BIT_ALLOC(
1018 codePtr,
1019 this_ptr
1020 )
1021
1022 u32 strm_rs_config;
1023
1024 u32 strm_buf_ptr;
1025
1026 u32 phi_incr;
1027
1028 ___DSP_DUAL_16BIT_ALLOC(
1029 unused_right_targ,
1030 unused_left_targ
1031 )
1032
1033 ___DSP_DUAL_16BIT_ALLOC(
1034 unused_right_vol,
1035 unused_left_vol
1036 )
1037 };
1038
1039
1040 struct dsp_output_snoop_scb {
1041
1042 struct dsp_basic_dma_req basic_req;
1043 struct dsp_scatter_gather_ext sg_ext;
1044 ___DSP_DUAL_16BIT_ALLOC(
1045 next_scb,
1046 sub_list_ptr
1047 )
1048
1049 ___DSP_DUAL_16BIT_ALLOC(
1050 entry_point,
1051 this_spb
1052 )
1053
1054 u32 strm_rs_config;
1055 u32 strm_buf_ptr;
1056
1057 ___DSP_DUAL_16BIT_ALLOC(
1058 init_snoop_input_link,
1059 snoop_child_input_scb
1060 )
1061
1062 u32 snoop_input_buf_ptr;
1063
1064 ___DSP_DUAL_16BIT_ALLOC(
1065 reserved,
1066 input_scb
1067 )
1068 };
1069
1070 struct dsp_spio_write_scb {
1071 ___DSP_DUAL_16BIT_ALLOC(
1072 address1,
1073 address2
1074 )
1075
1076 u32 data1;
1077
1078 u32 data2;
1079
1080 ___DSP_DUAL_16BIT_ALLOC(
1081 address3,
1082 address4
1083 )
1084
1085 u32 data3;
1086
1087 u32 data4;
1088
1089 ___DSP_DUAL_16BIT_ALLOC(
1090 unused1,
1091 data_ptr
1092 )
1093
1094 u32 unused2[2];
1095
1096 ___DSP_DUAL_16BIT_ALLOC(
1097 sibling_ptr,
1098 child_ptr
1099 )
1100
1101 ___DSP_DUAL_16BIT_ALLOC(
1102 entry_point,
1103 this_ptr
1104 )
1105
1106 u32 unused3[5];
1107 };
1108
1109 struct dsp_magic_snoop_task {
1110 u32 i0;
1111 u32 i1;
1112
1113 u32 strm_buf_ptr1;
1114
1115 u16 i2;
1116 u16 snoop_scb;
1117
1118 u32 i3;
1119 u32 i4;
1120 u32 i5;
1121 u32 i6;
1122
1123 u32 i7;
1124
1125 ___DSP_DUAL_16BIT_ALLOC(
1126 next_scb,
1127 sub_list_ptr
1128 )
1129
1130 ___DSP_DUAL_16BIT_ALLOC(
1131 entry_point,
1132 this_ptr
1133 )
1134
1135 u32 strm_buf_config;
1136 u32 strm_buf_ptr2;
1137
1138 u32 i8;
1139
1140 struct dsp_volume_control vdec_vol_ctrl;
1141 };
1142
1143
1144 struct dsp_filter_scb {
1145 ___DSP_DUAL_16BIT_ALLOC(
1146 a0_right,
1147 a0_left
1148 )
1149 ___DSP_DUAL_16BIT_ALLOC(
1150 a1_right,
1151 a1_left
1152 )
1153 ___DSP_DUAL_16BIT_ALLOC(
1154 a2_right,
1155 a2_left
1156 )
1157 ___DSP_DUAL_16BIT_ALLOC(
1158 output_buf_ptr,
1159 init
1160 )
1161
1162 ___DSP_DUAL_16BIT_ALLOC(
1163 filter_unused3,
1164 filter_unused2
1165 )
1166
1167 u32 prev_sample_output1;
1168 u32 prev_sample_output2;
1169 u32 prev_sample_input1;
1170 u32 prev_sample_input2;
1171
1172 ___DSP_DUAL_16BIT_ALLOC(
1173 next_scb_ptr,
1174 sub_list_ptr
1175 )
1176
1177 ___DSP_DUAL_16BIT_ALLOC(
1178 entry_point,
1179 spb_ptr
1180 )
1181
1182 u32 strm_rs_config;
1183 u32 strm_buf_ptr;
1184
1185 ___DSP_DUAL_16BIT_ALLOC(
1186 b0_right,
1187 b0_left
1188 )
1189 ___DSP_DUAL_16BIT_ALLOC(
1190 b1_right,
1191 b1_left
1192 )
1193 ___DSP_DUAL_16BIT_ALLOC(
1194 b2_right,
1195 b2_left
1196 )
1197 };
1198 #endif