Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Welcome to the Rockbox Technical Forums!

+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  New Ports
| | |-+  Cowon D2
« previous next »
  • Print
Pages: 1 ... 10 11 [12] 13 14 ... 65

Author Topic: Cowon D2  (Read 636527 times)

Offline luck3r

  • Member
  • *
  • Posts: 15
Re: Cowon D2
« Reply #165 on: February 04, 2008, 11:11:37 AM »
Cygwin doesn't have that variable right after installation.
Yeeze: You could try andLinux, it's an already configured coLinux with X server and network.
Logged
"All authority of any kind, especially in the field of thought and understanding, is the most destructive, evil thing. Leaders destroy the followers and followers destroy the leaders. You have to be your own teacher and your own disciple. You have to question everything that man has accepted as valuable, as necessary." -- Jiddu Krishnamurti

Offline shotofadds

  • Developer
  • Member
  • *
  • Posts: 368
Re: Cowon D2
« Reply #166 on: February 05, 2008, 07:16:59 AM »
Just a quick update: during the the last few days I've had some success getting the flash FAT32 filesystem working, at least partially. The boot sector, cluster map & root directory all appear to be read correctly, as far as I can tell.

I can open() and read correct-looking data from some files, but there are clearly still some bugs in the block translation, since junk is being returned for certain files. I might just take the hit and dump the whole 3811Mb partition to my HDD and match up the junk vs. the real data...

I'll post some details of all this to the wiki eventually (when I've found the right words to describe the 'interesting' block translation!). I've been concentrating on trying to make it work first :)
Logged

Offline shotofadds

  • Developer
  • Member
  • *
  • Posts: 368
Re: Cowon D2
« Reply #167 on: February 12, 2008, 05:52:46 PM »
I've spent the last couple of hours doing a brain-dump into the wiki of the last week or two's investigation into the contents of the NAND flash. Hopefully actually documenting this somewhere other than my head will make coding easier, or at least that's the theory ;D

I have a few code updates that need testing on 2Gb / 8Gb players (partially working FAT32 read support) but it's doubtful I'll have time to get it ready before next week. Real life gets in the way from time to time, I'm afraid!
Logged

Offline jarivk

  • Member
  • *
  • Posts: 5
Re: Cowon D2
« Reply #168 on: February 12, 2008, 11:22:02 PM »
hi thats good news  :).
meantime I started working on WM8985 codec. From what i have understood...
We have to use I2C interface to read/write to device control registers.
We have to setup DMA for writing actual PCM samples.
For time being I am trying to just read default value in Left DAC digital volume register (offset of 0xB)
I found I2C base addres for 8985 in wmcodec-telechips.c
#define I2C_AUDIO_ADDRESS 0x34 // in wmcodec-telechips.c
   
I tried
i2c_readmem(I2C_AUDIO_ADDRESS, 0xB, buf, 1);
//int i2c_readmem(int device, int address, unsigned char* buf, int count )

Default value after reset of this register is 0xFF as per datasheet.
But the i2c_readmem is failing. it is not getting i2c_getack() after writing device value.
Do we have to enable the WM8985 chip??

