__be32 *buffer)
{
u32 cip_header[2];
- unsigned int data_blocks, data_block_quadlets, data_block_counter;
+ unsigned int data_blocks, data_block_quadlets, data_block_counter,
+ dbc_interval;
struct snd_pcm_substream *pcm = NULL;
bool lost;
/* Check data block counter continuity */
data_block_counter = cip_header[0] & AMDTP_DBC_MASK;
- if (!(s->flags & CIP_DBC_IS_END_EVENT))
+ if (!(s->flags & CIP_DBC_IS_END_EVENT)) {
lost = data_block_counter != s->data_block_counter;
- else
+ } else {
+ if ((data_blocks > 0) && (s->tx_dbc_interval > 0))
+ dbc_interval = s->tx_dbc_interval;
+ else
+ dbc_interval = data_blocks;
+
lost = data_block_counter !=
- ((s->data_block_counter + data_blocks) & 0xff);
+ ((s->data_block_counter + dbc_interval) & 0xff);
+ }
if (lost) {
dev_info(&s->unit->device,
struct snd_rawmidi_substream *midi[AMDTP_MAX_CHANNELS_FOR_MIDI * 8];
+ /* quirk: fixed interval of dbc between previos/current packets. */
+ unsigned int tx_dbc_interval;
+
bool callbacked;
wait_queue_head_t callback_wait;
struct amdtp_stream *sync_slave;
(hwinfo->arm_version >> 16) & 0xff);
if (err < 0)
goto end;
+ efw->firmware_version = hwinfo->arm_version;
strcpy(efw->card->driver, "Fireworks");
strcpy(efw->card->shortname, hwinfo->model_name);
/* AudioFire9 always reports wrong dbs. */
if (efw->is_af9)
efw->tx_stream.flags |= CIP_WRONG_DBS;
+ /* Firmware version 5.5 reports fixed interval for dbc. */
+ if (efw->firmware_version == 0x5050000)
+ efw->tx_stream.tx_dbc_interval = 8;
err = init_stream(efw, &efw->rx_stream);
if (err < 0) {