Include a libasound2-plugins-extra package for a52, maemo

Bug #197957 reported by tommy
92
This bug affects 13 people
Affects Status Importance Assigned to Milestone
alsa-plugins (Ubuntu)
Wishlist
Unassigned
Lucid
Wishlist
Unassigned

Bug Description

As the a52 and maemo plugins are not included in ubuntu's libasound2-plugins package, it would be nice to have a libasound2-plugins-extra package available which included these.

Personally I'm using the a52 plugin a lot. It would be great to have this packaged.

Murat Gunes (mgunes)
Changed in alsa-plugins:
importance: Undecided → Wishlist
Revision history for this message
Richard Spindler (richard-spindler) wrote :

I second that request, especially because the alsa-jack plugin is pretty much the only way to make any alsa compatible app jack aware.

And the Documentation of libasound2-plugins also refers to the possibility to use jack, without shipping the jack plugin, which makes the Documentation inaccurate IMHO.

Revision history for this message
Toby Smithe (tsmithe) wrote : Re: no libasound_module_pcm_jack.so in Ubuntu Hardy?

On Mon, Apr 7, 2008 at 12:30 PM, Richard Spindler <email address hidden> wrote:
> Hi,
>
> I just tried to use an alsa application with jack in my newly installed
> Ubuntu Hardy, and to my horror I noticed that the jack-alsa plugin is
> not in libasound2-plugins any more.

This is due to an issue in the build system which means that packages
in main (ie, alsa-plugins) cannot build-depend on packages in universe
(ie, jack).

<snip>
>
> the jack-module won't be included in the default libasound2-plugins
> package because someone wants to install it by default, but does not
> want to have libjack in by default. On launchpad it was suggested to add
> a package like libasound2-plugins-extra that would ship this alsa-module
> and the others that are missing.
>
> What do you think?

This is a great idea, but subject to the caveat I described above, the
only solution would be to have two copies of the alsa-plugins source
in Ubuntu - one in main, and providing most plug-ins, and the other in
universe, providing only those that require universe
build-dependencies (ie, jack). This is not really desirable, but if
you wish to pursue it, the place to do that would be
ubuntu-devel-discuss. I've forwarded this e-mail to Launchpad bug
197957
.

Good luck,

Toby

Revision history for this message
raboof (arnouten) wrote : Re: Include a libasound2-plugins-extra package for a52, jack, maemo

I'm not sure if a severity of merely 'wishlist' is justified here: these plugins (or at least the jack one) used to be available in this package, but were removed when alsa-plugins was moved to main.

In other words, this bug requests a regression to be fixed, rather than merely wishing a new feature to be introduced.

Revision history for this message
HogieWan (hogan-spunge) wrote :

This is an important feature, needed by many. Either add the jack plugin back, or change the documentation and post a guide somewhere for users to add this themselves.

Revision history for this message
teledyn (garym-teledyn) wrote :

it seems sad to leave something as basic as jackd support in the realm of "go compile it yourself" as this isn't an option for many circumstances (eg a small machine being used for music editing) and especially when the fix appears to be easy to do ... except for political reasons. A binary install package in Universe would do the trick nicely, or a libjack-based solution in the main that may install but will not be useful without jackd. Certainly we already have apps which /can/ use jackd that are in the main don't we?

Revision history for this message
Daniel T Chen (crimsun) wrote :

The real solution is not to ship an extras package, thereby duplicating source, but to repromote the necessary bits to main. Working on this for 9.04.

Revision history for this message
jd (jd-typhon) wrote :

