Tag Archives: Projects

Re: PulseAudio and GNOME

Post Syndicated from Lennart Poettering original https://0pointer.net/blog/projects/pulse-davidz-reply.html

davidz: Shams King is
currently working on HAL support in PulseAudio. He’s planning to extend
our module-combine
to automatically combine all available hardware sound cards found with
HAL into a single virtual sound sink. That way, if the user plugs in
an USB loudspeaker set it will automatically output the same audio as
the internal speakers did before. I believe this is the behaviour most
non-technical users would expect from a well designed system.

Right now PulseAudio sink names cannot be used to identify the
underlying hardware devices, since they are generic names like
alsa_output or oss_output2. However, it might be a
good idea to use the ALSA device name
(i.e. alsa_output_hw_0_0) or even the HAL identifier if it is
available. If this
dialog
uses the normal GStreamer PropertyProbe API to
query the available devices (and does not use HAL directly), we should
be able to support this easily in gst-pulse
(right now we support this interface in GstPulseMixer, but not yet in
GstPulseSink).

Marc-Andre, I wonder how the differentiation between “Sound events”, “Music and
Movies” and “Audio/Video Conferencing” touches the “role”/”class” model of GSmartMix?

Regarding power saving and PulseAudio: First of all, PulseAudio
right now is intended to be run per-session, just like esd
was. However, there is some incomplete support for running it as
system-wide instance.

I think instead of integrating PulseAudio with
gnome-power-manager the way you described it is probably a better idea
to close the sound device when it is idle regardless if we are in
power saving mode or not, and hope that the driver authors fix their
stuff to not produce any click or pop sounds when the device is opened
or closed. To be honest, all driver/sound card combinations I have
access to work properly in this area.

In ALSA you usually open devices in O_RDONLY or O_WRONLY mode (and not
in O_RDWR) anyway, so falling back to it is not really necessary.

PulseAudio 0.9.2 released

Post Syndicated from Lennart Poettering original https://0pointer.net/blog/projects/pulse-release.html

We’re proud to announce the first release of PulseAudio after the name change from
Polypaudio. Besides a variety of sed -i -e s/polyp/pulse/g changes it
mostly contains minor bugfixes. Get
it while it is hot!

In related news PulseAudio now gained its own domain and a new Trac-based homepage: http://pulseaudio.org/. And thanks to Rafael Jannone and Pierre Ossman we now have a logo:

PulseAudio Logo

Together with PulseAudio 0.9.2 we released updated versions of all the auxiliary GUI
tools
. A new utility has been released as well, named PulseAudio Device
Chooser
. It installs a tray icon and allows the user to quickly change
the sound server attached to the local X11 display, showing a list of servers that
is accumulated using ZeroConf service browsing. In addition it allows you to
quickly start one of the other GUI tools and shows notification whenever a new
PulseAudio server/sink/source appears on the network. Everybody loves
screenshots:

PulseAudio Device Chooser Screenshot

Attending GUADEC

Post Syndicated from Lennart Poettering original https://0pointer.net/blog/projects/guadec-2006.html

Due to the generosity of the GNOME Foundation I have been able to get to the GUADEC 2006 this year. I’d like to thank Jeff Waugh and Quim Gil for the “last-minute” funding of my trip to Vilanova, and all the sponsors who actually are providing the funds. If anyone wants to talk to me about Avahi and/or PulseAudio (aka Polypaudio) (or any of my other projects), just try to find and speak to me. (Bungalow 870)

In related news, the new PulseAudio homepage will be “inaugurated” soon, becoming the official new home of PulseAudio/Polypaudio as soon as we release 0.9.2, which hopefully will be pretty soon.

TPFKAPA: The Project Formerly Known as Polypaudio

Post Syndicated from Lennart Poettering original https://0pointer.net/blog/projects/pulse.html

It came to our attention that some people really disliked the name of Polypaudio, because
it reminded them of that medical condition,
though the software was actually named after the sea dweller. I actually
liked that double entendre, but many did not and expressed concerns that the name
would hinder Polypaudio’s adoption. After a long discussion on
#polypaudio we came to the conclusion that a name change is a good
idea in this case. Name changes are usually a bad idea, but this time it’s
worth it, we think.

The new name we agreed on is PulseAudio, or shorter just Pulse. It has
the nice advantage that it abbreviates to pa, just as Polypaudio did. This
allows us to keep source code compatiblity (and binary compatibility to a
certain degree) with the current releases of Polypaudio, because the symbol
prefix can stay pa_. In addition the auxiliary tools paman, pavucontrol, pavumeter need not to
be renamed.

We will try to make the transition as smooth as possible and would like to
apologize to all the packagers, who need to rename their packages now.

The next release of Polypaudio (0.9.2) will be a bugfix release and be the first to bear the new name: PulseAudio 0.9.2.

Polypaudio is dead. Long live PulseAudio!

Polypaudio article on LWN

Post Syndicated from Lennart Poettering original https://0pointer.net/blog/projects/polypaudio-lwn.html

The current issue of the Linux
Weekly News
features a short article about Polypaudio. (The article is not (yet)
accessible for free, come back in a week if you aren’t an LWN subscriber.)

Quoting:

With its support for a wide variety of popular audio utilities, actively developed code, and broad capabilities, the Polypaudio project fills an important role in Linux-based audio development.

Polypaudio 0.9.0 released

Post Syndicated from Lennart Poettering original https://0pointer.net/blog/projects/polypaudio-0.9.0.html

We are proud to announce Polypaudio
0.9.0
. This is a major step ahead since we decided to freeze the
current API. From now on we will maintain API compability (or at least
try to). To emphasize this starting with this release the shared
library sonames are properly versioned. While Polypaudio 0.9.0 is not
API/ABI compatible with 0.8 it is protocol compatible.

Other notable changes beyond bug fixing, bug fixing and bug fixing
are: a new Open Sound System /dev/dsp wrapper named
padsp and a module module-volume-restore have been
added.

padsp works more or less like that ESOUND tool known as
esddsp. However, it is much cleaner in design and thus works
with many more applications than the original tool. Proper locking is
implemented which allows it to work in multithreaded applications. In
addition to mere /dev/dsp emulation it wraps
/dev/sndstat and /dev/mixer. Proper synchronization
primitives are also available, which enables lip-sync movie playback
using padsp on mplayer. Other applications that are
known to work properly with padsp are aumix,
libao, XMMS, sox. There are some things
padsp doesn’t support (yet): that’s most notably recording,
and mmap() wrapping. Recording will be added in a later
version. mmap() support is available in esddsp but
not in padsp. I am reluctant to add support for this, because
it cannot work properly when it comes to playback latency
handling. However, latency handling this the primary reasoning for
using mmap(). In addition the hack that is included in
esddsp works only for Quake2 and Quake3, both being Free
Software now. It probably makes more sense to fix those two games than
implementing a really dirty hack in padsp. Remember that you
can always use the original esddsp tools since Polypaudio
offers full protocol compatibility with ESOUND.

module-volume-restore is a small module that stores the
volume of all playback streams and restores them when the applications
which created them creates a new stream. If this module is loaded,
Polypaudio will make sure that you Gaim sounds are always played at
low volume, while your XMMS music is always played at full volume.

Besides the new release of Polypaudio itself we released a bunch of
other packages to work with the new release:

  • gst-polyp
    0.9.0
    , a Polypaudio plugin for GStreamer 0.10. The
    plugin is quite sophisticated. In fact it is probably the only
    sink/source plugin for GStreamer that reaches the functionality of the
    ALSA plugin that is shipped with upstream. It implements the
    GstPropertyProbe and GstImplementsInterface
    interfaces, which allow gnome-volume-meter and other
    GStreamer tools to control the volume of a Polypaudio server. The sink
    element listens for GST_EVENT_TAG events, and can thus use
    ID3 tags and other meta data to name the playback stream in the
    Polypaudio server. This is useful to identify the stream in the Polypaudio
    Volume Control
    . In short: Polypaudio 0.9.0 now offers first class
    integration into GStreamer.
  • libao-polyp
    0.9.0
    , a simple plugin for libao, which is used for audio playback by tools like ogg123 and Gaim, besides others.
  • xmms-polyp
    0.9.0
    , an output plugin for XMMS. As special feature it uses the
    currently played song name for naming the audio stream in
    Polypaudio.
  • Polypaudio Manager 0.9.0, updated for Polypaudio 0.9.0
  • Polypaudio Volume Control 0.9.0, updated for Polypaudio 0.9.0
  • Polypaudio Volume Meter 0.9.0, updated for Polypaudio 0.9.0

