I would say the four men in the CDV's were all in the cavalry. The first three images were taken in PA. The last D.C. I suspect the first man is an ordnance sergeant of Cavalry, although it could be infantry. He is wearing a state coat or shell jacket with the collar down to show his tie. The kepi/forage cap gives few clues. The officer I cannot tell you much, he appears cavalry, given the light color of the shoulder boards. They are not dark. He is wearing gauntlets, and you cannot see his sword clearly. he is wearing a frock coat and carrying a forage cap.
The third many is wearing a sack coat, with it's collar down. He is wearing a waist belt with a sword belt plate. Light chevrons, suggesting cavalry. The last man's image was taken at Geisboro (The Cavalry Depot in D.C.) I think he is wearing state coat of some sort. It is somewhat I'ded on the back. They images are all CDV's, late war. All Cavalry from the general appearances. I just don't know the differences in state coats.