also a wikipage (http://www.rockbox.org/twiki/bin/view/Main/CowonD2Info) says
Audio In/Out  base address for 7801 is 0xF0059000
What is this address?? or we have to use this address to enable the chip??
Do u have any info abt this?

Also in general how are we finding the base addresses of the devices??


« Last Edit: February 12, 2008, 11:25:41 PM by jarivk »
Logged

Offline shotofadds

  • Developer
  • Member
  • *
  • Posts: 368
Re: Cowon D2
« Reply #169 on: February 13, 2008, 05:42:25 AM »
Hi jarivk, it's good to see someone else taking an interest in the code :)

Quote from: jarivk on February 12, 2008, 11:22:02 PM
We have to use I2C interface to read/write to device control registers.
Correct.

Quote from: jarivk on February 12, 2008, 11:22:02 PM
We have to setup DMA for writing actual PCM samples.
I'm not sure where that is implied - as I understand it (confirmed by OF disassembly) we need to write data to the DAI (I2S) registers when the appropriate buffer fill IRQ/FIQ is received.

Quote from: jarivk on February 12, 2008, 11:22:02 PM
I tried
i2c_readmem(I2C_AUDIO_ADDRESS, 0xB, buf, 1);
//int i2c_readmem(int device, int address, unsigned char* buf, int count )

Default value after reset of this register is 0xFF as per datasheet.
But the i2c_readmem is failing. it is not getting i2c_getack() after writing device value.
Do any of the other targets read from the WM codec - maybe there are some clues there? I haven't tried this yet, so can't say for sure.

Quote from: jarivk on February 12, 2008, 11:22:02 PM
Do we have to enable the WM8985 chip??
That's certainly a possibility - I haven't yet disassembled the relevant parts of the OF to determine if this is necessary. However, I do know that it uses the same I2C code for both the WM and PCF chips, so there shouldn't be a problem with the existing code.

Quote from: jarivk on February 12, 2008, 11:22:02 PM
Also in general how are we finding the base addresses of the devices??
The addresses in the wiki page were obtained by cross-referencing the D2 firmware disassembly with other TCC 76x and 77x firmwares (where those registers were already known). If you'd been reading this thread the whole way through, you'd have known that.

After I spent a month or two locating those register addresses, somebody helpfully posted a link to the TCC7801 datasheet - it's a few pages back in this very thread. It makes good bed-time reading ;D
Logged

Offline jarivk

  • Member
  • *
  • Posts: 5
Re: Cowon D2
« Reply #170 on: February 13, 2008, 09:13:49 AM »
I am using tcctool to test the bin file. every time before loading bin file, i have to disconnect and reconnect D2 in USB boot mode. Is there a way to load the bin file without disconnecting/reconnecting the device everytime?

About the 7801 datasheet. actually have downloaded the pdfs. but somehow i missed it   :-[
will try something tonight  :)
« Last Edit: February 13, 2008, 09:18:05 AM by jarivk »
Logged

Offline shotofadds

  • Developer
  • Member
  • *
  • Posts: 368
Re: Cowon D2
« Reply #171 on: February 14, 2008, 04:18:11 AM »
I've made some updates to the build in SVN - if possible could people with 2/4/8Gb D2s test the latest code and report the following back:

1) If you see the word *PANIC* it means some assumptions I've made turned out not to be correct. What does the text following it say?

2) The text "nnnn sequential segments found" should be displayed before attempting to mount the partition. What number is nnnn?

3) Are any further errors displayed - eg. after the "mount" line?

If there are no errors the usual screen of diagnostics should appear - I've also updated this to display a crude approximation of the touchscreen position.
Logged

Offline luck3r

  • Member
  • *
  • Posts: 15
Re: Cowon D2
« Reply #172 on: February 14, 2008, 05:44:04 AM »
4GB

2044 sequential segments, no errors.
Logged
"All authority of any kind, especially in the field of thought and understanding, is the most destructive, evil thing. Leaders destroy the followers and followers destroy the leaders. You have to be your own teacher and your own disciple. You have to question everything that man has accepted as valuable, as necessary." -- Jiddu Krishnamurti

Offline shotofadds

  • Developer
  • Member
  • *
  • Posts: 368
Re: Cowon D2
« Reply #173 on: February 14, 2008, 06:34:29 AM »
Quote from: luck3r on February 14, 2008, 05:44:04 AM
2044 sequential segments, no errors.
Hmmm, that's not what I expected (my 4Gb reports 3816). Can you tell me how much free space there is on your internal memory - is it about half full?

Also which firmware version are you running?
Logged

Offline andiator

  • Member
  • *
  • Posts: 44
Re: Cowon D2
« Reply #174 on: February 14, 2008, 07:38:40 AM »
8Gb version:

FW 3.54
used 4.03 Gb, 782 Files, 76 directories
free 3.57Gb

1048576 pages
4096 bytes per page
394 sequential segments found (788Mb)

hey cool, I can draw some curves in the lower screen part!
Logged
D2 8Gb + 128Gb µSD

Offline shotofadds

  • Developer
  • Member
  • *
  • Posts: 368
Re: Cowon D2
« Reply #175 on: February 14, 2008, 08:17:15 AM »
Quote from: andiator on February 14, 2008, 07:38:40 AM
394 sequential segments found (788Mb)
Ok, looks like this experiment wasn't quite as successful as I had hoped. I have some ideas about how to fix this, but I might not have time to work on this until next week.

Still, no panics and no 'failure to mount partition' errors is good progress all the same. In the meantime you can play with my replacement for the D2 notepad! ;D
Logged

Offline Yeeze

  • Member
  • *
  • Posts: 40
Re: Cowon D2
« Reply #176 on: February 14, 2008, 01:23:20 PM »
Thanks for the update shotofadds !

My 2GB model actually said:
*PANIC*
BMPM tag not prese
nt

Nothing happened afterwards...
Logged

Offline shotofadds

  • Developer
  • Member
  • *
  • Posts: 368
Re: Cowon D2
« Reply #177 on: February 15, 2008, 04:30:40 AM »
I guess I spoke to soon about the lack of panics. >:(

Yeeze, would you be able to make a couple of quick changes to your build to enable some diagnostic output?

The following are in firmware/target/arm/tcc780x/ata-nand-tcc780x.c:

- In nand_get_chip_info(), comment out or delete the two "if (....) panicf(....);" statements at line 417/418.

- In nand_test(), change both of the "#if 0" lines (434 & 454) to "#if 1".

Rebuild and run the new image. This time you should see the usual text about banks, pages, number of segments etc; and then about 4 pages of hex numbers.

I appreciate there is a lot of data, and there's no way of doing a cut-n-paste, but would it be possible to note down the data from these pages and send me a PM?   (nb. you don't need to include all the FFFFFFFF's, just replace each one with a . or something so I know how many there are).

Thanks in advance, it's much appreciated!

EDIT: Also which firmware version are you using?
« Last Edit: February 15, 2008, 05:31:44 AM by shotofadds »
Logged

Offline ChristianGmeiner

  • Member
  • *
  • Posts: 6
Re: Cowon D2
« Reply #178 on: February 15, 2008, 08:02:06 AM »
Hi..

I got an D2 (broken touchscreen) to play with. I am not sure who is doing what at the
moment. If nobody else has started before, I want to do the wm8985 driver. As the
datasheet can be found very easily I think it should be okay if we can test sound when
ata and other needed stuff works.
Oh.. and I have fixed the debug_menu stuff so rockbox does compile and ends with this error:

/home/austriancoder/rockbox/d2/libTremor.a(vorbisfile.o): In function `ov_pcm_seek':
vorbisfile.c:(.text+0x21e4): relocation truncated to fit: R_ARM_PC24 against `.icode'
/home/austriancoder/rockbox/d2/libTremor.a(vorbisfile.o): In function `ov_read_fixed':
vorbisfile.c:(.text+0x26f4): relocation truncated to fit: R_ARM_PC24 against `.icode'
/home/austriancoder/rockbox/d2/libTremor.a(framing.o): In function `ogg_buffer_alloc':
framing.c:(.text+0xa0): relocation truncated to fit: R_ARM_PC24 against `.icode'
/home/austriancoder/rockbox/d2/libTremor.a(framing.o): In function `ogg_buffer_dup':
framing.c:(.text+0x140): relocation truncated to fit: R_ARM_PC24 against `.icode'
/home/austriancoder/rockbox/d2/libTremor.a(framing.o): In function `ogg_buffer_split':
framing.c:(.text+0x224): relocation truncated to fit: R_ARM_PC24 against `.icode'
/home/austriancoder/rockbox/d2/libTremor.a(framing.o): In function `ogg_stream_packetout':
framing.c:(.text+0xf80): relocation truncated to fit: R_ARM_PC24 against `.icode'
/home/austriancoder/rockbox/d2/libTremor.a(framing.o): In function `ogg_stream_packetpeek':
framing.c:(.text+0xf88): relocation truncated to fit: R_ARM_PC24 against `.icode'
collect2: ld returned 1 exit status


greets,
Christian
Logged

Offline shotofadds

  • Developer
  • Member
  • *
  • Posts: 368
Re: Cowon D2
« Reply #179 on: February 15, 2008, 08:09:56 AM »
Yes, those linker errors are as far as I've progressed. I haven't worried about fixing them yet as I'm concentrating on getting the NAND driver working in the bootloader.

I haven't seen any code for a WM8985 driver yet, although jarivk did mention he was looking at it a short while ago. I don't know if that has progressed any further.

I'll be away for a few days, but maybe we should catch up in IRC one evening next week? Though I think we might struggle to get Rockbox to a usable point with only three buttons and a broken touchscreen :-\

EDIT: 1) The WM8985 datasheet should already be linked from the CowonD2Info wiki page. 2) Have you tried uploading the latest bootloader.bin using tcctool? Does it mount without errors?
« Last Edit: February 15, 2008, 10:03:05 AM by shotofadds »
Logged

  • Print
Pages: 1 ... 10 11 [12] 13 14 ... 65
« previous next »
+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  New Ports
| | |-+  Cowon D2
 

  • SMF 2.0.17 | SMF © 2019, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.109 seconds with 15 queries.