A screenshot showing most of this in action:

Polypaudio Screenshot.

This screenshot shows: the Polypaudio Manager, the Polypaudio
Volume Control, the Polypaudio Volume Meter, the XMMS plugin, the
GStreamer plugin used by Rhythmbox and gstreamer-properties,
pacat playing some noise from /dev/urandom,
padsp used on MPlayer. (This screenshot actually shows some
post-0.9.0 work, like the icons used by the application windows)

A big bear hugged one and then there were two

Post Syndicated from Lennart Poettering original https://0pointer.net/blog/projects/howl.html

Scott Herscher decided to cease development of HOWL.
That means only Avahi and Bonjour are left as
widely known mDNS/DNS-SD implementations.

Scott, your work on HOWL has not been in vain. Many Linux/Free Software
people (including me) learned to know Zeroconf with your software. Without the
troubles surrounding the licensing, I would never have started what is now
known as Avahi, and HOWL would still be the number one of the Linux mDNS/DNS-SD
implementations.

The HOWL legacy will live on, since Avahi includes a HOWL compatibility layer which will be kept around for a while.

A year and a few weeks ago Trent and I decided to merge our efforts and
form Avahi from our seperate works. I wonder how much time it will take us
until we see a similar R.I.P. note from the Bonjour camp, on our route to
AVAHI WORLD DOMINATION. 😉

In contrast to what Scott wrote in his announcement, Avahi is far from being
strictly Linux. Avahi has been ported to FreeBSD, OpenBSD, MacOSX and recently
(not yet official) Solaris. (However, he’s right with what he writes
about me.)

Introducing the Polypaudio Volume Control

Post Syndicated from Lennart Poettering original https://0pointer.net/blog/projects/pavucontrol.html

The result of a few hours of hacking:

pavucontrol screenshot

pavucontrol cannot only control the volume of hardware devices of the Polypaudio sound server but also of all playback streams seperately, much like the new Windows Vista volume control application.

Get the Polypaudio Volume Control while it is hot.

On a side note I released updated versions of both the Polypaudio Volume Meter and the Polypaudio Manager which are compatible with Polypaudio 0.8.

Polypaudio 0.8 Released

Post Syndicated from Lennart Poettering original https://0pointer.net/blog/projects/polypaudio-0.8.html

The reports of Polypaudio’s death are greatly exaggerated.

We are proud to announce the release of Polypaudio
0.8, our networked sound daemon for Linux, other Unix-like operating
systems, and Microsoft Windows. Since the last official release, 0.7,
more than a year has passed. In the meantime Polypaudio experienced
major improvements. Major contributions have been made by both Pierre
Ossman and me. Pierre is being payed by Cendio AB to work on
Polypaudio. Cendio distributes Polypaudio along with their ThinLinc Terminal
Server
.

