Commit 6d60b7a3 authored by Takashi Sakamoto's avatar Takashi Sakamoto Committed by Takashi Iwai

ALSA: firewire-lib: code refactoring to refer the same frame count per period in domain structure

The number of PCM frame per period is common between PCM substreams
handled in AMDTP stream in AMDTP domain.
Signed-off-by: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20210518130048.146596-2-o-takashi@sakamocchi.jpSigned-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 07a35edc
......@@ -834,7 +834,7 @@ static void out_stream_callback(struct fw_iso_context *context, u32 tstamp,
struct amdtp_stream *s = private_data;
const struct amdtp_domain *d = s->domain;
const __be32 *ctx_header = header;
unsigned int events_per_period = s->ctx_data.rx.events_per_period;
unsigned int events_per_period = d->events_per_period;
unsigned int event_count = s->ctx_data.rx.event_count;
unsigned int packets;
int i;
......@@ -1490,7 +1490,6 @@ int amdtp_domain_start(struct amdtp_domain *d, unsigned int ir_delay_cycle)
}
s = d->irq_target;
s->ctx_data.rx.events_per_period = events_per_period;
s->ctx_data.rx.event_count = 0;
s->ctx_data.rx.seq_index = 0;
......
......@@ -147,7 +147,6 @@ struct amdtp_stream {
// To generate constant hardware IRQ.
unsigned int event_count;
unsigned int events_per_period;
} rx;
} ctx_data;
......
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