Commit graph

62 commits

Author SHA1 Message Date
Elliott Sales de Andrade 0a30eb6329 Fix a possible uninitialized variable.
Also, change the type to more accurately reflect its usage.
2020-11-23 15:36:08 +00:00
Oschowa 92c541ea03 pipewire-alsa: Make sure to always fill the pipewire buffers with
silence on process if there is not enough data.
This fixes noise with the retroarch alsa backend on pause, which doesn't
actually pause the device.
2020-11-01 19:28:38 +01:00
Oschowa 86acbabe8f pipewire-alsa: implement pause 2020-11-01 19:04:37 +01:00
Oschowa d960724dfc pipewire-alsa: fix inconsistent formating (tabs vs. spaces) 2020-11-01 18:38:46 +01:00
Wim Taymans e571c0bcb1 alsa: Use "PipeWire ALSA" as the node name
So that it is easier to know it is the PipeWire one.
2020-10-27 16:11:14 +01:00
Mersad Jelacic 9de98df1b7 pipewire-alsa: Use monotonic clock
Use monotonic clock instead of gettimeofday for timestamps.
2020-10-27 14:53:17 +00:00
Wim Taymans 3567efb7f8 alsa: allow setting playback/capture_node as node name
See !314
2020-10-24 15:53:48 +02:00
Jan Grulich 743cf58fb7 Define SPA_FALLTHROUGH to make fall-through annotations work for all compilers
This is needed for example for Clang compiler which uses different
annotations than GCC. It will make WebRTC to happily use PipeWire
since the spa library is header-only and WebRTC defaults to use
Clang with -Wimplicit-fallthrough.
2020-10-22 13:31:19 +02:00
Wim Taymans 1bd31c1cf1 don't force a MEDIA_ROLE property
The application has to set a media role.
2020-10-14 12:11:35 +02:00
Wim Taymans 9dfd261c71 add some more debug info 2020-09-25 17:01:52 +02:00
Wim Taymans 368366b88d alsa: avoid loading the plugin when linked against 0.2
chromium is linked against 0.2, avoid trying to load the alsa
plugin that is linked against 0.3

See #275
2020-09-07 17:41:50 +02:00
Wim Taymans b6e84ded75 alsa: protect against SIGPFE
Make sure we don't try to divide by 0 when the app calls the status
before we are PREPARED.

Fixes #283
2020-09-07 14:57:47 +02:00
Wim Taymans 030bef8dd3 alsa: use PIPEWIRE_PROPS for extra stream properties 2020-09-04 16:53:45 +02:00
Wim Taymans 64ee110356 alsa: rework process function to support planar formats 2020-09-04 15:40:22 +02:00
Wim Taymans bfc91c27a6 alsa: implement planar formats some more 2020-09-04 13:49:51 +02:00
Wim Taymans 6f4f9e5abb alsa: support planar types
We can support 2 buffers.
2020-09-04 12:23:11 +02:00
Wim Taymans 950e81c5fb alsa: put mixer entry in alsa conf files 2020-09-03 14:40:46 +02:00
Wim Taymans 0c04481ba7 metadata: improve default sink/source
Only check defaults when subject is PW_ID_CORE
Handle NULL keys: remove the defaults
2020-08-18 17:56:05 +02:00
Wim Taymans e71936f870 Improve naming
master -> driving
priority_master -> priority_driver
segment_master -> segment_owner
2020-08-06 13:49:33 +02:00
Wim Taymans 5bf6acad06 alsa: use PIPEWIRE_REMOTE env variable 2020-08-04 14:13:07 +02:00
Wim Taymans 37f43aba35 alsa: add mixer plugin
Add plugin to manage the volume of default source and sink
2020-07-24 17:13:51 +02:00
Wim Taymans b517a2a6ec alsa: use server name to connect 2020-07-23 20:43:08 +02:00
Wim Taymans e11d35107f alsa: don't leak properties on error 2020-07-02 15:53:16 +02:00
Wim Taymans ac54b7ace1 alsa: don't leak structure on error 2020-07-02 15:52:50 +02:00
Wim Taymans 6e03b4005d increase amount of datas in a buffer 2020-07-01 11:43:22 +02:00
Wim Taymans 09b6ef41a8 alsa: compare the scaled value to decide on xrun 2020-05-13 15:46:50 +02:00
Wim Taymans 56730197d9 alsa: report xrun
When we record but there is not enough space in the ringbuffer, report
xrun.
2020-05-13 12:09:28 +02:00
Wim Taymans b9bb318cb7 alsa: install conf files 2020-05-02 10:43:10 +02:00
Wim Taymans 029f431418 alsa: implement drain function
Implement a drain function that blocks and waits for the drain to
complete.
2020-04-07 17:48:28 +02:00
Wim Taymans 70f5abfe35 alsa: report error from server when we can 2020-04-07 17:38:39 +02:00
Wim Taymans c658574c01 alsa: improve drain 2020-04-06 17:53:46 +02:00
Jonas Holmberg b99313a59e pipewire-alsa: Get period_bytes from config
Use period_bytes constraint from config if present.
2020-03-12 15:00:50 +01:00
Jonas Holmberg 195ac82394 pipewire-alsa: Correct the max channels value 2020-03-12 09:19:58 +01:00
Jonas Holmberg 56f4ee5999 pipewire-alsa: Support hw constraints in config
Use rate, format and channels constraints from config if present.
2020-03-11 17:10:15 +01:00
Wim Taymans 936c290cc1 plugins: fix the licence of alsa and jack libraries
It's all MIT
2020-02-07 15:43:13 +01:00
Wim Taymans a7e36ddd9d alsa: split up conf files 2020-02-07 13:24:42 +01:00
Wim Taymans ae4e17e9a2 Remove old LICENSE files and README 2020-02-07 13:24:06 +01:00
Wim Taymans 6ac9b7b3a7 spa: add spa_aprintf helper
Add a asprintf helper function that handles errors correctly.
Use this in places where we use asprintf to avoid warnings when we
don't check the return value.
2020-01-27 12:19:21 +01:00
Wim Taymans 043e7f24fe add some more useful defines
Add define to match all ids for nodes and params.
Add define for invalid permissions
2020-01-15 11:15:51 +01:00
Wim Taymans 698ab911c3 loop: pass spa_dict to *_loop_new
Make the thread_loop alloc its own loop by default to simplify
some core. Add extra new_full method to pass a custom pw_loop.
Make other loop implementations ready to support custom loops
if we want that later.
2019-12-13 11:34:25 +01:00
Wim Taymans ecc6b27cd7 rename core_proxy -> core
Rename core_proxy to core and move the introspect and interface
contents to core.h

