On Sun, 1 Nov 2009, Németh Márton wrote:
From: Márton Németh <nm127@xxxxxxxxxxx>
Remove struct sd dependency from pac_find_sof() function implementation.
This step prepares separation of pac7302 and pac7311 specific parts of
struct sd.
Signed-off-by: Márton Németh <nm127@xxxxxxxxxxx>
Cc: Thomas Kaiser <thomas@xxxxxxxxxxxxxxx>
Cc: Theodore Kilgore <kilgota@xxxxxxxxxx>
Cc: Kyle Guinn <elyk03@xxxxxxxxx>
<snip>
Szia Marton,
As long as these things work, I would not mind at all. But perhaps this is
a good occasion to bring up an issue which seems to me very much related.
It is the following:
Along with the (it seems to be never-ending) work on the mr97310a driver,
I have been working on a driver for the sn9c2028 cameras. The driver at
this point functions, and seems to function quite well. But it also seems
to me that the code needs quite a bit of polishing before it is
publicized. Since I have been very much preoccupied with finishing the
mr97310a driver (why does the last 5% of a job sometimes take the most
time?) this final polishing of the sn9c2028 driver has not yet occurred,
sorry to say.
But here is the point. The sn9c2028 cameras have a structure which seems
similar to the mr97310a cameras. They use a similar decompression
algorithm. They have a similar frame header. Specifically, the sn9c2028
frame header starts with the five bytes
0xff, 0xff, 0x00, 0xc4, 0xc4
whereas the pac_common frame header starts with the five bytes
0xff, 0xff, 0x00, 0xff, 0x96
Right now, for my own use, I have written a file sn9c2028.h which
essentially duplicates the functionality of pac_common.h and contains a
function which searches for the sn9c2028 SOF marker instead of searching
for the pac SOF marker. Is this necessarily the good, permanent solution?
I am not so sure about that.
Perhaps when making changes it is a good time to think over the idea of
combining things which are in fact not very much different. After all,
another set of cameras might come along, too, which essentially requires
yet another minor variation on the same basic algorithm. Then we are
supposed to have three .h files with three functions which have the same
code and just search for slightly different strings?
I am well aware that you started out to do something different, but how
does this strike you?
Theodore Kilgore