Wim Taymans
1a713e963a
pulse-server: fix parsing and creation of iec958 formats
...
Implement creating IEC958 format EnumFormat params.
Fix parsing of negotiated IEC958 formats and convert to our internal
format.
2021-08-23 12:09:53 +02:00
Wim Taymans
bceb9a4b6e
pipewire-pulse: enumerate iec958 formats for sinks
2021-08-23 11:58:29 +02:00
Wim Taymans
f96fa1bf36
pulse-server: find the rate in the format_info
...
Also look for the highest rate in the format_info to suggest as
the graph sample rate.
See #1523
2021-08-18 16:58:22 +02:00
Wim Taymans
961f478af8
pulse-server: add alaw/ulaw support
2021-08-17 17:35:05 +02:00
Wim Taymans
1ad54e8a26
spa: add 64 AUX channels
...
Make 64 AUX channels instead of using the CUSTOM range for them.
2021-07-21 11:25:43 +02:00
Wim Taymans
d03f29eb66
pulse-server: fix channel_map check
...
We store the spa channel ids in the channel_map so convert them to
pulseaudio ids before comparing them to the max pulseaudio id.
2021-07-21 11:12:37 +02:00
Wim Taymans
8184d4576a
handle snprintf errors better
2021-07-06 17:56:04 +02:00
Barnabás Pőcze
f5d51162c4
treewide: mark things static and const
...
Mark some structures, arrays static/const at various places.
In some cases this prevents unnecessary initialization
when a function is entered.
All in all, the text segments across all shared
libraries are reduced by about 2 KiB. However,
the total size increases by about 2 KiB as well.
2021-06-30 14:44:08 +02:00
Barnabás Pőcze
43e2c64307
pulse-server: split out format handling
...
Part of !776 .
2021-06-25 03:22:59 +02:00
Peter Hutterer
e0471c6757
pipewire: allow NULL pointers in pw_properties_free()
...
Just like the real free() we should just ignore a NULL pointer, makes the
caller code easier for those instances where properties are optional.
Patch generated with concinelle with a few manual fixes.
2021-06-02 10:56:46 +00:00
Peter Hutterer
7697ed0757
treewide: replace strcmp() == 0 with spa_streq()
...
This change is only done in source files for now, header files will be done
separately.
2021-05-18 22:10:27 +10:00
Andrea Gelmini
47ef2b6b09
Fix typos
2021-04-30 07:40:20 +00:00
Arun Raghavan
74140abada
pulse-server: Factor out module code to compile independently
...
This starts breaking up the giant monolith that is the pulse-server.c
code into more manageable chunks by trying to split the module code into
individual compilation units.
2021-04-15 19:37:15 -04:00
Wim Taymans
225c9ebc2d
pulse-server: limit the aux channels to 32
...
PulseAudio does not have more than 32 AUX channels so when we generate
them from unknown positions, make sure we wrap around.
See #1033
2021-04-09 19:20:46 +02:00
Wim Taymans
44e6e7f5c8
pulse-server: use PipeWire format and channel names
...
Use the PipeWire format and channel names in the config to avoid
confusion.
2021-04-09 11:30:57 +02:00
Wim Taymans
b305f57e4d
pulse-server: make sample format and channel_map configurable
...
Add an entry in the config file for default format and channel map.
Use the defaults in the server_info request
Use the defaults for the default channels and map in the modules.
2021-04-09 11:12:13 +02:00
Pauli Virtanen
2681b8236b
media-session/pulse-server: more error checks + minor fixes
2021-03-27 19:16:19 +02:00
Wim Taymans
2d2557381c
pulse-server: avoid returning NULL strings
...
Don't return a NULL string when converting an id to a string because
some callers don't expect this and crash.
2021-03-25 15:35:12 +01:00
Wim Taymans
e334c5862e
pulse-server: fill in the format info
2021-03-10 17:27:11 +01:00
Wim Taymans
fcf00b3d35
pulse-server: handle unsupported formats
...
We can only handle PCM encodings for now, fail conversion otherwise.
If we have no supported formats, return an error code.
VLC first try to send AC3 or EAC3 passthrough and then tries again
with decoded data. If we accept the encoded data we are just playing
noise.
Fixes #428
2021-02-19 15:25:32 +01:00
Wim Taymans
4b591df145
pulse-server: print encoding name in format_info
2021-02-19 14:57:11 +01:00
Wim Taymans
5a94bfc6cd
pulse-server: add some more supported channel_map values
2020-12-07 21:52:09 +01:00
Wim Taymans
157d6de607
pulse-server: convert channel_map channels
...
channel_map contains pulseaudio channel names, convert them to
pipewire channel ids and then into pipewire channel names for the
null sink.
2020-12-07 20:29:22 +01:00
Wim Taymans
6e0fed37b4
pulse-server: also handle planar formats
...
Also handle streams with planar formats. Just pretend that they
are interleaved, it does not really matter.
2020-11-27 15:39:59 +01:00
Wim Taymans
6ab25c6904
pulse-server: fix parsing of format-info
...
Fixes totem playback
2020-11-24 15:11:05 +01:00
Wim Taymans
0c66b5677b
pulse-server: init volume/channelmap correctly in stream-restore
2020-11-24 09:54:42 +01:00
Wim Taymans
edbec5d4ba
pulse-server: fix channel map lookup
2020-11-24 09:49:35 +01:00
Wim Taymans
0b33185593
pulse-server: improve parsing of format_info
...
Use the json parser. It's not actually implemented/used in
pulseaudio but...
2020-11-23 16:12:29 +01:00
Wim Taymans
f95f278067
pulse-server: use channelmap
...
Convert to an from pulse enum to id in the message layer so that we
can always just deal with native spa types.
Use the channelmap in stream-restore
Parse the channelmap from properties.
2020-11-23 15:37:18 +01:00
Wim Taymans
8b9d398df6
pulse-server: implement sample cache
2020-11-13 13:28:46 +01:00
Wim Taymans
99fcc95d18
pulse-server: don't leak formats
2020-11-09 16:51:34 +01:00
Wim Taymans
efafb41525
pulse-server: debug messages when connection debug enabled
2020-11-03 12:22:35 +01:00
Wim Taymans
af0d6e5354
pulse-server: refactor some more
2020-10-28 16:48:46 +01:00
Wim Taymans
66cf4e68d5
pulse-server: use EnumFormat as fallback
...
Use a fixated format and position from EnumFormat as a fallback.
2020-10-27 15:42:48 +01:00
Wim Taymans
2bf5cfa2f7
pulse-server: fill volumes and state
2020-10-27 10:12:27 +01:00
Wim Taymans
1ceb902b76
pulse-server: convert between client cubic volume and linear
2020-10-23 09:36:01 +02:00
Wim Taymans
d3ee29caff
pulse-server: fix format names
2020-10-20 16:39:31 +02:00
Wim Taymans
5b32125d44
pulse-server: handle format_info
...
Parse the format_info in CREATE_STREAM and use this to negotiate
the stream. Implement channel_map parsing.
Delay setting up the buffer attributes until we have negotiated a
format.
Makes GStreamer pulsesink work (rhythmbox,... )
2020-10-20 16:25:47 +02:00
Wim Taymans
0d9ae9d226
pulse-server: avoid SIGFPE when no format is given
...
Error out for now until we parse the format array.
2020-10-20 09:43:43 +02:00
Wim Taymans
f0102fd490
pulse: move pulse protocol to module
2020-10-08 18:06:11 +02:00