sound: Move Samsung-specific code into its own file
The i2s code is in fact Samsung-specific, but there might be other implementation. Move this code into its own file. This makes it slightly more obviously how to adjust the code to support another SoC, when someone takes this task on. Also drop non-FDT support, since it isn't used on Exynos 5. Tested-by: Che-Liang Chiou <clchiou@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
@@ -51,6 +51,7 @@
|
||||
#define CONFIG_CMD_SOUND
|
||||
#ifdef CONFIG_CMD_SOUND
|
||||
#define CONFIG_SOUND
|
||||
#define CONFIG_I2S_SAMSUNG
|
||||
#define CONFIG_I2S
|
||||
#define CONFIG_SOUND_MAX98095
|
||||
#define CONFIG_SOUND_WM8994
|
||||
|
||||
@@ -29,6 +29,15 @@ struct sound_codec_info {
|
||||
enum en_sound_codec codec_type;
|
||||
};
|
||||
|
||||
/*
|
||||
* Generates square wave sound data for 1 second
|
||||
*
|
||||
* @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);
|
||||
|
||||
/*
|
||||
* Initialises audio sub system
|
||||
* @param blob Pointer of device tree node or NULL if none.
|
||||
|
||||
Reference in New Issue
Block a user