In an effort to promote the proxy API.
2019-12-11 07:46:59 +01:00
Wim Taymans 8ea78c2e3f pw_core -> pw_context
The proxy API is the one that we would like to expose for applications
and the other API is used internally when implementing modules or
factories.

The current pw_core object is really a context for all objects so
name it that way. It also makes it possible to rename pw_core_proxy
to pw_proxy later.
2019-12-10 18:19:56 +01:00
Wim Taymans 8a959ea7a1 core_proxy: prepare to rename pw_remote -> pw_core_proxy
The pw_remote object is really a wrapper around the pw_core_proxy.
The events it emits are also available in the core proxy and are
generally awkward to use.

With some clever new pw_core_proxy_* methods and a pw_core_connect
to create the core_proxy, we can convert all code away from pw_remote.

This is a first step in this conversion, using the pw_remote behind
the scenes. It leaks into some places because it really needs to become
its own struct in a next step.
2019-12-06 11:48:40 +01:00
Wim Taymans 6b1e1a82f1 alsa: improve debug 2019-12-05 13:17:43 +01:00
Wim Taymans 4314fba7c4 alsa: close fd before destroying the loop 2019-12-04 15:30:30 +01:00
Wim Taymans 738603fd04 stream: Align with pw_filter
Remove some of the unused states in pw_stream. The app can know the
state by following the format and buffer events.

Make it possible to be notified of io are updates. This should make it
possible to follow the transport etc.

Make it possible to be notified of any param changes.

Rename finish_format to update_params because that is what it does.
Make this work in the same was as the filter: updating the params
removes all old params of the types and installs the new ones.

Don't get the Props and PropInfo from the node proxy, instead get them
directly from the adapter that we have locally. Update the controls
directly on the adapter instead of going to the server first.
2019-11-21 16:14:50 +01:00
Gleb Popov 47f7caac06 Don't include byteswap.h on FreeBSD. 2019-11-19 13:41:40 +01:00
Wim Taymans 68e94a2e7e system: use spa_system functions for fds 2019-11-19 13:41:40 +01:00
Arun Raghavan 57d2fbdbf2 Merge pipewire-alsa subtree 2019-11-03 15:20:56 +01:00
Arun Raghavan 59bdab94bc Drop git submodule structure
The workflow is getting a little messy with these, so we're just going
to merge those repositories in.
2019-11-03 15:19:43 +01:00