summaryrefslogtreecommitdiffstats
path: root/src/readwrite.c
diff options
context:
space:
mode:
authorGravatar Jonathan Woithe 2014-06-10 23:10:57 +0930
committerGravatar Stefan Richter 2015-04-28 22:16:16 +0200
commitc756fb8321c9b81d6887ad2d5667ba8d57fb1296 (patch)
treec0627e58be8db3be27f9ee6767fd72857e5eb12b /src/readwrite.c
parentFix memory leak in response handler (diff)
Prevent requests for previously provided iso tx packets
This bugfix grew out of an extended investigation into a problem encountered by a small number of people running FFADO. FFADO would report that the tx iso cycle number supplied to the iso tx callback seemingly went backwards - something which should not ordinarily occur. The bug seemed to be sensitive to timing and in some cases would disappear when debug traces were inserted into either FFADO or libraw1394. In essence, libraw1394 was requesting tx data for cycles which had already been requested. Initial discussions can be found in the thread "Problem with RME FF800. Can not start jackd" on the ffado-user mailing list. A followup investigation is tracked in FFADO ticket number 379 (http://subversion.ffado.org/ticket/379) and referenced in the thread "Revisiting backward cycle number sequence (ticket 379)" on ffado-devel. The latter mailing list thread includes a lengthy explanation of what I think is happening. To summarise, the root of the problem seems to be that on certain machines under certain conditions, something causes the kernel to post an iso tx event at a time when fewer than irq_interval packets have been transmitted. Unfortunately it has not been possible to determine the underlying cause of this. Whatever the cause, tests carried out with the reporter of ticket 379 have shown that it is occurring. As a result, the adjustment to libraw1394's packet_count must be done with reference to the number of packets reported as transmitted by the kernel instead of simply assuming that irq_interval packets have been sent. A patch implementing this fix is at the end of this post. This fixes the problem when the newer ABI is in use, which provides tx packet timestamps (and thus an indication of the number of packets actually transmitted) to userspace. It does not address the problem when the older ABI is used, but given the nature of the problem I don't think it's possible to fix it without access to the timestamps (or at least without some way to determine the number of packets really transmitted). Testing by "juanramon" (see ticket 379) has demonstrated that it fixes the "backward cycle number" problem on his machine. Thanks to Andreas Hehn and "juanramon" for their invaluable help in tracking this down. Signed-off-by: Jonathan Woithe <jwoithe@just42.net> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'src/readwrite.c')
0 files changed, 0 insertions, 0 deletions
s'>-2/+4 2021-07-26dtd always first argumentGravatar John Cowan 1-9/+9 2021-07-26DTO to DTDGravatar John Cowan 1-55/+52 2021-07-26typoGravatar John Cowan 1-1/+1 2021-07-26switching to explicit dtosGravatar John Cowan 1-88/+102 2021-07-26errorsGravatar John Cowan 1-1/+4 2021-07-26more MN-W reviewGravatar John Cowan 1-5/+5 2021-07-26update preview linkGravatar John Cowan 1-1/+1 2021-07-26MN-W reviewGravatar John Cowan 1-6/+6 2021-07-26paired mutatorsGravatar John Cowan 1-43/+68 2021-07-25exceptionsGravatar John Cowan 1-1/+15 2021-07-25new exampleGravatar John Cowan 1-1/+4 2021-07-25updatesGravatar John Cowan 1-2/+4 2021-07-24dtd always first argumentGravatar John Cowan 1-9/+9 2021-07-23DTO to DTDGravatar John Cowan 1-55/+52 2021-07-22typoGravatar John Cowan 1-1/+1 2021-07-22switching to explicit dtosGravatar John Cowan 1-88/+102 2021-07-22errorsGravatar John Cowan 1-1/+4 2021-07-22more MN-W reviewGravatar John Cowan 1-5/+5 2021-07-20update preview linkGravatar John Cowan 1-1/+1 2021-07-20MN-W reviewGravatar John Cowan 1-6/+6 2021-07-18Fix typo.Gravatar Arthur A. Gleckler 2-4/+4 2021-07-18Add <p> around abstract.Gravatar Arthur A. Gleckler 1-2/+2 2021-07-18Publish first draft.draft-1Gravatar Arthur A. Gleckler 3-0/+114 2021-07-18Ignore trailing whitespace.Gravatar Arthur A. Gleckler 11-129/+129 2021-07-18Ignore "Dictionaries.log".Gravatar Arthur A. Gleckler 1-1/+2 2021-07-18Fix errors reported by W3C HTML Validator.Gravatar Arthur A. Gleckler 1-27/+27 2021-07-18Eliminate unnecessary redirect by using TLS/SSL.Gravatar Arthur A. Gleckler 1-1/+1