#include "./fireworks.h"
#define MEMORY_SPACE_EFW_COMMAND …
#define MEMORY_SPACE_EFW_RESPONSE …
#define ERROR_RETRIES …
#define ERROR_DELAY_MS …
#define EFC_TIMEOUT_MS …
static DEFINE_SPINLOCK(instances_lock);
static struct snd_efw *instances[SNDRV_CARDS] = …;
static DEFINE_SPINLOCK(transaction_queues_lock);
static LIST_HEAD(transaction_queues);
enum transaction_queue_state { … };
struct transaction_queue { … };
int snd_efw_transaction_cmd(struct fw_unit *unit,
const void *cmd, unsigned int size)
{ … }
int snd_efw_transaction_run(struct fw_unit *unit,
const void *cmd, unsigned int cmd_size,
void *resp, unsigned int resp_size)
{ … }
static void
copy_resp_to_buf(struct snd_efw *efw, void *data, size_t length, int *rcode)
{ … }
static void
handle_resp_for_user(struct fw_card *card, int generation, int source,
void *data, size_t length, int *rcode)
{ … }
static void
handle_resp_for_kernel(struct fw_card *card, int generation, int source,
void *data, size_t length, int *rcode, u32 seqnum)
{ … }
static void
efw_response(struct fw_card *card, struct fw_request *request,
int tcode, int destination, int source,
int generation, unsigned long long offset,
void *data, size_t length, void *callback_data)
{ … }
void snd_efw_transaction_add_instance(struct snd_efw *efw)
{ … }
void snd_efw_transaction_remove_instance(struct snd_efw *efw)
{ … }
void snd_efw_transaction_bus_reset(struct fw_unit *unit)
{ … }
static struct fw_address_handler resp_register_handler = …;
int snd_efw_transaction_register(void)
{ … }
void snd_efw_transaction_unregister(void)
{ … }