summaryrefslogtreecommitdiff
path: root/src/modules
Commit message (Collapse)AuthorAgeFilesLines
* bluetooth: Add 20dB boost for faststream source volumeIgor V. Kovalenko2022-10-173-0/+53
| | | | | | | | | Some devices unexpectedly return stereo backchannel stream with wrong frequency, and volume of backchannel stream appears too low. If this happens, boost source volume by 20dB. Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/628>
* bluetooth: Handle fragmented faststream framesIgor V. Kovalenko2022-10-171-13/+61
| | | | | | Incoming frames can span multiple packets, add support for this. Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/628>
* bluetooth: Use stereo sample spec for faststream backchannelIgor V. Kovalenko2022-10-171-4/+17
| | | | | | | | | | Faststream backchannel decoder does not know whether incoming stream is mono or stereo before first packet is decoded, and some devices return stereo stream. As it is not easy to change source sample spec after source is created, use stereo sample spec always and perform conversion if mono stream is found. Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/628>
* bluetooth: Add faststream codecIgor V. Kovalenko2022-10-177-27/+482
| | | | Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/628>
* bluetooth: Do not use hardware volume control for A2DP backchannelIgor V. Kovalenko2022-10-171-1/+18
| | | | Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/628>
* bluetooth: Free memblock after codec errorsIgor V. Kovalenko2022-10-171-0/+3
| | | | Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/628>
* backend-native: Remove uninformative "Profile unavailable" debug messageMarijn Suijten2022-08-161-1/+0
| | | | | | | | This message would print for all transports while not even conveying the profile of the transport, and might be printed for non-`HFP_HF` profiles which is the only transport-profile we're interested in. Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/740>
* backend-native: Update all CIND indicatorsMarijn Suijten2022-08-161-4/+1
| | | | | | | | | | | | When `indicator` is initialized to `1`: - it always succeeds the `indicator == CIND_CALL_INDICATOR` check; - hence always calls `continue`; - hence never reaches the end of the `while` loop where `indicator++` is called; - hence `indicator` never contains any other value than `1` meaning `cind_enabled_indicators` is ever updated. Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/740>
* Revert "bluez5-util: move pa_bluetooth_discovery to header"Marijn Suijten2022-08-163-25/+24
| | | | | | | | | | | | | This reverts commit b05e34e092d5f40ff9a305fea181bd2308829824. Now that backend-native uses a different way to get to its own `native_backend` instance - without going through `pa_bluetooth_discovery` - this patch can be reverted again, as nothing outside bluez5-util is supposed to know the internals of this struct. That's what the many functions are for which all take pointers to this (at that point) opaque struct instead. Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/740>
* backend-native: Add backend pointer to transport_dataMarijn Suijten2022-08-163-11/+23
| | | | | | | | | This removes the inverse/recursive dependency of backend-native on the `pa_bluetooth_discovery` struct, which is supposed to be opaque outside of `bluez5-util` in favour of the many accessor functions defined in `bluez5-util.h`. Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/740>
* backend-native: Fix indentation and whitespace styleMarijn Suijten2022-08-161-21/+20
| | | | | | | Replace tabs with spaces, remove trailing whitespace, remove bracing around single-line `if` blocks. Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/740>
* meson.build: fix build without C++Fabrice Fontaine2022-08-151-0/+2
| | | | | | | | | | | | | | Fix the following build failure without C++: ../output-1/build/pulseaudio-16.1/meson.build:1:0: ERROR: Unknown compiler(s): [['/home/autobuild/autobuild/instance-1/output-1/per-package/pulseaudio/host/bin/powerpc64-buildroot-linux-gnu-g++']] The following exception(s) were encountered: Running "/home/autobuild/autobuild/instance-1/output-1/per-package/pulseaudio/host/bin/powerpc64-buildroot-linux-gnu-g++ --version" gave "[Errno 2] No such file or directory: '/home/autobuild/autobuild/instance-1/output-1/per-package/pulseaudio/host/bin/powerpc64-buildroot-linux-gnu-g++'" Fixes: - http://autobuild.buildroot.org/results/6526a21bd4da3b8458188f27c1ec04c381e4b673 Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/737>
* bluetooth: hook up UPower backendDylan Van Assche2022-08-012-7/+86
| | | | | | | Hook up the UPower backend to backend-native to report the host battery level to the HF. Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/631>
* bluetooth: add UPower backendDylan Van Assche2022-08-013-1/+342
| | | | | | | UPower provides information about the power supply and battery level of the host. Add a backend to retrieve the host battery level. Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/631>
* bluetooth: add AT+BIA supportDylan Van Assche2022-08-011-9/+89
| | | | | | | | | | | | AT+BIA is used to enable/disable CIND indicators by Bluetooth HFP spec. By default, all indicators are enabled on connection. AT+BIA will configure which indicators should be disabled then, the disabled indicators may be enabled later on again with AT+BIA. When the connection is lost and recovered, all indicators are enabled again. The HF will reconfigure the indicators again with an AT+BIA command. Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/631>
* bluez5-util: move pa_bluetooth_discovery to headerDylan Van Assche2022-08-013-24/+25
| | | | Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/631>
* raop-client: Fix typoPeter Meerwald-Stadler2022-07-181-1/+1
| | | | Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/733>
* module-tunnel: Fix typosPeter Meerwald-Stadler2022-07-181-2/+2
| | | | Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/733>
* module-combine-sink: Fix indentationPeter Meerwald-Stadler2022-07-181-1/+1
| | | | Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/733>
* module-combine-sink: Use fabs() instead of abs() for doublePeter Meerwald-Stadler2022-07-181-1/+2
| | | | Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/733>
* build-sys: Add missing libatomic_ops dependenciesNicolas Cavallari2022-07-181-3/+3
| | | | | | | | | | | Add libatomic_ops dependencies to libraries/modules that showed a failure on an arch that does not have native atomic operations support. Not all optional dependencies were tested, so it is possible that some optional modules are still missing libatomic_ops dependencies. Signed-off-by: Nicolas Cavallari <nicolas.cavallari@green-communications.fr> Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/732>
* alsa-mixer: extend pa_alsa_mixer_find with the subdevice checkJaroslav Kysela2022-07-181-4/+8
| | | | | | | | | | | | | | The full identifier check must be executed for the new melem creation, otherwise the duplicate control element code check is reached. Example (using the snd-aloop driver): numid=56,iface=PCM,name='PCM Notify',device=1,subdevice=1 numid=62,iface=PCM,name='PCM Notify',device=1,subdevice=2 Signed-off-by: Jaroslav Kysela <perex@perex.cz> Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/730>
* alsa-mixer: fix the re-attach code for the mixer control elementJaroslav Kysela2022-07-182-11/+52
| | | | | | | | | | | | | | The new helem must be tracked and old helem must be cleared to make the code work properly. Introduce the pointer to helem as the private value for melem and add the necessary code. Also, add a check for the duplicate mixer elements. The duplicate mixer element invokes the abort check in alsa-lib. Print a warning instead and handle the exit gracefully. Fixes: def8eb074 ("alsa-mixer: allow to re-attach the mixer control element") Signed-off-by: Jaroslav Kysela <perex@perex.cz> Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/730>
* alsa-ucm: remove extra space from the device.intended_roles propertyJaroslav Kysela2022-06-291-4/+9
| | | | | | | | | | | Before: device.intended_roles = " voice" After: device.intended_roles = "voice" Signed-off-by: Jaroslav Kysela <perex@perex.cz> Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/731>
* alsa-ucm: Create multiple profiles per verb for conflicting devicesAlper Nebi Yasak2022-06-281-21/+99
| | | | | | | | | | | | | | | | | | Right now we try to add all UCM devices of a verb to a single profile. But if some devices using different PCMs are configured as conflicting with one another, we will only be able to utilize one of them, chosen seemingly based on the order in the UCM config file. This is not a problem with conflicting devices sharing a PCM, as they are assigned to the same mapping and the ports mechanism only enables one of them to be active at a time. To utilize all devices in a UCM verb even when there are conflicting devices using different PCMs, calculate subsets of devices which can be simultaneously used and create a profile for each such set. Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com> Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/596>
* alsa-ucm: Disable old devices when switching profiles of same verbAlper Nebi Yasak2022-06-281-5/+21
| | | | | | | | | | | | | | While switching profiles, it was enough to switch UCM verbs since that disables all enabled UCM devices and every profile had a distinct verb. However, switching to the current verb does not disable any devices. To support multiple profiles for a verb we need to explicitly disable the old profile's devices, since they might be conflicting with the new profile's devices and will prevent them from being enabled. Compare both profiles' mappings, and disable the devices not in the new mappings. Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com> Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/596>
* alsa-ucm: Make mapping UCM contexts have only one modifierAlper Nebi Yasak2022-06-282-23/+16
| | | | | | | | | After previous patches, we should be generating no combination ports, so we don't need to store multiple modifiers per mapping. Simplify the code based on this. Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com> Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/596>
* alsa-ucm: Make mapping UCM contexts have only one deviceAlper Nebi Yasak2022-06-282-69/+35
| | | | | | | | | After previous patches, we should be generating no combination ports, so we don't need to store multiple devices per mapping. Simplify the code based on this. Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com> Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/596>
* alsa-ucm: Make ports store only one deviceAlper Nebi Yasak2022-06-284-108/+26
| | | | | | | | | After previous patches, we should be generating no combination ports, so we don't need to store multiple devices per port. Simplify the code based on this. Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com> Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/596>
* alsa-ucm: Remove combination port generation logicAlper Nebi Yasak2022-06-283-105/+48
| | | | | | | | | | | | | | A previous commit makes mapping names depend on the UCM device name. Since UCM device names are unique, this means a mapping will at most have one port and thus no combination ports can be generated. This removes the dead code in the pa_alsa_ucm_add_ports_combination() function, unrolls the remaining code in its helper functions that it used, and renames it to pa_alsa_ucm_add_port() to signal that it no longer generates combinations. Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com> Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/596>
* alsa-ucm: Make one input/output mapping per UCM deviceAlper Nebi Yasak2022-06-281-10/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PulseAudio combines UCM devices that have the same PlaybackPCM or CapturePCM value into a single mapping with multiple ports. It also creates ports in the same mapping for each valid combination of those UCM devices. Since mappings are the things we put in profiles, we can put in a profile either all devices of a joint mapping or none of them. This causes some complications with device conflicts. For example, a different UCM device might be marked as conflicting with some (but not all) of the devices in a joint mapping. In this case we can do one of three things: - Include all devices in one profile, and hope the conflicting device isn't chosen as the mapping's active port. We shouldn't do this as it puts conflicting devices in the same profile. - Make one profile with the joint group, and one with the other device. This is somewhat acceptable as we have no conflicts, but we sacrifice some compatible combinations of devices. - Do not group the devices into the same mapping, and make one profile for each compatible combination of devices. This appears to be the best option, one where we can always have the maximum number of working devices. This patch chooses the third option and makes one input and/or output mapping per UCM device, by using UCM device names instead of PCM device strings in the mapping names. Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com> Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/596>
* alsa-ucm: Split out helpers for device set name, description, priorityAlper Nebi Yasak2022-06-281-35/+118
| | | | | | | | | Combination port logic calculates some useful properties for device groups that we could reuse while generating multiple profiles to support conflicting devices. Split them into their own functions. Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com> Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/596>
* alsa-ucm: Fix device conformance checkAlper Nebi Yasak2022-06-281-3/+12
| | | | | | | | | | | | | | | | Right now this check is rejecting devices whose UCM config specifies neither a conflicting device nor a supported device list, and accepting devices which specify both. However, a device without neither list is actually unrestricted, and a device with both lists is a configuration error. Fix the check to accept the former. Furthermore, this is missing another case where an already selected device might have a supported devices list that doesn't have the candidate device. Make this function also check against that, and also make it accept devices already in the set. Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com> Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/596>
* alsa-ucm: Rewrite conformant device group generation with idxsetsAlper Nebi Yasak2022-06-281-91/+61
| | | | | | | | | | | | | | | | | | The existing code meant to generate device groups for combination ports is tightly coupled to port creation. Similar functionality would be useful to generate nonconflicting device groups for multiple profiles as well, so this tries to rewrite it into a more reusable state. Several things (e.g devices, mapping contexts) use idxsets to store a device selection. This also switches this conformance check and device group generation to using idxsets to make it easier to work with those, with the eventual aim to unify device group representations. Also try to adjust users of these functions to use idxsets these will need/return, without causing too much interference. Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com> Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/596>
* alsa-ucm: Split profile creation into verb and profile partsAlper Nebi Yasak2022-06-281-18/+42
| | | | | | | | | To support having multiple profiles per UCM verb, split the profile creation into two parts based on whether they should run once for each verb or for each profile (maybe multiple times per verb). Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com> Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/596>
* alsa-ucm: Make mapping creation independent from indvidual profilesAlper Nebi Yasak2022-06-281-11/+15
| | | | | | | | | | | | | | The ucm_create_mapping() function is not idempotent. It looks like it was meant to be called once per device for the devices of a UCM verb and takes a profile argument simply because a verb has generated a single profile so far. Make sure creating mappings per device and adding those mappings to the profiles happens as separate steps to make it easier to split UCM verbs and profiles as concepts. Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com> Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/596>
* alsa-ucm: Stop conflating profile name with UCM verb nameAlper Nebi Yasak2022-06-281-19/+28
| | | | | | | | | | So far each profile had the exact name as their associated UCM verb, which caused the one to be used where the other should have been. Explicitly get and use the verb name where that was intended, and make sure things about profiles aren't named after verbs. Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com> Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/596>
* alsa-ucm: Let profiles know their associated UCM verbAlper Nebi Yasak2022-06-283-14/+16
| | | | | | | | | | | | | | | | | | | Currently each UCM verb generates one profile named the same as the verb, meaning it's trivial to know which verb the profile belongs to. This will be slightly harder to do when we generate multiple profiles per UCM verb (e.g. to make use of conflicting devices). It would still be possible to parse the profile name to get the UCM verb, but instead let's keep track of the struct instance representing the profile's associated verb. This also lets us remove a block of code searching for the verb by its name. Co-authored-by: Jaroslav Kysela <perex@perex.cz> [Alper: Reused Jaroslav's UCM profile context changes for UCM verb instead of combined devices.] Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com> Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/596>
* alsa-ucm: Set profiles by their struct instance, not their nameJaroslav Kysela2022-06-283-12/+10
| | | | | | | | | | | | | | While switching profiles, it's possible that we will want to do more work besides switching UCM verbs. The alsa-card module already has our profiles as structs, but passes in only the names instead of the entire struct. Make things work with the struct instead, so we can add other things (like a UCM context) to it and use those here. Co-authored-by: Tanu Kaskinen <tanuk@iki.fi> [Alper: Split into its own commit and integrated Tanu's snippet.] Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com> Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/596>
* alsa-ucm: Add enable, disable, status helpers for devicesAlper Nebi Yasak2022-06-281-18/+63
| | | | | | | | | | | | | | | Right now manipulating device status is done inline once while setting a port. However, we will need to reuse this code to disable conflicting devices of a device we want to enable. Split it into enable and disable helper functions. There is another issue with the device enable logic, where trying to disabling an already disabled device sometimes fails. To avoid that, implement a status helper and check if the device we want to enable is already enabled/disabled before trying to do so. Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com> Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/596>
* alsa-ucm: Make modifiers track conflicting/supported devices as idxsetsAlper Nebi Yasak2022-06-282-36/+42
| | | | | | | | | | | Modifiers currently keep their conflicting and supported devices's names, and these names are resolved to devices every time we need to use them. Instead, resolve these device names while creating the modifier struct and keep track of the resulting device structs in idxsets, same as how device structs keep track of their support relations. Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com> Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/596>
* alsa-ucm: Always create device conflicting/supported device idxsetsAlper Nebi Yasak2022-06-281-37/+27
| | | | | | | | | This is intended to make the current and upcoming code a bit clearer, as we won't need to constantly check for the existence of these idxsets before using or operating on them. Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com> Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/596>
* alsa-mixer: allow to re-attach the mixer control elementJaroslav Kysela2022-06-271-5/+13
| | | | | | | | | | It may be possible that the ALSA control element appears again. Allow this combination by checking, if the pulseaudio mixer element already exists. Do not create the duplicate mixer element in this case. Signed-off-by: Jaroslav Kysela <perex@perex.cz> Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/729>
* alsa-mixer: avoid assertion at alsa-lib mixer API when element removalTakashi Sakamoto2022-06-271-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PulseAudio v5.99 or later hits assertion at alsa-lib mixer API due to wrong handling of removal event for mixer element. pulseaudio: mixer.c:149: hctl_elem_event_handler: Assertion `bag_empty(bag)' failed. The removal event is defined as '~0U', thus it's not distinguished from the other type of event just by bitwise operator. At the removal event, class implementator for mixer API should detach mixer element from hcontrol element in callback handler since alsa-lib has assertion to check the list of mixer elements for a hcontrol element is empty or not after calling all of handlers. In detail, please refer to MR to alsa-lib: * https://github.com/alsa-project/alsa-lib/pull/244 This commit fixes the above two issues. The issue can be regenerated by `samples/ctl` Python 3 script of alsa-gobject. * https://github.com/alsa-project/alsa-gobject/ It adds some user-defined elements into sound card 0. When terminated by SIGINT signal, it removes the elements. Then PulseAudio dies due to the assertion. Fixes: 1fd8848e64cf ("alsa-util: Add functions for accessing mixer elements through mixer class") Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/728>
* fix translation error of pulseaudiopeijiankang2022-06-231-1/+1
| | | | Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/726>
* bluetooth/gst: Correct var type for GST_TYPE_BITMASKJan Palus2022-06-171-1/+2
| | | | | | | | | | | GST_TYPE_BITMASK is 64-bit bit mask while corresponding channel_mask in pulseaudio is int therefore usually 32-bit. Switch to uint64_t instead to match internal representation in gstreamer. Fixes pulseaudio crash on ARM 32-bit when pulseaudio is compiled with gstreamer and either LDAC or aptX support is available. Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/723>
* build-sys: meson: Make module-console-kit optionalIgor V. Kovalenko2022-06-131-1/+6
| | | | | | | | | | Default build configuration would fail to run on a system without systemd-logind (or elogind) and without ConsoleKit daemon responding on dbus interface. Here, module-console-kit would fail to initialize, preventing daemon from starting. Make module-console-kit an optional build feature to allow opt-out. Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/719>
* rtp: fix 'size mismatch' on BSD style operating systemsredfast002022-06-132-10/+30
| | | | | | | | | | | | | On FreeBSD (and probably other BSDs as well), the FIONREAD ioctl on UDP sockets does not return the size of the next datagram (like it does on Linux), but returns the size of the output buffer: this count contain multiple datagrams and also contains the headers. We fixed this by taking the result of the FIONREAD as lower bound for the size, adding an upper bound and then removing the check that the sizes should be exactly the same. Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/718>
* rtp: Initialize SDP info struct field added for OPUSIgor V. Kovalenko2022-06-131-0/+1
| | | | | | | | | | Turned out that pa_sdp_info::enable_opus is never initialized, which seldom makes module-rtp-recv believe it will be playing OPUS-encoded stream even though discovered SDP record does not indicate OPUS codec in metadata. Fix this by adding missing initializer. Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/720>
* rtp: Accept CRLF delimiters in SDP as required by RFC 4566Igor V. Kovalenko2022-05-303-7/+30
| | | | | | | RFC 4566 states that SDP record is terminated with CRLF, and parsers should be able to accept records terminated with just LF. Pulseaudio only accepts LF here. Fix this by accepting both CRLF and LF terminators.