diff options
author | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2019-07-22 05:36:56 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2019-07-22 16:05:00 +0200 |
commit | 3baf30532f94030244a31a275b546d042656c535 (patch) | |
tree | a8b92f5cf7c20ca9e5a190e5a9f91b2a005ff072 /sound/firewire/amdtp-stream.c | |
parent | ALSA: firewire-lib: operate data block counter in top level of processing for... (diff) | |
download | linux-3baf30532f94030244a31a275b546d042656c535.tar.xz linux-3baf30532f94030244a31a275b546d042656c535.zip |
ALSA: firewire-lib: add syt_override member for some protocols
Some protocols don't use syt field of CIP header to represent
presentation timestamp. For such protocol, ALSA IEC 61883-1/6
packet streaming engine uses a pointer into local variable for
the value of syt to call data block processing layer. However,
it can decide the value when initializing packet streaming
layer.
This commit adds 'syt_override' member for packet streaming
layer.
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/firewire/amdtp-stream.c')
-rw-r--r-- | sound/firewire/amdtp-stream.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sound/firewire/amdtp-stream.c b/sound/firewire/amdtp-stream.c index 3435bef97a8b..6242240cd8ee 100644 --- a/sound/firewire/amdtp-stream.c +++ b/sound/firewire/amdtp-stream.c @@ -104,6 +104,9 @@ int amdtp_stream_init(struct amdtp_stream *s, struct fw_unit *unit, s->fmt = fmt; s->process_data_blocks = process_data_blocks; + if (dir == AMDTP_OUT_STREAM) + s->ctx_data.rx.syt_override = -1; + return 0; } EXPORT_SYMBOL(amdtp_stream_init); @@ -717,6 +720,9 @@ static void out_stream_callback(struct fw_iso_context *context, u32 tstamp, if (s->flags & CIP_DBC_IS_END_EVENT) dbc = (dbc + data_blocks) & 0xff; + if (s->ctx_data.rx.syt_override >= 0) + syt = s->ctx_data.rx.syt_override; + build_it_pkt_header(s, cycle, &template.params, data_blocks, dbc, syt, i); |