Commit graph

12 commits

Author SHA1 Message Date
Wim Taymans
6e6385e27d acp: don't mix non-AUX and AUX channels
When filling up the channels, either fill up the positions with one
of the know layouts or use AUX channels, never try to mix them.

This avoid cards with a large number channels to show a strange mix
of surround and AUX channels.
2022-06-02 12:54:04 +02:00
Wim Taymans
30d9b743a2 acp: return map on success
We need to return the channelmap when we have successfully filled
it.
2022-06-02 12:44:31 +02:00
Wim Taymans
86ca0f8466 acp: improve debug of channel map
Increase the size of the channel_map debug printf buffer.
Use a safer version of the snprintf that avoids buffer overruns.

See #1781
2021-11-04 16:41:32 +01:00
Philippe Normand
ec7ed1275e spa: alsa: Switch to explicit fallthrough
Use `__attribute__((fallthrough))` through the new FALLTHROUGH macro, if
supported.
2021-10-25 07:26:15 +00:00
Wim Taymans
a475926f87 acp: move pro channel init to init_auto 2021-10-18 10:51:48 +02:00
Wim Taymans
9dccd79191 acp: ensure we don't make invalid channels
There are only 32 AUX channels in pulseaudio so wrap around when we
have more.
2021-10-18 10:50:09 +02:00
Wim Taymans
08e34a99fd acp: use AUX channels for PRO audio profile
That way we can actually use the channel names to make custom loopback
mappings.
2021-07-21 11:27:09 +02:00
Wim Taymans
7ee23a046c acp: avoid warning for i18n string
spa/plugins/alsa/acp/channelmap.h:466:9: warning: format not a string
literal and no format arguments [-Wformat-security]
  466 |         pa_snprintf(s, l, _("(invalid)"));
2021-04-14 18:03:45 +02:00
Wim Taymans
5892403b01 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
2021-02-16 12:34:59 +01:00
Wim Taymans
4d62899375 acp: sync versions 2020-11-26 10:42:26 +01:00
Jan Grulich
743cf58fb7 Define SPA_FALLTHROUGH to make fall-through annotations work for all compilers
This is needed for example for Clang compiler which uses different
annotations than GCC. It will make WebRTC to happily use PipeWire
since the spa library is header-only and WebRTC defaults to use
Clang with -Wimplicit-fallthrough.
2020-10-22 13:31:19 +02:00
Wim Taymans
1612f5e4d2 alsa-acp: Add libacp based card device
libacp is a port and wrapper around the pulseaudio card profile code.
It uses a set of templates for construct a card profile and mixer port
settings. It also has support for UCM when available for the hardware.
2020-07-06 12:20:09 +02:00