summaryrefslogtreecommitdiffstats
path: root/src/pulsecore
Commit message (Collapse)AuthorAgeFilesLines
* Fixup #include directives according to Coding StyleMaarten Bosmans2011-03-1111-17/+15
| | | | | Use #include "header.h" if functionality of header.h is implemented and #include <header.h> if functionality of header.h is used.
* Fix up according to Coding StyleMaarten Bosmans2011-03-1131-268/+209
| | | | Only whitespace changes in here
* volume: Add Orc-based optimised volume scalingArun Raghavan2011-03-054-0/+272
| | | | | | | | | This adds volume scaling for 1- and 2-channel software volume scaling using Orc. While testing the MMX and SSE backends on a Core2, I see an ~2x performance benefit over the hand-rolled MMX and SSE code. Since I haven't been able to test on other architectures, the Orc code is only used when MMX/SSE* is present. This can be changed in the future after testing on AMD and ARM machines.
* volume: Fix sample array size for testsArun Raghavan2011-03-053-3/+3
| | | | | | Somewhere in the history of the MMX tests, the number of channels was changed from 1 to 2, but the number of samples was not increased to make it even (multiple of the frame size).
* volume: Make tests use only valid volumesArun Raghavan2011-03-053-3/+3
|
* Various fixes for build warningsMaarten Bosmans2011-03-021-2/+2
|
* Get rid of some unused-function compiler warningsMaarten Bosmans2011-03-023-1/+7
|
* Include <time.h> where necessaryMaarten Bosmans2011-03-012-0/+2
|
* Revert "Add new subsystem for applying envelopes (such as volume ramps) to ↵Arun Raghavan2011-02-282-839/+0
| | | | | | | | | | | | | | | audio signals" This reverts commit 95a98fe6f2002c9dd448b70bb6944541b5616df3. Conflicts: src/Makefile.am src/pulsecore/envelope.c src/pulsecore/envelope.h src/tests/envelope-test.c (part of a patch series removing all ramping code)
* Revert "Add volume ramping feature - envelop fix"Arun Raghavan2011-02-282-271/+65
| | | | | | | | | | This reverts commit 8eaa40b6f4cae749610770c85ba500f326d59b50. Conflicts: src/pulsecore/envelope.c (part of a patch series removing all ramping code)
* Revert "Add volume ramping feature - sink-input modification"Arun Raghavan2011-02-282-330/+81
| | | | | | | | | | This reverts commit 5318eb35ef3f91836084382a4f3d5ef08d322554. Conflicts: src/pulsecore/sink-input.c (part of a patch series removing all ramping code)
* Revert "Add volume ramping feature - sink modification"Arun Raghavan2011-02-281-6/+1
| | | | | | | | | | This reverts commit 897ef86b7fbb87ef17d30c584e6cd93abfc342bc. Conflicts: src/pulsecore/sink.c (part of a patch series removing all ramping code)
* Revert "ramping: minor cleanups"Arun Raghavan2011-02-281-10/+2
| | | | | | This reverts commit f202af17b717f5b383ac072f80a6c1327bc3143b. (part of a patch series removing all ramping code)
* Revert "core: volume ramping fix"Arun Raghavan2011-02-281-1/+1
| | | | | | This reverts commit aa9348441db34b787784711f19882d6c42fa315d. (part of a patch series removing all ramping code)
* sink: Add casts to some printf arguments to get rid of compiler warnings.Tanu Kaskinen2011-02-281-5/+6
|
* sink: Don't send unnecessary PA_SINK_MESSAGE_SET_SHARED_VOLUME messages.Tanu Kaskinen2011-02-281-2/+0
| | | | If send_msg is false, the message will be sent by the caller.
* virtual-sink: Fix a crash when moving the sink to a new master right after ↵Tanu Kaskinen2011-02-261-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | setup. If the virtual sink is moved to a new master right after it has been created, then the virtual sink input's memblockq can be rewound to a negative read index. The data written prior to the move starts from index zero, so after the rewind there's a bit of silence. If the memblockq doesn't have a silence memchunk set, then pa_memblockq_peek() will return zero in such case, and the returned memchunk's memblock pointer will be NULL. That scenario wasn't taken into account in the implementation of sink_input_pop_cb. Setting a silence memchunk for the memblockq solves this problem, because pa_memblock_peek() will now return a valid memblock if the read index happens to point to a hole in the memblockq. I believe this isn't the best possible solution, though. It doesn't really make sense to rewind the sink input's memblockq beyond index 0 in the first place, because now when the stream starts to play to the new master sink, there's some unnecessary silence before the actual data starts. This is a small problem, though, and I don't grok the rewinding system well enough to know how to fix this issue properly. I went through all files that call pa_memblockq_peek() to see if there are more similar bugs. play-memblockq.c was the only one that looked to me like it might be broken in the same way. I didn't try reproducing the bug with play-memblockq.c, though, so I just added a FIXME comment there.
* Implement the "volume sharing" feature.Tanu Kaskinen2011-02-264-185/+580
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we have a filter sink that does some processing, currently the benefits of the flat volume feature are not really available. That's because if you have a music player that is connected to the filter sink, the hardware sink doesn't have any idea of the music player's stream volume. This problem is solved by this "volume sharing" feature. The volume sharing feature works so that the filter sinks that want to avoid the previously described problem declare that they don't want to have independent volume, but they follow the master sink volume instead. The PA_SINK_SHARE_VOLUME_WITH_MASTER sink flag is used for that declaration. Then the volume logic is changed so that the hardware sink calculates its real volume using also the streams connected to the filter sink in addition to the streams that are connected directly to the hardware sink. Basically we're trying to create an illusion that from volume point of view all streams are connected directly to the hardware sink. For that illusion to work, the volumes of the filter sinks and their virtual streams have to be managed carefully according to a set of rules: If a filter sink follows the hardware sink volume, then the filter sink's * reference_volume always equals the hw sink's reference_volume * real_volume always equals the hw sink's real_volume * soft_volume is always 0dB (ie. no soft volume) If a filter sink doesn't follow the hardware sink volume, then the filter sink's * reference_volume can be whatever (completely independent from the hw sink) * real_volume always equals reference_volume * soft_volume always equals real_volume (and reference_volume) If a filter sink follows the hardware sink volume, and the hardware sink supports flat volume, then the filter sink's virtual stream's * volume always equals the hw sink's real_volume * reference_ratio is calculated normally from the stream volume and the hw sink's reference_volume * real_ratio always equals 0dB (follows from the first point) * soft_volume always equals volume_factor (follows from the previous point) If a filter sink follows the hardware sink volume, and the hardware sink doesn't support flat volume, then the filter sink's virtual stream's * volume is always 0dB * reference_ratio is always 0dB * real_ratio is always 0dB * soft_volume always equals volume_factor If a filter sink doesn't follow the hardware sink volume, then the filter sink's virtual stream is handled as a regular stream. Since the volumes of the virtual streams are controlled by a set of rules, the user is not allowed to change the virtual streams' volumes. It would probably also make sense to forbid changing the filter sinks' volume, but that's not strictly necessary, and currently changing a filter sink's volume changes actually the hardware sink's volume, and from there it propagates to all filter sinks ("funny" effects are expected when adjusting a single channel in cases where all sinks don't have the same channel maps). This patch is based on the work of Marc-André Lureau, who did the initial implementation for Pulseaudio 0.9.15.
* core: Add a new hook PA_CORE_HOOK_CARD_PROFILE_CHANGEDColin Guthrie2011-02-252-0/+3
| | | | | | This will allow modules to know when a card profile has changed and take appropriate action. This might prove useful when developing UCM so that the appropriate verb can be set.
* core: Added new hooks: PA_CORE_HOOK_SOURCE_PORT_CHANGED and ↵Kim Therkelsen2011-02-253-0/+6
| | | | | | | | | | | PA_CORE_HOOK_SINK_PORT_CHANGED This allows modules to know when certain ports are changed. This will allow e.g. a filter module (or LADSAP) to only load when a certain port is used on the device (e.g. to only filter headphones and not normal speakers). (Comment from Colin Guthrie: This may also have use in UCM)
* Merge remote-tracking branch 'mkbosmans/mingw32-build'Colin Guthrie2011-02-2537-123/+270
|\
| * Use pa_read, pa_write and pa_poll instead of system functionsMaarten Bosmans2011-02-172-12/+12
| |
| * Use pa_* instead of generic functions to improve portabilityMaarten Bosmans2011-02-172-2/+6
| |
| * win32: Implement pa_randomMaarten Bosmans2011-02-171-1/+16
| |
| * win32: Implement rtclock based on QueryPerformanceCounterMaarten Bosmans2011-02-175-6/+30
| | | | | | | | Also remove some unnecessary <time.h> headers.
| * win32: flush stderr after log outputMaarten Bosmans2011-02-171-0/+3
| |
| * Implement some functions for win32Maarten Bosmans2011-02-172-10/+54
| | | | | | | | And disable building binaries for win32 that make no sense there
| * Repair some typosMaarten Bosmans2011-02-173-6/+6
| |
| * Fix dependencies and include necessary headersMaarten Bosmans2011-02-176-1/+6
| |
| * Use PCRE if POSIX regex.h is not availableMaarten Bosmans2011-02-171-1/+6
| |
| * Apply #ifdefs around functionality not available on win32Maarten Bosmans2011-02-179-3/+67
| | | | | | | | And also the reverse: around some win32 specific functionality
| * Adapt win32 specific code to current APIMaarten Bosmans2011-02-172-3/+27
| |
| * Use <pulsecore/socket.h> instead of <sys/socket.h>Maarten Bosmans2011-02-1721-78/+38
| | | | | | | | | | | | | | | | The check whether POSIX socket.h or WIN32 winsock2.h must be included can be made centrally. The downside is that some functionality of e.g. arpa/inet.h is also implemented in winsock.h, so that some files that don't use socket functions, but do use inet.h functions, must also include pulsecore/socket.h. (as well as arpa/inet.h)
| * Clean up <poll.h> includesMaarten Bosmans2011-02-171-1/+0
| | | | | | | | | | | | Instead <pulsecore/poll.h> should be included. That file includes poll.h on platform where it is appropriate. Also remove some unnecessary <ioctl.h> includes.
| * Use setenv instead of putenvMaarten Bosmans2011-02-171-1/+1
| | | | | | | | | | | | | | In theory putenv could be used to handle freeing of strings yourself, but this was not done in PulseAudio. That leaves no advantages in using putenv. With setenv you're at the mercy of the implementation whether the strings leak, but at least that is better then a certain leak, as it was before.
* | sconv_sse: Exclude SSE optimizations for Mac OS XEdward Rudd2011-02-221-2/+2
| | | | | | | | At least on 32bit compiles, there are not enough registers.
* | Allow read-only or non-existing sink input volume.Tanu Kaskinen2011-02-225-13/+60
| | | | | | | | | | | | | | | | | | | | | | | | There are two known cases where read-only or non-existing sink input volume is relevant: passthrough streams and the planned volume sharing logic. Passthrough streams don't have volume at all, and the volume sharing logic requires read-only sink input volume. This commit is primarily working towards the volume sharing feature, but support for non-existing sink input volume is also added, because it is so closely related to read-only volume. Some unrelated refactoring in iface-stream.c creeped into this commit too (new function: stream_to_string()).
* | core: Link virtual sinks and sources to their streams.Tanu Kaskinen2011-02-228-2/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change doesn't add any functionality in itself, but it will be useful in the future for operating on chains of sinks or sources that are piggy-backing on each other. For example, the PA_PROP_DEVICE_MASTER_DEVICE property could be handled in the core so that each virtual device doesn't have to maintain it separately. By using the origin_sink and destination_source pointers the core is able to see at stream creation time that the stream is created by a virtual device, and then update that device's property list using the name of the master device that the stream is being connected to. The same thing can be done also when the stream is being moved from a device to another, in which case the _MASTER_DEVICE property needs updating.
* | Correct wav file creation for 24/32 and 24 bits sample formats HSD=3669357Vincent Becker2011-02-221-2/+11
| |
* | PulseAudio: added IT block to fix thumb conditional instruction build error ↵Kurt Taylor2011-02-211-0/+1
|/ | | | | | | | messages See: http://pulseaudio.org/ticket/914 Tweaked-By: Arun Raghavan <arun.raghavan@collabora.co.uk>
* build: Don't include empty Makefile.am in subdirsMaarten Bosmans2011-01-312-40/+0
|
* Fighting rewinds: Reduce calls to handle_seekDavid Henningsson2011-01-311-30/+26
| | | | | | | | | If many small blocks are in queue, handle_seek is being called for every one of them, sometimes causing a rewind. Delay the call until all blocks are handled, then call handle_seek only once. Signed-off-by: David Henningsson <david.henningsson@canonical.com>
* Fighting rewinds: Seek and write data in the same messageDavid Henningsson2011-01-311-8/+12
| | | | | | | | Allow a message in the queue to perform both a seek and a post data. For clients that do not use PA_SEEK_RELATIVE (e g gstreamer), this cuts the message count - and sometimes even the rewinds - in half. Signed-off-by: David Henningsson <david.henningsson@canonical.com>
* ratelimit: fix log levels of log suppression messagesLennart Poettering2011-01-3110-12/+13
| | | | | | | | | When logging a suppression message do so on the same log level as the suppressed messages. Cherry picked by Colin Guthrie from ec5a7857127a1b3b9c5517c4a70a9b2c8aab35ca with a couple of additional changes due to extra limiting in master that was not present in stable-queue.
* Core: Fix incorrect check of return valueScott Reeves2011-01-231-2/+2
|
* core: Use pa_sink_get_latency_within_thread() in sync-volume codeJyri Sarha2011-01-151-9/+2
|
* core: Use volume_change_safety_margin when rewinding sync-volume eventsJyri Sarha2011-01-151-6/+16
| | | | | After this patch the volume changes are applied immediately after sink rewind before processing streams and monitor source.
* core: Change sematics of pa_flist_new_with_name() (v1.1)Jyri Sarha2011-01-152-3/+5
| | | | | Name string is copied and added to flist structure. The original is responsibility of the caller. The name is only used for debug printing.
* Revert "core: make use of dbus_message_iter_append_fixed_array"Colin Guthrie2011-01-031-1/+6
| | | | | This causes problems as outlined in ticket #887. This reverts commit f564c7d76371380980faa10ee3c756c3130c60bf.
* Fix typosZhang Wanming2010-12-202-2/+2
|