mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
Add support for ALSA compressed offload
See https://docs.kernel.org/sound/designs/compress-offload.html https://github.com/alsa-project/tinycompress
This commit is contained in:
parent
f3914e494c
commit
6a034cc398
7 changed files with 1212 additions and 2 deletions
1142
spa/plugins/alsa/alsa-compressed-sink.c
Normal file
1142
spa/plugins/alsa/alsa-compressed-sink.c
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -22,6 +22,8 @@
|
|||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <errno.h>
|
||||
|
||||
#include <spa/support/plugin.h>
|
||||
|
|
@ -33,6 +35,9 @@ extern const struct spa_handle_factory spa_alsa_udev_factory;
|
|||
extern const struct spa_handle_factory spa_alsa_device_factory;
|
||||
extern const struct spa_handle_factory spa_alsa_seq_bridge_factory;
|
||||
extern const struct spa_handle_factory spa_alsa_acp_device_factory;
|
||||
#ifdef HAVE_COMPRESSED_OFFLOAD
|
||||
extern const struct spa_handle_factory spa_alsa_compressed_sink_factory;
|
||||
#endif
|
||||
|
||||
struct spa_log_topic log_topic = SPA_LOG_TOPIC(0, "spa.alsa");
|
||||
struct spa_log_topic *alsa_log_topic = &log_topic;
|
||||
|
|
@ -62,6 +67,11 @@ int spa_handle_factory_enum(const struct spa_handle_factory **factory, uint32_t
|
|||
case 5:
|
||||
*factory = &spa_alsa_acp_device_factory;
|
||||
break;
|
||||
#ifdef HAVE_COMPRESSED_OFFLOAD
|
||||
case 6:
|
||||
*factory = &spa_alsa_compressed_sink_factory;
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
subdir('acp')
|
||||
subdir('mixer')
|
||||
|
||||
spa_alsa_dependencies = [ spa_dep, alsa_dep, libudev_dep, mathlib, epoll_shim_dep, libinotify_dep ]
|
||||
|
||||
spa_alsa_sources = ['alsa.c',
|
||||
'alsa.h',
|
||||
'alsa-udev.c',
|
||||
|
|
@ -12,12 +14,17 @@ spa_alsa_sources = ['alsa.c',
|
|||
'alsa-seq-bridge.c',
|
||||
'alsa-seq.c']
|
||||
|
||||
if tinycompress_dep.found()
|
||||
spa_alsa_sources += [ 'alsa-compressed-sink.c' ]
|
||||
spa_alsa_dependencies += tinycompress_dep
|
||||
endif
|
||||
|
||||
spa_alsa = shared_library(
|
||||
'spa-alsa',
|
||||
[ spa_alsa_sources ],
|
||||
c_args : acp_c_args,
|
||||
include_directories : [configinc],
|
||||
dependencies : [ spa_dep, alsa_dep, libudev_dep, mathlib, epoll_shim_dep, libinotify_dep ],
|
||||
dependencies : spa_alsa_dependencies,
|
||||
link_with : [ acp_lib ],
|
||||
install : true,
|
||||
install_dir : spa_plugindir / 'alsa'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue