Amaury Pouly | 6 May 2013 11:22
Picon

Handling of read-only storage: feeback wanted

Hi ,
I'm looking for some feedback on an issue which might not be one: read-only storage. It appears that since virtually all DAP use micro-sd card we never ran into this problem but I am porting Rockbox to the Creative ZEN and ZEN X-Fi which feature a real SD card port and can sense the write-protected switch of them.
The obvious solution is to completely ignore it of course but this is a bit of shame. Another option is to simply fail all writes to the storage if it is write protected (remember that this is completely software handled).
I am wondering if there would be any interest in doing something a bit more clever, like making the file system code aware of read-only storage. Indeed, failing all writes will potentially stress all write path, might trigger bugs or obscure error messages to the user. A simple solution would be to prevent opening opening a file for writing for example.

Any thoughts ?

Amaury Pouly
Malte Schmidt-Tychsen | 29 Apr 2013 10:18
Picon

Rockbox Ondio

Hi there,

who ist responsible for the Ondio port. Ist anyone interested but needs 
a device? I am mainly asking, because the Ondio FM port has problems 
with the radio.

Malte

Marcin Bukat | 26 Apr 2013 11:14
Picon

DevCon

Are we going to have one this year?


Marcin Bukat (wodz)
Richard Quirk | 21 Apr 2013 21:44
Picon

review to show only the chosen file's bookmarks

This change is a bit larger than my last minor bookmark tweak. Again
autoload bookmarks is set to "ask". Opening a track showed all of the
bookmarks for any track in the current directory, not just bookmarks
for the track you chose to open.

http://gerrit.rockbox.org/r/#/c/428/

The main change was to separate out a filtered count from the visible
count of bookmarks, and then remember to filter again when moving down
the list. This is because the bookmark list is cached, behaviour that
has not changed here.

This forum post asks for a similar feature, but adding it to the "ask"
list is easier and less controversial than adding a new menu entry
http://forums.rockbox.org/index.php/topic,42815.0.html

Boris Gjenero | 20 Apr 2013 20:50
Picon
Gravatar

Ladies and gentlemen, we have sound on the RCA RC3000A digital boombox

Over the last few weeks I've been working on a port to the RCA RC3000A 
digital boombox. I now have flawless playback, including via the 
speakers. The first successfully played song was Mika - Un Soleil Mal 
Luné in FLAC format, from an SD card.

It's based on the TCC760 SoC, which has a USB boot mode allowing 
convenient development without risk of bricking or need to write code to 
storage. The mode is a bit different from later Telechips SoC supported 
by tcctool: the 4th parameter is execution starting address not SDCFG. I 
can still upload to SDRAM by first uploading a small program to set 
SDCFG and then uploading to SDRAM.

Rockbox has drivers for the LCD, tuner and RTC. The LCD only needs a 
different initialization sequence. The SoC has similarities to TCC77x 
and the codec has similarities to CS42L55, but there are important 
differences, so I'm making new drivers for them. I used Archos Ondio 
ata_mmc.c as a starting point for the SD driver because it also uses 
SPI, but it seems I should be using higher level SD code from another 
later driver for SD cards. It's too bad that SD drivers don't separate 
low level communication with the card from higher level code that sends 
commands, like with ATA. I intend to keep the two separate in the SD 
driver, perhaps with an eventual goal of splitting other drivers that 
way. I'm not planning to use the OHCI USB host controller for storage 
access, but the Telechips USB device controller seems easy and I should 
be able to use that for Rockbox USB.

Here's a summary of what the RCA RC3000A contains
CPU: Telechips TCC760 SoC with ARM940T core, which the OF runs at 96 MHz
Memory: 2 MB SDRAM, 2 MB NOR flash with over 1 MB free
LCD: SSD1815, 128x64, 1bpp, white backlight
Storage: 512 MB internal NAND flash, SD card slot with SPI mode access 
using GSIO, OHCI USB host port.
Tuner: TEA5767 radio module with 32767 Hz crystal
CODEC: CS42L51 with radio connected to AIN1 and line in to AIN2, the 
output driving headphones, and a separate class D amplifier chip driving 
the speakers.
RTC: PCF8563

Best regards,

Boris

Michael Sevakis | 17 Apr 2013 18:11
Picon
Favicon

Re: 540e5d1: Forget about fixedpoint.c in any HWCODEC bin.

> The final link has to include --gc-sections in the command line. Is that 
> the case?

I am thinking that is what is indicated here, yes.

Michael Sevakis | 16 Apr 2013 17:03
Picon
Favicon

Re: 540e5d1: Forget about fixedpoint.c in any HWCODEC bin.

> Hmm, how can that happen? Creating a libX.a is just packing *.o into an 
> archive, regardless of internal references. It doesn't even involve the 
> linker.
>

When linking the binary it does, and since the linker sees no referenences 
(libfirmware.a is linked in earlier than rbcodec.lib), it discards it. I 
verified that the fixedpoint functions were present in the libfirmware 
archive. Reversing the lib linking order just causes the same sort of issues 
with other libs.

> If codeclib (from /lib/rbcodec), which we ideally want to work outside 
> Rockbox, uses this then fixed point should also be somewhere in /lib IMO.

