Commit Graph

73 Commits

Author SHA1 Message Date
Lefucjusz
67a24efb29 [BH-2019] Fix crash after deleting WAV alarm sound
Fix of the issue that the device would crash
when entering alarm sound selection list
after deleting selected file during alarm
ringing, but only when file's format was
WAV.
2024-06-27 11:45:17 +02:00
Lefucjusz
4e6ac18238 [BH-2020] Fix double-free in DecoderMP3
Fix of the issue that improper check
of dr_mp3 library initialization
success could result in double-free
of library internals in case
initialization was unsuccessful.
2024-06-26 09:33:36 +02:00
Lefucjusz
e46cb3e1a7 [BH-1888] Fix device freezing when changing volume intensively
Fix of the issue that intensive changing
volume in Relaxation app would result in
device freezing after some time of such
activity.
2024-02-27 16:34:03 +01:00
Lefucjusz
9a8ffff654 [BH-1863] Fix deleted file popup showing in Relaxation
* Fix of the issue that 'File has been
deleted' popup would show in Relaxation
app at the end of playback if the
playback was paused at least once,
even though the file wasn't actually
deleted.
* Added very basic audio decoder error
handling and propagation mechanism.
* Minor refactor around several
audio-related parts.
2024-02-01 12:09:32 +01:00
Lefucjusz
b932e06472 [BH-1823] Fix relaxation start delay for specific MP3 files
Fix of the issue that when trying to play
files with large ID3V2 metadata the
playback would start with significant
delay of several seconds. It was also
possible to leave relaxation progress
window without stopping the playback.
2023-11-20 11:07:09 +01:00
Marcin Zieliński
9bf69c652f [MOS-878] Don't break audio playback on file deletion
Since a currently played file is deleted, the player
goes to the next file from the list. A special case:
if the deleted file is the last one, the playback
stops (and can be resumed by the user).
2023-02-22 17:59:14 +01:00
Lefucjusz
d28fdb6594 [MOS-882] Fix FLAC file playback with USB cable connected
Fix of the issue that caused system crash when
trying to play 96kHz FLAC file with USB cable
connected. The reason of the issue was the lack
of FreeRTOS heap space left, what caused
pvPortMalloc() to fail when allocating
memory for stream buffer.

Additionally minor code cleanup.
2023-01-20 10:50:06 +01:00
Lefucjusz
9b7d5be07a [MOS-779] Fix music files extensions case sensitivity
Fix of the issue that only files with
extension in lowercase were detected
and listed in the music player's
library.
Additionally code cleanup.
2022-10-25 09:53:24 +02:00
Lefucjusz
d5f84437ca [MOS-92] Fix continuing music playback after BT disconnection
Fix of the issue that after disconnecting
BT A2DP device during music playback
and reconnecting it without leaving
music player app the sound was not
audible anywhere.
Additionally unified behaviour of music
playback on connection/disconnection
of audio devices.
2022-08-29 15:04:52 +02:00
Adam Wulkiewicz
fe708cdf31 [MOS-670] Change clang-format AlwaysBreakTemplateDeclarations to Yes
Add --all and --fix-all options to style-check-hook
2022-08-26 15:22:39 +02:00
Adam Dobrowolski
dc9ad45a04 [MOS-53] Not enough stack for audio worker
There were ocasional crashes due to too small stack for audio worker.
These were not caught via stack overflow catching logic most of times
2022-06-03 09:36:06 +02:00
Kuba
28e9e50d3e [EGD-8094] Change mp3 decoder replaced with dr_mp3
Mp3 decoder replaced with dr_mp3.
2021-12-20 16:48:54 +01:00
Alek Rudnik
055bc5e065 [EGD-8081] Bump up dr_flac version
Bumped up version of dr_flac library to recent version.
Unified decoder API and made sure it is working as expected.
2021-12-10 17:25:22 +01:00
Lucjan Bryndza
cbbcbe2a04 [EGD-8076] Replace wav decoder by dr_wav
Replace plain straigh waw decoder by the dr_wav library.

Signed-off-by: Lucjan Bryndza <lucjan.bryndza@mudita.com>
2021-12-09 15:23:56 +01:00
Piotr Tański
1d2f5cf7a4 [EGD-7754] Dates bumped in disclaimers
Dates bumped from 2020 to 2021.
2021-10-11 19:08:26 +02:00
Alek Rudnik
1490158034 [EGD-7725] Tune up file system io access
Increasd io stream buffers:
- 64kB for big files with short lifetime scope
- 16kB for big files with long lifetime scope
- 1kB - dont changes default forr the rest
2021-10-08 10:28:38 +02:00
Marcin Smoczyński
bd90e57516 [BH-907] Split utils module into components
Split module-utils into smaller components for better dependency
management. Fix many dependencies throughout the project.

