[alsa-devel] PCM multi A/V Sync bug on SMP system

Clemens Ladisch clemens at ladisch.de
Fri Apr 30 13:09:12 CEST 2010

Keith Chew wrote:
> In pcm_dmix_i386.c, we have:
> 				if (!strncmp(line, "processor", 9))
> 					smp++;
> I have commented out the smp++, so that it thinks that I am on a uni
> processor. Voila, so AV sync issues!
> My question now is what are the implications of this change? Looking
> at pcm_dmix_i386.h, it uses locks on an SMP system, but exclude them
> if not SMP. Do we still need this lock, even if I am on a dual core,
> ie 1 processor 2 cores?

Dual-core processors behave like two separate processors, i.e., they
still have separate caches, so we still need to synchronize memory
accesses to ensure that they happen in the correct order.

I'd guess that the memory bus synchronization of the three dmix devices
makes the memory accesses too slow.  What is the CPU utilization of
mplayer with and without SMP?


More information about the Alsa-devel mailing list