Author Topic: Chrontel CH7024 Information and drivers For TV-Out  (Read 19920 times)

yefeng

  • Posts: 33
Re: Chrontel CH7024 Information and drivers For TV-Out
« Reply #40 on: April 17, 2010, 07:06:22 am »
Latest source:
Bootloader(2010.03.02) , Linux Kernel(2010.03.04) , Root(2010.03.04), and Multimedia software source code(eg:mplayer,jpeg-lib)can be found at :
http://www.ingenic.cn/pfWebplus/productServ/kfyd/linux/pfFixedPage.aspx
 :)

kswildside

  • Guest
Re: Chrontel CH7024 Information and drivers For TV-Out
« Reply #41 on: April 17, 2010, 06:08:12 pm »
Thanks Yefeng  for the info it's links are already posted ;)

yefeng

  • Posts: 33
Re: Chrontel CH7024 Information and drivers For TV-Out
« Reply #42 on: April 18, 2010, 04:34:29 am »
 :) I'm very sorry,before I posted it I didn't notice that

mth

  • Posts: 317
Re: Chrontel CH7024 Information and drivers For TV-Out
« Reply #43 on: April 19, 2010, 07:22:22 pm »
I configured the kernel to use the i2c-gpio driver, which is a software implementation of I2C. This uses the same pins as the jz_i2c driver, so don't try to enable both at the same time.

Now the Chrontel chip (0x76) shows up, in addition to 3 others (or 2 others if 0x10/0x11 is 1 chip):

/ # i2cdetect -l
i2c-0   i2c             i2c-gpio-1                              I2C adapter
/ # i2cdetect i2c-gpio-1
WARNING! This program can confuse your I2C bus, cause data loss and worse!
I will probe file /dev/i2c-0.
I will probe address range 0x03-0x77.
Continue? [Y/n]
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: 10 11 -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: 60 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- 76 --                         

The GPIO pins to be used for I2C have to be declared in a data structure by the board initialization code. See the end of this commit for details.

psycho

  • Guest
Re: Chrontel CH7024 Information and drivers For TV-Out
« Reply #44 on: April 19, 2010, 07:43:35 pm »
Alright! Now when actually reading/writing to the part, the 0x76 will be shifted 1 bit left ((0x76 << 1) | RW). But you probably already know that  ;)

I opened my dingoo yesterday and I noticed a few other chips but I didn't actually look at them. I bet one of them has to do with audio and it is probably I2C controlled. But I didn't pay attention enough to notice what else would be on the bus - not that it matters very much for the TV Out, I would think.

mth

  • Posts: 317
Re: Chrontel CH7024 Information and drivers For TV-Out
« Reply #45 on: April 20, 2010, 10:38:11 am »
Actually I had no idea of how I2C worked before yesterday. Linux takes care of the low-level I/O, but it's still good to know what is going on for debugging and to be able to read data sheets.

I integrated the jz_i2c driver from OpenInkpot; thanks to Lars-Peter for the tip. When running i2cdetect in its default mode, I get the same results as SiENcE. But when adding the "-r" option I see only 0x10, 0x60 and 0x76 listed as devices (not 0x11), which looks a lot more believable.

However, I only see 0xFF being read from the device at 0x76 when using i2cdump or i2cget. I even tried writing 0 to register 2 (register bank switch), but that didn't help.

psycho

  • Guest
Re: Chrontel CH7024 Information and drivers For TV-Out
« Reply #46 on: April 20, 2010, 01:37:00 pm »
If you are reading only 0xFF's, that means the reads are not done correctly - the device is not responding - you are simply reading the logic 1's produced by the pullup resistors...

I will do a little bit of digging and get back to you.

psycho

  • Guest
Re: Chrontel CH7024 Information and drivers For TV-Out
« Reply #47 on: April 20, 2010, 08:49:04 pm »
The alignment is screwed up but...

