sound: Add sample rate as a parameter for square wave

At present this value is hard-coded in the function that generates a
square wave. Since sample rates vary between different hardware, it makes
more sense to have this as a parameter.

Update the function and its users.

Signed-off-by: Simon Glass <sjg@chromium.org>
diff --git a/include/sound.h b/include/sound.h
index 3269f23..77bfe6a 100644
--- a/include/sound.h
+++ b/include/sound.h
@@ -31,11 +31,13 @@
 /*
  * Generates square wave sound data for 1 second
  *
+ * @param sample_rate   Sample rate in Hz
  * @param data          data buffer pointer
  * @param size          size of the buffer
  * @param freq          frequency of the wave
  */
-void sound_create_square_wave(unsigned short *data, int size, uint32_t freq);
+void sound_create_square_wave(uint sample_rate, unsigned short *data, int size,
+			      uint freq);
 
 /*
  * Initialises audio sub system