Oh, nice (I just asked on #84900 about that). It would be a dramatic improvement in the audio field. Please keep us tuned ;)

Revision history for this message
Daniel Hermansson (daniel.h) wrote :

Any update? Does noone want to touch this?

Revision history for this message
Michael Farrell (micolous) wrote :

I'd like to second a request for such a package.

I've been setting up a home theatre PC running Ubuntu, and I found it very frustrating that Ubuntu's version of the libasound2-plugins package does not support a52 output, when Debian's does. I was connecting the computer to an external amplifier that only supported AC3 over S/PDIF, and not uncompressed PCM which is what Ubuntu attempted to by default.

This had the effect of making sound not work on the computer at all, which we can all agree is important for watching films (that are not silent films). Audio not working is a /major/ issue, I would not consider it only 'wishlist'. It would be like saying "I wish my car would start".

The same computer works absolutely fine with Windows 7, as it supports selecting digital audio transports very easily, and will automatically transcode audio formats that are not supported by your amplifier into one it does.

I had a look back at the old changelogs for the package, and the original reason for removing support was because it would make the LiveCD smaller. I think this is rather hypocritical as we're now at a point where libasound2-plugins depends on pulseaudio (whether you want to use it or not), and many other packages have pulled in larger dependencies than parts of ffmpeg. The library is also being used by other packages such as libgstreamer0.10-ffmpeg, which is essential for the playback of many video formats (which play out-of-the-box in Windows 7).

Even better than just having a -extras package, make the entire package modularised (ie: *-pulseaudio, *-jack, *-a52 etc.) or pull off the pulseaudio support library into a separate source package entirely such that this one can be moved into universe and we can have all the support turned on.

Revision history for this message
Eric Robert (r-eric) wrote :

Many people in audio production need jack support to run jack aware audio apps.
Pulseaudio isn't a good solution with jack
Tired of repackaging libasound2-plugins every time i update my system.
Can' t repackage ia32-libs just to include jack (32 bits) plugin support to run 32 bits apps on my 64 bits system.
So i just compile and copy it in /usr/lib32/alsa-lib (it works great but but it is just a workaround).

Please solve this problem as it seems to be a packaging issue
Thanks

Revision history for this message
Luke Yelavich (themuso) wrote : Re: [Bug 197957] Re: Include a libasound2-plugins-extra package for a52, jack, maemo

This problem cannot be solved at the moment, because jack is in universe, and alsa-plugins is in main. Packages in main cannot be built against packages in universe.

Revision history for this message
raboof (arnouten) wrote : Re: Include a libasound2-plugins-extra package for a52, jack, maemo

This issue proposes a '-extra' package that would also be in universe, thus having access to those plugins that cannot be included in the normal package in main.

As for jack, rumours are it'll be re-included in main for lucid (e.g. https://bugs.launchpad.net/ubuntustudio/+bug/360590/comments/18 ) - let's hope so.

Revision history for this message
Philipp Wendler (philw85) wrote :

I am interested in having the a52 plugin shipped with Ubuntu. If there are difficulties to ship the jack plugin (main <-> universe), could there be a package for at least the a52 plugin, or are there similar difficulties?

Revision history for this message
Kip Warner (kip) wrote :

Hey Philipp. As I understand it, it's not a technical problem (the code has already been written and works), but a moral one. They don't want to ship it by default, like the mp3, because it is covered by patents. Nevertheless, not everyone lives in a locality where software patents have any validity, and thus at least they should have a choice.

It will be nice if we one day have multichannel hardware vorbis decoders in our home theatre systems so we don't have to be stuck with AAC/AC3/DTS.

Revision history for this message
Thomas E Jenkins (thomas-jenkins) wrote :

Jack plugin is now included in the main libasound2-plugins package. Updated description and title.

description: updated
summary: - Include a libasound2-plugins-extra package for a52, jack, maemo
+ Include a libasound2-plugins-extra package for a52, maemo
Daniel T Chen (crimsun)
Changed in alsa-plugins (Ubuntu Lucid):
status: New → Won't Fix
Changed in alsa-plugins (Ubuntu):
status: New → Confirmed
Revision history for this message
Andrew Phillips (theasp) wrote :

Since libavcodec-dev is in maverick, can it be added to the build-deps to enable the a52 plugin?

Revision history for this message
Mike Mestnik (cheako) wrote :

Could this possible exist in a PPA somewhere?

Revision history for this message
Mike Mestnik (cheako) wrote :

I just helped two ppl on IRC configure surround sound and they both needed to compile a52.

This is going to become more and more important, why wait?

Revision history for this message
Kip Warner (kip) wrote :

Hey Mike. See comment #14.

Revision history for this message
Philipp Wendler (philw85) wrote :

If you have hardware that supports HDMI (both your computer and your receiver), you can use HDMI to transport uncompressed multi-channel audio (up to 6-8 channels) and don't need the a52 plugin. Of course, if you are stuck to older hardware without HDMI, that's no solution, but I guess a lot of people will be able to use HDMI nowadays.

Revision history for this message
Mike Mestnik (cheako) wrote :

Kip,
  A Dolby Digital encoder license can be purchased. IMHO this is one advantage Ubuntu has over Debian.

Philipp,
  Hmm, I was unaware that HDMI supported any thing other then Stereo PCM. Never the less the features you speak of are options AND more importantly ALSA dosn't seam to have an LPCM plugin, even if it did it would need to be provided.

Perhaps my device supports LPCM, I've never tried. This is interesting, I'll keep an eye on it.

Revision history for this message
Philipp Wendler (philw85) wrote :

Mike,
HDMI really supports multi-channel PCM. I am not sure, though, if all receivers support it, and if the Linux drivers of all video card brands support it. I have a Denon receiver and an Intel IGP, and it works nicely out-of-the-box under Ubuntu since 11.10. I just need to select the appropriate output in the sound control applet.

Of course having a52 would still be nice for people without such hardware.

Revision history for this message
Mike Mestnik (cheako) wrote :

LPCM != PCM. I can't find the bandwidth for HDMI sound, but I can't imagine it's big enough to carry multichannel uncompressed audio at a descent rate and precision.

References would be nice, I'm working mainly off Wikipedia and various links found with Google.

Revision history for this message
Mike Mestnik (cheako) wrote :

Plus spdif can also carry LPCM and multichannel LPCM, so this isn't an issue of switching from one to the other... It's just a matter of having hardware that supports these "optional" features of the specification.

Revision history for this message
Kip Warner (kip) wrote :

Mike, it's not a technical problem, it's a legal / moral / philosophical one. The ALSA plugin is just a wrapper for liba52, which is in turn just a wrapper for ffmpeg, specifically libavcodec. The latter has to be built with a52 support at configure time before it is compiled. This is disabled by default because it is covered by patents (non-free). I know this because this was an area of concern for us over at the Avaneya project.

Revision history for this message
Mike Mestnik (cheako) wrote :

Kip,
  I agree it's a matter of philosophy that creates the legal / moral problems, much like Christianity creates a Virgin Marry. I'm not saying that either of these beliefs is wrong or incorrect in any way, in fact I understand how futile an effort that would be.

  What I'm saying is that if it's an issue for you there is a simple solution, Communion for example. If your own beliefs are such that you feel the need to do extraordinary things, then by all means contact [1]Dolby Labs and get a quote for a license.

1. http://www.dolby.com/professional/getting-dolby-technologies/getting-licensed/index.html

I understand that Debian, for example, might not be interested in pursuing this angle. However, this is Ubuntu.

Plus this shouldn't stop the inclusion of LPCM support as suggested earlier, as an alternative solution.

Revision history for this message
Mike Mestnik (cheako) wrote :

My apologies, LPCM is similar to PCM. I had just assumed that Quantization was something vary special having to do with audio compression. Quantization is, from what I can understand, the process of both sampling and then averaging, approximating, an analog wave from(in some cases).

Revision history for this message
Kip Warner (kip) wrote :

Hey Mike,

I'm not saying I agree or disagree with the package maintainer's views, just that that's why a52 support isn't enabled by default. The technology is there, it's just not enabled. That wasn't my decision and Ubuntu probably will not deviate from Debian's packaging guidelines in this situation because of the risk of a lawsuit.

As for the license, yes, I've already be in touch with Dolby Labs. We've worked out a solution in the case of Avaneya.

Regarding LPCM, as I understand it, it's the same as PCM. LPCM just stands for linear pulse code modulation, e.g. raw uncompressed audio.

Revision history for this message
Kip Warner (kip) wrote :

You have to understand that ffmpeg has always been steeped in controversy. Although the decision might seem straightforward to you, you aren't the principle financial stake holder in the decision. Canonical could end up facing a lawsuit. Companies like Dolby typically have teams of lawyers who work fulltime generating revenue for themselves and the company simply through litigation.

Revision history for this message
Mike Mestnik (cheako) wrote :

Kip,
  I just went to re-compile my setup, because I don't remember when I originally rebuilt a52. I won't need to build ffmpeg(libav)...

As Ubuntu currently ships the necessary ac3_fixed encoder!

I belive all that's needed is for this package to make use of it... and that's not against any laws or patents. The law, if any, was broken when libav was compiled with ac3 support.

This whole bug/discussion is pointless.

Revision history for this message
Mike Mestnik (cheako) wrote :

https://launchpad.net/~cheako/+archive/buildingrounds/+sourcepub/2494648/+listing-archive-extra

It would have been impossible for me to setup a stable build environment. Lucky I setup a PPA just for that purpose, no one _should_ be using buildingrounds.

In a little over 4 hours we will see how difficult it is to get a52 to build on Precise. All I did was two changes to take ownership and put libavutil-dev into build depends. I've looked at every thing else and other then configure not being able to find the ac3 encoder there shouldn't be any problems... except maybe a52 will build but then not be added to the deb. Ohh,well nothing ever goes as you expect anyway right.

Revision history for this message
Kip Warner (kip) wrote :

Mike,

ac3_fixed is just the fixed point implementation within libavcodec. 'avconv -formats E' will show the list of current codecs with encoder support. You'll see it is there, but I am guessing this is accidental since it is being built implicitly based on the parameters to configure in debian/confflags in the debianized libav source package. If you look carefully through it, you'll see that other non-free formats are explicitly disabled. So what probably happened is whoever wrote the confflags for debian/rules probably forgot to handle the situation for ac3 when the package was refactored since it wasn't enabled last I checked.

By the way, AC-3 = A52 = DD.

Revision history for this message
Mike Mestnik (cheako) wrote :

It's situations like this when you realize it's not sufficient to use a version number to indicate the availability of a feature... as in libavutil-dev (>= 4:0.8.1-0ubuntu1)

Though that's another issue.

Revision history for this message
Mike Mestnik (cheako) wrote :

Confirmed:
First of all the current alsa-plugins package already has:
/usr/share/doc/libasound2-plugins/a52.txt
/usr/share/doc/libasound2-plugins/examples/a52.conf_pulse

This slightly modified package contains the a52 module.
https://launchpad.net/~cheako/+archive/buildingrounds/+sourcepub/2495019/+listing-archive-extra
/usr/lib/i386-linux-gnu/alsa-lib/libasound_module_pcm_a52.so

Please add libavcodec-dev into the build depends on alsa-plugins, that will close this bug and not break any potential laws or non-extreme moral code.

tags: added: patch
Revision history for this message
Mike Mestnik (cheako) wrote :
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "Add devel packaged requierd for Dolby Sorround." of this bug report has been identified as being a patch in the form of a debdiff. The ubuntu-sponsors team has been subscribed to the bug report so that they can review and hopefully sponsor the debdiff. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-sponsors team please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

Revision history for this message
Kip Warner (kip) wrote :

Mike, came across this today , courtesy of Klaus Schnass <email address hidden>:

http://aften.sourceforge.net/

Revision history for this message
Mike Mestnik (cheako) wrote :

http://www.ohloh.net/p/a52plug <--- Totally cool!

I'll try it out.

Revision history for this message
Mike Mestnik (cheako) wrote :

AFAICT the only place to get a52plug is in http://trac.xbmc.org/ticket/6499

Revision history for this message
Kip Warner (kip) wrote :

I don't understand how a52plug and libaften are different.

Revision history for this message
Mike Mestnik (cheako) wrote :

libafton is to a52plug as ffmpeg and now libav is to a52. a52plug and a52 are ALSA plugins while libafton and libav are back-end encoders.

Revision history for this message
Kip Warner (kip) wrote :

I can't find any information on a52plug. The link to its google project site is dead. libaften is just a raw A52 encoder. It isn't intended to be part of an audio rendering interface, like ALSA, Pulse, DirectSound, etc.. It's platform agnostic. It uses a patched version of the encoder that was originally used as the a52 plugin for ALSA. But I don't know what a52plug is.

Revision history for this message
Mike Mestnik (cheako) wrote :

Kip,
I haven't looked at the diff in the xbmc bug, but I believe all the code for an ALSA plugin can be found there. I've found several descriptions of a52plug, so I think instead of what you mean where. I've got to run to a Funeral, but in the mean time someone should email the XBMC project asking what happened to this code. XBMC has been reorganized since this patch and I'm unsure of where this code may have moved to... In any case there experience with this code is invaluable.

What I don't understand is why this code skipped over the ALSA project, could it be that some where in the mail archives is a copy of this patch? Perhaps we could ask Google if they have backups.

Revision history for this message
Kip Warner (kip) wrote :

Mike,
The patch for XBMC uses libaften. libaften is just a derivative of the original a52 ALSA plugin that ALSA's source distribution already ships with, but with the audio renderer backend agnostic (no ALSA output). So I don't think it makes sense to say that the ALSA project "skipped over it" since it already has A52 output. What I still don't understand is what a52plug is.

Revision history for this message
Mike Mestnik (cheako) wrote :

Kip,
libaften is not JUST a derivative. For example it's thread-safe, but more importantly uses multiple threads offering drastically improved latency... Important for ALSA plugins. Using the most developed and advanced encoder should be a priority.

It may be good enough to offer support for just any capable encoder, but it's an ohh-well whatever solution. Most users would be surprised to discover that they are getting the "just whatever worked once", instead of getting the "best".

There are several descriptions as to what a52plug is, I'm not interested in authoring another.

Revision history for this message
Kip Warner (kip) wrote :

Hey Mike. Ah I see. Thread safety is very important, especially when used in a game engine. I'll take a good look at libaften and may end up adding it as a dependency for a large project I am working on.

As for a52plug, I still don't understand what it is. I can't find a comprehensive and canonical upstream location for it.

Revision history for this message
Mike Mestnik (cheako) wrote :

This contains the authors original release statement.
http://forum.xbmc.org/showthread.php?tid=48441

Near the end of this thread it's clear that the code was pulled from xbmc and it doesn't really say why, other then the "usual" channel mapping issue. Many programs don't use the same 5.1 channel mapping, so it's not possible to correct this in an ALSA plugin.

Revision history for this message
David Henningsson (diwic) wrote :

I redefined the patch as not being a patch just to get it out of the sponsoring queue - while it is in fact a patch, it does not create a "libasound2-plugins-extra" package as the header suggests (i e, wrong solution to the bug).

I'm also wondering about whether this leads to any new Main Inclusion Requests (or did we skip those for Quantal?).

I'm not a lawyer so I don't know if the patent etc question has any relevance.

Revision history for this message
Mike Mestnik (cheako) wrote :

Thank you for taking a look at this :)

I'm with you on the... This is Dolby Digital Surround Sound(TM) and as such it is protected under some form of patent and is controlled under the law.

Never the less, libav(the source package for the build depends, libavcodec-dev) has been uploaded to main so no-other packaging is required. The ALSA A52 Plugin can be part of main, as it shouldn't introduce any NEW patent material or legal restrictions. This removes the reasoning for the aforementioned splitting of patented material into another package.

So, the patch stands and is at least one correct solution to this bug.

I feel like I've said all this before, sorry for the broken record.
The issue here is that we are NOT lawyers and as such we couldn’t even begin to unravel whether or not this is legal and the issue spreads even further as the ffmpeg FAQ indicates. Essentially the attitude that we perceive this to be patented is a lot like believing that a meteor is going to cause the next great extinction vary soon-ish. It's vary *possible, but in the grand scheme of things the probability is not vary great. So it's BOTH illegal and legal at the same time, IMHO.

As for "What do we do with this pkg?" Well, the libav package is almost certainly the lowest hanging fruit if Dolby Labs decides to do anything abut it's legal rights... Also keep in mind they could file any lawsuit in civil court(at least here in the US), even if they don't like the paint job on Canonical's headquarters. So as far as preventing a law suit, there is not much the ALSA pkgs can do. One way or another the small bit of a52 code that makes use of the larger ac3 code in libav won't attract much attention. If it's even mentioned as part of any legal action, you should be flattered. It would be a horrible waste of the already uncertain legal position not to take full advantage of the ac3 code in libav, while it's still **legal that is.

