return amdtp_stream_add_pcm_hw_constraints(s, runtime);
}
+static void read_status_messages(struct amdtp_stream *s,
+ __be32 *buffer, unsigned int data_blocks)
+{
+ struct snd_tscm *tscm = container_of(s, struct snd_tscm, tx_stream);
+ int i;
+
+ for (i = 0; i < data_blocks; i++) {
+ unsigned int index;
+
+ index = be32_to_cpu(buffer[0]) % SNDRV_FIREWIRE_TASCAM_STATE_COUNT;
+ tscm->state[index] = buffer[s->data_block_quadlets - 1];
+ buffer += s->data_block_quadlets;
+ }
+}
+
static unsigned int process_tx_data_blocks(struct amdtp_stream *s,
__be32 *buffer,
unsigned int data_blocks,
if (data_blocks > 0 && pcm)
read_pcm_s32(s, pcm, buffer, data_blocks);
- /* A place holder for control messages. */
+ read_status_messages(s, buffer, data_blocks);
return data_blocks;
}
/* For MIDI message outgoing transactions. */
struct snd_fw_async_midi_port out_ports[TSCM_MIDI_OUT_PORT_MAX];
+
+ // A cache of status information in tx isoc packets.
+ __be32 state[SNDRV_FIREWIRE_TASCAM_STATE_COUNT];
};
#define TSCM_ADDR_BASE 0xffff00000000ull