Signed-off-by: Marcin Smoczyński <smoczynski.marcin@gmail.com>
2021-09-23 15:14:40 +02:00
Jakub Pyszczak
200c9b949d [EGD-7432] Tags fetcher
Added tags fetcher as universal audio utility
which can be used without bus overhead
2021-09-03 16:35:59 +02:00
Jakub Pyszczak
fa79a8cc33 [EGD-7246] Fixed audio tags decoding
Fixed wrong tags decoding if there was any special
utf8 character contained in metadata.
2021-08-03 08:59:46 +02:00
Jakub Pyszczak
bc0a168d80 [EGD-7145] Fix mp3 tags fetch
Fixed problem with some mp3 files which wasn't available in the list
of tracks. Issue was occuring due to the large buffer allocation.
2021-07-13 16:47:25 +02:00
Lukasz Skrzypczak
7fee0d9cfb [BH-378] Utils move log to library
Moved log to separate library
2021-06-08 12:24:29 +02:00
DariuszSabala
6fe90d4bef [BH-461] Move TPLIB minimp3 to separate dir
Moved minimp3 to third-party directory,
added our CMakeLists.txt with interface
library defined and upgraded include paths
2021-05-28 12:39:40 +02:00
Marcin Smoczyński
f6dd452c41 [EGD-6799] Cleanup audio device interface
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>
2021-05-20 19:31:06 +02:00
Marcin Smoczyński
a3e512a89b [EGD-6674] Change negotiation of audio block size
Replace faulty implementation which produced ambiguous results with one
which is suited for both phone calls and music playback requirements,
including A2DP and HSP Bluetooth profiles.

Signed-off-by: Marcin Smoczyński <smoczynski.marcin@gmail.com>
2021-05-05 21:36:00 +02:00
Marcin Smoczyński
9cf397d192 [EGD-6497] Add audio transcoding framework
Add a mechanism to apply a data transform on the stream's input. An
example mono to stereo transform is provided.

Signed-off-by: Marcin Smoczyński <smoczynski.marcin@gmail.com>
2021-04-23 07:29:18 +02:00
Marcin Smoczyński
8b21df135c [EGD-5742] Add audio format checking
Check if decoder's file format is supported by the sink audio device
before playing the sound. Add list of supported formats to each of audio
devices.

Signed-off-by: Marcin Smoczyński <smoczynski.marcin@gmail.com>
2021-04-12 10:00:00 +02:00
Marcin Smoczyński
77178548f3 [EGD-5260] Mono to stereo software conversion
Add workaround for Bluetooth audio to *always* convert mono PCM to
stereo.

Signed-off-by: Marcin Smoczyński <smoczynski.marcin@gmail.com>
2021-03-25 01:01:35 +01:00
Marcin Smoczyński
cf75cfc012 [EGD-5973] Reduce audio stack usage
Verify stack usage of:
 - ServiceAudio
 - application music player
 - decoder worker
Change if possible to a realistic value keeping a 30% margin.
Stack usage reduction is limited due to an extensive stack usage of
every call to the filesystem, which uses around 2 kB of stack.

Signed-off-by: Marcin Smoczyński <smoczynski.marcin@gmail.com>
2021-03-19 09:55:06 +01:00
Marcin Smoczyński
f1fc9df152 [EGD-4977] Reduce audio lag during voice call
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>
2021-02-01 22:22:12 +01:00
Radoslaw Wicik
d14e40d378 [EGD-4831] Add license headers to c, h and sql files
Add license headers to `h`, `c` and `sql` files as this files haven't
been checked previously, script now to automatically updates current
year in existing licenses.
2021-01-28 14:41:33 +01:00
Marcin Smoczyński
40bf381eca [EGD-5086] Fix voice not starting when calling
Due to a race condition between source and sink voice is not always
starting when calling. Introduce audio stream connections to avoid
race condition and improve handling of audio start and stop operations.

