I have recently made some updates to many drivers, among other things to minimize clicks and pops. And as it happens, I have just today released those updates in the last message of this thread:
Could you verify whether this driver still gives you the clicks?
Also, could you verify how your audio data is scaled? It should be (normal) signed 16-bit numbers. Minimum is 0x8000 = -32768, 0xFFFF = -1, 0x0000 = 0, 0x0001 = 1, and maximum is 0x7FFF = 32767.
If clicks continue, could you upload one (short) example of the audio snippets you are playing back? It can be in the same raw data format as it is in the file, I can handle it.
Just as a side comment: you should not need to manually switch the DAOSET_CF register. Just verify that the last stereo word you write to the driver contains zeros for both the left and right channel and there should be no clicks.
Discussion about writing software for VS1005 and the VSOS Operating System. Also posts about VS1005-related hardware design and device drivers should be posted here.