Add codec driver for the Maxim MAX98357A DAC.
Signed-off-by: Kenneth Westfield <kwestfie@codeaurora.org>
Acked-by: Banajit Goswami <bgoswami@codeaurora.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
The rt5677 codec has gained code that requires SPI to work correctly,
but there is no provision in Kconfig to prevent the driver from
being used when SPI is disabled or a loadable module, resulting
in this build error:
sound/built-in.o: In function `rt5677_spi_write':
:(.text+0xa7ba0): undefined reference to `spi_sync'
sound/built-in.o: In function `rt5677_spi_driver_init':
:(.init.text+0x253c): undefined reference to `spi_register_driver'
ERROR: "spi_sync" [sound/soc/codecs/snd-soc-rt5677-spi.ko] undefined!
ERROR: "spi_register_driver" [sound/soc/codecs/snd-soc-rt5677-spi.ko] undefined!
This makes the SPI portion of the driver depend on the SPI subsystem,
and disables the function that uses SPI for firmware download if SPI
is disabled. The latter may not be the correct solution, but I could
not come up with a better one.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: af48f1d08a ("ASoC: rt5677: Support DSP function for VAD application")
Signed-off-by: Mark Brown <broonie@kernel.org>
- Add description for the driver
- Add dependency on the I2C module
Signed-off-by: Thomas Niederprüm <niederp@physik.uni-kl.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
use the regmap API directly rather than relying on the snd_soc_read/write
functions as this seems to be in accordance with common practice.
Signed-off-by: Thomas Niederprüm <niederp@physik.uni-kl.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
The codec driver uses regmap to do i2c read/write.
The codec driver started to use REGMAP_IRQ since:
5e3363ad1b
ASoC: rt5677: add GPIO IRQ support
Signed-off-by: Ben Zhang <benzh@chromium.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
This patch converts the ad1980 driver to use regmap for its IO.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
The TS3A227E is an autonomous audio accessory detection and
configuration switch that detects 3-pole or 4-pole audio accessories
and configures internal switches to route the signals accordingly.
This chip also has built-in support for the new button standard
described in the Android "Wired audio headset specification" v1.0.
These buttons will be reported on the jack as buttons 0-3 mapped to
KEY_MEDIA, KEY_VOLUMEUP, KEY_VOLUMEDOWN, and KEY_VOICE_COMMAND.
This will be added as an aux_dev and have the jack passed in from the
machine driver.
Signed-off-by: Dylan Reid <dgreid@chromium.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
This fixes build errors in configurations with I2C/SPI master disabled.
Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Fix build errors when CONFIG_I2C is not enabled by making the
driver depend on I2C.
../sound/soc/codecs/cs42l51-i2c.c:55:1: warning: data definition has no type or storage class [enabled by default]
module_i2c_driver(cs42l51_i2c_driver);
^
../sound/soc/codecs/cs42l51-i2c.c:55:1: error: type defaults to 'int' in declaration of 'module_i2c_driver' [-Werror=implicit-int]
../sound/soc/codecs/cs42l51-i2c.c:55:1: warning: parameter names (without types) in function declaration [enabled by default]
../sound/soc/codecs/cs42l51-i2c.c:45:26: warning: 'cs42l51_i2c_driver' defined but not used [-Wunused-variable]
static struct i2c_driver cs42l51_i2c_driver = {
^
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Acked-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Now that manual selection of drivers for audio subsystem components is
preferred AIC23 codec must be selectable in Kconfig to make it possible.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Since we are removing the Armada 370 DB audio machine driver to use
the 'simple-card' Device Tree binding, we can no longer select the
CS42L51 codec driver using a Kconfig 'select', and we instead need it
to be user-selectable. Therefore, this commit adds a prompt to make
the CS42L51 I2C codec driver user-selectable.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Create a separate module for rt5677 spi driver. Without
this patch, the build fails due to multiple defs of
'init_module' and 'cleanup_module'. module_spi_driver()
defines its own module, so it can't be part of the rt5677
module.
Signed-off-by: Ben Zhang <benzh@chromium.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Since 9cb715a9d4c the codec has a hardcoded dependency to spi.
Add this dependency to Kconfig. It fixes buildbot compilation failure:
sound/built-in.o: In function `spi_write':
>> rt5677-spi.c:(.text+0x8265f): undefined reference to `spi_sync'
sound/built-in.o: In function `rt5677_spi_driver_init':
>> rt5677-spi.c:(.init.text+0x17db): undefined reference to `spi_register_driver'
Signed-off-by: Anatol Pomozov <anatol.pomozov@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Currently the cs4271 driver depends on SND_SOC_I2C_AND_SPI.
So the driver cannot be built as built-in if CONFIG_I2C=m.
Split SPI and I2C code into different modules to avoid this issue.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
rt286 use I2C as its I/O. So the driver can only available when
I2C is selected.
Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Allow the ssm2602/ssm2603/ssm2604 codec driver to be
instantiated from the device tree.
Also, add Kconfig prompts to allow manual selection of both the
I2C and SPI configuration versions of the driver.
Signed-off-by: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
Signed-off-by: Mark Brown <broonie@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Analog Devices SSM4567 is a boost class-D audio amplifier.
Signed-off-by: Anatol Pomozov <anatol.pomozov@gmail.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
When using a DT-based multi-platform kernel, there's not always Kconfig
logic that selects the right codec driver.
Allow the user to manually select WM8978.
This is needed for Armadillo 800 EVA using a generic r8a7740 multi-platform
kernel.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Mark Brown <broonie@linaro.org>
Add a codec driver for the Everest ES8328. It supports two separate audio
outputs and two separate audio inputs.
Signed-off-by: Sean Cross <xobs@kosagi.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
This patch adds support for the Cirrus Logic CS35L32 Boosted Amplifier
I2S output provides monitor data to the SOC/CODEC/DSP for speaker protection/enhancement algorithms
Signed-off-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
In order to show the option under 'CODEC drivers' we need to have text in
Kconfig.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
The codec can be configured via I2C and using regmap_i2c.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Support the TI TAS2552 Class D amplifier.
The TAS2552 is a high efficiency Class-D audio
power amplifier with advanced battery current
management and an integrated Class-G boost
The device constantly measures the
current and voltage across the load and provides a
digital stream of this information.
Signed-off-by: Dan Murphy <dmurphy@ti.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
This patch adds Realtek ALC286 codec driver.
ALC286 is a dual mode codec, which can run as HD-A or I2S mode.
It is controlled by HD-A verb commands via I2C protocol.
The following is the I/O difference between ALC286 and general I2S codecs.
1. A HD-A verb command contains three parts, NID, VID, and PID.
And an I2S command contains only two parts: address and data.
2. Not only the register address is written, but the read command also
includes the entire write command.
3. rt286 uses different registers for read and write the same bits.
We map verb command to regmap structure. However, we read most registers from
cache to prevent the asymmetry read/write issue in rt286.
Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Gustaw Lewandowski <gustaw.lewandowski@intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
This patch adds a minimum support of Realtek ALC5670 codec.
Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
This patch adds support for the Cirrus Logic CS4265 Stereo I2C CODEC.
Signed-off-by: Paul Handrigan <paul.handrigan@cirrus.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
When the SigmaDSP module is built-in, but the I2C core is build as a module
we'll get a undefined reference:
sound/built-in.o: In function `sigma_action_write_i2c':
:(.text+0x5d8d4): undefined reference to `i2c_master_send'
This can happen if a audio driver that is using the regmap SigmaDSP interface is
built into the kernel, but core I2C support is build as a module. To fix this
split the SigmaDSP module into three modules, one module providing the core
infrastructure and two small modules implementing the regmap and I2C interfaces.
This allows e.g. the core infrastructure and regmap support to be built into the
kernel while I2C support can still be build as a module.
Fixes: dab464b60 ("ASoC: Add ADAU1361/ADAU1761 audio CODEC support")
Reported-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
When the SigmaDSP module is built-in, but the I2C core is build as a module
we'll get a undefined reference:
sound/built-in.o: In function `sigma_action_write_i2c':
:(.text+0x5d8d4): undefined reference to `i2c_master_send'
This can happen if a audio driver that is using the regmap SigmaDSP interface is
built into the kernel, but core I2C support is build as a module. To fix this
split the SigmaDSP module into three modules, one module providing the core
infrastructure and two small modules implementing the regmap and I2C interfaces.
This allows e.g. the core infrastructure and regmap support to be built into the
kernel while I2C support can still be build as a module.
Fixes: dab464b60 ("ASoC: Add ADAU1361/ADAU1761 audio CODEC support")
Reported-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>