From mboxrd@z Thu Jan 1 00:00:00 1970 From: sjg at google.com Date: Fri, 14 Dec 2018 07:38:53 -0800 Subject: [U-Boot] [PATCH v2 07/22] dm: sound: Create a uclass for sound In-Reply-To: <20181210173751.177266-8-sjg@chromium.org> References: <20181210173751.177266-8-sjg@chromium.org> <20181210173751.177266-1-sjg@chromium.org> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de The sound driver pulls together the audio codec and i2s drivers in order to actually make sounds. It supports setup() and play() methods. The sound_find_codec_i2s() function allows locating the linked codec and i2s devices. They can be referred to from uclass-private data. Add a uclass and a test for sound. Signed-off-by: Simon Glass --- Changes in v2: - Update 'init' command to print the error code arch/sandbox/dts/test.dts | 11 +++ arch/sandbox/include/asm/test.h | 20 +++++ cmd/sound.c | 23 +++++- drivers/sound/Makefile | 1 + drivers/sound/sandbox.c | 67 +++++++++++++++++ drivers/sound/sound-uclass.c | 127 ++++++++++++++++++++++++++++++++ include/dm/uclass-id.h | 1 + include/sound.h | 70 +++++++++++++++++- test/dm/Makefile | 1 + test/dm/sound.c | 34 +++++++++ 10 files changed, 351 insertions(+), 4 deletions(-) create mode 100644 drivers/sound/sound-uclass.c create mode 100644 test/dm/sound.c Applied to u-boot-dm/master