Some of the major changes:

  • New playback buffer model that allows applications to freely seek in
    the server side playback buffer (both with relative and absolute indexes) and to synchronize
    multiple streams together, in a way that the playback times are guaranteed to
    stay synchronized even in the case of a buffer underrun. (Lennart)
  • Ported to Microsoft Windows and Sun Solaris (Pierre)
  • Many inner loops (like sample type conversions) have been ported
    to liboil, which
    enables us to take advantage of modern SIMD instruction sets, like MMX or SSE/SSE2. (Lennart)
  • Support for channel maps which allow applications to assign
    specific speaker positions to logical channels. This enables support
    for “surround sound”. In addition we now support seperate volumes for
    all channels. (Lennart)
  • Support for hardware volume control for drivers that support
    it. (Lennart, Pierre)
  • Local users may now be authenticated just by the membership in a
    UNIX group, without the need to exchange authentication cookies. (Lennart)
  • A new driver module module-detect which detects
    automatically what local output devices are available and loads the
    needed drivers. Supports ALSA, OSS, Solaris and Win32 devices. (Lennart, Pierre)
  • Two new modules implementing RTP/SDP/SAP based multicast audio
    streaming. Useful for streaming music to multiple PCs with speakers
    simultaneously. Or for implementing a simple “always-on” conferencing
    solution for the LAN. Or for sharing a single MIC/LINE-IN jack on the
    LAN. (Lennart)
  • Two new modules for connecting Polypaudio to a JACK audio server
    (Lennart)
  • A new Zeroconf (mDNS/DNS-SD) publisher module. (Lennart)
  • A new module to control the volume of an output sink with a LIRC supported infrared remote
    control, and another one for doing so with a multimeda keyboard. (Lennart)
  • Support for resolving remote host names asynchronously using libasyncns. (Lennart)
  • A simple proof-of-concept HTTP module, which dumps the current daemon status to HTML. (Lennart)
  • Add proper validity checking of passed parameter to every single
    API functions. (Lennart)
  • Last but not least, the documentation has been beefed up a lot and
    is no longer just a simple doxygen-based API documentation (Pierre, Lennart)

Sounds good, doesn’t it? But that’s not all!

We’re really excited about this new Polypaudio release. However,
there are more very exciting, good news in the Polypaudio world. Pierre
implemented a Polypaudio plugin for alsa-libs. This means you
may now use any ALSA-aware application to access a Polypaudio sound
server! The patch has already merged upstream, and will probably
appear in the next official release of alsa-plugins.

Due to the massive internal changes we had to make a lot of modifications to
the public API. Hence applications which currently make use of the Polypaudio
0.7 API need to be updated. The patches or packages I maintain will be updated
in the next weeks one-by-one. (That is: xmms-polyp, the MPlayer patch, the
libao patch, the GStreamer patch and the PortAudio patch)

A side note: I wonder what this new release means for Polypaudio in
Debian. I’ve never been informed by the Debian maintainers of
Polypaudio that it has been uploaded to Debian, and never of the
removal either. In fact I never exchanged a single line with those who
were the Debian maintainers of Polypaudio. Is this the intended way
how the Debian project wants its developers to communicate with
upstream? I doubt that!

How does Polypaudio compare to ESOUND?

Polypaudio does everything what ESOUND does, and much more. It is a
fully compatible drop-in replacement. With a small script you can make
it command line compatible (including autospawning). ESOUND clients
may connect to our daemon just like they did to the original ESOUND
daemon, since we implemented a compatibility module for the ESOUND
protocol.

Support for other well known networked audio protocols (such as
NAS) should be easy to add – if there is a need.

For a full list of the features that Polypaudio has over ESOUND,
see Polypaudio’s
homepage
.

How does Polypaudio compare to ALSA‘s dmix?

Some people might ask whether there still is a need for a sound
server in times where ALSA’s dmix plugin is available. The
answer is: yes!

Firstly, Polypaudio is networked, which dmix is
not. However, there are many reasons why Polypaudio is useful on
non-networked systems as well. Polypaudio is portable, it is available
not just for Linux but for FreeBSD, Solaris and even Microsoft
Windows. Polypaudio is extensible, there is broad range of additional
modules
available which allow the user to use Polypaudio in many
exciting ways ALSA doesn’t offer. In Polypaudio streams, devices and
other server internals can be monitored and introspected freely. The
volume of the multiple streams may be manipulated independently of
each other, which allows new exciting applications like a work-alike
of the new per-application mixer tool featured in upcoming Windows
Vista. In multi-user systems, Polypaudio offers a secure and safe way
to allow multiple users to access the sound device
simultaneously. Polypaudio may be accessed through the ESOUND and the
ALSA APIs. In addition, ALSA dmix is still not supported properly by
many ALSA clients, and is difficult to setup.

