packets-buffer.h 747 B

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