Skip to content

Commit 600c801

Browse files
takaswietiwai
authored andcommitted
ALSA: firewire-lib: pass no syt information to data block processing layer
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> Signed-off-by: Takashi Iwai <tiwai@suse.de>
1 parent 3baf305 commit 600c801

7 files changed

Lines changed: 23 additions & 31 deletions

File tree

‎sound/firewire/amdtp-am824.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -336,8 +336,8 @@ static void read_midi_messages(struct amdtp_stream *s, __be32 *buffer,
336336
}
337337

338338
static unsigned int process_rx_data_blocks(struct amdtp_stream *s,
339-
__be32 *buffer, unsigned int data_blocks,
340-
unsigned int data_block_counter, unsigned int *syt)
339+
__be32 *buffer, unsigned int data_blocks,
340+
unsigned int data_block_counter)
341341
{
342342
struct amdtp_am824 *p = s->protocol;
343343
struct snd_pcm_substream *pcm = READ_ONCE(s->pcm);
@@ -358,8 +358,8 @@ static unsigned int process_rx_data_blocks(struct amdtp_stream *s,
358358
}
359359

360360
static unsigned int process_tx_data_blocks(struct amdtp_stream *s,
361-
__be32 *buffer, unsigned int data_blocks,
362-
unsigned int data_block_counter, unsigned int *syt)
361+
__be32 *buffer, unsigned int data_blocks,
362+
unsigned int data_block_counter)
363363
{
364364
struct amdtp_am824 *p = s->protocol;
365365
struct snd_pcm_substream *pcm = READ_ONCE(s->pcm);

‎sound/firewire/amdtp-stream.c‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -714,8 +714,7 @@ static void out_stream_callback(struct fw_iso_context *context, u32 tstamp,
714714
data_blocks = calculate_data_blocks(s, syt);
715715
buffer = s->buffer.packets[s->packet_index].buffer;
716716
dbc = s->data_block_counter;
717-
pcm_frames = s->process_data_blocks(s, buffer, data_blocks, dbc,
718-
&syt);
717+
pcm_frames = s->process_data_blocks(s, buffer, data_blocks, dbc);
719718

720719
if (s->flags & CIP_DBC_IS_END_EVENT)
721720
dbc = (dbc + data_blocks) & 0xff;
@@ -782,7 +781,7 @@ static void in_stream_callback(struct fw_iso_context *context, u32 tstamp,
782781
if (err >= 0) {
783782
buffer = s->buffer.packets[s->packet_index].buffer;
784783
pcm_frames = s->process_data_blocks(s, buffer,
785-
data_blocks, dbc, &syt);
784+
data_blocks, dbc);
786785

787786
if (!(s->flags & CIP_DBC_IS_END_EVENT))
788787
dbc = (dbc + data_blocks) & 0xff;

‎sound/firewire/amdtp-stream.h‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,7 @@ typedef unsigned int (*amdtp_stream_process_data_blocks_t)(
9999
struct amdtp_stream *s,
100100
__be32 *buffer,
101101
unsigned int data_blocks,
102-
unsigned int data_block_counter,
103-
unsigned int *syt);
102+
unsigned int data_block_counter);
104103
struct amdtp_stream {
105104
struct fw_unit *unit;
106105
enum cip_flags flags;

‎sound/firewire/digi00x/amdtp-dot.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -330,8 +330,8 @@ void amdtp_dot_midi_trigger(struct amdtp_stream *s, unsigned int port,
330330
}
331331

332332
static unsigned int process_tx_data_blocks(struct amdtp_stream *s,
333-
__be32 *buffer, unsigned int data_blocks,
334-
unsigned int data_block_counter, unsigned int *syt)
333+
__be32 *buffer, unsigned int data_blocks,
334+
unsigned int data_block_counter)
335335
{
336336
struct snd_pcm_substream *pcm;
337337
unsigned int pcm_frames;
@@ -350,8 +350,8 @@ static unsigned int process_tx_data_blocks(struct amdtp_stream *s,
350350
}
351351

352352
static unsigned int process_rx_data_blocks(struct amdtp_stream *s,
353-
__be32 *buffer, unsigned int data_blocks,
354-
unsigned int data_block_counter, unsigned int *syt)
353+
__be32 *buffer, unsigned int data_blocks,
354+
unsigned int data_block_counter)
355355
{
356356
struct snd_pcm_substream *pcm;
357357
unsigned int pcm_frames;

‎sound/firewire/fireface/amdtp-ff.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,8 @@ int amdtp_ff_add_pcm_hw_constraints(struct amdtp_stream *s,
103103
}
104104

105105
static unsigned int process_rx_data_blocks(struct amdtp_stream *s,
106-
__be32 *buffer, unsigned int data_blocks,
107-
unsigned int data_block_counter, unsigned int *syt)
106+
__be32 *buffer, unsigned int data_blocks,
107+
unsigned int data_block_counter)
108108
{
109109
struct snd_pcm_substream *pcm = READ_ONCE(s->pcm);
110110
unsigned int pcm_frames;
@@ -121,8 +121,8 @@ static unsigned int process_rx_data_blocks(struct amdtp_stream *s,
121121
}
122122

123123
static unsigned int process_tx_data_blocks(struct amdtp_stream *s,
124-
__be32 *buffer, unsigned int data_blocks,
125-
unsigned int data_block_counter, unsigned int *syt)
124+
__be32 *buffer, unsigned int data_blocks,
125+
unsigned int data_block_counter)
126126
{
127127
struct snd_pcm_substream *pcm = READ_ONCE(s->pcm);
128128
unsigned int pcm_frames;

‎sound/firewire/motu/amdtp-motu.c‎

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -299,8 +299,8 @@ static void __maybe_unused copy_message(u64 *frames, __be32 *buffer,
299299
}
300300

301301
static unsigned int process_tx_data_blocks(struct amdtp_stream *s,
302-
__be32 *buffer, unsigned int data_blocks,
303-
unsigned int data_block_counter, unsigned int *syt)
302+
__be32 *buffer, unsigned int data_blocks,
303+
unsigned int data_block_counter)
304304
{
305305
struct amdtp_motu *p = s->protocol;
306306
struct snd_pcm_substream *pcm;
@@ -361,15 +361,12 @@ static void write_sph(struct amdtp_stream *s, __be32 *buffer,
361361
}
362362

363363
static unsigned int process_rx_data_blocks(struct amdtp_stream *s,
364-
__be32 *buffer, unsigned int data_blocks,
365-
unsigned int data_block_counter, unsigned int *syt)
364+
__be32 *buffer, unsigned int data_blocks,
365+
unsigned int data_block_counter)
366366
{
367367
struct amdtp_motu *p = (struct amdtp_motu *)s->protocol;
368368
struct snd_pcm_substream *pcm;
369369

370-
/* Not used. */
371-
*syt = 0xffff;
372-
373370
/* TODO: how to interact control messages between userspace? */
374371

375372
if (p->midi_ports)

‎sound/firewire/tascam/amdtp-tascam.c‎

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,8 @@ static void read_status_messages(struct amdtp_stream *s,
166166
}
167167

168168
static unsigned int process_tx_data_blocks(struct amdtp_stream *s,
169-
__be32 *buffer, unsigned int data_blocks,
170-
unsigned int data_block_counter, unsigned int *syt)
169+
__be32 *buffer, unsigned int data_blocks,
170+
unsigned int data_block_counter)
171171
{
172172
struct snd_pcm_substream *pcm;
173173

@@ -181,14 +181,11 @@ static unsigned int process_tx_data_blocks(struct amdtp_stream *s,
181181
}
182182

183183
static unsigned int process_rx_data_blocks(struct amdtp_stream *s,
184-
__be32 *buffer, unsigned int data_blocks,
185-
unsigned int data_block_counter, unsigned int *syt)
184+
__be32 *buffer, unsigned int data_blocks,
185+
unsigned int data_block_counter)
186186
{
187187
struct snd_pcm_substream *pcm;
188188

189-
/* This field is not used. */
190-
*syt = 0x0000;
191-
192189
pcm = READ_ONCE(s->pcm);
193190
if (pcm)
194191
write_pcm_s32(s, pcm, buffer, data_blocks);

0 commit comments

Comments
 (0)