Camera: Some code from e975. Not working yet.

I'm sure there are some unnecessary changes.

Also include some debugging.