Signed-off-by: Marcin Smoczyński <smoczynski.marcin@gmail.com>
2021-01-14 11:03:47 +01:00
Hubert Chrzaniuk
1bdc829588 [EGD-5086] Change audio device switching logic
Upon hardware change event, audio profile had been switched multiple
times forcing redundant initializations of all related objects. Logic
has been optimized and prepared for further refactor. Now upon hardware
event objects are initialized exactly once.
2021-01-11 09:48:52 +01:00
Marcin Smoczyński
871b250d86 [EGD-4534] Change audio data path synchronization
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>
2020-12-17 12:20:40 +01:00
Hubert Chrzaniuk
f69384525a [EGD-4332][EGD-4482] Fix playback of mono sound in headphones (#1080)
Addressed problem - when playing files containing only one
audio channel the sound could be heard in only one speaker.
2020-11-26 09:46:30 +01:00
jimmorrisson
70126e07ac [EGD-4439] New filesystem handling - module audio. (#1037)
[EGD-4439] Taglib revision update
2020-11-19 10:18:24 +01:00
Lucjan Bryndza
0a407135e5 [EGD-4181] move taglib from audio (#932)
* [EGD-4181] Move submodule taglib to utils

* [EGD-4181] LibTag moved to util lib.

Co-authored-by: Lucjan Bryndza <lucjan.bryndza@mudita.com>
2020-10-30 12:41:46 +01:00
Hubert Chrzaniuk
4c22ef5107 [EGD-4099] BT set stream (#846) 2020-10-20 13:43:53 +02:00
Przemyslaw Brudny
e131dae68f [EGD-3743] Removed old doxygen copyright statements from project. 2020-10-20 12:55:10 +02:00
Radoslaw Wicik
2276ceed67 [EGD-3743] Update copyrights in fies 2020-10-20 12:55:10 +02:00
Hubert Chrzaniuk
8c748a39b2 [EGD-4100] Fix playback restart on audio profile change (#848) 2020-10-16 13:53:57 +02:00
Hubert Chrzaniuk
ebcef7a692 [EGD-4054] Audio API for setting stream parameters (#826) 2020-10-15 09:27:15 +02:00
Bartek Cichocki
305d43a176 [EGD-3773] added A2DP playback backend 2020-10-14 09:23:53 +02:00
Adam Dobrowolski
7b4a706cd6 EGD-4036 Application windows - added register mechanism
* Moved ApplicationLauncher to separate files - declutering
* WindowsStore renamed to WindowsFactory - Store needs to be splitted toavoid antipattern
* Options window build dynamically onBeforeShow
* Dialog windows dynamically built
2020-10-13 17:46:10 +02:00
Lucjan Bryndza
0014dae259 [EGD-3854] Removing goto's from the code (#797)
It is generic cleanup task for removing all goto files

Co-authored-by: Lucjan Bryndza <lucjan.bryndza@mudita.com>
2020-10-08 08:58:49 +02:00
Adam
f5f27d642f EGD-2955 EGD-3588 Timers fully refactored & updated (#721)
* Timers now are Application thread safe
* Timers now have consistent API independend of Application (no more c style timers)
* Timers can have either: callback or override onTimer() method - this
  way we can create more complicated timers or just use existing ones
* gui::Timer added via adapter class GuiTimer to decouple sys::Timer
  with gui::Timer
* Fixed race in wrapper
* Updated docs
* fixed using std and cpp_freertos and DataReceivedHandler hidden in Application.hpp
2020-10-02 14:04:57 +02:00
pawpMudita
9311e33aa5 EGD-3808 Scrolling contacts list with a particular letter - part 2 2020-10-02 10:09:36 +02:00
SP2FET
ca03073cc4 [EGD-3643] added BT dedicated bonding (simple pairing) 2020-10-01 17:19:41 +02:00
Marcin Smoczyński
af85469c26 [EGD-3864] main file cleanup (#761)
Remove dead code; cleanup and sort include list. Introduce config file.
2020-10-01 14:47:53 +02:00
hubert-chrzaniuk
ea88f765a9 [EGD-3468] Bump taglib repo (#752) 2020-09-30 09:12:05 +02:00
kkleczkowski
06e3bb0f3f Egd 3709 - Application antenna - added parameter history window. (#713)
* [EGD-3709] Applicatgion antenna switch parameters window.

* [EGD-3709] Changelog + service-antenna disabled.

* [EGD-3709] PR suggestions + missing antenna rquest.

Co-authored-by: Kuba Kleczkowski <dd>
2020-09-22 14:35:00 +02:00