* Question on ALSA versions
@ 2004-11-04 6:42 Alexander E. Patrakov
2004-11-04 19:32 ` Lee Revell
0 siblings, 1 reply; 5+ messages in thread
From: Alexander E. Patrakov @ 2004-11-04 6:42 UTC (permalink / raw)
To: alsa-devel
Hello,
I have the following question. Is it OK to have mismatched versions of ALSA
drivers (e.g. 1.0.4, from linux-2.6.8.1) and libs (1.0.6)? This _seems_ to
work, and I see the code to support various versions of the kernel PCM
protocol in the library, but I want to see official words from developers.
Also it would be nice to see the exact range of driver and kernel versions
formally supported by ALSA-lib 1.0.6.
--
Alexander E. Patrakov
-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Question on ALSA versions
2004-11-04 6:42 Question on ALSA versions Alexander E. Patrakov
@ 2004-11-04 19:32 ` Lee Revell
2004-11-05 4:53 ` Alexander E. Patrakov
0 siblings, 1 reply; 5+ messages in thread
From: Lee Revell @ 2004-11-04 19:32 UTC (permalink / raw)
To: Alexander E. Patrakov; +Cc: alsa-devel
On Thu, 2004-11-04 at 11:42 +0500, Alexander E. Patrakov wrote:
> Hello,
>
> I have the following question. Is it OK to have mismatched versions of ALSA
> drivers (e.g. 1.0.4, from linux-2.6.8.1) and libs (1.0.6)? This _seems_ to
> work, and I see the code to support various versions of the kernel PCM
> protocol in the library, but I want to see official words from developers.
This is not guaranteed to work, and could lead to all kinds of weird
problems. Alsa-lib is the mechanism by which changes in the kernel side
ALSA are hidden from userspace. They expect to be the same version.
In practice it usually works but there have been some specific incidents
where this caused problems. For example when a major change is made to
a driver the hardware specific parts of alsa-lib will be updated to
reflect the change.
Lee
-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Question on ALSA versions
2004-11-04 19:32 ` Lee Revell
@ 2004-11-05 4:53 ` Alexander E. Patrakov
2004-11-05 6:03 ` Jaroslav Kysela
0 siblings, 1 reply; 5+ messages in thread
From: Alexander E. Patrakov @ 2004-11-05 4:53 UTC (permalink / raw)
To: alsa-devel
Lee Revell wrote:
> On Thu, 2004-11-04 at 11:42 +0500, Alexander E. Patrakov wrote:
>> Hello,
>>
>> I have the following question. Is it OK to have mismatched versions of
>> ALSA drivers (e.g. 1.0.4, from linux-2.6.8.1) and libs (1.0.6)? This
>> _seems_ to work, and I see the code to support various versions of the
>> kernel PCM protocol in the library, but I want to see official words from
>> developers.
>
> This is not guaranteed to work, and could lead to all kinds of weird
> problems. Alsa-lib is the mechanism by which changes in the kernel side
> ALSA are hidden from userspace. They expect to be the same version.
But the code says, e.g.:
if (ioctl(fd, SNDRV_PCM_IOCTL_PVERSION, &ver) < 0) {
ret = -errno;
SYSERR("SNDRV_PCM_IOCTL_PVERSION failed");
close(fd);
return ret;
}
if (SNDRV_PROTOCOL_INCOMPATIBLE(ver, SNDRV_PCM_VERSION_MAX))
return -SND_ERROR_INCOMPATIBLE_VERSION;
if (SNDRV_PROTOCOL_VERSION(2, 0, 5) <= ver) {
/* old stuff */
}
So, contrary to your words, the code checks not for exactly the same version
but for some match defined by SNDRV_PROTOCOL_INCOMPATIBLE macro:
#define SNDRV_PROTOCOL_INCOMPATIBLE(kversion, uversion) \
(SNDRV_PROTOCOL_MAJOR(kversion) != SNDRV_PROTOCOL_MAJOR(uversion) || \
(SNDRV_PROTOCOL_MAJOR(kversion) == SNDRV_PROTOCOL_MAJOR(uversion) && \
SNDRV_PROTOCOL_MINOR(kversion) != SNDRV_PROTOCOL_MINOR(uversion)))
So the protocols are considered compatible in the code if they have the same
major and minor versions, but differences in micro versions are allowed.
> In practice it usually works but there have been some specific incidents
> where this caused problems. For example when a major change is made to
> a driver the hardware specific parts of alsa-lib will be updated to
> reflect the change.
Isn't it what minor and major versions are for? Or are they just an old
artifact that should not be relied upon? Or there is just lack of testing?
In short: is it a bug when it doesn't work with only micro versions being
different?
--
Alexander E. Patrakov
-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: Re: Question on ALSA versions
2004-11-05 4:53 ` Alexander E. Patrakov
@ 2004-11-05 6:03 ` Jaroslav Kysela
2004-11-05 9:33 ` Alexander E. Patrakov
0 siblings, 1 reply; 5+ messages in thread
From: Jaroslav Kysela @ 2004-11-05 6:03 UTC (permalink / raw)
To: Alexander E. Patrakov; +Cc: alsa-devel
On Fri, 5 Nov 2004, Alexander E. Patrakov wrote:
> > In practice it usually works but there have been some specific incidents
> > where this caused problems. For example when a major change is made to
> > a driver the hardware specific parts of alsa-lib will be updated to
> > reflect the change.
>
> Isn't it what minor and major versions are for? Or are they just an old
> artifact that should not be relied upon? Or there is just lack of testing?
The alsa-lib 1.0+ should be compatible with ALSA driver code in 2.6
kernels. Of course, it's better to use last alsa-lib because of bug-fixes.
This is true for drivers as well.
The alsa-lib code tries to emulate new kernel driver features when older
driver is used. Also, the configuration files might be changes reflecting
the specific lowlevel driver, so in some cases, you'll need configuration
files matching specific driver version (emu10k1 driver is an example).
Jaroslav
-----
Jaroslav Kysela <perex@suse.cz>
Linux Kernel Sound Maintainer
ALSA Project, SUSE Labs
-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Question on ALSA versions
2004-11-05 6:03 ` Jaroslav Kysela
@ 2004-11-05 9:33 ` Alexander E. Patrakov
0 siblings, 0 replies; 5+ messages in thread
From: Alexander E. Patrakov @ 2004-11-05 9:33 UTC (permalink / raw)
To: alsa-devel
Jaroslav Kysela wrote:
> The alsa-lib 1.0+ should be compatible with ALSA driver code in 2.6
> kernels. Of course, it's better to use last alsa-lib because of bug-fixes.
Thanks, I will forward your reply to "Linux From Scratch" development list.
The result will be that alsa-lib 1.0.6 will be used together with the ALSA
drivers that are part of linux-2.6.8.1
> This is true for drivers as well.
Right, but we already have kernel version freeze in "Linux From Scratch" :(
--
Alexander E. Patrakov
-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2004-11-05 9:33 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-04 6:42 Question on ALSA versions Alexander E. Patrakov
2004-11-04 19:32 ` Lee Revell
2004-11-05 4:53 ` Alexander E. Patrakov
2004-11-05 6:03 ` Jaroslav Kysela
2004-11-05 9:33 ` Alexander E. Patrakov
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.