acp: add a Pro Audio profile

The Pro Audio profile exposes all devices and subdevices with maximum
channel count and no channel layout. It also have no hardware volume
and is more suited for Pro Audio usage.

See #731 #704 #57
This commit is contained in:
Wim Taymans 2021-02-16 12:26:51 +01:00
parent 91610bd1a9
commit 5892403b01
2 changed files with 138 additions and 0 deletions

View file

@ -201,6 +201,17 @@ static inline pa_channel_map* pa_channel_map_init_extend(pa_channel_map *m,
return NULL;
}
static inline pa_channel_map* pa_channel_map_init_pro(pa_channel_map *m,
unsigned channels)
{
unsigned i;
pa_channel_map_init(m);
for (i = 0; i < channels; i++)
m->map[i] = PA_CHANNEL_POSITION_INVALID;
m->channels = (uint8_t) channels;
return m;
}
typedef uint64_t pa_channel_position_mask_t;
#define PA_CHANNEL_POSITION_MASK(f) ((pa_channel_position_mask_t) (1ULL << (f)))