* With all the collisions in the asteroid belt, something could fly this way, with any given velocity, and arrive any time now.

** It's legal until some one files in court and even then the legality is uncertain, but you've officially worn out your welcome. This matter is far from being illegal, IMHO.

Revision history for this message
Reinhard Tartler (siretart) wrote : Re: [Bug 197957] Re: Include a libasound2-plugins-extra package for a52, maemo

On Di, Jun 19, 2012 at 21:01:16 (CEST), Mike Mestnik wrote:
> Never the less, libav(the source package for the build depends,
> libavcodec-dev) has been uploaded to main so no-other packaging is
> required.

FTR, while the libav source package is in 'main', its 'libavcodec53'
binary package is banned from the live cds. AFAIUI, adding a
build-dependency on libavcodec-dev to alsa-lib is okay, /as long as/
none of the resulting binary packages declares a hard dependency on
libavcodec53.

AFAIUI, such a solution has been discussed earlier in this bug, but it
seems no corresponding patch has been proposed yet.

--
Gruesse/greetings,
Reinhard Tartler, KeyID 945348A4

Revision history for this message
Mike Mestnik (cheako) wrote :

Ahh, I'm a Debian guy so forgive my ignorance on the Ubuntu details.

How does one specify "I'm banned from the live cds."? That wasn't vary hard.

https://launchpad.net/~cheako/+archive/buildingrounds/+sourcepub/2519104/+listing-archive-extra
The previous patch, plus:
https://launchpad.net/~cheako/+archive/buildingrounds/+files/alsa-plugins_1.0.25-1ubuntu2%7E1cheako1%7Eprecise_1.0.25-1ubuntu3%7E1cheako1%7Eprecise.diff.gz

Revision history for this message
Mike Mestnik (cheako) wrote :

One question, where is maemo? In that what's it's status, what does it need?

I don't understand any of it, but I think this link may be relevant:
http://www.gossamer-threads.com/lists/maemo/developers/40692

This may make the ALSA maemo plugin obsolete, in favor of kernel drivers.

...Is this even the same maemo?

Revision history for this message
Mike Mestnik (cheako) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package alsa-plugins - 1.0.25-1ubuntu2

---------------
alsa-plugins (1.0.25-1ubuntu2) quantal; urgency=low

  [ Mike Mestnik ]
  * Add build depend on libavcodec-dev and libavutil-dev
  * Split the a52 plugin out to it's own package. (LP: #197957)

  [ Luke Yelavich ]
  * debian/control: Adjust Vcs-Bzr field for quantal.
  * Ship the lavcrate plugin in the libasound2-plugins-extra package.
 -- Luke Yelavich <email address hidden> Wed, 20 Jun 2012 16:57:22 +1000

Changed in alsa-plugins (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.