The accelerating field in superconducting cavities has to be stabilized in amplitude and phase by a radio-frequency (rf) control system. Because of their high loaded quality factor superconducting cavities are very susceptible for microphonics. To meet the increased requirements with respect to accuracy, availability, and diagnostics, the previous analog rf control system of the superconducting Darmstadt electron linear accelerator S-DALINAC has been replaced by a digital rf control system. The new hardware consists of two components: An rf module that converts the signal from the cavity down to the base-band and a field-programmable gate array board including a soft CPU that carries out the signal processing steps of the control algorithm. Different algorithms are used for normal-conducting and superconducting cavities. To improve the availability of the control system, techniques for automatic firmware and software deployment have been implemented. Extensive diagnostic features provide the operator with additional information. The architecture of the rf control system as well as the functionality of its components will be presented along with measurements that characterize the performance of the system, yielding, e.g., an amplitude stabilization down to $(\ensuremath{\Delta}A/A{)}_{\mathrm{rms}}=7\ifmmode\times\else\texttimes\fi{}{10}^{\ensuremath{-}5}$ and a phase stabilization of $(\ensuremath{\Delta}\ensuremath{\phi}{)}_{\mathrm{rms}}=0.8\ifmmode^\circ\else\textdegree\fi{}$ for superconducting cavities.