Quantization of general linear electrodynamics