From: Simon Glass <sjg@chromium.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 00/22] dm: sound: Convert to driver model
Date: Mon, 10 Dec 2018 10:37:29 -0700 [thread overview]
Message-ID: <20181210173751.177266-1-sjg@chromium.org> (raw)
The sound subsystem has never been converted to driver model. It is is a
little bit complicated since it needs an audio codec, an i2s device and a
sound device to bring them together.
Sound is the main subsystem holding back removal of CONFIG_DM_I2C_COMPAT.
This series takes a stab at doing the conversion. This is tested on snow,
pit and pi. I do not have smdk5250/5420 or arndale to test with.
Changes in v2:
- Add fix for pit and pi also
- Fix up tabs in this commit instead of the later one
- Use Kconfig instead of defconfig to define DM_SOUND
- Update 'init' command to print the error code
- Correct conversion for pit
- Use void * for i2c and sound data
- Add new patch to move common code out of maxim98095
- Add new patch with support for max98090
- Correct conversion for pit and pi, updating commit message
- Add new patch to convert sandbox to use driver model
- Drop CONFIG_DM_SOUND from all defconfig files
- Fix up sandbox files to remove old code
- Update the rest of the samsung boards
- Remove unused sandbox code also
- Drop patches previously applied
- Add new patch to fix license headers
- Add new patch to tidy up error codes in max98095
- Add new patch to use the correct number of channels for sound
Simon Glass (22):
dm: sound: exynos: Correct codec bus addresses
dm: sound: Create an option to use driver model for sound
dm: sound: Rename samsung_i2s_priv to i2s_uc_priv
dm: sound: Create a uclass for audio codecs
dm: sound: Create a uclass for i2s
dm: sandbox: Update sound to use two buffers
dm: sound: Create a uclass for sound
dm: core: Add a function to read into a unsigned int
dm: sound: Start i2c IDs from 0
dm: sound: Add conversion to driver model
exynos: Add proid_is_exynos542x() for common 542x
exynos: Add support for exynos5420 i2s pinmux
dm: sound: Move common code out of maxim98095
dm: sound: exynos: Add support for max98090
dm: exynos: sound: Convert to use driver model
dm: sandbox: sound: Convert to use driver model
dm: exynos: Drop CONFIG_DM_I2C_COMPAT
dm: sound: Complete migration to driver model
dm: sound: Fix license headers
dm: sound: max98095: Tidy up error codes
dm: sandbox: Allow selection of sample rate and channels
dm: sound: Use the correct number of channels for sound
arch/Kconfig | 1 +
arch/arm/dts/exynos5250-smdk5250.dts | 21 +-
arch/arm/dts/exynos5250-snow.dts | 23 +-
arch/arm/dts/exynos5250-spring.dts | 24 +-
arch/arm/dts/exynos5250.dtsi | 15 +-
arch/arm/dts/exynos5420-peach-pit.dts | 24 +-
arch/arm/dts/exynos5420-smdk5420.dts | 21 +-
arch/arm/dts/exynos54xx.dtsi | 14 +
arch/arm/dts/exynos5800-peach-pi.dts | 24 +-
arch/arm/mach-exynos/clock.c | 31 +-
arch/arm/mach-exynos/clock_init_exynos5.c | 2 +-
arch/arm/mach-exynos/common_setup.h | 4 +-
arch/arm/mach-exynos/include/mach/clock.h | 3 +
arch/arm/mach-exynos/include/mach/cpu.h | 4 +-
arch/arm/mach-exynos/include/mach/gpio.h | 4 +-
arch/arm/mach-exynos/pinmux.c | 19 +-
arch/arm/mach-exynos/power.c | 2 +-
arch/sandbox/cpu/sdl.c | 123 ++--
arch/sandbox/dts/sandbox.dts | 21 +
arch/sandbox/dts/test.dts | 23 +
arch/sandbox/include/asm/sdl.h | 19 +-
arch/sandbox/include/asm/sound.h | 13 -
arch/sandbox/include/asm/test.h | 40 ++
cmd/sound.c | 15 +-
configs/peach-pi_defconfig | 3 +-
configs/peach-pit_defconfig | 3 +-
configs/smdk5250_defconfig | 1 -
configs/smdk5420_defconfig | 1 -
configs/snow_defconfig | 1 -
configs/spring_defconfig | 1 -
drivers/core/read.c | 23 +
drivers/sound/Kconfig | 8 +
drivers/sound/Makefile | 8 +-
drivers/sound/codec-uclass.c | 26 +
drivers/sound/i2s-uclass.c | 25 +
drivers/sound/max98090.c | 377 ++++++++++++
drivers/sound/max98090.h | 663 ++++++++++++++++++++++
drivers/sound/max98095.c | 313 ++++------
drivers/sound/max98095.h | 9 +-
drivers/sound/maxim_codec.c | 87 +++
drivers/sound/maxim_codec.h | 67 +++
drivers/sound/samsung-i2s.c | 113 +++-
drivers/sound/samsung_sound.c | 104 ++++
drivers/sound/sandbox.c | 177 +++++-
drivers/sound/sound-i2s.c | 208 -------
drivers/sound/sound-uclass.c | 127 +++++
drivers/sound/sound.c | 11 +-
drivers/sound/wm8994.c | 114 ++--
drivers/sound/wm8994.h | 2 +-
include/audio_codec.h | 48 ++
include/dm/read.h | 58 ++
include/dm/uclass-id.h | 3 +
include/i2s.h | 36 +-
include/sound.h | 79 ++-
test/dm/Makefile | 3 +
test/dm/audio.c | 34 ++
test/dm/i2s.c | 32 ++
test/dm/sound.c | 34 ++
test/dm/test-fdt.c | 35 ++
59 files changed, 2660 insertions(+), 664 deletions(-)
delete mode 100644 arch/sandbox/include/asm/sound.h
create mode 100644 drivers/sound/codec-uclass.c
create mode 100644 drivers/sound/i2s-uclass.c
create mode 100644 drivers/sound/max98090.c
create mode 100644 drivers/sound/max98090.h
create mode 100644 drivers/sound/maxim_codec.c
create mode 100644 drivers/sound/maxim_codec.h
create mode 100644 drivers/sound/samsung_sound.c
delete mode 100644 drivers/sound/sound-i2s.c
create mode 100644 drivers/sound/sound-uclass.c
create mode 100644 include/audio_codec.h
create mode 100644 test/dm/audio.c
create mode 100644 test/dm/i2s.c
create mode 100644 test/dm/sound.c
--
2.20.0.rc2.403.gdbc3b29805-goog
next reply other threads:[~2018-12-10 17:37 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-10 17:37 Simon Glass [this message]
2018-12-10 17:37 ` [U-Boot] [PATCH v2 01/22] dm: sound: exynos: Correct codec bus addresses Simon Glass
2018-12-10 17:37 ` [U-Boot] [PATCH v2 02/22] dm: sound: Create an option to use driver model for sound Simon Glass
2018-12-10 17:37 ` [U-Boot] [PATCH v2 03/22] dm: sound: Rename samsung_i2s_priv to i2s_uc_priv Simon Glass
2018-12-10 17:37 ` [U-Boot] [PATCH v2 04/22] dm: sound: Create a uclass for audio codecs Simon Glass
2018-12-10 17:37 ` [U-Boot] [PATCH v2 05/22] dm: sound: Create a uclass for i2s Simon Glass
2018-12-10 17:37 ` [U-Boot] [PATCH v2 06/22] dm: sandbox: Update sound to use two buffers Simon Glass
2018-12-10 17:37 ` [U-Boot] [PATCH v2 07/22] dm: sound: Create a uclass for sound Simon Glass
2018-12-10 17:37 ` [U-Boot] [PATCH v2 08/22] dm: core: Add a function to read into a unsigned int Simon Glass
2018-12-10 17:37 ` [U-Boot] [PATCH v2 09/22] dm: sound: Start i2c IDs from 0 Simon Glass
2018-12-10 17:37 ` [U-Boot] [PATCH v2 10/22] dm: sound: Add conversion to driver model Simon Glass
2018-12-10 17:37 ` [U-Boot] [PATCH v2 11/22] exynos: Add proid_is_exynos542x() for common 542x Simon Glass
2018-12-10 17:37 ` [U-Boot] [PATCH v2 12/22] exynos: Add support for exynos5420 i2s pinmux Simon Glass
2018-12-10 17:37 ` [U-Boot] [PATCH v2 13/22] dm: sound: Move common code out of maxim98095 Simon Glass
2018-12-10 17:37 ` [U-Boot] [PATCH v2 14/22] dm: sound: exynos: Add support for max98090 Simon Glass
2018-12-10 17:37 ` [U-Boot] [PATCH v2 15/22] dm: exynos: sound: Convert to use driver model Simon Glass
2018-12-10 17:37 ` [U-Boot] [PATCH v2 16/22] dm: sandbox: " Simon Glass
2018-12-10 17:37 ` [U-Boot] [PATCH v2 17/22] dm: exynos: Drop CONFIG_DM_I2C_COMPAT Simon Glass
2018-12-10 17:37 ` [U-Boot] [PATCH v2 18/22] dm: sound: Complete migration to driver model Simon Glass
2018-12-10 17:37 ` [U-Boot] [PATCH v2 19/22] dm: sound: Fix license headers Simon Glass
2018-12-10 17:37 ` [U-Boot] [PATCH v2 20/22] dm: sound: max98095: Tidy up error codes Simon Glass
2018-12-10 17:37 ` [U-Boot] [PATCH v2 21/22] dm: sandbox: Allow selection of sample rate and channels Simon Glass
2018-12-10 17:37 ` [U-Boot] [PATCH v2 22/22] dm: sound: Use the correct number of channels for sound Simon Glass
2018-12-14 15:35 ` sjg at google.com
2018-12-14 15:35 ` [U-Boot] [PATCH v2 21/22] dm: sandbox: Allow selection of sample rate and channels sjg at google.com
2018-12-14 15:35 ` [U-Boot] [PATCH v2 20/22] dm: sound: max98095: Tidy up error codes sjg at google.com
2018-12-14 15:35 ` [U-Boot] [PATCH v2 19/22] dm: sound: Fix license headers sjg at google.com
2018-12-14 15:35 ` [U-Boot] [PATCH v2 18/22] dm: sound: Complete migration to driver model sjg at google.com
2018-12-14 15:35 ` [U-Boot] [PATCH v2 17/22] dm: exynos: Drop CONFIG_DM_I2C_COMPAT sjg at google.com
2018-12-14 15:35 ` [U-Boot] [PATCH v2 16/22] dm: sandbox: sound: Convert to use driver model sjg at google.com
2018-12-14 15:35 ` [U-Boot] [PATCH v2 15/22] dm: exynos: " sjg at google.com
2018-12-14 15:35 ` [U-Boot] [PATCH v2 14/22] dm: sound: exynos: Add support for max98090 sjg at google.com
2018-12-14 15:35 ` [U-Boot] [PATCH v2 13/22] dm: sound: Move common code out of maxim98095 sjg at google.com
2018-12-14 15:35 ` [U-Boot] [PATCH v2 12/22] exynos: Add support for exynos5420 i2s pinmux sjg at google.com
2018-12-14 15:35 ` [U-Boot] [PATCH v2 11/22] exynos: Add proid_is_exynos542x() for common 542x sjg at google.com
2018-12-14 15:35 ` [U-Boot] [PATCH v2 10/22] dm: sound: Add conversion to driver model sjg at google.com
2018-12-14 15:35 ` [U-Boot] [PATCH v2 09/22] dm: sound: Start i2c IDs from 0 sjg at google.com
2018-12-14 15:35 ` [U-Boot] [PATCH v2 08/22] dm: core: Add a function to read into a unsigned int sjg at google.com
2018-12-14 15:38 ` [U-Boot] [PATCH v2 07/22] dm: sound: Create a uclass for sound sjg at google.com
2018-12-14 15:38 ` [U-Boot] [PATCH v2 06/22] dm: sandbox: Update sound to use two buffers sjg at google.com
2018-12-14 15:38 ` [U-Boot] [PATCH v2 05/22] dm: sound: Create a uclass for i2s sjg at google.com
2018-12-14 15:38 ` [U-Boot] [PATCH v2 04/22] dm: sound: Create a uclass for audio codecs sjg at google.com
2018-12-14 15:38 ` [U-Boot] [PATCH v2 03/22] dm: sound: Rename samsung_i2s_priv to i2s_uc_priv sjg at google.com
2018-12-14 15:38 ` [U-Boot] [PATCH v2 02/22] dm: sound: Create an option to use driver model for sound sjg at google.com
2018-12-14 15:38 ` [U-Boot] [PATCH v2 01/22] dm: sound: exynos: Correct codec bus addresses sjg at google.com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181210173751.177266-1-sjg@chromium.org \
--to=sjg@chromium.org \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.