Commit graph

69 commits

Author SHA1 Message Date
Pierre-Louis Bossart
9b6c84ad6e AC3 passthrough support
Second version after Tanu's feedback

TODO:
    - notify client that volume control is disabled
    - change sink rate in passthrough mode if needed
    - automatic detection of passthrough mode instead of hard
    coded profile names

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@intel.com>
2010-08-12 18:20:27 +01:00
Lennart Poettering
66cfa72eb4 native: rework handling of seeks that depend on variables the client does not know anything about
All seeks/flushes that depend on the playback buffer read pointer cannot
be accounted for properly in the client since it does not know the
actual read pointer. Due to that the clients do not account for it at
all. We need do the same on the server side. And we did, but a little
bit too extreme. While we properly have not applied the changes to the
"request" counter we still do have to apply it to the "missing" counter.
This patch fixes that.
2010-02-09 22:45:59 +00:00
Lennart Poettering
d090995262 client: implement $PULSE_LATENCY_MSEC
This allows easy overriding of a clients latency setting for debugging
purposes.

http://pulseaudio.org/ticket/753
2010-02-09 22:44:49 +00:00
Lennart Poettering
7ab9bea29d client: detect forking in sample cache API, too 2010-02-09 22:30:20 +00:00
Lennart Poettering
699233fb47 native: fix request counter miscalculations
Do not subtract bytes the client sends us beyond what we requested from
our missing bytes counter.

This was mostly a thinko that caused servers asking for too little data
when the client initially sent more data than requested, because that
data sent too much was accounted for twice.

This commit fixes this miscalculation.

http://bugzilla.redhat.com/show_bug.cgi?id=534130
2010-02-09 22:29:20 +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
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
Lennart Poettering
f05ae357b6 pulse: delay smoother update only when unpausing, not when pausing, since we don't want the timer to advance when we are supposedly already paused 2009-11-20 19:48:08 +01:00
Lennart Poettering
a3b5a94488 pulse: try to fix inaccuracy with uncork timing for streams that are created in corked state 2009-11-20 17:49:30 +01:00
Lennart Poettering
f27a50691c libpulse: introduce PA_STREAM_RELATIVE_VOLUME 2009-10-29 00:46:22 +01:00
Marc-André Lureau
d8a90a3900 pulse: even in case of record stream, let's initialize req_bytes to 0 2009-08-15 02:44:29 +02:00
Lennart Poettering
211d0f3dcb client: limit block size for zero-copy operations to mempool block size 2009-07-24 20:21:30 +02:00
Lennart Poettering
e7ca058427 client: make volume struct const 2009-07-24 20:20:34 +02:00
Lennart Poettering
5efb07281d alsa: throw timing data away after device resume 2009-07-24 20:13:52 +02:00
Lennart Poettering
23039af842 client: allow zero-copy writing to the stream 2009-07-20 15:49:33 +01:00
Marc-André Lureau
0955e3d45b Base mainloop on pa_rtclock_now()
Move the mainloop to monotonic based time events.

Introduces 4 helper functions:
pa_{context,core}_rttime_{new,restart}(), that fill correctly a
timeval with the rtclock flag set if the mainloop supports it.

Both mainloop-test and mainloop-test-glib works with rt and timeval
based time events. PulseAudio and clients should be fully functional.

This patch has received several iterations, and this one as been
largely untested.

Signed-off-by: Marc-André Lureau <marca-andre.lureau@nokia.com>
2009-06-20 17:29:31 +03:00
Marc-André Lureau
125c528896 pulse: move pa_rtclock_now in pulsecommon 2009-06-20 17:29:08 +03:00
Marc-André Lureau
5dcdd5e358 perl -p -i -e 's/pa_rtclock_usec/pa_rtclock_now/g' find . -name '*.[ch]' 2009-06-19 19:04:04 +03:00
Lennart Poettering
7dafa87b68 don't try to outsmart the transport 2009-04-05 02:50:32 +02:00
Lennart Poettering
d035f4a3f3 Modify smoothing code to make cubic interpolation optional and allow 'quick fixups' on resuming
The primary reason for this change is to allow time graphs that do not
go through the origin and hence smoothing starting from the origin is
not desired. This change will allow passing time data into the smoother
while paused and then abruptly use that data without smoothing using the
'quick fixup' flag when resuming.

