Fix of the issue that connecting or
disconnecting BT device while call
was in progress resulted in no sound
being heard anywhere due to audio
routing being stopped when HFP device
disconnected.
Additionally minor code cleanup.
This refactoring removes invalid interface dependencies of the original
AudioDevice implementation:
- move things characteristic to RT1051AudioCodec to audio::codec
- remove dead methods
- make start/stop optional and codec configuration independent
- add more convenient way to get supported formats
Signed-off-by: Marcin Smoczyński <smoczynski.marcin@gmail.com>
Add basic playback capability using Bluetooth A2DP profile.
Only stereo/44100/16bit files are supported at the moment
Signed-off-by: Marcin Smoczyński <smoczynski.marcin@gmail.com>
Audio devices are created in the audio subsystem and it is not possible
to send a device to bt service upon creation.
Introduce hookable audio device factory to allow sharing bluetooth
audio device. Move audio devices from bsp to audio allowing removal of
unwanted bsp -> audio dependency.
Remove Bluetooth proxy device which turned out to be a dead end.
Signed-off-by: Marcin Smoczyński <smoczynski.marcin@gmail.com>
Reduce audio delay by reducing audio buffer size in router operation.
Audio streams are now created directly in the operations, not in the
audio service, which gives more flexibility.
Audio Buffer size is calculated based on endpoints (source, sink) and
operation capabilities. This commit also enables allocations in a
non-cacheable region of OCRAM for endpoints that use DMA for data
transport.
Introduce power-of-two operations that use built-in functions and
possibly dedicated hardware instructions of an MCU. These operations
are required by the audio stream buffer size calculation algorithm.
Signed-off-by: Marcin Smoczyński <smoczynski.marcin@gmail.com>
Bluetooth audio device requires different handling than other
audio devices. The commit adds proxy device that does not
handle requests itself but instead sends requests too Bluetooth
service.
Refactor audio module to use only one callback for communication
with audio service. This also simplifies the logic and removes
necessity to define defaults for audio values in multiple places.
Refactor audio data path to fix several synchronization issues and
excessive copy operations on large memory blocks. Introduce
audio::Stream data structure to allow connecting audio source and sink
with a zero-copy capability.
Introduce system mechanisms:
- critical section guard lock needed for stream synchronization
- non-cacheable memory allocator to allocate memory for DMA safe
buffers
Update the Googletest CMake template to match the capabilities of the
Catch2 template.
Signed-off-by: Marcin Smoczyński <smoczynski.marcin@gmail.com>
Signed-off-by: Hubert Chrzaniuk <hubert.chrzaniuk@mudita.com>
* [EGD-558][fix] change error to info
* [EGD-558] added volume control of currently active audio operation
* [EGD-558] added ringing on incoming call
* [EGD-558] mini clean up in callwindow
* [EGD-558] removed reinterpret_casts and added some logging
* [EGD-558] rewritten methods to increment/decrement volume
* [EGD-558] clean up
* [EGD-558] moved volume control to application class
added nullptr checks
* [EGD-558] fixed types
* [EGD-558] added some audio debug logs
* [EGD-558] left a comment why ringing sound is currently disabled
* [EGD-558] PR fixes
* [EGD-558] PR fix
* [EGD-558] added propper error codes on pointer checking in Audio.cpp