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
This commit is contained in:
parent
13c7078a88
commit
9aaa5172ee
19
3rdparty/patches/ravenna-alsa-lkm-disable-ptp-checksum.patch
vendored
Normal file
19
3rdparty/patches/ravenna-alsa-lkm-disable-ptp-checksum.patch
vendored
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
diff --git a/driver/PTP.c b/driver/PTP.c
|
||||||
|
--- a/driver/PTP.c
|
||||||
|
+++ b/driver/PTP.c
|
||||||
|
@@ -306,6 +306,7 @@ EDispatchResult process_PTP_packet(TClock_PTP* self, TUDPPacketBase* pUDPPacketB
|
||||||
|
}
|
||||||
|
|
||||||
|
// verify checksum
|
||||||
|
+#if 0
|
||||||
|
if (pUDPPacketBase->UDPHeader.usCheckSum != 0)
|
||||||
|
{
|
||||||
|
uint16_t ui16CheckSum = MTAL_ComputeUDPChecksum(&pPTPPacketBase->UDPHeader, MTAL_SWAP16(pUDPPacketBase->UDPHeader.usLen), (unsigned short*)&pPTPPacketBase->IPV4Header.ui32SrcIP, (unsigned short*)&pPTPPacketBase->IPV4Header.ui32DestIP);
|
||||||
|
@@ -319,6 +320,7 @@ EDispatchResult process_PTP_packet(TClock_PTP* self, TUDPPacketBase* pUDPPacketB
|
||||||
|
return DR_PACKET_ERROR;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
//DumpPTPV2MsgHeader(&pPTPPacketBase->V2MsgHeader);
|
||||||
|
|
@ -1,28 +1,3 @@
|
|||||||
diff --git a/driver/MTAL_LKernelAPI.c b/driver/MTAL_LKernelAPI.c
|
|
||||||
index 164f315..a993b41 100644
|
|
||||||
--- a/driver/MTAL_LKernelAPI.c
|
|
||||||
+++ b/driver/MTAL_LKernelAPI.c
|
|
||||||
@@ -35,7 +35,7 @@
|
|
||||||
#include <linux/spinlock.h>
|
|
||||||
#include <linux/version.h>
|
|
||||||
|
|
||||||
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0)
|
|
||||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0) || LINUX_VERSION_CODE >= KERNEL_VERSION(5,0,0)
|
|
||||||
#include <linux/timekeeping.h>
|
|
||||||
#else
|
|
||||||
#include <linux/time.h>
|
|
||||||
@@ -214,7 +214,10 @@ uint64_t MTAL_LK_GetCounterFreq(void)
|
|
||||||
uint64_t MTAL_LK_GetSystemTime(void)
|
|
||||||
{
|
|
||||||
uint64_t timeVal = 0ull;
|
|
||||||
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0)
|
|
||||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,0,0)
|
|
||||||
+ struct timespec64 ts64;
|
|
||||||
+ ktime_get_real_ts64(&ts64);
|
|
||||||
+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0)
|
|
||||||
struct timespec64 ts64;
|
|
||||||
getnstimeofday64(&ts64);
|
|
||||||
#else
|
|
||||||
diff --git a/driver/module_timer.c b/driver/module_timer.c
|
diff --git a/driver/module_timer.c b/driver/module_timer.c
|
||||||
index 5f64a8e..0ba770f 100644
|
index 5f64a8e..0ba770f 100644
|
||||||
--- a/driver/module_timer.c
|
--- a/driver/module_timer.c
|
||||||
|
3
build.sh
3
build.sh
@ -11,7 +11,7 @@ cd 3rdparty
|
|||||||
if [ ! -d ravenna-alsa-lkm.git ]; then
|
if [ ! -d ravenna-alsa-lkm.git ]; then
|
||||||
git clone https://bitbucket.org/MergingTechnologies/ravenna-alsa-lkm.git
|
git clone https://bitbucket.org/MergingTechnologies/ravenna-alsa-lkm.git
|
||||||
cd ravenna-alsa-lkm
|
cd ravenna-alsa-lkm
|
||||||
git checkout 5a06f0d33c18e532eb5dac3ad90c0acd59fbabd7
|
git checkout 35c708f3747474130790cf508c064360a9589ac8
|
||||||
cd driver
|
cd driver
|
||||||
echo "Apply patches to ravenna-alsa-lkm module ..."
|
echo "Apply patches to ravenna-alsa-lkm module ..."
|
||||||
git apply ../../patches/ravenna-alsa-lkm-kernel-v5.patch
|
git apply ../../patches/ravenna-alsa-lkm-kernel-v5.patch
|
||||||
@ -19,6 +19,7 @@ if [ ! -d ravenna-alsa-lkm.git ]; then
|
|||||||
git apply ../../patches/ravenna-alsa-lkm-fixes.patch
|
git apply ../../patches/ravenna-alsa-lkm-fixes.patch
|
||||||
git apply ../../patches/ravenna-alsa-lkm-arm-32bit.patch
|
git apply ../../patches/ravenna-alsa-lkm-arm-32bit.patch
|
||||||
git apply ../../patches/ravenna-alsa-lkm-add-codec-am824.patch
|
git apply ../../patches/ravenna-alsa-lkm-add-codec-am824.patch
|
||||||
|
git apply ../../patches/ravenna-alsa-lkm-disable-ptp-checksum.patch
|
||||||
echo "Building ravenna-alsa-lkm kernel module ..."
|
echo "Building ravenna-alsa-lkm kernel module ..."
|
||||||
make
|
make
|
||||||
cd ../..
|
cd ../..
|
||||||
|
@ -425,6 +425,7 @@ Example:
|
|||||||
"rtp_sac_error": false,
|
"rtp_sac_error": false,
|
||||||
"receiving_rtp_packet": false,
|
"receiving_rtp_packet": false,
|
||||||
"some_muted": false,
|
"some_muted": false,
|
||||||
|
"all_muted": false,
|
||||||
"muted": true
|
"muted": true
|
||||||
},
|
},
|
||||||
"sink_min_time": 0
|
"sink_min_time": 0
|
||||||
@ -447,6 +448,8 @@ where:
|
|||||||
|
|
||||||
> - **some\_muted** JSON boolean (not used)
|
> - **some\_muted** JSON boolean (not used)
|
||||||
|
|
||||||
|
> - **all\_muted** JSON boolean (not used)
|
||||||
|
|
||||||
> - **muted** JSON boolean specifying whether the sink is currently muted.
|
> - **muted** JSON boolean specifying whether the sink is currently muted.
|
||||||
|
|
||||||
> **sink\_min\_time** JSON number specifying the minimum source RTP packet arrival time.
|
> **sink\_min\_time** JSON number specifying the minimum source RTP packet arrival time.
|
||||||
|
@ -158,6 +158,7 @@ std::string sink_status_to_json(const SinkStreamStatus& status) {
|
|||||||
<< ", \n \"rtp_sac_error\": " << status.is_rtp_sac_error
|
<< ", \n \"rtp_sac_error\": " << status.is_rtp_sac_error
|
||||||
<< ", \n \"receiving_rtp_packet\": " << status.is_receiving_rtp_packet
|
<< ", \n \"receiving_rtp_packet\": " << status.is_receiving_rtp_packet
|
||||||
<< ", \n \"some_muted\": " << status.is_some_muted
|
<< ", \n \"some_muted\": " << status.is_some_muted
|
||||||
|
<< ", \n \"all_muted\": " << status.is_all_muted
|
||||||
<< ", \n \"muted\": " << status.is_muted << "\n },"
|
<< ", \n \"muted\": " << status.is_muted << "\n },"
|
||||||
<< "\n \"sink_min_time\": " << status.min_time << "\n}\n";
|
<< "\n \"sink_min_time\": " << status.min_time << "\n}\n";
|
||||||
return ss.str();
|
return ss.str();
|
||||||
|
@ -830,6 +830,7 @@ std::error_code SessionManager::get_sink_status(
|
|||||||
sink_status.is_receiving_rtp_packet = status.u.flags & 0x10;
|
sink_status.is_receiving_rtp_packet = status.u.flags & 0x10;
|
||||||
sink_status.is_muted = status.u.flags & 0x20;
|
sink_status.is_muted = status.u.flags & 0x20;
|
||||||
sink_status.is_some_muted = status.u.flags & 0x40;
|
sink_status.is_some_muted = status.u.flags & 0x40;
|
||||||
|
sink_status.is_all_muted = status.u.flags & 0x80;
|
||||||
sink_status.min_time = status.sink_min_time;
|
sink_status.min_time = status.sink_min_time;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -65,6 +65,7 @@ struct SinkStreamStatus {
|
|||||||
bool is_receiving_rtp_packet{false};
|
bool is_receiving_rtp_packet{false};
|
||||||
bool is_muted{false};
|
bool is_muted{false};
|
||||||
bool is_some_muted{false};
|
bool is_some_muted{false};
|
||||||
|
bool is_all_muted{false};
|
||||||
int min_time{0};
|
int min_time{0};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -594,8 +594,10 @@ BOOST_AUTO_TEST_CASE(sink_check_status) {
|
|||||||
boost::property_tree::read_json(ss, pt);
|
boost::property_tree::read_json(ss, pt);
|
||||||
//auto is_sink_muted = pt.get<bool>("sink_flags.muted");
|
//auto is_sink_muted = pt.get<bool>("sink_flags.muted");
|
||||||
auto is_sink_some_muted = pt.get<bool>("sink_flags.some_muted");
|
auto is_sink_some_muted = pt.get<bool>("sink_flags.some_muted");
|
||||||
//BOOST_REQUIRE_MESSAGE(is_sink_muted, "sink is not receiving packets");
|
auto is_sink_all_muted = pt.get<bool>("sink_flags.all_muted");
|
||||||
BOOST_REQUIRE_MESSAGE(!is_sink_some_muted, "sink is not receiving packets");
|
//BOOST_REQUIRE_MESSAGE(is_sink_muted, "sink is muted");
|
||||||
|
BOOST_REQUIRE_MESSAGE(!is_sink_all_muted, "all sinks are mutes");
|
||||||
|
BOOST_REQUIRE_MESSAGE(!is_sink_some_muted, "some sinks are muted");
|
||||||
BOOST_REQUIRE_MESSAGE(cli.remove_sink(0), "removed sink 0");
|
BOOST_REQUIRE_MESSAGE(cli.remove_sink(0), "removed sink 0");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -72,6 +72,8 @@ class SinkEntry extends Component {
|
|||||||
flags += 'receiving';
|
flags += 'receiving';
|
||||||
if (status.sink_flags._some_muted)
|
if (status.sink_flags._some_muted)
|
||||||
flags += (flags ? ',' : '') + 'some muted';
|
flags += (flags ? ',' : '') + 'some muted';
|
||||||
|
if (status.sink_flags._all_muted)
|
||||||
|
flags += (flags ? ',' : '') + 'all muted';
|
||||||
if (status.sink_flags._muted)
|
if (status.sink_flags._muted)
|
||||||
flags += (flags ? ',' : '') + 'muted';
|
flags += (flags ? ',' : '') + 'muted';
|
||||||
this.setState({
|
this.setState({
|
||||||
|
Loading…
x
Reference in New Issue
Block a user