aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrank Livingston2016-02-11 11:25:50 -0600
committerFrank Livingston2016-02-11 11:25:50 -0600
commit4e366e944b7e26fbd0e10b1409bc96e88f28a579 (patch)
tree30adba0247ae54a54dd892ff0d31fa8130372195
parentd9a04242f2c8b5b2dd27f29c99d59644ca1cd0e7 (diff)
downloadpaf-4e366e944b7e26fbd0e10b1409bc96e88f28a579.tar.gz
paf-4e366e944b7e26fbd0e10b1409bc96e88f28a579.tar.xz
paf-4e366e944b7e26fbd0e10b1409bc96e88f28a579.zip
Update for DHv1.2 full speaker support
-rw-r--r--pa/f/Makefile1
-rw-r--r--pa/f/alpha/pafsys_a.h47
-rw-r--r--pa/f/alpha/paftyp_a.h35
-rw-r--r--pa/f/include/pafsys.h18
-rw-r--r--pa/f/include/paftyp.h3
-rw-r--r--pa/f/s3/ss0.c20
6 files changed, 118 insertions, 6 deletions
diff --git a/pa/f/Makefile b/pa/f/Makefile
index 87f87be..57ab5f6 100644
--- a/pa/f/Makefile
+++ b/pa/f/Makefile
@@ -57,6 +57,7 @@ LIBNAME=fwk
57# architecture dependent settings (must come first) 57# architecture dependent settings (must come first)
58ifeq (${ARCH},c674x) 58ifeq (${ARCH},c674x)
59DEFINES += -d"dMAX_CFG=dMAX_CFG1" 59DEFINES += -d"dMAX_CFG=dMAX_CFG1"
60DEFINES += -d"FULL_SPEAKER"
60DEFINES += -d"DAP_CACHE_SUPPORT" 61DEFINES += -d"DAP_CACHE_SUPPORT"
61INCLUDES += -I"../../../../da/dmax/v0/da8xx" 62INCLUDES += -I"../../../../da/dmax/v0/da8xx"
62vpath %.c $(SRCDIR)/../../da/dmax/v0/da8xx 63vpath %.c $(SRCDIR)/../../da/dmax/v0/da8xx
diff --git a/pa/f/alpha/pafsys_a.h b/pa/f/alpha/pafsys_a.h
index 607eb7b..eff497d 100644
--- a/pa/f/alpha/pafsys_a.h
+++ b/pa/f/alpha/pafsys_a.h
@@ -108,6 +108,19 @@
108#define readSYSspeakerFrontheight 0xc200+STD_BETA_SYSIDL,0x1D00 108#define readSYSspeakerFrontheight 0xc200+STD_BETA_SYSIDL,0x1D00
109#define readSYSspeakerRearheight 0xc200+STD_BETA_SYSIDL,0x1E00 109#define readSYSspeakerRearheight 0xc200+STD_BETA_SYSIDL,0x1E00
110 110
111#ifdef FULL_SPEAKER
112#define readSYSspeakerScreen 0xc200+STD_BETA_SYSIDL,0x2800
113
114#define readSYSSurr1 0xc200+STD_BETA_SYSIDL,0x2900
115#define readSYSSurr2 0xc200+STD_BETA_SYSIDL,0x2a00
116#define readSYSRearSurr1 0xc200+STD_BETA_SYSIDL,0x2b00
117#define readSYSRearSurr2 0xc200+STD_BETA_SYSIDL,0x2c00
118#define readSYSCntrSurr 0xc200+STD_BETA_SYSIDL,0x2d00
119#define readSYSLRCntr 0xc200+STD_BETA_SYSIDL,0x2e00
120#define readSYSLRCntrSurr 0xc200+STD_BETA_SYSIDL,0x2f00
121
122#endif
123
111#define writeSYSModeDisable 0xca00+STD_BETA_SYSIDL,0x0400 124#define writeSYSModeDisable 0xca00+STD_BETA_SYSIDL,0x0400
112#define writeSYSModeEnable 0xca00+STD_BETA_SYSIDL,0x047f 125#define writeSYSModeEnable 0xca00+STD_BETA_SYSIDL,0x047f
113#define writeSYSModeN(NN) 0xca00+STD_BETA_SYSIDL,0x0400+((NN)&0xff) 126#define writeSYSModeN(NN) 0xca00+STD_BETA_SYSIDL,0x0400+((NN)&0xff)
@@ -174,6 +187,40 @@
174#define writeSYSSpeakerRearheightSmall2 0xca00+STD_BETA_SYSIDL,0x1E22 187#define writeSYSSpeakerRearheightSmall2 0xca00+STD_BETA_SYSIDL,0x1E22
175#define writeSYSSpeakerRearheightLarge2 0xca00+STD_BETA_SYSIDL,0x1E32 188#define writeSYSSpeakerRearheightLarge2 0xca00+STD_BETA_SYSIDL,0x1E32
176 189
190#ifdef FULL_SPEAKER
191#define writeSYSSpeakerScreenNone 0xca00+STD_BETA_SYSIDL,0x2800
192#define writeSYSSpeakerScreenSmall2 0xca00+STD_BETA_SYSIDL,0x2822
193#define writeSYSSpeakerScreenLarge2 0xca00+STD_BETA_SYSIDL,0x2832
194
195#define writeSYSSurr1None 0xca00+STD_BETA_SYSIDL,0x2900
196#define writeSYSSurr1Small2 0xca00+STD_BETA_SYSIDL,0x2922
197#define writeSYSSurr1Large2 0xca00+STD_BETA_SYSIDL,0x2932
198
199#define writeSYSSurr2None 0xca00+STD_BETA_SYSIDL,0x2a00
200#define writeSYSSurr2Small2 0xca00+STD_BETA_SYSIDL,0x2a22
201#define writeSYSSurr2Large2 0xca00+STD_BETA_SYSIDL,0x2a32
202
203#define writeSYSRearSurr1None 0xca00+STD_BETA_SYSIDL,0x2b00
204#define writeSYSRearSurr1Small2 0xca00+STD_BETA_SYSIDL,0x2b22
205#define writeSYSRearSurr1Large2 0xca00+STD_BETA_SYSIDL,0x2b32
206
207#define writeSYSRearSurr2None 0xca00+STD_BETA_SYSIDL,0x2c00
208#define writeSYSRearSurr2Small2 0xca00+STD_BETA_SYSIDL,0x2c22
209#define writeSYSRearSurr2Large2 0xca00+STD_BETA_SYSIDL,0x2c32
210
211#define writeSYSCntrSurrNone 0xca00+STD_BETA_SYSIDL,0x2d00
212#define writeSYSCntrSurrSmall1 0xca00+STD_BETA_SYSIDL,0x2d21
213#define writeSYSCntrSurrLarge1 0xca00+STD_BETA_SYSIDL,0x2d31
214
215#define writeSYSLRCntrNone 0xca00+STD_BETA_SYSIDL,0x2e00
216#define writeSYSLRCntrSmall2 0xca00+STD_BETA_SYSIDL,0x2e22
217#define writeSYSLRCntrLarge2 0xca00+STD_BETA_SYSIDL,0x2e32
218
219#define writeSYSLRCntrSurrNone 0xca00+STD_BETA_SYSIDL,0x2f00
220#define writeSYSLRCntrSurrSmall2 0xca00+STD_BETA_SYSIDL,0x2f22
221#define writeSYSLRCntrSurrLarge2 0xca00+STD_BETA_SYSIDL,0x2f32
222#endif
223
177#define writeSYSChannelConfigurationRequestTypeStandard 0xca00+STD_BETA_SYSIDL,0x0c00 224#define writeSYSChannelConfigurationRequestTypeStandard 0xca00+STD_BETA_SYSIDL,0x0c00
178#define writeSYSChannelConfigurationRequestTypeDecodeBypass 0xca00+STD_BETA_SYSIDL,0x0c01 225#define writeSYSChannelConfigurationRequestTypeDecodeBypass 0xca00+STD_BETA_SYSIDL,0x0c01
179#define writeSYSChannelConfigurationRequestTypeDecodeDirect 0xca00+STD_BETA_SYSIDL,0x0c02 226#define writeSYSChannelConfigurationRequestTypeDecodeDirect 0xca00+STD_BETA_SYSIDL,0x0c02
diff --git a/pa/f/alpha/paftyp_a.h b/pa/f/alpha/paftyp_a.h
index 7d165ed..e25e302 100644
--- a/pa/f/alpha/paftyp_a.h
+++ b/pa/f/alpha/paftyp_a.h
@@ -53,6 +53,9 @@
53#define ATMOS 53#define ATMOS
54#endif 54#endif
55 55
56#ifndef FULL_SPEAKER
57#define FULL_SPEAKER
58#endif
56// PA/F Extended channels: 59// PA/F Extended channels:
57 60
58#define PAF_MAXNUMCHAN_HD 32 61#define PAF_MAXNUMCHAN_HD 32
@@ -176,10 +179,19 @@
176#define PAF_WIDE 4 179#define PAF_WIDE 4
177#define PAF_LWID 4 180#define PAF_LWID 4
178#define PAF_RWID 5 181#define PAF_RWID 5
182
183#ifdef FULL_SPEAKER
184#define PAF_LTRR 18
185#define PAF_RTRR 19
186#define PAF_LTRH 20
187#define PAF_RTRH 21
188#else
179#define PAF_LTRR 4 189#define PAF_LTRR 4
180#define PAF_RTRR 5 190#define PAF_RTRR 5
181#define PAF_LTRH 4 191#define PAF_LTRH 4
182#define PAF_RTRH 5 192#define PAF_RTRH 5
193#endif
194
183#define PAF_OVER 6 195#define PAF_OVER 6
184#define PAF_LOVR 6 196#define PAF_LOVR 6
185#define PAF_ROVR 7 197#define PAF_ROVR 7
@@ -199,8 +211,15 @@
199#define PAF_RHED 15 211#define PAF_RHED 15
200#define PAF_LTFT 14 212#define PAF_LTFT 14
201#define PAF_RTFT 15 213#define PAF_RTFT 15
214
215#ifdef FULL_SPEAKER
216#define PAF_LTFH 16
217#define PAF_RTFH 17
218#else
202#define PAF_LTFH 14 219#define PAF_LTFH 14
203#define PAF_RTFH 15 220#define PAF_RTFH 15
221#endif
222
204#define PAF_FRNT_0 0 223#define PAF_FRNT_0 0
205#define PAF_FRNT_N 8 224#define PAF_FRNT_N 8
206#define PAF_REAR_0 8 225#define PAF_REAR_0 8
@@ -252,10 +271,19 @@
252#define PAF_WIDE 4 271#define PAF_WIDE 4
253#define PAF_LWID 4 272#define PAF_LWID 4
254#define PAF_RWID 5 273#define PAF_RWID 5
274
275#ifdef FULL_SPEAKER
276#define PAF_LTRR 4
277#define PAF_RTRR 5
278#define PAF_LTRH 20
279#define PAF_RTRH 21
280#else
255#define PAF_LTRR 4 281#define PAF_LTRR 4
256#define PAF_RTRR 5 282#define PAF_RTRR 5
257#define PAF_LTRH 4 283#define PAF_LTRH 4
258#define PAF_RTRH 5 284#define PAF_RTRH 5
285#endif
286
259#define PAF_OVER 6 287#define PAF_OVER 6
260#define PAF_LOVR 6 288#define PAF_LOVR 6
261#define PAF_ROVR 7 289#define PAF_ROVR 7
@@ -275,8 +303,15 @@
275#define PAF_RHED 15 303#define PAF_RHED 15
276#define PAF_LTFT 14 304#define PAF_LTFT 14
277#define PAF_RTFT 15 305#define PAF_RTFT 15
306
307#ifdef FULL_SPEAKER
308#define PAF_LTFH 3
309#define PAF_RTFH 22
310#else
278#define PAF_LTFH 14 311#define PAF_LTFH 14
279#define PAF_RTFH 15 312#define PAF_RTFH 15
313#endif
314
280#define PAF_FRNT_0 0 315#define PAF_FRNT_0 0
281#define PAF_FRNT_N 8 316#define PAF_FRNT_N 8
282#define PAF_REAR_0 8 317#define PAF_REAR_0 8
diff --git a/pa/f/include/pafsys.h b/pa/f/include/pafsys.h
index 779377e..ee74993 100644
--- a/pa/f/include/pafsys.h
+++ b/pa/f/include/pafsys.h
@@ -67,11 +67,21 @@ typedef volatile struct PAF_SystemStatus {
67 XDAS_UInt8 speakerHead; 67 XDAS_UInt8 speakerHead;
68 XDAS_UInt8 speakerTopfront; 68 XDAS_UInt8 speakerTopfront;
69 XDAS_UInt8 speakerToprear; 69 XDAS_UInt8 speakerToprear;
70 XDAS_UInt8 speakerTopmiddle; 70 XDAS_UInt8 speakerTopmiddle;
71 XDAS_UInt8 speakerFrontheight; 71 XDAS_UInt8 speakerFrontheight;
72 XDAS_UInt8 speakerRearheight; 72 XDAS_UInt8 speakerRearheight;
73 XDAS_UInt8 unused2;//To make 64 bit alligned 73 XDAS_UInt8 unused2;//To make 64 bit alligned
74 PAF_ChannelConfiguration channelConfigurationRequest; 74 PAF_ChannelConfiguration channelConfigurationRequest;
75#ifdef FULL_SPEAKER
76 XDAS_UInt8 speakerScreen;//0x28
77 XDAS_UInt8 speakerSurr1;//0x29
78 XDAS_UInt8 speakerSurr2;//0x2a
79 XDAS_UInt8 speakerRearSurr1;//0x2b
80 XDAS_UInt8 speakerRearSurr2;//0x2c
81 XDAS_UInt8 speakerCntrSurr;//0x2d
82 XDAS_UInt8 speakerLRCntr;//0x2e
83 XDAS_UInt8 speakerLRCntrSurr;//0x2f
84#endif
75} PAF_SystemStatus; 85} PAF_SystemStatus;
76 86
77typedef volatile struct PAF_ErrorStatus { 87typedef volatile struct PAF_ErrorStatus {
diff --git a/pa/f/include/paftyp.h b/pa/f/include/paftyp.h
index beed5cf..530552d 100644
--- a/pa/f/include/paftyp.h
+++ b/pa/f/include/paftyp.h
@@ -39,6 +39,9 @@
39// 39//
40// 40//
41// 41//
42#ifndef FULL_SPEAKER
43#define FULL_SPEAKER
44#endif
42 45
43#ifndef PAFTYP_ 46#ifndef PAFTYP_
44#define PAFTYP_ 47#define PAFTYP_
diff --git a/pa/f/s3/ss0.c b/pa/f/s3/ss0.c
index 4281f94..ca5edf3 100644
--- a/pa/f/s3/ss0.c
+++ b/pa/f/s3/ss0.c
@@ -73,6 +73,10 @@ extern int L3RAM;
73#endif 73#endif
74#endif /* RAM_REPORT */ 74#endif /* RAM_REPORT */
75 75
76#ifndef FULL_SPEAKER
77#define FULL_SPEAKER
78#endif
79
76// 80//
77// systemStream : audio stream control function (main) 81// systemStream : audio stream control function (main)
78// 82//
@@ -232,8 +236,20 @@ systemStream1Compute (const PAF_SST_Params *pP, PAF_SST_Config *pC, long long x[
232 ccr.part.sub = (pStatus->speakerSubw & PAF_SYS_SPEAKERNUMB); 236 ccr.part.sub = (pStatus->speakerSubw & PAF_SYS_SPEAKERNUMB);
233 ccr.part.extMask = 237 ccr.part.extMask =
234 ((pStatus->speakerWide & PAF_SYS_SPEAKERNUMB) ? PAF_CC_EXTMASK_LwRw : 0) 238 ((pStatus->speakerWide & PAF_SYS_SPEAKERNUMB) ? PAF_CC_EXTMASK_LwRw : 0)
235 | ((pStatus->speakerHead & PAF_SYS_SPEAKERNUMB) ? PAF_CC_EXTMASK_LhRh : 0) ; 239#ifdef FULL_SPEAKER
236 240 | ((pStatus->speakerLRCntr & PAF_SYS_SPEAKERNUMB) ? PAF_CC_EXTMASK_LcRc : 0)
241#endif
242 | ((pStatus->speakerHead & PAF_SYS_SPEAKERNUMB) ? PAF_CC_EXTMASK_LhRh : 0);
243#ifdef FULL_SPEAKER
244 ccr.part.extMask2 =
245 ((pStatus->speakerCntrSurr & PAF_SYS_SPEAKERNUMB) ? PAF_CC_EXTMASK_Cs : 0)
246 | ((pStatus->speakerLRCntrSurr & PAF_SYS_SPEAKERNUMB) ? PAF_CC_EXTMASK_LcsRcs : 0)
247 | ((pStatus->speakerRearSurr2 & PAF_SYS_SPEAKERNUMB) ? PAF_CC_EXTMASK_Lrs2Rrs2 : 0)
248 | ((pStatus->speakerRearSurr1 & PAF_SYS_SPEAKERNUMB) ? PAF_CC_EXTMASK_Lrs1Rrs1 : 0)
249 | ((pStatus->speakerSurr2 & PAF_SYS_SPEAKERNUMB) ? PAF_CC_EXTMASK_Ls2Rs2 : 0)
250 | ((pStatus->speakerSurr1 & PAF_SYS_SPEAKERNUMB) ? PAF_CC_EXTMASK_Ls1Rs1 : 0)
251 | ((pStatus->speakerScreen & PAF_SYS_SPEAKERNUMB) ? PAF_CC_EXTMASK_LscRsc : 0);
252#endif
237 ccr.part.extMask3 = 253 ccr.part.extMask3 =
238 ((pStatus->speakerTopfront & PAF_SYS_SPEAKERNUMB) ? PAF_CC_EXTMASK_LtfRtf : 0) 254 ((pStatus->speakerTopfront & PAF_SYS_SPEAKERNUMB) ? PAF_CC_EXTMASK_LtfRtf : 0)
239 | ((pStatus->speakerToprear & PAF_SYS_SPEAKERNUMB) ? PAF_CC_EXTMASK_LtrRtr : 0) 255 | ((pStatus->speakerToprear & PAF_SYS_SPEAKERNUMB) ? PAF_CC_EXTMASK_LtrRtr : 0)