@@ -336,8 +336,8 @@ static void read_midi_messages(struct amdtp_stream *s, __be32 *buffer,
}
static unsigned int process_rx_data_blocks(struct amdtp_stream *s,
- __be32 *buffer, unsigned int data_blocks,
- unsigned int data_block_counter, unsigned int *syt)
+ __be32 *buffer, unsigned int data_blocks,
+ unsigned int data_block_counter)
{
struct amdtp_am824 *p = s->protocol;
struct snd_pcm_substream *pcm = READ_ONCE(s->pcm);
@@ -358,8 +358,8 @@ static unsigned int process_rx_data_blocks(struct amdtp_stream *s,
}
static unsigned int process_tx_data_blocks(struct amdtp_stream *s,
- __be32 *buffer, unsigned int data_blocks,
- unsigned int data_block_counter, unsigned int *syt)
+ __be32 *buffer, unsigned int data_blocks,
+ unsigned int data_block_counter)
{
struct amdtp_am824 *p = s->protocol;
struct snd_pcm_substream *pcm = READ_ONCE(s->pcm);
@@ -714,8 +714,7 @@ static void out_stream_callback(struct fw_iso_context *context, u32 tstamp,
data_blocks = calculate_data_blocks(s, syt);
buffer = s->buffer.packets[s->packet_index].buffer;
dbc = s->data_block_counter;
- pcm_frames = s->process_data_blocks(s, buffer, data_blocks, dbc,
- &syt);
+ pcm_frames = s->process_data_blocks(s, buffer, data_blocks, dbc);
if (s->flags & CIP_DBC_IS_END_EVENT)
dbc = (dbc + data_blocks) & 0xff;
@@ -782,7 +781,7 @@ static void in_stream_callback(struct fw_iso_context *context, u32 tstamp,
if (err >= 0) {
buffer = s->buffer.packets[s->packet_index].buffer;
pcm_frames = s->process_data_blocks(s, buffer,
- data_blocks, dbc, &syt);
+ data_blocks, dbc);
if (!(s->flags & CIP_DBC_IS_END_EVENT))
dbc = (dbc + data_blocks) & 0xff;
@@ -99,8 +99,7 @@ typedef unsigned int (*amdtp_stream_process_data_blocks_t)(
struct amdtp_stream *s,
__be32 *buffer,
unsigned int data_blocks,
- unsigned int data_block_counter,
- unsigned int *syt);
+ unsigned int data_block_counter);
struct amdtp_stream {
struct fw_unit *unit;
enum cip_flags flags;
@@ -330,8 +330,8 @@ void amdtp_dot_midi_trigger(struct amdtp_stream *s, unsigned int port,
}
static unsigned int process_tx_data_blocks(struct amdtp_stream *s,
- __be32 *buffer, unsigned int data_blocks,
- unsigned int data_block_counter, unsigned int *syt)
+ __be32 *buffer, unsigned int data_blocks,
+ unsigned int data_block_counter)
{
struct snd_pcm_substream *pcm;
unsigned int pcm_frames;
@@ -350,8 +350,8 @@ static unsigned int process_tx_data_blocks(struct amdtp_stream *s,
}
static unsigned int process_rx_data_blocks(struct amdtp_stream *s,
- __be32 *buffer, unsigned int data_blocks,
- unsigned int data_block_counter, unsigned int *syt)
+ __be32 *buffer, unsigned int data_blocks,
+ unsigned int data_block_counter)
{
struct snd_pcm_substream *pcm;
unsigned int pcm_frames;
@@ -103,8 +103,8 @@ int amdtp_ff_add_pcm_hw_constraints(struct amdtp_stream *s,
}
static unsigned int process_rx_data_blocks(struct amdtp_stream *s,
- __be32 *buffer, unsigned int data_blocks,
- unsigned int data_block_counter, unsigned int *syt)
+ __be32 *buffer, unsigned int data_blocks,
+ unsigned int data_block_counter)
{
struct snd_pcm_substream *pcm = READ_ONCE(s->pcm);
unsigned int pcm_frames;
@@ -121,8 +121,8 @@ static unsigned int process_rx_data_blocks(struct amdtp_stream *s,
}
static unsigned int process_tx_data_blocks(struct amdtp_stream *s,
- __be32 *buffer, unsigned int data_blocks,
- unsigned int data_block_counter, unsigned int *syt)
+ __be32 *buffer, unsigned int data_blocks,
+ unsigned int data_block_counter)
{
struct snd_pcm_substream *pcm = READ_ONCE(s->pcm);
unsigned int pcm_frames;
@@ -299,8 +299,8 @@ static void __maybe_unused copy_message(u64 *frames, __be32 *buffer,
}
static unsigned int process_tx_data_blocks(struct amdtp_stream *s,
- __be32 *buffer, unsigned int data_blocks,
- unsigned int data_block_counter, unsigned int *syt)
+ __be32 *buffer, unsigned int data_blocks,
+ unsigned int data_block_counter)
{
struct amdtp_motu *p = s->protocol;
struct snd_pcm_substream *pcm;
@@ -361,15 +361,12 @@ static void write_sph(struct amdtp_stream *s, __be32 *buffer,
}
static unsigned int process_rx_data_blocks(struct amdtp_stream *s,
- __be32 *buffer, unsigned int data_blocks,
- unsigned int data_block_counter, unsigned int *syt)
+ __be32 *buffer, unsigned int data_blocks,
+ unsigned int data_block_counter)
{
struct amdtp_motu *p = (struct amdtp_motu *)s->protocol;
struct snd_pcm_substream *pcm;
- /* Not used. */
- *syt = 0xffff;
-
/* TODO: how to interact control messages between userspace? */
if (p->midi_ports)
@@ -166,8 +166,8 @@ static void read_status_messages(struct amdtp_stream *s,
}
static unsigned int process_tx_data_blocks(struct amdtp_stream *s,
- __be32 *buffer, unsigned int data_blocks,
- unsigned int data_block_counter, unsigned int *syt)
+ __be32 *buffer, unsigned int data_blocks,
+ unsigned int data_block_counter)
{
struct snd_pcm_substream *pcm;
@@ -181,14 +181,11 @@ static unsigned int process_tx_data_blocks(struct amdtp_stream *s,
}
static unsigned int process_rx_data_blocks(struct amdtp_stream *s,
- __be32 *buffer, unsigned int data_blocks,
- unsigned int data_block_counter, unsigned int *syt)
+ __be32 *buffer, unsigned int data_blocks,
+ unsigned int data_block_counter)
{
struct snd_pcm_substream *pcm;
- /* This field is not used. */
- *syt = 0x0000;
-
pcm = READ_ONCE(s->pcm);
if (pcm)
write_pcm_s32(s, pcm, buffer, data_blocks);
In a previous commit, the variable passed from packet streaming layer for syt variable is useless. This commit obsoletes it. In my future work, the syt information is passed to data block processing layer by another way. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> --- sound/firewire/amdtp-am824.c | 8 ++++---- sound/firewire/amdtp-stream.c | 5 ++--- sound/firewire/amdtp-stream.h | 3 +-- sound/firewire/digi00x/amdtp-dot.c | 8 ++++---- sound/firewire/fireface/amdtp-ff.c | 8 ++++---- sound/firewire/motu/amdtp-motu.c | 11 ++++------- sound/firewire/tascam/amdtp-tascam.c | 11 ++++------- 7 files changed, 23 insertions(+), 31 deletions(-)