Concavity of the Lagrangian for quasi-periodic orbits