Measurement of the masses and widths of L = 1 charm mesons