Closing the mixer device frees all the resources associated with the mixer handle and shuts down the connection to the sound mixer interface.
To close the mixer handle, simply call snd_mixer_close().