Announcement

Collapse
No announcement yet.

Google Chrome/Chromium Now Supports PulseAudio

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Google Chrome/Chromium Now Supports PulseAudio

    Phoronix: Google Chrome/Chromium Now Supports PulseAudio

    Making news in the browser world this morning is word of Firefox 7 Beta. Firefox 7 has optimized memory usage, improved memory management, enhances Firefox Sync, and other enhancements. But there's also some other interesting news in the browser world for the more technical users and it's concerning Google Chrome/Chromium...

    http://www.phoronix.com/vr.php?view=OTgxOA

  • #2
    What is wrong with Chrome not using PulseAudio? I hear sound fine from the browser, or is PA going to make it sound better? Use less CPU?

    Comment


    • #3
      Originally posted by numasan View Post
      What is wrong with Chrome not using PulseAudio? I hear sound fine from the browser, or is PA going to make it sound better? Use less CPU?
      What's wrong with it supporting it? Besides irrational dislike for the technology?

      Comment


      • #4
        Originally posted by loonyphoenix View Post
        What's wrong with it supporting it? Besides irrational dislike for the technology?
        Probably a fear that developers will drop the ALSA backend or stop adding to it. It happened with OSS, so it's not a stretch of the imagination.

        Comment


        • #5
          Well it probably can help when it comes to audio management.

          With PA I notice that apps connect and stay connected. In the audio management stuff they have nice names and stick around. That way you can set audio levels for them and have is persistant.

          With non-PA applications, especially browsers, I notice that when a sound event happens or something starts playing back then the connections come and goes.

          From a application standpoint I think that PA is simpler interface to do things 'right' and it can help with performance.

          Comment


          • #6
            Well, as long as it stays out of my way, I don't mind PA. My question was based on this:

            It's pleasant to see the support of PulseAudio finally, which will hopefully lead to a better web-browser audio experience for most modern Linux distributions that use this open-source audio library, compared to Chrome talking directly to ALSA.
            I'm just wondering how the experience will be better?

            Edit:
            Thanks drag. I haven't noticed problems with audio in the browser before, but maybe others have?
            Last edited by numasan; 08-19-2011, 02:40 PM.

            Comment


            • #7
              Originally posted by DanL View Post
              Probably a fear that developers will drop the ALSA backend or stop adding to it. It happened with OSS, so it's not a stretch of the imagination.
              There is a active movement to get rid of OSS support in Linux. The reason, of course, is that OSS is terrible.

              I wouldn't mind seeing Alsa go away, of course, for many applications.

              I noticed quite a bit with applications that are Alsa-only that they do a lot of unnecessary junk. Stuff like trying to probe for audio devices and stuff like that. I had audacity break bluetooth audio because it was trying to detect things, but doing it poorly and trying to configure stuff. I had a similar thing happen with Ekiga. Every time I use it it jacks up my microphone levels or breaks something stupid to were I have to drop back into the command line and run 'alsamixer' to fix what ever stupid thing it did.

              In a Alsa-only world it is understandable a bit. Setting up microphones and such with Alsa is such a pain in the ass for end users that these applications try to make it 'easy' by detecting and auto-configuring as much as possible. This, of course, is full of fail. The reason is that they have no way of knowing what other applications are doing and what else is going on in the system.

              With PA management of inputs and outputs is all centralized and you don't have to muck around with settings in each application. They apps don't have to care about what devices you have or how to setup them up... PA does all the work and the users will have a consistent way to get stuff working for all applications.

              Comment


              • #8
                Originally posted by numasan View Post
                Well, as long as it stays out of my way, I don't mind PA. My question was based on this:



                I'm just wondering how the experience will be better?

                Edit:
                Thanks drag. I haven't noticed problems with audio in the browser before, but maybe others have?
                If you want to use VoIP applications especially. Especially x 2 if your using bluetooth or USB headphones or something.

                Getting stuff like that working properly in Linux without PA is a nightmare. With PA it is far easier then any other OS, even OS X.

                Comment


                • #9
                  Originally posted by drag View Post
                  From a application standpoint I think that PA is simpler interface to do things 'right' and it can help with performance.
                  PA surely could be a simpler interface for applications, but can't help with performance since it is an added abstraction layer.
                  PA source code (expecially resamplers) are filled with notices about poor performance because they are straight implementations of filters without particular optimizations in place. Not to mention they don't use SIMDs at all.

                  Also I noticed PA has the bad behaviour to resample even those streams that have the same properties (frequency, depth) of the output stream.

                  Comment


                  • #10
                    Originally posted by blackshard View Post
                    PA surely could be a simpler interface for applications, but can't help with performance since it is an added abstraction layer.
                    No. It's not a abstraction layer. It's a sound server.

                    And yes it can actually improve performance. Everything PA does is needed to be done. There is no free lunch here. You need to perform sound mixing somewhere, you need to have accurate timings. You need something to manage your sound devices, etc etc. You can do it through a combination of application logic and driver logic, or you can separate that stuff off and handle it centrally by a program that is designed specifically to solve these problems.

                    (meaning it can improve performance because it does a better job)

                    PA source code (expecially resamplers) are filled with notices about poor performance because they are straight implementations of filters without particular optimizations in place. Not to mention they don't use SIMDs at all.
                    Well maybe that is something you can fix if you think that SIMD can help with those filters.

                    Anyways it only performs remixing if it has to.

                    Also I noticed PA has the bad behaviour to resample even those streams that have the same properties (frequency, depth) of the output stream.
                    It's not suppose to do that.

                    Got a example?
                    Last edited by drag; 08-19-2011, 06:17 PM.

                    Comment


                    • #11
                      Originally posted by drag View Post
                      There is a active movement to get rid of OSS support in Linux. The reason, of course, is that OSS is terrible.
                      While I would not like to turn this into Linux audio debate #1e100, I would like to hear your thoughts on why OSS is "terrible", because I think that your opinion, which is sadly shared by many people, seems ill-founded. I have been using both ALSA and OSS (versions 3 and 4) for years now, and they are now both solid audio systems from my experience.

                      While OSS 3 lacked much functionality (the most pertinent being a lack of software mixing) and botched its licensing, and could unanimously be described as "terrible", OSS 4 has made advances to the point where referring to it as "terrible" is debatable, but this doesn't seem to happen because too many people jump on the "OSS hate bandwagon". OSS 4 is certainly still missing some important features, and this makes it not suitable for everyone, including power management and MIDI support. However, personally, I think that the "OSS is terrible" line is long expired, because the age-old criticisms of OSS have been rectified.

                      Comment


                      • #12
                        While I would not like to turn this into Linux audio debate #1e100, I would like to hear your thoughts on why OSS is "terrible", because I think that your opinion, which is sadly shared by many people, seems ill-founded..
                        OSS3 was terrible, as you say. When Linux moved away from it; OSS4 at the time was proprietary. The drivers were closed source for many things and the open source ones were relatively crippled. Development on Alsa started in 1998 or so. OSS4 remained proprietary until 2007. So since it's silly to maintain 2 entirely separate drivers for the same type of hardware the OSS versions that Linux uses will always be moribund in suckitude. The biggest problem from a user standpoint is that OSS3 would not support more then one audio noise at a time. OSS4 fixes this, but it's too little too late.

                        Besides that OSS is stuck with POSIX file-based semantics. The OSS advocates point to this as 'Simple and Well documented' API and tries to make it out as a good thing... but it's not. Simple is good, but audio stuff is not simple. It is fiendishly complicated.

                        I have been using both ALSA and OSS (versions 3 and 4) for years now, and they are now both solid audio systems from my experience.
                        Then your requirements are low and/or you have a very high tolerance for micro-managing your audio system.

                        Comment


                        • #13
                          Originally posted by drag View Post
                          OSS3 was terrible, as you say. When Linux moved away from it; OSS4 at the time was proprietary. The drivers were closed source for many things and the open source ones were relatively crippled. Development on Alsa started in 1998 or so. OSS4 remained proprietary until 2007. So since it's silly to maintain 2 entirely separate drivers for the same type of hardware the OSS versions that Linux uses will always be moribund in suckitude. The biggest problem from a user standpoint is that OSS3 would not support more then one audio noise at a time. OSS4 fixes this, but it's too little too late.
                          I am unsure if you are confusing the crippled version of "OSS" that is included in the main Linux kernel tree, and the real, actively developed version of OSS. In any case, I am aware of the licensing history and how ALSA came about; but this is irrelevant today as OSS is open source.

                          Originally posted by drag View Post
                          Besides that OSS is stuck with POSIX file-based semantics. The OSS advocates point to this as 'Simple and Well documented' API and tries to make it out as a good thing... but it's not. Simple is good, but audio stuff is not simple. It is fiendishly complicated.
                          This is the only attempt of yours so far at making a statement about a drawback of OSS as it exists today. However, your statement is incomplete. While you say that "audio stuff is not simple", this doesn't automatically imply that an audio implementation must also be "not simple". OSS's use of POSIX file-based semantics (as your negatively-loaded statement describes that "OSS is stuck with") has not presented any drawbacks, and works well, in fact. Could you care to elaborate on why POSIX file-based semantics are inherently bad as you describe, in a way other than "Audio is not simple. File-based I/O is simple. Therefore, they are a bad match."?

                          Originally posted by drag View Post
                          Then your requirements are low and/or you have a very high tolerance for micro-managing your audio system.
                          Please do not make false assumptions about how I use audio. While I am certainly not a professional user of audio, I am also not the typical green and pink user either. In addition to this, I don't see myself micro-managing my audio; it works flawlessly and is easy for me to control.

                          Comment


                          • #14
                            Well I could not use OSS even if I wanted to. Lets put it that way. I use USB and Bluetooth audio devices. Bluetooth support is non-existent and USB audio support is extremely sub-par.


                            So. This is a gaming website.... When I play games with friends over the internet they like to use Mumble. It's a fantastic little VoIP app for gamers.

                            USB headsets for gamers is extremely common. That way it's easy to separate your VoIP traffic from your gaming and music stuff. It's convenient. There are some very fancy headsets... stuff with surround sound and weird crap like that. Plus with the USB standard you can have a extension cord up to 5 meters so you can have a absurdly long connection. And if you put your computer under your desk all you need is to stick a USB hub on your desk and you can plug your headphones in to that when ever you feel like it.

                            So with PA I can do things like:
                            1. Start up Mumble, wait for people to start getting online.
                            2. When I hear people talking, I plug in my headset.
                            3. Go to audio applet -- > sound settings --> output device headphones/input device headphones
                            4. Start up the game and start playing.


                            It's nice, simple, fast, and it 'just works'.

                            With OSS that is not something I could do. With Alsa it would require editing asoundrc and changing the default audio device or individually reconfiguring each audio application to use the new audio output. Either way I would be fumbling around and restarting the apps or testing things as I am trying to get going and just looking kinda stupid.

                            Comment


                            • #15
                              Originally posted by drag View Post
                              Well I could not use OSS even if I wanted to. Lets put it that way. I use USB and Bluetooth audio devices. Bluetooth support is non-existent and USB audio support is extremely sub-par.
                              Lack of proper USB and Bluetooth audio support is certainly a drawback of OSS, and I am not denying this. I feel disappointed that Hannu doesn't have the resources necessary to develop OSS full-time; if he did, we would probably have had these features in OSS for years already.

                              Originally posted by drag View Post
                              So. This is a gaming website....
                              I didn't know that.

                              Originally posted by drag View Post
                              When I play games with friends over the internet they like to use Mumble. It's a fantastic little VoIP app for gamers.

                              USB headsets for gamers is extremely common. That way it's easy to separate your VoIP traffic from your gaming and music stuff. It's convenient. There are some very fancy headsets... stuff with surround sound and weird crap like that. Plus with the USB standard you can have a extension cord up to 5 meters so you can have a absurdly long connection. And if you put your computer under your desk all you need is to stick a USB hub on your desk and you can plug your headphones in to that when ever you feel like it.

                              So with PA I can do things like:
                              1. Start up Mumble, wait for people to start getting online.
                              2. When I hear people talking, I plug in my headset.
                              3. Go to audio applet -- > sound settings --> output device headphones/input device headphones
                              4. Start up the game and start playing.


                              It's nice, simple, fast, and it 'just works'.

                              With OSS that is not something I could do. With Alsa it would require editing asoundrc and changing the default audio device or individually reconfiguring each audio application to use the new audio output. Either way I would be fumbling around and restarting the apps or testing things as I am trying to get going and just looking kinda stupid.
                              OSS can do this easily by itself.

                              I'd have to admit that I have a gripe with PulseAudio; I've had more time with it breaking than with it working. Its main developer Lennart Poettering is very arrogant, and his section on OSS in his Guide to Sound APIs is completely inaccurate and FUD at almost every sentence:

                              The Open Sound System is a low-level PCM API supported by a variety of Unixes including Linux. It started out as the standard Linux audio system and is supported on current Linux kernels in the API version 3 as OSS3. OSS3 is considered obsolete and has been fully replaced by ALSA. A successor to OSS3 called OSS4 is available but plays virtually no role on Linux and is not supported in standard kernels or by any of the relevant distributions. The OSS API is very low-level, based around direct kernel interfacing using ioctl()s. It it is hence awkward to use and can practically not be virtualized for usage on non-kernel audio systems like sound servers (such as PulseAudio) or user-space sound drivers (such as Bluetooth or FireWire audio). OSS3's timing model cannot properly be mapped to software sound servers at all, and is also problematic on non-PCI hardware such as USB audio. Also, OSS does not do sample type conversion, remapping or resampling if necessary. This means that clients that properly want to support OSS need to include a complete set of converters/remappers/resamplers for the case when the hardware does not natively support the requested sampling parameters. With modern sound cards it is very common to support only S32LE samples at 48KHz and nothing else. If an OSS client assumes it can always play back S16LE samples at 44.1KHz it will thus fail. OSS3 is portable to other Unix-like systems, various differences however apply. OSS also doesn't support surround sound and other functionality of modern sounds systems properly. OSS should be considered obsolete and not be used in new applications. ALSA and PulseAudio have limited LD_PRELOAD-based compatibility with OSS.
                              More specifically, this sentence, which he uses as a cop-out to justify his criticism of OSS 3 to relate to OSS as a whole:

                              A successor to OSS3 called OSS4 is available but plays virtually no role on Linux and is not supported in standard kernels or by any of the relevant distributions.
                              The above sentence starts off with an argumentum ad populum, then implies that audio has to be inside the main kernel tree, then concludes with another argumentum ad populum.

                              Worse still, is this message:

                              W: module.c: module-oss is deprecated: Please use module-alsa-card instead of module-oss!
                              Huh? I thought deprecation was when you deprecate one implementation of a feature (in this case, PulseAudio communicating with OSS) in favour of another implementation of the same feature. You don't deprecate a feature in favour of a completely different feature, which, in this case, obviously won't work because I'm not using ALSA.

                              Comment

                              Working...
                              X