mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
alsa: add device.profile.pro property
It is set to true when the node is using a pro audio profile.
This commit is contained in:
parent
289661b663
commit
3685081fd1
3 changed files with 7 additions and 0 deletions
|
|
@ -387,6 +387,7 @@ static int add_pro_profile(pa_card *impl, uint32_t index)
|
|||
0, NULL, NULL, false))) {
|
||||
pa_alsa_init_proplist_pcm(NULL, m->output_proplist, m->output_pcm);
|
||||
pa_proplist_setf(m->output_proplist, "clock.name", "api.alsa.%u", index);
|
||||
pa_proplist_setf(m->output_proplist, "device.profile.pro", "true");
|
||||
pa_alsa_close(&m->output_pcm);
|
||||
m->supported = true;
|
||||
pa_channel_map_init_auto(&m->channel_map, m->sample_spec.channels, PA_CHANNEL_MAP_AUX);
|
||||
|
|
@ -417,6 +418,7 @@ static int add_pro_profile(pa_card *impl, uint32_t index)
|
|||
0, NULL, NULL, false))) {
|
||||
pa_alsa_init_proplist_pcm(NULL, m->input_proplist, m->input_pcm);
|
||||
pa_proplist_setf(m->input_proplist, "clock.name", "api.alsa.%u", index);
|
||||
pa_proplist_setf(m->input_proplist, "device.profile.pro", "true");
|
||||
pa_alsa_close(&m->input_pcm);
|
||||
m->supported = true;
|
||||
pa_channel_map_init_auto(&m->channel_map, m->sample_spec.channels, PA_CHANNEL_MAP_AUX);
|
||||
|
|
|
|||
|
|
@ -499,9 +499,13 @@ int spa_alsa_init(struct state *state, const struct spa_dict *info)
|
|||
{
|
||||
uint32_t i;
|
||||
int err;
|
||||
const char *str;
|
||||
|
||||
snd_config_update_free_global();
|
||||
|
||||
if ((str = spa_dict_lookup(info, "device.profile.pro")) != NULL)
|
||||
state->is_pro = spa_atob(str);
|
||||
|
||||
state->multi_rate = true;
|
||||
state->htimestamp = false;
|
||||
for (i = 0; info && i < info->n_items; i++) {
|
||||
|
|
|
|||
|
|
@ -199,6 +199,7 @@ struct state {
|
|||
unsigned int is_hdmi:1;
|
||||
unsigned int multi_rate:1;
|
||||
unsigned int htimestamp:1;
|
||||
unsigned int is_pro:1;
|
||||
|
||||
uint64_t iec958_codecs;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue