Commit b7c7699b authored by Takashi Sakamoto's avatar Takashi Sakamoto Committed by Takashi Iwai

ALSA: firewire-lib: obsolete callbacked member

The member of callbacked in AMDTP stream structure is not used anymore.
Instead, ready_processing member is used to wake up yielding task of user
process.
Signed-off-by: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20210524031346.50539-3-o-takashi@sakamocchi.jpSigned-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent fb25dcc8
...@@ -110,7 +110,6 @@ int amdtp_stream_init(struct amdtp_stream *s, struct fw_unit *unit, ...@@ -110,7 +110,6 @@ int amdtp_stream_init(struct amdtp_stream *s, struct fw_unit *unit,
s->packet_index = 0; s->packet_index = 0;
init_waitqueue_head(&s->ready_wait); init_waitqueue_head(&s->ready_wait);
s->callbacked = false;
s->fmt = fmt; s->fmt = fmt;
s->process_ctx_payloads = process_ctx_payloads; s->process_ctx_payloads = process_ctx_payloads;
...@@ -1365,7 +1364,8 @@ static void irq_target_callback_skip(struct fw_iso_context *context, u32 tstamp, ...@@ -1365,7 +1364,8 @@ static void irq_target_callback_skip(struct fw_iso_context *context, u32 tstamp,
d->processing_cycle.rx_start = cycle; d->processing_cycle.rx_start = cycle;
} }
// this is executed one time. // This is executed one time. For in-stream, first packet has come. For out-stream, prepared to
// transmit first packet.
static void amdtp_stream_first_callback(struct fw_iso_context *context, static void amdtp_stream_first_callback(struct fw_iso_context *context,
u32 tstamp, size_t header_length, u32 tstamp, size_t header_length,
void *header, void *private_data) void *header, void *private_data)
...@@ -1373,10 +1373,6 @@ static void amdtp_stream_first_callback(struct fw_iso_context *context, ...@@ -1373,10 +1373,6 @@ static void amdtp_stream_first_callback(struct fw_iso_context *context,
struct amdtp_stream *s = private_data; struct amdtp_stream *s = private_data;
struct amdtp_domain *d = s->domain; struct amdtp_domain *d = s->domain;
// For in-stream, first packet has come.
// For out-stream, prepared to transmit first packet
s->callbacked = true;
if (s->direction == AMDTP_IN_STREAM) { if (s->direction == AMDTP_IN_STREAM) {
context->callback.sc = drop_tx_packets_initially; context->callback.sc = drop_tx_packets_initially;
} else { } else {
...@@ -1536,7 +1532,6 @@ static int amdtp_stream_start(struct amdtp_stream *s, int channel, int speed, ...@@ -1536,7 +1532,6 @@ static int amdtp_stream_start(struct amdtp_stream *s, int channel, int speed,
if ((s->flags & CIP_EMPTY_WITH_TAG0) || (s->flags & CIP_NO_HEADER)) if ((s->flags & CIP_EMPTY_WITH_TAG0) || (s->flags & CIP_NO_HEADER))
tag |= FW_ISO_CONTEXT_MATCH_TAG0; tag |= FW_ISO_CONTEXT_MATCH_TAG0;
s->callbacked = false;
s->ready_processing = false; s->ready_processing = false;
err = fw_iso_context_start(s->context, -1, 0, tag); err = fw_iso_context_start(s->context, -1, 0, tag);
if (err < 0) if (err < 0)
......
...@@ -183,8 +183,7 @@ struct amdtp_stream { ...@@ -183,8 +183,7 @@ struct amdtp_stream {
// To start processing content of packets at the same cycle in several contexts for // To start processing content of packets at the same cycle in several contexts for
// each direction. // each direction.
bool callbacked:1; bool ready_processing;
bool ready_processing:1;
wait_queue_head_t ready_wait; wait_queue_head_t ready_wait;
unsigned int next_cycle; unsigned int next_cycle;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment