Notice: A non well formed numeric value encountered in /sites/ on line 96 Notice: A non well formed numeric value encountered in /sites/ on line 96 Notice: A non well formed numeric value encountered in /sites/ on line 96 Deprecated: Function create_function() is deprecated in /sites/ on line 104 Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /sites/ on line 845 Deprecated: Function create_function() is deprecated in /sites/ on line 111 FS#9245 : [iaudio7] basic support



FS#9245 - [iaudio7] basic support

Attached to Project: Rockbox
Opened by Vitja Makarov (vitja) - Wednesday, 06 August 2008, 07:26 GMT
Last edited by Dave Chapman (linuxstb) - Saturday, 06 September 2008, 20:59 GMT
Task Type Patches
Category Bootloader
Status Closed
Assigned To No-one
Operating System Another
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No



This patch adds basic support for iaudio7 device.
This includes LCD driver, incomplete buttons driver (sensor panel doesn't work yet).

With this patch bootloader can be build.


This task depends upon

Closed by  Dave Chapman (linuxstb)
Saturday, 06 September 2008, 20:59 GMT
Reason for closing:  Accepted
Additional comments about closing:  iaudio7-6sep.diff committed as r18435
Comment by Vitja Makarov (vitja) - Monday, 11 August 2008, 05:37 GMT
Updated version:

- coldstart LCD initialization now works.
- Basic support for playback based on pcm-tcc780.c, somewhy I can't get FIQ to be triggered now, but with IRQ it works. And the I fill buffer with the tone, and I hear it in headphones.
- NAND flash still doesn't works, it can't find partition data it read are all 0xff

- I found some problems with and DTCM, I made new one from very simple, but rockboxs boot and says that flash should be formated.

now I'm going to vacations for ~2weeks

Comment by Vitja Makarov (vitja) - Monday, 11 August 2008, 06:30 GMT
Here is some my work on usb driver.

It is in very early stage, but it contains register definition and masks of some bits.
Also providing some environment for debugging driver the same.

Comment by Vitja Makarov (vitja) - Wednesday, 27 August 2008, 13:40 GMT

- ATA2501 support, main buttons now work too
- Initial Rockbox support (rockbox runs)
- Playback is buggy, but work sometimes
- RTC seems to work
- NAND flash driver work sometimes, same issues as with D2
Comment by Rob Purchase (shotofadds) - Tuesday, 02 September 2008, 11:01 GMT
Good work! I've had a quick look at your patch with a view to getting it committed into SVN, and have the following comments so far:

1. There are some TABs in this patch - please replace them with 4 spaces (see guidelines in docs/CONTRIBUTING)
2. In pcm-telechips.c I think you should use "#ifdef CPU_TCC780X" and "#ifdef CPU_TCC77X" instead of COWON_D2 and IAUDIO_7
3. The MODEL_NUMBER should probably be the next available number rather than 555 ;-)
4. There's some "dead" code (eg. PCM_TELECHIPS_TEST and commented-out lines in the keymaps) which should be removed before committing.
5. tcc77x.h has a lot of empty comments (ie. /* ... */). Remove these or fill in a real description.
6. Please don't put whitespace in pre-processor commands (e.g. "# if" in bootloader/telechips.c)
7. Update the comment in config-iaudio7.h that says "The D2 uses a WM8985 codec"
8. Some of the file headers don't include the necessary "$Id$" line for SVN version information

Note: I have not tested the 77x and 78x changes (pcm, bootloader) on target yet.
Comment by Vitja Makarov (vitja) - Wednesday, 03 September 2008, 11:03 GMT
Hi Rob!

I've updated patch as you said.
But have some notes:

1. Ok
2. Different Player require different DAO setup so it should be done per-player not per-cpu
3. Ok
4. "dead" code may be very useful while debugging on new target. I leave commented buttons in keymap for future keymap improvement.
5. Ok
6. I think this is good way to keep preprocessor directives more readable. Some other rockbox files use these spaces too.
7. Ok
8. Ok

Comment by Rob Purchase (shotofadds) - Wednesday, 03 September 2008, 17:01 GMT
You're right, of course the I2S setup is dependent on both CPU and DAC, so those player #ifdef's are fine. I wouldn't worry about those commented-out lines in the keymaps (assuming somebody intends to fix them later).

Personally I don't like those spaces in the preprocessor directives - but maybe ask in IRC and see what others think?
Comment by Frank Gevaerts (fg) - Wednesday, 03 September 2008, 18:21 GMT
If you do further USB work, could you change the register definitions to be base-address agnostic, i.e. define something like USB_BASE in tcc77x.h and use USB_BASE+offset ? Other SoCs use the same controller
Comment by Vitja Makarov (vitja) - Friday, 05 September 2008, 09:18 GMT

- add usb register definition relative to USB_BASE
- disable usb device in usb_init_device()
- power_off() from cowond2
Comment by Vitja Makarov (vitja) - Friday, 05 September 2008, 11:25 GMT

- switch on and off sensor-panel leds when switching backlight
- initial tunner support driver detects tunner, but it doesn't work now
Comment by Vitja Makarov (vitja) - Saturday, 06 September 2008, 06:02 GMT

- Radio now works, but rockbox sometimes crashes with divide by zero exception
- Dummy funcs for recording, enabling recording gives monitor mode available for radio
- Initial keymap for plugins
- Fix hold button issue

- It seems that color conversion is wrong. We need to convert RGB16 to RGB18 that doesn't work always correctly