cmp.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #ifndef SOUND_FIREWIRE_CMP_H_INCLUDED
  2. #define SOUND_FIREWIRE_CMP_H_INCLUDED
  3. #include <linux/mutex.h>
  4. #include <linux/types.h>
  5. #include "iso-resources.h"
  6. struct fw_unit;
  7. /**
  8. * struct cmp_connection - manages an isochronous connection to a device
  9. * @speed: the connection's actual speed
  10. *
  11. * This structure manages (using CMP) an isochronous stream from the local
  12. * computer to a device's input plug (iPCR).
  13. *
  14. * There is no corresponding oPCR created on the local computer, so it is not
  15. * possible to overlay connections on top of this one.
  16. */
  17. struct cmp_connection {
  18. int speed;
  19. /* private: */
  20. bool connected;
  21. struct mutex mutex;
  22. struct fw_iso_resources resources;
  23. __be32 last_pcr_value;
  24. unsigned int pcr_index;
  25. unsigned int max_speed;
  26. };
  27. int cmp_connection_init(struct cmp_connection *connection,
  28. struct fw_unit *unit,
  29. unsigned int ipcr_index);
  30. void cmp_connection_destroy(struct cmp_connection *connection);
  31. int cmp_connection_establish(struct cmp_connection *connection,
  32. unsigned int max_payload);
  33. int cmp_connection_update(struct cmp_connection *connection);
  34. void cmp_connection_break(struct cmp_connection *connection);
  35. #endif