Posts

Showing posts from March, 2011

Fedora 14 Flash Sound Problem - Linus Torvalds to the Rescue

A nice write up of the bug that Linux Torvalds found and fixed. Basically Fedora 14 came with an updated version of glibc that broke the sound (well seriously messed it up) for Adobe Flash Video . The sound sounds very choppy and hard to hear, full of digital artifact like with a bad cell phone call. This was logged as Bugzilla #638477 . Linus Torvalds (and others) figured out the problem and came up with a workaround which is easy, elegant and it works. cat << EOF > mymemcpy.c #include void *memcpy(void *dst, const void *src, size_t size) { void *orig = dst; asm volatile("rep ; movsq" :"=D" (dst), "=S" (src) :"0" (dst), "1" (src), "c" (size >> 3) :"memory"); asm volatile("rep ; movsb" :"=D" (dst), "=S" (src) :"0" (dst), "1" (src), "c" (size & 7) :"memory"); return orig; } EOF # Compile and link gcc -O2 -