1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * Copyright (C) 2012 Samsung Electronics
4 * R. Chandrasekar < rcsekar@samsung.com>
10 /* sound codec enum */
16 /* Codec information structure to store the info from device tree */
17 struct sound_codec_info {
23 * Generates square wave sound data for 1 second
25 * @param sample_rate Sample rate in Hz
26 * @param data data buffer pointer
27 * @param size size of the buffer
28 * @param freq frequency of the wave
30 void sound_create_square_wave(uint sample_rate, unsigned short *data, int size,
34 * Initialises audio sub system
35 * @param blob Pointer of device tree node or NULL if none.
36 * @return int value 0 for success, -1 for error
38 int sound_init(const void *blob);
41 * plays the pcm data buffer in pcm_data.h through i2s1 to make the
44 * @return int 0 for success, -1 for error
46 int sound_play(uint32_t msec, uint32_t frequency);
48 #endif /* __SOUND__H__ */