mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-08 13:30:08 -05:00
spa: acp: get and emit UCM information for SplitPCM devices
When api.alsa.split-enable=true for ACP device, instruct UCM to not use alsa-lib plugins for SplitPCM devices. Grab the information from UCM for the intended channel remapping, and add the splitting information to the nodes emitted. Session manager can then look at that, and load nodes to do the channel splitting.
This commit is contained in:
parent
7c7a54dd87
commit
dcccfcab7f
12 changed files with 422 additions and 22 deletions
|
|
@ -145,6 +145,7 @@ typedef struct pa_alsa_ucm_mapping_context pa_alsa_ucm_mapping_context;
|
|||
typedef struct pa_alsa_ucm_profile_context pa_alsa_ucm_profile_context;
|
||||
typedef struct pa_alsa_ucm_port_data pa_alsa_ucm_port_data;
|
||||
typedef struct pa_alsa_ucm_volume pa_alsa_ucm_volume;
|
||||
typedef struct pa_alsa_ucm_split pa_alsa_ucm_split;
|
||||
|
||||
int pa_alsa_ucm_query_profiles(pa_alsa_ucm_config *ucm, int card_index);
|
||||
pa_alsa_profile_set* pa_alsa_ucm_add_profile_set(pa_alsa_ucm_config *ucm, pa_channel_map *default_channel_map);
|
||||
|
|
@ -177,6 +178,15 @@ void pa_alsa_ucm_roled_stream_end(pa_alsa_ucm_config *ucm, const char *role, pa_
|
|||
|
||||
/* UCM - Use Case Manager is available on some audio cards */
|
||||
|
||||
struct pa_alsa_ucm_split {
|
||||
/* UCM SplitPCM channel remapping */
|
||||
bool leader;
|
||||
int hw_channels;
|
||||
int channels;
|
||||
int idx[PA_CHANNELS_MAX];
|
||||
enum snd_pcm_chmap_position pos[PA_CHANNELS_MAX];
|
||||
};
|
||||
|
||||
struct pa_alsa_ucm_device {
|
||||
PA_LLIST_FIELDS(pa_alsa_ucm_device);
|
||||
|
||||
|
|
@ -215,6 +225,9 @@ struct pa_alsa_ucm_device {
|
|||
|
||||
char *eld_mixer_device_name;
|
||||
int eld_device;
|
||||
|
||||
pa_alsa_ucm_split *playback_split;
|
||||
pa_alsa_ucm_split *capture_split;
|
||||
};
|
||||
|
||||
void pa_alsa_ucm_device_update_available(pa_alsa_ucm_device *device);
|
||||
|
|
@ -254,6 +267,7 @@ struct pa_alsa_ucm_config {
|
|||
pa_channel_map default_channel_map;
|
||||
unsigned default_fragment_size_msec;
|
||||
unsigned default_n_fragments;
|
||||
bool split_enable;
|
||||
|
||||
snd_use_case_mgr_t *ucm_mgr;
|
||||
pa_alsa_ucm_verb *active_verb;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue