Commit graph

248 commits

Author SHA1 Message Date
Lars-Peter Clausen 6b10998d74 ASoC: sigmadsp: Split regmap and I2C support into separate modules
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>
2014-06-06 14:09:45 +01:00
Mark Brown 770b65c3da Merge remote-tracking branches 'asoc/topic/rl6231' and 'asoc/topic/rt5677' into asoc-next 2014-06-03 10:39:55 +01:00
Mark Brown 6340c5abf7 Merge remote-tracking branch 'asoc/topic/alc5623' into asoc-next 2014-06-03 10:39:46 +01:00
Mark Brown dd7a7bb50c Merge remote-tracking branches 'asoc/topic/adau' and 'asoc/topic/adsp' into asoc-next 2014-06-03 10:39:44 +01:00
Oder Chiou 0e826e8672 ASoC: add RT5677 CODEC driver
This patch adds the Realtek ALC5677 codec driver.

Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-06-01 20:18:21 +01:00
Oder Chiou 49ef7925c2 ASoC: rt5640: Add RL6231 class device shared support for RT5640, RT5645 and RT5651
The patch adds the RL6231 class device shared support for RT5640, RT5645 and
RT5651. The function of the DMIC clock calculation can be shared by RL6231
shared support.

Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-06-01 20:04:30 +01:00
Lars-Peter Clausen 2923af0246 ASoC: Add ADAU1381/ADAU1781 audio CODEC support
This patch adds support for the Analog Devices ADAU1381 and ADAU1781 audio
CODECs. The device is a low-power, 24-bit stereo audio CODEC with multiple
analog inputs and outputs, two digital microphone inputs and an I2S interface.
The device can be controlled either using I2C or SPI. The main difference
between the two variants is that the ADAU1781 has a freely programmable SigmaDSP
processor, while the ADAU1381 has a fixed function wind noise reduction filter.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-27 20:54:51 +01:00
Lars-Peter Clausen dab464b60b ASoC: Add ADAU1361/ADAU1761 audio CODEC support
This patch adds support for the Analog Devices ADAU1361 and ADAU1761 CODECs.
The device is a a low-power, 24-bit stereo audio CODEC with multiple analog
input and outputs, one digital microphone input and an I2S interface. The device
can be controlled either via I2C or SPI. The main difference between the two
variants is that the ADAU1761 has a built-in SigmaDSP, while the ADAU1361 has
not.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-27 20:54:50 +01:00
Lars-Peter Clausen 4101866c74 ASoC: Add ADAU1X61 and ADAU1X81 CODECs common code
The ADAU1X61 and ADAU1X81 are very similar in the digital domain, but are quite
different in the analog domain. This patch adds support for the common parts of
the ADAU1X61 and ADAU1X81 CODECs.

The patch also restores some of the alphabetical order in the Makfile and
Kconfig.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-27 20:54:50 +01:00
Takashi Iwai 5dc04f51c1 ASoC: alc5623: Fix Kconfig dependency
Add "depends on I2C" to shut up the build errors from randconfig.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-26 16:10:59 +01:00
Mark Brown 6f821c6449 Merge remote-tracking branches 'asoc/topic/nuc900', 'asoc/topic/omap', 'asoc/topic/pxa', 'asoc/topic/rcar', 'asoc/topic/rt5640' and 'asoc/topic/rt5645' into asoc-next 2014-05-22 00:23:57 +01:00
Mark Brown 0c5dacf2ca Merge remote-tracking branches 'asoc/topic/cs42l56', 'asoc/topic/cs42xx8' and 'asoc/topic/davinci' into asoc-next 2014-05-22 00:23:49 +01:00
Mark Brown b03a1c7029 Merge remote-tracking branches 'asoc/topic/ad1980', 'asoc/topic/adsp', 'asoc/topic/ak4104', 'asoc/topic/ak4642', 'asoc/topic/alc5623', 'asoc/topic/arizona', 'asoc/topic/atmel' and 'asoc/topic/cache' into asoc-next 2014-05-22 00:23:45 +01:00
Andrew Lunn 7d6d478f38 ASoC: alc5623: Add device tree binding
Let the ALC5623 codec be instantiated from DT. Add a simple binding
for the additional control register and the jack detect register.

Also, add a prompt to the Kconfig entry for this CODEC, so that it can
be selected. Since kirkwood-t5325.c will no longer be used, we need to
be able to enable the CODEC in the mvebu_v5_defconfig etc.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Acked-by: Jason Cooper <jason@lakedaemon.net>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-20 23:12:23 +01:00
Brian Austin 272b5edd3b ASoC: Add support for CS42L56 CODEC
This patch adds support for the Cirrus Logic Low Power Stereo I2C CODEC

Signed-off-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-05 18:20:22 -07:00
Oder Chiou 1319b2f6a5 ASoC: rt5645: Add codec driver
This patch adds the Realtek ALC5645 codec driver. It is the base
version that because the jack detect function is not implemented to
it, the headphone and AMIC1 are not workable. We will fill up the
further functions later.

Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-03 10:36:10 -07:00
Mark Brown eba17e6868 Merge branch 'topic/input' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-cs42l51
Conflicts:
	sound/soc/codecs/Kconfig
2014-05-02 10:00:35 -07:00
Arnd Bergmann a2915d4fef ASoC: CS42L51 and WM8962 codecs depend on INPUT
Building ARM randconfig got into a situation where CONFIG_INPUT
is turned off and SND_SOC_ALL_CODECS is turned on, which failed
for two codecs trying to use the input subsystem. Some other
drivers also select one of these codecs and consequently need an
explicit dependency added.

Appending to the dependency list seems the easiest way out,
since this is not a practical limitation. If anyone really
needs to build these codecs for a kernel with no input support,
a more sophisticated solution can be implemented.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Xia Kaixu <kaixu.xia@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-30 18:29:33 -07:00
Bard Liao 40bc18a2a2 ASoC: add RT5651 CODEC driver
This patch adds the Realtek ALC5651 codec driver.

Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-18 18:52:18 +01:00
Brian Austin a1253ef6d3 ASoC: cs42l51: split i2c from codec driver
This patch removes the i2c bus code from the codec driver and creates seperate i2c driver.

Signed-off-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-16 15:35:02 +01:00
Sven Brandau 2439ea1f0f ASoC: sta350: Add codec driver
The TI STA350 is an integrated 2.1-channel power amplifier that is
controllable over I2C. This patch adds an ASoC driver for it.

At a glance, this chip is very similar to the STA320 for which a driver
already exists. In details, however, the register maps contain subtle
differences which made a whole new driver easier to write and maintain.

[daniel@zonque.org: cleanups, DT property rework, rebased on asoc-next]
Signed-off-by: Sven Brandau <brandau@gmx.de>
Signed-off-by: Daniel Mack <daniel@zonque.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-14 17:28:43 +01:00
Mark Brown b4d032b3fb Merge remote-tracking branch 'asoc/topic/cs42xx8' into asoc-next 2014-03-23 14:00:48 +00:00
Nicolin Chen 0c516b4ff8 ASoC: cs42xx8: Add codec driver support for CS42448/CS42888
This patch adds support for the Cirrus Logic CS42448/CS42888 Audio CODEC that
has six/four 24-bit AD and eight 24-bit DA converters.

[ CS42448/CS42888 supports both I2C and SPI control ports. As initial patch,
  this patch only adds the support for I2C. ]

Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
Acked-by: Brian Austin <brian.austin@cirrus.com>
Acked-by: Paul Handrigan <Paul.Handrigan@cirrus.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-20 11:49:34 +00:00
Mark Brown 56fe48976d Merge remote-tracking branch 'asoc/topic/tlv320aic31xx' into asoc-next 2014-03-13 14:19:54 +00:00
Jyri Sarha e00447fafb ASoC: tlv320aic31xx: Add basic codec driver implementation
This commit adds a bare bones driver support for TLV320AIC31XX family
audio codecs. The driver adds basic stereo playback trough headphone
and speaker outputs and mono capture trough microphone inputs.

The driver is currently missing support at least for mini DSP features
and jack detection. I have tested the driver only on TLV320AIC3111,
but based on the data sheets TLV320AIC3100, TLV320AIC3110, and
TLV320AIC3120 should work Ok too.

The base for the implementation was taken from:
git@gitorious.org:ti-codecs/ti-codecs.git ajitk/topics/k3.10.1-aic31xx
-branch at commit 77504eba0294764e9e63b4a0c696b44db187cd13.

Signed-off-by: Jyri Sarha <jsarha@ti.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-13 12:09:51 +00:00
Mark Brown 7cc6417208 Merge remote-tracking branches 'asoc/topic/samsung', 'asoc/topic/sgtl5000', 'asoc/topic/sh', 'asoc/topic/simple', 'asoc/topic/sirf', 'asoc/topic/sn95031', 'asoc/topic/ssm2602' and 'asoc/topic/stac9766' into asoc-next 2014-03-12 23:04:42 +00:00
Mark Brown 84f6965e2b Merge remote-tracking branches 'asoc/topic/da7213', 'asoc/topic/da732x', 'asoc/topic/da9055', 'asoc/topic/davinci', 'asoc/topic/fsl', 'asoc/topic/fsl-esai', 'asoc/topic/fsl-sai' and 'asoc/topic/fsl-spdif' into asoc-next 2014-03-12 23:04:22 +00:00
Mark Brown 950c66721d Merge remote-tracking branches 'asoc/topic/88pm860x', 'asoc/topic/ad1836', 'asoc/topic/ad193x', 'asoc/topic/adau1977', 'asoc/topic/ak4104', 'asoc/topic/ak4641', 'asoc/topic/ak4671' and 'asoc/topic/alc5623' into asoc-next 2014-03-12 23:04:09 +00:00
Mark Brown 22066226b5 ASoC: pcm512x: Split out bus drivers
Move to the new style of defining the bus interfaces in separate modules
in order to simplify dependencies.

Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-09 07:38:22 +00:00
Max Filippov b3fc572596 ASoC: tlv320aic23: add support for SPI control mode
tlv320aic23 chip control interface may work in either I2C or SPI mode
depending on the MODE pin state. Functionality and register layout are
independent of the control mode.

Implement bus-specific parts as separate modules.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-07 10:55:33 +08:00
Rongjun Ying f516e368dc ASoC: sirf: Add SiRF internal audio codec driver
SiRF internal audio codec is integrated in SiRF atlas6 and prima2 SoC.
Features include:
1. Stereo DAC and ADC with 16-bit resolution amd 48KHz sample rate
2. Support headphone and/or speaker output
3. Integrate headphone and speaker output amp
4. Support LINE and MIC input
5. Support single ended and differential input mode

Signed-off-by: Rongjun Ying <rongjun.ying@csr.com>
--v5:
1. Drop all inlines.
2. Reordering the Kconfig and Makefile
3. Remove the sirf_audio_codec_reg_bits struct, use the new controls instead it.
4. Add some SND_SOC_DAPM_OUT_DRV instead of HP and SPK enable driver
5. Add audio codec clock supply instead of adc event callback
6. Fixed playback and capture can't concurrent work bug.

--
 .../devicetree/bindings/sound/sirf-audio-codec.txt |   17 +
 sound/soc/codecs/Kconfig                           |    5 +
 sound/soc/codecs/Makefile                          |    1 +
 sound/soc/codecs/sirf-audio-codec.c                |  533 ++++++++++++++++++++
 sound/soc/codecs/sirf-audio-codec.h                |   75 +++
 5 files changed, 631 insertions(+), 0 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/sound/sirf-audio-codec.txt
 create mode 100644 sound/soc/codecs/sirf-audio-codec.c
 create mode 100644 sound/soc/codecs/sirf-audio-codec.h
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-06 15:59:19 +08:00
Lars-Peter Clausen 603597c937 ASoC: Add ADAU1977 CODEC driver
This patch adds support for the ADAU1977, ADAU1978 and ADAU1979 audio CODEC
devices. They are a family of 4-channel differential input audio ADC devices.
They can be connected to either a SPI or I2C bus. The driver is implemented in
three modules, one main module (adau1977.ko) which implements the device logic
and one module each for SPI (adau1977-spi.ko) and I2C (adau1977-i2c.ko) bus
access.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-19 13:36:15 +09:00
Mark Brown a32eb702f8 Merge remote-tracking branch 'asoc/topic/adav80x' into asoc-adau1977 2014-02-19 13:35:59 +09:00
Lars-Peter Clausen 0c2d696456 ASoC: adav80x: Split SPI and I2C code into different modules
There are a few known (minor) problems with having the support code for both I2C
and SPI in the same module:
    * We need to be extra careful to make sure to not build the driver into the
      kernel if one of the subsystems is build as a module (Currently only I2C
      can be build as a module).
    * The module init path error handling is rather ugly. E.g. what should be
      done if either the SPI or the I2C driver fails to register. Most drivers
      that implement SPI and I2C in the same module currently fallback to
      undefined behavior in that case. Splitting the the driver into two
      modules, one for each bus, allows the registration of the other bus drive
      to continue without problems if one of them fails.

This patch splits the ADAV80X driver into 3 modules. One core module that
implements the device logic, but is independent of the bus method used. And one
module for SPI and I2C each that registers the drivers and sets up the regmap
struct for the bus.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-18 10:30:25 +09:00
Lars-Peter Clausen c924dc68f7 ASoC: ssm2602: Split SPI and I2C code into different modules
There are a few known (minor) problems with having the support code for both I2C
and SPI in the same module:
    * We need to be extra careful to make sure to not build the driver into the
      kernel if one of the subsystems is build as a module (Currently only I2C
      can be build as a module).
    * The module init path error handling is rather ugly. E.g. what should be
      done if either the SPI or the I2C driver fails to register? Most drivers
      that implement SPI and I2C in the same module currently fallback to
      undefined behavior in that case. Splitting the the driver into two
      modules, one for each bus allows the registration of the other bus driver
      to continue without problems if one of them fails.