Code: [Select]
Index   Time   Hex   Bin   Dec   ASCII
0 0.0ns START
1 393.6s 0xec 0b00001100 236
2 442.8s ACK
3 837.6s 0x03 0b00000011 3
4 886.8s ACK
5 1.28ms 0x00 0b00000000 0
6 1.33ms ACK
7 1.41ms STOP
8 1.69ms START
9 2.09ms 0xec 0b00001100 236
10 2.14ms ACK
11 2.53ms 0x03 0b00000011 3
12 2.58ms ACK
13 2.97ms 0x03 0b00000011 3
14 3.02ms ACK
15 3.1ms STOP
16 3.38ms START
17 3.78ms 0xec 0b00001100 236
18 3.83ms ACK
19 4.22ms 0x00 0b00000000 0
20 4.27ms ACK
21 4.35ms START
22 4.75ms 0xed 0b00001101 237
23 4.8ms ACK
24 5.19ms 0x45 0b00000101 69 E
25 5.24ms NACK
26 5.32ms STOP
27 5.55ms START
28 5.95ms 0xec 0b00001100 236
29 6.0ms ACK
30 6.39ms 0x0b 0b00001011 11
31 6.44ms ACK
32 6.83ms 0x03 0b00000011 3
33 6.88ms ACK
34 6.96ms STOP
35 7.24ms START
36 7.64ms 0xec 0b00001100 236
37 7.69ms ACK
38 8.08ms 0x00 0b00000000 0
39 8.13ms ACK
40 8.21ms START
41 8.61ms 0xed 0b00001101 237
42 8.66ms ACK
43 9.05ms 0x45 0b00000101 69 E
44 9.1ms NACK
45 9.18ms STOP
46 9.41ms START
47 9.81ms 0xec 0b00001100 236
48 9.86ms ACK
49 10.25ms 0x04 0b00000100 4
50 10.3ms ACK
51 10.7ms 0x0c 0b00001100 12
52 10.75ms ACK
53 10.82ms STOP
54 11.11ms START
55 11.5ms 0xec 0b00001100 236
56 11.55ms ACK
57 11.94ms 0x0a 0b00001010 10
58 11.99ms ACK
59 12.39ms 0x13 0b00000011 19
60 12.44ms ACK
61 12.51ms STOP
62 12.8ms START
63 13.19ms 0xec 0b00001100 236
64 13.24ms ACK
65 13.64ms 0x0b 0b00001011 11
66 13.68ms ACK
67 14.08ms 0x03 0b00000011 3
68 14.13ms ACK
69 14.21ms STOP
70 14.49ms START
71 14.88ms 0xec 0b00001100 236
72 14.93ms ACK
73 15.33ms 0x0c 0b00001100 12
74 15.38ms ACK
75 15.77ms 0x00 0b00000000 0
76 15.82ms ACK
77 15.9ms STOP
78 16.18ms START
79 16.57ms 0xec 0b00001100 236
80 16.62ms ACK
81 17.02ms 0x0d 0b00001101 13
82 17.07ms ACK
83 17.46ms 0x03 0b00000011 3
84 17.51ms ACK
85 17.59ms STOP
86 17.87ms START
87 18.27ms 0xec 0b00001100 236
88 18.32ms ACK
89 18.71ms 0x0e 0b00001110 14
90 18.76ms ACK
91 19.15ms 0x00 0b00000000 0
92 19.2ms ACK
93 19.28ms STOP
94 19.56ms START
95 19.96ms 0xec 0b00001100 236
96 20.01ms ACK
97 20.4ms 0x0f 0b00001111 15
98 20.45ms ACK
99 20.85ms 0x00 0b00000000 0
100 20.9ms ACK
101 20.97ms STOP
102 21.26ms START
103 21.65ms 0xec 0b00001100 236
104 21.7ms ACK
105 22.09ms 0x11 0b00000001 17
106 22.14ms ACK
107 22.54ms 0x19 0b00001001 25
108 22.59ms ACK
109 22.66ms STOP
110 22.95ms START
111 23.34ms 0xec 0b00001100 236
112 23.39ms ACK
113 23.79ms 0x12 0b00000010 18
114 23.84ms ACK
115 24.23ms 0x40 0b00000000 64 @
116 24.28ms ACK
117 24.36ms STOP
118 24.64ms START
119 25.03ms 0xec 0b00001100 236
120 25.08ms ACK
121 25.48ms 0x13 0b00000011 19
122 25.53ms ACK
123 25.92ms 0x6c 0b00001100 108 l
124 25.97ms ACK
125 26.05ms STOP
126 26.33ms START
127 26.73ms 0xec 0b00001100 236
128 26.78ms ACK
129 27.17ms 0x17 0b00000111 23
130 27.22ms ACK
131 27.61ms 0x04 0b00000100 4
132 27.66ms ACK
133 27.74ms STOP
134 28.02ms START
135 28.42ms 0xec 0b00001100 236
136 28.47ms ACK
137 28.86ms 0x18 0b00001000 24
138 28.91ms ACK
139 29.31ms 0xf0 0b00000000 240
140 29.36ms ACK
141 29.43ms STOP
142 29.72ms START
143 30.11ms 0xec 0b00001100 236
144 30.16ms ACK
145 30.55ms 0x19 0b00001001 25
146 30.6ms ACK
147 31.0ms 0x12 0b00000010 18
148 31.05ms ACK
149 31.12ms STOP
150 31.41ms START
151 31.8ms 0xec 0b00001100 236
152 31.85ms ACK
153 32.25ms 0x1c 0b00001100 28
154 32.29ms ACK
155 32.69ms 0x80 0b00000000 128
156 32.74ms ACK
157 32.82ms STOP
158 33.1ms START
159 33.49ms 0xec 0b00001100 236
160 33.54ms ACK
161 33.94ms 0x28 0b00001000 40 (
162 33.99ms ACK
163 34.38ms 0x1d 0b00001101 29
164 34.43ms ACK
165 34.51ms STOP
166 34.79ms START
167 35.19ms 0xec 0b00001100 236
168 35.23ms ACK
169 35.63ms 0x29 0b00001001 41 )
170 35.68ms ACK
171 36.07ms 0x7c 0b00001100 124 |
172 36.12ms ACK
173 36.2ms STOP
174 36.48ms START
175 36.88ms 0xec 0b00001100 236
176 36.93ms ACK
177 37.32ms 0x2a 0b00001010 42 *
178 37.37ms ACK
179 37.77ms 0x00 0b00000000 0
180 37.81ms ACK
181 37.89ms STOP
182 38.17ms START
183 38.57ms 0xec 0b00001100 236
184 38.62ms ACK
185 39.01ms 0x2b 0b00001011 43 +
186 39.06ms ACK
187 39.46ms 0x20 0b00000000 32
188 39.51ms ACK
189 39.58ms STOP
190 39.87ms START
191 40.26ms 0xec 0b00001100 236
192 40.31ms ACK
193 40.7ms 0x2c 0b00001100 44 ,
194 40.75ms ACK
195 41.15ms 0xf5 0b00000101 245
196 41.2ms ACK
197 41.28ms STOP
198 41.56ms START
199 41.95ms 0xec 0b00001100 236
200 42.0ms ACK
201 42.4ms 0x2d 0b00001101 45 -
202 42.45ms ACK
203 42.84ms 0x80 0b00000000 128
204 42.89ms ACK
205 42.97ms STOP
206 43.25ms START
207 43.64ms 0xec 0b00001100 236
208 43.69ms ACK
209 44.09ms 0x2e 0b00001110 46 .
210 44.14ms ACK
211 44.53ms 0x38 0b00001000 56 8
212 44.58ms ACK
213 44.66ms STOP
214 44.94ms START
215 45.34ms 0xec 0b00001100 236
216 45.39ms ACK
217 45.78ms 0x30 0b00000000 48 0
218 45.83ms ACK
219 46.22ms 0x12 0b00000010 18
220 46.27ms ACK
221 46.35ms STOP
222 46.63ms START
223 47.03ms 0xec 0b00001100 236
224 47.08ms ACK
225 47.47ms 0x31 0b00000001 49 1
226 47.52ms ACK
227 47.92ms 0x13 0b00000011 19
228 47.97ms ACK
229 48.04ms STOP
230 48.33ms START
231 48.72ms 0xec 0b00001100 236
232 48.77ms ACK
233 49.16ms 0x0a 0b00001010 10
234 49.21ms ACK
235 49.61ms 0x00 0b00000000 0
236 49.66ms ACK
237 49.73ms STOP
238 50.02ms START
239 50.41ms 0xec 0b00001100 236
240 50.46ms ACK
241 50.86ms 0x63 0b00000011 99 c
242 50.91ms ACK
243 51.3ms 0xc2 0b00000010 194
244 51.35ms ACK
245 51.43ms STOP
246 51.71ms START
247 52.1ms 0xec 0b00001100 236
248 52.15ms ACK

