diff options
author | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2021-05-18 22:00:40 +0900 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2021-05-18 18:10:28 +0200 |
commit | 6d60b7a3d3349e053e377814569acd2ca3393231 (patch) | |
tree | 8f1ba18d8e188bc8a6158c6fca0306083119675a | |
parent | 07a35edc59d1f461a02c83235d0fe63b4c313920 (diff) |
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: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20210518130048.146596-2-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r-- | sound/firewire/amdtp-stream.c | 3 | ||||
-rw-r--r-- | sound/firewire/amdtp-stream.h | 1 |
2 files changed, 1 insertions, 3 deletions
diff --git a/sound/firewire/amdtp-stream.c b/sound/firewire/amdtp-stream.c index 409274a532ed..ac37cd4c2b33 100644 --- a/sound/firewire/amdtp-stream.c +++ b/sound/firewire/amdtp-stream.c @@ -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; diff --git a/sound/firewire/amdtp-stream.h b/sound/firewire/amdtp-stream.h index 0628b6e52fc1..c69042013245 100644 --- a/sound/firewire/amdtp-stream.h +++ b/sound/firewire/amdtp-stream.h @@ -147,7 +147,6 @@ struct amdtp_stream { // To generate constant hardware IRQ. unsigned int event_count; - unsigned int events_per_period; } rx; } ctx_data; |