When the acp-device impl struct is passed to the log func, it is
possible that when this device is removed, another device using acp
is going to crash while logging a message
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.
The audio agent gets or provides data in the format requested between host
and chipset.
The HSP and HFP profile request PCM data to be sent to the chipset which
will encode/decode them in CVSD format.
This audio agent format may be re-used later for another air codec hw
encoded.
So, rename the audio agent to be more explicit.
Use codec methods. Init codec at start.
Remove rate match until we actually implement this
Add some buffering of packets before we hand them out.
Always simply fill a buffer and hand it out.
don't emit signals when we are following another driver.
Acquire transport as soon as it goes to PENDING.
Make the list of supported codecs available.
Register all supported codecs endpoints
Find the codec from the endpoint name
Put the codec on the transport for the sink to find.
When we receive volume updates with a different number of channels
than we are configured for, remap them to our number of channels.
This currently involves taking the average volume until we actually
have a channelmap associated with the volume updates.
See #320
When a port is plugged/unplugged, first update all the profile states
and then emit a profile change only for the current profile. This way
the device can look at all the updated profiles to select the best one.
Some drivers seem to only use 2 buffers when asked for 16 buffers. We
can see this because the buffer is already queued. In this case, just
use the 2 buffers.
See #294