It was exported as html but I can't figure out if I can put that in...

Also, there is some missing, I think. I have not even looked at the transfers yet. I will do that in a few and then work out how to get any missing data....

--edit
After looking at it I see there is some missing. I will try to cut the sample speed from 5 to 2MHz. That will give me more sample depth but it will cut down on resolution.
--
« Last Edit: April 20, 2010, 09:20:35 pm by psycho »

mth

  • Posts: 317
Re: Chrontel CH7024 Information and drivers For TV-Out
« Reply #48 on: April 21, 2010, 12:27:12 am »
Thank you for your log; the reset sequence makes it work:

/ # i2cset -y i2c-gpio-1 0x76 0x03 0x00
/ # i2cset -y i2c-gpio-1 0x76 0x03 0x03
/ # i2cdump -y i2c-gpio-1 0x76
No size specified (using byte-data access)
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f    0123456789abcdef
00: 45 00 00 03 01 40 40 40 80 04 10 04 00 00 0c 00    [email protected]@@????..?.
10: 01 09 40 80 00 04 02 00 f0 fb 04 03 80 9c 05 a0    [email protected]?.??.????????
20: 00 80 00 80 04 00 00 00 03 8f 78 04 95 0c 36 12    .?.??...??x???6?
30: 09 14 00 00 01 19 f5 3f ff ff ff ff ff ff ff ff    ??..????........
40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
50: 00 00 00 00 00 00 00 00 00 00 00 ff ff ff ff ff    ................
60: 55 55 34 c0 ff ff ff ff ff ff ff ff ff ff ff ff    UU4?............
70: 00 00 00 00 00 00 00 00 00 00 00 30 10 fe 00 ff    ...........0??..
80: 45 00 00 03 01 40 40 40 80 04 10 04 00 00 0c 00    [email protected]@@????..?.
90: 01 09 40 80 00 04 02 00 f0 fb 04 03 80 9c 05 a0    [email protected]?.??.????????
a0: 00 80 00 80 04 00 00 00 03 8f 78 04 95 0c 36 12    .?.??...??x???6?
b0: 09 14 00 00 01 19 f5 3f ff ff ff ff ff ff ff ff    ??..????........
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
d0: 00 00 00 00 00 00 00 00 00 00 00 ff ff ff ff ff    ................
e0: 55 55 34 c0 ff ff ff ff ff ff ff ff ff ff ff ff    UU4?............
f0: 00 00 00 00 00 00 00 00 00 00 00 30 10 fe 00 ff    ...........0??..