This patch splits the ssm2602 driver into 3 modules. One core module that
implements the device logic, but is independent of the bus method used. And one
module for SPI and I2C each that registers the drivers and sets up the regmap
struct for the bus.

While we are at it also cleanup the include section of the ssm2602 driver and
remove unneeded includes.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-18 10:07:33 +09:00
Lars-Peter Clausen 6c3d713e6d ASoC: ad193x: Split SPI and I2C code into different modules
There are a few known (minor) problems with having the support code for both I2C
and SPI in the same module:
    * We need to be extra careful to make sure to not build the driver into the
      kernel if one of the subsystems is build as a module (Currently only I2C
      can be build as a module).
    * The module init path error handling is rather ugly. E.g. what should be
      done if either the SPI or the I2C driver fails to register? Most drivers
      that implement SPI and I2C in the same module currently fallback to
      undefined behavior in that case. Splitting the the driver into two
      modules, one for each bus, allows the registration of the other bus driver
      to continue without problems if one of them fails.

This patch splits the AD193X driver into 3 modules. One core module that
implements the device logic, but is independent of the bus method used. And one
module for SPI and I2C each that registers the drivers and sets up the regmap
struct for the bus.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-18 10:04:37 +09:00
Mark Brown f951f835a9 ASoC: pcm512x: Add regmap select
We need at least the core regmap code to build.

Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-16 08:33:38 +08:00
Mark Brown e479d85ced ASoC: wm8770: Depend on SPI only
The device has no I2C support so it shouldn't be buildable if only I2C is
enabled.

Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-07 17:02:26 +00:00
Mark Brown 4d1a77224b ASoC: codecs: Put the CODEC drivers in a menu
Now they're visible they get a bit noisy.

Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-07 16:22:13 +00:00
Mark Brown 5a3af12931 ASoC: pcm512x: Add PCM512x driver
The PCM512x devices are a family of monolithic CMOS integrated circuits
that include a stereo digital-to-analog converter and additional support
circuitry.

This is an initial driver which supports some core functionality for the
device which covers common use cases but does not cover all features.
Currently only slave clocking modes with automatic clock configuration
are supported and most of the DSP configuration for the device is not
enabled.

Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-06 12:55:38 +00:00
Mark Brown 1291e14175 ASoC: codecs: Make OF supported CODECs visible in Kconfig
Now that we have a generic card driver we can't rely on the card driver
selecting the CODECs for us so make the CODECs that can be enabled with
OF directly selectable in Kconfig. For the platforms not using OF it's
not clear that we don't still want to have some board specific selection
since the kernel needs to contain code to register the devices; ACPI could
provide this from firmware does not yet support any kind of generic card.

It may also be desirable to hide these if OF is not enabled to reduce
noise.

Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-04 17:35:15 +00:00
Mark Brown 0d724f8a3b ASoC: ak4554: Add to SND_SOC_ALL_CODECS
For build coverage.

Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-03 12:52:11 +00:00
Mark Brown 9a3e1b8c50 ASoC: wm5110: Hook up ADSP2 cores
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-11-24 14:35:43 +00:00
Martin Schwidefsky 0244ad004a Remove GENERIC_HARDIRQ config option
After the last architecture switched to generic hard irqs the config
options HAVE_GENERIC_HARDIRQS & GENERIC_HARDIRQS and the related code
for !CONFIG_GENERIC_HARDIRQS can be removed.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2013-09-13 15:09:52 +02:00
Mark Brown c8a538417e Merge remote-tracking branch 'asoc/topic/new-pcm' into asoc-next 2013-08-22 14:28:43 +01:00
Mark Brown 8157567013 Merge remote-tracking branch 'asoc/topic/core' into asoc-next 2013-08-22 14:28:31 +01:00
Mark Brown 0b1107b29b Merge remote-tracking branch 'asoc/topic/arizona' into asoc-next 2013-08-22 14:28:27 +01:00
Mark Brown e7dfdc1f1f Merge remote-tracking branch 'asoc/topic/ak4554' into asoc-next 2013-08-22 14:28:26 +01:00
Charles Keepax 40843aea5a ASoC: wm8997: Initial CODEC driver
The wm8997 is a compact, high-performance audio hub CODEC with SLIMbus
interfacing, for smartphones, tablets and other portable audio devices
based on the Arizona platform.

This patch adds the wm8997 CODEC driver.

[Fixed some interface churn from bitrot due to the patch not going via
the MFD tree as expected -- broonie]

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-13 11:31:56 +01:00
Mark Brown 6c3137fd01 Merge remote-tracking branch 'asoc/topic/pcm1681' into asoc-new-pcm
Trivial add/add conflicts:
	sound/soc/codecs/Kconfig
	sound/soc/codecs/Makefile
2013-08-05 18:12:39 +01:00