A side node: dmix forks off its own simple sound daemon
anyway, hence there is no big difference to using Polypaudio with the
ALSA plugin in auto-spawning mode. (Though admittedly, those ALSA
clients that don’t work properly with dmix, won’t do so with our ALSA
plugin as well since they actually use the ALSA API incorrectly.)

How does Polypaudio compare to JACK?

Everytime people discuss sound servers on Unix/Linux and which way
is the right to go for desktops, JACK gets mentioned and suggested by some as a
replacement for ESOUND for the desktop. However, this is not
practical. JACK is not intended to be a desktop sound server, instead
it is designed for professional audio in mind. Its semantics are
different from other sound servers: e.g. it uses exclusively floating
point samples, doesn’t deal directly with interleaved channels and
maintains a server global time-line which may be stopped and seeked
around. All that translates badly to desktop usages. JACK is really
nice software, but just not designed for the normal desktop user,
who’s not working on professional audio production.

Since we think that JACK is really a nice piece of work, we added
two new modules to Polypaudio which can be used to hook it up to a
JACK server.

Get Polypaudio 0.8, while it is hot!

BTW: We’re looking for a logo for Polypaudio. Feel free to send us your suggestions!

Update: The Debian rant is unjust to Jeff Waugh. In fact, he had informed me that he prepared Debian packages of Polypaudio. I just never realized that he had actually uploaded them to Debian. What still stands, however, is that I’ve not been informed or asked about the removal.

LCD Brightness Control on MSI S270 Laptops

Post Syndicated from Lennart Poettering original https://0pointer.net/blog/projects/s270ctrl.html

In response to mjg59‘s rant about
controlling the LCD brightness on laptops, I invested some time to
reverse engineer the Windows driver of my MSI S270 laptop
which implements changing LCD brightness. It requires some ugly
fiddling with registers of the “embedded controller” on ports 0x62 and
0x66. The result of my work is s270ctrl, a
small userspace utility. I’m planning to turn this into a proper
kernel module soon.

Debian Packages of mod_dnssd and mod_mime_xattr

Post Syndicated from Lennart Poettering original https://0pointer.net/blog/projects/mod-dnssd-debian.html

Due to the great work of Sebastien Estienne there are now Debian
packages of mod_dnssd
and mod_mime_xattr
available from my little Debian
package repository
. They’ve been uploaded to Ubuntu as well, but
we are still looking for some Debian developer who would be willing to
upload them to Debian proper. Feel free to contact me if you are interested!

Adding Extended Attribute Support to Apache 2.0

Post Syndicated from Lennart Poettering original https://0pointer.net/blog/projects/mod-mime-xattr.html

I updated my little Apache module mod_mime_xattr to be compatible with Apache 2.0.

What is it useful for? Linux (2.4 with patch, 2.6 out-of-the-box) has been supporting extended attributes for files (EAs) for ages, but very few applications use them. To change that I wrote a small module for Apache which interpretes the EA user.mime_type and uses its value as MIME type for all files served by Apache. The EA has been standardized by the XDG MIME system, but apparently neither Gnome nor KDE support it right now.

Usage of mod_mime_xattr is simple. To enable interpretation of the EA on the entire tree use something like this in your Apache configuration file:

<Directory />
XAttrMimeType On
</Directory>

That’s all that is required to make use of user.mime_type on all files where it is set. To set the EA use a command like this one:

setfattr -n "user.mime_type" -v "text/html" foo.txt

And foo.txt will become a file with the MIME type of text/html, although its suffix is .txt!

Avahi Support for Apache

Post Syndicated from Lennart Poettering original https://0pointer.net/blog/projects/mod_dnssd.html

The first release of mod_dnssd is now available. It adds DNS-SD based Zeroconf support to Apache 2.0 using Avahi.

