30 Commits

Author SHA1 Message Date
Patrik Stutz
3f017f8d5d update driver 2024-11-24 16:51:34 +01:00
Andrea Bondavalli
1b057635f3 Fix to build.sh to restore module compilation and to daemon regression tests 2024-09-16 12:38:32 +02:00
Andrea Bondavalli
969e343309 Use 3rdparty/ravenna-alsa-lkm via a submodule.
Fix to the daemon regression test.
2024-09-16 12:05:22 +02:00
Andrea Bondavalli
47da082405 - renamed USE_STREAMER compilation flag to _USE_STREAMER_
- changed cpp-httplib git submodule path to https://github.com/bondagit/cpp-httplib.git
- removed compilation warning related to the usage of Boost bind global placeholders
- updated daemon version to 2.0.2
2024-09-16 11:33:54 +02:00
Maciej Bliziński
48444bec65
Use cpp-httplib via a submodule.
This removes the need to script out the fetching of the other
repository. Submodule stores the version of the sub-repository.
2024-08-02 18:47:56 +01:00
Andrea Bondavalli
fe3ff1aabd - build.sh uses the branch aes67-daemon of the new github repo https://github.com/bondagit/ravenna-alsa-lkm.git
This repo is a fork of the original one with the bondagit patches applied to the aes67-daemon branch
- removed ravenna-alsa-lkm driver patches from the repo
2021-02-16 21:09:50 +01:00
Andrea Bondavalli
8a5600638b Reworked driver PCM interface to simplify and unify handling of memory mapped and read-write interleaved modes.
Removed driver copy_user(), copy_kernel() and fill_silence() ops.
Removed user space buffer transfer handling mode from playback and capture copy_internal() functions.
2021-02-12 16:35:07 +01:00
Andrea Bondavalli
af25380763 Fix to patch for corruption in read-write mode to preserve playback buffer cleanup (mute) on first IO start but to avoid it at subsequent 2021-02-05 12:26:12 +01:00
Andrea Bondavalli
77cf7bdb28 Added patch to Ravenna driver to fix a problem that leads to an initial playback buffer corruption in case the read/write interleaved mode is used.
The problem arises from pre-buffering performed after ALSA prepare and before ALSA start trigger-
The patch enables the early startup of the audio playback interrupt and disables the cleanup (mute) of the playback buffer.
This issue can be reproduced using the test suite developed to investigate #17 and by removing the (-M) option from aplay in run_test.sh script.
2021-02-03 18:41:00 +01:00
Andrea Bondavalli
bf847edd73 Added patch to Ravenna driver to solve a possible corruption issue at the beginning of a playback or recording caused by not initialized buffers. 2021-01-31 18:19:33 +01:00
Andrea Bondavalli
143d98dee5 Added patch to Ravenna driver to enable mono channel configuration for playback and capture devices.
Without this patch a Source or Sink configured with a single channel fail to work as expected.
2021-01-31 18:12:09 +01:00
Andrea Bondavalli
b791c559a7 Fix to avoid kernel assertion "BUG: scheduling while atomic"
Added spinlock release in mr_alsa_audio_pcm_hw_params() and mr_alsa_audio_pcm_prepare() prior to call to set_sample_rate()
This fixes issue #21
2020-09-04 20:36:30 +02:00
Andrea Bondavalli
3d3209bfc9 Set of chnages to ALSA Ravenna driver to fix the playback with memory mapped access mode on ARM platform.
Issue is in the mr_alsa_audio_pcm_playback_copy_internal() function of audio_driver.c that transfers the PCM samples from the ALSA buffer to the Ravenna buffer using the get_user() function.
In case of memory access mode the ALSA buffer can be directly accessed by the kernel and the samples must be copied.
mr_alsa_audio_pcm_playback_copy_internal() has been modified  to handle the transfer of the ALSA buffer from user space (used with read/write access mode) and from kernel space (used by memory access mode).
The issue is common to all the platform but impacting ARM only.
Additional changes:
- changed type for dma_playback_offset and dma_capture_offset variables to uint32_t instead of atomic_t since the pointer callback mr_alsa_audio_pcm_pointer() is now atomic
- added variables to the mr_alsa_audio_chip scructure to decrease the number of calls to snd_pcm_lib_xxx() functions. These get assigned in the prepare callback mr_alsa_audio_pcm_prepare()
- changed mr_alsa_audio_get_playback_buffer_size_in_frames() to return configured size of Ravenna playback buffer (same as mr_alsa_audio_get_capture_buffer_size_in_frames())
- some rework of the existing patches
This fixes issue #20
2020-08-27 21:20:19 +02:00
Andrea Bondavalli
2a2d536284 Change in RAVENNA ALSA driver to avoid channels consistency check when operating in mmap interleaved mode 2020-08-02 15:54:02 +02:00
Andrea Bondavalli
b24ba6ef6b Added patch to the RAVENNA ALSA driver to implement direct PCM transfer for the memory map access mode as replacement to indirect PCM transfer.
PCM samples are transferred by the PCM interrupt routine from the memory of the ALSA playback device to the RAVENNA buffer and from the RAVENNA buffer to the memory of the ALSA capture device.
This patch will enabled the use of the ALSA plugins and it has been testes with the ALSA Dmix plugin.
This patch applies to issues #7 and #15.
2020-08-02 15:42:47 +02:00
Andrea Bondavalli
fe08f3c3bd Fix to independent playback and capture patch to stop triggering PCM capture interrupts when a capture is not running and PCM playback interrupts when a playback is not running.
This was causing a possible kernel hang while stopping a capture with an ongoing playback or vice versa.
2020-07-20 16:51:30 +02:00
Andrea Bondavalli
e8c1c9d6bf Fix wrong file extension of ravenna-alsa-lkm-independent-playback-capture patch file 2020-07-07 22:21:12 +02:00
Andrea Bondavalli
ba1305a0b9 Added fix to ALSA/RAVENNA driver to revert changes done to mr_alsa_audio_pcm_capture_copy_internal() in ALSA/RAVENNA driver version 1.1.93.
This fixes issue #14
2020-07-03 15:50:27 +02:00
Andrea Bondavalli
dd0ab49c6c Added fix to ALSA/RAVENNA driver to restore default number of inputs and outputs to 64.
These were set back to 8 after merge of ALSA/RAVENNA driver version 1.1.93.
This fixes issue #13
2020-06-30 17:27:16 +02:00
Andrea Bondavalli
a22546619c Reworked timer module to use a separate tasklet to handle timer callback.
This is the same approach already used with Linux Kernel 4.x, but in Linux Kernel 5.x tasklet_hrtimer helper functions were removed.
This fixes issue #12
2020-06-29 18:58:12 +02:00
Andrea Bondavalli
897b1e0032 Fix to patch ravenna-alsa-lkm-independent-playback-capture.patch, see issue #11 2020-06-27 14:15:16 +02:00
Andrea Bondavalli
3aeed93856 Added patch to the ALSA RAVENNA/AES67 driver to handle independent playback and capture I/O startup and termination.
This fixes issue #11
2020-06-26 19:31:23 +02:00
Andrea Bondavalli
f9a07569f9 Added fix to AES67 Driver to remove a kernel message that can delay the playback startup on slow platform 2020-06-15 20:49:33 +02:00
Andrea Bondavalli
9aaa5172ee Set of changes to support new ALSA RAVENNA/AES67 device driver version 1.1.93
- removed changes to driver/MTAL_LKernelAPI.c in ravenna-alsa-lkm-kernel-v5.patch
- added patch ravenna-alsa-lkm-disable-ptp-checksum.patch to the driver to the disable UDP checksum verification for the incoming PTP packets
- changed build.sh script to use new driver revision and apply the new patch
- added handling of the sink status flag "all_muted" in daemon, WebUI and regression tests
- updated documentation
2020-06-06 20:43:44 +02:00
Andrea Bondavalli
48718c8dc2 Renamed patch to add support for AM824 to AES67 ALSA driver 2020-04-24 09:04:32 -07:00
Andrea Bondavalli
1d2ea0875c Added support for AM824 codec for testing
- added patch to ravenna-alsa-lkm module to support AM824 codec and associated conversion functions
- added support for AM824 codec to daemon and in WebUI
- modifed demo to test 8 channels of AM824 with 6 samples per packet @ 48Khz (125us x packet)
2020-04-10 13:04:44 -07:00
Andrea Bondavalli
c62ccdb808 Added fix to ALSA RAVENNA/AES67 module to solve compilation error "undefined named operand ‘new’" using kernel headers 5.4.19-rt11.
Since this fix seems to work on all the kernels I tested so fax (> 4.14.x) I add it to the generic fixes patch file (ravenna-alsa-lkm-fixes.patch).
2020-02-29 10:41:31 +01:00
Andrea Bondavalli
fa7b64038e Additional fix to the ravenna-alsa-lkm-arm-32bit.patch 2020-02-06 10:23:40 -08:00
Andrea Bondavalli
5e223ddb53 Initial set of changes to to enable proper compilation ond operations on ARMv7 32bit platform.
- added patch to ALSA RAVENNA/AES67 Driver
- switched to CLANG compiler in order to compile the daemon succesfully
- disabled valgind memory check in daemon regression tests for ARM.
Demo and daemon regression test work properly.
Tests have been executed on the BeagleBone® Black board with ARM Cortex-A8 32-Bit and Ubuntu 18.04 distro
2020-02-05 13:52:01 -08:00
Andrea Bondavalli
259e99afbc First import 2020-01-28 20:16:30 +01:00