diff options
author | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2015-10-11 13:33:50 (GMT) |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2015-10-11 16:14:01 (GMT) |
commit | 2a7e1713cd652e7d2fdb54057fb6b2508cab15dc (patch) | |
tree | b75197f077feaef197fda7aeacd7e26785473baa /sound | |
parent | 6b9866c893fc6a51e74df65fd9d9f851a3c2872e (diff) | |
download | linux-2a7e1713cd652e7d2fdb54057fb6b2508cab15dc.tar.xz |
ALSA: firewire-lib: continue packet processing at detecting wrong CIP headers
In firewire-lib, isochronous packet streaming is stopped when detecting
wrong value for FMT field of CIP headers. Although this is appropriate
to IEC 61883-1 and 6, some BeBoB based devices with vendors' customization
use invalid value to FMT field of CIP headers in the beginning of
streaming.
$ journalctl
snd-bebob fw1.0: Detect unexpected protocol: 01000000 8000ffff
I got this log with M-Audio FireWire 1814. In this line, the value of FMT
field is 0x00, while it should be 0x10 in usual AMDTP.
Except for the beginning, these devices continue to transfer packets with
valid value for FMT field, except for the beginning. Therefore, in this
case, firewire-lib should continue to process packets. The former
implementation of firewire-lib performs it.
This commit loosens the handling of wrong value, to continue packet
processing in the case.
Fixes: 414ba022a528 ('ALSA: firewire-lib: add support arbitrary value for fmt/fdf fields in CIP header')
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/firewire/amdtp-stream.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sound/firewire/amdtp-stream.c b/sound/firewire/amdtp-stream.c index fa10b58..ed29026 100644 --- a/sound/firewire/amdtp-stream.c +++ b/sound/firewire/amdtp-stream.c @@ -468,10 +468,12 @@ static int handle_in_packet(struct amdtp_stream *s, /* Check valid protocol or not. */ fmt = (cip_header[1] & CIP_FMT_MASK) >> CIP_FMT_SHIFT; if (fmt != s->fmt) { - dev_err(&s->unit->device, - "Detect unexpected protocol: %08x %08x\n", - cip_header[0], cip_header[1]); - return -EIO; + dev_info_ratelimited(&s->unit->device, + "Detect unexpected protocol: %08x %08x\n", + cip_header[0], cip_header[1]); + *data_blocks = 0; + pcm_frames = 0; + goto end; } /* Calculate data blocks */ |