// SPDX-License-Identifier: GPL-2.0-only /* * fireworks_command.c - a part of driver for Fireworks based devices * * Copyright (c) 2013-2014 Takashi Sakamoto
*/
#include"./fireworks.h"
/* * This driver uses transaction version 1 or later to use extended hardware * information. Then too old devices are not available. * * Each commands are not required to have continuous sequence numbers. This * number is just used to match command and response. * * This module support a part of commands. Please see FFADO if you want to see * whole commands. But there are some commands which FFADO don't implement. * * Fireworks also supports AV/C general commands and AV/C Stream Format * Information commands. But this module don't use them.
*/
/* * The address in host system for transaction response is changable when the * device supports. struct hwinfo.flags includes its flag. The default is * MEMORY_SPACE_EFW_RESPONSE.
*/ int snd_efw_command_set_resp_addr(struct snd_efw *efw,
u16 addr_high, u32 addr_low)
{
__be32 addr[2];
/* * This is for timestamp processing. In Windows mode, all 32bit fields of second * CIP header in AMDTP transmit packet is used for 'presentation timestamp'. In * 'no data' packet the value of this field is 0x90ffffff.
*/ int snd_efw_command_set_tx_mode(struct snd_efw *efw, enum snd_efw_transport_mode mode)
{
__be32 param = cpu_to_be32(mode); return efw_transaction(efw, EFC_CAT_TRANSPORT,
EFC_CMD_TRANSPORT_SET_TX_MODE,
¶m, sizeof(param), NULL, 0);
}
int snd_efw_command_get_hwinfo(struct snd_efw *efw, struct snd_efw_hwinfo *hwinfo)
{ int err;
int snd_efw_command_get_phys_meters(struct snd_efw *efw, struct snd_efw_phys_meters *meters, unsignedint len)
{
u32 *buf = (u32 *)meters; unsignedint i; int err;
err = efw_transaction(efw, EFC_CAT_HWINFO,
EFC_CMD_HWINFO_GET_POLLED,
NULL, 0, (__be32 *)meters, len); if (err >= 0) for (i = 0; i < len / sizeof(u32); i++)
be32_to_cpus(&buf[i]);
return err;
}
staticint
command_get_clock(struct snd_efw *efw, struct efc_clock *clock)
{ int err;
/* * With firmware version 5.8, just after changing clock state, these * parameters are not immediately retrieved by get command. In my * trial, there needs to be 100msec to get changed parameters.
*/
msleep(150);
end: return err;
}
int snd_efw_command_get_clock_source(struct snd_efw *efw, enum snd_efw_clock_source *source)
{ int err; struct efc_clock clock = {0};
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.