We investigate the impact of a bosonic degree of freedom on Yu-Shiba-Rusinov (YSR) states emerging from a magnetic impurity in a conventional superconductor. Starting from the Anderson impurity model, we predict that an additional p-wave conduction band channel opens up if a bosonic mode is coupled to the tunnelling between impurity and host, which implies an additional pair of odd-parity YSR states. The bosonic mode can be a vibrational mode or the electromagnetic field in a cavity. The exchange couplings in the two channels depend sensitively on the state of the bosonic mode (ground state, few quanta or classically driven Floquet state), which opens possibilities for phononics or photonics control of such systems, with a rich variety of ground and excited states.