Sunday, September 9, 2012

Got sound working with Dexter+Raspberry Pi

Yesterday I finished writing the ALSA sound code to work with Dexter and the Raspberry Pi. Upon execution, the sound proved a bit choppy (although the video still played full speed!) so I think the problem may be my interpretation of how sound buffers work in ALSA. I'll have to play around with that. Also, it could be because the slow "mix_c" function is being called which I should be able to eliminate pretty easily (no mixing is needed).

Here is oprofile's output:


samples  %        image name               symbol name
300      12.1310  dexter.bin               mix_c()
288      11.6458  [vectors] (tgid:2686 range:0xffff0000-0xffff1000) [vectors] (tgid:2686 range:0xffff0000-0xffff1000)
197       7.9660  dexter.bin               LoopCommon::Think()
121       4.8928  dexter.bin               better_select(int, select_type, unsigned int)
88        3.5584  dexter.bin               update_soundbuffer(unsigned int)
70        2.8306  dexter.bin               listener::Think(unsigned int)
55        2.2240  dexter.bin               OMXComponent::WaitForGeneric(list<boost::shared_ptr<IEvent>> const&, unsigned int)
52        2.1027  dexter.bin               PlatformRPI::SoundPause()
51        2.0623  dexter.bin               listenerThread::MainLoop()
50        2.0218  dexter.bin               main
45        1.8197  dexter.bin               MpoThreadMutex::Lock()
42        1.6983  dexter.bin               VideoObjectUtil::RenderIfNeeded(bool)
39        1.5770  dexter.bin               MpoThreadMutex::UnlockEx()
38        1.5366  dexter.bin               JPEGOpenMax::DecompressJPEGStart(unsigned char const*, unsigned int, unsigned char const*, unsigne
d int)
38        1.5366  dexter.bin               MpoPipeEx::NonBlockingRead(void*, unsigned int, unsigned int*)
38        1.5366  dexter.bin               VideoObjectGLES2::DrawRGBA()
36        1.4557  dexter.bin               ldp_img::OnVBlankStopped()
31        1.2535  dexter.bin               boost::detail::sp_counted_base::destroy()
31        1.2535  dexter.bin               game::PreThink(unsigned int)

No comments:

Post a Comment