dev builds
themes manual
device status forums
mailing lists
IRC bugs
dev guide

Rockbox mail archive

Subject: Re: Big SWCODEC recording patch doesn't agree with my player

Re: Big SWCODEC recording patch doesn't agree with my player

From: Michael Sevakis <>
Date: Thu, 9 Nov 2006 14:03:58 -0500

I had that happen too once last night after loading a WPS but then
completely rebuilt and replaced everything to current CVS and it stopped and
haven't had the problem again. I have an x5 60GB so our hardware is
essentially the same. I really have no explaination. I will add traps to
catch improper memory use to see that other parts of rockbox obtain their
memory properly and don't assume a particular audio buffer layout. Things
were already not done correctly before and the fact that pcm recording
historically didn't have a crash problem was rather a matter of luck than
anything being more stable.

I'll put this out to all developers: never _NEVER_ use the audiobuffer after
audio has been initialized without obtaining it with a call to
audio_get_buffer (new function). You will trash the the buffer permanently
if you do not inform audio through that function that it must reinitialize.
Do not use talk_buffer_steal; that function is for use by audio_get_buffer
only and should really not be in the headers on SWCODEC. That includes the
use of buffer_alloc since it uses memory at audiobuf and increments audiobuf
right where the codec malloc space is.

audio_get_buffer can be told to obtain the talk buffer if it is needed or
leave voice in tact. You may call it again to steal the talk buffer later if

----- Original Message -----
From: "Stphane Doyon" <>
To: <>
Sent: Thursday, November 09, 2006 1:46 PM
Subject: Big SWCODEC recording patch doesn't agree with my player

When the latest CVS didn't seem to work on my player anymore, I
painstakingly backtracked CVS versions and identified that something seems
to go wrong for me when this patch is introduced:
"Big Patch adds primarily: Samplerate and format selection to recording
dated around 2006-11-06 18:07:21 +0000.
Commits are between 18:00 and 18:20...

The problem I have, quite simply, is there's no sound :-). I get a "codec
failure" message when playing music, and I have the voice enabled but it's
not talking.

My player is an IAUDIO X5L 30GB.

Additional symptoms:
-After boot, hard disk is making a regular rythmic clicking sound,
-Hard disk doesn't seem to spin down,
-When I try to play a track, I hear lots of continuous hard disk activity,
in addition to the "codec failure" message.
-I think it's not shutting down properly (I don't hear the disk saving the
settings, and it takes several seconds longer than usual, big click at the
end, like on a forced shutdown).

I did try:
-without any of my own patches, straight from CVS,
-with the voice turned off,
-resetting the settings before booting the new firmware,
but the problem persists.

I reported similar vague problems several weeks ago when I tested this
patch out of FlySpray. It's a bit hard to get the details right in a case
like this: I'm blind and the player isn't talking. When no one else had
that problem and the patch was tested on X5 players, I thought I must have
made some sort of mistake and forgot about it, but now it's still not
working for me.

Any help appreciated, thx

Stphane Doyon
Received on 2006-11-09

Page was last modified "Jan 10 2012" The Rockbox Crew