Primary use case is allowing recording time graphs where the data
recorded originates from a time before the stream was created. The
resulting graft will be shifted and should not be smoothened to go
through the origin.
2009-04-05 02:26:02 +02:00
Lennart Poettering
373b5efe51 properly account for seeks in the requested_bytes counter 2009-04-01 23:05:09 +02:00
Lennart Poettering
5348cc1275 increase timing update interval exponentially 2009-04-01 00:36:18 +02:00
Lennart Poettering
65b787d000 notify clients about tlength changes 2009-03-30 18:46:12 +02:00
Lennart Poettering
50695d95d1 minimal reordering 2009-03-24 21:14:08 +01:00
Marc-André Lureau
a467bec423 pulse: check context (do not user pstream when NULL) 2009-03-23 19:38:46 +01:00
Lennart Poettering
3122008704 try to detect when stupid clients forks and refuse all service from then on 2009-03-05 04:33:40 +01:00
Colin Guthrie
86dee05aec Use LGPL 2.1 on all files previously using LGPL 2 2009-03-03 20:23:02 +00:00
Lennart Poettering
823431e447 allow sending meta/policy events to clients 2009-02-12 03:18:05 +01:00
Lennart Poettering
e47d03dea4 implement PA_STREAM_FAIL_ON_SUSPEND logic 2009-02-03 02:23:46 +01:00
Lennart Poettering
fea675724d don't use PA_STREAM_NOT_MONOTONOUS anymore 2009-02-02 02:02:31 +01:00
Lennart Poettering
4a13763797 Add support for 24bit samples encoded in the LSB of 32 bit words 2009-01-16 18:39:36 +01:00
Lennart Poettering
6dc76d1158 add support for 24bit packed samples 2009-01-16 03:15:39 +01:00
Lennart Poettering
adc2973c8d Implement new flags DONT_INHIBIT_AUTO_SUSPEND and START_UNMUTED 2008-10-26 19:32:04 +01:00
Lennart Poettering
08cf9db0d1 properly parse response to pa_stream_set_buffer_attr() calls. closes #370 2008-10-02 01:15:58 +02:00
Omair Majid
2ab4bb76b2 fix pa_stream_set_name
This patch fixes a bug in pa_stream_set_name. It uses the media.name
property instead of the application.name property when setting a
stream's name

>From aa1bda11d2084365cb0cec57f37d59f07ab80052 Mon Sep 17 00:00:00 2001
From: Omair Majid <omajid@redhat.com>
Date: Wed, 10 Sep 2008 17:02:28 -0400
Subject: [PATCH] Fix bug in pa_stream_set_name

Signed-off-by: Lennart Poettering <lennart@poettering.net>
2008-09-11 00:37:27 +03:00
Arthur Taylor
f6670a1f2e stream_started_callback userdata bug
Hello

I came across a bug where the userdata parameter of the
stream_started_callback was always NULL in some cases. I couldn't seem
to make a ticket, so here's the one line patch:

Signed-off-by: Lennart Poettering <lennart@poettering.net>
2008-09-10 12:18:36 +03:00
Lennart Poettering
636b520d74 fix S32 validity check 2008-09-10 12:18:05 +03:00
Lennart Poettering
40b66a0be9 Implement "early requests" mode.
PA_STREAM_EARLY_REQUESTS is a new flag that will modify buffering metric
selection behaviour a bit. This code is good for broken ALSA/OSS clients that
ignore 'readability' on the fds in question and schedule audio via usleep()
instead.
2008-09-03 18:31:46 +02:00
Lennart Poettering
f9713d1ccf Fix error code in pa_stream_get_timing_info() 2008-08-26 15:45:18 +02:00
Lennart Poettering
b7026bf248 add a few more gcc warning flags and fix quite a few problems found by doing so 2008-08-19 22:39:54 +02:00
Lennart Poettering
ec62596f49 allow clients to not specify the volume for their streams 2008-08-18 17:49:18 +02:00
Lennart Poettering
72f520f93c make gcc shut up 2008-08-09 17:04:27 +02:00
Lennart Poettering
432b4e5f7d don't use PA_GCC_UNUSED anymore 2008-08-09 16:20:29 +02:00
Lennart Poettering
7755f759aa use (uint32_t) -1 to signify default buffer_attr values instead of 0, to allow prebuf=0 2008-06-27 00:34:17 +02:00
Lennart Poettering
ee79b05b31 rework logic to request automatic timing updates a bit 2008-06-26 19:03:53 +02:00
Lennart Poettering
4b8c4ef932 reorder a few things to get rid of an uneeded comparison 2008-06-26 19:03:16 +02:00
Lennart Poettering
97084e87c4 add a FIXME 2008-06-26 19:02:14 +02:00
Lennart Poettering
7d3d3fc15d move initialization order of validity bools around a bit 2008-06-26 19:01:51 +02:00
Lennart Poettering
36d6c712d8 unify smoother pause/resume handling in a single function check_smoother_status() 2008-06-26 19:00:42 +02:00
Lennart Poettering
1e36b57b13 use the newer name for monotonic/monotonous 2008-06-26 00:44:19 +02:00