#11596 HIGH 1.75-so: Distance reports very wrong distances on XO-1.75

Zarro Boogs per Child bugtracker at laptop.org
Mon Mar 5 16:26:28 EST 2012


#11596: Distance reports very wrong distances on XO-1.75
-------------------------------------------------+--------------------------
           Reporter:  carrott                    |       Owner:  godiard                          
               Type:  defect                     |      Status:  new                              
           Priority:  high                       |   Milestone:  1.75-software                    
          Component:  acoustic-measure-activity  |     Version:  Development build as of this date
         Resolution:                             |    Keywords:                                   
        Next_action:  diagnose                   |    Verified:  0                                
Deployment_affected:                             |   Blockedby:                                   
           Blocking:                             |  
-------------------------------------------------+--------------------------

Comment(by godiard):

 I think the problem is at the audio driver or alsa level, because the
 audio saved does not have information about the two noises emited.

 Distance works in the following way:
 * The two xos start to record.
 * The first xo plays a noise generated in a file
 * The second xo plays the same noise.
 * The two xos stop recording
 * The xos process the recorded sound and with the difference of time
 between the noise emited in one xo and the noise emited in the second xo,
 calculate the distance.

 I did a temporary modified activity to add log and avoid removing the
 saved file, here is the log in the first xo:

 {{{
 1330981303.163740 ERROR acousticmeasure-activity: _change_message got
 signal: preparing
 1330981303.185882 ERROR acousticmeasure-activity: _change_message got
 signal: waiting
 1330981303.215787 ERROR root: recvmsg message ready = True
 1330981303.218422 ERROR acousticmeasure-activity: _change_message got
 signal: playing
 1330981303.229259 ERROR root: start_recording_alsa ['/usr/bin/arecord',
 '--file-type=raw', '--channels=1', '--format=S16_LE', '--rate=48000', '--
 duration=10', '/tmp/fileaGLs17']
 Recording raw data '/tmp/fileaGLs17' : Signed 16 bit Little Endian, Rate
 48000 Hz, Mono
 1330981303.326379 ERROR root: recvmsg message started = True
 1330981303.528444 ERROR root: play_wav_alsa /tmp/out5mqpgn
 Playing WAVE '/tmp/out5mqpgn' : Unsigned 8 bit, Rate 48000 Hz, Stereo
 1330981305.125378 ERROR root: recvmsg message stop = True
 1330981305.127393 ERROR root: stop_recording_alsa
 1330981305.143340 ERROR acousticmeasure-activity: _change_message got
 signal: processing
 1330981305.939724 ERROR acousticmeasure-activity: _change_message got
 signal: done
 }}}

 Here is the log in the second:

 {{{
 1330981311.456272 ERROR acousticmeasure-activity: _change_message got
 signal: preparing
 1330981311.472977 ERROR acousticmeasure-activity: _change_message got
 signal: waiting
 1330981311.507318 ERROR root: recvmsg message start recording = True
 1330981311.509441 ERROR acousticmeasure-activity: _change_message got
 signal: playing
 1330981311.512493 ERROR root: start_recording_alsa ['/usr/bin/arecord',
 '--file-type=raw', '--channels=1', '--format=S16_LE', '--rate=48000', '--
 duration=10', '/tmp/fileoEqHQP']
 Recording raw data '/tmp/fileoEqHQP' : Signed 16 bit Little Endian, Rate
 48000 Hz, Mono
 1330981312.609775 ERROR root: recvmsg message your turn = True
 1330981312.709843 ERROR root: play_wav_alsa /tmp/outgq2DY2
 Playing WAVE '/tmp/outgq2DY2' : Unsigned 8 bit, Rate 48000 Hz, Stereo
 1330981313.407506 ERROR root: stop_recording_alsa
 1330981313.510397 ERROR acousticmeasure-activity: _change_message got
 signal: processing
 1330981314.224835 ERROR acousticmeasure-activity: _change_message got
 signal: done
 }}}

 Looking at the saved files we can see:

 The recorded file in the first xo (/tmp/fileaGLs17) is empty.

 The recorded file in the second xo (/tmp/fileoEqHQP) have only the noise
 of one of the xos.

 With this information Distance can't calculate the distance

 I attach a sound saved in a successful Distance to compare, and the
 recorded files in the two xos.

 To play the sounds do:

 aplay --format=S16_LE --rate=48000 file_name

-- 
Ticket URL: <http://dev.laptop.org/ticket/11596#comment:9>
One Laptop Per Child <http://laptop.org/>
OLPC bug tracking system


More information about the Bugs mailing list