[MPlayer-dev-eng] supported ALSA versions

Diego Biurrun diego at biurrun.de
Mon Nov 14 11:01:33 CET 2011


On Wed, Nov 09, 2011 at 02:28:26AM +0100, Diego Biurrun wrote:
> On Tue, Nov 08, 2011 at 10:53:28AM +0100, Clemens Ladisch wrote:
> > > On Fri, Nov 04, 2011 at 04:57:25PM +0100, Reimar Döffinger wrote:
> > > > On Thu, Nov 03, 2011 at 11:06:15PM +0100, Diego Biurrun wrote:
> > > > > I looked into the baroque ALSA check in configure and noticed that we
> > > > > support ALSA versions from 2000 (last 0.5 release) and 2003 (last 0.9
> > > > > release).  While maintaining compatibility and such is all nice and
> > > > > great a decade sounds like the timeframe when one can safely eliminate
> > > > > cruft.
> > > > > 
> > > > > Am I overlooking something non-obvious about systems without ALSA
> > > > > versions from at least 2003 (first 1.0 release)?
> > 
> > There really isn't much difference between 0.9* and 1.0; there weren't
> > any big technical reasons for the version change.  There was a small
> > API change, but the libraries are binary compatible (as long as no
> > newer APIs are used).
> > 
> > OTOH, 0.5 was a completely different API and considered somewhat of
> > a prototype.
> > 
> > All 0.9/1.0 alsa-lib and kernel versions should be compatible; I think
> > it somewhat unlikely that somebody would use a new mplayer without
> > being able to update alsa-lib.
> > 
> > It should be noted that ao_alsa.c uses some functions introduced in
> > 0.9.0rc4, which was after the move to alsa/, so <sys/asoundlib.h>
> > support can be dropped.
> > 
> > > > The ais on the other hand someone thought it a good idea to duplicate
> > > > the whole file because of what essentially is 7 lines difference.
> > 
> > With "#define ALSA_PCM_NEW_*_API", ai_alsa1x.c can be used for both.
> > 
> > With these defines (and with 0.5 dropped), no version check is needed
> > in configure.
> 
> I say go right ahead and implement it.

I went ahead, all the complexity is gone now, which is nice - configure
should also run noticeably faster now.

That said, the ALSA check in configure is not very smart right now, it
just checks that alsa/asoundlib is available and that we can link with
-lasoundlib.  If there is a way to detect unsuitable 0.9 versions, I'm
all ears.

Diego


More information about the MPlayer-dev-eng mailing list