From: Jonathan Woithe <jwoithe@ju...> - 2012-06-02 12:55:29
Subversion revision 2161 (by Adrian) changed the DICE driver so as to permit
certain operations when streaming was enabled. To facilitate crash recovery
I have no issue with the second chunk, which permits the starting of a
stream even if the device reports that streaming is already active. The
first chunk is worthy of further comment though.
The sample rate of the interface can have a significant effect on the
streaming datastream on the DICE devices (as is the case for most others
too), so I guess the rationale here was to prevent the user having enough
rope to hang themselves. If streaming really was active and in use,
changing the device sample rate would almost certainly crash the streaming
system. Having the check prior to an attempt to set the sample rate makes
Having said that, I don't think such a check is made in
setSamplingFrequency() of any other device: they rely on sufficient
restrictions being in place within ffado-mixer to prevent direct attempts to
alter the sample rate. That's arguably not as robust (since someone could
always directly manipulate the dbus controls) but in practice it's probably
all that's needed. The flip-side is that if one is recovering from a crash
and the device still thinks that streaming is active, it's possible to reset
things and attempt a recovery.
The above comments are not intended as an argument for the reversal of chunk
1 of r2161. They are more an attempt at describing a possible rationale for
the code as it was originally structured. The approach taken in r2161
merely brings the DICE driver into line with most of the other FFADO
drivers. So long as there are no negative effects on the DICE hardware from
this change it seems to be the prudent approach - thanks Adrian for the
implementation and testing.
Get latest updates about Open Source Projects, Conferences and News.