#12867 NORM Future : sugar: audio icon in frame ineffective

Zarro Boogs per Child bugtracker at laptop.org
Mon Aug 24 01:54:06 EDT 2015


#12867: sugar: audio icon in frame ineffective
-------------------------------+--------------------------------
            Reporter:  Quozl   |          Owner:  Quozl
                Type:  defect  |         Status:  new
            Priority:  normal  |      Milestone:  Future Release
           Component:  sugar   |        Version:  not specified
          Resolution:          |       Keywords:
          Blocked By:          |       Blocking:
Deployments affected:          |  Action Needed:  code
            Verified:  0       |
-------------------------------+--------------------------------

Comment (by Quozl):

 Investigation into camera shutter sound repeating, the cause is GStreamer
 busy with the capture stream and unable to service the interrupts for the
 playback stream.

 Method to reproduce: start Record, click on Microphone (sound) mode, press
 O game key, wait five seconds, press O game key again.

 Expected result: camera shutter sound once.

 Observed result: camera shutter sound repeats at an interval of the length
 of the sound (about 0.044 seconds)

 Results of investigation:
 * instrumented the kernel to log audio driver actions, see
 http://dev.laptop.org/~quozl/y/1ZTk5M.txt
 * reproduced the problem with the instrumented kernel,
 * patched the Record activity to add a delay to allow capture stream to be
 stopped, as follows;
 {{{
 --- glive.py.~1~        2015-06-23 14:45:52.000000000 +0000
 +++ glive.py    2015-08-24 04:59:11.480000208 +0000
 @@ -349,6 +349,7 @@
          # pipeline while manipulating it.
          # http://dev.laptop.org/ticket/10183
          self._pipeline.set_state(gst.STATE_NULL)
 +        time.sleep(3)
          self.model.shutter_sound()
          self._pipeline.remove(self._audiobin)

 }}}

 * kernel output when stop button is pressed to end recording; the capture
 stream is stopped at kernel level by the GStreamer set_state() method;
 {{{
 [ 3319.742877] mmp2_pcm_trigger cmd=0
 [ 3319.746262] mmp2_pcm_wait_idle channel=1
 [ 3319.750156] mmp2_i2s_trigger stream=1
 [ 3319.753788] mmp2_i2s_stop_capture
 [ 3319.757634] mmp2_pcm_prepare
 [ 3319.760669] mmp2_pcm_setup_dma period=960
 [ 3319.765369] mmp2_pcm_hw_free
 [ 3319.930557] mmp2_pcm_hw_free
 [ 3319.933548] rt5631_shutdown
 [ 3319.936735] mmp2_pcm_close stream=1
 [ 3319.940579] mmp2_pcm_reset channel=1
 [ 3319.944130] mmp2_pcm_wait_idle channel=1
 }}}
 * three second delay before playing sound effect, as patched; then the
 playback stream is started while the capture stream dismantled inside
 GStreamer;
 {{{
 [ 3323.196918] mmp2_i2s_startup
 [ 3323.208888] mmp2_pcm_open stream=0
 [ 3323.212303] rt5631_startup
 [ 3323.551906] rt5631_hifi_codec_set_dai_fmt
 [ 3323.559168] rt5631_hifi_codec_set_dai_sysclk
 [ 3323.563414] rt5631_hifi_pcm_params rate=48000
 [ 3323.578912] mmp2_i2s_hw_params rate=48000
 [ 3323.582901] mmp2_pcm_hw_params
 [ 3323.586049] mmp2_pcm_mmap
 [ 3323.588736] mmp2_pcm_prepare
 [ 3323.608847] mmp2_pcm_setup_dma period=960
 [ 3323.714307] mmp2_pcm_trigger cmd=1
 [ 3323.717697] mmp2_i2s_trigger stream=0
 [ 3323.721328] mmp2_i2s_start_playback
 [ 3325.372124] mmp2_pcm_trigger cmd=0
 [ 3325.375510] mmp2_pcm_wait_idle channel=0
 [ 3325.379403] mmp2_i2s_trigger stream=0
 [ 3325.383037] mmp2_i2s_stop_playback
 [ 3325.398881] mmp2_pcm_prepare
 [ 3325.401753] mmp2_pcm_setup_dma period=960
 [ 3325.421682] mmp2_pcm_prepare
 [ 3325.424550] mmp2_pcm_setup_dma period=960
 [ 3325.439006] mmp2_pcm_hw_free
 [ 3325.696021] mmp2_pcm_hw_free
 [ 3325.708877] rt5631_shutdown
 [ 3325.711658] mmp2_pcm_close stream=0
 [ 3325.715118] mmp2_pcm_reset channel=0
 [ 3325.718659] mmp2_pcm_wait_idle channel=0
 }}}
 * order of calls is correct, therefore not a kernel problem, but GStreamer
 is too busy handling the capture stream that it does not have time to
 service the data interrupts for the playback.

--
Ticket URL: <http://dev.laptop.org/ticket/12867#comment:10>
One Laptop per Child <http://one.laptop.org/>
One Laptop per Child bug tracking system


More information about the Bugs mailing list