summaryrefslogtreecommitdiff
path: root/drivers/sound
AgeCommit message (Collapse)AuthorFilesLines
2018-12-14dm: sound: Rename samsung_i2s_priv to i2s_uc_privSimon Glass2-7/+7
This structure contains information that is likely needed by any i2s driver so it seems useful to attach it to the (forthcoming) i2c uclass. For now, just rename it. Signed-off-by: Simon Glass <sjg@chromium.org>
2018-12-14dm: sound: Create an option to use driver model for soundSimon Glass1-0/+6
The U-Boot sound system provides basic support for beeping. At present it does not use driver model, but it needs to be converted. Add an option to enable driver model for sound. For now it is not connected to anything. Future work will add drivers which use this option. It will then be removed once everything is converted. Signed-off-by: Simon Glass <sjg@chromium.org>
2018-12-14dm: sound: exynos: Correct codec bus addressesSimon Glass1-2/+1
For snow the codec is at address 0x11 on the i2c bus, in 7-bit format. The device tree and code are in 8-bit format (i.e. shifted left one bit). Fix both. Fix pit in a similar way. Signed-off-by: Simon Glass <sjg@chromium.org>
2018-12-14dm: sound: Fix up header orderingSimon Glass3-28/+27
Tidy up the ordering of header files in the sounds files. Signed-off-by: Simon Glass <sjg@chromium.org>
2018-12-14dm: sound: wm8994: Drop wm8994_i2c_init()Simon Glass1-11/+1
This function has only one line in it. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
2018-12-14dm: sound: max98095: Drop g_codec_info and g_max98095_infoSimon Glass1-15/+12
These are only used in two functions so can be made local. Also change the first argument of max98095_do_init() to suit. Signed-off-by: Simon Glass <sjg@chromium.org>
2018-12-14dm: sound: wm8994: Drop g_codec_info and g_wm8994_infoSimon Glass1-9/+7
These are only used in two functions so can be made local. Signed-off-by: Simon Glass <sjg@chromium.org>
2018-12-14dm: sound: max98095: Drop global i2c-address variableSimon Glass1-4/+4
We can put this in the private structure and avoid a global. Signed-off-by: Simon Glass <sjg@chromium.org>
2018-12-14dm: sound: wm8994: Drop global i2c-address variableSimon Glass1-4/+4
We can put this in the private structure and avoid a global. Signed-off-by: Simon Glass <sjg@chromium.org>
2018-12-14dm: sound: max98095: Split out interface setup codeSimon Glass1-12/+24
With driver model we want to do a minimal probe when the device is probed and then set up the codec interface later when a sound is actully played. Split this setup code out into its own function to help with this. Signed-off-by: Simon Glass <sjg@chromium.org>
2018-12-14dm: sound: wm899c: Split out interface setup codeSimon Glass1-11/+23
With driver model we want to do a minimal probe when the device is probed and then set up the codec interface later when a sound is actully played. Split this setup code out into its own function to help with this. Signed-off-by: Simon Glass <sjg@chromium.org>
2018-12-14dm: sound: wm8994: Create a new common init functionSimon Glass1-23/+33
With driver model we cannot pass in the global struct, but instead want to pass in the driver-private data. Split some of the code out of wm8994_init() to handle this. Signed-off-by: Simon Glass <sjg@chromium.org>
2018-12-14dm: sound: max98095: Pass private data to internal functionsSimon Glass1-74/+78
At present the driver-private data is global. To allow this code to be used with driver model, change it to pass the data down to each function. Use the name 'priv' consistently throughout. Also rename max98095_update_bits() to max98095_bic_or() which is more descriptive and shorter, thus breaking fewer lines with the parameter addition. Signed-off-by: Simon Glass <sjg@chromium.org>
2018-12-14dm: sound: wm8994: Pass private data to internal functionsSimon Glass1-142/+154
At present the driver-private data is global. To allow this code to be used with driver model, change it to pass the data down to each function. Use the name 'priv' consistently throughout. Also rename wm8994_update_bits() to wm8994_bic_or() which is more descriptive and shorter, thus breaking fewer lines with the parameter addition. Signed-off-by: Simon Glass <sjg@chromium.org>
2018-12-14dm: sound: Drop codec_typeSimon Glass2-24/+0
This field is not really used. It is always set to a known value. Drop it to simplify the code. Signed-off-by: Simon Glass <sjg@chromium.org>
2018-12-14dm: sound: samsung: Rename i2stx_info to samsung_i2s_privSimon Glass2-8/+8
This struct is only used by the Samsung I2C driver and should move into that driver. For now, rename it so it is clear that is driver-private info. Signed-off-by: Simon Glass <sjg@chromium.org>
2018-12-14dm: sound: Drop unused pre-device-tree codeSimon Glass2-12/+0
CONFIG_OF_CONTROL is enabled for all boards that use sound, so remove the dead code. Signed-off-by: Simon Glass <sjg@chromium.org>
2018-12-14dm: sound: samsung: Make local function staticSimon Glass2-5/+5
Several functions are not exported from this file. Make them static so this is clear. Signed-off-by: Simon Glass <sjg@chromium.org>
2018-11-29sound: Add sample rate as a parameter for square waveSimon Glass2-4/+5
At present this value is hard-coded in the function that generates a square wave. Since sample rates vary between different hardware, it makes more sense to have this as a parameter. Update the function and its users. Signed-off-by: Simon Glass <sjg@chromium.org>
2018-11-29sound: Correct data output in sound_create_square_wave()Simon Glass1-2/+0
This function currently outputs twice as much data as it should and overwrites its buffer as a result. Fix it. Signed-off-by: Simon Glass <sjg@chromium.org>
2018-05-07SPDX: Convert all of our single license tags to Linux Kernel styleTom Rini8-17/+8
When U-Boot started using SPDX tags we were among the early adopters and there weren't a lot of other examples to borrow from. So we picked the area of the file that usually had a full license text and replaced it with an appropriate SPDX-License-Identifier: entry. Since then, the Linux Kernel has adopted SPDX tags and they place it as the very first line in a file (except where shebangs are used, then it's second line) and with slightly different comment styles than us. In part due to community overlap, in part due to better tag visibility and in part for other minor reasons, switch over to that style. This commit changes all instances where we have a single declared license in the tag as both the before and after are identical in tag contents. There's also a few places where I found we did not have a tag and have introduced one. Signed-off-by: Tom Rini <trini@konsulko.com>
2018-03-05libfdt: move headers to <linux/libfdt.h> and <linux/libfdt_env.h>Masahiro Yamada1-1/+1
Thomas reported U-Boot failed to build host tools if libfdt-devel package is installed because tools include libfdt headers from /usr/include/ instead of using internal ones. This commit moves the header code: include/libfdt.h -> include/linux/libfdt.h include/libfdt_env.h -> include/linux/libfdt_env.h and replaces include directives: #include <libfdt.h> -> #include <linux/libfdt.h> #include <libfdt_env.h> -> #include <linux/libfdt_env.h> Reported-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2017-06-01dm: gpio: Add live tree supportSimon Glass2-1/+3
Add support for requesting GPIOs with a live device tree. This involves adjusting the function signature for the legacy function gpio_request_by_name_nodev(), so fix up all callers. Signed-off-by: Simon Glass <sjg@chromium.org> Fixes to stm32f746-disco.c: Signed-off-by: Tom Rini <trini@konsulko.com>
2015-08-18of: clean up OF_CONTROL ifdef conditionalsMasahiro Yamada2-2/+2
We have flipped CONFIG_SPL_DISABLE_OF_CONTROL. We have cleansing devices, $(SPL_) and CONFIG_IS_ENABLED(), so we are ready to clear away the ugly logic in include/fdtdec.h: #ifdef CONFIG_OF_CONTROL # if defined(CONFIG_SPL_BUILD) && !defined(SPL_OF_CONTROL) # define OF_CONTROL 0 # else # define OF_CONTROL 1 # endif #else # define OF_CONTROL 0 #endif Now CONFIG_IS_ENABLED(OF_CONTROL) is the substitute. It refers to CONFIG_OF_CONTROL for U-boot proper and CONFIG_SPL_OF_CONTROL for SPL. Also, we no longer have to cancel CONFIG_OF_CONTROL in include/config_uncmd_spl.h and scripts/Makefile.spl. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org> Acked-by: Linus Walleij <linus.walleij@linaro.org>
2015-08-13drivers: hierarchize drivers Kconfig menuMasahiro Yamada1-0/+4
The menuconfig for drivers are getting more and more cluttered and unreadable because too many entries are displayed in a single flat menu. Use hierarchic menu for each category. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Simon Glass <sjg@chromium.org> [trini: Update to apply again in a few places, drop USB hunk] Signed-off-by: Tom Rini <trini@konsulko.com>
2015-04-18sandbox: exynos: Move CONFIG_SOUND_SANDBOX to KconfigSimon Glass1-0/+9
Move this over to Kconfig and tidy up. Signed-off-by: Simon Glass <sjg@chromium.org>
2015-04-18sandbox: exynos: Move CONFIG_SOUND_WM8994 to KconfigSimon Glass1-0/+8
Move this over to Kconfig and tidy up. Signed-off-by: Simon Glass <sjg@chromium.org>
2015-04-18sandbox: exynos: Move CONFIG_SOUND_MAX98095 to KconfigSimon Glass1-0/+8
Move this over to Kconfig and tidy up. Signed-off-by: Simon Glass <sjg@chromium.org>
2015-04-18sandbox: exynos: Move CONFIG_I2S_SAMSUNG to KconfigSimon Glass1-0/+10
Move this over to Kconfig and tidy up. Signed-off-by: Simon Glass <sjg@chromium.org>
2015-04-18sandbox: exynos: Move CONFIG_I2S to KconfigSimon Glass1-0/+9
Move this over to Kconfig and tidy up. Signed-off-by: Simon Glass <sjg@chromium.org>
2015-04-18sandbox: exynos: Move CONFIG_SOUND to KconfigSimon Glass1-0/+11
Move this over to Kconfig and tidy up. Signed-off-by: Simon Glass <sjg@chromium.org>
2014-09-25kconfig: add blank Kconfig filesMasahiro Yamada1-0/+0
This would be useful to start moving various config options. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-by: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org>
2014-07-08build: define CPU only when arch/${ARCH}/cpu/${CPU} existsMasahiro Yamada1-1/+1
The directory arch/${ARCH}/cpu/${CPU} does not exist in avr32, blackfin, microblaze, nios2, openrisc, sandbox, x86. These architectures have only one CPU type. Defining CPU should not be required for such architectures. This commit allows cpu field (= the 3rd field of boards.cfg) to be kept blank. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Cc: Andreas Bießmann <andreas.devel@googlemail.com> Cc: Simon Glass <sjg@chromium.org> Cc: Sonic Zhang <sonic.zhang@analog.com> Cc: Michal Simek <michal.simek@xilinx.com> Cc: Thomas Chou <thomas@wytron.com.tw> Cc: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
2014-03-18sound: Move Samsung-specific code into its own fileSimon Glass3-221/+210
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>
2014-03-18sandbox: Add a simple sound driverSimon Glass2-0/+25
Add a sound driver for sandbox, which uses SDL. Tested-by: Che-Liang Chiou <clchiou@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org>
2013-10-31drivers: convert makefiles to Kbuild styleMasahiro Yamada1-26/+4
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2013-09-24Sound: MAX98095: Support I2S0 channelDani Krishna Mohan3-67/+115
This patch modifies the MAX98095 audio codec to support I2S0 channel in codec slave mode. Signed-off-by: Dani Krishna Mohan <krishna.md@samsung.com>
2013-09-24Sound: I2S: Replacing I2S1 with I2S0 channel.Dani Krishna Mohan1-13/+32
This patch makes required changes to make use of I2S0 channel instead of I2S1 channel on exynos5250. Signed-off-by: Dani Krishna Mohan <krishna.md@samsung.com>
2013-09-24ARM: Added I2S0 clocks for audioDani Krishna Mohan1-8/+18
This patch makes the necessary changes for making use of I2S0 channel instead of I2S1 channel on smdk board. This changes are done to maintain the uniformity to use I2S0 channel. Signed-off-by: Dani Krishna Mohan <krishna.md@samsung.com>
2013-09-24Sound: WM8994: Support I2S0 channelDani Krishna Mohan3-59/+164
This patch modifies the WM8994 codec to support I2S0 channel in codec slave mode Signed-off-by: Dani Krishna Mohan <krishna.md@samsung.com>
2013-07-24Add GPL-2.0+ SPDX-License-Identifier to source filesWolfgang Denk6-90/+6
Signed-off-by: Wolfgang Denk <wd@denx.de> [trini: Fixup common/cmd_io.c] Signed-off-by: Tom Rini <trini@ti.com>
2013-03-08Sound: Support for MAX98095 codec in driverRajeshwari Shinde1-2/+7
This patchs adds support for MAX98095 codec in sound driver. Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com> Acked-by: Simon Glass <sjg@chromium.org> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2013-03-08Sound: MAX98095: Add the driver for codecRajeshwari Shinde3-0/+862
This patch adds the driver for codec MAX98095 required by Snow Board Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com> Acked-by: Simon Glass <sjg@chromium.org> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2013-01-08Sound: WM8994: Add FDT support to codecRajeshwari Shinde2-6/+74
This patch adds FDT support to the codec. Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com> Acked-by: Simon Glass <sjg@chromium.org> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2013-01-08Sound: Add FDT support to driverRajeshwari Shinde1-69/+102
This patch adds FDT support to the sound driver. Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com> Acked-by: Simon Glass <sjg@chromium.org> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2012-11-15SOUND: Add WM8994 codecRajeshwari Shinde4-0/+1179
This patch adds driver for audio codec WM8994 Signed-off-by: R. Chandrasekar <rcsekar@samsung.com> Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com> Acked-by: Simon Glass <sjg@chromium.org> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2012-11-15SOUND: SAMSUNG: Add I2S driverRajeshwari Shinde3-0/+633
This patch adds driver for I2S interface specific to samsung. Signed-off-by: R. Chandrasekar <rcsekar@samsung.com> Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com> Acked-by: Simon Glass <sjg@chromium.org> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>