0001
0002 #ifndef SOUND_FIREWIRE_ISO_RESOURCES_H_INCLUDED
0003 #define SOUND_FIREWIRE_ISO_RESOURCES_H_INCLUDED
0004
0005 #include <linux/mutex.h>
0006 #include <linux/types.h>
0007
0008 struct fw_unit;
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018 struct fw_iso_resources {
0019 u64 channels_mask;
0020
0021 struct fw_unit *unit;
0022 struct mutex mutex;
0023 unsigned int channel;
0024 unsigned int bandwidth;
0025 unsigned int bandwidth_overhead;
0026 int generation;
0027 bool allocated;
0028 };
0029
0030 int fw_iso_resources_init(struct fw_iso_resources *r,
0031 struct fw_unit *unit);
0032 void fw_iso_resources_destroy(struct fw_iso_resources *r);
0033
0034 int fw_iso_resources_allocate(struct fw_iso_resources *r,
0035 unsigned int max_payload_bytes, int speed);
0036 int fw_iso_resources_update(struct fw_iso_resources *r);
0037 void fw_iso_resources_free(struct fw_iso_resources *r);
0038
0039 #endif