The printing quality delivered by a drop-on-demand (DoD) inkjet printhead is limited due to the residual oscillations in the ink channel. The maximal jetting frequency of a DoD inkjet printhead can be increased by quickly damping the residual oscillations and by bringing in this way the ink channel to rest after jetting the ink drop. This paper proposes an optimization-based method to design the input actuation waveform for the piezo actuator in order to improve the damping of the residual oscillations. A discrete-time transfer function derived from the narrow-gap model is used to predict the response of the ink channel under the application of the piezo input. Simulation and experimental results are presented to show the applicability of the proposed method.