[Galaxy 3 Android Development] hillbeast:
The retardations at Samsungs programming department really does know no bounds. I'm looking at the camera code in mach-apollo.c seeing it doesn't look that hard to implement, and I've found this little gem:

URL so you can see for yourself

/*
* Guide for Camera Configuration for [B]SMDKC110[/B]
* ITU channel must be set as A or B
*
* NOTE1: if the S5K4EA is enabled, all other cameras must be disabled
* NOTE2: currently, only 1 MIPI camera must be enabled
* NOTE3: it is possible to use both one ITU cam and one MIPI cam except for S5K4EA case
*
*/
#define CAM_ITU_CH_A
[B]#define S5K4CA_ENABLED[/B]

/* External camera module setting */

[B]#ifdef S5K4CA_ENABLED[/B]
static struct s5k4ca_platform_data s5k4ca_plat = {
.default_width = 1024,
.default_height = 768,
[B]	.pixelformat = V4L2_PIX_FMT_UYVY, //NV21 support //rama[/B]
[B]// .pixelformat = V4L2_PIX_FMT_VYUY,[/B]
.freq = 24000000,
.is_mipi = 0,
};

Let's just go through this code. I've bolded what I'm talking about.

SMDKC110 - First, this is not an SMDKC110, this is Apollo, or Galaxy 3. Secondly, the SMDKC110 is a Samsung S5PC110 based development board, this is a Samsung S5P6442 based cellphone. Third, if you're going to just copy and paste your code from another device, you've already saved the trouble of rewriting it, at least take the time to take the old devices name out first. It's not hard to do a Find And Replace function in whatever terrible editor you use at Samsung HQ.

#define S5K4CA_ENABLED - You are defining hardware in the board/machine code. That's okay, but why is it that literally 4 lines below this definition, you are ifdeffing it. Basically, you are checking if it has stopped being defined literally 4 lines after you defined it, and one of those lines is a comment, and the other three are whitespace. :eek:

// .pixelformat = V4L2_PIX_FMT_VYUY, - The board is in production, now and the software is finalised. You don't need to leave commented lines in there anymore. Take the line out and save some space on your hard drive.

.pixelformat = V4L2_PIX_FMT_UYVY, //NV21 support //rama - And why have you got TWO comments at the end of this line! You don't need that second comment, and to be honest the first comment is irrelevant anyway.

mach-apollo.c is officially a candidate for the WORST code I have seen on any device, and I have worked with terrible Chinese tablets before. Their code is bad because it has loads of warnings when you compile it. This is just bad code for every reason you can name. It's untidy, it's inconsistent, it's buggy, and it's got stuff in there it just doesn't need. There are sets of code that have an #if 0 at the start (which comments out the code basically), which is fine, but it's annoying when you see it, but what really annoys me is they have #if 1. That annoys me for two reasons: 1: Because it's pointless. It's doing literally nothing. It tells the compiler to compile this code... (as if it wasn't going to in the first place?) and 2: because I may be reading the code backwards, I will look for where something is called, find where it's defined and see an #endif, so I want to find what it's checking, and then I see at the top #if 1. Well no kidding Samsung, if 1 = 1 I will be sure to do that. I can't remember when 1 did not equal 1.

/rant