[Sugar-devel] Distance activity does not work on XO 1.75

James Cameron quozl at laptop.org
Wed Aug 27 06:11:48 EDT 2014

Summary: Distance-34 on XO-1.75 does not work due to a kernel bug that
stops audio recording when audio playback begins.

On Wed, Aug 27, 2014 at 05:16:37AM +0000, tkkang at nurturingasia.com wrote:
> Here is a reply..
> > 1.  what problems?
> The accuracy and randomness of the distance measured between 2
> XO. So it is unusable.

Good, we are agreed on the problem.

> > 2.  what versions?
>      Distance 34 on 13.2.1 for XO-1.75 (build 14)

Yes, I see that too.

The activity records from the microphone while playing a noise burst
through the speakers of each laptop.  On XO-1.75 only, the recording
hangs when the noise burst is played.

It can be reproduced without the activity by using two Terminal

	arecord --duration=10 record.wav &
	aplay play.wav

The record.wav file will stop growing at the instant the playback
begins, and eventually an error will appear:

	arecord: pcm_read:1828: read error: Input/output error

This proves it is not the activity at fault.

The underlying cause is a flaw in the driver for the Audio Synchronous
Serial Port [1], which is inside the XO-1.75 CPU and connects over an
I2S [2] bus to the Audio codec chip.

The driver sound/soc/mmp/mmp2-i2s.c pays no attention to the existing
capture stream when it is asked to start the playback stream, and the
actions it takes to set up the playback stream break the capture

Some fixes tried today, but there seemed to be no easy solution.  It
is fixed in a later kernel, in the source file
sound/soc/pxa/mmp-sspa.c, but an estimate for backport is not

This is tracked as ticket #11596 [3].

> > 3.  are you interested in funding work on this problem?
> Since we only have a small number of XO 1.75 deployed and future
> deployments will be with XO-4 we will use XO-4 or older XO to
> implement the distance activity instead. Hope OLPC can support the
> backport :-)

That would be nice.

> > 4.  are you offering to test new versions of Distance or kernel?
> I am not technically good but if there new versions I will always
> give it a go!


> > Since you are mixing the versions and not using an OLPC build,
> > please identify the kernel version.  Start the Terminal activity
> > and type this;
> >
> >	uname -r
> >
> > and show me the output.
> Output is : 3.0.19_xo1.75-20140604.0722.olpc.0b42e20 with OLPC build
> as it base.


> > You said there are problems, but I could find only one.  Please
> > list the other problems?
>  The distance wrongly measured is the only problem I discovered so
>  far.


Meanwhile, I suggest you remove the activity from the XO-1.75s.

+CC: @devel, @sugar-devel


1.  http://en.wikipedia.org/wiki/I2s
2.  http://en.wikipedia.org/wiki/Synchronous_Serial_Port
3.  http://dev.laptop.org/ticket/11596

James Cameron

More information about the Sugar-devel mailing list