linux/sound/firewire/fireworks/fireworks_transaction.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * fireworks_transaction.c - a part of driver for Fireworks based devices
 *
 * Copyright (c) 2013-2014 Takashi Sakamoto
 */

/*
 * Fireworks have its own transaction. The transaction can be delivered by AV/C
 * Vendor Specific command frame or usual asynchronous transaction. At least,
 * Windows driver and firmware version 5.5 or later don't use AV/C command.
 *
 * Transaction substance:
 *  At first, 6 data exist. Following to the data, parameters for each command
 *  exist. All of the parameters are 32 bit aligned to big endian.
 *   data[0]:	Length of transaction substance
 *   data[1]:	Transaction version
 *   data[2]:	Sequence number. This is incremented by the device
 *   data[3]:	Transaction category
 *   data[4]:	Transaction command
 *   data[5]:	Return value in response.
 *   data[6-]:	Parameters
 *
 * Transaction address:
 *  command:	0xecc000000000
 *  response:	0xecc080000000 (default)
 *
 * I note that the address for response can be changed by command. But this
 * module uses the default address.
 */
#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)
{}