psycho

  • Guest
Re: Chrontel CH7024 Information and drivers For TV-Out
« Reply #49 on: April 21, 2010, 12:31:43 am »
This is what I have checked out so far. I am a bit under the weather so I am trying to take it easy.

Code: [Select]
R/W Addr Value Notes
-----------------------------------------------------------------------------------------
W 03 00 Put chip into reset
W 03 03 Release from reset
R 00 45 Unsure about this - Does a write to 00 and a read
W 0B 03 Setup up for a 12MHz clock
R 00 45 Another one like above (only two reads that I have sniffed so far)
W 04 0C Powers down the DACs
W 0A 13 CVBS format & NTSC_443
W 0B 03 12MHz again
W 0C 00 Input data format reg 1
W 0D 03 Input data format reg 2

kswildside

  • Guest
Re: Chrontel CH7024 Information and drivers For TV-Out
« Reply #50 on: April 26, 2010, 06:52:41 pm »
Any more progress or still under weather psycho? BTW if no one has said it I think we all appreciate your hard work on trying to figure this out for us...

psycho

  • Guest
Re: Chrontel CH7024 Information and drivers For TV-Out
« Reply #51 on: April 26, 2010, 11:55:18 pm »
I thought there were others working on it. Actually, I have to figure out why the dual boot loader won't work for me. I ran through the installation and when I press select and reset it, it just boots into the native OS.

Like I said, I can help but I don't know enough to work in linux. I could try to put together some tests in the native OS, but I am not sure it would do all that much good.

difuno

  • Posts: 104
Re: Chrontel CH7024 Information and drivers For TV-Out
« Reply #52 on: April 27, 2010, 01:43:22 am »
I thought there were others working on it. Actually, I have to figure out why the dual boot loader won't work for me. I ran through the installation and when I press select and reset it, it just boots into the native OS.

Like I said, I can help but I don't know enough to work in linux. I could try to put together some tests in the native OS, but I am not sure it would do all that much good.

First of all thank you for your efforts on TV out.

Have you already gone through the installtion proccess of Dingux? If so you will just need to press SELECT while the Dingux splash screen shows up when you power on / resets the A320.

psycho

  • Guest
Re: Chrontel CH7024 Information and drivers For TV-Out
« Reply #53 on: April 27, 2010, 02:52:40 am »
I have ran the dual boot installer process but it seems as though it didn't work right. I used 32bit win7 so I think I will try it on an XP box.

santino

  • Guest
Re: Chrontel CH7024 Information and drivers For TV-Out
« Reply #54 on: April 27, 2010, 06:27:07 am »
if it shows up the dinguxsplashscreen its your sdcard which isnt correct. Did you put the zimage first?

psycho

  • Guest
Re: Chrontel CH7024 Information and drivers For TV-Out
« Reply #55 on: April 27, 2010, 12:53:26 pm »
No - it just boots into the native OS. The dual-boot loader must not have been burned properly.

bmg002

  • Posts: 29
Re: Chrontel CH7024 Information and drivers For TV-Out
« Reply #56 on: April 28, 2010, 03:08:59 am »
I am not sure how relevant this information is to the TV out, but is something I found out by accident.  When running dingux gmu (for listening to music via mp3's), I noticed that there was some odd background noise (if you hit play then pause there is a slight hiss in the background with occasional pops).  I thought this to be odd and had come to the conclusion that my power filter caps were probably starting to go (or were cheap).  BUT I accidentally plugged my headphones into the TV out and noticed the same thing.  I have not tested any theories on this, but I am wondering if the hissing/popping could be caused by the TV out functionality (ie if the tv out is getting a power signal sent to it just not processing the image properly)?
I am going to test this theory more soon (I have a few ideas on things).

 

Post a new topic