In the first, constant-volume case (locked piston), there is no external motion, and thus no mechanical work is done on the atmosphere; C V is used. In the second case, additional work is done as the volume changes, so the amount of heat required to raise the gas temperature (the specific heat capacity) is higher for this constant-pressure case.