Lennart Poettering [Thu, 9 Apr 2009 23:58:39 +0000 (01:58 +0200)]
alsa: when printing warning about bogus data from alsa include snd_pcm_dump()
Lennart Poettering [Thu, 9 Apr 2009 23:31:25 +0000 (01:31 +0200)]
bluetooth: when starting up HSP stream, send 2 packets first, only afterwards enter one-read-one-write logic
Lennart Poettering [Thu, 9 Apr 2009 23:30:50 +0000 (01:30 +0200)]
bluetooth: rework timing logic, properly implement latency callbacks
Lennart Poettering [Thu, 9 Apr 2009 23:29:46 +0000 (01:29 +0200)]
bluetooth: be a bit more verbose if we exit due to bad poll() revents flag
Lennart Poettering [Thu, 9 Apr 2009 23:28:21 +0000 (01:28 +0200)]
bluetooth: rename sco to hsp also for the user
Lennart Poettering [Thu, 9 Apr 2009 23:26:04 +0000 (01:26 +0200)]
core: add a seperate fixed_latency field for sinks/sources with fixed latency
Lennart Poettering [Thu, 9 Apr 2009 23:21:16 +0000 (01:21 +0200)]
core: memory leak, fix ref counting when moving streams
Lennart Poettering [Thu, 9 Apr 2009 23:18:04 +0000 (01:18 +0200)]
dbus: memory leak, actually free dbus wrapper
Lennart Poettering [Thu, 9 Apr 2009 23:17:49 +0000 (01:17 +0200)]
dbus: drop pa_ prefix from static symbol
Lennart Poettering [Thu, 9 Apr 2009 23:16:59 +0000 (01:16 +0200)]
protocol-native: downgrade message if we receive pcm block for dead stream
Lennart Poettering [Thu, 9 Apr 2009 23:16:24 +0000 (01:16 +0200)]
protocol-native: print underrun message only once for each underrun
Lennart Poettering [Thu, 9 Apr 2009 23:15:26 +0000 (01:15 +0200)]
socket-server: memory leak, free machine id after use
Lennart Poettering [Thu, 9 Apr 2009 23:14:46 +0000 (01:14 +0200)]
dbus: memory leak, free pending calls
Lennart Poettering [Thu, 9 Apr 2009 23:12:46 +0000 (01:12 +0200)]
dbus: memory leak, free server id after use
Lennart Poettering [Thu, 9 Apr 2009 23:12:12 +0000 (01:12 +0200)]
bluetooth: memory leak, actually free discovery struct itself
Lennart Poettering [Thu, 9 Apr 2009 23:10:59 +0000 (01:10 +0200)]
interpol-test: make it easier to test corking only optionally
Lennart Poettering [Wed, 8 Apr 2009 02:15:42 +0000 (04:15 +0200)]
bluetooth: make sure to set max_request
Lennart Poettering [Wed, 8 Apr 2009 01:49:16 +0000 (03:49 +0200)]
introduce relative_volume field in sink_input and make use of it on sink flat volume change
Lennart Poettering [Wed, 8 Apr 2009 01:47:48 +0000 (03:47 +0200)]
when calculating volume from dB use ceil()
Lennart Poettering [Wed, 8 Apr 2009 01:47:18 +0000 (03:47 +0200)]
print smallest attenuation/sample
Lennart Poettering [Tue, 7 Apr 2009 15:53:51 +0000 (17:53 +0200)]
update documentation regarding stream timing a bit
Lennart Poettering [Tue, 7 Apr 2009 02:47:58 +0000 (04:47 +0200)]
after propagating a sink volume change to the sink inputs recalculate their soft volumes
Lennart Poettering [Tue, 7 Apr 2009 02:05:03 +0000 (04:05 +0200)]
we need to make our multiplications with linear values
Lennart Poettering [Tue, 7 Apr 2009 02:04:19 +0000 (04:04 +0200)]
reduce number of conversions to/from linear volumes
Lennart Poettering [Tue, 7 Apr 2009 02:02:25 +0000 (04:02 +0200)]
compare with doubles, not integer
Lennart Poettering [Mon, 6 Apr 2009 23:21:07 +0000 (01:21 +0200)]
If the sink volume is lowered to 0 and then increased again, make sure all stream volumes follow instead of staying at 0
Lennart Poettering [Mon, 6 Apr 2009 22:50:47 +0000 (00:50 +0200)]
make use of SO_TIMESTAMP timestamp for accuracy and leave smoother paused until we have data
Lennart Poettering [Mon, 6 Apr 2009 22:48:09 +0000 (00:48 +0200)]
mark null sink as support dynamic latency
Lennart Poettering [Mon, 6 Apr 2009 22:47:55 +0000 (00:47 +0200)]
adjust max_rewind/max_request whenever the latency changes
Lennart Poettering [Mon, 6 Apr 2009 22:47:13 +0000 (00:47 +0200)]
send the source latency based on the MTU size
Lennart Poettering [Mon, 6 Apr 2009 22:46:20 +0000 (00:46 +0200)]
add suspend_within_thread() callbacks to pa_sink_input/pa_source_output
Lennart Poettering [Mon, 6 Apr 2009 22:41:45 +0000 (00:41 +0200)]
enable debugging output based on if DEBUG_DATA macro is set
Lennart Poettering [Mon, 6 Apr 2009 21:02:45 +0000 (23:02 +0200)]
make sure we don't apply sampling rate fixes that bring the sampling freq > PA_RATE_MAX
Fixes #525
Lennart Poettering [Mon, 6 Apr 2009 20:09:38 +0000 (22:09 +0200)]
Make sure we don't get stuck when prebuf is too high
If prebuf is greater than tlength minus minreq we might end up waiting
for the buffer to fill up further however without ever asking for more
data from the client since less minreq bytes might be missing.
This fixes bug #440
Lennart Poettering [Mon, 6 Apr 2009 20:06:50 +0000 (22:06 +0200)]
extend documentation for pa_stream_cork() a bit
Lennart Poettering [Mon, 6 Apr 2009 14:38:38 +0000 (16:38 +0200)]
properly handle interpolation when queried x is left of last data position
Lennart Poettering [Mon, 6 Apr 2009 02:21:26 +0000 (04:21 +0200)]
don't fail device reservation if the D-Bus connection is dead
Lennart Poettering [Mon, 6 Apr 2009 02:20:12 +0000 (04:20 +0200)]
be a bit more verbose about the busses we are connected to
Lennart Poettering [Mon, 6 Apr 2009 00:31:22 +0000 (02:31 +0200)]
make sure we keep a reference of the bus connection during the whole runtime if we manage to acquire the bus name
Lennart Poettering [Sun, 5 Apr 2009 01:16:04 +0000 (03:16 +0200)]
run make po-update
Lennart Poettering [Sun, 5 Apr 2009 01:15:00 +0000 (03:15 +0200)]
Merge commit 'origin/master-tx'
Lennart Poettering [Sun, 5 Apr 2009 01:05:51 +0000 (03:05 +0200)]
Merge branch 'master' of ssh://rootserver/home/lennart/git/public/pulseaudio
Lennart Poettering [Sun, 5 Apr 2009 01:04:22 +0000 (03:04 +0200)]
make it easy to disable interpolation in the interpolation test tool
Lennart Poettering [Sun, 5 Apr 2009 00:59:02 +0000 (02:59 +0200)]
Fix a couple of races in native protocol
Also make sure we account for recording memblock that are currently 'on
the fly' between the main and the IO thread.
Also makes a couple of timing calls that were done in different calls
in a single inter-thread call. That way there is a better guarantee that
they match up.
Lennart Poettering [Sun, 5 Apr 2009 00:50:32 +0000 (02:50 +0200)]
don't try to outsmart the transport
Lennart Poettering [Sun, 5 Apr 2009 00:46:38 +0000 (02:46 +0200)]
introduce pa_{sink|source}_get_latency_within_thread()
Lennart Poettering [Sun, 5 Apr 2009 00:26:02 +0000 (02:26 +0200)]
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.
vpv [Sat, 4 Apr 2009 22:10:50 +0000 (22:10 +0000)]
Sending translation for Finnish
Lennart Poettering [Sat, 4 Apr 2009 02:13:58 +0000 (04:13 +0200)]
initialize sound cards only after the 'control' object appeared
Lennart Poettering [Sat, 4 Apr 2009 02:13:11 +0000 (04:13 +0200)]
increase log buffer further
Lennart Poettering [Sat, 4 Apr 2009 02:12:42 +0000 (04:12 +0200)]
refuse to initialize on modem devices
Lennart Poettering [Sat, 4 Apr 2009 00:30:30 +0000 (02:30 +0200)]
add missing files to POTFILES.in
Lennart Poettering [Sat, 4 Apr 2009 00:29:00 +0000 (02:29 +0200)]
run make update-po
Lennart Poettering [Sat, 4 Apr 2009 00:28:13 +0000 (02:28 +0200)]
Merge commit 'origin/master-tx'
Maarten Bosmans [Wed, 1 Apr 2009 10:35:44 +0000 (12:35 +0200)]
various spelling fixes
Luke Yelavich [Wed, 1 Apr 2009 01:59:37 +0000 (12:59 +1100)]
POTFILES.IN: Refer to src/pulsecore/dbus-util.c
soko [Fri, 3 Apr 2009 18:42:32 +0000 (18:42 +0000)]
Sending translation for po/sr@latin.po
soko [Fri, 3 Apr 2009 18:41:45 +0000 (18:41 +0000)]
Sending translation for Serbian
soko [Fri, 3 Apr 2009 18:27:29 +0000 (18:27 +0000)]
Sending translation for po/sr@latin.po
soko [Fri, 3 Apr 2009 18:26:59 +0000 (18:26 +0000)]
Sending translation for Serbian
Lennart Poettering [Fri, 3 Apr 2009 15:50:37 +0000 (17:50 +0200)]
Merge branch 'master' of ssh://rootserver/home/lennart/git/public/pulseaudio
Lennart Poettering [Fri, 3 Apr 2009 15:49:05 +0000 (17:49 +0200)]
downgrade a few messages
soko [Thu, 2 Apr 2009 22:22:49 +0000 (22:22 +0000)]
Sending translation for Serbian
leahliu [Thu, 2 Apr 2009 09:32:20 +0000 (09:32 +0000)]
Sending translation for Chinese (Simplified)
Lennart Poettering [Wed, 1 Apr 2009 21:05:43 +0000 (23:05 +0200)]
plot the difference between system and sound card time
Lennart Poettering [Wed, 1 Apr 2009 21:05:09 +0000 (23:05 +0200)]
properly account for seeks in the requested_bytes counter
Lennart Poettering [Wed, 1 Apr 2009 19:15:52 +0000 (21:15 +0200)]
use machine id instead of hostname to identify local connections
tombo [Wed, 1 Apr 2009 17:39:09 +0000 (17:39 +0000)]
Sending translation for Italian
Lennart Poettering [Wed, 1 Apr 2009 14:15:27 +0000 (16:15 +0200)]
load bt discover module only when installed
Lennart Poettering [Wed, 1 Apr 2009 01:09:10 +0000 (03:09 +0200)]
prepare test7
Lennart Poettering [Wed, 1 Apr 2009 01:04:39 +0000 (03:04 +0200)]
pass destination source/sink when moving streams so that we can access them
Lennart Poettering [Wed, 1 Apr 2009 01:03:20 +0000 (03:03 +0200)]
don't access i->sink if it is not set
Lennart Poettering [Tue, 31 Mar 2009 22:43:29 +0000 (00:43 +0200)]
prepare test6
Lennart Poettering [Tue, 31 Mar 2009 22:36:18 +0000 (00:36 +0200)]
increase timing update interval exponentially
Lennart Poettering [Tue, 31 Mar 2009 22:35:37 +0000 (00:35 +0200)]
in verbose mode log buffer attr changes
Lennart Poettering [Tue, 31 Mar 2009 22:33:40 +0000 (00:33 +0200)]
add buffer_attr callback stuff to exported symbol list
Lennart Poettering [Tue, 31 Mar 2009 20:16:53 +0000 (22:16 +0200)]
fix buffer defaults
Lennart Poettering [Tue, 31 Mar 2009 19:36:45 +0000 (21:36 +0200)]
be a bit more verbose about max_request changes
Lennart Poettering [Tue, 31 Mar 2009 19:36:09 +0000 (21:36 +0200)]
Log underruns
Lennart Poettering [Tue, 31 Mar 2009 19:35:34 +0000 (21:35 +0200)]
handle buffer_attr changed messages properly
Lennart Poettering [Tue, 31 Mar 2009 18:43:05 +0000 (20:43 +0200)]
update command name table
Lennart Poettering [Tue, 31 Mar 2009 18:31:15 +0000 (20:31 +0200)]
fix an error where a signal was accidently freed when it is tried to register it twice
Lennart Poettering [Tue, 31 Mar 2009 18:28:58 +0000 (20:28 +0200)]
Merge commit 'origin/master-tx'
beckerde [Tue, 31 Mar 2009 12:39:49 +0000 (12:39 +0000)]
Sending translation for Spanish
beckerde [Tue, 31 Mar 2009 02:48:57 +0000 (02:48 +0000)]
Sending translation for Spanish
beckerde [Tue, 31 Mar 2009 00:39:58 +0000 (00:39 +0000)]
Sending translation for Spanish
Finn Thain [Sat, 7 Mar 2009 05:48:10 +0000 (16:48 +1100)]
revive solaris module
On Wed, 4 Mar 2009, Lennart Poettering wrote:
[snip]
> > This patch disables link map/library versioning unless ld is GNU ld.
> > Another approach for solaris would be to use that linker's -M option,
> > but I couldn't make that work (due to undefined mainloop, browse and
> > simple symbols when linking pacat. I can post the errors if anyone is
> > intested.)
>
> The linking in PA is a bit weird since we have a cyclic dependency
> between libpulse and libpulsecommon which however is not explicit.
Could that affect the pacat link somehow?
What are the implications for client apps that link with the non-versioned
libraries I've been building on solaris?
[snip]
> > struct userdata {
> > pa_core *core;
> > @@ -87,15 +92,24 @@ struct userdata {
> >
> > pa_memchunk memchunk;
> >
> > - unsigned int page_size;
> > -
> > uint32_t frame_size;
> > - uint32_t buffer_size;
> > - unsigned int written_bytes, read_bytes;
> > + int32_t buffer_size;
> > + volatile uint64_t written_bytes, read_bytes;
> > + pa_mutex *written_bytes_lock;
>
> Hmm, we generally try do do things without locking in PA. This smells as
> if it was solvable using atomic ints as well.
>
> Actually, looking at this again I get the impression these mutex are
> completely unnecessary here. All functions that lock these mutexes are
> called from the IO thread so no locking should be nessary.
>
> Please don't use volatile here. I am pretty sure it is a misuse. Also
> see http://kernel.org/doc/Documentation/volatile-considered-harmful.txt
> which applies here too I think.
OK, I've removed the locks. For some reason I thought that the get_latency
function was called from two different threads.
> > +static void sink_set_volume(pa_sink *s) {
> > + struct userdata *u;
> > + audio_info_t info;
> > +
> > + pa_assert_se(u = s->userdata);
> > +
> > + if (u->fd >= 0) {
> > + AUDIO_INITINFO(&info);
> > +
> > + info.play.gain = pa_cvolume_avg(&s->virtual_volume) * AUDIO_MAX_GAIN / PA_VOLUME_NORM;
> > + assert(info.play.gain <= AUDIO_MAX_GAIN);
>
> I'd prefer if you'd use pa_cvolume_max here instead of pa_cvolume_avg()
> because this makes the volume independant of the balance.
>
> > - info.play.error = 0;
> > + info.play.gain = pa_cvolume_avg(&s->virtual_volume) * AUDIO_MAX_GAIN / PA_VOLUME_NORM;
> > + assert(info.play.gain <= AUDIO_MAX_GAIN);
>
> Same here. (i.e. for the source)
Done and done.
> > + if (u->sink->thread_info.rewind_requested)
> > + pa_sink_process_rewind(u->sink, 0);
>
> This is correct.
>
> >
> > err = ioctl(u->fd, AUDIO_GETINFO, &info);
> > pa_assert(err >= 0);
>
> Hmm, if at all this should be pa_assert_se(), not pa_assert() (so that
> it is not defined away by -DNDEBUG). However I'd prefer if the error
> would be could correctly. (I see that this code is not yours, but
> still...)
Done.
> > + case EINTR:
> > + break;
>
> I think you should simply try again in this case...
Done.
> > + case EAGAIN:
> > + u->buffer_size = u->buffer_size * 18 / 25;
> > + u->buffer_size -= u->buffer_size % u->frame_size;
> > + u->buffer_size = PA_MAX(u->buffer_size, (int32_t)MIN_BUFFER_SIZE);
> > + pa_sink_set_max_request(u->sink, u->buffer_size);
> > + pa_log("EAGAIN. Buffer size is now %u bytes (%llu buffered)", u->buffer_size, buffered_bytes);
> > + break;
>
> Hmm, care to explain this?
EAGAIN happens when the user requests a buffer size that is too large for
the STREAMS layer to accept. We end up looping with EAGAIN every time we
try to write out the rest of the buffer, which burns enough CPU time to
trip the CPU limit.
So, I reduce the buffer size with each EAGAIN. This gets us reasonably
close to the largest usable buffer size. (Perhaps there's a better way to
determine what that limit is, but I don't know how.)
> > +
> > + pa_rtpoll_set_timer_absolute(u->rtpoll, xtime0 + pa_bytes_to_usec(buffered_bytes / 2, &u->sink->sample_spec));
> > + } else {
> > + pa_rtpoll_set_timer_disabled(u->rtpoll);
> > }
>
> Hmm, you schedule audio via timers? Is that a good idea?
Perhaps not. I won't know until I test on more hardware.
But, given that we have rt priority and high resolution timers on solaris,
I think it is OK in theory...
The reason I used a timer was to minimise CPU usage and avoid the CPU
limit. Recall that getting woken up by poll is not an option for playback
unfortunately. We can arrange for a signal when the FD becomes writable,
but that throws out the whole buffer size concept, which acts to reduce
latency.
> That really only makes sense if you have to deal with large buffers and
> support rewinding.
I've implemented rewind support, but I'm still not sure that I have
understood the concept; I take it that we "rewind" (from the point-of-view
of the renderer, not the sink) so that some rendered but as yet unplayed
portion of the memblock/buffers can then be rendered again?
> Please keep in mind that the system clock and the sound card clock
> deviate. If you use the system timers to do PCM scheduling ou might need
> a pa_smoother object that is able to estimate the deviation for you.
Actually, in an earlier version I did use a smoother (after reading about
that in the wiki). But because of the non-monotonic sample counter (bug?)
I decided that it probably wasn't worth the added complexity so I removed
it. I'll put the smoother back if I can figure out the problem with the
sample counter.
>
> > + u->frame_size = pa_frame_size(&ss);
> >
> > - if ((fd = open(p = pa_modargs_get_value(ma, "device", DEFAULT_DEVICE), mode | O_NONBLOCK)) < 0)
> > + u->buffer_size = 16384;
>
> It would appear more appropriate to me if the buffer size is adjusted by
> the sample spec used.
Done.
> One last thing: it would probably be a good idea to allocate a pa_card
> object and attach the sink and the source to it.
It is possible to open /dev/audio twice by loading the solaris module
twice -- once for the sink (passing record=0) and once for source (passing
playback=0), thus giving seperate threads/LWPs for source and sink. It
might be misleading to allocate two cards in that situation?
> Right now pa_cards are mostly useful for switching profiles but even if
> you do not allow switching profiles on-the-fly it is of some value to
> find out via the cards object which source belongs to which sink.
>
> Otherwise I am happy!
>
> Thanks for your patch! I'd be thankful if you could fix the issues
> pointed out and prepare another patch on top of current git!
No problem. Patch follows. It also includes a portability fix for
pa_realpath and a fix for a bug in the pa_signal_new() error path that
causes signal data be freed if you attempt to register the same signal
twice.
> I hope I answered all your questions,
Your answers were very helpful, thanks.
Finn
>
> Lennart
>
>
Kyle Cronan [Mon, 30 Mar 2009 17:49:37 +0000 (12:49 -0500)]
Specifying ALSA mixer control
On Fri, Mar 27, 2009 at 7:21 AM, Lennart Poettering <lennart@poettering.net> wrote:
>> I tried installing the latest git sources on my Ubuntu Jaunty box but
>> it just broke sound in all my applications. For my own purposes, I'm
>> going to need to start with the Ubuntu-patched 0.9.14. However, if
>> you are willing to accept this patch I will forward port it so that it
>> applies to the latest sources. It's a completely harmless change, so
>> why not apply it?
>
> Yes, I am happy to apply it. Could you please update it for current git?
>
Great. An updated patch is attached. For symmetry, I added this
option to the alsa source module as well.
The Ubuntu folks have customized pulse so much that it is difficult
for me to get this version working on my system. For this patch I
have only made sure that it compiles. But it does pretty much the
same thing as the one for 0.9.14, which is working great for me.
Thanks,
Kyle
Maarten Bosmans [Sun, 29 Mar 2009 18:41:58 +0000 (20:41 +0200)]
fix some typos in doxygen comments
these bugged me for a while now.
Maarten
Maarten Bosmans [Mon, 30 Mar 2009 14:24:18 +0000 (16:24 +0200)]
handle failure to parse proplist in cli-command gracefully
Lennart Poettering [Mon, 30 Mar 2009 22:26:12 +0000 (00:26 +0200)]
Lennart Poettering [Mon, 30 Mar 2009 22:22:17 +0000 (00:22 +0200)]
Revert "make sure we always read in all properties"
This reverts commit
1c8f968282208be391f062c1656d85e2ba5078ac.
Turns out doing this is racy. The appropriate fix seems to be
38825d79123678bf0c5d156aaea4bedb888a7fcd
Lennart Poettering [Mon, 30 Mar 2009 20:31:03 +0000 (20:31 +0000)]
allow nofail mode only when no server string was specified
Lennart Poettering [Mon, 30 Mar 2009 19:07:41 +0000 (21:07 +0200)]
minor cleanups
Lennart Poettering [Mon, 30 Mar 2009 19:07:23 +0000 (21:07 +0200)]
take org.pulseaudio.Server instead of org.pulseaudio to match the interface name already used in the HAL module
Lennart Poettering [Mon, 30 Mar 2009 18:57:23 +0000 (20:57 +0200)]
fix compiler warning
Lennart Poettering [Mon, 30 Mar 2009 18:57:12 +0000 (20:57 +0200)]
make sure we never access an invalid pa_bluetooth_device object
Lennart Poettering [Mon, 30 Mar 2009 18:56:03 +0000 (20:56 +0200)]
make sure we always read in all properties
Lennart Poettering [Mon, 30 Mar 2009 18:55:50 +0000 (20:55 +0200)]
get rid of old 'Connected' property parsing and make sure we don't execute two case branches
Lennart Poettering [Mon, 30 Mar 2009 18:55:10 +0000 (20:55 +0200)]
introduce typedef for pa_bt_audio_state and use it everywhere