Article: Why are we rewriting the QNX RTP audio drivers?

Why are we rewriting the QNX RTP audio drivers?
By James MacMillan, QNX Software Systems Ltd.
Also available at
http://support.qnx.com/support/articles/nov092000/audiodrivers.html

As most of you probably have noticed from posts in the qdn.* newsgroups,
we’re in the midst of rewriting our audio drivers. I imagine that this has
confused some of you. In this article, I hope to explain our reasoning
behind this effort and to provide a glimpse into where we are now and where
we’re going.

The drivers that shipped with the QNX RTP prerelease are based on the ALSA
(Advanced Linux Sound Architecture) 0.5.2 sources
(http://www.alsa-project.org). The ALSA API provides highly detailed control
of the internals of a sound card. Many of the contributors are experts in
the field. However, we reevaluated ALSA’s suitability and were faced with a
number of issues that brought us to the decision to write our own drivers.


GPL and embedded systems
Chief among the issues was the GNU Public License (GPL). While the
open-source movement is rapidly gaining acceptance in the business world and
with the public in general, the embedded world has constraints above and
beyond those in the desktop arena. A number of our customers had expressed
concerns about sections of the license. To address these concerns we are
rewriting our drivers without GPL code.

Vortex and beyond
As a side effect of restarting without GPL, we’re in a much better position
to support our customers. Chip manufactures that require a Non-Disclosure
Agreement (NDA) are now accessible to us once again, and OEM’s can ship
products without the worry of GPL drivers. With the new drivers, we should
finally be able to release support for the Aureal Vortex chipsets. The
Vortex is only the first in a long line of chips that weren’t available to
us without an NDA.

Our drivers are resource managers
Being able to support NDAs isn’t the only advantage of the new drivers. The
GPL ALSA drivers, which were ported to QNX Neutrino, contain a lot of code
that adapted Linux system calls and structures. Our new drivers are native
QNX Neutrino resource managers. This makes for code that’s simpler, leaner,
and easier to understand. As a resource manager, each driver resides in its
own process space and uses QNX Neutrino’s fast message passing for
communication.

A move to consistency
We’re also striving to make the new drivers as consistent as possible. The
GPL ALSA drivers are still in a state of flux. In the time since we branched
from them, ALSA have redone most of their PCM and mixer functionality. The
PCM output paths and techniques are relatively consistent across all GPL
ALSA drivers, but other areas can vary widely. This is acceptable in a
development environment, but since we’re shipping released product,
consistency is required. Without consistency across all drivers, support and
documentation would be a nightmare and third-party applications would be
virtually impossible to create.

You won’t have to recode
It wouldn’t be fair to expect everyone to recode their applications to a
completely new API at this stage of the game, so we’re limiting the changes
as much as possible. Applications written to the GPL drivers shouldn’t break
on the new drivers, but they may bend a little. This is due in part to the
different structure of the internals of the drivers and also to correct
behaviors that are inconsistent with other QNX Neutrino drivers (e.g.
blocking on open() if no channel is available). Depending on your
application, there may be some benefits to restructuring and/or recoding,
but it shouldn’t be absolutely required.

Are we going to see an alternative external API that is not Alsa? Or are
you just talking about replacing the innards?

Patrick Mueller
Patrick_Mueller@oti.com

Interesting article. I’m sort of on two roads here: whether to continue
my efforts to build a driver for my OPTi924 based card using the ALSA
port, or whether to wait on this new native API. (“ANSA”? “AQSA”?
“QANSA”?)

regards,

rick

Debbie Kane wrote:

Why are we rewriting the QNX RTP audio drivers?
By James MacMillan, QNX Software Systems Ltd.
Also available at
http://support.qnx.com/support/articles/nov092000/audiodrivers.html

As most of you probably have noticed from posts in the qdn.* newsgroups,
we’re in the midst of rewriting our audio drivers. I imagine that this has
confused some of you. In this article, I hope to explain our reasoning
behind this effort and to provide a glimpse into where we are now and where
we’re going.

The drivers that shipped with the QNX RTP prerelease are based on the ALSA
(Advanced Linux Sound Architecture) 0.5.2 sources
(> http://www.alsa-project.org> ). The ALSA API provides highly detailed control
of the internals of a sound card. Many of the contributors are experts in
the field. However, we reevaluated ALSA’s suitability and were faced with a
number of issues that brought us to the decision to write our own drivers.

GPL and embedded systems
Chief among the issues was the GNU Public License (GPL). While the
open-source movement is rapidly gaining acceptance in the business world and
with the public in general, the embedded world has constraints above and
beyond those in the desktop arena. A number of our customers had expressed
concerns about sections of the license. To address these concerns we are
rewriting our drivers without GPL code.

Vortex and beyond
As a side effect of restarting without GPL, we’re in a much better position
to support our customers. Chip manufactures that require a Non-Disclosure
Agreement (NDA) are now accessible to us once again, and OEM’s can ship
products without the worry of GPL drivers. With the new drivers, we should
finally be able to release support for the Aureal Vortex chipsets. The
Vortex is only the first in a long line of chips that weren’t available to
us without an NDA.

Our drivers are resource managers
Being able to support NDAs isn’t the only advantage of the new drivers. The
GPL ALSA drivers, which were ported to QNX Neutrino, contain a lot of code
that adapted Linux system calls and structures. Our new drivers are native
QNX Neutrino resource managers. This makes for code that’s simpler, leaner,
and easier to understand. As a resource manager, each driver resides in its
own process space and uses QNX Neutrino’s fast message passing for
communication.

A move to consistency
We’re also striving to make the new drivers as consistent as possible. The
GPL ALSA drivers are still in a state of flux. In the time since we branched
from them, ALSA have redone most of their PCM and mixer functionality. The
PCM output paths and techniques are relatively consistent across all GPL
ALSA drivers, but other areas can vary widely. This is acceptable in a
development environment, but since we’re shipping released product,
consistency is required. Without consistency across all drivers, support and
documentation would be a nightmare and third-party applications would be
virtually impossible to create.

You won’t have to recode
It wouldn’t be fair to expect everyone to recode their applications to a
completely new API at this stage of the game, so we’re limiting the changes
as much as possible. Applications written to the GPL drivers shouldn’t break
on the new drivers, but they may bend a little. This is due in part to the
different structure of the internals of the drivers and also to correct
behaviors that are inconsistent with other QNX Neutrino drivers (e.g.
blocking on open() if no channel is available). Depending on your
application, there may be some benefits to restructuring and/or recoding,
but it shouldn’t be absolutely required.

Patrick,

Effectively, this is a “replacement of the innards”, as you put it.
99% of the exported functionality has not changed, and the parts that
did change only changed slightly.

For the time being, our external driver API will continue to be very
close to the original ALSA. There will be extensions to the API as it
exists today and extra layers of abstraction on top (ex. the multimedia
libs) but the core functionality will remain the same for the forseeable
future. This is a requirement because we cannot expect our customers to
be continually re-coding and re-testing their products.

James M.

Patrick Mueller <patrick_mueller@oti.com> wrote:

Are we going to see an alternative external API that is not Alsa? Or are
you just talking about replacing the innards?

Patrick Mueller
Patrick_Mueller@oti.com

Rick,

Either at the same time as the official release, or shortly after,
it is our intention to have an Audio DDK for the new non-GPL drivers.
If you can’t wait that long, I am sure that the experience and code
that you get from your work on the current drivers would be useful
in creating one for the new architecture as well. However, you would
definitely want a new architecture driver eventually. We are
promoting backwards-compatibility with the old drivers, but not
forward-compatibility with new applications. There are (and will
be more) new features in the new drivers that applications may
come to depend on.

James M.

p.s. To avoid confusion, we will probably continue to use the ALSA
name, but you do put forward an interesting collection of
alternatives. :slight_smile:

Rick Lake <rwlake@spam.redirected.to.dev.null> wrote:

Interesting article. I’m sort of on two roads here: whether to continue
my efforts to build a driver for my OPTi924 based card using the ALSA
port, or whether to wait on this new native API. (“ANSA”? “AQSA”?
“QANSA”?)

regards,

rick

Debbie Kane wrote:

[ clip …]

GPL and embedded systems
Chief among the issues was the GNU Public License (GPL).
[ clip ]

Will be the new license the Library GPL ??

Armin

One thing I would like to see also would be some REAL easy-to-use
function(s), like the Win32 PlaySound() API. Sometimes you just want to
play a little clip …

Patrick Mueller
Patrick_Mueller@oti.com



Debbie Kane <debbie@qnx.com> wrote in message
news:8uopbr$mf2$1@inn.qnx.com

Why are we rewriting the QNX RTP audio drivers?
By James MacMillan, QNX Software Systems Ltd.
Also available at
http://support.qnx.com/support/articles/nov092000/audiodrivers.html

As most of you probably have noticed from posts in the qdn.* newsgroups,
we’re in the midst of rewriting our audio drivers. I imagine that this has
confused some of you. In this article, I hope to explain our reasoning
behind this effort and to provide a glimpse into where we are now and
where
we’re going.

The drivers that shipped with the QNX RTP prerelease are based on the ALSA
(Advanced Linux Sound Architecture) 0.5.2 sources
(> http://www.alsa-project.org> ). The ALSA API provides highly detailed
control
of the internals of a sound card. Many of the contributors are experts in
the field. However, we reevaluated ALSA’s suitability and were faced with
a
number of issues that brought us to the decision to write our own drivers.


GPL and embedded systems
Chief among the issues was the GNU Public License (GPL). While the
open-source movement is rapidly gaining acceptance in the business world
and
with the public in general, the embedded world has constraints above and
beyond those in the desktop arena. A number of our customers had expressed
concerns about sections of the license. To address these concerns we are
rewriting our drivers without GPL code.

Vortex and beyond
As a side effect of restarting without GPL, we’re in a much better
position
to support our customers. Chip manufactures that require a Non-Disclosure
Agreement (NDA) are now accessible to us once again, and OEM’s can ship
products without the worry of GPL drivers. With the new drivers, we should
finally be able to release support for the Aureal Vortex chipsets. The
Vortex is only the first in a long line of chips that weren’t available to
us without an NDA.

Our drivers are resource managers
Being able to support NDAs isn’t the only advantage of the new drivers.
The
GPL ALSA drivers, which were ported to QNX Neutrino, contain a lot of code
that adapted Linux system calls and structures. Our new drivers are native
QNX Neutrino resource managers. This makes for code that’s simpler,
leaner,
and easier to understand. As a resource manager, each driver resides in
its
own process space and uses QNX Neutrino’s fast message passing for
communication.

A move to consistency
We’re also striving to make the new drivers as consistent as possible. The
GPL ALSA drivers are still in a state of flux. In the time since we
branched
from them, ALSA have redone most of their PCM and mixer functionality. The
PCM output paths and techniques are relatively consistent across all GPL
ALSA drivers, but other areas can vary widely. This is acceptable in a
development environment, but since we’re shipping released product,
consistency is required. Without consistency across all drivers, support
and
documentation would be a nightmare and third-party applications would be
virtually impossible to create.

You won’t have to recode
It wouldn’t be fair to expect everyone to recode their applications to a
completely new API at this stage of the game, so we’re limiting the
changes
as much as possible. Applications written to the GPL drivers shouldn’t
break
on the new drivers, but they may bend a little. This is due in part to the
different structure of the internals of the drivers and also to correct
behaviors that are inconsistent with other QNX Neutrino drivers (e.g.
blocking on open() if no channel is available). Depending on your
application, there may be some benefits to restructuring and/or recoding,
but it shouldn’t be absolutely required.

That is a higher level issue that is being handled by the Multimedia
group. The ALSA APIs are as close to the driver as you can get.
It is our intention to have layers on top that abstract common
functionality (ex. play this wav clip) for developers that do not
need the power and flexability of the lowest API. This is still
in relatively early stages, but you can already see some of the
groundwork in the dlls that phplay uses. I am not 100% up to date
on the development in that area, so I am not the best to comment, but
there are some really interesting options in the pipe that should
provide you with simpler interfaces for common requests.

James M.

Patrick Mueller <patrick_mueller@oti.com> wrote:

One thing I would like to see also would be some REAL easy-to-use
function(s), like the Win32 PlaySound() API. Sometimes you just want to
play a little clip …

Patrick Mueller
Patrick_Mueller@oti.com

Armin,

Is your question, “Will the new drivers be licensed under the LGPL”?

If that was your question then the answer is no. It will not be licensed
under the LGPL. The asound library (which already was LGPL) will remain
LGPL, but the new drivers are a completely new code base.
It has not yet been decided how they will be licensed, but I very seriously
doubt that they will be licensed under LGPL.

James M.

Armin Steinhoff <A-Steinhoff@web_.de> wrote:

Debbie Kane wrote:

[ clip …]

GPL and embedded systems
Chief among the issues was the GNU Public License (GPL).
[ clip ]

Will be the new license the Library GPL ??

Armin