alsa-compress-offload: Add device object and udev based autodetection

As part of this, in alsa-udev.c, certain structures and variables referred
to as "device" are renamed to "card". Otherwise, there is ambiguity, since
"device" can mean a udev device, an SPA device, a compress-offload device,
a PCM device etc.

Also, replace "card id" with "card number" to emphasize that these integers
are not actually SPA object IDs.
This commit is contained in:
Carlos Rafael Giani 2023-08-30 23:52:14 +02:00 committed by Wim Taymans
parent ae4bff78a3
commit 8e6d070148
8 changed files with 1050 additions and 237 deletions

View file

@ -17,6 +17,7 @@ extern const struct spa_handle_factory spa_alsa_seq_bridge_factory;
extern const struct spa_handle_factory spa_alsa_acp_device_factory;
#ifdef HAVE_ALSA_COMPRESS_OFFLOAD
extern const struct spa_handle_factory spa_alsa_compress_offload_sink_factory;
extern const struct spa_handle_factory spa_alsa_compress_offload_device_factory;
#endif
struct spa_log_topic log_topic = SPA_LOG_TOPIC(0, "spa.alsa");
@ -51,6 +52,9 @@ int spa_handle_factory_enum(const struct spa_handle_factory **factory, uint32_t
case 6:
*factory = &spa_alsa_compress_offload_sink_factory;
break;
case 7:
*factory = &spa_alsa_compress_offload_device_factory;
break;
#endif
default:
return 0;