Background: Digital speckle pattern interferometry (DSPI) is a competitive optical tool for full-field deformation measurement. The two main types of DSPI, phase-shifting DSPI (PS-DSPI) and spatial-carrier DSPI (SC-DSPI), are distinguished by their unique optical setups and methods of phase determination. Each DSPI type has its limited ability in practical applications. Results: We designed a universal optical setup that is suitable for both PS-DSPI and SC-DSPI, with the aim of integrating their respective advantages, including PS-DSPI's precise measurement and SC-DSPI's synchronous measurement, improving DSPI's measuring capacity in engineering. Conclusion: The proposed setup also has several other advantages, including a simple and robust structure, easy adjustment and operation, and versatility of measuring approach.