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