when shooting DNG images, if the DNG Crop Size is set to [ Full ] then you get purple images. Setting to [ Active ] or [ JPEG ] works properly.
CAM_ACTIVE_AREA_Y1 is odd (11) - despite the warning in camera.h that it must be even
When you choose full for the DNG crop, CAM_ACTIVE_AREA_Y1 is set to 0 in the image file.
So the Bayer decoding is starting on different rows in the Bayer matrix - odd vs. even.
This also means the cam_CFAPattern value is wrong.
If you take a Canon RAW image, you can use the Adobe dng_validate program (from the DNG SDK) to get the correct values for cam_CFAPattern, and active area. Use the -v option on dng_validate.
Might also be worth checking the COLOR_MATRIX values - the comments in platform_camera.h say the values are from the G15.