What does work is building fixedpoint.c as part of rbcodec, not the binary. 
That in addition to moving fixedpoint.h to /lib and /lib as an include path 
wraps it up nicely. Even though I would like to do so,  it can't be a 
globally used archive because of the different compilation conditions for 
core, plugin and codec.

Mike

Thomas Martitz | 15 Apr 2013 23:43
Favicon
Gravatar

540e5d1: Forget about fixedpoint.c in any HWCODEC bin.

> From: Michael Sevakis <jethead71 <at> rockbox.org>
> Date: Mon, 15 Apr 2013 20:11:28 +0000 (-0400)
> Subject: Forget about fixedpoint.c in any HWCODEC bin.
> X-Git-Url: http://git.rockbox.org/?p=rockbox.git;a=commitdiff_plain;h=540e5d1
>
> Forget about fixedpoint.c in any HWCODEC bin.
>
> It bloats to much just for one simple use. Just use a simple function
> for shifting sound setting decimal places.
>
> Change-Id: I1a7d37cce6ada3c6e6600dc0d301f354ffeff231
> ---
>
> diff --git a/apps/SOURCES b/apps/SOURCES
> index d34d7b8..6005460 100644
> --- a/apps/SOURCES
> +++ b/apps/SOURCES
>  <at>  <at>  -159,12 +159,11  <at>  <at>  radio/radioart.c
>   #endif
>   #endif
>   
> -fixedpoint.c
> -
>   #if CONFIG_CODEC == SWCODEC
>   #if INPUT_SRC_CAPS != 0
>   audio_path.c
>   #endif /* INPUT_SRC_CAPS != 0 */
> +fixedpoint.c
>   pcmbuf.c
>   codec_thread.c
>   playback.c
> diff --git a/firmware/sound.c b/firmware/sound.c
> index e6cfe57..f8358c6 100644
> --- a/firmware/sound.c
> +++ b/firmware/sound.c
>  <at>  <at>  -25,7 +25,6  <at>  <at> 
>   #include "config.h"
>   #include "system.h"
>   #include "sound.h"
> -#include "fixedpoint.h"
>   #ifdef HAVE_SW_VOLUME_CONTROL
>   #include "pcm_sw_volume.h"
>   #endif /* HAVE_SW_VOLUME_CONTROL */
>  <at>  <at>  -128,8 +127,10  <at>  <at>  static int current_eq_band_gain[AUDIOHW_EQ_BAND_NUM]; /* tenth dB */
>   /* Return the sound value scaled to centibels (tenth-decibels) */
>   static int sound_value_to_cb(int setting, int value)
>   {
> -    long e = (1 - sound_numdecimals(setting)) << 16;
> -    return fp_mul(value, fp_exp10(e, 16), 16);
> +    int shift = 1 - sound_numdecimals(setting);
> +    if (shift < 0) do { value /= 10; } while (++shift);
> +    if (shift > 0) do { value *= 10; } while (--shift);
> +    return value;
>   }
>   
>   static void set_prescaled_volume(void)

Calling apps/ code from firmware? That's bad!

Why not move fixedpoint to firmware (or into the top level lib folder)?

Best regards

Frank Gevaerts | 13 Apr 2013 16:52
Picon

HD targets and multivolume

People seem to be experimenting with 240GB drives in most HD-based
targets these days. On some of them, the OF bootloader won't do
LBA48, so the first partition needs to be smaller than 128GB, which
means you have to have two partitions for it to be fully usable.

I think we should enable HAVE_MULTIVOLUME on all HD targets with at
least 8MB RAM. The overhead is less than 3KB, which I think is
negligible on those devices.

Comments?

Frank

--

-- 
"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it." - Brian W. Kernighan

Richard Quirk | 6 Apr 2013 09:27
Picon

review for minor bookmark ui tweak

This minor UI change adds a way to cancel out from the bookmark list
that is shown when you have autoload bookmarks = ask.

http://gerrit.rockbox.org/416

Without this change, pressing a cancel button starts the track from
the start, which felt unexpected to me. With the change, cancelling
goes back to the file list.

Amaury Pouly | 1 Apr 2013 16:26
Picon

Debug build break recording

Hi all,
While trying to implement recording on the Fuze+ I stumbled upon a very nasty bug which took me quite a few hours do track, so I would like to make you aware of it and ask for advise. To cut the long story short: if you compile rockbox in DEBUG, any attempt to record something will result in a crash.

If you compile rockbox in debug mode (select Debug in tools/configure), the following will happen:

* -DDEBUG will be added to GCCOPTS in Makefile
* the codec "vtable" will get an additional field in firmware build: (lib/rbcodec/codecs/codecs.h):
#if defined(DEBUG) || defined(SIMULATOR)
    void (*debugf)(const char *fmt, ...) ATTRIBUTE_PRINTF(1, 2);
#endif
* the rbcodec makefile will undefine DEBUG: (lib/rbcodec/codecs/codecs.make):
 CODECFLAGS += -UDEBUG -DNDEBUG
* the codecs will be built without the additional field in codec vtable and without DEBUG
* the encoder codecs will be broken because all the encoder specific functions are *after* debugf in the "vtable", but the playback ones will be fine thus you probably won't notice it.
* this will result in a very hard to debug crash when trying to record

The question I have now is: why on earth rbcodecs.make undefine DEBUG ? The obvious fix would be to remove this but since I don't understand why it was introduced in the first place I don't want to break something else.

Thanks,

Amaury Pouly

Gmane