packets-buffer.h 786 B

12345678910111213141516171819202122232425262728
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef SOUND_FIREWIRE_PACKETS_BUFFER_H_INCLUDED
  3. #define SOUND_FIREWIRE_PACKETS_BUFFER_H_INCLUDED
  4. #include <linux/dma-mapping.h>
  5. #include <linux/firewire.h>
  6. /**
  7. * struct iso_packets_buffer - manages a buffer for many packets
  8. * @iso_buffer: the memory containing the packets
  9. * @packets: an array, with each element pointing to one packet
  10. */
  11. struct iso_packets_buffer {
  12. struct fw_iso_buffer iso_buffer;
  13. struct {
  14. void *buffer;
  15. unsigned int offset;
  16. } *packets;
  17. };
  18. int iso_packets_buffer_init(struct iso_packets_buffer *b, struct fw_unit *unit,
  19. unsigned int count, unsigned int packet_size,
  20. enum dma_data_direction direction);
  21. void iso_packets_buffer_destroy(struct iso_packets_buffer *b,
  22. struct fw_unit *unit);
  23. #endif