Linear response theory for dissipation in heavy-ion collisions