aes67_l2tap_rx.h 1005 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. /*
  2. * SPDX-FileCopyrightText: 2026 DatanoiseTV
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. */
  6. /*
  7. * L2 TAP based RTP receiver for AES67.
  8. *
  9. * Bypasses the lwIP stack entirely by reading raw Ethernet frames via
  10. * the ESP-IDF L2 TAP virtual filesystem interface. Filters for IPv4/UDP
  11. * multicast RTP packets and writes decoded audio directly to I2S.
  12. */
  13. #pragma once
  14. #include <stdint.h>
  15. #include "driver/i2s_types.h"
  16. #ifdef __cplusplus
  17. extern "C" {
  18. #endif
  19. /**
  20. * Start the L2 TAP RTP receiver task.
  21. *
  22. * Opens /dev/net/tap on the ETH_0 interface, spawns a high-priority
  23. * task on core 0 that reads raw Ethernet frames, filters for multicast
  24. * RTP on the given port, converts L24 audio to int16 mono, and writes
  25. * directly to the I2S TX channel with DMA pacing.
  26. *
  27. * @param tx_chan I2S TX channel handle for audio output
  28. * @param rtp_port UDP destination port to filter (typically 5004)
  29. */
  30. void aes67_l2tap_rx_start(i2s_chan_handle_t tx_chan, uint16_t rtp_port);
  31. #ifdef __cplusplus
  32. }
  33. #endif