Some codecs need the MTU as a parameter so wait until we acquire
with creating the codec context.
Make some method to enumerate the parameters from the transport
config and use that for the EnumFormat param.
mSBC can be enabled by passing "bluez5.msbc-support=true" parameter to
pipewire-media-session.
mSBC is automatically selected if remote device supports it.
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.
Release transport when endpoint connection property is updated to false.
This also checks if the transport is already created when receiving
endpoint properties update to prevent multiple transport creation.
Continue processing the input data until we can't send anymore. When
we are following another driver, we need to process each buffer in
the cycle completely or we will start lagging behind.
The ConnectAudio method triggers Introspect and NewConnection calls from
hsphfpd to the backend, which will set the fd to use for the SCO data.
This imply to run the DBus loop while waiting for ConnectAudio reply to be
able to reply to those method calls.
MTU is hard-coded to 48. Using MTU from hsphfpd may prevent correct
sound operations.
Volume management is not yet implemented.