This work has been inspired by Sander Temme’s and Sebastien Estienne’s mod_zeroconf module, but supersedes it in every way. MacOSX ships with mod_rendezvous/mod_bonjour, but mod_dnssd is much more powerful than this piece of software as well. In short: mod_dnssd is definitely the greatest way to add Zeroconf support to Apache available today.

A few examples just to show how great mod_dnssd is:

DNSSDEnable On

This is everything you need to enable DNS-SD support in Apache after loading the module. It will publish all virtual hosts and all existing mod_userdir directories (i.e. ~/public_html) as services of type _http._tcp.

In case you want to publish some subdirectory of the web server as service, just place DNSSDServiceName inside a <Location> section for that path:

<Location /foobar>
	DNSSDServiceName "A special service called foobar"
</Location>

You can even use it to publish WebDAV shares using Apache’s mod_dav module:

<Location /webdav>
	Dav On
	DNSSDServiceName "A WebDAV folder"
	DNSSDServiceTypes _webdav._tcp
</Location>

This especially cool since we now have a free software server counterpart for Gnome’s and KDE’s WebDAV client functionality.

Or to publish your blog as RSS service:

<Location /blog.cgi?rss>
	DNSSDServiceName "The blog"
	DNSSDServiceTypes _rss._tcp
</Location>

Get it while it is hot!

Avahi 0.6.3

Post Syndicated from Lennart Poettering original https://0pointer.net/blog/projects/avahi-0.6.3.html

A few days ago we relased Avahi 0.6.3. This is an important bugfix release, everyone should update as soon as possible.

Avahi now has its own domain avahi.org and finally has a logo, thanks to the great work of Mathieu Drouet:

Avahi Logo

Avahi has moved from Debian
Experimental to Unstable. Ubuntu moved
it from Universe to Main since it successfully passed their security
auditing. The Fedora
Core
development distribution contains it too, as does SuSE‘s
and Gentoo‘s. But
where’s Mandriva? Apparently they are considering
it
, for whatever it is worth. FreeBSD Ports has it
too. I guess this means that Avahi has now been accepted by all major
distributions. Hurrah!

Fractals with Python

Post Syndicated from Lennart Poettering original https://0pointer.net/blog/projects/mandelbrot.html

It’s impressing how easy it is to draw fractals with Python. Using the ubercool Python Imaging Library and native complex number support in Python you can code an elaborate and easy to understand fractal generator in less than 50 lines of code:

#!/usr/bin/python
import Image, ImageDraw, math, colorsys

dimensions = (800, 800)
scale = 1.0/(dimensions[0]/3)
center = (2.2, 1.5)       # Use this for Mandelbrot set
#center = (1.5, 1.5)       # Use this for Julia set
iterate_max = 100
colors_max = 50

img = Image.new("RGB", dimensions)
d = ImageDraw.Draw(img)

# Calculate a tolerable palette
palette = [0] * colors_max
for i in xrange(colors_max):
    f = 1-abs((float(i)/colors_max-1)**15)
    r, g, b = colorsys.hsv_to_rgb(.66+f/3, 1-f/2, f)
    palette[i] = (int(r*255), int(g*255), int(b*255))

# Calculate the mandelbrot sequence for the point c with start value z
def iterate_mandelbrot(c, z = 0):
    for n in xrange(iterate_max + 1):
        z = z*z +c
        if abs(z) > 2:
            return n
    return None

# Draw our image
for y in xrange(dimensions[1]):
    for x in xrange(dimensions[0]):
        c = complex(x * scale - center[0], y * scale - center[1])

        n = iterate_mandelbrot(c)            # Use this for Mandelbrot set
        #n = iterate_mandelbrot(complex(0.3, 0.6), c)  # Use this for Julia set

        if n is None:
            v = 1
        else:
            v = n/100.0

        d.point((x, y), fill = palette[int(v * (colors_max-1))])

del d
img.save("result.png")

Some example pictures:

Julia Set Mandelbrot Set.