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:
Sanchayan Maity 2022-09-20 15:13:16 +05:30 committed by Wim Taymans
parent f3914e494c
commit 6a034cc398
7 changed files with 1212 additions and 2 deletions

View file

@ -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;
}