Commit graph

1195 commits

Author SHA1 Message Date
Colin Guthrie
a65825fa45 alsa: Set the rewind safeguard proportionally to sample spec
Currently when rewinding alsa, a fixed value of 256 bytes is used,
which represents 1.33ms @ 48kHz (2ch, 16bit). This is typically fine
and due to DMA constraints we would not want to rewind less than this.

However with more demanding sample specs, (e.g. 8ch 192kHz 32bit)
256 bytes is likely not sufficient, so calculate what 1.33ms would
be and use which ever value is bigger.

Discussed with David Henningsson and Pierre-Louis Bossart here:
 http://thread.gmane.org/gmane.comp.audio.pulseaudio.general/7286
2010-09-04 12:49:26 +01:00
Tanu Kaskinen
8748ebdad3 alsa-sink: Get rid of a compiler warning regarding rewind_safeguard type.
GCC gave a warning, because the pointer given to pa_modargs_get_value_u32() had
type size_t instead of uint32_t.
2010-09-04 12:49:16 +01:00
Pierre-Louis Bossart
514fd1eee8 add rewind-safeguard parameter
Rewinding the ring buffer completely causes audible issues with DMAs.
Previous solution didn't work with tsched=0, and used tsched_watermark
for guardband, which isn't linked to hardware and could become really high
if underflows occurred.

Added separate parameter that can be tuned to hardware limitations and size
of DMA bursts.
2010-09-04 11:41:18 +01:00
Lennart Poettering
e2ef3a1391 alsa: don't make use of tsched related variables when tsched is disabled 2010-09-04 11:41:11 +01:00
Wim Taymans
4fb02d8e0e alsa: increase the smoother window
40ms for the smoother window is too small. Increase the size to 4 seconds, like
we do for the sinks.
2010-09-03 16:18:29 +01:00
Wim Taymans
93750199f8 alsa: resume smoother after unsuspend
The smoother is paused when the device is suspended but never resumed on
unsuspend. Pass the paused = FALSE flag to the pa_smoother_reset() call to make
it unpause when unsuspending. This patch improves source timings quite a bit.
2010-08-23 11:31:46 +01:00
Colin Guthrie
2b88634671 x11: Partially convert to XCB.
This commit mostly converts the X11 handling to XCB. There are still
some uses of XLib to deal with the X11 session handling modules, however all
client-side code should now be free of XLib and thus this should fix Bug #799
2010-08-15 21:41:52 +01:00
Lennart Poettering
4a1072e0bc udev: fix hex decoding 2010-08-15 21:40:49 +01:00
Pierre-Louis Bossart
aaae99d89f alsa: disable rewinds when using ALSA plugins
This is required to when playing on a52: device, rewind is broken
in those plugins.
Credits to Michael Rans <mcarans@yahoo.co.uk> for finding this
workaround, and Tanu Kaskinen <tanuk@iki.fi> for providing
valuable feedback.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@intel.com>
2010-07-15 12:47:34 +01:00
Colin Guthrie
6c8660abd2 alsa: Fix assertion on mmap_write (triggered via a52 plugin) 2010-07-15 12:47:29 +01:00
Colin Guthrie
65f89dca7c rtp: Fix bracketing in pa_rtp_recv.
The syntactically correct error meant that the timestamp was always
marked as found and only the first header was checked.

In the case where the timestamp was the first header, things
would have worked as expected.

Thanks to pino for reporting via bug refs #818
2010-05-08 13:47:51 +01:00
David Henningsson
d519ca41d7 jack: Prevent crash on jack server shutdown 2010-05-08 01:30:22 +02:00
Lennart Poettering
bc7314f14e thread: name all threads so that the names appear in /proc/$PID/task/$TID/comm 2010-05-03 13:28:39 +02:00
Lennart Poettering
22f708a1ec Revert "Fix crash on jack server shutdown"
This reverts commit e756467434.

The patch is incomplete and not entirely correct.
2010-03-22 17:28:53 +01:00
Colin Guthrie
a7c1778a68 intended-roles: Do not pick monitor sources when doing automatic role-based device selection 2010-03-17 16:03:11 +00:00
David Henningsson
e756467434 Fix crash on jack server shutdown
On sink unlinking, existing sink inputs are moved, which in turn calls
a get latency callback, which references the jack client. Therefore,
make sure the sink is unlinked before the client is closed. Failure to
do so might lead to SIGSEGV.
2010-03-15 08:14:37 +00:00
Daniel T Chen
29845be64d Handle 'Digital Mic' as an 'Input Source'
BugLink: https://launchpad.net/bugs/533877

Some laptops have 'Digital Mic' exposed as an 'Input Source', e.g., Dell
XPS 1330, so handle these, too.
2010-03-12 08:53:23 +00:00
Lennart Poettering
dd682d6f96 alsa: reset max_rewind/max_request while suspending 2010-02-22 05:06:33 +01:00
Lennart Poettering
522c446ddc alsa-util: strip spaces from ALSA card/pcm names
http://pulseaudio.org/ticket/778
2010-02-22 04:55:21 +01:00
Lennart Poettering
a469d44e69 suspend-on-idle: resume audio device even for initially corked streams
We need to resume audio devices even for streams that are created in
corked stat, so that the latency ranges of the audio device are known
during the initial latency negotiation. If we don't the latency
negotiation will be based on placeholder data and changed later on which
clients do not expect.

This should fix issues with Skype.

https://bugzilla.redhat.com/show_bug.cgi?id=554929
2010-02-22 03:22:28 +01:00
Lennart Poettering
8adf536426 stream-restore: be a little bit more verbose why we don't reastore a sink 2010-02-21 17:36:51 +01:00
Lennart Poettering
307bd142fe alsa: use default output port names
instead of coming up with pointless aliases, reuse the already established
names, for second headphones, and second speakers.
2010-02-16 00:59:24 +01:00
Lennart Poettering
0c836aacd8 alsa: cover "Internal Mic" elements
https://bugzilla.redhat.com/show_bug.cgi?id=562216
2010-02-16 00:58:49 +01:00
Lennart Poettering
7d6bab0d00 alsa: cover 'Shared Mic/Line in', 'Analog Source'
https://bugzilla.redhat.com/show_bug.cgi?id=558638
2010-02-15 23:39:12 +01:00
Lennart Poettering
e8cb96c010 alsa: cover "Desktop Speaker" mixer elements
As exposed by really old Microsoft USB sound systems
2010-02-15 22:23:39 +01:00
Lennart Poettering
84782f24c5 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-01-18 01:33:04 +01:00
Daniel T Chen
8c7148a4ea 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-15 01:34:55 +01:00
David Kågedal
66e1a2d051 alsa: add profile set for M-Audio FastTrack Pro USB 2010-01-15 01:33:35 +01:00
Lennart Poettering
e129f8577a udev: use ID_MODEL_ENC instead of ID_MODEL if it is set
That way we should be able to make use of the nicer USB strings the USB
hw provides.

Fixes the issues pointed out in:

https://tango.0pointer.de/pipermail/pulseaudio-discuss/2010-January/006248.html
2010-01-14 20:36:35 +01:00
Lennart Poettering
48e0f6808b alsa: cover bass boost mixer element
http://pulseaudio.org/ticket/740
2010-01-14 02:53:50 +01:00
Lennart Poettering
acb4996203 udev: rework modem detection a bit
Check every single pcm device of a card whether it is a modem.
2010-01-14 02:08:29 +01:00
Daniel T. Chen
63c968bf77 udev: handle sound cards with both modem and audio properly
http://pulseaudio.org/ticket/681
https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/394500
2010-01-14 02:08:29 +01:00
Colin Guthrie
291cd09601 alsa: Cover the 'Int Mic Boost' element.
This is not 100% ideal as we have not way to tie specific boosts to specific
inputs and this particular chipset (as noted in #772) appears to
support just that.

For the time being incorporate it into the normal boost logic.

See http://pulseaudio.org/ticket/772
2010-01-13 23:47:21 +00:00
Colin Guthrie
67c6535222 alsa: cover Input Source:Int Mic
As seen on some HDA chips (e.g. Fujitsu Siemens S6410)
Refs http://pulseaudio.org/ticket/772
2010-01-13 23:44:00 +00:00
Lennart Poettering
540ec7b961 alsa: ignore volume changes from the hw if we are not on the active console 2010-01-13 20:30:36 +01:00
Lennart Poettering
9b37dce422 udev: make sure we get events only for sound devices 2010-01-13 19:41:44 +01:00
Lennart Poettering
4bcb1a909f bluetooth: fix invalid memory access
When an GetProperties() reply arrives after we already deleted the
device structure for it make sure we don't accidentaly touch the
invalidated object.

https://bugzilla.redhat.com/show_bug.cgi?id=543205
2010-01-13 17:24:37 +01:00
Lennart Poettering
15a3018bda udev: don't forget to unref devices we are not interested in
https://bugzilla.redhat.com/show_bug.cgi?id=552932
2010-01-12 23:01:24 +01:00
Lennart Poettering
e7d9f891e2 bluetooth: don't hit an assert if latency is queried for a stooped recording stream
https://bugzilla.redhat.com/show_bug.cgi?id=537422
2010-01-08 23:44:42 +01:00
Lennart Poettering
11688eca4b bluetooth: destruct stream only if it is not already destructed
https://bugzilla.redhat.com/show_bug.cgi?id=551842
2010-01-08 22:18:15 +01:00
Lennart Poettering
3eed219a50 core: make sure we always return a valid memblock in sink_input_pop() callbacks
https://bugzilla.redhat.com/show_bug.cgi?id=553607
2010-01-08 21:51:30 +01:00
Lennart Poettering
c41ee00893 dbus: remove filter functions only if they were actually set before
This fixes an assert when destructing modules that have not been fully
initialized.

https://bugzilla.redhat.com/show_bug.cgi?id=548525
2010-01-08 20:06:21 +01:00
Lennart Poettering
7ab8e83cb0 alsa: fix minor sampling rate deviations before adjusting the buffer size 2009-11-23 05:03:49 +01:00
Lennart Poettering
366e3ebe19 alsa: fix log output when the audio device refuses to give us again the same period settings we had before 2009-11-23 05:03:41 +01:00
Colin Guthrie
3014081136 Merge branch '0.9.20-stable' into stable-queue
Conflicts:
	src/Makefile.am
2009-11-20 16:58:28 +00:00
Lennart Poettering
231417c867 rygel: fix itemCount property for sources
Fixes http://pulseaudio.org/ticket/721
2009-11-18 21:41:38 +01:00
Colin Guthrie
ff71cbfb0e device-manager: Fix compiler warning.
Do not use a variable called 'index' as it clashes with string.h
2009-11-11 17:44:28 +00:00
Colin Guthrie
5382455d5e device-manager: Rather than flagging the device as available, just include the sink/source index with PA_INVALID_INDEX meaning unavailable 2009-11-11 17:44:27 +00:00
Colin Guthrie
af55f07015 device-manager: Play nice with module-stream-restore.
If m-s-r sets the device we let it do so. Otherwise we handle the routing. We run before
module-intended-roles as the priority list will likely be configured appropriately
to do the same job, albeit with manual setup.
2009-11-11 17:44:27 +00:00
Colin Guthrie
1b31d8a075 device-manager: Make use of PA_IDXSET_FOREACH when applying entries. 2009-11-11 17:44:27 +00:00