* Re: new "in-compatible" alsa-lib PCM API
2002-09-18 12:21 ` Jaroslav Kysela
@ 2002-09-18 13:15 ` Tim Goetze
2002-09-18 13:58 ` Thierry Vignaud
2002-09-18 13:49 ` Paul Davis
` (4 subsequent siblings)
5 siblings, 1 reply; 35+ messages in thread
From: Tim Goetze @ 2002-09-18 13:15 UTC (permalink / raw)
To: Jaroslav Kysela; +Cc: alsa-devel@lists.sourceforge.net
Jaroslav Kysela wrote:
>autoconfiguration code to alsa.m4. My suggestion is to use /opt/alsa/rc3
>directory for this job. Comments?
/opt is redhat only, debian systems do not have it.
tim
-------------------------------------------------------
This SF.NET email is sponsored by: AMD - Your access to the experts
on Hammer Technology! Open Source & Linux Developers, register now
for the AMD Developer Symposium. Code: EX8664
http://www.developwithamd.com/developerlab
^ permalink raw reply [flat|nested] 35+ messages in thread* Re: new "in-compatible" alsa-lib PCM API
2002-09-18 13:15 ` Tim Goetze
@ 2002-09-18 13:58 ` Thierry Vignaud
2002-09-18 14:19 ` Paul Davis
2002-09-18 14:50 ` Tim Goetze
0 siblings, 2 replies; 35+ messages in thread
From: Thierry Vignaud @ 2002-09-18 13:58 UTC (permalink / raw)
To: Tim Goetze; +Cc: Jaroslav Kysela, alsa-devel@lists.sourceforge.net
Tim Goetze <tim@quitte.de> writes:
> > autoconfiguration code to alsa.m4. My suggestion is to use
> > /opt/alsa/rc3 directory for this job. Comments?
>
> /opt is redhat only, debian systems do not have it.
err, even if i dislike it, /opt is defined by the fhs
anyway, api incompatibles libraries can cohabit in the same place with
different majors.
debian and major enable one to have multiples versions of the same lib
provided the upstream authors increase it major on each api and/or abi
change. one can only have one devel library package (aka headers, ...)
this is the /usr/share/aclocal/alsa.m4 job to provide right linking
flags depending of the library
-------------------------------------------------------
This SF.NET email is sponsored by: AMD - Your access to the experts
on Hammer Technology! Open Source & Linux Developers, register now
for the AMD Developer Symposium. Code: EX8664
http://www.developwithamd.com/developerlab
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: new "in-compatible" alsa-lib PCM API
2002-09-18 13:58 ` Thierry Vignaud
@ 2002-09-18 14:19 ` Paul Davis
2002-09-18 15:08 ` Takashi Iwai
2002-09-18 14:50 ` Tim Goetze
1 sibling, 1 reply; 35+ messages in thread
From: Paul Davis @ 2002-09-18 14:19 UTC (permalink / raw)
To: Thierry Vignaud
Cc: Tim Goetze, Jaroslav Kysela, alsa-devel@lists.sourceforge.net
>this is the /usr/share/aclocal/alsa.m4 job to provide right linking
>flags depending of the library
ah. typical autoconf confusion here.
autoconf looks in only ONE directory by default for *.m4 files. if it
was installed from a package, it probably looks in
/usr/share/aclocal. if it was installed from source, it probably looks
in /usr/local/share/aclocal. there is no way to make it look in both
places without supplying explicit command line arguments, and since
autoconf is frequently run by the entire configure system, this is
hard to do. why autoconf does this is beyond me; it entirely forgets
the long unix tradition of FOO_PATH environment variables.
this causes no end of difficulties when using software that is
generally installed from a tgz or CVS (such as ALSA) on systems where
autoconf was installed from a package. autoconf will complain that it
can't find the foo.m4 file (because its in the "wrong" place).
--p
-------------------------------------------------------
This SF.NET email is sponsored by: AMD - Your access to the experts
on Hammer Technology! Open Source & Linux Developers, register now
for the AMD Developer Symposium. Code: EX8664
http://www.developwithamd.com/developerlab
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: new "in-compatible" alsa-lib PCM API
2002-09-18 14:19 ` Paul Davis
@ 2002-09-18 15:08 ` Takashi Iwai
0 siblings, 0 replies; 35+ messages in thread
From: Takashi Iwai @ 2002-09-18 15:08 UTC (permalink / raw)
To: Paul Davis
Cc: Thierry Vignaud, Tim Goetze, Jaroslav Kysela,
alsa-devel@lists.sourceforge.net
At Wed, 18 Sep 2002 10:19:48 -0400,
Paul Davis wrote:
>
> this causes no end of difficulties when using software that is
> generally installed from a tgz or CVS (such as ALSA) on systems where
> autoconf was installed from a package. autoconf will complain that it
> can't find the foo.m4 file (because its in the "wrong" place).
<off-topic>
ALSA uses /usr as the default prefix, so _usually_ the path is
identical with the system's.
</off-topic>
Takashi
-------------------------------------------------------
This SF.NET email is sponsored by: AMD - Your access to the experts
on Hammer Technology! Open Source & Linux Developers, register now
for the AMD Developer Symposium. Code: EX8664
http://www.developwithamd.com/developerlab
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: new "in-compatible" alsa-lib PCM API
2002-09-18 13:58 ` Thierry Vignaud
2002-09-18 14:19 ` Paul Davis
@ 2002-09-18 14:50 ` Tim Goetze
2002-09-18 15:07 ` Richard Bown
2002-09-18 15:17 ` Patrick Shirkey
1 sibling, 2 replies; 35+ messages in thread
From: Tim Goetze @ 2002-09-18 14:50 UTC (permalink / raw)
To: Thierry Vignaud; +Cc: Jaroslav Kysela, alsa-devel@lists.sourceforge.net
Thierry Vignaud wrote:
>Tim Goetze <tim@quitte.de> writes:
>
>> > autoconfiguration code to alsa.m4. My suggestion is to use
>> > /opt/alsa/rc3 directory for this job. Comments?
>>
>> /opt is redhat only, debian systems do not have it.
>
>err, even if i dislike it, /opt is defined by the fhs
>
>anyway, api incompatibles libraries can cohabit in the same place with
>different majors.
>
>debian and major enable one to have multiples versions of the same lib
>provided the upstream authors increase it major on each api and/or abi
>change. one can only have one devel library package (aka headers, ...)
>
>this is the /usr/share/aclocal/alsa.m4 job to provide right linking
>flags depending of the library
anyway, i agree with paul that pkg-config should be used instead,
which offers a lot more flexibility.
now that i think about it some more, i feel compelled to add:
this dance around the 0.9.0 version seems ridiculous to me. the
logical consequence of API changes is bumping the version number,
and not hiding it in a 'nano' version increment.
sorry for the harsh words,
tim
-------------------------------------------------------
This SF.NET email is sponsored by: AMD - Your access to the experts
on Hammer Technology! Open Source & Linux Developers, register now
for the AMD Developer Symposium. Code: EX8664
http://www.developwithamd.com/developerlab
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: new "in-compatible" alsa-lib PCM API
2002-09-18 14:50 ` Tim Goetze
@ 2002-09-18 15:07 ` Richard Bown
2002-09-18 15:18 ` Paul Davis
2002-09-18 15:17 ` Patrick Shirkey
1 sibling, 1 reply; 35+ messages in thread
From: Richard Bown @ 2002-09-18 15:07 UTC (permalink / raw)
To: Tim Goetze, Thierry Vignaud
Cc: Jaroslav Kysela, alsa-devel@lists.sourceforge.net
On Wednesday 18 September 2002 15:50, Tim Goetze wrote:
> anyway, i agree with paul that pkg-config should be used instead,
> which offers a lot more flexibility.
That's as maybe but it's "non-standard" still isn't it? Another dependency
in a complicated world. I think it's too soon.
However, all this scratching's making me bored.
B
-------------------------------------------------------
This SF.NET email is sponsored by: AMD - Your access to the experts
on Hammer Technology! Open Source & Linux Developers, register now
for the AMD Developer Symposium. Code: EX8664
http://www.developwithamd.com/developerlab
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: new "in-compatible" alsa-lib PCM API
2002-09-18 15:07 ` Richard Bown
@ 2002-09-18 15:18 ` Paul Davis
2002-09-18 15:28 ` Richard Bown
0 siblings, 1 reply; 35+ messages in thread
From: Paul Davis @ 2002-09-18 15:18 UTC (permalink / raw)
To: alsa-devel@lists.sourceforge.net
>> anyway, i agree with paul that pkg-config should be used instead,
>> which offers a lot more flexibility.
>
>That's as maybe but it's "non-standard" still isn't it? Another dependency
>in a complicated world. I think it's too soon.
its part of all distributions at this point. its about as standard as
autoconf.
--p
-------------------------------------------------------
This SF.NET email is sponsored by: AMD - Your access to the experts
on Hammer Technology! Open Source & Linux Developers, register now
for the AMD Developer Symposium. Code: EX8664
http://www.developwithamd.com/developerlab
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: new "in-compatible" alsa-lib PCM API
2002-09-18 15:18 ` Paul Davis
@ 2002-09-18 15:28 ` Richard Bown
0 siblings, 0 replies; 35+ messages in thread
From: Richard Bown @ 2002-09-18 15:28 UTC (permalink / raw)
To: Paul Davis, alsa-devel@lists.sourceforge.net
On Wednesday 18 September 2002 16:18, Paul Davis wrote:
> its part of all distributions at this point. its about as standard as
> autoconf.
While it may be part of the distros it's not always installed as default.
My SuSE 8.0 DVD has it on but I still had to fish it out.
While we're at it - did I dream that JACK CVS is now looking for fltk by
default configure or was that reality?
B
-------------------------------------------------------
This SF.NET email is sponsored by: AMD - Your access to the experts
on Hammer Technology! Open Source & Linux Developers, register now
for the AMD Developer Symposium. Code: EX8664
http://www.developwithamd.com/developerlab
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: new "in-compatible" alsa-lib PCM API
2002-09-18 14:50 ` Tim Goetze
2002-09-18 15:07 ` Richard Bown
@ 2002-09-18 15:17 ` Patrick Shirkey
1 sibling, 0 replies; 35+ messages in thread
From: Patrick Shirkey @ 2002-09-18 15:17 UTC (permalink / raw)
To: Tim Goetze; +Cc: alsa-devel@lists.sourceforge.net
Tim Goetze wrote:
> now that i think about it some more, i feel compelled to add:
>
> this dance around the 0.9.0 version seems ridiculous to me. the
> logical consequence of API changes is bumping the version number,
> and not hiding it in a 'nano' version increment.
>
> sorry for the harsh words,
>
So does that mean ALSA has reached 1.1.0?
--
Patrick Shirkey - Boost Hardware Ltd.
For the discerning hardware connoisseur
Http://www.boosthardware.com
Http://www.boosthardware.com/LAU/guide/
========================================
"Um...symbol_get and symbol_put... They're
kindof like does anyone remember like get_symbol
and put_symbol I think we used to have..."
- Rusty Russell in his talk on the module subsystem
-------------------------------------------------------
This SF.NET email is sponsored by: AMD - Your access to the experts
on Hammer Technology! Open Source & Linux Developers, register now
for the AMD Developer Symposium. Code: EX8664
http://www.developwithamd.com/developerlab
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: new "in-compatible" alsa-lib PCM API
2002-09-18 12:21 ` Jaroslav Kysela
2002-09-18 13:15 ` Tim Goetze
@ 2002-09-18 13:49 ` Paul Davis
2002-09-18 15:00 ` Takashi Iwai
` (3 subsequent siblings)
5 siblings, 0 replies; 35+ messages in thread
From: Paul Davis @ 2002-09-18 13:49 UTC (permalink / raw)
To: Jaroslav Kysela; +Cc: Chris Rankin, alsa-devel@lists.sourceforge.net
>1) build library with --with-compat-rc3 and place it to some
> other directory
>3) build library without --with-compat-rc3, place it to
> /usr/lib as usuall
>4) build alsa-utils and newer applications
>5) build older applications with compatible library compiled
> with --with-compat-rc3
>
>Old and new software will co-exist without any problems. Perhaps, we
>can have some good default place for rc3 compatible library and add an
>autoconfiguration code to alsa.m4. My suggestion is to use /opt/alsa/rc3
>directory for this job. Comments?
the use of autoconf files like alsa.m4 is now deprecated by the very
people who invented them. can we please use pkgconfig instead? its
much more flexible.
i don't like the above scheme at all.
what's going on here is the same thing that was happening a year ago,
only now *some* level of attention is being paid to the notion of
binary compatibility. the problem is, its not the right kind of
attention. the changes that have been made break the API. a year ago,
there was no problem telling us app developers that we just had to
keep following the API changes. now, because we are at 0.9.0rcN, there
is some sense that this isn't OK to do. the problem is that the
solution being provided as an alternative to "change your code" is
really rather cumbersome and awkward.
how should we carry out step (5) when we may not "know" where the rc3
library is to be found? this necessitates having alsa-rc3.m4 (or
better, alsa-rc3.pc) floating around, and STILL changing apps - just
their configure files, not their source. its worse, however, because a
lot of apps don't use alsa.m4 (i didn't even know it existed, for
example). they just use AC_CHECK_LIB, which will almost certainly look
in the place where the rc4 library is probably installed. its not easy
to make it do anything else.
look, once again the API has been modified without any attempt to
notify application developers ahead of time, without any attempt to
collect input from application developers and without any prior plan
for how to maintain back-compatability. this is very very regrettable.
but the changes have been made, they appear to be for a good reason,
and i think that its probably best to just forget about trying to
maintain back-compatibility in any way. the problem i see coming up is
that the attitude that these kinds of changes are OK to do seems quite
ingrained in jaroslav. i am worried what will happen when 1.0.0 comes
out, and then it *really* becomes unacceptable to do this kind of
thing any more than once a year (roughly speaking).
at the very least, move to pkgconfig so that apps can find the alsa
libs easily.
--p
-------------------------------------------------------
This SF.NET email is sponsored by: AMD - Your access to the experts
on Hammer Technology! Open Source & Linux Developers, register now
for the AMD Developer Symposium. Code: EX8664
http://www.developwithamd.com/developerlab
^ permalink raw reply [flat|nested] 35+ messages in thread* Re: new "in-compatible" alsa-lib PCM API
2002-09-18 12:21 ` Jaroslav Kysela
2002-09-18 13:15 ` Tim Goetze
2002-09-18 13:49 ` Paul Davis
@ 2002-09-18 15:00 ` Takashi Iwai
2002-09-18 16:06 ` Jack O'Quin
` (2 subsequent siblings)
5 siblings, 0 replies; 35+ messages in thread
From: Takashi Iwai @ 2002-09-18 15:00 UTC (permalink / raw)
To: Jaroslav Kysela; +Cc: Chris Rankin, alsa-devel@lists.sourceforge.net
At Wed, 18 Sep 2002 14:21:44 +0200 (CEST),
Jaroslav Kysela wrote:
>
> On Wed, 18 Sep 2002, [iso-8859-1] Chris Rankin wrote:
>
> > --- Jaroslav Kysela <perex@perex.cz> wrote: > On Wed,
> > 18 Sep 2002, Chris Rankin wrote:
> > > Note: If
> > > SND_COMPATIBILITY_BUILD_RC3 is defined,
> > > then applications need to fall back to 0.9.0rc3 API
> > > as well.
> >
> > So maybe we could have a --with-compat-rc3 option for
> > alsa-utils as well? Regardless of which alsa-lib I
> > build, I always need to be able to build alsa-utils.
> > And I doubt that wine and xine will get updated before
> > -rc4 is released. (Unless there's a document somewhere
> > explaining the relationship between the old and new
> > API functions, in which case I could submit patches
> > myself.)
>
> It seems, that you're not understand the compatibility.
>
> 1) build library with --with-compat-rc3 and place it to some
> other directory
> 3) build library without --with-compat-rc3, place it to
> /usr/lib as usuall
> 4) build alsa-utils and newer applications
> 5) build older applications with compatible library compiled
> with --with-compat-rc3
>
> Old and new software will co-exist without any problems. Perhaps, we
> can have some good default place for rc3 compatible library and add an
> autoconfiguration code to alsa.m4. My suggestion is to use /opt/alsa/rc3
> directory for this job. Comments?
well, i think this is too complicated. if we need two lib binaries,
then let's use different so numbers, not the different paths.
i.e.
compat-rc3 --> build libasound.so.2 without versioned symbols.
new lib --> build libasound.so.3 with versioned symbols for
the future confliction.
and how about to separate the function declarations of these two
versions into individual parts (or files) instead of combined
declarations with a macro (or ifdef)? the old functions will be never
changed in future.
... but still i'd prefer adding new functions (or changing the whole
snd_pcm_hw_params_xxx to different names such like
snd_pcm_hw_setup_xxx to avoid confliction) to modifying the existing
api functions. so there will be no compatibility problem at this
time.
ciao,
Takashi
-------------------------------------------------------
This SF.NET email is sponsored by: AMD - Your access to the experts
on Hammer Technology! Open Source & Linux Developers, register now
for the AMD Developer Symposium. Code: EX8664
http://www.developwithamd.com/developerlab
^ permalink raw reply [flat|nested] 35+ messages in thread* Re: new "in-compatible" alsa-lib PCM API
2002-09-18 12:21 ` Jaroslav Kysela
` (2 preceding siblings ...)
2002-09-18 15:00 ` Takashi Iwai
@ 2002-09-18 16:06 ` Jack O'Quin
2002-09-19 15:29 ` Jaroslav Kysela
2002-09-18 18:58 ` Fernando Pablo Lopez-Lezcano
2002-09-18 21:30 ` Chris Rankin
5 siblings, 1 reply; 35+ messages in thread
From: Jack O'Quin @ 2002-09-18 16:06 UTC (permalink / raw)
To: Jaroslav Kysela; +Cc: alsa-devel@lists.sourceforge.net
Jaroslav,
I must respectfully point out that your response proves that there
*is* a problem. This solution is *compicated*. You're a smart guy.
You probably feel you understand all its implications. Perhaps you
do. But, most ALSA users and developers *do not* and *will not*.
I am sorry to report that ALSA has a bad reputation on other forums
(like debian-users). People appreciate the technology, but they can't
get it working, usually because of some silly problem like this one.
For every "clueless newbie" who asks for help on alsa-users there are
nine more who just shrug their shoulders and give up on ALSA.
ALSA 0.9.0-rc3 was released with a trivial mistake that prevented the
source from even compiling. We should have immediately released rc4
with a fix for this error. Instead, we're replacing the broken rc3
source with an rc4 that requires changes in source or configuration to
compile anything. Pretty soon, no one outside this list is even going
to take ALSA 0.9.0 seriously. If we don't, why should they?
Clearly, making this non-release-critical interface cleanup has
created a release-critical level of confusion.
I ask you again: *please* back out this change.
Jaroslav Kysela <perex@perex.cz> writes:
> It seems, that you're not understand the compatibility.
>
> 1) build library with --with-compat-rc3 and place it to some
> other directory
> 3) build library without --with-compat-rc3, place it to
> /usr/lib as usuall
> 4) build alsa-utils and newer applications
> 5) build older applications with compatible library compiled
> with --with-compat-rc3
>
> Old and new software will co-exist without any problems. Perhaps, we
> can have some good default place for rc3 compatible library and add an
> autoconfiguration code to alsa.m4. My suggestion is to use /opt/alsa/rc3
> directory for this job. Comments?
--
Jack O'Quin
Austin, Texas, USA
http://www.stellajazz.com
-------------------------------------------------------
This SF.NET email is sponsored by: AMD - Your access to the experts
on Hammer Technology! Open Source & Linux Developers, register now
for the AMD Developer Symposium. Code: EX8664
http://www.developwithamd.com/developerlab
^ permalink raw reply [flat|nested] 35+ messages in thread* Re: new "in-compatible" alsa-lib PCM API
2002-09-18 16:06 ` Jack O'Quin
@ 2002-09-19 15:29 ` Jaroslav Kysela
2002-09-19 19:36 ` Jack O'Quin
2002-09-20 10:20 ` Takashi Iwai
0 siblings, 2 replies; 35+ messages in thread
From: Jaroslav Kysela @ 2002-09-19 15:29 UTC (permalink / raw)
To: ALSA development
Hi all,
your almost all negative messages persuaded me to wait awhile with
new function prototypes. Here is the result:
- .so library number returned to .2
- library builds with versioned symbols since now, default tag is ALSA_0.9
- new snd_pcm_hw_params_* function are available with tag ALSA_0.9.0rc4
(not available for default linking); these new functions are explicitly
available when ALSA_PCM_NEW_HW_PARAMS_API is defined before inclusion of
asoundlib.h
- old (default, implicit) functions are not documented from this time,
each references in documentation are to newer API
These changes allows us to use newer API (first change for ALSA 1.0) now
without any constraints for old and new APIs. The alsa-utils and
alsa-tools programs use new API since now.
Let me know, if you have some usage problem, but I hope that this library
will behave in same way as 0.9.0rc3 does.
Jaroslav
-----
Jaroslav Kysela <perex@suse.cz>
Linux Kernel Sound Maintainer
ALSA Project http://www.alsa-project.org
SuSE Linux http://www.suse.com
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: new "in-compatible" alsa-lib PCM API
2002-09-19 15:29 ` Jaroslav Kysela
@ 2002-09-19 19:36 ` Jack O'Quin
2002-09-20 10:20 ` Takashi Iwai
1 sibling, 0 replies; 35+ messages in thread
From: Jack O'Quin @ 2002-09-19 19:36 UTC (permalink / raw)
To: ALSA development
Jaroslav Kysela <perex@perex.cz> writes:
> your almost all negative messages persuaded me to wait awhile with
> new function prototypes.
Thanks for listening, Jaroslav. :-)
I intended my comments to be "negative" only in the narrow sense
("let's don't do this"), and not in the broader meanings of
"obstructive" or "pessimistic".
You're doing an important job, and we all appreciate it.
Regards,
--
Jack O'Quin
Austin, Texas, USA
http://www.stellajazz.com
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
^ permalink raw reply [flat|nested] 35+ messages in thread* Re: new "in-compatible" alsa-lib PCM API
2002-09-19 15:29 ` Jaroslav Kysela
2002-09-19 19:36 ` Jack O'Quin
@ 2002-09-20 10:20 ` Takashi Iwai
2002-09-20 12:40 ` Kai Vehmanen
1 sibling, 1 reply; 35+ messages in thread
From: Takashi Iwai @ 2002-09-20 10:20 UTC (permalink / raw)
To: Jaroslav Kysela; +Cc: ALSA development
Hi Jaroslav,
At Thu, 19 Sep 2002 17:29:48 +0200 (CEST),
Jaroslav Kysela wrote:
>
> Hi all,
>
> your almost all negative messages persuaded me to wait awhile with
> new function prototypes. Here is the result:
thanks for quick reaction.
the new library works fine with the old applications.
>
> - .so library number returned to .2
fine, we can keep the old apps.
> - library builds with versioned symbols since now, default tag is ALSA_0.9
> - new snd_pcm_hw_params_* function are available with tag ALSA_0.9.0rc4
> (not available for default linking); these new functions are explicitly
> available when ALSA_PCM_NEW_HW_PARAMS_API is defined before inclusion of
> asoundlib.h
will this condition be removed in the future release as default?
we can put ALSA_PCM_OLD_HW_PARAM_API for the backward compatibility
later, instead.
> - old (default, implicit) functions are not documented from this time,
> each references in documentation are to newer API
it would be nice to put a note that this api was changed since
0.9.0rc2.
Takashi
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: new "in-compatible" alsa-lib PCM API
2002-09-20 10:20 ` Takashi Iwai
@ 2002-09-20 12:40 ` Kai Vehmanen
2002-09-21 5:41 ` Jaroslav Kysela
0 siblings, 1 reply; 35+ messages in thread
From: Kai Vehmanen @ 2002-09-20 12:40 UTC (permalink / raw)
To: alsa-devel
On Fri, 20 Sep 2002, Takashi Iwai wrote:
>> your almost all negative messages persuaded me to wait awhile with
>> new function prototypes. Here is the result:
> thanks for quick reaction.
> the new library works fine with the old applications.
Btw; with ld from binutils-2.9.5.0.22-6 (rh62) I get the
following error when linking libasound:
/usr/bin/ld: .libs/libasound.so.2.0.0: undefined versioned symbol name snd_pcm_hw_params_get_rate_min@ALSA_0.9.0rc4
/usr/bin/ld: failed to set dynamic section sizes: Bad value collect2: ld returned 1 exit status
And this with a fresh CVS-update of alsa-lib. Might
be a clear ld bug.
>> (not available for default linking); these new functions are explicitly
>> available when ALSA_PCM_NEW_HW_PARAMS_API is defined before inclusion of
> will this condition be removed in the future release as default?
> we can put ALSA_PCM_OLD_HW_PARAM_API for the backward compatibility
> later, instead.
It's too bad there isn't better language-level support for versioned
interfaces. You can do all kinds of things with the preprocessor and
linker, but this really should be something all developers are all aware
of and know how to use.
The basic scenario is:
1. library implements a set of interfaces (v1, v2, ...)
2. application using the library uses one of the
interface versions (and note, it's important that
application code always explicitly defines what
interface is wants to use)
Age of each interface should span multiple major releases of the library,
but not nocessarily more than that (maintaining (especially testing!) more
than two or three different versions in the same physical package starts
to be a mess).
This scenario has numerous benefits:
- application developer can decide the time when
to port from interface x to x+1 (note! after
the change, app will then require library
version x+1 to be installed)
- library developer can continue to improve
the library interfaces without causing
suprises to app developers
Unfortunately implementing the above is anything but easy. Although there
are mechanisms to do (1) (ld scripts, shared-lib versioning), they add
significant overhead to the maintenance work.
But the real problem is (2). There are no commonly used mechanisms for
applications to announce what interface versions of an library package
they want to use. Installing library versions to different directories is
one option, but certainly not an easy one (application developers are not
the ones writing library installation scripts).
Another approach for (2) is the one now used by alsa-lib. In other words,
before including the library headers, we define what library interface
version we want to use.
So should we make this into a standard practise? In other words all apps
should define SND_PCM_SELECT_API_X, where X is the version number, before
including asoundlib.h. This would provide a framework for future API
extensions and changes (there's bound to be some, sooner or later).
If an app tries to select an interface that has already been dropped
from the latest alsa-lib, the compiler can then print an informative
error message about the problem.
But as I mentioned in the beginning, a good argument against this
is that we are talking about a non-standard feature. Without good
and visible documentation, developers don't know how to use the
SND_PCM_SELECT_API_X API selector. Ugh. :(
--
http://www.eca.cx
Audio software for Linux!
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: new "in-compatible" alsa-lib PCM API
2002-09-20 12:40 ` Kai Vehmanen
@ 2002-09-21 5:41 ` Jaroslav Kysela
0 siblings, 0 replies; 35+ messages in thread
From: Jaroslav Kysela @ 2002-09-21 5:41 UTC (permalink / raw)
To: Kai Vehmanen; +Cc: alsa-devel@lists.sourceforge.net
On Fri, 20 Sep 2002, Kai Vehmanen wrote:
> On Fri, 20 Sep 2002, Takashi Iwai wrote:
>
> >> your almost all negative messages persuaded me to wait awhile with
> >> new function prototypes. Here is the result:
> > thanks for quick reaction.
> > the new library works fine with the old applications.
>
> Btw; with ld from binutils-2.9.5.0.22-6 (rh62) I get the
> following error when linking libasound:
>
> /usr/bin/ld: .libs/libasound.so.2.0.0: undefined versioned symbol name snd_pcm_hw_params_get_rate_min@ALSA_0.9.0rc4
> /usr/bin/ld: failed to set dynamic section sizes: Bad value collect2: ld returned 1 exit status
>
> And this with a fresh CVS-update of alsa-lib. Might
> be a clear ld bug.
What's result of this command?
nm alsa/lib/src/pcm.lo | grep snd_pcm_hw_params_get_rate_min
> >> (not available for default linking); these new functions are explicitly
> >> available when ALSA_PCM_NEW_HW_PARAMS_API is defined before inclusion of
> > will this condition be removed in the future release as default?
> > we can put ALSA_PCM_OLD_HW_PARAM_API for the backward compatibility
> > later, instead.
>
> It's too bad there isn't better language-level support for versioned
> interfaces. You can do all kinds of things with the preprocessor and
> linker, but this really should be something all developers are all aware
> of and know how to use.
>
> The basic scenario is:
>
> 1. library implements a set of interfaces (v1, v2, ...)
> 2. application using the library uses one of the
> interface versions (and note, it's important that
> application code always explicitly defines what
> interface is wants to use)
>
> Age of each interface should span multiple major releases of the library,
> but not nocessarily more than that (maintaining (especially testing!) more
> than two or three different versions in the same physical package starts
> to be a mess).
I agree, but the current change is really mostly cosmetic. The enhancement
is the returned error value and unified casting for passed/retured values.
The library code works internally already with new functions, so the
overhead is minimal (only add conversion functions for older API).
I already noted, if API behaviour changes, then it's major change and
we'll increase the major library number, but it's definitely a thing for
1.0 development tree.
Jaroslav
-----
Jaroslav Kysela <perex@suse.cz>
Linux Kernel Sound Maintainer
ALSA Project http://www.alsa-project.org
SuSE Linux http://www.suse.com
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: new "in-compatible" alsa-lib PCM API
2002-09-18 12:21 ` Jaroslav Kysela
` (3 preceding siblings ...)
2002-09-18 16:06 ` Jack O'Quin
@ 2002-09-18 18:58 ` Fernando Pablo Lopez-Lezcano
2002-09-18 21:30 ` Chris Rankin
5 siblings, 0 replies; 35+ messages in thread
From: Fernando Pablo Lopez-Lezcano @ 2002-09-18 18:58 UTC (permalink / raw)
To: Jaroslav Kysela; +Cc: Chris Rankin, alsa-devel@lists.sourceforge.net
> > > Note: If
> > > SND_COMPATIBILITY_BUILD_RC3 is defined,
> > > then applications need to fall back to 0.9.0rc3 API
> > > as well.
> >
> > So maybe we could have a --with-compat-rc3 option for
> > alsa-utils as well? Regardless of which alsa-lib I
> > build, I always need to be able to build alsa-utils.
> > And I doubt that wine and xine will get updated before
> > -rc4 is released. (Unless there's a document somewhere
> > explaining the relationship between the old and new
> > API functions, in which case I could submit patches
> > myself.)
>
> It seems, that you're not understand the compatibility.
>
> 1) build library with --with-compat-rc3 and place it to some
> other directory
No, no and no. No need to if the versions of the library are
different. And they better be different!! They should go into
prefix/lib (normally /usr/lib) so that older applications keep
working until they are recompiled with the new version of the
api.
> 3) build library without --with-compat-rc3, place it to
> /usr/lib as usuall
> 4) build alsa-utils and newer applications
> 5) build older applications with compatible library compiled
> with --with-compat-rc3
Let me see if I understand, after all the compiling and
installing is done we have two shared libraries with different
versions in /usr/lib, and one set of header files in
/usr/include, and the behavior of the header files depends on
SND_COMPATIBILITY_BUILD_RC3 being defined (if it is defined
then the old prototype/api is used, if not then the new
prototype/api is used). So:
- old applications that use the old .so number keep working
- new applications that understand the new api can be
compiled and linked as usual and they work with the new .so
library.
- old applications that have to be recompiled can be
recompiled with the old api if they define
SND_COMPATIBILITY_BUILD_RC3
[but how do they pick the older .so library over the new
one at link time?, remember, they are in the same place, does
this need any extra tricks or it just "happens"?]
Ok, so this is better than nothing, but I still have to say:
This is supposed to be 0.9.0rc3 going on 0.9.0rc4.
This is not 0.6 cvs.
NO API CHANGES PLEASE!!!!!!!!!!
Only bug fixes, new drivers maybe. RC releases are release
candidates, they are supposed to be stabilizing the thing! (in
my understanding)
Furthermore, I found about the api change by _chance_, because
I was testing the latest cvs versions (which have better usb
midi support) and for some reason tried to recompile jack and
it would not compile! I could not believe my eyes.
IF 0.9.0rc3 really means "release candidate 3" then this
change is not acceptable. Nothing is "broken" in the api,
nothing (AFAIK) _needs_ to be fixed or else applications will
not work. This is not new functionality. This is a style
change, to make things prettier and more consistent (which of
course I like). For any api change at any time, at the very
least developers have to be WARNED about the changes. In an
rc3 it should be mandatory (I mean, if you insist on changing
the api when it should be stable). Otherwise lets rename the
version to 0.8 or whatever.
I have to echo the previous comment on this thread: if we
still have an rc3 tarball in the web site that does not
compile out of the box then there is something wrong. Do we
want alsa adopted? Do we think that will happen if people
download it and cannot even compile it?? (no, the warning in
the site is NOT enough - witness the number of emails sent to
the list about this).
Sorry for the rant.
I understand that the sooner an api change is made the better,
but, again, this is rc3 and things are supposed to be stable
NOW.
As was mentioned before, create a NEW set of api calls, mark
the old ones as deprecated and erase them after two or three
releases. And document the improved api in a very distinctive
way, otherwise developers will not even notice the change.
-- Fernando
-------------------------------------------------------
This SF.NET email is sponsored by: AMD - Your access to the experts
on Hammer Technology! Open Source & Linux Developers, register now
for the AMD Developer Symposium. Code: EX8664
http://www.developwithamd.com/developerlab
^ permalink raw reply [flat|nested] 35+ messages in thread* Re: new "in-compatible" alsa-lib PCM API
2002-09-18 12:21 ` Jaroslav Kysela
` (4 preceding siblings ...)
2002-09-18 18:58 ` Fernando Pablo Lopez-Lezcano
@ 2002-09-18 21:30 ` Chris Rankin
2002-09-18 21:44 ` Chris Rankin
5 siblings, 1 reply; 35+ messages in thread
From: Chris Rankin @ 2002-09-18 21:30 UTC (permalink / raw)
To: Jaroslav Kysela; +Cc: alsa-devel@lists.sourceforge.net
--- Jaroslav Kysela <perex@perex.cz> wrote: > On Wed,
18 Sep 2002, [iso-8859-1] Chris Rankin
> wrote:
>> It seems, that you're not understand the
> compatibility.
That's possible - or maybe the existing
"compatibility" is woefully inadequate for the scale
of the problem?
The applications that I am trying to compile with the
compatibility library are the CVS versions of wine and
xine!!! I can't just recompile them and forget about
them because I need the compatibility headers
installed so that I can KEEP recompiling them as I
update them! However, the ALSA utilities don't compile
against the compatibility headers because they are
incompatible!
The possible solutions from my perspective are:
- I install BOTH libraries, each with full headers
(somehow)
- I backport the ALSA utilities to work with the old
API
- I forward port xine and wine to the new API myself
- You back out the incompatible API.
Sincerely,
Chris
__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com
-------------------------------------------------------
This SF.NET email is sponsored by: AMD - Your access to the experts
on Hammer Technology! Open Source & Linux Developers, register now
for the AMD Developer Symposium. Code: EX8664
http://www.developwithamd.com/developerlab
^ permalink raw reply [flat|nested] 35+ messages in thread* Re: new "in-compatible" alsa-lib PCM API
2002-09-18 21:30 ` Chris Rankin
@ 2002-09-18 21:44 ` Chris Rankin
0 siblings, 0 replies; 35+ messages in thread
From: Chris Rankin @ 2002-09-18 21:44 UTC (permalink / raw)
To: Jaroslav Kysela; +Cc: alsa-devel@lists.sourceforge.net
--- Chris Rankin <rankincj@yahoo.com> wrote: > ---
Jaroslav Kysela <perex@perex.cz> wrote: > On
> The possible solutions from my perspective are:
> - I install BOTH libraries, each with full headers
> (somehow)
Oh yes, and the compatibility version has to go in
/usr because that's where the rest of the world
expects to find the ALSA headers.
Chris
__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com
-------------------------------------------------------
This SF.NET email is sponsored by: AMD - Your access to the experts
on Hammer Technology! Open Source & Linux Developers, register now
for the AMD Developer Symposium. Code: EX8664
http://www.developwithamd.com/developerlab
^ permalink raw reply [flat|nested] 35+ messages in thread