summaryrefslogtreecommitdiffstats
path: root/src/modules
Commit message (Collapse)AuthorAgeFilesLines
...
* | sbc: ARM NEON optimized joint stereo processing in SBC encoderSiarhei Siamashka2011-03-141-0/+243
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Improves SBC encoding performance when joint stereo is used, which is a typical A2DP configuration. Benchmarked on ARM Cortex-A8: == Before: == $ time ./sbcenc -b53 -s8 -j test.au > /dev/null real 0m5.239s user 0m4.805s sys 0m0.430s samples % image name symbol name 26083 25.0856 sbcenc sbc_pack_frame 21548 20.7240 sbcenc sbc_calc_scalefactors_j 19910 19.1486 sbcenc sbc_analyze_4b_8s_neon 14377 13.8272 sbcenc sbc_calculate_bits 9990 9.6080 sbcenc sbc_enc_process_input_8s_be 8667 8.3356 no-vmlinux /no-vmlinux 2263 2.1765 sbcenc sbc_encode 696 0.6694 libc-2.10.1.so memcpy == After: == $ time ./sbcenc -b53 -s8 -j test.au > /dev/null real 0m4.389s user 0m3.969s sys 0m0.422s samples % image name symbol name 26234 29.9625 sbcenc sbc_pack_frame 20057 22.9076 sbcenc sbc_analyze_4b_8s_neon 14306 16.3393 sbcenc sbc_calculate_bits 9866 11.2682 sbcenc sbc_enc_process_input_8s_be 8506 9.7149 no-vmlinux /no-vmlinux 5219 5.9608 sbcenc sbc_calc_scalefactors_j_neon 2280 2.6040 sbcenc sbc_encode 661 0.7549 libc-2.10.1.so memcpy
* | sbc: fix signedness of parametersSiarhei Siamashka2011-03-142-5/+6
| | | | | | | | | | The written parameter of sbc_encode can be negative so it should be ssize_t instead of size_t.
* | sbc: ARM NEON optimization for scale factors calculationSiarhei Siamashka2011-03-142-1/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Improves SBC encoding performance when joint stereo is not used. Benchmarked on ARM Cortex-A8: == Before: == $ time ./sbcenc -b53 -s8 test.au > /dev/null real 0m4.756s user 0m4.313s sys 0m0.438s samples % image name symbol name 2569 27.6296 sbcenc sbc_pack_frame 1934 20.8002 sbcenc sbc_analyze_4b_8s_neon 1386 14.9064 sbcenc sbc_calculate_bits 1221 13.1319 sbcenc sbc_calc_scalefactors 996 10.7120 sbcenc sbc_enc_process_input_8s_be 878 9.4429 no-vmlinux /no-vmlinux 204 2.1940 sbcenc sbc_encode 56 0.6023 libc-2.10.1.so memcpy == After: == $ time ./sbcenc -b53 -s8 test.au > /dev/null real 0m4.220s user 0m3.797s sys 0m0.422s samples % image name symbol name 2563 31.3249 sbcenc sbc_pack_frame 1892 23.1239 sbcenc sbc_analyze_4b_8s_neon 1368 16.7196 sbcenc sbc_calculate_bits 961 11.7453 sbcenc sbc_enc_process_input_8s_be 836 10.2176 no-vmlinux /no-vmlinux 262 3.2022 sbcenc sbc_calc_scalefactors_neon 199 2.4322 sbcenc sbc_encode 49 0.5989 libc-2.10.1.so memcpy
* | sbc: MMX optimization for scale factors calculationSiarhei Siamashka2011-03-141-0/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Improves SBC encoding performance when joint stereo is not used. Benchmarked on Pentium-M: == Before: == $ time ./sbcenc -b53 -s8 test.au > /dev/null real 0m1.439s user 0m1.336s sys 0m0.104s samples % image name symbol name 8642 33.7473 sbcenc sbc_pack_frame 5873 22.9342 sbcenc sbc_analyze_4b_8s_mmx 4435 17.3188 sbcenc sbc_calc_scalefactors 4285 16.7331 sbcenc sbc_calculate_bits 1942 7.5836 sbcenc sbc_enc_process_input_8s_be 322 1.2574 sbcenc sbc_encode == After: == $ time ./sbcenc -b53 -s8 test.au > /dev/null real 0m1.319s user 0m1.220s sys 0m0.084s samples % image name symbol name 8706 37.9959 sbcenc sbc_pack_frame 5740 25.0513 sbcenc sbc_analyze_4b_8s_mmx 4307 18.7972 sbcenc sbc_calculate_bits 1937 8.4537 sbcenc sbc_enc_process_input_8s_be 1801 7.8602 sbcenc sbc_calc_scalefactors_mmx 307 1.3399 sbcenc sbc_encode
* | sbc: new 'sbc_calc_scalefactors_j' function added to sbc primitivesSiarhei Siamashka2011-03-143-68/+102
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The code for scale factors calculation with joint stereo support has been moved to a separate function. It can get platform-specific SIMD optimizations later for best possible performance. But even this change in C code improves performance because of the use of __builtin_clz() instead of loops similar to what was done to sbc_calc_scalefactors earlier. Also technically it does loop unrolling by processing two channels at once, which might be either good or bad for performance (if the registers pressure is increased and more data is spilled to memory). But the benchmark from 32-bit x86 system (pentium-m) shows that it got clearly faster: $ time ./sbcenc.old -b53 -s8 -j test.au > /dev/null real 0m1.868s user 0m1.808s sys 0m0.048s $ time ./sbcenc.new -b53 -s8 -j test.au > /dev/null real 0m1.742s user 0m1.668s sys 0m0.064s
* | sbc: Fix redundant null check on calling free()Gustavo F. Padovan2011-03-141-2/+1
| | | | | | | | Issues found by smatch static check: http://smatch.sourceforge.net/
* | sbc: added saturated clipping of decoder output to 16-bitSiarhei Siamashka2011-03-141-5/+15
| | | | | | | | | | | | This prevents overflows and audible artefacts for the audio files which originally had loudness maximized. Music from audio CD disks is an example of such files, see http://en.wikipedia.org/wiki/Loudness_war
* | sbc: ensure 16-byte buffer position alignment for 4 subbands encodingSiarhei Siamashka2011-03-142-4/+4
| | | | | | | | | | | | | | Buffer position in X array was not always 16-bytes aligned. Strict 16-byte alignment is strictly required for powerpc altivec simd optimizations because altivec does not have support for unaligned vector loads at all.
* | build: move sbc related files to its own directoryLuiz Augusto von Dentz2011-03-1411-1/+1
| | | | | | | | | | This should make it easier to apply patches from BlueZ which also uses sbc subdir for this files.
* | bluetooth: add proper handling for bluetooth.nrec propertyLuiz Augusto von Dentz2011-03-143-48/+112
| | | | | | | | | | | | | | | | | | NREC stands for Noise Reduction and Echo Cancelation, it can be changed at any point by the headset. When set to "1" indicates that those algorithms shall be enabled by default and "0" means the headset probably have them active so they should be disabled in PA side.
* | bluetooth: fix a2dp_process_pushLuiz Augusto von Dentz2011-03-141-6/+12
| | | | | | | | | | | | Use minimum bitpool configured to get the maximum block_size possible, also remove checks for how much has been written when decoding sbc frames since the block size may change due to bitpool changes.
* | bluetooth: reduce bitpool if audio start skippingLuiz Augusto von Dentz2011-03-141-0/+71
| | | | | | | | | | | | | | When audio skips it could be that there is some bandwidth limitation in the link e.g. headset doesn't support EDR (< 2.0), and by reducing the bitpool it may find a better rate that either prevent the skips completely or at least reduce them.
* | bluetooth: handle Acquire API changeLuiz Augusto von Dentz2011-03-143-47/+12
| | | | | | | | | | | | Acquire now return input and output MTU of the file descriptor so it is no longer necessary to get those after acquiring the fd, which less round trips and faster response time when switching profiles.
* | cork-on-phone: Only cork (and subsequently uncork) streams that are not ↵Colin Guthrie2011-03-121-8/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | already corked. Although by "cork" I really mean "cork+mute" as that's what the module does. If e.g. Rhythmbox is paused when a phone call comes in, the current stream state will be corked and thus we should not track it for future uncorking when the phone call ends. Likewise if the stream is just muted (manually) we will not take any action either when the phone stream is seen first, nor when it disappears. Also add some additional debug messages.
* | Fix up according to Coding StyleMaarten Bosmans2011-03-1125-140/+85
| | | | | | | | Only whitespace changes in here
* | alsa-mixer: When figuring out the max_dB of a path, use only channels that ↵Tanu Kaskinen2011-03-111-4/+9
| | | | | | | | | | | | | | | | | | | | | | are used by the path elements. Without this, p->max_dB could never be less than 0 dB, because the loop at the end of pa_alsa_path_probe() would reset p->max_dB to 0 as soon as the loop encountered a channel that wasn't touched by any element. There was a similar issue for p->min_dB too (it could never be more than 0 dB), which is also fixed by this patch.
* | alsa-mixer: Implement support for setting element specific upper limits for ↵Tanu Kaskinen2011-03-113-1/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | volume. This feature is mainly useful in embedded systems that have built-in speakers. In such situations the full audio path is known beforehand, so it's possible to know what is the maximum sensible volume, and any higher volume can be disabled. The volume limit is set in path configuration files in the [Element] section, using option "volume-limit". The value is the desired maximum volume step of the volume element.
* | dbus: Always accept mono volumes when setting device or stream volume.Tanu Kaskinen2011-03-112-10/+8
| | | | | | | | | | pa_sink_set_volume() and friends accept mono volumes too, so no need to impose unneeded restrictions in the D-Bus API.
* | dbusiface-stream: Fix crash when there's no resampling used.Tanu Kaskinen2011-03-111-0/+5
| |
* | alsa-card: Print the profile set configuration when loading the card.Tanu Kaskinen2011-03-111-0/+1
| |
* | alsa-mixer: Add a default case for a switch, so that the compiler won't ↵Tanu Kaskinen2011-03-111-15/+17
| | | | | | | | complain about unhandled cases.
* | alsa-mixer: Use decibel fixes when getting and setting decibel volumes.Tanu Kaskinen2011-03-112-56/+212
| |
* | alsa-mixer: Add DecibelFix section to the profile set config file format.Tanu Kaskinen2011-03-114-14/+297
| | | | | | | | | | This commit only implements the parser, the decibel fix data is not yet used for anything.
* | alsa-mixer: Fix a git-am cockup in b0f72311Colin Guthrie2011-03-041-3/+3
| | | | | | | | | | | | | | | | | | | | It seems git managed to mess up a git-am with a patch from David which moved where this function was called element_probe to within itself (recursive which could normally lead to an infinite loop, but as it was now never called from anywhere else, this didn't happen). Thank you to Maarten for spotting and following up the issue.
* | Various fixes for build warningsMaarten Bosmans2011-03-021-1/+1
| |
* | Include <time.h> where necessaryMaarten Bosmans2011-03-011-0/+1
| |
* | alsa-mixer: Add support for "Line Boost" elementDavid Henningsson2011-02-282-0/+11
| | | | | | | | Signed-off-by: David Henningsson <david.henningsson@canonical.com>
* | Add src/*-symdef.h to .gitignore.Tanu Kaskinen2011-02-281-1/+0
| | | | | | | | | | Also remove src/module/.gitignore as this is no longer needed as pointed out by Arun Raghavan
* | virtual-sink: Fix a crash when moving the sink to a new master right after ↵Tanu Kaskinen2011-02-262-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | virtual-sink/source: Remove an unused variable.Tanu Kaskinen2011-02-262-10/+0
| |
* | virtual-sink/source: Use a more descriptive stream name.Tanu Kaskinen2011-02-262-2/+2
| |
* | virtual-sink: Add a modarg for forcing flat volume.Tanu Kaskinen2011-02-261-1/+15
| |
* | virtual-sink: Add a modarg for enabling volume sharing.Tanu Kaskinen2011-02-261-5/+12
| |
* | alsa-mixer: Make sure capture source and input source use right pathDavid Henningsson2011-02-256-45/+12
| | | | | | | | | | | | | | Make sure that mic and line (with common names) use the specific path instead of the analog-input one. Signed-off-by: David Henningsson <david.henningsson@canonical.com>
* | alsa-mixer: Fixup "Mic"/"Line"/"analog-input" paths to work with the new pathsDavid Henningsson2011-02-254-22/+111
| | | | | | | | Signed-off-by: David Henningsson <david.henningsson@canonical.com>
* | alsa-mixer: Add new paths for Internal Mic, Front Mic, Rear Mic and Dock MicDavid Henningsson2011-02-256-78/+317
| | | | | | | | Signed-off-by: David Henningsson <david.henningsson@canonical.com>
* | alsa-mixer: always round towards 0 dBDavid Henningsson2011-02-251-6/+9
| | | | | | | | | | | | | | Always round towards 0 dB. Also add a few debug comments to aid troubleshooting. Signed-off-by: David Henningsson <david.henningsson@canonical.com>
* | alsa-mixer: add required-any and required-* for enum optionsDavid Henningsson2011-02-253-12/+91
| | | | | | | | | | | | | | | | | | | | | | Now you can add required-any to elements in a path and the path will be valid as long as at least one of the elements are present. Also you can have required, required-any and required-absent in element options, causing a path to be unsupported if an option is (not) present (simplified example: to skip line in path if "Capture source" doesn't have a "Line In" option). Signed-off-by: David Henningsson <david.henningsson@canonical.com>
* | alsa-mixer: Add a few well-known descriptionsDavid Henningsson2011-02-251-0/+7
| | | | | | | | | | | | | | | | Add front mic, rear mic, and docking line-in. These are likely to be present on modern hda chips, for reference see linux-2.6/sound/pci/hda/hda_codec.c:hda_get_input_pin_label Signed-off-by: David Henningsson <david.henningsson@canonical.com>
* | alsa-card: Add a new modarg "profile_set" for giving the card a custom ↵Tanu Kaskinen2011-02-251-1/+8
| | | | | | | | profile set configuration file.
* | alsa-mixer: Fix path set building when using the element-output or ↵Tanu Kaskinen2011-02-251-0/+5
| | | | | | | | | | | | | | | | | | element-input mapping options in profile set configuration. When creating synthesized paths, pa_alsa_path_set_new() created duplicate elements for each path, and one of the duplicate elements would be marked as required absent. That made path probing fail. While debugging this, I noticed also that pa_alsa_path_synthesize() didn't initialize p->last_element properly.
* | Support for multichannel DSP processing in module-ladspa-sinkKim Therkelsen2011-02-251-147/+237
| |
* | Merge remote-tracking branch 'mkbosmans/mingw32-build'Colin Guthrie2011-02-2512-184/+258
|\|
| * module-waveout: Adapted to updated APIMaarten Bosmans2011-02-171-168/+227
| | | | | | | | Waveout sink works again, Wavein source still needs some work.
| * Use PCRE if POSIX regex.h is not availableMaarten Bosmans2011-02-171-1/+6
| |
| * Apply #ifdefs around functionality not available on win32Maarten Bosmans2011-02-173-1/+16
| | | | | | | | And also the reverse: around some win32 specific functionality
| * Use <pulsecore/socket.h> instead of <sys/socket.h>Maarten Bosmans2011-02-172-5/+2
| | | | | | | | | | | | | | | | 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-177-9/+7
| | | | | | | | | | | | 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.
* | solaris: update call of pa_thread_new to new prototypeEdward Rudd2011-02-221-1/+1
| |
* | coreaudio: Fix call to pa_thread_newEdward Rudd2011-02-221-1/+1
| |