The speed of sound depends on
Elasticity
Density
Temperature
All of these
The speed of sound depends on temperature,density and state of matter.
In solids speed of sound depends on elasticity and density.