All of lore.kernel.org
 help / color / mirror / Atom feed
* Detecting runtime ALSA library version
@ 2004-04-06 20:36 Glenn Maynard
  2004-04-06 21:04 ` Paul Davis
  0 siblings, 1 reply; 5+ messages in thread
From: Glenn Maynard @ 2004-04-06 20:36 UTC (permalink / raw)
  To: alsa-devel

I can't find any way to detect the running ALSA version, for diagnostic
purposes.  It can't be derived from the library name, which doesn't seem
to change (it's always "libasound.so.2.0.0" here, which has no relation
to the actual version).

It's frustrating to receive bug reports like

  https://sourceforge.net/tracker/?func=detail&atid=421366&aid=930335&group_id=37892
  https://sourceforge.net/tracker/download.php?group_id=37892&atid=421366&file_id=82701&aid=930335

and not being able to tell what version of alsa-lib is in use.

I'd recommend an entry point eg. "const char *snd_lib_version()" to get
this information.

As an aside: is it safe to assume that if /proc/asound/ doesn't exist,
ALSA is not in use?  It'd be useful to short circuit ALSA initialization
for OSS people, since they often have old, broken versions of alsa-lib
installed.

(I know that the converse isn't true--it's possible to load the basic
"snd" module, not load anything else, and then load OSS modules,
resulting in a working OSS environment but /proc/asound/ existing.)

-- 
Glenn Maynard


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Detecting runtime ALSA library version
  2004-04-06 20:36 Detecting runtime ALSA library version Glenn Maynard
@ 2004-04-06 21:04 ` Paul Davis
  2004-04-06 21:10   ` Glenn Maynard
  0 siblings, 1 reply; 5+ messages in thread
From: Paul Davis @ 2004-04-06 21:04 UTC (permalink / raw)
  To: Glenn Maynard; +Cc: alsa-devel

>I can't find any way to detect the running ALSA version, for diagnostic

cat /proc/asound/version


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Detecting runtime ALSA library version
  2004-04-06 21:04 ` Paul Davis
@ 2004-04-06 21:10   ` Glenn Maynard
  2004-04-06 22:16     ` James Courtier-Dutton
  0 siblings, 1 reply; 5+ messages in thread
From: Glenn Maynard @ 2004-04-06 21:10 UTC (permalink / raw)
  To: alsa-devel

On Tue, Apr 06, 2004 at 05:04:34PM -0400, Paul Davis wrote:
> >I can't find any way to detect the running ALSA version, for diagnostic
> 
> cat /proc/asound/version

That's the driver version, which I'm already logging.  Like I said, I
want the alsa-lib version that's being linked in, which very often has
no relation to the alsa-driver version.

-- 
Glenn Maynard


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Detecting runtime ALSA library version
  2004-04-06 21:10   ` Glenn Maynard
@ 2004-04-06 22:16     ` James Courtier-Dutton
  2004-04-06 22:38       ` Glenn Maynard
  0 siblings, 1 reply; 5+ messages in thread
From: James Courtier-Dutton @ 2004-04-06 22:16 UTC (permalink / raw)
  To: Glenn Maynard; +Cc: alsa-devel

Glenn Maynard wrote:
> On Tue, Apr 06, 2004 at 05:04:34PM -0400, Paul Davis wrote:
> 
>>>I can't find any way to detect the running ALSA version, for diagnostic
>>
>>cat /proc/asound/version
> 
> 
> That's the driver version, which I'm already logging.  Like I said, I
> want the alsa-lib version that's being linked in, which very often has
> no relation to the alsa-driver version.
> 

cat /usr/include/alsa/version.h  tells you the currently installed version.



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Detecting runtime ALSA library version
  2004-04-06 22:16     ` James Courtier-Dutton
@ 2004-04-06 22:38       ` Glenn Maynard
  0 siblings, 0 replies; 5+ messages in thread
From: Glenn Maynard @ 2004-04-06 22:38 UTC (permalink / raw)
  To: alsa-devel

On Tue, Apr 06, 2004 at 11:16:17PM +0100, James Courtier-Dutton wrote:
> cat /usr/include/alsa/version.h  tells you the currently installed version.

Nope.  That only works if the development files are installed; on user
systems, they usually aren't.  I can't simply #include it; that'll tell
me what version of ALSA was installed by the person that built the binary
(which is usually not the same person), and won't follow dynamic library
upgrades.

Also, even if ALSA development files are installed, there's always a
chance there's a mismatch; for example, there may be one version of ALSA
in /usr/lib and another in /usr/local/lib.

I want to know what real version of libasound.so the application is
linked against, without having to worry about user error or unusual
configurations resulting in incorrect output.

This is why many libraries export a function to return the version in
use: png_access_version_number, png_get_libpng_ver, zlibVersion(),
SDL_Linked_Version(), confstr(_CS_GNU_LIBC_VERSION), and so on.

-- 
Glenn Maynard


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-04-06 22:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-04-06 20:36 Detecting runtime ALSA library version Glenn Maynard
2004-04-06 21:04 ` Paul Davis
2004-04-06 21:10   ` Glenn Maynard
2004-04-06 22:16     ` James Courtier-Dutton
2004-04-06 22:38       ` Glenn Maynard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.