MPEG Support
Hello, all,
Does the 2.2.x sound driver yet support MPEG? Or is this being coded up in ALSA (I've not looked at this) or video-for-linux?
On a related question, does anyone know the current status of the programmer's guide to the OSS API? I saw a blurb on their site
(http://www.opensound.com/pguide/index.html) that it was currently being updated, but quite some time has passed, and I'm quite sure that it has become dated.
Thanks and regards,
Kurt
Signature · 1 line
We totally deny the allegations, and we're trying to identify the allegators.
Quoted 11 lines · Kurt Wall
Hello, all,
Does the 2.2.x sound driver yet support MPEG? Or is this being coded up in ALSA (I've not looked at this) or video-for-linux?
On a related question, does anyone know the current status of the programmer's guide to the OSS API? I saw a blurb on their site
(http://www.opensound.com/pguide/index.html) that it was currently being updated, but quite some time has passed, and I'm quite sure that it has become dated.
Quoted 4 lines
Thanks and regards,
Kurt
If you are speaking about MPEG audio Layer II / Layer III ( MP2/MP3) , then you can AND SHOULD do this in userspace.
there are several MP2/MP3 players arount like freeamp (
http://www.freeamp.org ) , or XMMS ( http://www.xmms.org )
if you need a great MPEG decoding audio library you can get it at http://www.xaudio.com
It's one of the fastest around the planet :-) (Includes pentium optimized decoding routines)
Alternatively you can use the decoding lib of mpg123.
A good MP3 encoder for Linux is Bladeenc (you can find the link at
http://www.mpeg.org )
hope this helps,
regards,
Benno.
I have to disagree with you here. I believe that MPEG audio decoding/encoding and MPEG video decoding/encoding optional devices such as /dev/mpad /dev/mpae /dev/mpvd /dev/mpve would be emensely useful. It would save so much rewritten code (libraries are never quite as good as they sound) and my programs would instantaneously become much more enhanced. Besides, since MPEG decoding/encoding cards are popular these days, you begin to see the speed required (so much so that so many cards exist) so putting low level kernel routines into the kernel would probably be the only way to achieve maximum software "emulation" of these expensive cards.
Quoted 30 lines · Benno Senoner
Quoted 11 lines · Kurt Wall
Hello, all,
Does the 2.2.x sound driver yet support MPEG? Or is this being coded up in ALSA (I've not looked at this) or video-for-linux?
On a related question, does anyone know the current status of the programmer's guide to the OSS API? I saw a blurb on their site
(http://www.opensound.com/pguide/index.html) that it was currently being updated, but quite some time has passed, and I'm quite sure that it has become dated.Quoted 4 lines
Thanks and regards,
Kurt
--If you are speaking about MPEG audio Layer II / Layer III ( MP2/MP3) , then you can AND SHOULD do this in userspace.
there are several MP2/MP3 players arount like freeamp (
http://www.freeamp.org ) , or XMMS ( http://www.xmms.org )if you need a great MPEG decoding audio library you can get it at http://www.xaudio.com
It's one of the fastest around the planet :-) (Includes pentium optimized decoding routines)Alternatively you can use the decoding lib of mpg123.
Quoted 7 lines
A good MP3 encoder for Linux is Bladeenc (you can find the link at
http://www.mpeg.org )hope this helps,
regards,
Benno.
--
Jonathan C. Masters ([email protected])
PGP: www.brookes.ac.uk/~95227860/KEY
"Upon this rock I will build my church,
and the gates of hell shall not prevail against it".
-- Matthew 16, 17-18
Quoted 2 lines · Kurt Wall
Does the 2.2.x sound driver yet support MPEG? Or is this being coded up in ALSA (I've not looked at this) or video-for-linux?
Why would it want to? It doesn't make sense to put a software MPEG decoding engine in the kernel. Only if the hardware has an MPEG decoder (is there any PC hardware that does this?) it's interface should be exposed to user space by the sound driver.
Tom
Also sprach Jonathan C. Masters:
Quoted 9 lines
I have to disagree with you here. I believe that MPEG audio decoding/encoding and MPEG video decoding/encoding optional devices such as
/dev/mpad/dev/mpae/dev/mpvd/dev/mpvewould be emensely useful. It would save so much rewritten code (libraries are never quite as good as they sound) and my programs would instantaneously become much more enhanced. Besides, since MPEG decoding/encoding cards are popular these days, you begin to see the speed required (so much so that so many cards exist) so putting low level kernel routines into the kernel would probably be the only way to achieve maximum software "emulation" of these expensive cards.
The original question I asked was simply if MPEG support had ever been added to the <linux/soundcard.h>, as some of the declarations therein seemed to suggest that such support would be added. I didn't ask for a lecture on whether or not it is appropriate to add such to the kernel
As it is, I concur with the posters who wrote that this is not appropriate for the kernel. The kernel is big enough as it is, but, more to the point, this is just something that needs to be done in userland or, perhaps, implemented as a loadable module if you the need for kernel access can be demonstrated. There appear to be several good libraries for achieving the sort of speed necessary for decoding/encoding layer II/III files, so I don't see the need for more bulk in the kernel.
My $US 1/50. Thanks to those who replied.
[snippety snip snip]
Kurt
Quoted 5 lines · Jonathan C. Masters
I have to disagree with you here. I believe that MPEG audio decoding/encoding and MPEG video decoding/encoding optional devices such as
/dev/mpad/dev/mpae/dev/mpvd/dev/mpvewould be emensely useful. It would save so much rewritten code (libraries are never quite as good as they sound) and my programs would
Why should a library be worse than kernel code?
Furthermore, in the kernel, you can't use:
- MMX
- Floating point
- KNI or ISSE or 3dNOW.
So kernel code will be slower than usermode code.
Quoted 2 lines
instantaneously become much more enhanced. Besides, since MPEG decoding/encoding cards are popular these days, you begin to see the speed required (so much so
Please name one that does MPEG _AUDIO_, I don't know one. (I know about MPEG video cards...)
Tom
Also sprach Hannu Savolainen:
Quoted 10 lines · Kurt Wall
Quoted 5 lines
The original question I asked was simply if MPEG support had ever been added to the <
linux/soundcard.h>, as some of the declarations therein seemed to suggest that such support would be added. I didn't ask for a lecture on whether or not it is appropriate to add such to the kernelThe define for MPEG audio was added there for cards with hardware MPEG audio capability. At that time (good old 486 days) software MPEG in kernel simply was not possible. The definition was added just for future purposes.
Well, da man hisself, he done said it. Thread closed. :-)
Kurt
Signature · 5 lines
Didja' ever have to make up your mind, Pick up on one and leave the other behind, It's not often easy, and it's not often kind, Didja' ever have to make up your mind? -- Lovin' Spoonful
Quoted 7 lines · Thomas Sailer
Quoted 5 lines · Jonathan C. Masters
I have to disagree with you here. I believe that MPEG audio decoding/encoding and MPEG video decoding/encoding optional devices such as
/dev/mpad/dev/mpae/dev/mpvd/dev/mpvewould be emensely useful. It would save so much rewritten code (libraries are never quite as good as they sound) and my programs would
Quoted 6 lines
Why should a library be worse than kernel code?
Furthermore, in the kernel, you can't use:
- MMX
- Floating point
- KNI or ISSE or 3dNOW.
Tom, could you please explain why we can't use these instructions in kernel mode ?
I thougth that Linux don't use FP due to performance reasons, but not because it's not allowed.
RT Linux seems to have some FP restrictions as well, but I think this is due to the fact that FP instructions could cause exceptions, which might ruin RT responsiveness by a few usecs.
:-)
Quoted 8 lines
So kernel code will be slower than usermode code.
Quoted 2 lines
instantaneously become much more enhanced. Besides, since MPEG decoding/encoding cards are popular these days, you begin to see the speed required (so much so
Please name one that does MPEG _AUDIO_, I don't know one. (I know about MPEG video cards...)
Agreed, just provide a standard mpeg library with a well defined API , that every audio app can use easily.
Quoted 2 lines
Tom
Benno.
Quoted 8 lines · [email protected] wrote:
Tom, could you please explain why we can't use these instructions in kernel mode ?
I thougth that Linux don't use FP due to performance reasons, but not because it's not allowed.
RT Linux seems to have some FP restrictions as well, but I think this is due to the fact that FP instructions could cause exceptions, which might ruin RT responsiveness by a few usecs.
:-)
Exceptions are one thing, the other is that the kernel doesn't save FPU state
in the normal case (it does so lazily when switching user space apps).
You could do fsave;fninit by hand, but that would be unportable to other archs and depending on where you do it would ruin some fast paths (like lazy FPU switching 8-)). And fsave/frestore is expensive.
Tom
Quoted 4 lines · Kurt Wall
The original question I asked was simply if MPEG support had ever been added to the <
linux/soundcard.h>, as some of the declarations therein seemed to suggest that such support would be added. I didn't ask for a lecture on whether or not it is appropriate to add such to the kernel
The define for MPEG audio was added there for cards with hardware MPEG audio capability. At that time (good old 486 days) software MPEG in kernel simply was not possible. The definition was added just for future purposes.
Best regards,
Hannu
-----
Hannu Savolainen ([email protected])
http://www.opensound.com (Open Sound System (OSS))
http://www.compusonic.fi (Finnish OSS pages)
Quoted 1 line · Jonathan C. Masters
Besides, since MPEG decoding/encoding cards are popular these days,
But no vendor will release programming information for any of them.
-Dan