Commit graph

5393 commits

Author SHA1 Message Date
David Kågedal
cb38d4eba1 alsa: add profile set for M-Audio FastTrack Pro USB 2010-01-05 20:14:11 +01:00
Daniel T Chen
d3c71c92ce udev: Use SOUND_CLASS instead of SOUND_FORM_FACTOR when checking for modem
The fact whether an ALSA card is a modem is stored in the SOUND_CLASS,
not the SOUND_FORM_FACTOR property. So read it from there.

Patch from Whoopie.
2010-01-05 20:00:22 +01:00
Daniel T Chen
c5fdbeab85 threaded-mainloop: Properly initialise m->n_waiting_for_accept to prevent deadlock
Compiler optimisations have been seen to initialise
m->n_waiting_for_accept to a positive non-zero value, so the while() in
pa_threaded_mainloop_signal() never proceeds. Fix this by properly
initializing m->n_waiting_for_accept in pa_threaded_mainloop_new().

Patch from Iain Bucław.

https://bugs.launchpad.net/bugs/502992
2010-01-05 19:57:16 +01:00
Daniel T Chen
a63cf050b0 More src/pulsecore/cpu-arm.c FTBFS fixes
Fix missing argument to pa_read(), and be consistent with declaration of
state variable in pa_cpu_init_arm().

Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
2009-12-22 20:38:48 +00:00
Daniel T Chen
e5e432fe0a Fix the following warnings (which now cause buildd failures in Ubuntu 10.04):
pulsecore/cpu-arm.c: In function 'get_cpuinfo':
pulsecore/cpu-arm.c:70: warning: implicit declaration of function 'pa_read' [-Wimplicit-function-declaration]
pulsecore/cpu-arm.c:72: warning: implicit declaration of function 'pa_close' [-Wimplicit-function-declaration]
pulsecore/cpu-arm.c: In function 'pa_cpu_init_arm':
pulsecore/cpu-arm.c:110: warning: implicit declaration of function 'pa_split_spaces' [-Wimplicit-function-declaration]
pulsecore/cpu-arm.c:110: warning: assignment makes pointer from integer without a cast
Function `pa_split_spaces' implicitly converted to pointer at pulsecore/cpu-arm.c:110

Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
2009-12-22 20:38:40 +00:00
Daniel Mack
f452c6cdd9 fix a number of warnings
most of them were due to missing #ifdefs or wrong printf format type for
[s]size_t.
2009-12-16 16:11:40 +08:00
Daniel Mack
0ccc7afcd8 osx: add native zeroconf implementation via Bonjour
Avahi and dbus is too heavy for OSX just for the sake of publishing our
services via mDNS/Zeroconf. Apple has its own Zeroconf implementation
called Bonjour, and this patch adds a module that implements service
announcement with that API.

All data gathering is copied from module-zeroconf-publish.c, but
unfortunately the code there is too specifically made for avahi, so I
couldn't factor it out to reuse it.
2009-12-16 16:11:39 +08:00
Daniel Mack
7732421a27 CoreAudio: add audio device module
This patch adds support for CoreAudio driven devices under Mac OS X. It
is typically instanciated by the CoreAudio device detection module and
handles all available streams on a specific device.

Sinks are created according to the reported stream configuration.
Float32 is used as default audio sample format at it is the only format
CoreAudio speaks natively.

Hardware volume control is not implemented yet.
2009-12-16 16:11:39 +08:00
Daniel Mack
a23f5cf33d CoreAudio: add device detection module
This adds a new module for CoreAudio device detection. It registers a
callback to detect hotplugged devices and creates/destroys modules named
'module-coreaudio-device'. Devices are identified via a system-wide
unique AudioDeviceID.
2009-12-16 16:11:38 +08:00
Daniel Mack
28a73ad120 hack around another OS X bug: recv() with MSG_PEEK does not work
At least for pipes, recv() with MSG_PEEK does actually eat up data from
file descriptors. Hence, this can't be used for PULLHUP emulation.

Use another ioctl hack for that.
2009-12-16 16:11:38 +08:00
Daniel Mack
17d34462ea poll() is totally broken on Mac OS X
Even on 10.5.8, poll() does not do the right thing. Haven't checked on
newer versions. Hence, wrap all occurences of poll() to pa_poll and
emulate that call with select() on OSX. This is totally embarassing.
2009-12-16 16:11:36 +08:00
Kim Lester
962164a3b7 src/Makefile.am: add specific OS_IS_DARWIN files
Signed-off-by: Kim Lester <kim@dfusion.com.au>
Signed-off-by: Daniel Mack <daniel@caiaq.de>
2009-12-09 06:31:07 +08:00
Daniel Mack
a46ddfebb5 core-rtclock.c: tweak OS_IS_DARWIN constraints
Move the code for OS_IS_DARWIN to the top as on Darwin,
HAVE_CLOCK_GETTIME is also defined.
2009-12-09 06:31:07 +08:00
Kim Lester
76acaa964e configure.ac: add DARWIN_OS variable
Signed-off-by: Kim Lester <kim@dfusion.com.au>
Signed-off-by: Daniel Mack <daniel@caiaq.de>
2009-12-09 06:31:03 +08:00
Daniel Mack
f9b03d3a44 Merge branch 'master' of git://0pointer.de/pulseaudio 2009-12-06 15:53:36 +01:00
Arun Raghavan
e8a5746f2f Add a configure option to change 'udevrulesdir'
This patch serves two purposes:

  1) Allows something other than the de-facto standard udev rules dir or
     /lib/udev/rules.d to be used (the udev build system allows you to
     customise this)

  2) Allows a prefixed, non-root install (right now, the /lib/... path
     is hard-coded into the build system
2009-12-06 11:51:24 +00:00
Arun Raghavan
978d33b609 Mark shared variables as volatile
'n_waiting' and 'n_waiting_for_accept' may be accessed from mulitple
threads, and thus need to be marked as volatile to suppres certain
compiler optimisations. All uses are protected by a mutex, so we don't
need to worry about cache issues (added documentation for this as well).

This addresses bug #738.
2009-12-06 11:51:17 +00:00
Tanu Kaskinen
f42022a7d3 stream-restore: At startup, create dbus entries only for valid database entries. 2009-12-03 21:50:20 +00:00
Tanu Kaskinen
00debf4243 stream-restore: Add a missing pa_xnew0() call in handle_add_entry(). 2009-12-03 21:50:19 +00:00
Tanu Kaskinen
a6b7ac6826 stream-restore: Fix a few assertion misuses with the D-Bus code. 2009-12-03 21:50:19 +00:00
Tanu Kaskinen
e785f728a5 dbus: Add a missing break statement in handle_message_cb(). 2009-12-03 21:50:19 +00:00
Tanu Kaskinen
7b1b68ce2c dbus: Handle the cases when a non-existing interface is detected in an incoming message. 2009-12-03 21:50:19 +00:00
Tanu Kaskinen
4c793cfc76 libpulse: Store pa_stream pointers to hashmaps instead of dynarrays.
Since the stream identifiers (channels) are monotonically growing integer, it
isn't a good idea to use them as index to a dynamic array, because the array
will grow all the time. This is not a problem with client connections that
don't create many streams, but, for example, long-running clients that use
libcanberra for playing event sounds, this means that the client connection
effectively leaks memory.
2009-12-03 21:47:46 +00:00
Daniel Mack
1b2cbe92db Merge branch 'master' of git://0pointer.de/pulseaudio 2009-12-01 02:22:39 +01:00
Colin Guthrie
118466638a Merge remote branch 'tanuk/master' 2009-11-30 14:55:57 +00:00
Daniel Mack
d5d488e33d Merge branch 'master' of git://0pointer.de/pulseaudio 2009-11-24 17:38:25 +01:00
Lennart Poettering
0fcdc3d15d Merge branch 'master' of ssh://rootserver/home/lennart/git/public/pulseaudio 2009-11-23 05:45:33 +01:00
Lennart Poettering
c815441ba1 Merge remote branch 'phish3/master' 2009-11-23 04:48:31 +01:00
Lennart Poettering
675957b9e4 Merge branch 'master' of ssh://rootserver/home/lennart/git/public/pulseaudio 2009-11-22 21:40:15 +01:00
Joe Marcus Clarke
5aa5c6c196 freebsd: implement pa_get_binary_name
Stolen from
http://www.freebsd.org/cgi/cvsweb.cgi/ports/audio/pulseaudio/files/patch-src_pulse_util.c?rev=1.1
and fixed for indentation.
2009-11-21 01:13:35 +01:00
Jason Newton
4eb65a0a46 src/utils/qpaeq: added more friendly error messages to common errors 2009-11-20 15:56:46 -08:00
Jason Newton
f69e81f226 Makefile.am: added qpaeq to installed scripts 2009-11-20 15:56:43 -08:00
Diego Elio 'Flameeyes' Pettenò
fe0b393f7a Simplify Makefile.am handling of ALSA-related files.
Instead of declaring extra variables for the ALSA profiles and PATHS, and
using EXTRA_DIST for the udev rule, use the dist_ prefix when declaring
them for conditional installation.

This relies on the fact that automake *is* smart enough to know that there
exist *no* conditional dist, and will always distribute all of them.
2009-11-21 00:53:00 +01:00
Diego Elio 'Flameeyes' Pettenò
62278b4b94 Avoid using devname as a variable name.
On FreeBSD, devname() is a system function, and was overshadowed.
2009-11-21 00:47:44 +01:00
Diego Elio 'Flameeyes' Pettenò
d963998676 Rename all the signal parameters and variables to something more explicit.
Without this change, on FreeBSD you'll be bothered by tons of warnings
about overshadowing signal(2).
2009-11-21 00:46:46 +01:00
Diego Elio 'Flameeyes' Pettenò
2caf59d49f Since now we have FreeBSD atomic operations, don't require libatomic_ops.
This lets the original configure script to pass on FreeBSD.
2009-11-21 00:27:35 +01:00
Diego Elio 'Flameeyes' Pettenò
ca637e5ba4 Simplify handling of NetBSD atomic ops discovery.
Instead of having a parameter to enable/disable them (which was also
ignored by the source code side), simply identify NetBSD 5 (when the atomic
ops were implemented the first time) in a $host switch and ignore checking
for libatomic_ops.
2009-11-21 00:17:33 +01:00
Diego Elio 'Flameeyes' Pettenò
40aee60bfa Merge branch 'master' of git://git.0pointer.de/pulseaudio 2009-11-21 00:10:37 +01:00
Jason Newton
77c6b69656 remove .py extension from qpaeq 2009-11-20 15:07:47 -08:00
Lennart Poettering
fc4cf27569 Merge remote branch 'phish3/master' 2009-11-21 00:05:02 +01:00
Joe Marcus Clarke
f5d8aef0ac freebsd: fix atomic ops implementations
Stole from

http://www.freebsd.org/cgi/cvsweb.cgi/ports/audio/pulseaudio/files/patch-src_pulsecore_atomic.h?rev=1.6
2009-11-21 00:02:36 +01:00
Jason Newton
41853cc7c0 added qpaeq script for GUI equalizer control to src/util 2009-11-20 14:56:07 -08:00
Diego Elio 'Flameeyes' Pettenò
5150a101ef Check for stow using AC_CHECK_PROG rather than type -p.
The type -p check is not compatible with POSIX shells, and indeed fails
when used with the FreeBSD 8 default shell. Instead the AC_CHECK_PROG macro
is written properly to look for the command.
2009-11-20 21:37:16 +01:00
Diego Elio 'Flameeyes' Pettenò
4923f3ca77 Include sys/filio.h if present; this makes use of FIONREAD on Solaris.
FIONREAD on OpenSolaris is declared in sys/filio.h. The RTP modules already
rely on the presence of FIONREAD, and check for the header, so this brings
the pipe source and sink modules on par with them.
2009-11-20 21:25:33 +01:00
Diego Elio 'Flameeyes' Pettenò
09a58b6813 Don't declare the variable l if FIONREAD is not defined.
This avoids two warnings due to FIONREAD not being defined.
2009-11-20 21:24:46 +01:00
Diego Elio 'Flameeyes' Pettenò
71ebbfb6ef Fix build on Solaris: pass the third parameter to pa_cloexec_open. 2009-11-20 21:23:53 +01:00
Diego Elio 'Flameeyes' Pettenò
70ba21e78a Move the platform-specific defines after the compiler has been found.
Without this change, on OpenSolaris, it's possible that the compiler will
be reported, by default, as failing to produce executables, since
_XOPEN_SOURCE=600 requires a C99 compiler to compile even the simples of
the programs.
2009-11-20 21:08:05 +01:00
Lennart Poettering
6daf112ce0 alsa: fix minor sampling rate deviations before adjusting the buffer size 2009-11-20 20:27:03 +01:00
Lennart Poettering
bd3467ff2f alsa: fix log output when the audio device refuses to give us again the same period settings we had before 2009-11-20 20:00:26 +01:00
Lennart Poettering
ba95b1939d pulse: ask for timing updates both *before* and *after* triggering a stream state change so that in the STARTED/UNDERFLOW callbacks we accurate transport latency information 2009-11-20 19:55:47 +01:00