ixj.c
上传用户:sy_wanhua
上传日期:2013-07-25
资源大小:3048k
文件大小:219k
源码类别:

流媒体/Mpeg4/MP4

开发平台:

C/C++

  1. ixj_play_stop(board);
  2. ixj_play_stop(arg);
  3. idle(board);
  4. idle(arg);
  5. break;
  6. case IXJCTL_INTERCOM_START:
  7. ixj[board].intercom = arg;
  8. ixj[arg].intercom = board;
  9. ixj_play_start(arg);
  10. ixj_record_start(board);
  11. ixj_play_start(board);
  12. ixj_record_start(arg);
  13. idle(board);
  14. idle(arg);
  15. break;
  16. }
  17. return retval;
  18. }
  19. static int ixj_fasync(int fd, struct file *file_p, int mode)
  20. {
  21. IXJ *j = &ixj[NUM(file_p->f_dentry->d_inode->i_rdev)];
  22. return fasync_helper(fd, file_p, mode, &j->async_queue);
  23. }
  24. struct file_operations ixj_fops =
  25. {
  26. NULL, /* ixj_lseek */
  27. ixj_enhanced_read,
  28. ixj_enhanced_write,
  29. NULL, /* ixj_readdir */
  30. ixj_poll,
  31. ixj_ioctl,
  32. NULL, /* ixj_mmap */
  33. //  ixj_open,
  34. NULL, /* ixj_open */
  35. NULL, /* ixj_flush */
  36. ixj_release,
  37. NULL, /* ixj_fsync */
  38. ixj_fasync, /* ixj_fasync */
  39. NULL, /* media change */
  40. NULL, /* revalidate */
  41. NULL /* lock */
  42. };
  43. static int ixj_linetest(int board)
  44. {
  45. unsigned long jifwait;
  46. IXJ *j = &ixj[board];
  47. if (!j->flags.pots_correct) {
  48. j->flags.pots_correct = 1; // Testing
  49. daa_int_read(board); //Clear DAA Interrupt flags
  50. //
  51. // Hold all relays in the normally de-energized position.
  52. //
  53. j->pld_slicw.bits.rly1 = 0;
  54. j->pld_slicw.bits.rly2 = 0;
  55. j->pld_slicw.bits.rly3 = 0;
  56. outb_p(j->pld_slicw.byte, j->XILINXbase + 0x01);
  57. j->pld_scrw.bits.daafsyncen = 0; // Turn off DAA Frame Sync
  58. outb_p(j->pld_scrw.byte, j->XILINXbase);
  59. j->pld_slicr.byte = inb_p(j->XILINXbase + 0x01);
  60. if (j->pld_slicr.bits.potspstn) {
  61. j->flags.pots_pstn = 1;
  62. j->flags.pots_correct = 0;
  63. LED_SetState(0x4, board);
  64. } else {
  65. j->flags.pots_pstn = 0;
  66. j->pld_slicw.bits.rly1 = 0;
  67. j->pld_slicw.bits.rly2 = 0;
  68. j->pld_slicw.bits.rly3 = 1;
  69. outb_p(j->pld_slicw.byte, j->XILINXbase + 0x01);
  70. j->pld_scrw.bits.daafsyncen = 0; // Turn off DAA Frame Sync
  71. outb_p(j->pld_scrw.byte, j->XILINXbase);
  72. daa_set_mode(board, SOP_PU_CONVERSATION);
  73. jifwait = jiffies + hertz;
  74. while (time_before(jiffies, jifwait)) {
  75. current->state = TASK_INTERRUPTIBLE;
  76. schedule_timeout(1);
  77. }
  78. daa_int_read(board);
  79. daa_set_mode(board, SOP_PU_SLEEP);
  80. if (j->m_DAAShadowRegs.XOP_REGS.XOP.xr0.bitreg.VDD_OK) {
  81. j->flags.pots_correct = 0; // Should not be line voltage on POTS port.
  82. LED_SetState(0x4, board);
  83. j->pld_slicw.bits.rly3 = 0;
  84. outb_p(j->pld_slicw.byte, j->XILINXbase + 0x01);
  85. } else {
  86. j->flags.pots_correct = 1;
  87. LED_SetState(0x8, board);
  88. j->pld_slicw.bits.rly1 = 1;
  89. j->pld_slicw.bits.rly2 = 0;
  90. j->pld_slicw.bits.rly3 = 0;
  91. outb_p(j->pld_slicw.byte, j->XILINXbase + 0x01);
  92. }
  93. }
  94. }
  95. if (!j->flags.pstn_present) {
  96. j->pld_slicw.bits.rly3 = 0;
  97. outb_p(j->pld_slicw.byte, j->XILINXbase + 0x01);
  98. daa_set_mode(board, SOP_PU_CONVERSATION);
  99. jifwait = jiffies + hertz;
  100. while (time_before(jiffies, jifwait)) {
  101. current->state = TASK_INTERRUPTIBLE;
  102. schedule_timeout(1);
  103. }
  104. daa_int_read(board);
  105. daa_set_mode(board, SOP_PU_SLEEP);
  106. if (j->m_DAAShadowRegs.XOP_REGS.XOP.xr0.bitreg.VDD_OK) {
  107. j->flags.pstn_present = 1;
  108. } else {
  109. j->flags.pstn_present = 0;
  110. }
  111. }
  112. if (j->flags.pstn_present) {
  113. if (j->flags.pots_correct) {
  114. LED_SetState(0xA, board);
  115. } else {
  116. LED_SetState(0x6, board);
  117. }
  118. } else {
  119. if (j->flags.pots_correct) {
  120. LED_SetState(0x9, board);
  121. } else {
  122. LED_SetState(0x5, board);
  123. }
  124. }
  125. return j->flags.pstn_present;
  126. }
  127. static int ixj_selfprobe(int board)
  128. {
  129. unsigned short cmd;
  130. unsigned long jif;
  131. BYTES bytes;
  132. IXJ *j = &ixj[board];
  133. if (ixjdebug > 0)
  134. printk(KERN_INFO "Write IDLE to Software Control Registern");
  135. if (ixj_WriteDSPCommand(0x0000, board)) /* Write IDLE to Software Control Register */
  136. return -1;
  137. // The read values of the SSR should be 0x00 for the IDLE command
  138. if (j->ssr.low || j->ssr.high)
  139. return -1;
  140. if (ixjdebug > 0)
  141. printk(KERN_INFO "Get Device ID Coden");
  142. if (ixj_WriteDSPCommand(0x3400, board)) /* Get Device ID Code */
  143. return -1;
  144. j->dsp.low = j->ssr.low;
  145. j->dsp.high = j->ssr.high;
  146. if (ixjdebug > 0)
  147. printk(KERN_INFO "Get Device Version Coden");
  148. if (ixj_WriteDSPCommand(0x3800, board)) /* Get Device Version Code */
  149. return -1;
  150. j->ver.low = j->ssr.low;
  151. j->ver.high = j->ssr.high;
  152. if (!j->cardtype) {
  153. if (j->dsp.low == 0x21) {
  154. //      j->XILINXbase = j->DSPbase + 0x10;
  155. bytes.high = bytes.low = inb_p(j->XILINXbase + 0x02);
  156. outb_p(bytes.low ^ 0xFF, j->XILINXbase + 0x02);
  157.       // Test for Internet LineJACK or Internet PhoneJACK Lite
  158. bytes.low = inb_p(j->XILINXbase + 0x02);
  159. if (bytes.low == bytes.high) //  Register is read only on
  160.                                     //  Internet PhoneJack Lite
  161.  {
  162. j->cardtype = 400; // Internet PhoneJACK Lite
  163. if (check_region(j->XILINXbase, 4)) {
  164. printk(KERN_INFO "ixj: can't get I/O address 0x%xn", j->XILINXbase);
  165. return -1;
  166. }
  167. request_region(j->XILINXbase, 4, "ixj control");
  168. j->pld_slicw.pcib.e1 = 1;
  169. outb_p(j->pld_slicw.byte, j->XILINXbase);
  170. } else {
  171. j->cardtype = 300; // Internet LineJACK
  172. if (check_region(j->XILINXbase, 8)) {
  173. printk(KERN_INFO "ixj: can't get I/O address 0x%xn", j->XILINXbase);
  174. return -1;
  175. }
  176. request_region(j->XILINXbase, 8, "ixj control");
  177. }
  178. } else if (j->dsp.low == 0x22) {
  179. j->cardtype = 500; // Internet PhoneJACK PCI
  180. request_region(j->XILINXbase, 4, "ixj control");
  181. j->pld_slicw.pcib.e1 = 1;
  182. outb_p(j->pld_slicw.byte, j->XILINXbase);
  183. } else
  184. j->cardtype = 100; // Internet PhoneJACK
  185. } else {
  186. switch (j->cardtype) {
  187. case 100: // Internet PhoneJACK
  188. if (!j->dsp.low != 0x20) {
  189. j->dsp.high = 0x80;
  190. j->dsp.low = 0x20;
  191. ixj_WriteDSPCommand(0x3800, board);
  192. j->ver.low = j->ssr.low;
  193. j->ver.high = j->ssr.high;
  194. }
  195. break;
  196. case 300: // Internet LineJACK
  197. if (check_region(j->XILINXbase, 8)) {
  198. printk(KERN_INFO "ixj: can't get I/O address 0x%xn", j->XILINXbase);
  199. return -1;
  200. }
  201. request_region(j->XILINXbase, 8, "ixj control");
  202. break;
  203. case 400: //Internet PhoneJACK Lite
  204. case 500: //Internet PhoneJACK PCI
  205. if (check_region(j->XILINXbase, 4)) {
  206. printk(KERN_INFO "ixj: can't get I/O address 0x%xn", j->XILINXbase);
  207. return -1;
  208. }
  209. request_region(j->XILINXbase, 4, "ixj control");
  210. j->pld_slicw.pcib.e1 = 1;
  211. outb_p(j->pld_slicw.byte, j->XILINXbase);
  212. break;
  213. }
  214. }
  215. if (j->dsp.low == 0x20 || j->cardtype == 400 || j->cardtype == 500) {
  216. if (ixjdebug > 0)
  217. printk(KERN_INFO "Write CODEC config to Software Control Registern");
  218. if (ixj_WriteDSPCommand(0xC462, board)) /* Write CODEC config to Software Control Register */
  219. return -1;
  220. if (ixjdebug > 0)
  221. printk(KERN_INFO "Write CODEC timing to Software Control Registern");
  222. if (j->cardtype == 100) {
  223. cmd = 0x9FF2;
  224. } else {
  225. cmd = 0x9FF5;
  226. }
  227. if (ixj_WriteDSPCommand(cmd, board)) /* Write CODEC timing to Software Control Register */
  228. return -1;
  229. } else {
  230. if (set_base_frame(board, 30) != 30)
  231. return -1;
  232. if (j->cardtype == 300) {
  233. if (ixjdebug > 0)
  234. printk(KERN_INFO "Write CODEC config to Software Control Registern");
  235. if (ixj_WriteDSPCommand(0xC528, board)) /* Write CODEC config to Software Control Register */
  236. return -1;
  237. if (ixjdebug > 0)
  238. printk(KERN_INFO "Turn on the PLD Clock at 8Khzn");
  239. j->pld_clock.byte = 0;
  240. outb_p(j->pld_clock.byte, j->XILINXbase + 0x04);
  241. }
  242. }
  243. if (j->dsp.low == 0x20) {
  244. if (ixjdebug > 0)
  245. printk(KERN_INFO "Configure GPIO pinsn");
  246. j->gpio.bytes.high = 0x09;
  247. /*  bytes.low = 0xEF;  0xF7 */
  248. j->gpio.bits.gpio1 = 1;
  249. j->gpio.bits.gpio2 = 1;
  250. j->gpio.bits.gpio3 = 0;
  251. j->gpio.bits.gpio4 = 1;
  252. j->gpio.bits.gpio5 = 1;
  253. j->gpio.bits.gpio6 = 1;
  254. j->gpio.bits.gpio7 = 1;
  255. ixj_WriteDSPCommand(ixj[board].gpio.word, board); /* Set GPIO pin directions */
  256. if (ixjdebug > 0)
  257. printk(KERN_INFO "Enable SLICn");
  258. j->gpio.bytes.high = 0x0B;
  259. j->gpio.bytes.low = 0x00;
  260. j->gpio.bits.gpio1 = 0;
  261. j->gpio.bits.gpio2 = 1;
  262. j->gpio.bits.gpio5 = 0;
  263. ixj_WriteDSPCommand(ixj[board].gpio.word, board); /* send the ring stop signal */
  264. j->port = PORT_POTS;
  265. } else {
  266. if (j->cardtype == 300) {
  267. LED_SetState(0x1, board);
  268. jif = jiffies + (hertz / 10);
  269. while (time_before(jiffies, jif)) {
  270. current->state = TASK_INTERRUPTIBLE;
  271. schedule_timeout(1);
  272. }
  273. LED_SetState(0x2, board);
  274. jif = jiffies + (hertz / 10);
  275. while (time_before(jiffies, jif)) {
  276. current->state = TASK_INTERRUPTIBLE;
  277. schedule_timeout(1);
  278. }
  279. LED_SetState(0x4, board);
  280. jif = jiffies + (hertz / 10);
  281. while (time_before(jiffies, jif)) {
  282. current->state = TASK_INTERRUPTIBLE;
  283. schedule_timeout(1);
  284. }
  285. LED_SetState(0x8, board);
  286. jif = jiffies + (hertz / 10);
  287. while (time_before(jiffies, jif)) {
  288. current->state = TASK_INTERRUPTIBLE;
  289. schedule_timeout(1);
  290. }
  291. LED_SetState(0x0, board);
  292. daa_get_version(board);
  293. if (ixjdebug > 0)
  294. printk("Loading DAA Coefficientsn");
  295. DAA_Coeff_US(board);
  296. if (!ixj_daa_write(board))
  297. printk("DAA write failed on board %dn", board);
  298. ixj_daa_cid_reset(board);
  299. j->flags.pots_correct = 0;
  300. j->flags.pstn_present = 0;
  301. ixj_linetest(board);
  302. if (j->flags.pots_correct) {
  303. j->pld_scrw.bits.daafsyncen = 0; // Turn off DAA Frame Sync
  304. outb_p(j->pld_scrw.byte, j->XILINXbase);
  305. j->pld_slicw.bits.rly1 = 1;
  306. j->pld_slicw.bits.spken = 1;
  307. outb_p(j->pld_slicw.byte, j->XILINXbase + 0x01);
  308. SLIC_SetState(PLD_SLIC_STATE_STANDBY, board);
  309. j->port = PORT_POTS;
  310. }
  311. if (ixjdebug > 0)
  312. printk(KERN_INFO "Enable Mixern");
  313. ixj_mixer(0x0000, board); //Master Volume Left unmute 0db
  314. ixj_mixer(0x0100, board); //Master Volume Right unmute 0db
  315. ixj_mixer(0x0F00, board); //Mono Out Volume unmute 0db
  316. ixj_mixer(0x0C00, board); //Mono1 Volume unmute 0db
  317. ixj_mixer(0x0200, board); //Voice Left Volume unmute 0db
  318. ixj_mixer(0x0300, board); //Voice Right Volume unmute 0db
  319. ixj_mixer(0x110C, board); //Voice Left and Right out
  320. ixj_mixer(0x1401, board); //Mono1 switch on mixer left
  321. ixj_mixer(0x1501, board); //Mono1 switch on mixer right
  322. ixj_mixer(0x1700, board); //Clock select
  323. ixj_mixer(0x1800, board); //ADC Source select
  324. } else {
  325. j->port = PORT_POTS;
  326. SLIC_SetState(PLD_SLIC_STATE_STANDBY, board);
  327. }
  328. }
  329. j->intercom = -1;
  330. j->framesread = j->frameswritten = 0;
  331. j->rxreadycheck = j->txreadycheck = 0;
  332. if (ixj_WriteDSPCommand(0x0000, board)) /* Write IDLE to Software Control Register */
  333. return -1;
  334. // The read values of the SSR should be 0x00 for the IDLE command
  335. if (j->ssr.low || j->ssr.high)
  336. return -1;
  337. if (ixjdebug > 0)
  338. printk(KERN_INFO "Enable Line Monitorn");
  339. if (ixjdebug > 0)
  340. printk(KERN_INFO "Set Line Monitor to Asyncronous Moden");
  341. if (ixj_WriteDSPCommand(0x7E01, board)) // Asynchronous Line Monitor
  342. return -1;
  343. if (ixjdebug > 0)
  344. printk(KERN_INFO "Enable DTMF Detectorsn");
  345. if (ixj_WriteDSPCommand(0x5151, board)) // Enable DTMF detection
  346. return -1;
  347. if (ixj_WriteDSPCommand(0x6E01, board)) // Set Asyncronous Tone Generation
  348. return -1;
  349. set_rec_depth(board, 2); // Set Record Channel Limit to 2 frames
  350. set_play_depth(board, 2); // Set Playback Channel Limit to 2 frames
  351. j->ex.bits.dtmf_ready = 0;
  352. j->dtmf_state = 0;
  353. j->dtmf_wp = ixj[board].dtmf_rp = 0;
  354. j->rec_mode = ixj[board].play_mode = -1;
  355. j->flags.ringing = 0;
  356. j->maxrings = MAXRINGS;
  357. j->ring_cadence = USA_RING_CADENCE;
  358. j->drybuffer = 0;
  359. j->winktime = 320;
  360. j->flags.dtmf_oob = 0;
  361. /* must be a device on the specified address */
  362. /* Register with the Telephony for Linux subsystem */
  363. j->p.f_op = &ixj_fops;
  364. j->p.open = ixj_open;
  365. phone_register_device(&j->p, PHONE_UNIT_ANY);
  366. add_caps(board);
  367. return 0;
  368. }
  369. int ixj_read_proc(char *buf, char **start, off_t offset, int len, int unused)
  370. {
  371. int cnt;
  372. IXJ *j;
  373. len = 0;
  374. len += sprintf(buf + len, "n%s", ixj_c_rcsid);
  375. len += sprintf(buf + len, "n%s", ixj_h_rcsid);
  376. len += sprintf(buf + len, "n%s", ixjuser_h_rcsid);
  377. for (cnt = 0; cnt < IXJMAX; cnt++) {
  378. j = &ixj[cnt];
  379. if (j->DSPbase) {
  380. len += sprintf(buf + len, "nCard Num %d", cnt);
  381. len += sprintf(buf + len, "nDSP Base Address 0x%4.4x", j->DSPbase);
  382. if (j->cardtype != 100)
  383. len += sprintf(buf + len, "nXILINX Base Address 0x%4.4x", j->XILINXbase);
  384. len += sprintf(buf + len, "nDSP Type %2.2x%2.2x", j->dsp.high, j->dsp.low);
  385. len += sprintf(buf + len, "nDSP Version %2.2x.%2.2x", j->ver.high, j->ver.low);
  386. len += sprintf(buf + len, "nSerial Number %8.8x", j->serial);
  387. switch (j->cardtype) {
  388. case (100):
  389. len += sprintf(buf + len, "nCard Type = Internet PhoneJACK");
  390. break;
  391. case (300):
  392. len += sprintf(buf + len, "nCard Type = Internet LineJACK");
  393. if (j->flags.g729_loaded)
  394. len += sprintf(buf + len, " w/G.729 A/B");
  395. break;
  396. case (400):
  397. len += sprintf(buf + len, "nCard Type = Internet PhoneJACK Lite");
  398. if (j->flags.g729_loaded)
  399. len += sprintf(buf + len, " w/G.729 A/B");
  400. break;
  401. case (500):
  402. len += sprintf(buf + len, "nCard Type = Internet PhoneJACK PCI");
  403. if (j->flags.g729_loaded)
  404. len += sprintf(buf + len, " w/G.729 A/B");
  405. break;
  406. default:
  407. len += sprintf(buf + len, "nCard Type = %d", j->cardtype);
  408. break;
  409. }
  410. len += sprintf(buf + len, "nCapabilities %d", j->caps);
  411. if (j->dsp.low != 0x20)
  412. len += sprintf(buf + len, "nDSP Processor load %d", j->proc_load);
  413. //    if(j->intercom != -1)
  414. //      len += sprintf(buf+len, "nIntercom call to board %2.2x", j->intercom);
  415. //    len += sprintf(buf+len, "nRead buffer size %d", j->read_buffer_size);
  416. //    len += sprintf(buf+len, "nWrite buffer size %d", j->write_buffer_size);
  417. len += sprintf(buf + len, "nPlay CODEC ");
  418. switch (j->play_codec) {
  419. case G723_63:
  420. len += sprintf(buf + len, "G.723.1 6.3");
  421. break;
  422. case G723_53:
  423. len += sprintf(buf + len, "G.723.1 5.3");
  424. break;
  425. case TS85:
  426. len += sprintf(buf + len, "TrueSpeech 8.5");
  427. break;
  428. case TS48:
  429. len += sprintf(buf + len, "TrueSpeech 4.8");
  430. break;
  431. case TS41:
  432. len += sprintf(buf + len, "TrueSpeech 4.1");
  433. break;
  434. case G728:
  435. len += sprintf(buf + len, "G.728");
  436. break;
  437. case G729:
  438. len += sprintf(buf + len, "G.729");
  439. break;
  440. case ULAW:
  441. len += sprintf(buf + len, "uLaw");
  442. break;
  443. case ALAW:
  444. len += sprintf(buf + len, "aLaw");
  445. break;
  446. case LINEAR16:
  447. len += sprintf(buf + len, "16 bit Linear");
  448. break;
  449. case LINEAR8:
  450. len += sprintf(buf + len, "8 bit Linear");
  451. break;
  452. case WSS:
  453. len += sprintf(buf + len, "Windows Sound System");
  454. break;
  455. default:
  456. len += sprintf(buf + len, "NO CODEC CHOSEN");
  457. break;
  458. }
  459. //    len += sprintf(buf+len, "nPlay Frame Size %d", j->play_frame_size);
  460. //    len += sprintf(buf+len, "nInfo_write.convert_mode = %d", j->Info_write.convert_mode);
  461. //    len += sprintf(buf+len, "nInfo_write.convert_dir = %d", j->Info_write.convert_dir);
  462. len += sprintf(buf + len, "nRecord CODEC ");
  463. switch (j->rec_codec) {
  464. case G723_63:
  465. len += sprintf(buf + len, "G.723.1 6.3");
  466. break;
  467. case G723_53:
  468. len += sprintf(buf + len, "G.723.1 5.3");
  469. break;
  470. case TS85:
  471. len += sprintf(buf + len, "TrueSpeech 8.5");
  472. break;
  473. case TS48:
  474. len += sprintf(buf + len, "TrueSpeech 4.8");
  475. break;
  476. case TS41:
  477. len += sprintf(buf + len, "TrueSpeech 4.1");
  478. break;
  479. case G728:
  480. len += sprintf(buf + len, "G.728");
  481. break;
  482. case G729:
  483. len += sprintf(buf + len, "G.729");
  484. break;
  485. case ULAW:
  486. len += sprintf(buf + len, "uLaw");
  487. break;
  488. case ALAW:
  489. len += sprintf(buf + len, "aLaw");
  490. break;
  491. case LINEAR16:
  492. len += sprintf(buf + len, "16 bit Linear");
  493. break;
  494. case LINEAR8:
  495. len += sprintf(buf + len, "8 bit Linear");
  496. break;
  497. case WSS:
  498. len += sprintf(buf + len, "Windows Sound System");
  499. break;
  500. default:
  501. len += sprintf(buf + len, "NO CODEC CHOSEN");
  502. break;
  503. }
  504. //    len += sprintf(buf+len, "nRecord Frame Size %d", j->rec_frame_size);
  505. switch (j->aec_level) {
  506. case AEC_OFF:
  507. len += sprintf(buf + len, "n AEC OFF");
  508. break;
  509. case AEC_LOW:
  510. len += sprintf(buf + len, "n AEC LOW");
  511. break;
  512. case AEC_MED:
  513. len += sprintf(buf + len, "n AEC MED");
  514. break;
  515. case AEC_HIGH:
  516. len += sprintf(buf + len, "n AEC HIGH");
  517. break;
  518. }
  519. //    len += sprintf(buf+len, "nInfo_read.convert_mode = %d", j->Info_read.convert_mode);
  520. //    len += sprintf(buf+len, "nInfo_read.convert_dir = %d", j->Info_read.convert_dir);
  521. len += sprintf(buf + len, "nHook state %d", j->r_hook); // ixj_hookstate(cnt));
  522. if (j->cardtype == 300) {
  523. len += sprintf(buf + len, "nPOTS Correct %d", j->flags.pots_correct);
  524. len += sprintf(buf + len, "nPSTN Present %d", j->flags.pstn_present);
  525. len += sprintf(buf + len, "nPOTS to PSTN %d", j->flags.pots_pstn);
  526. //      len += sprintf(buf+len, "nDAA Interrupt flags %d", j->m_DAAShadowRegs.XOP_REGS.XOP.xr0.reg);
  527. //      len += sprintf(buf+len, "nDAA version %d", j->m_DAAShadowRegs.SOP_REGS.SOP.cr5.reg);
  528. switch (j->daa_mode) {
  529. case SOP_PU_SLEEP:
  530. len += sprintf(buf + len, "nDAA PSTN On Hook");
  531. break;
  532. case SOP_PU_RINGING:
  533. len += sprintf(buf + len, "nDAA PSTN Ringing");
  534. break;
  535. case SOP_PU_CONVERSATION:
  536. len += sprintf(buf + len, "nDAA PSTN Off Hook");
  537. break;
  538. case SOP_PU_PULSEDIALING:
  539. len += sprintf(buf + len, "nDAA PSTN Pulse Dialing");
  540. break;
  541. }
  542. //      len += sprintf(buf+len, "nDAA PSTN Ring flag = %d", j->pstn_ringing);
  543. }
  544. switch (j->port) {
  545. case PORT_POTS:
  546. len += sprintf(buf + len, "nPort POTS");
  547. break;
  548. case PORT_PSTN:
  549. len += sprintf(buf + len, "nPort PSTN");
  550. break;
  551. case PORT_SPEAKER:
  552. len += sprintf(buf + len, "nPort SPEAKER/MIC");
  553. break;
  554. case PORT_HANDSET:
  555. len += sprintf(buf + len, "nPort HANDSET");
  556. break;
  557. }
  558. if (j->dsp.low == 0x21 || j->dsp.low == 0x22) {
  559. len += sprintf(buf + len, "nSLIC state ");
  560. switch (SLIC_GetState(cnt)) {
  561. case PLD_SLIC_STATE_OC:
  562. len += sprintf(buf + len, "OC");
  563. break;
  564. case PLD_SLIC_STATE_RINGING:
  565. len += sprintf(buf + len, "RINGING");
  566. break;
  567. case PLD_SLIC_STATE_ACTIVE:
  568. len += sprintf(buf + len, "ACTIVE");
  569. break;
  570. case PLD_SLIC_STATE_OHT: // On-hook transmit
  571. len += sprintf(buf + len, "OHT");
  572. break;
  573. case PLD_SLIC_STATE_TIPOPEN:
  574. len += sprintf(buf + len, "TIPOPEN");
  575. break;
  576. case PLD_SLIC_STATE_STANDBY:
  577. len += sprintf(buf + len, "STANDBY");
  578. break;
  579. case PLD_SLIC_STATE_APR: // Active polarity reversal
  580. len += sprintf(buf + len, "APR");
  581. break;
  582. case PLD_SLIC_STATE_OHTPR: // OHT polarity reversal
  583. len += sprintf(buf + len, "OHTPR");
  584. break;
  585. default:
  586. len += sprintf(buf + len, "%d", SLIC_GetState(cnt));
  587. break;
  588. }
  589. }
  590. //    len += sprintf(buf+len, "nRead buffers ready %d", j->read_buffer_ready);
  591. //    len += sprintf(buf+len, "nWrite buffers empty %d",j->write_buffers_empty);
  592. //    len += sprintf(buf+len, "nDTMF ready %d", j->ex.bits.dtmf_ready);
  593. //    len += sprintf(buf+len, "nDTMF proc %d", j->dtmf_proc);
  594. //    len += sprintf(buf+len, "nDTMF wp %d", j->dtmf_wp);
  595. //    len += sprintf(buf+len, "nDTMF rp %d", j->dtmf_rp);
  596. //    len += sprintf(buf+len, "nDTMF digits ");
  597. //    for(x=j->dtmf_rp; x <j->dtmf_wp; x++)
  598. //    {
  599. //      if(x == 79)
  600. //        x = 0;
  601. //      len += sprintf(buf+len, "%x", j->dtmfbuffer[x]);
  602. //    }
  603. #ifdef PERFMON_STATS
  604. len += sprintf(buf + len, "nTimer Checks %ld", j->timerchecks);
  605. len += sprintf(buf + len, "nRX Ready Checks %ld", j->rxreadycheck);
  606. len += sprintf(buf + len, "nTX Ready Checks %ld", j->txreadycheck);
  607. len += sprintf(buf + len, "nBase Frame %2.2x.%2.2x", j->baseframe.high, j->baseframe.low);
  608. len += sprintf(buf + len, "nFrames Read %ld", j->framesread);
  609. len += sprintf(buf + len, "nFrames Written %ld", j->frameswritten);
  610. len += sprintf(buf + len, "nDry Buffer %ld", j->drybuffer);
  611. len += sprintf(buf + len, "nRead Waits %ld", j->read_wait);
  612. len += sprintf(buf + len, "nWrite Waits %ld", j->write_wait);
  613. #endif
  614. len += sprintf(buf + len, "n");
  615. }
  616. }
  617. return len;
  618. }
  619. struct proc_dir_entry ixj_proc_entry =
  620. {
  621. 0,
  622. 3, "ixj",
  623. S_IFREG | S_IRUGO,
  624. 1, 0, 0,
  625. 0,
  626. NULL,
  627. &ixj_read_proc
  628. };
  629. MODULE_DESCRIPTION("Internet PhoneJACK/Internet LineJACK module - www.quicknet.net");
  630. MODULE_AUTHOR("Ed Okerson <eokerson@quicknet.net>");
  631. void cleanup_module(void)
  632. {
  633. int cnt;
  634. del_timer(&ixj_timer);
  635. //  if (ixj_major)
  636. //    unregister_chrdev(ixj_major, "ixj");
  637. for (cnt = 0; cnt < IXJMAX; cnt++) {
  638. if (ixj[cnt].cardtype == 300) {
  639. ixj[cnt].pld_scrw.bits.daafsyncen = 0; // Turn off DAA Frame Sync
  640. outb_p(ixj[cnt].pld_scrw.byte, ixj[cnt].XILINXbase);
  641. ixj[cnt].pld_slicw.bits.rly1 = 0;
  642. ixj[cnt].pld_slicw.bits.rly2 = 0;
  643. ixj[cnt].pld_slicw.bits.rly3 = 0;
  644. outb_p(ixj[cnt].pld_slicw.byte, ixj[cnt].XILINXbase + 0x01);
  645. LED_SetState(0x0, cnt);
  646. release_region(ixj[cnt].XILINXbase, 8);
  647. }
  648. if (ixj[cnt].cardtype == 400 || ixj[cnt].cardtype == 500) {
  649. release_region(ixj[cnt].XILINXbase, 4);
  650. }
  651. if (ixj[cnt].DSPbase) {
  652. release_region(ixj[cnt].DSPbase, 16);
  653. phone_unregister_device(&ixj[cnt].p);
  654. }
  655. if (ixj[cnt].read_buffer)
  656. kfree(ixj[cnt].read_buffer);
  657. if (ixj[cnt].write_buffer)
  658. kfree(ixj[cnt].write_buffer);
  659. #ifdef CONFIG_ISAPNP
  660. if (ixj[cnt].dev)
  661. ixj[cnt].dev->deactivate(ixj[cnt].dev);
  662. #endif
  663. }
  664. proc_unregister(&proc_root, ixj_proc_entry.low_ino);
  665. }
  666. // Defines
  667. #define Delay1ms udelay(1000);
  668. // Typedefs
  669. typedef struct {
  670. BYTE length;
  671. DWORD bits;
  672. } DATABLOCK;
  673. static void PCIEE_WriteBit(WORD wEEPROMAddress, BYTE lastLCC, BYTE byData)
  674. {
  675. lastLCC = lastLCC & 0xfb;
  676. lastLCC = lastLCC | (byData ? 4 : 0);
  677. outb(lastLCC, wEEPROMAddress); //set data out bit as appropriate
  678. udelay(1000);
  679. lastLCC = lastLCC | 0x01;
  680. outb(lastLCC, wEEPROMAddress); //SK rising edge
  681. byData = byData << 1;
  682. lastLCC = lastLCC & 0xfe;
  683. udelay(1000);
  684. outb(lastLCC, wEEPROMAddress); //after delay, SK falling edge
  685. }
  686. static BYTE PCIEE_ReadBit(WORD wEEPROMAddress, BYTE lastLCC)
  687. {
  688. udelay(1000);
  689. lastLCC = lastLCC | 0x01;
  690. outb(lastLCC, wEEPROMAddress); //SK rising edge
  691. lastLCC = lastLCC & 0xfe;
  692. udelay(1000);
  693. outb(lastLCC, wEEPROMAddress); //after delay, SK falling edge
  694. return ((inb(wEEPROMAddress) >> 3) & 1);
  695. }
  696. static BOOL PCIEE_ReadWord(WORD wAddress, WORD wLoc, WORD * pwResult)
  697. {
  698. BYTE lastLCC;
  699. WORD wEEPROMAddress = wAddress + 3;
  700. DWORD i;
  701. BYTE byResult;
  702. *pwResult = 0;
  703. lastLCC = inb(wEEPROMAddress);
  704. lastLCC = lastLCC | 0x02;
  705. lastLCC = lastLCC & 0xfe;
  706. outb(lastLCC, wEEPROMAddress); // CS hi, SK lo
  707. udelay(1000); // delay
  708. PCIEE_WriteBit(wEEPROMAddress, lastLCC, 1);
  709. PCIEE_WriteBit(wEEPROMAddress, lastLCC, 1);
  710. PCIEE_WriteBit(wEEPROMAddress, lastLCC, 0);
  711. for (i = 0; i < 8; i++) {
  712. PCIEE_WriteBit(wEEPROMAddress, lastLCC, wLoc & 0x80 ? 1 : 0);
  713. wLoc <<= 1;
  714. }
  715. for (i = 0; i < 16; i++) {
  716. byResult = PCIEE_ReadBit(wEEPROMAddress, lastLCC);
  717. *pwResult = (*pwResult << 1) | byResult;
  718. }
  719. udelay(1000); // another delay
  720. lastLCC = lastLCC & 0xfd;
  721. outb(lastLCC, wEEPROMAddress); // negate CS
  722. return 0;
  723. }
  724. static DWORD PCIEE_GetSerialNumber(WORD wAddress)
  725. {
  726. WORD wLo, wHi;
  727. if (PCIEE_ReadWord(wAddress, 62, &wLo))
  728. return 0;
  729. if (PCIEE_ReadWord(wAddress, 63, &wHi))
  730. return 0;
  731. return (((DWORD) wHi << 16) | wLo);
  732. }
  733. static int dspio[IXJMAX + 1] =
  734. {0,};
  735. static int xio[IXJMAX + 1] =
  736. {0,};
  737. MODULE_PARM(dspio, "1-" __MODULE_STRING(IXJMAX) "i");
  738. MODULE_PARM(xio, "1-" __MODULE_STRING(IXJMAX) "i");
  739. int init_module(void)
  740. {
  741. int result;
  742.   int i = 0;
  743. int cnt = 0;
  744. int probe = 0;
  745. struct pci_dev *pci = NULL;
  746. #ifdef CONFIG_ISAPNP
  747. int func = 0x110;
  748.   struct pnp_dev *dev = NULL, *old_dev = NULL;
  749. #endif
  750.   
  751. #ifdef CONFIG_ISAPNP
  752. while (1) {
  753. do {
  754. old_dev = dev;
  755. dev = isapnp_find_dev(NULL, ISAPNP_VENDOR('Q', 'T', 'I'),
  756.  ISAPNP_FUNCTION(func), old_dev);
  757. //(old_dev==NULL?NULL:old_dev));
  758. if (!dev)
  759. break;
  760. printk("preparing %xn", func);
  761. result = dev->prepare(dev);
  762. if (result < 0) {
  763. printk("preparing failed %d n", result);
  764. break;
  765. }
  766. if (!(dev->resource[0].flags & IORESOURCE_IO))
  767. return -ENODEV;
  768. dev->resource[0].flags |= IORESOURCE_AUTO;
  769. if (func != 0x110)
  770. dev->resource[1].flags |= IORESOURCE_AUTO;
  771. if (dev->activate(dev) < 0) {
  772. printk("isapnp configure failed (out of resources?)n");
  773. return -ENOMEM;
  774. }
  775. ixj[cnt].DSPbase = dev->resource[0].start; /* get real port */
  776. if (func != 0x110)
  777. ixj[cnt].XILINXbase = dev->resource[1].start; /* get real port */
  778. result = check_region(ixj[cnt].DSPbase, 16);
  779. if (result) {
  780. printk(KERN_INFO "ixj: can't get I/O address 0x%xn", ixj[cnt].DSPbase);
  781. cleanup_module();
  782. return result;
  783. }
  784. request_region(ixj[cnt].DSPbase, 16, "ixj DSP");
  785. switch (func) {
  786. case (0x110):
  787. ixj[cnt].cardtype = 100;
  788. break;
  789. case (0x310):
  790. ixj[cnt].cardtype = 300;
  791. break;
  792. case (0x410):
  793. ixj[cnt].cardtype = 400;
  794. break;
  795. }
  796. probe = ixj_selfprobe(cnt);
  797. ixj[cnt].serial = dev->bus->serial;
  798. ixj[cnt].dev = dev;
  799. printk(KERN_INFO "ixj: found card at 0x%xn", ixj[cnt].DSPbase);
  800. cnt++;
  801. } while (dev);
  802. if (func == 0x410)
  803. break;
  804. if (func == 0x310)
  805. func = 0x410;
  806. if (func == 0x110)
  807. func = 0x310;
  808. dev = NULL;
  809. }
  810. #else //CONFIG_ISAPNP
  811. /* Use passed parameters for older kernels without PnP */
  812. for (cnt = 0; cnt < IXJMAX; cnt++) {
  813. if (dspio[cnt]) {
  814. ixj[cnt].DSPbase = dspio[cnt];
  815. ixj[cnt].XILINXbase = xio[cnt];
  816. ixj[cnt].cardtype = 0;
  817. result = check_region(ixj[cnt].DSPbase, 16);
  818. if (result) {
  819. printk(KERN_INFO "ixj: can't get I/O address 0x%xn", ixj[cnt].DSPbase);
  820. cleanup_module();
  821. return result;
  822. }
  823. request_region(ixj[cnt].DSPbase, 16, "ixj DSP");
  824. probe = ixj_selfprobe(cnt);
  825. ixj[cnt].dev = NULL;
  826. }
  827. }
  828. #endif
  829. #ifdef CONFIG_PCI
  830. if (pci_present()) {
  831. for (i = 0; i < IXJMAX - cnt; i++) {
  832. pci = pci_find_device(0x15E2, 0x0500, pci);
  833. if (!pci)
  834. break;
  835. {
  836. ixj[cnt].DSPbase = pci->base_address[0] & PCI_BASE_ADDRESS_IO_MASK;
  837. ixj[cnt].XILINXbase = ixj[cnt].DSPbase + 0x10;
  838. ixj[cnt].serial = PCIEE_GetSerialNumber(pci->base_address[2] & PCI_BASE_ADDRESS_IO_MASK);
  839. result = check_region(ixj[cnt].DSPbase, 16);
  840. if (result) {
  841. printk(KERN_INFO "ixj: can't get I/O address 0x%xn", ixj[cnt].DSPbase);
  842. cleanup_module();
  843. return result;
  844. }
  845. request_region(ixj[cnt].DSPbase, 16, "ixj DSP");
  846. ixj[cnt].cardtype = 500;
  847. probe = ixj_selfprobe(cnt);
  848. cnt++;
  849. }
  850. }
  851. }
  852. #endif
  853. printk("%sn", ixj_c_rcsid);
  854. //  result = register_chrdev(ixj_major, "ixj", &ixj_fops);
  855. //  if (result < 0) {
  856. //    printk(KERN_INFO "ixj: can't get major numbern");
  857. //    cleanup_module();
  858. //    return result;
  859. //  }
  860. //  if (ixj_major == 0)
  861. //    ixj_major = result;               /* dynamic */
  862. proc_register(&proc_root, &ixj_proc_entry);
  863. ixj_init_timer();
  864. return probe;
  865. }
  866. static void DAA_Coeff_US(int board)
  867. {
  868. IXJ *j = &ixj[board];
  869. int i;
  870. //-----------------------------------------------
  871. // CAO
  872. for (i = 0; i < ALISDAA_CALLERID_SIZE; i++) {
  873. j->m_DAAShadowRegs.CAO_REGS.CAO.CallerID[i] = 0;
  874. }
  875. // Bytes for IM-filter part 1 (04): 0E,32,E2,2F,C2,5A,C0,00
  876.     j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[7] = 0x0E;
  877. j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[6] = 0x32;
  878. j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[5] = 0xE2;
  879. j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[4] = 0x2F;
  880. j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[3] = 0xC2;
  881. j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[2] = 0x5A;
  882. j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[1] = 0xC0;
  883. j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[0] = 0x00;
  884. // Bytes for IM-filter part 2 (05): 72,85,00,0E,2B,3A,D0,08
  885. j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[7] = 0x72;
  886. j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[6] = 0x85;
  887. j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[5] = 0x00;
  888. j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[4] = 0x0E;
  889. j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[3] = 0x2B;
  890. j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[2] = 0x3A;
  891. j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[1] = 0xD0;
  892. j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[0] = 0x08;
  893. // Bytes for FRX-filter       (08): 03,8F,48,F2,8F,48,70,08
  894. j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[7] = 0x03;
  895. j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[6] = 0x8F;
  896. j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[5] = 0x48;
  897. j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[4] = 0xF2;
  898. j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[3] = 0x8F;
  899. j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[2] = 0x48;
  900. j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[1] = 0x70;
  901. j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[0] = 0x08;
  902. // Bytes for FRR-filter       (07): 04,8F,38,7F,9B,EA,B0,08
  903. j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[7] = 0x04;
  904. j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[6] = 0x8F;
  905. j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[5] = 0x38;
  906. j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[4] = 0x7F;
  907. j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[3] = 0x9B;
  908. j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[2] = 0xEA;
  909. j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[1] = 0xB0;
  910. j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[0] = 0x08;
  911. // Bytes for AX-filter        (0A): 16,55,DD,CA
  912. j->m_DAAShadowRegs.COP_REGS.COP.AXFilterCoeff[3] = 0x16;
  913. j->m_DAAShadowRegs.COP_REGS.COP.AXFilterCoeff[2] = 0x55;
  914. j->m_DAAShadowRegs.COP_REGS.COP.AXFilterCoeff[1] = 0xDD;
  915. j->m_DAAShadowRegs.COP_REGS.COP.AXFilterCoeff[0] = 0xCA;
  916. // Bytes for AR-filter        (09): 52,D3,11,42
  917. j->m_DAAShadowRegs.COP_REGS.COP.ARFilterCoeff[3] = 0x52;
  918. j->m_DAAShadowRegs.COP_REGS.COP.ARFilterCoeff[2] = 0xD3;
  919. j->m_DAAShadowRegs.COP_REGS.COP.ARFilterCoeff[1] = 0x11;
  920. j->m_DAAShadowRegs.COP_REGS.COP.ARFilterCoeff[0] = 0x42;
  921. // Bytes for TH-filter part 1 (00): 00,42,48,81,B3,80,00,98
  922. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[7] = 0x00;
  923. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[6] = 0x42;
  924. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[5] = 0x48;
  925. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[4] = 0x81;
  926. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[3] = 0xB3;
  927. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[2] = 0x80;
  928. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[1] = 0x00;
  929. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[0] = 0x98;
  930. // Bytes for TH-filter part 2 (01): 02,F2,33,A0,68,AB,8A,AD
  931. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[7] = 0x02;
  932. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[6] = 0xF2;
  933. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[5] = 0x33;
  934. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[4] = 0xA0;
  935. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[3] = 0x68;
  936. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[2] = 0xAB;
  937. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[1] = 0x8A;
  938. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[0] = 0xAD;
  939. // Bytes for TH-filter part 3 (02): 00,88,DA,54,A4,BA,2D,BB
  940. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[7] = 0x00;
  941. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[6] = 0x88;
  942. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[5] = 0xDA;
  943. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[4] = 0x54;
  944. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[3] = 0xA4;
  945. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[2] = 0xBA;
  946. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[1] = 0x2D;
  947. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[0] = 0xBB;
  948. // ;  (10K, 0.68uF)
  949. // 
  950. // Bytes for Ringing part 1 (03):1B,3B,9B,BA,D4,1C,B3,23
  951. j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[7] = 0x1B;
  952. j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[6] = 0x3B;
  953. j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[5] = 0x9B;
  954. j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[4] = 0xBA;
  955. j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[3] = 0xD4;
  956. j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[2] = 0x1C;
  957. j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[1] = 0xB3;
  958. j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[0] = 0x23;
  959. // Bytes for Ringing part 2 (06):13,42,A6,BA,D4,73,CA,D5
  960. j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[7] = 0x13;
  961. j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[6] = 0x42;
  962. j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[5] = 0xA6;
  963. j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[4] = 0xBA;
  964. j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[3] = 0xD4;
  965. j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[2] = 0x73;
  966. j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[1] = 0xCA;
  967. j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[0] = 0xD5;
  968. // 
  969. // Levelmetering Ringing        (0D):B2,45,0F,8E      
  970. j->m_DAAShadowRegs.COP_REGS.COP.LevelmeteringRinging[3] = 0xB2;
  971. j->m_DAAShadowRegs.COP_REGS.COP.LevelmeteringRinging[2] = 0x45;
  972. j->m_DAAShadowRegs.COP_REGS.COP.LevelmeteringRinging[1] = 0x0F;
  973. j->m_DAAShadowRegs.COP_REGS.COP.LevelmeteringRinging[0] = 0x8E;
  974. // Caller ID 1st Tone           (0E):CA,0E,CA,09,99,99,99,99
  975. j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[7] = 0xCA;
  976. j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[6] = 0x0E;
  977. j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[5] = 0xCA;
  978. j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[4] = 0x09;
  979. j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[3] = 0x99;
  980. j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[2] = 0x99;
  981. j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[1] = 0x99;
  982. j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[0] = 0x99;
  983. // Caller ID 2nd Tone           (0F):FD,B5,BA,07,DA,00,00,00
  984. j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[7] = 0xFD;
  985. j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[6] = 0xB5;
  986. j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[5] = 0xBA;
  987. j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[4] = 0x07;
  988. j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[3] = 0xDA;
  989. j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[2] = 0x00;
  990. j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[1] = 0x00;
  991. j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[0] = 0x00;
  992. // 
  993. // ;CR Registers
  994. // Config. Reg. 0 (filters)       (cr0):FE ; CLK gen. by crystal
  995. j->m_DAAShadowRegs.SOP_REGS.SOP.cr0.reg = 0xFE;
  996. // Config. Reg. 1 (dialing)       (cr1):05
  997. j->m_DAAShadowRegs.SOP_REGS.SOP.cr1.reg = 0x05;
  998. // Config. Reg. 2 (caller ID)     (cr2):04
  999. j->m_DAAShadowRegs.SOP_REGS.SOP.cr2.reg = 0x04;
  1000. // Config. Reg. 3 (testloops)     (cr3):03 ; SEL Bit==0, HP-disabled
  1001. j->m_DAAShadowRegs.SOP_REGS.SOP.cr3.reg = 0x03;
  1002. // Config. Reg. 4 (analog gain)   (cr4):01
  1003. j->m_DAAShadowRegs.SOP_REGS.SOP.cr4.reg = 0x02; //0x01;
  1004. // Config. Reg. 5 (Version)       (cr5):02
  1005. // Config. Reg. 6 (Reserved)      (cr6):00
  1006. // Config. Reg. 7 (Reserved)      (cr7):00
  1007. // 
  1008. // ;xr Registers
  1009. // Ext. Reg. 0 (Interrupt Reg.)   (xr0):02
  1010. j->m_DAAShadowRegs.XOP_xr0_W.reg = 0x02; // SO_1 set to '1' because it is inverted.
  1011. // Ext. Reg. 1 (Interrupt enable) (xr1):1C // Cadence, RING, Caller ID, VDD_OK
  1012. j->m_DAAShadowRegs.XOP_REGS.XOP.xr1.reg = 0x3C;
  1013. // Ext. Reg. 2 (Cadence Time Out) (xr2):7D
  1014. j->m_DAAShadowRegs.XOP_REGS.XOP.xr2.reg = 0x7D;
  1015. // Ext. Reg. 3 (DC Char)          (xr3):32 ; B-Filter Off == 1
  1016. j->m_DAAShadowRegs.XOP_REGS.XOP.xr3.reg = 0x12; //0x32;
  1017. // Ext. Reg. 4 (Cadence)          (xr4):00
  1018. j->m_DAAShadowRegs.XOP_REGS.XOP.xr4.reg = 0x00;
  1019. // Ext. Reg. 5 (Ring timer)       (xr5):22
  1020. j->m_DAAShadowRegs.XOP_REGS.XOP.xr5.reg = 0x22;
  1021. // Ext. Reg. 6 (Power State)      (xr6):00
  1022. j->m_DAAShadowRegs.XOP_xr6_W.reg = 0x00;
  1023. // Ext. Reg. 7 (Vdd)              (xr7):40
  1024. j->m_DAAShadowRegs.XOP_REGS.XOP.xr7.reg = 0x40; // 0x40 ??? Should it be 0x00?
  1025. // 
  1026. // DTMF Tone 1                     (0B): 11,B3,5A,2C ;   697 Hz  
  1027. //                                       12,33,5A,C3 ;  770 Hz  
  1028. //                                       13,3C,5B,32 ;  852 Hz  
  1029. //                                       1D,1B,5C,CC ;  941 Hz  
  1030. j->m_DAAShadowRegs.COP_REGS.COP.Tone1Coeff[3] = 0x11;
  1031. j->m_DAAShadowRegs.COP_REGS.COP.Tone1Coeff[2] = 0xB3;
  1032. j->m_DAAShadowRegs.COP_REGS.COP.Tone1Coeff[1] = 0x5A;
  1033. j->m_DAAShadowRegs.COP_REGS.COP.Tone1Coeff[0] = 0x2C;
  1034. // DTMF Tone 2                     (0C): 32,32,52,B3 ;  1209 Hz  
  1035. //                                       EC,1D,52,22 ;  1336 Hz  
  1036. //                                       AA,AC,51,D2 ;  1477 Hz  
  1037. //                                       9B,3B,51,25 ;  1633 Hz  
  1038. j->m_DAAShadowRegs.COP_REGS.COP.Tone2Coeff[3] = 0x32;
  1039. j->m_DAAShadowRegs.COP_REGS.COP.Tone2Coeff[2] = 0x32;
  1040. j->m_DAAShadowRegs.COP_REGS.COP.Tone2Coeff[1] = 0x52;
  1041. j->m_DAAShadowRegs.COP_REGS.COP.Tone2Coeff[0] = 0xB3;
  1042. }
  1043. static void DAA_Coeff_UK(int board)
  1044. {
  1045. IXJ *j = &ixj[board];
  1046. int i;
  1047. //-----------------------------------------------
  1048. // CAO
  1049. for (i = 0; i < ALISDAA_CALLERID_SIZE; i++) {
  1050. j->m_DAAShadowRegs.CAO_REGS.CAO.CallerID[i] = 0;
  1051. }
  1052. //  Bytes for IM-filter part 1 (04): 00,C2,BB,A8,CB,81,A0,00
  1053.     j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[7] = 0x00;
  1054. j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[6] = 0xC2;
  1055. j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[5] = 0xBB;
  1056. j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[4] = 0xA8;
  1057. j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[3] = 0xCB;
  1058. j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[2] = 0x81;
  1059. j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[1] = 0xA0;
  1060. j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[0] = 0x00;
  1061. // Bytes for IM-filter part 2 (05): 40,00,00,0A,A4,33,E0,08
  1062. j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[7] = 0x40;
  1063. j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[6] = 0x00;
  1064. j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[5] = 0x00;
  1065. j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[4] = 0x0A;
  1066. j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[3] = 0xA4;
  1067. j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[2] = 0x33;
  1068. j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[1] = 0xE0;
  1069. j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[0] = 0x08;
  1070. // Bytes for FRX-filter       (08): 07,9B,ED,24,B2,A2,A0,08
  1071. j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[7] = 0x07;
  1072. j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[6] = 0x9B;
  1073. j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[5] = 0xED;
  1074. j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[4] = 0x24;
  1075. j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[3] = 0xB2;
  1076. j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[2] = 0xA2;
  1077. j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[1] = 0xA0;
  1078. j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[0] = 0x08;
  1079. // Bytes for FRR-filter       (07): 0F,92,F2,B2,87,D2,30,08
  1080. j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[7] = 0x0F;
  1081. j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[6] = 0x92;
  1082. j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[5] = 0xF2;
  1083. j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[4] = 0xB2;
  1084. j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[3] = 0x87;
  1085. j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[2] = 0xD2;
  1086. j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[1] = 0x30;
  1087. j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[0] = 0x08;
  1088. // Bytes for AX-filter        (0A): 1B,A5,DD,CA
  1089. j->m_DAAShadowRegs.COP_REGS.COP.AXFilterCoeff[3] = 0x1B;
  1090. j->m_DAAShadowRegs.COP_REGS.COP.AXFilterCoeff[2] = 0xA5;
  1091. j->m_DAAShadowRegs.COP_REGS.COP.AXFilterCoeff[1] = 0xDD;
  1092. j->m_DAAShadowRegs.COP_REGS.COP.AXFilterCoeff[0] = 0xCA;
  1093. // Bytes for AR-filter        (09): E2,27,10,D6
  1094. j->m_DAAShadowRegs.COP_REGS.COP.ARFilterCoeff[3] = 0xE2;
  1095. j->m_DAAShadowRegs.COP_REGS.COP.ARFilterCoeff[2] = 0x27;
  1096. j->m_DAAShadowRegs.COP_REGS.COP.ARFilterCoeff[1] = 0x10;
  1097. j->m_DAAShadowRegs.COP_REGS.COP.ARFilterCoeff[0] = 0xD6;
  1098. // Bytes for TH-filter part 1 (00): 80,2D,38,8B,D0,00,00,98
  1099. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[7] = 0x80;
  1100. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[6] = 0x2D;
  1101. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[5] = 0x38;
  1102. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[4] = 0x8B;
  1103. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[3] = 0xD0;
  1104. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[2] = 0x00;
  1105. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[1] = 0x00;
  1106. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[0] = 0x98;
  1107. // Bytes for TH-filter part 2 (01): 02,5A,53,F0,0B,5F,84,D4
  1108. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[7] = 0x02;
  1109. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[6] = 0x5A;
  1110. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[5] = 0x53;
  1111. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[4] = 0xF0;
  1112. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[3] = 0x0B;
  1113. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[2] = 0x5F;
  1114. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[1] = 0x84;
  1115. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[0] = 0xD4;
  1116. // Bytes for TH-filter part 3 (02): 00,88,6A,A4,8F,52,F5,32
  1117. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[7] = 0x00;
  1118. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[6] = 0x88;
  1119. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[5] = 0x6A;
  1120. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[4] = 0xA4;
  1121. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[3] = 0x8F;
  1122. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[2] = 0x52;
  1123. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[1] = 0xF5;
  1124. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[0] = 0x32;
  1125. // ; idle
  1126. // Bytes for Ringing part 1 (03):1B,3C,93,3A,22,12,A3,23
  1127. j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[7] = 0x1B;
  1128. j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[6] = 0x3C;
  1129. j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[5] = 0x93;
  1130. j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[4] = 0x3A;
  1131. j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[3] = 0x22;
  1132. j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[2] = 0x12;
  1133. j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[1] = 0xA3;
  1134. j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[0] = 0x23;
  1135. // Bytes for Ringing part 2 (06):12,A2,A6,BA,22,7A,0A,D5
  1136. j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[7] = 0x12;
  1137. j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[6] = 0xA2;
  1138. j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[5] = 0xA6;
  1139. j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[4] = 0xBA;
  1140. j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[3] = 0x22;
  1141. j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[2] = 0x7A;
  1142. j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[1] = 0x0A;
  1143. j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[0] = 0xD5;
  1144. // Levelmetering Ringing           (0D):AA,35,0F,8E     ; 25Hz 30V less possible?
  1145. j->m_DAAShadowRegs.COP_REGS.COP.LevelmeteringRinging[3] = 0xAA;
  1146. j->m_DAAShadowRegs.COP_REGS.COP.LevelmeteringRinging[2] = 0x35;
  1147. j->m_DAAShadowRegs.COP_REGS.COP.LevelmeteringRinging[1] = 0x0F;
  1148. j->m_DAAShadowRegs.COP_REGS.COP.LevelmeteringRinging[0] = 0x8E;
  1149. // Caller ID 1st Tone              (0E):CA,0E,CA,09,99,99,99,99
  1150. j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[7] = 0xCA;
  1151. j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[6] = 0x0E;
  1152. j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[5] = 0xCA;
  1153. j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[4] = 0x09;
  1154. j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[3] = 0x99;
  1155. j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[2] = 0x99;
  1156. j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[1] = 0x99;
  1157. j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[0] = 0x99;
  1158. // Caller ID 2nd Tone              (0F):FD,B5,BA,07,DA,00,00,00
  1159. j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[7] = 0xFD;
  1160. j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[6] = 0xB5;
  1161. j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[5] = 0xBA;
  1162. j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[4] = 0x07;
  1163. j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[3] = 0xDA;
  1164. j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[2] = 0x00;
  1165. j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[1] = 0x00;
  1166. j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[0] = 0x00;
  1167. // ;CR Registers
  1168. // Config. Reg. 0 (filters)        (cr0):FF
  1169. j->m_DAAShadowRegs.SOP_REGS.SOP.cr0.reg = 0xFF; //0xFE;
  1170. // Config. Reg. 1 (dialing)        (cr1):05
  1171. j->m_DAAShadowRegs.SOP_REGS.SOP.cr1.reg = 0x05;
  1172. // Config. Reg. 2 (caller ID)      (cr2):04
  1173. j->m_DAAShadowRegs.SOP_REGS.SOP.cr2.reg = 0x04;
  1174. // Config. Reg. 3 (testloops)      (cr3):00        ; 
  1175. j->m_DAAShadowRegs.SOP_REGS.SOP.cr3.reg = 0x00;
  1176. // Config. Reg. 4 (analog gain)    (cr4):01
  1177. j->m_DAAShadowRegs.SOP_REGS.SOP.cr4.reg = 0x02; //0x01;
  1178. // Config. Reg. 5 (Version)        (cr5):02
  1179. // Config. Reg. 6 (Reserved)       (cr6):00
  1180. // Config. Reg. 7 (Reserved)       (cr7):00
  1181. // ;xr Registers
  1182. // Ext. Reg. 0 (Interrupt Reg.)    (xr0):02
  1183. j->m_DAAShadowRegs.XOP_xr0_W.reg = 0x02; // SO_1 set to '1' because it is inverted.
  1184. // Ext. Reg. 1 (Interrupt enable)  (xr1):1C
  1185. j->m_DAAShadowRegs.XOP_REGS.XOP.xr1.reg = 0x1C; // RING, Caller ID, VDD_OK
  1186. // Ext. Reg. 2 (Cadence Time Out)  (xr2):7D
  1187. j->m_DAAShadowRegs.XOP_REGS.XOP.xr2.reg = 0x7D;
  1188. // Ext. Reg. 3 (DC Char)           (xr3):36        ; 
  1189. j->m_DAAShadowRegs.XOP_REGS.XOP.xr3.reg = 0x36;
  1190. // Ext. Reg. 4 (Cadence)           (xr4):00
  1191. j->m_DAAShadowRegs.XOP_REGS.XOP.xr4.reg = 0x00;
  1192. // Ext. Reg. 5 (Ring timer)        (xr5):22
  1193. j->m_DAAShadowRegs.XOP_REGS.XOP.xr5.reg = 0x22;
  1194. // Ext. Reg. 6 (Power State)       (xr6):00
  1195. j->m_DAAShadowRegs.XOP_xr6_W.reg = 0x00;
  1196. // Ext. Reg. 7 (Vdd)               (xr7):46
  1197. j->m_DAAShadowRegs.XOP_REGS.XOP.xr7.reg = 0x46; // 0x46 ??? Should it be 0x00?
  1198. // DTMF Tone 1                     (0B): 11,B3,5A,2C    ;   697 Hz  
  1199. //                                       12,33,5A,C3    ;  770 Hz  
  1200. //                                       13,3C,5B,32    ;  852 Hz  
  1201. //                                       1D,1B,5C,CC    ;  941 Hz  
  1202. j->m_DAAShadowRegs.COP_REGS.COP.Tone1Coeff[3] = 0x11;
  1203. j->m_DAAShadowRegs.COP_REGS.COP.Tone1Coeff[2] = 0xB3;
  1204. j->m_DAAShadowRegs.COP_REGS.COP.Tone1Coeff[1] = 0x5A;
  1205. j->m_DAAShadowRegs.COP_REGS.COP.Tone1Coeff[0] = 0x2C;
  1206. // DTMF Tone 2                     (0C): 32,32,52,B3    ;  1209 Hz  
  1207. //                                       EC,1D,52,22    ;  1336 Hz  
  1208. //                                       AA,AC,51,D2    ;  1477 Hz  
  1209. //                                       9B,3B,51,25    ;  1633 Hz  
  1210. j->m_DAAShadowRegs.COP_REGS.COP.Tone2Coeff[3] = 0x32;
  1211. j->m_DAAShadowRegs.COP_REGS.COP.Tone2Coeff[2] = 0x32;
  1212. j->m_DAAShadowRegs.COP_REGS.COP.Tone2Coeff[1] = 0x52;
  1213. j->m_DAAShadowRegs.COP_REGS.COP.Tone2Coeff[0] = 0xB3;
  1214. }
  1215. static void DAA_Coeff_France(int board)
  1216. {
  1217. IXJ *j = &ixj[board];
  1218. int i;
  1219. //-----------------------------------------------
  1220. // CAO
  1221. for (i = 0; i < ALISDAA_CALLERID_SIZE; i++) {
  1222. j->m_DAAShadowRegs.CAO_REGS.CAO.CallerID[i] = 0;
  1223. }
  1224. // Bytes for IM-filter part 1 (04): 02,A2,43,2C,22,AF,A0,00
  1225.     j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[7] = 0x02;
  1226. j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[6] = 0xA2;
  1227. j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[5] = 0x43;
  1228. j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[4] = 0x2C;
  1229. j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[3] = 0x22;
  1230. j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[2] = 0xAF;
  1231. j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[1] = 0xA0;
  1232. j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[0] = 0x00;
  1233. // Bytes for IM-filter part 2 (05): 67,CE,00,0C,22,33,E0,08
  1234. j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[7] = 0x67;
  1235. j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[6] = 0xCE;
  1236. j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[5] = 0x00;
  1237. j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[4] = 0x2C;
  1238. j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[3] = 0x22;
  1239. j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[2] = 0x33;
  1240. j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[1] = 0xE0;
  1241. j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[0] = 0x08;
  1242. // Bytes for FRX-filter       (08): 07,9A,28,F6,23,4A,B0,08
  1243. j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[7] = 0x07;
  1244. j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[6] = 0x9A;
  1245. j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[5] = 0x28;
  1246. j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[4] = 0xF6;
  1247. j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[3] = 0x23;
  1248. j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[2] = 0x4A;
  1249. j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[1] = 0xB0;
  1250. j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[0] = 0x08;
  1251. // Bytes for FRR-filter       (07): 03,8F,F9,2F,9E,FA,20,08
  1252. j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[7] = 0x03;
  1253. j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[6] = 0x8F;
  1254. j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[5] = 0xF9;
  1255. j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[4] = 0x2F;
  1256. j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[3] = 0x9E;
  1257. j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[2] = 0xFA;
  1258. j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[1] = 0x20;
  1259. j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[0] = 0x08;
  1260. // Bytes for AX-filter        (0A): 16,B5,DD,CA
  1261. j->m_DAAShadowRegs.COP_REGS.COP.AXFilterCoeff[3] = 0x16;
  1262. j->m_DAAShadowRegs.COP_REGS.COP.AXFilterCoeff[2] = 0xB5;
  1263. j->m_DAAShadowRegs.COP_REGS.COP.AXFilterCoeff[1] = 0xDD;
  1264. j->m_DAAShadowRegs.COP_REGS.COP.AXFilterCoeff[0] = 0xCA;
  1265. // Bytes for AR-filter        (09): 52,C7,10,D6
  1266. j->m_DAAShadowRegs.COP_REGS.COP.ARFilterCoeff[3] = 0xE2;
  1267. j->m_DAAShadowRegs.COP_REGS.COP.ARFilterCoeff[2] = 0xC7;
  1268. j->m_DAAShadowRegs.COP_REGS.COP.ARFilterCoeff[1] = 0x10;
  1269. j->m_DAAShadowRegs.COP_REGS.COP.ARFilterCoeff[0] = 0xD6;
  1270. // Bytes for TH-filter part 1 (00): 00,42,48,81,A6,80,00,98
  1271. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[7] = 0x00;
  1272. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[6] = 0x42;
  1273. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[5] = 0x48;
  1274. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[4] = 0x81;
  1275. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[3] = 0xA6;
  1276. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[2] = 0x80;
  1277. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[1] = 0x00;
  1278. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[0] = 0x98;
  1279. // Bytes for TH-filter part 2 (01): 02,AC,2A,30,78,AC,8A,2C
  1280. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[7] = 0x02;
  1281. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[6] = 0xAC;
  1282. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[5] = 0x2A;
  1283. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[4] = 0x30;
  1284. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[3] = 0x78;
  1285. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[2] = 0xAC;
  1286. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[1] = 0x8A;
  1287. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[0] = 0x2C;
  1288. // Bytes for TH-filter part 3 (02): 00,88,DA,A5,22,BA,2C,45
  1289. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[7] = 0x00;
  1290. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[6] = 0x88;
  1291. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[5] = 0xDA;
  1292. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[4] = 0xA5;
  1293. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[3] = 0x22;
  1294. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[2] = 0xBA;
  1295. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[1] = 0x2C;
  1296. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[0] = 0x45;
  1297. // ; idle
  1298. // Bytes for Ringing part 1 (03):1B,3C,93,3A,22,12,A3,23
  1299. j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[7] = 0x1B;
  1300. j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[6] = 0x3C;
  1301. j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[5] = 0x93;
  1302. j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[4] = 0x3A;
  1303. j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[3] = 0x22;
  1304. j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[2] = 0x12;
  1305. j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[1] = 0xA3;
  1306. j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[0] = 0x23;
  1307. // Bytes for Ringing part 2 (06):12,A2,A6,BA,22,7A,0A,D5
  1308. j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[7] = 0x12;
  1309. j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[6] = 0xA2;
  1310. j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[5] = 0xA6;
  1311. j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[4] = 0xBA;
  1312. j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[3] = 0x22;
  1313. j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[2] = 0x7A;
  1314. j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[1] = 0x0A;
  1315. j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[0] = 0xD5;
  1316. // Levelmetering Ringing           (0D):32,45,B5,84     ; 50Hz 20V
  1317. j->m_DAAShadowRegs.COP_REGS.COP.LevelmeteringRinging[3] = 0x32;
  1318. j->m_DAAShadowRegs.COP_REGS.COP.LevelmeteringRinging[2] = 0x45;
  1319. j->m_DAAShadowRegs.COP_REGS.COP.LevelmeteringRinging[1] = 0xB5;
  1320. j->m_DAAShadowRegs.COP_REGS.COP.LevelmeteringRinging[0] = 0x84;
  1321. // Caller ID 1st Tone              (0E):CA,0E,CA,09,99,99,99,99
  1322. j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[7] = 0xCA;
  1323. j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[6] = 0x0E;
  1324. j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[5] = 0xCA;
  1325. j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[4] = 0x09;
  1326. j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[3] = 0x99;
  1327. j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[2] = 0x99;
  1328. j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[1] = 0x99;
  1329. j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[0] = 0x99;
  1330. // Caller ID 2nd Tone              (0F):FD,B5,BA,07,DA,00,00,00
  1331. j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[7] = 0xFD;
  1332. j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[6] = 0xB5;
  1333. j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[5] = 0xBA;
  1334. j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[4] = 0x07;
  1335. j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[3] = 0xDA;
  1336. j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[2] = 0x00;
  1337. j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[1] = 0x00;
  1338. j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[0] = 0x00;
  1339. // ;CR Registers
  1340. // Config. Reg. 0 (filters)        (cr0):FF
  1341. j->m_DAAShadowRegs.SOP_REGS.SOP.cr0.reg = 0xFF;
  1342. // Config. Reg. 1 (dialing)        (cr1):05
  1343. j->m_DAAShadowRegs.SOP_REGS.SOP.cr1.reg = 0x05;
  1344. // Config. Reg. 2 (caller ID)      (cr2):04
  1345. j->m_DAAShadowRegs.SOP_REGS.SOP.cr2.reg = 0x04;
  1346. // Config. Reg. 3 (testloops)      (cr3):00        ; 
  1347. j->m_DAAShadowRegs.SOP_REGS.SOP.cr3.reg = 0x00;
  1348. // Config. Reg. 4 (analog gain)    (cr4):01
  1349. j->m_DAAShadowRegs.SOP_REGS.SOP.cr4.reg = 0x02; //0x01;
  1350. // Config. Reg. 5 (Version)        (cr5):02
  1351. // Config. Reg. 6 (Reserved)       (cr6):00
  1352. // Config. Reg. 7 (Reserved)       (cr7):00
  1353. // ;xr Registers
  1354. // Ext. Reg. 0 (Interrupt Reg.)    (xr0):02
  1355. j->m_DAAShadowRegs.XOP_xr0_W.reg = 0x02; // SO_1 set to '1' because it is inverted.
  1356. // Ext. Reg. 1 (Interrupt enable)  (xr1):1C
  1357. j->m_DAAShadowRegs.XOP_REGS.XOP.xr1.reg = 0x1C; // RING, Caller ID, VDD_OK
  1358. // Ext. Reg. 2 (Cadence Time Out)  (xr2):7D
  1359. j->m_DAAShadowRegs.XOP_REGS.XOP.xr2.reg = 0x7D;
  1360. // Ext. Reg. 3 (DC Char)           (xr3):36        ; 
  1361. j->m_DAAShadowRegs.XOP_REGS.XOP.xr3.reg = 0x36;
  1362. // Ext. Reg. 4 (Cadence)           (xr4):00
  1363. j->m_DAAShadowRegs.XOP_REGS.XOP.xr4.reg = 0x00;
  1364. // Ext. Reg. 5 (Ring timer)        (xr5):22
  1365. j->m_DAAShadowRegs.XOP_REGS.XOP.xr5.reg = 0x22;
  1366. // Ext. Reg. 6 (Power State)       (xr6):00
  1367. j->m_DAAShadowRegs.XOP_xr6_W.reg = 0x00;
  1368. // Ext. Reg. 7 (Vdd)               (xr7):46
  1369. j->m_DAAShadowRegs.XOP_REGS.XOP.xr7.reg = 0x46; // 0x46 ??? Should it be 0x00?
  1370. // DTMF Tone 1                     (0B): 11,B3,5A,2C    ;   697 Hz  
  1371. //                                       12,33,5A,C3    ;  770 Hz  
  1372. //                                       13,3C,5B,32    ;  852 Hz  
  1373. //                                       1D,1B,5C,CC    ;  941 Hz  
  1374. j->m_DAAShadowRegs.COP_REGS.COP.Tone1Coeff[3] = 0x11;
  1375. j->m_DAAShadowRegs.COP_REGS.COP.Tone1Coeff[2] = 0xB3;
  1376. j->m_DAAShadowRegs.COP_REGS.COP.Tone1Coeff[1] = 0x5A;
  1377. j->m_DAAShadowRegs.COP_REGS.COP.Tone1Coeff[0] = 0x2C;
  1378. // DTMF Tone 2                     (0C): 32,32,52,B3    ;  1209 Hz  
  1379. //                                       EC,1D,52,22    ;  1336 Hz  
  1380. //                                       AA,AC,51,D2    ;  1477 Hz  
  1381. //                                       9B,3B,51,25    ;  1633 Hz  
  1382. j->m_DAAShadowRegs.COP_REGS.COP.Tone2Coeff[3] = 0x32;
  1383. j->m_DAAShadowRegs.COP_REGS.COP.Tone2Coeff[2] = 0x32;
  1384. j->m_DAAShadowRegs.COP_REGS.COP.Tone2Coeff[1] = 0x52;
  1385. j->m_DAAShadowRegs.COP_REGS.COP.Tone2Coeff[0] = 0xB3;
  1386. }
  1387. static void DAA_Coeff_Germany(int board)
  1388. {
  1389. IXJ *j = &ixj[board];
  1390. int i;
  1391. //-----------------------------------------------
  1392. // CAO
  1393. for (i = 0; i < ALISDAA_CALLERID_SIZE; i++) {
  1394. j->m_DAAShadowRegs.CAO_REGS.CAO.CallerID[i] = 0;
  1395. }
  1396. // Bytes for IM-filter part 1 (04): 00,CE,BB,B8,D2,81,B0,00
  1397.     j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[7] = 0x00;
  1398. j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[6] = 0xCE;
  1399. j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[5] = 0xBB;
  1400. j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[4] = 0xB8;
  1401. j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[3] = 0xD2;
  1402. j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[2] = 0x81;
  1403. j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[1] = 0xB0;
  1404. j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[0] = 0x00;
  1405. // Bytes for IM-filter part 2 (05): 45,8F,00,0C,D2,3A,D0,08
  1406. j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[7] = 0x45;
  1407. j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[6] = 0x8F;
  1408. j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[5] = 0x00;
  1409. j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[4] = 0x0C;
  1410. j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[3] = 0xD2;
  1411. j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[2] = 0x3A;
  1412. j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[1] = 0xD0;
  1413. j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[0] = 0x08;
  1414. // Bytes for FRX-filter       (08): 07,AA,E2,34,24,89,20,08
  1415. j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[7] = 0x07;
  1416. j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[6] = 0xAA;
  1417. j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[5] = 0xE2;
  1418. j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[4] = 0x34;
  1419. j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[3] = 0x24;
  1420. j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[2] = 0x89;
  1421. j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[1] = 0x20;
  1422. j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[0] = 0x08;
  1423. // Bytes for FRR-filter       (07): 02,87,FA,37,9A,CA,B0,08
  1424. j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[7] = 0x02;
  1425. j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[6] = 0x87;
  1426. j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[5] = 0xFA;
  1427. j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[4] = 0x37;
  1428. j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[3] = 0x9A;
  1429. j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[2] = 0xCA;
  1430. j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[1] = 0xB0;
  1431. j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[0] = 0x08;
  1432. // Bytes for AX-filter        (0A): 72,D5,DD,CA
  1433. j->m_DAAShadowRegs.COP_REGS.COP.AXFilterCoeff[3] = 0x72;
  1434. j->m_DAAShadowRegs.COP_REGS.COP.AXFilterCoeff[2] = 0xD5;
  1435. j->m_DAAShadowRegs.COP_REGS.COP.AXFilterCoeff[1] = 0xDD;
  1436. j->m_DAAShadowRegs.COP_REGS.COP.AXFilterCoeff[0] = 0xCA;
  1437. // Bytes for AR-filter        (09): 72,42,13,4B
  1438. j->m_DAAShadowRegs.COP_REGS.COP.ARFilterCoeff[3] = 0x72;
  1439. j->m_DAAShadowRegs.COP_REGS.COP.ARFilterCoeff[2] = 0x42;
  1440. j->m_DAAShadowRegs.COP_REGS.COP.ARFilterCoeff[1] = 0x13;
  1441. j->m_DAAShadowRegs.COP_REGS.COP.ARFilterCoeff[0] = 0x4B;
  1442. // Bytes for TH-filter part 1 (00): 80,52,48,81,AD,80,00,98
  1443. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[7] = 0x80;
  1444. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[6] = 0x52;
  1445. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[5] = 0x48;
  1446. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[4] = 0x81;
  1447. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[3] = 0xAD;
  1448. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[2] = 0x80;
  1449. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[1] = 0x00;
  1450. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[0] = 0x98;
  1451. // Bytes for TH-filter part 2 (01): 02,42,5A,20,E8,1A,81,27
  1452. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[7] = 0x02;
  1453. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[6] = 0x42;
  1454. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[5] = 0x5A;
  1455. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[4] = 0x20;
  1456. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[3] = 0xE8;
  1457. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[2] = 0x1A;
  1458. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[1] = 0x81;
  1459. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[0] = 0x27;
  1460. // Bytes for TH-filter part 3 (02): 00,88,63,26,BD,4B,A3,C2
  1461. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[7] = 0x00;
  1462. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[6] = 0x88;
  1463. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[5] = 0x63;
  1464. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[4] = 0x26;
  1465. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[3] = 0xBD;
  1466. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[2] = 0x4B;
  1467. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[1] = 0xA3;
  1468. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[0] = 0xC2;
  1469. // ;  (10K, 0.68uF)
  1470. // Bytes for Ringing part 1 (03):1B,3B,9B,BA,D4,1C,B3,23
  1471. j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[7] = 0x1B;
  1472. j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[6] = 0x3B;
  1473. j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[5] = 0x9B;
  1474. j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[4] = 0xBA;
  1475. j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[3] = 0xD4;
  1476. j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[2] = 0x1C;
  1477. j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[1] = 0xB3;
  1478. j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[0] = 0x23;
  1479. // Bytes for Ringing part 2 (06):13,42,A6,BA,D4,73,CA,D5
  1480. j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[7] = 0x13;
  1481. j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[6] = 0x42;
  1482. j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[5] = 0xA6;
  1483. j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[4] = 0xBA;
  1484. j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[3] = 0xD4;
  1485. j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[2] = 0x73;
  1486. j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[1] = 0xCA;
  1487. j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[0] = 0xD5;
  1488. // Levelmetering Ringing        (0D):B2,45,0F,8E      
  1489. j->m_DAAShadowRegs.COP_REGS.COP.LevelmeteringRinging[3] = 0xB2;
  1490. j->m_DAAShadowRegs.COP_REGS.COP.LevelmeteringRinging[2] = 0x45;
  1491. j->m_DAAShadowRegs.COP_REGS.COP.LevelmeteringRinging[1] = 0x0F;
  1492. j->m_DAAShadowRegs.COP_REGS.COP.LevelmeteringRinging[0] = 0x8E;
  1493. // Caller ID 1st Tone           (0E):CA,0E,CA,09,99,99,99,99
  1494. j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[7] = 0xCA;
  1495. j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[6] = 0x0E;
  1496. j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[5] = 0xCA;
  1497. j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[4] = 0x09;
  1498. j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[3] = 0x99;
  1499. j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[2] = 0x99;
  1500. j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[1] = 0x99;
  1501. j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[0] = 0x99;
  1502. // Caller ID 2nd Tone           (0F):FD,B5,BA,07,DA,00,00,00
  1503. j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[7] = 0xFD;
  1504. j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[6] = 0xB5;
  1505. j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[5] = 0xBA;
  1506. j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[4] = 0x07;
  1507. j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[3] = 0xDA;
  1508. j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[2] = 0x00;
  1509. j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[1] = 0x00;
  1510. j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[0] = 0x00;
  1511. // ;CR Registers
  1512. // Config. Reg. 0 (filters)        (cr0):FF ; all Filters enabled, CLK from ext. source
  1513. j->m_DAAShadowRegs.SOP_REGS.SOP.cr0.reg = 0xFF;
  1514. // Config. Reg. 1 (dialing)        (cr1):05 ; Manual Ring, Ring metering enabled
  1515. j->m_DAAShadowRegs.SOP_REGS.SOP.cr1.reg = 0x05;
  1516. // Config. Reg. 2 (caller ID)      (cr2):04 ; Analog Gain 0dB, FSC internal
  1517. j->m_DAAShadowRegs.SOP_REGS.SOP.cr2.reg = 0x04;
  1518. // Config. Reg. 3 (testloops)      (cr3):00 ; SEL Bit==0, HP-enabled
  1519. j->m_DAAShadowRegs.SOP_REGS.SOP.cr3.reg = 0x00;
  1520. // Config. Reg. 4 (analog gain)    (cr4):01
  1521. j->m_DAAShadowRegs.SOP_REGS.SOP.cr4.reg = 0x02; //0x01;
  1522. // Config. Reg. 5 (Version)        (cr5):02
  1523. // Config. Reg. 6 (Reserved)       (cr6):00
  1524. // Config. Reg. 7 (Reserved)       (cr7):00
  1525. // ;xr Registers
  1526. // Ext. Reg. 0 (Interrupt Reg.)    (xr0):02
  1527. j->m_DAAShadowRegs.XOP_xr0_W.reg = 0x02; // SO_1 set to '1' because it is inverted.
  1528. // Ext. Reg. 1 (Interrupt enable)  (xr1):1C ; Ring, CID, VDDOK Interrupts enabled
  1529. j->m_DAAShadowRegs.XOP_REGS.XOP.xr1.reg = 0x1C; // RING, Caller ID, VDD_OK
  1530. // Ext. Reg. 2 (Cadence Time Out)  (xr2):7D
  1531. j->m_DAAShadowRegs.XOP_REGS.XOP.xr2.reg = 0x7D;
  1532. // Ext. Reg. 3 (DC Char)           (xr3):32 ; B-Filter Off==1, U0=3.5V, R=200Ohm
  1533. j->m_DAAShadowRegs.XOP_REGS.XOP.xr3.reg = 0x32;
  1534. // Ext. Reg. 4 (Cadence)           (xr4):00
  1535. j->m_DAAShadowRegs.XOP_REGS.XOP.xr4.reg = 0x00;
  1536. // Ext. Reg. 5 (Ring timer)        (xr5):22
  1537. j->m_DAAShadowRegs.XOP_REGS.XOP.xr5.reg = 0x22;
  1538. // Ext. Reg. 6 (Power State)       (xr6):00
  1539. j->m_DAAShadowRegs.XOP_xr6_W.reg = 0x00;
  1540. // Ext. Reg. 7 (Vdd)               (xr7):40 ; VDD=4.25 V
  1541. j->m_DAAShadowRegs.XOP_REGS.XOP.xr7.reg = 0x40; // 0x40 ??? Should it be 0x00?
  1542. // DTMF Tone 1                     (0B): 11,B3,5A,2C    ;   697 Hz  
  1543. //                                       12,33,5A,C3    ;  770 Hz  
  1544. //                                       13,3C,5B,32    ;  852 Hz  
  1545. //                                       1D,1B,5C,CC    ;  941 Hz  
  1546. j->m_DAAShadowRegs.COP_REGS.COP.Tone1Coeff[3] = 0x11;
  1547. j->m_DAAShadowRegs.COP_REGS.COP.Tone1Coeff[2] = 0xB3;
  1548. j->m_DAAShadowRegs.COP_REGS.COP.Tone1Coeff[1] = 0x5A;
  1549. j->m_DAAShadowRegs.COP_REGS.COP.Tone1Coeff[0] = 0x2C;
  1550. // DTMF Tone 2                     (0C): 32,32,52,B3    ;  1209 Hz  
  1551. //                                       EC,1D,52,22    ;  1336 Hz  
  1552. //                                       AA,AC,51,D2    ;  1477 Hz  
  1553. //                                       9B,3B,51,25    ;  1633 Hz  
  1554. j->m_DAAShadowRegs.COP_REGS.COP.Tone2Coeff[3] = 0x32;
  1555. j->m_DAAShadowRegs.COP_REGS.COP.Tone2Coeff[2] = 0x32;
  1556. j->m_DAAShadowRegs.COP_REGS.COP.Tone2Coeff[1] = 0x52;
  1557. j->m_DAAShadowRegs.COP_REGS.COP.Tone2Coeff[0] = 0xB3;
  1558. }
  1559. static void DAA_Coeff_Australia(int board)
  1560. {
  1561. IXJ *j = &ixj[board];
  1562. int i;
  1563. //-----------------------------------------------
  1564. // CAO
  1565. for (i = 0; i < ALISDAA_CALLERID_SIZE; i++) {
  1566. j->m_DAAShadowRegs.CAO_REGS.CAO.CallerID[i] = 0;
  1567. }
  1568. // Bytes for IM-filter part 1 (04): 00,A3,AA,28,B3,82,D0,00
  1569.     j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[7] = 0x00;
  1570. j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[6] = 0xA3;
  1571. j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[5] = 0xAA;
  1572. j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[4] = 0x28;
  1573. j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[3] = 0xB3;
  1574. j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[2] = 0x82;
  1575. j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[1] = 0xD0;
  1576. j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[0] = 0x00;
  1577. // Bytes for IM-filter part 2 (05): 70,96,00,09,32,6B,C0,08
  1578. j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[7] = 0x70;
  1579. j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[6] = 0x96;
  1580. j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[5] = 0x00;
  1581. j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[4] = 0x09;
  1582. j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[3] = 0x32;
  1583. j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[2] = 0x6B;
  1584. j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[1] = 0xC0;
  1585. j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[0] = 0x08;
  1586. // Bytes for FRX-filter       (08): 07,96,E2,34,32,9B,30,08
  1587. j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[7] = 0x07;
  1588. j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[6] = 0x96;
  1589. j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[5] = 0xE2;
  1590. j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[4] = 0x34;
  1591. j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[3] = 0x32;
  1592. j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[2] = 0x9B;
  1593. j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[1] = 0x30;
  1594. j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[0] = 0x08;
  1595. // Bytes for FRR-filter       (07): 0F,9A,E9,2F,22,CC,A0,08
  1596. j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[7] = 0x0F;
  1597. j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[6] = 0x9A;
  1598. j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[5] = 0xE9;
  1599. j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[4] = 0x2F;
  1600. j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[3] = 0x22;
  1601. j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[2] = 0xCC;
  1602. j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[1] = 0xA0;
  1603. j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[0] = 0x08;
  1604. // Bytes for AX-filter        (0A): CB,45,DD,CA
  1605. j->m_DAAShadowRegs.COP_REGS.COP.AXFilterCoeff[3] = 0xCB;
  1606. j->m_DAAShadowRegs.COP_REGS.COP.AXFilterCoeff[2] = 0x45;
  1607. j->m_DAAShadowRegs.COP_REGS.COP.AXFilterCoeff[1] = 0xDD;
  1608. j->m_DAAShadowRegs.COP_REGS.COP.AXFilterCoeff[0] = 0xCA;
  1609. // Bytes for AR-filter        (09): 1B,67,10,D6
  1610. j->m_DAAShadowRegs.COP_REGS.COP.ARFilterCoeff[3] = 0x1B;
  1611. j->m_DAAShadowRegs.COP_REGS.COP.ARFilterCoeff[2] = 0x67;
  1612. j->m_DAAShadowRegs.COP_REGS.COP.ARFilterCoeff[1] = 0x10;
  1613. j->m_DAAShadowRegs.COP_REGS.COP.ARFilterCoeff[0] = 0xD6;
  1614. // Bytes for TH-filter part 1 (00): 80,52,48,81,AF,80,00,98
  1615. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[7] = 0x80;
  1616. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[6] = 0x52;
  1617. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[5] = 0x48;
  1618. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[4] = 0x81;
  1619. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[3] = 0xAF;
  1620. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[2] = 0x80;
  1621. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[1] = 0x00;
  1622. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[0] = 0x98;
  1623. // Bytes for TH-filter part 2 (01): 02,DB,52,B0,38,01,82,AC
  1624. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[7] = 0x02;
  1625. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[6] = 0xDB;
  1626. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[5] = 0x52;
  1627. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[4] = 0xB0;
  1628. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[3] = 0x38;
  1629. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[2] = 0x01;
  1630. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[1] = 0x82;
  1631. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[0] = 0xAC;
  1632. // Bytes for TH-filter part 3 (02): 00,88,4A,3E,2C,3B,24,46
  1633. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[7] = 0x00;
  1634. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[6] = 0x88;
  1635. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[5] = 0x4A;
  1636. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[4] = 0x3E;
  1637. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[3] = 0x2C;
  1638. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[2] = 0x3B;
  1639. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[1] = 0x24;
  1640. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[0] = 0x46;
  1641. // ;  idle
  1642. // Bytes for Ringing part 1 (03):1B,3C,93,3A,22,12,A3,23
  1643. j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[7] = 0x1B;
  1644. j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[6] = 0x3C;
  1645. j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[5] = 0x93;
  1646. j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[4] = 0x3A;
  1647. j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[3] = 0x22;
  1648. j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[2] = 0x12;
  1649. j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[1] = 0xA3;
  1650. j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[0] = 0x23;
  1651. // Bytes for Ringing part 2 (06):12,A2,A6,BA,22,7A,0A,D5
  1652. j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[7] = 0x12;
  1653. j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[6] = 0xA2;
  1654. j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[5] = 0xA6;
  1655. j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[4] = 0xBA;
  1656. j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[3] = 0x22;
  1657. j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[2] = 0x7A;
  1658. j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[1] = 0x0A;
  1659. j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[0] = 0xD5;
  1660. // Levelmetering Ringing           (0D):32,45,B5,84   ; 50Hz 20V
  1661. j->m_DAAShadowRegs.COP_REGS.COP.LevelmeteringRinging[3] = 0x32;
  1662. j->m_DAAShadowRegs.COP_REGS.COP.LevelmeteringRinging[2] = 0x45;
  1663. j->m_DAAShadowRegs.COP_REGS.COP.LevelmeteringRinging[1] = 0xB5;
  1664. j->m_DAAShadowRegs.COP_REGS.COP.LevelmeteringRinging[0] = 0x84;
  1665. // Caller ID 1st Tone              (0E):CA,0E,CA,09,99,99,99,99
  1666. j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[7] = 0xCA;
  1667. j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[6] = 0x0E;
  1668. j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[5] = 0xCA;
  1669. j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[4] = 0x09;
  1670. j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[3] = 0x99;
  1671. j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[2] = 0x99;
  1672. j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[1] = 0x99;
  1673. j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[0] = 0x99;
  1674. // Caller ID 2nd Tone              (0F):FD,B5,BA,07,DA,00,00,00
  1675. j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[7] = 0xFD;
  1676. j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[6] = 0xB5;
  1677. j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[5] = 0xBA;
  1678. j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[4] = 0x07;
  1679. j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[3] = 0xDA;
  1680. j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[2] = 0x00;
  1681. j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[1] = 0x00;
  1682. j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[0] = 0x00;
  1683. // ;CR Registers
  1684. // Config. Reg. 0 (filters)        (cr0):FF
  1685. j->m_DAAShadowRegs.SOP_REGS.SOP.cr0.reg = 0xFF;
  1686. // Config. Reg. 1 (dialing)        (cr1):05
  1687. j->m_DAAShadowRegs.SOP_REGS.SOP.cr1.reg = 0x05;
  1688. // Config. Reg. 2 (caller ID)      (cr2):04
  1689. j->m_DAAShadowRegs.SOP_REGS.SOP.cr2.reg = 0x04;
  1690. // Config. Reg. 3 (testloops)      (cr3):00        ; 
  1691. j->m_DAAShadowRegs.SOP_REGS.SOP.cr3.reg = 0x00;
  1692. // Config. Reg. 4 (analog gain)    (cr4):01
  1693. j->m_DAAShadowRegs.SOP_REGS.SOP.cr4.reg = 0x02; //0x01;
  1694. // Config. Reg. 5 (Version)        (cr5):02
  1695. // Config. Reg. 6 (Reserved)       (cr6):00
  1696. // Config. Reg. 7 (Reserved)       (cr7):00
  1697. // ;xr Registers
  1698. // Ext. Reg. 0 (Interrupt Reg.)    (xr0):02
  1699. j->m_DAAShadowRegs.XOP_xr0_W.reg = 0x02; // SO_1 set to '1' because it is inverted.
  1700. // Ext. Reg. 1 (Interrupt enable)  (xr1):1C
  1701. j->m_DAAShadowRegs.XOP_REGS.XOP.xr1.reg = 0x1C; // RING, Caller ID, VDD_OK
  1702. // Ext. Reg. 2 (Cadence Time Out)  (xr2):7D
  1703. j->m_DAAShadowRegs.XOP_REGS.XOP.xr2.reg = 0x7D;
  1704. // Ext. Reg. 3 (DC Char)           (xr3):2B      ; 
  1705. j->m_DAAShadowRegs.XOP_REGS.XOP.xr3.reg = 0x2B;
  1706. // Ext. Reg. 4 (Cadence)           (xr4):00
  1707. j->m_DAAShadowRegs.XOP_REGS.XOP.xr4.reg = 0x00;
  1708. // Ext. Reg. 5 (Ring timer)        (xr5):22
  1709. j->m_DAAShadowRegs.XOP_REGS.XOP.xr5.reg = 0x22;
  1710. // Ext. Reg. 6 (Power State)       (xr6):00
  1711. j->m_DAAShadowRegs.XOP_xr6_W.reg = 0x00;
  1712. // Ext. Reg. 7 (Vdd)               (xr7):40
  1713. j->m_DAAShadowRegs.XOP_REGS.XOP.xr7.reg = 0x40; // 0x40 ??? Should it be 0x00?
  1714. // DTMF Tone 1                     (0B): 11,B3,5A,2C    ;   697 Hz  
  1715. //                                       12,33,5A,C3    ;  770 Hz  
  1716. //                                       13,3C,5B,32    ;  852 Hz  
  1717. //                                       1D,1B,5C,CC    ;  941 Hz  
  1718. j->m_DAAShadowRegs.COP_REGS.COP.Tone1Coeff[3] = 0x11;
  1719. j->m_DAAShadowRegs.COP_REGS.COP.Tone1Coeff[2] = 0xB3;
  1720. j->m_DAAShadowRegs.COP_REGS.COP.Tone1Coeff[1] = 0x5A;
  1721. j->m_DAAShadowRegs.COP_REGS.COP.Tone1Coeff[0] = 0x2C;
  1722. // DTMF Tone 2                     (0C): 32,32,52,B3    ;  1209 Hz  
  1723. //                                       EC,1D,52,22    ;  1336 Hz  
  1724. //                                       AA,AC,51,D2    ;  1477 Hz  
  1725. //                                       9B,3B,51,25    ;  1633 Hz  
  1726. j->m_DAAShadowRegs.COP_REGS.COP.Tone2Coeff[3] = 0x32;
  1727. j->m_DAAShadowRegs.COP_REGS.COP.Tone2Coeff[2] = 0x32;
  1728. j->m_DAAShadowRegs.COP_REGS.COP.Tone2Coeff[1] = 0x52;
  1729. j->m_DAAShadowRegs.COP_REGS.COP.Tone2Coeff[0] = 0xB3;
  1730. }
  1731. static void DAA_Coeff_Japan(int board)
  1732. {
  1733. IXJ *j = &ixj[board];
  1734. int i;
  1735. //-----------------------------------------------
  1736. // CAO
  1737. for (i = 0; i < ALISDAA_CALLERID_SIZE; i++) {
  1738. j->m_DAAShadowRegs.CAO_REGS.CAO.CallerID[i] = 0;
  1739. }
  1740. // Bytes for IM-filter part 1 (04): 06,BD,E2,2D,BA,F9,A0,00
  1741.     j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[7] = 0x06;
  1742. j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[6] = 0xBD;
  1743. j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[5] = 0xE2;
  1744. j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[4] = 0x2D;
  1745. j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[3] = 0xBA;
  1746. j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[2] = 0xF9;
  1747. j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[1] = 0xA0;
  1748. j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[0] = 0x00;
  1749. // Bytes for IM-filter part 2 (05): 6F,F7,00,0E,34,33,E0,08
  1750. j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[7] = 0x6F;
  1751. j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[6] = 0xF7;
  1752. j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[5] = 0x00;
  1753. j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[4] = 0x0E;
  1754. j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[3] = 0x34;
  1755. j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[2] = 0x33;
  1756. j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[1] = 0xE0;
  1757. j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[0] = 0x08;
  1758. // Bytes for FRX-filter       (08): 02,8F,68,77,9C,58,F0,08
  1759. j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[7] = 0x02;
  1760. j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[6] = 0x8F;
  1761. j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[5] = 0x68;
  1762. j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[4] = 0x77;
  1763. j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[3] = 0x9C;
  1764. j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[2] = 0x58;
  1765. j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[1] = 0xF0;
  1766. j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[0] = 0x08;
  1767. // Bytes for FRR-filter       (07): 03,8F,38,73,87,EA,20,08
  1768. j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[7] = 0x03;
  1769. j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[6] = 0x8F;
  1770. j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[5] = 0x38;
  1771. j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[4] = 0x73;
  1772. j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[3] = 0x87;
  1773. j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[2] = 0xEA;
  1774. j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[1] = 0x20;
  1775. j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[0] = 0x08;
  1776. // Bytes for AX-filter        (0A): 51,C5,DD,CA
  1777. j->m_DAAShadowRegs.COP_REGS.COP.AXFilterCoeff[3] = 0x51;
  1778. j->m_DAAShadowRegs.COP_REGS.COP.AXFilterCoeff[2] = 0xC5;
  1779. j->m_DAAShadowRegs.COP_REGS.COP.AXFilterCoeff[1] = 0xDD;
  1780. j->m_DAAShadowRegs.COP_REGS.COP.AXFilterCoeff[0] = 0xCA;
  1781. // Bytes for AR-filter        (09): 25,A7,10,D6
  1782. j->m_DAAShadowRegs.COP_REGS.COP.ARFilterCoeff[3] = 0x25;
  1783. j->m_DAAShadowRegs.COP_REGS.COP.ARFilterCoeff[2] = 0xA7;
  1784. j->m_DAAShadowRegs.COP_REGS.COP.ARFilterCoeff[1] = 0x10;
  1785. j->m_DAAShadowRegs.COP_REGS.COP.ARFilterCoeff[0] = 0xD6;
  1786. // Bytes for TH-filter part 1 (00): 00,42,48,81,AE,80,00,98
  1787. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[7] = 0x00;
  1788. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[6] = 0x42;
  1789. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[5] = 0x48;
  1790. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[4] = 0x81;
  1791. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[3] = 0xAE;
  1792. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[2] = 0x80;
  1793. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[1] = 0x00;
  1794. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[0] = 0x98;
  1795. // Bytes for TH-filter part 2 (01): 02,AB,2A,20,99,5B,89,28
  1796. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[7] = 0x02;
  1797. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[6] = 0xAB;
  1798. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[5] = 0x2A;
  1799. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[4] = 0x20;
  1800. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[3] = 0x99;
  1801. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[2] = 0x5B;
  1802. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[1] = 0x89;
  1803. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[0] = 0x28;
  1804. // Bytes for TH-filter part 3 (02): 00,88,DA,25,34,C5,4C,BA
  1805. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[7] = 0x00;
  1806. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[6] = 0x88;
  1807. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[5] = 0xDA;
  1808. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[4] = 0x25;
  1809. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[3] = 0x34;
  1810. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[2] = 0xC5;
  1811. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[1] = 0x4C;
  1812. j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[0] = 0xBA;
  1813. // ;  idle
  1814. // Bytes for Ringing part 1 (03):1B,3C,93,3A,22,12,A3,23
  1815. j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[7] = 0x1B;
  1816. j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[6] = 0x3C;
  1817. j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[5] = 0x93;
  1818. j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[4] = 0x3A;
  1819. j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[3] = 0x22;
  1820. j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[2] = 0x12;
  1821. j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[1] = 0xA3;
  1822. j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[0] = 0x23;
  1823. // Bytes for Ringing part 2 (06):12,A2,A6,BA,22,7A,0A,D5
  1824. j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[7] = 0x12;
  1825. j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[6] = 0xA2;
  1826. j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[5] = 0xA6;
  1827. j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[4] = 0xBA;
  1828. j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[3] = 0x22;
  1829. j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[2] = 0x7A;
  1830. j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[1] = 0x0A;
  1831. j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[0] = 0xD5;
  1832. // Levelmetering Ringing           (0D):AA,35,0F,8E    ; 25Hz 30V ?????????
  1833. j->m_DAAShadowRegs.COP_REGS.COP.LevelmeteringRinging[3] = 0xAA;
  1834. j->m_DAAShadowRegs.COP_REGS.COP.LevelmeteringRinging[2] = 0x35;
  1835. j->m_DAAShadowRegs.COP_REGS.COP.LevelmeteringRinging[1] = 0x0F;
  1836. j->m_DAAShadowRegs.COP_REGS.COP.LevelmeteringRinging[0] = 0x8E;
  1837. // Caller ID 1st Tone              (0E):CA,0E,CA,09,99,99,99,99
  1838. j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[7] = 0xCA;
  1839. j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[6] = 0x0E;
  1840. j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[5] = 0xCA;
  1841. j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[4] = 0x09;
  1842. j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[3] = 0x99;
  1843. j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[2] = 0x99;
  1844. j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[1] = 0x99;
  1845. j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[0] = 0x99;
  1846. // Caller ID 2nd Tone              (0F):FD,B5,BA,07,DA,00,00,00
  1847. j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[7] = 0xFD;
  1848. j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[6] = 0xB5;
  1849. j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[5] = 0xBA;
  1850. j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[4] = 0x07;
  1851. j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[3] = 0xDA;
  1852. j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[2] = 0x00;
  1853. j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[1] = 0x00;
  1854. j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[0] = 0x00;
  1855. // ;CR Registers
  1856. // Config. Reg. 0 (filters)        (cr0):FF
  1857. j->m_DAAShadowRegs.SOP_REGS.SOP.cr0.reg = 0xFF;
  1858. // Config. Reg. 1 (dialing)        (cr1):05
  1859. j->m_DAAShadowRegs.SOP_REGS.SOP.cr1.reg = 0x05;
  1860. // Config. Reg. 2 (caller ID)      (cr2):04
  1861. j->m_DAAShadowRegs.SOP_REGS.SOP.cr2.reg = 0x04;
  1862. // Config. Reg. 3 (testloops)      (cr3):00        ; 
  1863. j->m_DAAShadowRegs.SOP_REGS.SOP.cr3.reg = 0x00;
  1864. // Config. Reg. 4 (analog gain)    (cr4):01
  1865. j->m_DAAShadowRegs.SOP_REGS.SOP.cr4.reg = 0x02; //0x01;
  1866. // Config. Reg. 5 (Version)        (cr5):02
  1867. // Config. Reg. 6 (Reserved)       (cr6):00
  1868. // Config. Reg. 7 (Reserved)       (cr7):00
  1869. // ;xr Registers
  1870. // Ext. Reg. 0 (Interrupt Reg.)    (xr0):02
  1871. j->m_DAAShadowRegs.XOP_xr0_W.reg = 0x02; // SO_1 set to '1' because it is inverted.
  1872. // Ext. Reg. 1 (Interrupt enable)  (xr1):1C
  1873. j->m_DAAShadowRegs.XOP_REGS.XOP.xr1.reg = 0x1C; // RING, Caller ID, VDD_OK
  1874. // Ext. Reg. 2 (Cadence Time Out)  (xr2):7D
  1875. j->m_DAAShadowRegs.XOP_REGS.XOP.xr2.reg = 0x7D;
  1876. // Ext. Reg. 3 (DC Char)           (xr3):22        ; 
  1877. j->m_DAAShadowRegs.XOP_REGS.XOP.xr3.reg = 0x22;
  1878. // Ext. Reg. 4 (Cadence)           (xr4):00
  1879. j->m_DAAShadowRegs.XOP_REGS.XOP.xr4.reg = 0x00;
  1880. // Ext. Reg. 5 (Ring timer)        (xr5):22
  1881. j->m_DAAShadowRegs.XOP_REGS.XOP.xr5.reg = 0x22;
  1882. // Ext. Reg. 6 (Power State)       (xr6):00
  1883. j->m_DAAShadowRegs.XOP_xr6_W.reg = 0x00;
  1884. // Ext. Reg. 7 (Vdd)               (xr7):40
  1885. j->m_DAAShadowRegs.XOP_REGS.XOP.xr7.reg = 0x40; // 0x40 ??? Should it be 0x00?
  1886. // DTMF Tone 1                     (0B): 11,B3,5A,2C    ;   697 Hz  
  1887. //                                       12,33,5A,C3    ;  770 Hz  
  1888. //                                       13,3C,5B,32    ;  852 Hz  
  1889. //                                       1D,1B,5C,CC    ;  941 Hz  
  1890. j->m_DAAShadowRegs.COP_REGS.COP.Tone1Coeff[3] = 0x11;
  1891. j->m_DAAShadowRegs.COP_REGS.COP.Tone1Coeff[2] = 0xB3;
  1892. j->m_DAAShadowRegs.COP_REGS.COP.Tone1Coeff[1] = 0x5A;
  1893. j->m_DAAShadowRegs.COP_REGS.COP.Tone1Coeff[0] = 0x2C;
  1894. // DTMF Tone 2                     (0C): 32,32,52,B3    ;  1209 Hz  
  1895. //                                       EC,1D,52,22    ;  1336 Hz  
  1896. //                                       AA,AC,51,D2    ;  1477 Hz  
  1897. //                                       9B,3B,51,25    ;  1633 Hz  
  1898. j->m_DAAShadowRegs.COP_REGS.COP.Tone2Coeff[3] = 0x32;
  1899. j->m_DAAShadowRegs.COP_REGS.COP.Tone2Coeff[2] = 0x32;
  1900. j->m_DAAShadowRegs.COP_REGS.COP.Tone2Coeff[1] = 0x52;
  1901. j->m_DAAShadowRegs.COP_REGS.COP.Tone2Coeff[0] = 0xB3;
  1902. }
  1903. static s16 tone_table[][19] =
  1904. {
  1905. { // f20_50[]
  1906. 32538, // A1 = 1.985962
  1907.  -32325, // A2 = -0.986511
  1908.  -343, // B2 = -0.010493
  1909.  0, // B1 = 0
  1910.  343, // B0 = 0.010493
  1911.  32619, // A1 = 1.990906
  1912.  -32520, // A2 = -0.992462
  1913.  19179, // B2 = 0.585327
  1914.  -19178, // B1 = -1.170593
  1915.  19179, // B0 = 0.585327
  1916.  32723, // A1 = 1.997314
  1917.  -32686, // A2 = -0.997528
  1918.  9973, // B2 = 0.304352
  1919.  -9955, // B1 = -0.607605
  1920.  9973, // B0 = 0.304352
  1921.  7, // Internal filter scaling
  1922.  159, // Minimum in-band energy threshold
  1923.  21, // 21/32 in-band to broad-band ratio
  1924.  0x0FF5 // shift-mask 0x0FF (look at 16 half-frames) bit count = 5
  1925. },
  1926. { // f133_200[]
  1927. 32072, // A1 = 1.95752
  1928.  -31896, // A2 = -0.973419
  1929.  -435, // B2 = -0.013294
  1930.  0, // B1 = 0
  1931.  435, // B0 = 0.013294
  1932.  32188, // A1 = 1.9646
  1933.  -32400, // A2 = -0.98877
  1934.  15139, // B2 = 0.462036
  1935.  -14882, // B1 = -0.908356
  1936.  15139, // B0 = 0.462036
  1937.  32473, // A1 = 1.981995
  1938.  -32524, // A2 = -0.992584
  1939.  23200, // B2 = 0.708008
  1940.  -23113, // B1 = -1.410706
  1941.  23200, // B0 = 0.708008
  1942.  7, // Internal filter scaling
  1943.  159, // Minimum in-band energy threshold
  1944.  21, // 21/32 in-band to broad-band ratio
  1945.  0x0FF5 // shift-mask 0x0FF (look at 16 half-frames) bit count = 5
  1946. },
  1947. { // 300.txt
  1948. 31769, // A1 = -1.939026
  1949.  -32584, // A2 = 0.994385
  1950.  -475, // B2 = -0.014522
  1951.  0, // B1 = 0.000000
  1952.  475, // B0 = 0.014522
  1953.  31789, // A1 = -1.940247
  1954.  -32679, // A2 = 0.997284
  1955.  17280, // B2 = 0.527344
  1956.  -16865, // B1 = -1.029358
  1957.  17280, // B0 = 0.527344
  1958.  31841, // A1 = -1.943481
  1959.  -32681, // A2 = 0.997345
  1960.  543, // B2 = 0.016579
  1961.  -525, // B1 = -0.032097
  1962.  543, // B0 = 0.016579
  1963.  5, // Internal filter scaling
  1964.  159, // Minimum in-band energy threshold
  1965.  21, // 21/32 in-band to broad-band ratio
  1966.  0x0FF5 // shift-mask 0x0FF (look at 16 half-frames) bit count = 5
  1967. },
  1968. { // f300_420[]
  1969. 30750, // A1 = 1.876892
  1970.  -31212, // A2 = -0.952515
  1971.  -804, // B2 = -0.024541
  1972.  0, // B1 = 0
  1973.  804, // B0 = 0.024541
  1974.  30686, // A1 = 1.872925
  1975.  -32145, // A2 = -0.980988
  1976.  14747, // B2 = 0.450043
  1977.  -13703, // B1 = -0.836395
  1978.  14747, // B0 = 0.450043
  1979.  31651, // A1 = 1.931824
  1980.  -32321, // A2 = -0.986389
  1981.  24425, // B2 = 0.745422
  1982.  -23914, // B1 = -1.459595
  1983.  24427, // B0 = 0.745483
  1984.  7, // Internal filter scaling
  1985.  159, // Minimum in-band energy threshold
  1986.  21, // 21/32 in-band to broad-band ratio
  1987.  0x0FF5 // shift-mask 0x0FF (look at 16 half-frames) bit count = 5
  1988. },
  1989. { // 330.txt
  1990. 31613, // A1 = -1.929565
  1991.  -32646, // A2 = 0.996277
  1992.  -185, // B2 = -0.005657
  1993.  0, // B1 = 0.000000
  1994.  185, // B0 = 0.005657
  1995.  31620, // A1 = -1.929932
  1996.  -32713, // A2 = 0.998352
  1997.  19253, // B2 = 0.587585
  1998.  -18566, // B1 = -1.133179
  1999.  19253, // B0 = 0.587585
  2000.  31674, // A1 = -1.933228
  2001.  -32715, // A2 = 0.998413
  2002.  2575, // B2 = 0.078590
  2003.  -2495, // B1 = -0.152283
  2004.  2575, // B0 = 0.078590
  2005.  5, // Internal filter scaling
  2006.  159, // Minimum in-band energy threshold
  2007.  21, // 21/32 in-band to broad-band ratio
  2008.  0x0FF5 // shift-mask 0x0FF (look at 16 half-frames) bit count = 5
  2009. },
  2010. { // f300_425[]
  2011. 30741, // A1 = 1.876282
  2012.  -31475, // A2 = -0.960541
  2013.  -703, // B2 = -0.021484
  2014.  0, // B1 = 0
  2015.  703, // B0 = 0.021484
  2016.  30688, // A1 = 1.873047
  2017.  -32248, // A2 = -0.984161
  2018.  14542, // B2 = 0.443787
  2019.  -13523, // B1 = -0.825439
  2020.  14542, // B0 = 0.443817
  2021.  31494, // A1 = 1.922302
  2022.  -32366, // A2 = -0.987762
  2023.  21577, // B2 = 0.658508
  2024.  -21013, // B1 = -1.282532
  2025.  21577, // B0 = 0.658508
  2026.  7, // Internal filter scaling
  2027.  159, // Minimum in-band energy threshold
  2028.  21, // 21/32 in-band to broad-band ratio
  2029.  0x0FF5 // shift-mask 0x0FF (look at 16 half-frames) bit count = 5
  2030. },
  2031. { // f330_440[]
  2032. 30627, // A1 = 1.869324
  2033.  -31338, // A2 = -0.95636
  2034.  -843, // B2 = -0.025749
  2035.  0, // B1 = 0
  2036.  843, // B0 = 0.025749
  2037.  30550, // A1 = 1.864685
  2038.  -32221, // A2 = -0.983337
  2039.  13594, // B2 = 0.414886
  2040.  -12589, // B1 = -0.768402
  2041.  13594, // B0 = 0.414886
  2042.  31488, // A1 = 1.921936
  2043.  -32358, // A2 = -0.987518
  2044.  24684, // B2 = 0.753296
  2045.  -24029, // B1 = -1.466614
  2046.  24684, // B0 = 0.753296
  2047.  7, // Internal filter scaling
  2048.  159, // Minimum in-band energy threshold
  2049.  21, // 21/32 in-band to broad-band ratio
  2050.  0x0FF5 // shift-mask 0x0FF (look at 16 half-frames) bit count = 5
  2051. },
  2052. { // 340.txt
  2053. 31546, // A1 = -1.925476
  2054.  -32646, // A2 = 0.996277
  2055.  -445, // B2 = -0.013588
  2056.  0, // B1 = 0.000000
  2057.  445, // B0 = 0.013588
  2058.  31551, // A1 = -1.925781
  2059.  -32713, // A2 = 0.998352
  2060.  23884, // B2 = 0.728882
  2061.  -22979, // B1 = -1.402527
  2062.  23884, // B0 = 0.728882
  2063.  31606, // A1 = -1.929138
  2064.  -32715, // A2 = 0.998413
  2065.  863, // B2 = 0.026367
  2066.  -835, // B1 = -0.050985
  2067.  863, // B0 = 0.026367
  2068.  5, // Internal filter scaling
  2069.  159, // Minimum in-band energy threshold
  2070.  21, // 21/32 in-band to broad-band ratio
  2071.  0x0FF5 // shift-mask 0x0FF (look at 16 half-frames) bit count = 5
  2072. },
  2073. { // f350_400[]
  2074. 31006, // A1 = 1.892517
  2075.  -32029, // A2 = -0.977448
  2076.  -461, // B2 = -0.014096
  2077.  0, // B1 = 0
  2078.  461, // B0 = 0.014096
  2079.  30999, // A1 = 1.892029
  2080.  -32487, // A2 = -0.991455
  2081.  11325, // B2 = 0.345612
  2082.  -10682, // B1 = -0.651978
  2083.  11325, // B0 = 0.345612
  2084.  31441, // A1 = 1.919067
  2085.  -32526, // A2 = -0.992615
  2086.  24324, // B2 = 0.74231
  2087.  -23535, // B1 = -1.436523
  2088.  24324, // B0 = 0.74231
  2089.  7, // Internal filter scaling
  2090.  159, // Minimum in-band energy threshold
  2091.  21, // 21/32 in-band to broad-band ratio
  2092.  0x0FF5 // shift-mask 0x0FF (look at 16 half-frames) bit count = 5
  2093. },
  2094. { // f350_440[]
  2095. 30634, // A1 = 1.869751
  2096.  -31533, // A2 = -0.962341
  2097.  -680, // B2 = -0.020782
  2098.  0, // B1 = 0
  2099.  680, // B0 = 0.020782
  2100.  30571, // A1 = 1.865906
  2101.  -32277, // A2 = -0.985016
  2102.  12894, // B2 = 0.393524
  2103.  -11945, // B1 = -0.729065
  2104.  12894, // B0 = 0.393524
  2105.  31367, // A1 = 1.91449
  2106.  -32379, // A2 = -0.988129
  2107.  23820, // B2 = 0.726929
  2108.  -23104, // B1 = -1.410217
  2109.  23820, // B0 = 0.726929
  2110.  7, // Internal filter scaling
  2111.  159, // Minimum in-band energy threshold
  2112.  21, // 21/32 in-band to broad-band ratio
  2113.  0x0FF5 // shift-mask 0x0FF (look at 16 half-frames) bit count = 5
  2114. },
  2115. { // f350_450[]
  2116. 30552, // A1 = 1.864807
  2117.  -31434, // A2 = -0.95929
  2118.  -690, // B2 = -0.021066
  2119.  0, // B1 = 0
  2120.  690, // B0 = 0.021066
  2121.  30472, // A1 = 1.859924
  2122.  -32248, // A2 = -0.984161
  2123.  13385, // B2 = 0.408478
  2124.  -12357, // B1 = -0.754242
  2125.  13385, // B0 = 0.408478
  2126.  31358, // A1 = 1.914001
  2127.  -32366, // A2 = -0.987732
  2128.  26488, // B2 = 0.80835
  2129.  -25692, // B1 = -1.568176
  2130.  26490, // B0 = 0.808411
  2131.  7, // Internal filter scaling
  2132.  159, // Minimum in-band energy threshold
  2133.  21, // 21/32 in-band to broad-band ratio
  2134.  0x0FF5 // shift-mask 0x0FF (look at 16 half-frames) bit count = 5
  2135. },
  2136. { // 360.txt
  2137. 31397, // A1 = -1.916321
  2138.  -32623, // A2 = 0.995605
  2139.  -117, // B2 = -0.003598
  2140.  0, // B1 = 0.000000
  2141.  117, // B0 = 0.003598
  2142.  31403, // A1 = -1.916687
  2143.  -32700, // A2 = 0.997925
  2144.  3388, // B2 = 0.103401
  2145.  -3240, // B1 = -0.197784
  2146.  3388, // B0 = 0.103401
  2147.  31463, // A1 = -1.920410
  2148.  -32702, // A2 = 0.997986
  2149.  13346, // B2 = 0.407288
  2150.  -12863, // B1 = -0.785126
  2151.  13346, // B0 = 0.407288
  2152.  5, // Internal filter scaling
  2153.  159, // Minimum in-band energy threshold
  2154.  21, // 21/32 in-band to broad-band ratio
  2155.  0x0FF5 // shift-mask 0x0FF (look at 16 half-frames) bit count = 5
  2156. },
  2157. { // f380_420[]
  2158. 30831, // A1 = 1.881775
  2159.  -32064, // A2 = -0.978546
  2160.  -367, // B2 = -0.01122
  2161.  0, // B1 = 0
  2162.  367, // B0 = 0.01122
  2163.  30813, // A1 = 1.880737
  2164.  -32456, // A2 = -0.990509
  2165.  11068, // B2 = 0.337769
  2166.  -10338, // B1 = -0.631042
  2167.  11068, // B0 = 0.337769
  2168.  31214, // A1 = 1.905212
  2169.  -32491, // A2 = -0.991577
  2170.  16374, // B2 = 0.499695
  2171.  -15781, // B1 = -0.963196
  2172.  16374, // B0 = 0.499695
  2173.  7, // Internal filter scaling
  2174.  159, // Minimum in-band energy threshold
  2175.  21, // 21/32 in-band to broad-band ratio
  2176.  0x0FF5 // shift-mask 0x0FF (look at 16 half-frames) bit count = 5
  2177. },
  2178. { // 392.txt
  2179. 31152, // A1 = -1.901428
  2180.  -32613, // A2 = 0.995300
  2181.  -314, // B2 = -0.009605
  2182.  0, // B1 = 0.000000
  2183.  314, // B0 = 0.009605
  2184.  31156, // A1 = -1.901672
  2185.  -32694, // A2 = 0.997742
  2186.  28847, // B2 = 0.880371
  2187.  -2734, // B1 = -0.166901
  2188.  28847, // B0 = 0.880371
  2189.  31225, // A1 = -1.905823
  2190.  -32696, // A2 = 0.997803
  2191.  462, // B2 = 0.014108
  2192.  -442, // B1 = -0.027019
  2193.  462, // B0 = 0.014108
  2194.  5, // Internal filter scaling
  2195.  159, // Minimum in-band energy threshold
  2196.  21, // 21/32 in-band to broad-band ratio
  2197.  0x0FF5 // shift-mask 0x0FF (look at 16 half-frames) bit count = 5
  2198. },
  2199. { // f400_425[]
  2200. 30836, // A1 = 1.882141
  2201.  -32296, // A2 = -0.985596
  2202.  -324, // B2 = -0.009903
  2203.  0, // B1 = 0
  2204.  324, // B0 = 0.009903
  2205.  30825, // A1 = 1.881409
  2206.  -32570, // A2 = -0.993958
  2207.  16847, // B2 = 0.51416
  2208.  -15792, // B1 = -0.963898
  2209.  16847, // B0 = 0.51416
  2210.  31106, // A1 = 1.89856
  2211.  -32584, // A2 = -0.994415
  2212.  9579, // B2 = 0.292328
  2213.  -9164, // B1 = -0.559357
  2214.  9579, // B0 = 0.292328
  2215.  7, // Internal filter scaling
  2216.  159, // Minimum in-band energy threshold
  2217.  21, // 21/32 in-band to broad-band ratio
  2218.  0x0FF5 // shift-mask 0x0FF (look at 16 half-frames) bit count = 5
  2219. },
  2220. { // f400_440[]
  2221. 30702, // A1 = 1.873962
  2222.  -32134, // A2 = -0.980682
  2223.  -517, // B2 = -0.015793
  2224.  0, // B1 = 0
  2225.  517, // B0 = 0.015793
  2226.  30676, // A1 = 1.872375
  2227.  -32520, // A2 = -0.992462
  2228.  8144, // B2 = 0.24855
  2229.  -7596, // B1 = -0.463684
  2230.  8144, // B0 = 0.24855
  2231.  31084, // A1 = 1.897217
  2232.  -32547, // A2 = -0.993256
  2233.  22713, // B2 = 0.693176
  2234.  -21734, // B1 = -1.326599
  2235.  22713, // B0 = 0.693176
  2236.  7, // Internal filter scaling
  2237.  159, // Minimum in-band energy threshold
  2238.  21, // 21/32 in-band to broad-band ratio
  2239.  0x0FF5 // shift-mask 0x0FF (look at 16 half-frames) bit count = 5
  2240. },
  2241. { // f400_450[]
  2242. 30613, // A1 = 1.86853
  2243.  -32031, // A2 = -0.977509
  2244.  -618, // B2 = -0.018866
  2245.  0, // B1 = 0
  2246.  618, // B0 = 0.018866
  2247.  30577, // A1 = 1.866272
  2248.  -32491, // A2 = -0.991577
  2249.  9612, // B2 = 0.293335
  2250.  -8935, // B1 = -0.54541
  2251.  9612, // B0 = 0.293335
  2252.  31071, // A1 = 1.896484
  2253.  -32524, // A2 = -0.992584
  2254.  21596, // B2 = 0.659058
  2255.  -20667, // B1 = -1.261414
  2256.  21596, // B0 = 0.659058
  2257.  7, // Internal filter scaling
  2258.  159, // Minimum in-band energy threshold
  2259.  21, // 21/32 in-band to broad-band ratio
  2260.  0x0FF5 // shift-mask 0x0FF (look at 16 half-frames) bit count = 5
  2261. },
  2262. { // 420.txt
  2263. 30914, // A1 = -1.886841
  2264.  -32584, // A2 = 0.994385
  2265.  -426, // B2 = -0.013020
  2266.  0, // B1 = 0.000000
  2267.  426, // B0 = 0.013020
  2268.  30914, // A1 = -1.886841
  2269.  -32679, // A2 = 0.997314
  2270.  17520, // B2 = 0.534668
  2271.  -16471, // B1 = -1.005310
  2272.  17520, // B0 = 0.534668
  2273.  31004, // A1 = -1.892334
  2274.  -32683, // A2 = 0.997406
  2275.  819, // B2 = 0.025023
  2276.  -780, // B1 = -0.047619
  2277.  819, // B0 = 0.025023
  2278.  5, // Internal filter scaling
  2279.  159, // Minimum in-band energy threshold
  2280.  21, // 21/32 in-band to broad-band ratio
  2281.  0x0FF5 // shift-mask 0x0FF (look at 16 half-frames) bit count = 5
  2282. },
  2283. { // 425.txt
  2284. 30881, // A1 = -1.884827
  2285.  -32603, // A2 = 0.994965
  2286.  -496, // B2 = -0.015144
  2287.  0, // B1 = 0.000000
  2288.  496, // B0 = 0.015144
  2289.  30880, // A1 = -1.884766
  2290.  -32692, // A2 = 0.997711
  2291.  24767, // B2 = 0.755859
  2292.  -23290, // B1 = -1.421509
  2293.  24767, // B0 = 0.755859
  2294.  30967, // A1 = -1.890076
  2295.  -32694, // A2 = 0.997772
  2296.  728, // B2 = 0.022232
  2297.  -691, // B1 = -0.042194
  2298.  728, // B0 = 0.022232
  2299.  5, // Internal filter scaling
  2300.  159, // Minimum in-band energy threshold
  2301.  21, // 21/32 in-band to broad-band ratio
  2302.  0x0FF5 // shift-mask 0x0FF (look at 16 half-frames) bit count = 5
  2303. },
  2304. { // f425_450[]
  2305. 30646, // A1 = 1.870544
  2306.  -32327, // A2 = -0.986572
  2307.  -287, // B2 = -0.008769
  2308.  0, // B1 = 0
  2309.  287, // B0 = 0.008769
  2310.  30627, // A1 = 1.869324
  2311.  -32607, // A2 = -0.995087
  2312.  13269, // B2 = 0.404968
  2313.  -12376, // B1 = -0.755432
  2314.  13269, // B0 = 0.404968
  2315.  30924, // A1 = 1.887512
  2316.  -32619, // A2 = -0.995453
  2317.  19950, // B2 = 0.608826
  2318.  -18940, // B1 = -1.156006
  2319.  19950, // B0 = 0.608826
  2320.  7, // Internal filter scaling
  2321.  159, // Minimum in-band energy threshold
  2322.  21, // 21/32 in-band to broad-band ratio
  2323.  0x0FF5 // shift-mask 0x0FF (look at 16 half-frames) bit count = 5
  2324. },
  2325. { // f425_475[]
  2326. 30396, // A1 = 1.855225
  2327.  -32014, // A2 = -0.97699
  2328.  -395, // B2 = -0.012055
  2329.  0, // B1 = 0
  2330.  395, // B0 = 0.012055
  2331.  30343, // A1 = 1.85199
  2332.  -32482, // A2 = -0.991302
  2333.  17823, // B2 = 0.543945
  2334.  -16431, // B1 = -1.002869
  2335.  17823, // B0 = 0.543945
  2336.  30872, // A1 = 1.884338
  2337.  -32516, // A2 = -0.99231
  2338.  18124, // B2 = 0.553101
  2339.  -17246, // B1 = -1.052673
  2340.  18124, // B0 = 0.553101
  2341.  7, // Internal filter scaling
  2342.  159, // Minimum in-band energy threshold
  2343.  21, // 21/32 in-band to broad-band ratio
  2344.  0x0FF5 // shift-mask 0x0FF (look at 16 half-frames) bit count = 5
  2345. },
  2346. { // 435.txt
  2347. 30796, // A1 = -1.879639
  2348.  -32603, // A2 = 0.994965
  2349.  -254, // B2 = -0.007762
  2350.  0, // B1 = 0.000000
  2351.  254, // B0 = 0.007762
  2352.  30793, // A1 = -1.879456
  2353.  -32692, // A2 = 0.997711
  2354.  18934, // B2 = 0.577820
  2355.  -17751, // B1 = -1.083496
  2356.  18934, // B0 = 0.577820
  2357.  30882, // A1 = -1.884888
  2358.  -32694, // A2 = 0.997772
  2359.  1858, // B2 = 0.056713
  2360.  -1758, // B1 = -0.107357
  2361.  1858, // B0 = 0.056713
  2362.  5, // Internal filter scaling
  2363.  159, // Minimum in-band energy threshold
  2364.  21, // 21/32 in-band to broad-band ratio
  2365.  0x0FF5 // shift-mask 0x0FF (look at 16 half-frames) bit count = 5
  2366. },
  2367. { // f440_450[]
  2368. 30641, // A1 = 1.870239
  2369.  -32458, // A2 = -0.99057
  2370.  -155, // B2 = -0.004735
  2371.  0, // B1 = 0
  2372.  155, // B0 = 0.004735
  2373.  30631, // A1 = 1.869568
  2374.  -32630, // A2 = -0.995789
  2375.  11453, // B2 = 0.349548
  2376.  -10666, // B1 = -0.651001
  2377.  11453, // B0 = 0.349548
  2378.  30810, // A1 = 1.880554
  2379.  -32634, // A2 = -0.995941
  2380.  12237, // B2 = 0.373474
  2381.  -11588, // B1 = -0.707336
  2382.  12237, // B0 = 0.373474
  2383.  7, // Internal filter scaling
  2384.  159, // Minimum in-band energy threshold
  2385.  21, // 21/32 in-band to broad-band ratio
  2386.  0x0FF5 // shift-mask 0x0FF (look at 16 half-frames) bit count = 5
  2387. },
  2388. { // f440_480[]
  2389. 30367, // A1 = 1.853455
  2390.  -32147, // A2 = -0.981079
  2391.  -495, // B2 = -0.015113
  2392.  0, // B1 = 0
  2393.  495, // B0 = 0.015113
  2394.  30322, // A1 = 1.850769
  2395.  -32543, // A2 = -0.993134
  2396.  10031, // B2 = 0.306152
  2397.  -9252, // B1 = -0.564728
  2398.  10031, // B0 = 0.306152
  2399.  30770, // A1 = 1.878052
  2400.  -32563, // A2 = -0.993774
  2401.  22674, // B2 = 0.691956
  2402.  -21465, // B1 = -1.31012
  2403.  22674, // B0 = 0.691956
  2404.  7, // Internal filter scaling
  2405.  159, // Minimum in-band energy threshold
  2406.  21, // 21/32 in-band to broad-band ratio
  2407.  0x0FF5 // shift-mask 0x0FF (look at 16 half-frames) bit count = 5
  2408. },
  2409. { // 445.txt
  2410. 30709, // A1 = -1.874329
  2411.  -32603, // A2 = 0.994965
  2412.  -83, // B2 = -0.002545
  2413.  0, // B1 = 0.000000
  2414.  83, // B0 = 0.002545
  2415.  30704, // A1 = -1.874084
  2416.  -32692, // A2 = 0.997711
  2417.  10641, // B2 = 0.324738
  2418.  -9947, // B1 = -0.607147
  2419.  10641, // B0 = 0.324738
  2420.  30796, // A1 = -1.879639
  2421.  -32694, // A2 = 0.997772
  2422.  10079, // B2 = 0.307587
  2423.  9513, // B1 = 0.580688
  2424.  10079, // B0 = 0.307587
  2425.  5, // Internal filter scaling
  2426.  159, // Minimum in-band energy threshold
  2427.  21, // 21/32 in-band to broad-band ratio
  2428.  0x0FF5 // shift-mask 0x0FF (look at 16 half-frames) bit count = 5
  2429. },
  2430. { // 450.txt
  2431. 30664, // A1 = -1.871643
  2432.  -32603, // A2 = 0.994965
  2433.  -164, // B2 = -0.005029
  2434.  0, // B1 = 0.000000
  2435.  164, // B0 = 0.005029
  2436.  30661, // A1 = -1.871399
  2437.  -32692, // A2 = 0.997711
  2438.  15294, // B2 = 0.466736
  2439.  -14275, // B1 = -0.871307
  2440.  15294, // B0 = 0.466736
  2441.  30751, // A1 = -1.876953
  2442.  -32694, // A2 = 0.997772
  2443.  3548, // B2 = 0.108284
  2444.  -3344, // B1 = -0.204155
  2445.  3548, // B0 = 0.108284
  2446.  5, // Internal filter scaling
  2447.  159, // Minimum in-band energy threshold
  2448.  21, // 21/32 in-band to broad-band ratio
  2449.  0x0FF5 // shift-mask 0x0FF (look at 16 half-frames) bit count = 5
  2450. },
  2451. { // 452.txt
  2452. 30653, // A1 = -1.870911
  2453.  -32615, // A2 = 0.995361
  2454.  -209, // B2 = -0.006382
  2455.  0, // B1 = 0.000000
  2456.  209, // B0 = 0.006382
  2457.  30647, // A1 = -1.870605
  2458.  -32702, // A2 = 0.997986
  2459.  18971, // B2 = 0.578979
  2460.  -17716, // B1 = -1.081299
  2461.  18971, // B0 = 0.578979
  2462.  30738, // A1 = -1.876099
  2463.  -32702, // A2 = 0.998016
  2464.  2967, // B2 = 0.090561
  2465.  -2793, // B1 = -0.170502
  2466.  2967, // B0 = 0.090561
  2467.  5, // Internal filter scaling
  2468.  159, // Minimum in-band energy threshold
  2469.  21, // 21/32 in-band to broad-band ratio
  2470.  0x0FF5 // shift-mask 0x0FF (look at 16 half-frames) bit count = 5
  2471. },
  2472. { // 475.txt
  2473. 30437, // A1 = -1.857727
  2474.  -32603, // A2 = 0.994965
  2475.  -264, // B2 = -0.008062
  2476.  0, // B1 = 0.000000
  2477.  264, // B0 = 0.008062
  2478.  30430, // A1 = -1.857300
  2479.  -32692, // A2 = 0.997711
  2480.  21681, // B2 = 0.661682
  2481.  -20082, // B1 = -1.225708
  2482.  21681, // B0 = 0.661682
  2483.  30526, // A1 = -1.863220
  2484.  -32694, // A2 = 0.997742
  2485.  1559, // B2 = 0.047600
  2486.  -1459, // B1 = -0.089096
  2487.  1559, // B0 = 0.047600
  2488.  5, // Internal filter scaling
  2489.  159, // Minimum in-band energy threshold
  2490.  21, // 21/32 in-band to broad-band ratio
  2491.  0x0FF5 // shift-mask 0x0FF (look at 16 half-frames) bit count = 5
  2492. },
  2493. { // f480_620[]
  2494. 28975, // A1 = 1.768494
  2495.  -30955, // A2 = -0.944672
  2496.  -1026, // B2 = -0.03133
  2497.  0, // B1 = 0
  2498.  1026, // B0 = 0.03133
  2499.  28613, // A1 = 1.746399
  2500.  -32089, // A2 = -0.979309
  2501.  14214, // B2 = 0.433807
  2502.  -12202, // B1 = -0.744812
  2503.  14214, // B0 = 0.433807
  2504.  30243, // A1 = 1.845947
  2505.  -32238, // A2 = -0.983856
  2506.  24825, // B2 = 0.757629
  2507.  -23402, // B1 = -1.428345
  2508.  24825, // B0 = 0.757629
  2509.  7, // Internal filter scaling
  2510.  159, // Minimum in-band energy threshold
  2511.  21, // 21/32 in-band to broad-band ratio
  2512.  0x0FF5 // shift-mask 0x0FF (look at 16 half-frames) bit count = 5
  2513. },
  2514. { // 494.txt
  2515. 30257, // A1 = -1.846741
  2516.  -32605, // A2 = 0.995056
  2517.  -249, // B2 = -0.007625
  2518.  0, // B1 = 0.000000
  2519.  249, // B0 = 0.007625
  2520.  30247, // A1 = -1.846191
  2521.  -32694, // A2 = 0.997772
  2522.  18088, // B2 = 0.552002
  2523.  -16652, // B1 = -1.016418
  2524.  18088, // B0 = 0.552002
  2525.  30348, // A1 = -1.852295
  2526.  -32696, // A2 = 0.997803
  2527.  2099, // B2 = 0.064064
  2528.  -1953, // B1 = -0.119202
  2529.  2099, // B0 = 0.064064
  2530.  5, // Internal filter scaling
  2531.  159, // Minimum in-band energy threshold
  2532.  21, // 21/32 in-band to broad-band ratio
  2533.  0x0FF5 // shift-mask 0x0FF (look at 16 half-frames) bit count = 5
  2534. },
  2535. { // 500.txt
  2536. 30202, // A1 = -1.843431
  2537.  -32624, // A2 = 0.995622
  2538.  -413, // B2 = -0.012622
  2539.  0, // B1 = 0.000000
  2540.  413, // B0 = 0.012622
  2541.  30191, // A1 = -1.842721
  2542.  -32714, // A2 = 0.998364
  2543.  25954, // B2 = 0.792057
  2544.  -23890, // B1 = -1.458131
  2545.  25954, // B0 = 0.792057
  2546.  30296, // A1 = -1.849172
  2547.  -32715, // A2 = 0.998397
  2548.  2007, // B2 = 0.061264
  2549.  -1860, // B1 = -0.113568
  2550.  2007, // B0 = 0.061264
  2551.  5, // Internal filter scaling
  2552.  159, // Minimum in-band energy threshold
  2553.  21, // 21/32 in-band to broad-band ratio
  2554.  0x0FF5 // shift-mask 0x0FF (look at 16 half-frames) bit count = 5
  2555. },
  2556. { // 520.txt
  2557. 30001, // A1 = -1.831116
  2558.  -32613, // A2 = 0.995270
  2559.  -155, // B2 = -0.004750
  2560.  0, // B1 = 0.000000
  2561.  155, // B0 = 0.004750
  2562.  29985, // A1 = -1.830200
  2563.  -32710, // A2 = 0.998260
  2564.  6584, // B2 = 0.200928
  2565.  -6018, // B1 = -0.367355
  2566.  6584, // B0 = 0.200928
  2567.  30105, // A1 = -1.837524
  2568.  -32712, // A2 = 0.998291
  2569.  23812, // B2 = 0.726685
  2570.  -21936, // B1 = -1.338928
  2571.  23812, // B0 = 0.726685
  2572.  5, // Internal filter scaling
  2573.  159, // Minimum in-band energy threshold
  2574.  21, // 21/32 in-band to broad-band ratio
  2575.  0x0FF5 // shift-mask 0x0FF (look at 16 half-frames) bit count = 5
  2576. },
  2577. { // 523.txt
  2578. 29964, // A1 = -1.828918
  2579.  -32601, // A2 = 0.994904
  2580.  -101, // B2 = -0.003110
  2581.  0, // B1 = 0.000000
  2582.  101, // B0 = 0.003110
  2583.  29949, // A1 = -1.827942
  2584.  -32700, // A2 = 0.997925
  2585.  11041, // B2 = 0.336975
  2586.  -10075, // B1 = -0.614960
  2587.  11041, // B0 = 0.336975
  2588.  30070, // A1 = -1.835388
  2589.  -32702, // A2 = 0.997986
  2590.  16762, // B2 = 0.511536
  2591.  -15437, // B1 = -0.942230
  2592.  16762, // B0 = 0.511536
  2593.  5, // Internal filter scaling
  2594.  159, // Minimum in-band energy threshold
  2595.  21, // 21/32 in-band to broad-band ratio
  2596.  0x0FF5 // shift-mask 0x0FF (look at 16 half-frames) bit count = 5
  2597. },
  2598. { // 525.txt
  2599. 29936, // A1 = -1.827209
  2600.  -32584, // A2 = 0.994415
  2601.  -91, // B2 = -0.002806
  2602.  0, // B1 = 0.000000
  2603.  91, // B0 = 0.002806
  2604.  29921, // A1 = -1.826233
  2605.  -32688, // A2 = 0.997559
  2606.  11449, // B2 = 0.349396
  2607.  -10426, // B1 = -0.636383
  2608.  11449, // B0 = 0.349396
  2609.  30045, // A1 = -1.833862
  2610.  -32688, // A2 = 0.997589
  2611.  13055, // B2 = 0.398407
  2612.  -12028, // B1 = -0.734161
  2613.  13055, // B0 = 0.398407
  2614.  5, // Internal filter scaling
  2615.  159, // Minimum in-band energy threshold
  2616.  21, // 21/32 in-band to broad-band ratio
  2617.  0x0FF5 // shift-mask 0x0FF (look at 16 half-frames) bit count = 5
  2618. },
  2619. { // f540_660[]
  2620. 28499, // A1 = 1.739441
  2621.  -31129, // A2 = -0.949982
  2622.  -849, // B2 = -0.025922
  2623.  0, // B1 = 0
  2624.  849, // B0 = 0.025922
  2625.  28128, // A1 = 1.716797
  2626.  -32130, // A2 = -0.98056
  2627.  14556, // B2 = 0.444214
  2628.  -12251, // B1 = -0.747772
  2629.  14556, // B0 = 0.444244
  2630.  29667, // A1 = 1.81073
  2631.  -32244, // A2 = -0.984039
  2632.  23038, // B2 = 0.703064
  2633.  -21358, // B1 = -1.303589
  2634.  23040, // B0 = 0.703125
  2635.  7, // Internal filter scaling
  2636.  159, // Minimum in-band energy threshold
  2637.  21, // 21/32 in-band to broad-band ratio
  2638.  0x0FF5 // shift-mask 0x0FF (look at 16 half-frames) bit count = 5
  2639. },
  2640. { // 587.txt
  2641. 29271, // A1 = -1.786560
  2642.  -32599, // A2 = 0.994873
  2643.  -490, // B2 = -0.014957
  2644.  0, // B1 = 0.000000
  2645.  490, // B0 = 0.014957
  2646.  29246, // A1 = -1.785095
  2647.  -32700, // A2 = 0.997925
  2648.  28961, // B2 = 0.883850
  2649.  -25796, // B1 = -1.574463
  2650.  28961, // B0 = 0.883850
  2651.  29383, // A1 = -1.793396
  2652.  -32700, // A2 = 0.997955
  2653.  1299, // B2 = 0.039650
  2654.  -1169, // B1 = -0.071396
  2655.  1299, // B0 = 0.039650
  2656.  5, // Internal filter scaling
  2657.  159, // Minimum in-band energy threshold
  2658.  21, // 21/32 in-band to broad-band ratio
  2659.  0x0FF5 // shift-mask 0x0FF (look at 16 half-frames) bit count = 5
  2660. },
  2661. { // 590.txt
  2662. 29230, // A1 = -1.784058
  2663.  -32584, // A2 = 0.994415
  2664.  -418, // B2 = -0.012757
  2665.  0, // B1 = 0.000000
  2666.  418, // B0 = 0.012757
  2667.  29206, // A1 = -1.782593
  2668.  -32688, // A2 = 0.997559
  2669.  36556, // B2 = 1.115601
  2670.  -32478, // B1 = -1.982300
  2671.  36556, // B0 = 1.115601
  2672.  29345, // A1 = -1.791077
  2673.  -32688, // A2 = 0.997589
  2674.  897, // B2 = 0.027397
  2675.  -808, // B1 = -0.049334
  2676.  897, // B0 = 0.027397
  2677.  5, // Internal filter scaling
  2678.  159, // Minimum in-band energy threshold
  2679.  21, // 21/32 in-band to broad-band ratio
  2680.  0x0FF5 // shift-mask 0x0FF (look at 16 half-frames) bit count = 5
  2681. },
  2682. { // 600.txt
  2683. 29116, // A1 = -1.777100
  2684.  -32603, // A2 = 0.994965
  2685.  -165, // B2 = -0.005039
  2686.  0, // B1 = 0.000000
  2687.  165, // B0 = 0.005039
  2688.  29089, // A1 = -1.775452
  2689.  -32708, // A2 = 0.998199
  2690.  6963, // B2 = 0.212494
  2691.  -6172, // B1 = -0.376770
  2692.  6963, // B0 = 0.212494
  2693.  29237, // A1 = -1.784485
  2694.  -32710, // A2 = 0.998230
  2695.  24197, // B2 = 0.738464
  2696.  -21657, // B1 = -1.321899
  2697.  24197, // B0 = 0.738464
  2698.  5, // Internal filter scaling
  2699.  159, // Minimum in-band energy threshold
  2700.  21, // 21/32 in-band to broad-band ratio
  2701.  0x0FF5 // shift-mask 0x0FF (look at 16 half-frames) bit count = 5
  2702. },
  2703. { // 660.txt
  2704. 28376, // A1 = -1.731934
  2705.  -32567, // A2 = 0.993896
  2706.  -363, // B2 = -0.011102
  2707.  0, // B1 = 0.000000
  2708.  363, // B0 = 0.011102
  2709.  28337, // A1 = -1.729614
  2710.  -32683, // A2 = 0.997434
  2711.  21766, // B2 = 0.664246
  2712.  -18761, // B1 = -1.145081
  2713.  21766, // B0 = 0.664246
  2714.  28513, // A1 = -1.740356
  2715.  -32686, // A2 = 0.997498
  2716.  2509, // B2 = 0.076584
  2717.  -2196, // B1 = -0.134041
  2718.  2509, // B0 = 0.076584
  2719.  5, // Internal filter scaling
  2720.  159, // Minimum in-band energy threshold
  2721.  21, // 21/32 in-band to broad-band ratio
  2722.  0x0FF5 // shift-mask 0x0FF (look at 16 half-frames) bit count = 5
  2723. },
  2724. { // 700.txt
  2725. 27844, // A1 = -1.699463
  2726.  -32563, // A2 = 0.993744
  2727.  -366, // B2 = -0.011187
  2728.  0, // B1 = 0.000000
  2729.  366, // B0 = 0.011187
  2730.  27797, // A1 = -1.696655
  2731.  -32686, // A2 = 0.997498
  2732.  22748, // B2 = 0.694214
  2733.  -19235, // B1 = -1.174072
  2734.  22748, // B0 = 0.694214
  2735.  27995, // A1 = -1.708740
  2736.  -32688, // A2 = 0.997559
  2737.  2964, // B2 = 0.090477
  2738.  -2546, // B1 = -0.155449
  2739.  2964, // B0 = 0.090477
  2740.  5, // Internal filter scaling
  2741.  159, // Minimum in-band energy threshold
  2742.  21, // 21/32 in-band to broad-band ratio
  2743.  0x0FF5 // shift-mask 0x0FF (look at 16 half-frames) bit count = 5
  2744. },
  2745. { // 740.txt
  2746. 27297, // A1 = -1.666077
  2747.  -32551, // A2 = 0.993408
  2748.  -345, // B2 = -0.010540
  2749.  0, // B1 = 0.000000
  2750.  345, // B0 = 0.010540
  2751.  27240, // A1 = -1.662598
  2752.  -32683, // A2 = 0.997406
  2753.  22560, // B2 = 0.688477
  2754.  -18688, // B1 = -1.140625
  2755.  22560, // B0 = 0.688477
  2756.  27461, // A1 = -1.676147
  2757.  -32684, // A2 = 0.997467
  2758.  3541, // B2 = 0.108086
  2759.  -2985, // B1 = -0.182220
  2760.  3541, // B0 = 0.108086
  2761.  5, // Internal filter scaling
  2762.  159, // Minimum in-band energy threshold
  2763.  21, // 21/32 in-band to broad-band ratio
  2764.  0x0FF5 // shift-mask 0x0FF (look at 16 half-frames) bit count = 5
  2765. },
  2766. { // 750.txt
  2767. 27155, // A1 = -1.657410
  2768.  -32551, // A2 = 0.993408
  2769.  -462, // B2 = -0.014117
  2770.  0, // B1 = 0.000000
  2771.  462, // B0 = 0.014117
  2772.  27097, // A1 = -1.653870
  2773.  -32683, // A2 = 0.997406
  2774.  32495, // B2 = 0.991699
  2775.  -26776, // B1 = -1.634338
  2776.  32495, // B0 = 0.991699
  2777.  27321, // A1 = -1.667542
  2778.  -32684, // A2 = 0.997467
  2779.  1835, // B2 = 0.056007
  2780.  -1539, // B1 = -0.093948
  2781.  1835, // B0 = 0.056007
  2782.  5, // Internal filter scaling
  2783.  159, // Minimum in-band energy threshold
  2784.  21, // 21/32 in-band to broad-band ratio
  2785.  0x0FF5 // shift-mask 0x0FF (look at 16 half-frames) bit count = 5
  2786. },
  2787. { // f750_1450[]
  2788. 19298, // A1 = 1.177917
  2789.  -24471, // A2 = -0.746796
  2790.  -4152, // B2 = -0.126709
  2791.  0, // B1 = 0
  2792.  4152, // B0 = 0.126709
  2793.  12902, // A1 = 0.787476
  2794.  -29091, // A2 = -0.887817
  2795.  12491, // B2 = 0.38121
  2796.  -1794, // B1 = -0.109528
  2797.  12494, // B0 = 0.381317
  2798.  26291, // A1 = 1.604736
  2799.  -30470, // A2 = -0.929901
  2800.  28859, // B2 = 0.880737
  2801.  -26084, // B1 = -1.592102
  2802.  28861, // B0 = 0.880798
  2803.  7, // Internal filter scaling
  2804.  159, // Minimum in-band energy threshold
  2805.  21, // 21/32 in-band to broad-band ratio
  2806.  0x0FF5 // shift-mask 0x0FF (look at 16 half-frames) bit count = 5
  2807. },
  2808. { // 770.txt
  2809. 26867, // A1 = -1.639832
  2810.  -32551, // A2 = 0.993408
  2811.  -123, // B2 = -0.003755
  2812.  0, // B1 = 0.000000
  2813.  123, // B0 = 0.003755
  2814.  26805, // A1 = -1.636108
  2815.  -32683, // A2 = 0.997406
  2816.  17297, // B2 = 0.527863
  2817.  -14096, // B1 = -0.860382
  2818.  17297, // B0 = 0.527863
  2819.  27034, // A1 = -1.650085
  2820.  -32684, // A2 = 0.997467
  2821.  12958, // B2 = 0.395477
  2822.  -10756, // B1 = -0.656525
  2823.  12958, // B0 = 0.395477
  2824.  5, // Internal filter scaling
  2825.  159, // Minimum in-band energy threshold
  2826.  21, // 21/32 in-band to broad-band ratio
  2827.  0x0FF5 // shift-mask 0x0FF (look at 16 half-frames) bit count = 5
  2828. },
  2829. { // 800.txt
  2830. 26413, // A1 = -1.612122
  2831.  -32547, // A2 = 0.993286
  2832.  -223, // B2 = -0.006825
  2833.  0, // B1 = 0.000000
  2834.  223, // B0 = 0.006825
  2835.  26342, // A1 = -1.607849
  2836.  -32686, // A2 = 0.997498
  2837.  6391, // B2 = 0.195053
  2838.  -5120, // B1 = -0.312531
  2839.  6391, // B0 = 0.195053
  2840.  26593, // A1 = -1.623108
  2841.  -32688, // A2 = 0.997559
  2842.  23681, // B2 = 0.722717
  2843.  -19328, // B1 = -1.179688
  2844.  23681, // B0 = 0.722717
  2845.  5, // Internal filter scaling
  2846.  159, // Minimum in-band energy threshold
  2847.  21, // 21/32 in-band to broad-band ratio
  2848.  0x0FF5 // shift-mask 0x0FF (look at 16 half-frames) bit count = 5
  2849. },
  2850. { // 816.txt
  2851. 26168, // A1 = -1.597209
  2852.  -32528, // A2 = 0.992706
  2853.  -235, // B2 = -0.007182
  2854.  0, // B1 = 0.000000
  2855.  235, // B0 = 0.007182
  2856.  26092, // A1 = -1.592590
  2857.  -32675, // A2 = 0.997192
  2858.  20823, // B2 = 0.635498
  2859.  -16510, // B1 = -1.007751
  2860.  20823, // B0 = 0.635498
  2861.  26363, // A1 = -1.609070
  2862.  -32677, // A2 = 0.997253
  2863.  6739, // B2 = 0.205688
  2864.  -5459, // B1 = -0.333206
  2865.  6739, // B0 = 0.205688
  2866.  5, // Internal filter scaling
  2867.  159, // Minimum in-band energy threshold
  2868.  21, // 21/32 in-band to broad-band ratio
  2869.  0x0FF5 // shift-mask 0x0FF (look at 16 half-frames) bit count = 5
  2870. },
  2871. { // 850.txt
  2872. 25641, // A1 = -1.565063
  2873.  -32536, // A2 = 0.992950
  2874.  -121, // B2 = -0.003707
  2875.  0, // B1 = 0.000000
  2876.  121, // B0 = 0.003707
  2877.  25560, // A1 = -1.560059
  2878.  -32684, // A2 = 0.997437
  2879.  18341, // B2 = 0.559753
  2880.  -14252, // B1 = -0.869904
  2881.  18341, // B0 = 0.559753
  2882.  25837, // A1 = -1.577026
  2883.  -32684, // A2 = 0.997467
  2884.  16679, // B2 = 0.509003
  2885.  -13232, // B1 = -0.807648
  2886.  16679, // B0 = 0.509003
  2887.  5, // Internal filter scaling
  2888.  159, // Minimum in-band energy threshold
  2889.  21, // 21/32 in-band to broad-band ratio
  2890.  0x0FF5 // shift-mask 0x0FF (look at 16 half-frames) bit count = 5
  2891. },
  2892. { // f857_1645[]
  2893. 16415, // A1 = 1.001953
  2894.  -23669, // A2 = -0.722321
  2895.  -4549, // B2 = -0.138847
  2896.  0, // B1 = 0
  2897.  4549, // B0 = 0.138847
  2898.  8456, // A1 = 0.516174
  2899.  -28996, // A2 = -0.884918
  2900.  13753, // B2 = 0.419724
  2901.  -12, // B1 = -0.000763
  2902.  13757, // B0 = 0.419846
  2903.  24632, // A1 = 1.503418
  2904.  -30271, // A2 = -0.923828
  2905.  29070, // B2 = 0.887146
  2906.  -25265, // B1 = -1.542114
  2907.  29073, // B0 = 0.887268
  2908.  7, // Internal filter scaling
  2909.  159, // Minimum in-band energy threshold
  2910.  21, // 21/32 in-band to broad-band ratio
  2911.  0x0FF5 // shift-mask 0x0FF (look at 16 half-frames) bit count = 5
  2912. },
  2913. { // 900.txt
  2914. 24806, // A1 = -1.514099
  2915.  -32501, // A2 = 0.991852
  2916.  -326, // B2 = -0.009969
  2917.  0, // B1 = 0.000000
  2918.  326, // B0 = 0.009969
  2919.  24709, // A1 = -1.508118
  2920.  -32659, // A2 = 0.996674
  2921.  20277, // B2 = 0.618835
  2922.  -15182, // B1 = -0.926636
  2923.  20277, // B0 = 0.618835
  2924.  25022, // A1 = -1.527222
  2925.  -32661, // A2 = 0.996735
  2926.  4320, // B2 = 0.131836
  2927.  -3331, // B1 = -0.203339
  2928.  4320, // B0 = 0.131836
  2929.  5, // Internal filter scaling
  2930.  159, // Minimum in-band energy threshold
  2931.  21, // 21/32 in-band to broad-band ratio
  2932.  0x0FF5 // shift-mask 0x0FF (look at 16 half-frames) bit count = 5
  2933. },
  2934. { // f900_1300[]
  2935. 19776, // A1 = 1.207092
  2936.  -27437, // A2 = -0.837341
  2937.  -2666, // B2 = -0.081371
  2938.  0, // B1 = 0
  2939.  2666, // B0 = 0.081371
  2940.  16302, // A1 = 0.995026
  2941.  -30354, // A2 = -0.926361
  2942.  10389, // B2 = 0.317062
  2943.  -3327, // B1 = -0.203064
  2944.  10389, // B0 = 0.317062
  2945.  24299, // A1 = 1.483154
  2946.  -30930, // A2 = -0.943909
  2947.  25016, // B2 = 0.763428
  2948.  -21171, // B1 = -1.292236
  2949.  25016, // B0 = 0.763428
  2950.  7, // Internal filter scaling
  2951.  159, // Minimum in-band energy threshold
  2952.  21, // 21/32 in-band to broad-band ratio
  2953.  0x0FF5 // shift-mask 0x0FF (look at 16 half-frames) bit count = 5
  2954. },
  2955. { // f935_1215[]
  2956. 20554, // A1 = 1.254517
  2957.  -28764, // A2 = -0.877838
  2958.  -2048, // B2 = -0.062515
  2959.  0, // B1 = 0
  2960.  2048, // B0 = 0.062515
  2961.  18209, // A1 = 1.11145
  2962.  -30951, // A2 = -0.94458
  2963.  9390, // B2 = 0.286575
  2964.  -3955, // B1 = -0.241455
  2965.  9390, // B0 = 0.286575
  2966.  23902, // A1 = 1.458923
  2967.  -31286, // A2 = -0.954803
  2968.  23252, // B2 = 0.709595
  2969.  -19132, // B1 = -1.167725
  2970.  23252, // B0 = 0.709595
  2971.  7, // Internal filter scaling
  2972.  159, // Minimum in-band energy threshold
  2973.  21, // 21/32 in-band to broad-band ratio
  2974.  0x0FF5 // shift-mask 0x0FF (look at 16 half-frames) bit count = 5
  2975. },
  2976. { // f941_1477[]
  2977. 17543, // A1 = 1.07074
  2978.  -26220, // A2 = -0.800201
  2979.  -3298, // B2 = -0.100647
  2980.  0, // B1 = 0
  2981.  3298, // B0 = 0.100647
  2982.  12423, // A1 = 0.75827
  2983.  -30036, // A2 = -0.916626
  2984.  12651, // B2 = 0.386078
  2985.  -2444, // B1 = -0.14917
  2986.  12653, // B0 = 0.386154
  2987.  23518, // A1 = 1.435425
  2988.  -30745, // A2 = -0.938293
  2989.  27282, // B2 = 0.832581
  2990.  -22529, // B1 = -1.375122
  2991.  27286, // B0 = 0.832703
  2992.  7, // Internal filter scaling
  2993.  159, // Minimum in-band energy threshold
  2994.  21, // 21/32 in-band to broad-band ratio
  2995.  0x0FF5 // shift-mask 0x0FF (look at 16 half-frames) bit count = 5
  2996. },
  2997. { // 942.txt
  2998. 24104, // A1 = -1.471252
  2999.  -32507, // A2 = 0.992065
  3000.  -351, // B2 = -0.010722
  3001.  0, // B1 = 0.000000
  3002.  351, // B0 = 0.010722
  3003.  23996, // A1 = -1.464600
  3004.  -32671, // A2 = 0.997040
  3005.  22848, // B2 = 0.697266
  3006.  -16639, // B1 = -1.015564
  3007.  22848, // B0 = 0.697266
  3008.  24332, // A1 = -1.485168
  3009.  -32673, // A2 = 0.997101
  3010.  4906, // B2 = 0.149727
  3011.  -3672, // B1 = -0.224174
  3012.  4906, // B0 = 0.149727
  3013.  5, // Internal filter scaling
  3014.  159, // Minimum in-band energy threshold
  3015.  21, // 21/32 in-band to broad-band ratio
  3016.  0x0FF5 // shift-mask 0x0FF (look at 16 half-frames) bit count = 5
  3017. },
  3018. { // 950.txt
  3019. 23967, // A1 = -1.462830
  3020.  -32507, // A2 = 0.992065
  3021.  -518, // B2 = -0.015821
  3022.  0, // B1 = 0.000000
  3023.  518, // B0 = 0.015821
  3024.  23856, // A1 = -1.456055
  3025.  -32671, // A2 = 0.997040
  3026.  26287, // B2 = 0.802246
  3027.  -19031, // B1 = -1.161560
  3028.  26287, // B0 = 0.802246
  3029.  24195, // A1 = -1.476746
  3030.  -32673, // A2 = 0.997101
  3031.  2890, // B2 = 0.088196
  3032.  -2151, // B1 = -0.131317
  3033.  2890, // B0 = 0.088196
  3034.  5, // Internal filter scaling
  3035.  159, // Minimum in-band energy threshold
  3036.  21, // 21/32 in-band to broad-band ratio
  3037.  0x0FF5 // shift-mask 0x0FF (look at 16 half-frames) bit count = 5
  3038. },
  3039. { // f950_1400[]
  3040. 18294, // A1 = 1.116638
  3041.  -26962, // A2 = -0.822845
  3042.  -2914, // B2 = -0.088936
  3043.  0, // B1 = 0
  3044.  2914, // B0 = 0.088936
  3045.  14119, // A1 = 0.861786
  3046.  -30227, // A2 = -0.922455
  3047.  11466, // B2 = 0.349945
  3048.  -2833, // B1 = -0.172943
  3049.  11466, // B0 = 0.349945
  3050.  23431, // A1 = 1.430115
  3051.  -30828, // A2 = -0.940796
  3052.  25331, // B2 = 0.773071
  3053.  -20911, // B1 = -1.276367
  3054.  25331, // B0 = 0.773071
  3055.  7, // Internal filter scaling
  3056.  159, // Minimum in-band energy threshold
  3057.  21, // 21/32 in-band to broad-band ratio
  3058.  0x0FF5 // shift-mask 0x0FF (look at 16 half-frames) bit count = 5
  3059. },
  3060. { // 975.txt
  3061. 23521, // A1 = -1.435608
  3062.  -32489, // A2 = 0.991516
  3063.  -193, // B2 = -0.005915
  3064.  0, // B1 = 0.000000
  3065.  193, // B0 = 0.005915
  3066.  23404, // A1 = -1.428467
  3067.  -32655, // A2 = 0.996582
  3068.  17740, // B2 = 0.541412
  3069.  -12567, // B1 = -0.767029
  3070.  17740, // B0 = 0.541412
  3071.  23753, // A1 = -1.449829
  3072.  -32657, // A2 = 0.996613
  3073.  9090, // B2 = 0.277405
  3074.  -6662, // B1 = -0.406647
  3075.  9090, // B0 = 0.277405
  3076.  5, // Internal filter scaling
  3077.  159, // Minimum in-band energy threshold
  3078.  21, // 21/32 in-band to broad-band ratio
  3079.  0x0FF5 // shift-mask 0x0FF (look at 16 half-frames) bit count = 5
  3080. },
  3081. { // 1000.txt
  3082. 23071, // A1 = -1.408203
  3083.  -32489, // A2 = 0.991516
  3084.  -293, // B2 = -0.008965
  3085.  0, // B1 = 0.000000
  3086.  293, // B0 = 0.008965
  3087.  22951, // A1 = -1.400818
  3088.  -32655, // A2 = 0.996582
  3089.  5689, // B2 = 0.173645
  3090.  -3951, // B1 = -0.241150
  3091.  5689, // B0 = 0.173645
  3092.  23307, // A1 = -1.422607
  3093.  -32657, // A2 = 0.996613
  3094.  18692, // B2 = 0.570435
  3095.  -13447, // B1 = -0.820770
  3096.  18692, // B0 = 0.570435
  3097.  5, // Internal filter scaling
  3098.  159, // Minimum in-band energy threshold
  3099.  21, // 21/32 in-band to broad-band ratio
  3100.  0x0FF5 // shift-mask 0x0FF (look at 16 half-frames) bit count = 5
  3101. },
  3102. { // 1020.txt
  3103. 22701, // A1 = -1.385620
  3104.  -32474, // A2 = 0.991058
  3105.  -292, // B2 = -0.008933
  3106.  0, //163840      , // B1 = 10.000000
  3107.  292, // B0 = 0.008933
  3108.  22564, // A1 = -1.377258
  3109.  -32655, // A2 = 0.996552
  3110.  20756, // B2 = 0.633423
  3111.  -14176, // B1 = -0.865295
  3112.  20756, // B0 = 0.633423
  3113.  22960, // A1 = -1.401428
  3114.  -32657, // A2 = 0.996613
  3115.  6520, // B2 = 0.198990
  3116.  -4619, // B1 = -0.281937
  3117.  6520, // B0 = 0.198990
  3118.  5, // Internal filter scaling
  3119.  159, // Minimum in-band energy threshold
  3120.  21, // 21/32 in-band to broad-band ratio
  3121.  0x0FF5 // shift-mask 0x0FF (look at 16 half-frames) bit count = 5
  3122. },
  3123. { // 1050.txt
  3124. 22142, // A1 = -1.351501
  3125.  -32474, // A2 = 0.991058
  3126.  -147, // B2 = -0.004493
  3127.  0, // B1 = 0.000000
  3128.  147, // B0 = 0.004493
  3129.  22000, // A1 = -1.342834
  3130.  -32655, // A2 = 0.996552
  3131.  15379, // B2 = 0.469360
  3132.  -10237, // B1 = -0.624847
  3133.  15379, // B0 = 0.469360
  3134.  22406, // A1 = -1.367554
  3135.  -32657, // A2 = 0.996613
  3136.  17491, // B2 = 0.533783
  3137.  -12096, // B1 = -0.738312
  3138.  17491, // B0 = 0.533783
  3139.  5, // Internal filter scaling
  3140.  159, // Minimum in-band energy threshold
  3141.  21, // 21/32 in-band to broad-band ratio
  3142.  0x0FF5 // shift-mask 0x0FF (look at 16 half-frames) bit count = 5
  3143. },
  3144. { // f1100_1750[]
  3145. 12973, // A1 = 0.79184
  3146.  -24916, // A2 = -0.760376
  3147.  6655, // B2 = 0.203102
  3148.  367, // B1 = 0.0224
  3149.  6657, // B0 = 0.203171
  3150.  5915, // A1 = 0.361053
  3151.  -29560, // A2 = -0.90213
  3152.  -7777, // B2 = -0.23735
  3153.  0, // B1 = 0
  3154.  7777, // B0 = 0.23735
  3155.  20510, // A1 = 1.251892
  3156.  -30260, // A2 = -0.923462
  3157.  26662, // B2 = 0.81366
  3158.  -20573, // B1 = -1.255737
  3159.  26668, // B0 = 0.813843
  3160.  7, // Internal filter scaling
  3161.  159, // Minimum in-band energy threshold
  3162.  21, // 21/32 in-band to broad-band ratio
  3163.  0x0FF5 // shift-mask 0x0FF (look at 16 half-frames) bit count = 5
  3164. },
  3165. { // 1140.txt
  3166. 20392, // A1 = -1.244629
  3167.  -32460, // A2 = 0.990601
  3168.  -270, // B2 = -0.008240
  3169.  0, // B1 = 0.000000
  3170.  270, // B0 = 0.008240
  3171.  20218, // A1 = -1.234009
  3172.  -32655, // A2 = 0.996582
  3173.  21337, // B2 = 0.651154
  3174.  -13044, // B1 = -0.796143
  3175.  21337, // B0 = 0.651154
  3176.  20684, // A1 = -1.262512
  3177.  -32657, // A2 = 0.996643
  3178.  8572, // B2 = 0.261612
  3179.  -5476, // B1 = -0.334244
  3180.  8572, // B0 = 0.261612
  3181.  5, // Internal filter scaling
  3182.  159, // Minimum in-band energy threshold
  3183.  21, // 21/32 in-band to broad-band ratio
  3184.  0x0FF5 // shift-mask 0x0FF (look at 16 half-frames) bit count = 5
  3185. },
  3186. { // 1200.txt
  3187. 19159, // A1 = -1.169373
  3188.  -32456, // A2 = 0.990509
  3189.  -335, // B2 = -0.010252
  3190.  0, // B1 = 0.000000
  3191.  335, // B0 = 0.010252
  3192.  18966, // A1 = -1.157593
  3193.  -32661, // A2 = 0.996735
  3194.  6802, // B2 = 0.207588
  3195.  -3900, // B1 = -0.238098
  3196.  6802, // B0 = 0.207588
  3197.  19467, // A1 = -1.188232
  3198.  -32661, // A2 = 0.996765
  3199.  25035, // B2 = 0.764008
  3200.  -15049, // B1 = -0.918579
  3201.  25035, // B0 = 0.764008
  3202.  5, // Internal filter scaling
  3203.  159, // Minimum in-band energy threshold
  3204.  21, // 21/32 in-band to broad-band ratio
  3205.  0x0FF5 // shift-mask 0x0FF (look at 16 half-frames) bit count = 5
  3206. },
  3207. { // 1209.txt
  3208. 18976, // A1 = -1.158264
  3209.  -32439, // A2 = 0.989990
  3210.  -183, // B2 = -0.005588
  3211.  0, // B1 = 0.000000
  3212.  183, // B0 = 0.005588
  3213.  18774, // A1 = -1.145874
  3214.  -32650, // A2 = 0.996429
  3215.  15468, // B2 = 0.472076
  3216.  -8768, // B1 = -0.535217
  3217.  15468, // B0 = 0.472076
  3218.  19300, // A1 = -1.177979
  3219.  -32652, // A2 = 0.996490
  3220.  19840, // B2 = 0.605499
  3221.  -11842, // B1 = -0.722809
  3222.  19840, // B0 = 0.605499
  3223.  5, // Internal filter scaling
  3224.  159, // Minimum in-band energy threshold
  3225.  21, // 21/32 in-band to broad-band ratio
  3226.  0x0FF5 // shift-mask 0x0FF (look at 16 half-frames) bit count = 5
  3227. },
  3228. { // 1330.txt
  3229. 16357, // A1 = -0.998413
  3230.  -32368, // A2 = 0.987793
  3231.  -217, // B2 = -0.006652
  3232.  0, // B1 = 0.000000
  3233.  217, // B0 = 0.006652
  3234.  16107, // A1 = -0.983126
  3235.  -32601, // A2 = 0.994904
  3236.  11602, // B2 = 0.354065
  3237.  -5555, // B1 = -0.339111
  3238.  11602, // B0 = 0.354065
  3239.  16722, // A1 = -1.020630
  3240.  -32603, // A2 = 0.994965
  3241.  15574, // B2 = 0.475311
  3242.  -8176, // B1 = -0.499069
  3243.  15574, // B0 = 0.475311
  3244.  5, // Internal filter scaling
  3245.  159, // Minimum in-band energy threshold
  3246.  21, // 21/32 in-band to broad-band ratio
  3247.  0x0FF5 // shift-mask 0x0FF (look at 16 half-frames) bit count = 5
  3248. },
  3249. { // 1336.txt
  3250. 16234, // A1 = -0.990875
  3251.  32404, // A2 = -0.988922
  3252.  -193, // B2 = -0.005908
  3253.  0, // B1 = 0.000000
  3254.  193, // B0 = 0.005908
  3255.  15986, // A1 = -0.975769
  3256.  -32632, // A2 = 0.995880
  3257.  18051, // B2 = 0.550903
  3258.  -8658, // B1 = -0.528473
  3259.  18051, // B0 = 0.550903
  3260.  16591, // A1 = -1.012695
  3261.  -32634, // A2 = 0.995941
  3262.  15736, // B2 = 0.480240
  3263.  -8125, // B1 = -0.495926
  3264.  15736, // B0 = 0.480240
  3265.  5, // Internal filter scaling
  3266.  159, // Minimum in-band energy threshold
  3267.  21, // 21/32 in-band to broad-band ratio
  3268.  0x0FF5 // shift-mask 0x0FF (look at 16 half-frames) bit count = 5
  3269. },
  3270. { // 1366.txt
  3271. 15564, // A1 = -0.949982
  3272.  -32404, // A2 = 0.988922
  3273.  -269, // B2 = -0.008216
  3274.  0, // B1 = 0.000000
  3275.  269, // B0 = 0.008216
  3276.  15310, // A1 = -0.934479
  3277.  -32632, // A2 = 0.995880
  3278.  10815, // B2 = 0.330063
  3279.  -4962, // B1 = -0.302887
  3280.  10815, // B0 = 0.330063
  3281.  15924, // A1 = -0.971924
  3282.  -32634, // A2 = 0.995941
  3283.  18880, // B2 = 0.576172
  3284.  -9364, // B1 = -0.571594
  3285.  18880, // B0 = 0.576172
  3286.  5, // Internal filter scaling
  3287.  159, // Minimum in-band energy threshold
  3288.  21, // 21/32 in-band to broad-band ratio
  3289.  0x0FF5 // shift-mask 0x0FF (look at 16 half-frames) bit count = 5
  3290. },
  3291. { // 1380.txt
  3292. 15247, // A1 = -0.930603
  3293.  -32397, // A2 = 0.988708
  3294.  -244, // B2 = -0.007451
  3295.  0, // B1 = 0.000000
  3296.  244, // B0 = 0.007451
  3297.  14989, // A1 = -0.914886
  3298.  -32627, // A2 = 0.995697
  3299.  18961, // B2 = 0.578644
  3300.  -8498, // B1 = -0.518707
  3301.  18961, // B0 = 0.578644
  3302.  15608, // A1 = -0.952667
  3303.  -32628, // A2 = 0.995758
  3304.  11145, // B2 = 0.340134
  3305.  -5430, // B1 = -0.331467
  3306.  11145, // B0 = 0.340134
  3307.  5, // Internal filter scaling
  3308.  159, // Minimum in-band energy threshold
  3309.  21, // 21/32 in-band to broad-band ratio
  3310.  0x0FF5 // shift-mask 0x0FF (look at 16 half-frames) bit count = 5
  3311. },
  3312. { // 1400.txt
  3313. 14780, // A1 = -0.902130
  3314.  -32393, // A2 = 0.988586
  3315.  -396, // B2 = -0.012086
  3316.  0, // B1 = 0.000000
  3317.  396, // B0 = 0.012086
  3318.  14510, // A1 = -0.885651
  3319.  -32630, // A2 = 0.995819
  3320.  6326, // B2 = 0.193069
  3321.  -2747, // B1 = -0.167671
  3322.  6326, // B0 = 0.193069
  3323.  15154, // A1 = -0.924957
  3324.  -32632, // A2 = 0.995850
  3325.  23235, // B2 = 0.709076
  3326.  -10983, // B1 = -0.670380
  3327.  23235, // B0 = 0.709076
  3328.  5, // Internal filter scaling
  3329.  159, // Minimum in-band energy threshold
  3330.  21, // 21/32 in-band to broad-band ratio
  3331.  0x0FF5 // shift-mask 0x0FF (look at 16 half-frames) bit count = 5
  3332. },
  3333. { // 1477.txt
  3334. 13005, // A1 = -0.793793
  3335.  -32368, // A2 = 0.987823
  3336.  -500, // B2 = -0.015265
  3337.  0, // B1 = 0.000000
  3338.  500, // B0 = 0.015265
  3339.  12708, // A1 = -0.775665
  3340.  -32615, // A2 = 0.995331
  3341.  11420, // B2 = 0.348526
  3342.  -4306, // B1 = -0.262833
  3343.  11420, // B0 = 0.348526
  3344.  13397, // A1 = -0.817688
  3345.  -32615, // A2 = 0.995361
  3346.  9454, // B2 = 0.288528
  3347.  -3981, // B1 = -0.243027
  3348.  9454, // B0 = 0.288528
  3349.  5, // Internal filter scaling
  3350.  159, // Minimum in-band energy threshold
  3351.  21, // 21/32 in-band to broad-band ratio
  3352.  0x0FF5 // shift-mask 0x0FF (look at 16 half-frames) bit count = 5
  3353. },
  3354. { // 1600.txt
  3355. 10046, // A1 = -0.613190
  3356.  -32331, // A2 = 0.986694
  3357.  -455, // B2 = -0.013915
  3358.  0, // B1 = 0.000000
  3359.  455, // B0 = 0.013915
  3360.  9694, // A1 = -0.591705
  3361.  -32601, // A2 = 0.994934
  3362.  6023, // B2 = 0.183815
  3363.  -1708, // B1 = -0.104279
  3364.  6023, // B0 = 0.183815
  3365.  10478, // A1 = -0.639587
  3366.  -32603, // A2 = 0.994965
  3367.  22031, // B2 = 0.672333
  3368.  -7342, // B1 = -0.448151
  3369.  22031, // B0 = 0.672333
  3370.  5, // Internal filter scaling
  3371.  159, // Minimum in-band energy threshold
  3372.  21, // 21/32 in-band to broad-band ratio
  3373.  0x0FF5 // shift-mask 0x0FF (look at 16 half-frames) bit count = 5
  3374. },
  3375. { // f1633_1638[]
  3376. 9181, // A1 = 0.560394
  3377.  -32256, // A2 = -0.984375
  3378.  -556, // B2 = -0.016975
  3379.  0, // B1 = 0
  3380.  556, // B0 = 0.016975
  3381.  8757, // A1 = 0.534515
  3382.  -32574, // A2 = -0.99408
  3383.  8443, // B2 = 0.25769
  3384.  -2135, // B1 = -0.130341
  3385.  8443, // B0 = 0.25769
  3386.  9691, // A1 = 0.591522
  3387.  -32574, // A2 = -0.99411
  3388.  15446, // B2 = 0.471375
  3389.  -4809, // B1 = -0.293579
  3390.  15446, // B0 = 0.471375
  3391.  7, // Internal filter scaling
  3392.  159, // Minimum in-band energy threshold
  3393.  21, // 21/32 in-band to broad-band ratio
  3394.  0x0FF5 // shift-mask 0x0FF (look at 16 half-frames) bit count = 5
  3395. },
  3396. { // 1800.txt
  3397. 5076, // A1 = -0.309875
  3398.  -32304, // A2 = 0.985840
  3399.  -508, // B2 = -0.015503
  3400.  0, // B1 = 0.000000
  3401.  508, // B0 = 0.015503
  3402.  4646, // A1 = -0.283600
  3403.  -32605, // A2 = 0.995026
  3404.  6742, // B2 = 0.205780
  3405.  -878, // B1 = -0.053635
  3406.  6742, // B0 = 0.205780
  3407.  5552, // A1 = -0.338928
  3408.  -32605, // A2 = 0.995056
  3409.  23667, // B2 = 0.722260
  3410.  -4297, // B1 = -0.262329
  3411.  23667, // B0 = 0.722260
  3412.  5, // Internal filter scaling
  3413.  159, // Minimum in-band energy threshold
  3414.  21, // 21/32 in-band to broad-band ratio
  3415.  0x0FF5 // shift-mask 0x0FF (look at 16 half-frames) bit count = 5
  3416. },
  3417. { // 1860.txt
  3418. 3569, // A1 = -0.217865
  3419.  -32292, // A2 = 0.985504
  3420.  -239, // B2 = -0.007322
  3421.  0, // B1 = 0.000000
  3422.  239, // B0 = 0.007322
  3423.  3117, // A1 = -0.190277
  3424.  -32603, // A2 = 0.994965
  3425.  18658, // B2 = 0.569427
  3426.  -1557, // B1 = -0.095032
  3427.  18658, // B0 = 0.569427
  3428.  4054, // A1 = -0.247437
  3429.  -32603, // A2 = 0.994965
  3430.  18886, // B2 = 0.576385
  3431.  -2566, // B1 = -0.156647
  3432.  18886, // B0 = 0.576385
  3433.  5, // Internal filter scaling
  3434.  159, // Minimum in-band energy threshold
  3435.  21, // 21/32 in-band to broad-band ratio
  3436.  0x0FF5 // shift-mask 0x0FF (look at 16 half-frames) bit count = 5
  3437. },};
  3438. static int ixj_init_filter(int board, IXJ_FILTER * jf)
  3439. {
  3440. unsigned short cmd;
  3441. int cnt, max;
  3442. IXJ *j = &ixj[board];
  3443. if (jf->filter > 3) {
  3444. return -1;
  3445. }
  3446. if (ixj_WriteDSPCommand(0x5154 + jf->filter, board)) // Select Filter
  3447. return -1;
  3448. if (!jf->enable) {
  3449. if (ixj_WriteDSPCommand(0x5152, board)) // Disable Filter
  3450. return -1;
  3451. else
  3452. return 0;
  3453. } else {
  3454. if (ixj_WriteDSPCommand(0x5153, board)) // Enable Filter
  3455. return -1;
  3456. // Select the filter (f0 - f3) to use.
  3457. if (ixj_WriteDSPCommand(0x5154 + jf->filter, board))
  3458. return -1;
  3459. }
  3460. if (jf->freq < 12 && jf->freq > 3) {
  3461. // Select the frequency for the selected filter.
  3462. if (ixj_WriteDSPCommand(0x5170 + jf->freq, board))
  3463. return -1;
  3464. } else if (jf->freq > 11) {
  3465. // We need to load a programmable filter set for undefined
  3466. // frequencies.  So we will point the filter to a programmable set.
  3467. // Since there are only 4 filters and 4 programmable sets, we will
  3468. // just point the filter to the same number set and program it for the
  3469. // frequency we want.
  3470. if (ixj_WriteDSPCommand(0x5170 + jf->filter, board))
  3471. return -1;
  3472. if (j->ver.low != 0x12) {
  3473. cmd = 0x515B;
  3474. max = 19;
  3475. } else {
  3476. cmd = 0x515E;
  3477. max = 15;
  3478. }
  3479. if (ixj_WriteDSPCommand(cmd, board))
  3480. return -1;
  3481. for (cnt = 0; cnt < max; cnt++) {
  3482. if (ixj_WriteDSPCommand(tone_table[jf->freq][cnt], board))
  3483. return -1;
  3484. }
  3485. /*    if(j->ver.low != 0x12)
  3486.    {
  3487.    if(ixj_WriteDSPCommand(7, board))
  3488.    return -1;
  3489.    if(ixj_WriteDSPCommand(159, board))
  3490.    return -1;
  3491.    if(ixj_WriteDSPCommand(21, board))
  3492.    return -1;
  3493.    if(ixj_WriteDSPCommand(0x0FF5, board))
  3494.    return -1;
  3495.    } */
  3496. }
  3497. return 0;
  3498. }
  3499. static int ixj_init_tone(int board, IXJ_TONE * ti)
  3500. {
  3501. int freq0, freq1;
  3502. unsigned short data;
  3503. if (ti->freq0) {
  3504. freq0 = ti->freq0;
  3505. } else {
  3506. freq0 = 0x7FFF;
  3507. }
  3508. if (ti->freq1) {
  3509. freq1 = ti->freq1;
  3510. } else {
  3511. freq1 = 0x7FFF;
  3512. }
  3513. //  if(ti->tone_index > 12 && ti->tone_index < 28)
  3514. {
  3515. if (ixj_WriteDSPCommand(0x6800 + ti->tone_index, board))
  3516. return -1;
  3517. if (ixj_WriteDSPCommand(0x6000 + (ti->gain0 << 4) + ti->gain1, board))
  3518. return -1;
  3519. data = freq0;
  3520. if (ixj_WriteDSPCommand(data, board))
  3521. return -1;
  3522. data = freq1;
  3523. if (ixj_WriteDSPCommand(data, board))
  3524. return -1;
  3525. }
  3526. return freq0;
  3527. }