[ifxmips]
[openwrt/svn-archive/archive.git] / package / lqtapi / src / mps / vmmc.c
1 static uint32_t magic_init[] = {
2 /* ALI INIT */
3 /*0x0601210c, 0x88002000, 0x20000000, 0x00000000, 0xffffffff,*/
4 /* COD_CHAN_SPEECH_ECMD */
5 /*0x06016110, 0x2462f700, 0x20002000, 0x00000000, 0x00000000, 0xffffffff,*/
6 /* COD_DEC_STAT_ECMD */
7 /*0x06017504, 0x00c00000, 0xffffffff,*/
8 /* COD_JB_CONF_ECMD */
9 /*0x06017208, 0x16410050, 0x005005a0, 0xffffffff,*/
10 /* SIG_RTP_SUP */
11 /*0x0601500c, 0x00000000, 0x00000060, 0x0712007f, 0xffffffff,*/
12 /* SIG_CHAN */
13 /*0x06014104, 0xc0190000, 0xffffffff,*/
14 /* SIG_CIDS_CTRL_ECMD */
15 /*0x06014204, 0x3811e000, 0xffffffff, */
16 /* SIG_DTMFATG_DATA */
17 /*0x06014b04, 0x00010000, 0xffffffff,*/
18 /* SIG_DTMFATG_CTRL */
19 /*0x06014304, 0x6a110000, 0xffffffff,
20 0x0601cc04, 0xe21c2000, 0xffffffff,
21 0x06014404, 0xb0110000, 0xffffffff,
22 0x06014a04, 0x04510000, 0xffffffff,
23 0x06014604, 0x04560000, 0xffffffff,
24 0x06014104, 0xc0190000, 0xffffffff,*/
25 /* COD_CHAN_RTP_SUP_CFG_USD */
26 /*0x06017124, 0x00000000, 0x00008880, 0xe3e4e5e6, 0x72727272, 0x72727272,
27 0x0f7f1261, 0x7374097f, 0xf1f06767, 0x04047675, 0xffffffff,*/
28 /* COD_CHAN_RTP_SUP_CFG_DS */
29 /* 0x06017920, 0x08006364, 0x65667272, 0x72727272, 0x72720f7f, 0x12617374,
30 0x097f7170, 0x67670404, 0x76750000, 0xffffffff, */
31 /* OPMODE_CMD */
32 0x01010004, 0x00010000, 0xffffffff,
33 0x01000004, 0x00030000, 0xffffffff,
34 /*0x01010004, 0x00010000, 0xffffffff,*/
35 /* COD_CHAN_RTP_SUP_CFG_US */
36 /* 0x06017124, 0x00000000, 0x00008880, 0xe3e4e5e6, 0x72727272, 0x72727272,
37 0x0f7f1261, 0x7374097f, 0xf1f06767, 0x04047675, 0xffffffff, */
38 /* COD_CHAN_RTP_SUP_CFG_DS */
39 /* 0x06017920, 0x08006364, 0x65667272, 0x72727272, 0x72720f7f, 0x12617374,
40 0x097f7170, 0x67670404, 0x76750000, 0xffffffff, */
41 /* COD_JB_CONF */
42 /* 0x06017208, 0x16410050, 0x005005a0, 0xffffffff, */
43 /* COD_CHAN_RTP_SUP_CFG_US */
44 /*0x06017108, 0x00000000, 0x00008880, 0xffffffff,*/
45 /* COD_CHAN_RTP_TIMESTAMP */
46 /*0x06017004, 0x00000000, 0xffffffff,*/
47 /* SIG_RTP_SUP */
48 /* 0x0601500c, 0x00000000, 0x00000062, 0x0712007f, 0xffffffff,*/
49 /* SIG_DTMFR_CTRL */
50 /*0x06014404, 0xb0010000, 0xffffffff,*/
51 /* COD_CHAN_SPEECH */
52 /* 0x06016110, 0x0462d600, 0x20002000, 0x00000000, 0x00000000, 0xffffffff, */
53 /* ALI_CHAN */
54 0x0601210c, 0x88232000, 0x20000000, 0x00000000, 0xffffffff,
55 /* SIG_CHAN */
56 /*0x06014104, 0xc5190000, 0xffffffff,*/
57 /* SIG_DTMFR_CTRL_ECMD */
58 /*0x06014404, 0x30010000, 0xffffffff,*/
59 /* SIG_CHAN_ECMD */
60 /*0x06014104, 0x45190000, 0xffffffff,*/
61 };
62
63 static void setup_alm(struct mps *mps, int chan)
64 {
65 uint32_t *data = magic_init;
66 int size, i;
67
68 /* data[0] = ALI_CHAN_DATA1(1, 0, 0, 1, 1, 0, 0);
69 data[1] = ALI_CHAN_DATA2(0, 0, 0);
70 data[2] = ALI_CHAN_DATA3(0, 0);*/
71
72 size = 1;
73 for (i = 1; i < ARRAY_SIZE(magic_init); ++i) {
74 if (magic_init[i] == 0xffffffff) {
75
76 printk("cmd: %x\n", *data);
77 VMMC_FIFO_fifo_in(&mps->mbox_cmd.downstream, data, size);
78 size = 0;
79 data = &magic_init[i+1];
80 mdelay(500);
81 } else {
82 size += 1;
83 }
84 }
85
86
87 /* VMMC_FIFO_mailbox_command_write(&mps->mbox_cmd, MPS_CMD_ALI(chan), data);*/
88 }
89
90