Commit graph

4219 commits

Author SHA1 Message Date
Axel Lin
c8cfbec882 ASoC: rt5677: Convert to use module_i2c_driver
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Tested-by: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-06-16 15:57:50 +01:00
Mark Brown
a2fbbbf10d Merge remote-tracking branches 'asoc/topic/wm8804' and 'asoc/topic/wm9713' into asoc-next 2014-06-03 10:40:00 +01:00
Mark Brown
39b47b599e Merge remote-tracking branches 'asoc/topic/samsung', 'asoc/topic/sgtl5000', 'asoc/topic/simple' and 'asoc/topic/sirf' into asoc-next 2014-06-03 10:39:57 +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
b12a1906be Merge remote-tracking branches 'asoc/topic/max98090' and 'asoc/topic/max98095' into asoc-next 2014-06-03 10:39:52 +01:00
Mark Brown
edc3596fad Merge remote-tracking branch 'asoc/topic/cs42l56' into asoc-next 2014-06-03 10:39:47 +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
Mark Brown
bad6f621e4 Merge remote-tracking branches 'asoc/fix/pxa' and 'asoc/fix/tlv320aic3x' into asoc-linus 2014-06-03 10:39:38 +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
d92950e755 ASoC: rt5640: Add the function "get_clk_info" to RL6231 shared support
The patch adds the function "get_clk_info" to 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
Oder Chiou
71c7a2d675 ASoC: rt5640: Add the function of the PLL clock calculation to RL6231 shared support
The patch adds the function of the PLL clock calculation to 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
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
Mark Brown
15f78ea67f Merge branches 'topic/rt5640', 'topic/rt5645' and 'topic/rt5651' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-rl6231 2014-06-01 20:04:24 +01:00
Matt Reimer
a7f0b839cb ASoC: wm9713: correct mono out PGA sources
The mono output PGA input only has four possible sources, so
omit the rest.

Signed-off-by: Matt Reimer <mreimer@sdgsystems.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-06-01 13:52:51 +01:00
Axel Lin
4641c771b6 ASoC: cs42l56: Fix new value argument in snd_soc_update_bits calls
The new value argument needs proper shift to match the mask bit fields.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Tested-by: Brian Austin <brian.austin@cirrus.com>
Acked-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-06-01 11:49:25 +01:00
Peter Ujfalusi
e6c111fac4 ASoC: tlv320aci3x: Fix custom snd_soc_dapm_put_volsw_aic3x() function
For some unknown reason the parameters for snd_soc_test_bits() were in wrong
order:
It was:
snd_soc_test_bits(codec, val, mask, reg); /* WRONG!!! */
while it should be:
snd_soc_test_bits(codec, reg, mask, val);

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Cc: stable@vger.kernel.org
2014-06-01 11:43:02 +01:00
Daniel Matuschek
06109f47f2 ASoC: wm8804: Allow control of master clock divider in PLL generation
WM8804 can run with PLL frequencies of 256xfs and 128xfs for
most sample rates. At 192kHz only 128xfs is supported. The
existing driver selects 128xfs automatically for some lower
samples rates. By using an additional mclk_div divider, it
is now possible to control the behaviour. This allows using
256xfs PLL frequency on all sample rates up to 96kHz. It
should allow lower jitter and better signal quality. The
behavior has to be controlled by the sound card driver,
because some sample frequency share the same setting. e.g.
192kHz and 96kHz use 24.576MHz master clock. The only
difference is the MCLK divider.

Signed-off-by: Daniel Matuschek <daniel@matuschek.net>
Tested-by: Florian Meier <florian.meier@koalo.de>
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-29 16:01:56 +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
Charles Keepax
62c35b3bd2 ASoC: wm_adsp: Use adsp_err/warn instead of dev_err/warn
We have defines for adsp messages best to consistently use them.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-27 16:08:42 +01:00
Fabio Estevam
29aa37cddf ASoC: sgtl5000: Fix the cache handling
Since commit e5d80e82e3 (ASoC: sgtl5000: Convert to use regmap directly) a
kernel oops is observed after a suspend/resume sequence.

The kernel oops happens inside sgtl5000_restore_regs() as codec->reg_cache is no
longer a valid pointer.

Add the remaining register entries into sgtl5000_reg_defaults[] and remove
sgtl5000_restore_regs() completely, which allows suspend/resume to work fine and
make the code simpler.

Tested on a im53-qsb board.

Reported-by: Shawn Guo <shawn.guo@freescale.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Tested-by: Shawn Guo <shawn.guo@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-27 12:22:15 +01:00
Axel Lin
772bc594da ASoC: sirf-audio-codec: Simplify the new bitmask value in regmap_update_bits
Having the binary ones complement operator in the new bitmak value makes the
code hard to read.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-26 17:00:39 +01:00
Tushar Behera
e3048c3d2b ASoC: max98095: Add master clock handling
If master clock is provided through device tree, then update
the master clock frequency during set_sysclk.

Documentation has been updated to reflect the change.

Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-26 16:18:59 +01:00
Tushar Behera
b10ab7b838 ASoC: max98090: Add master clock handling
If master clock is provided through device tree, then update
the master clock frequency during set_sysclk.

Documentation has been updated to reflect the change.

Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-26 16:16:54 +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
Chen Zhen
2c81a10ae6 ASoC: max98090: Add NI/MI values for user pclk 19.2 MHz
This patch adds the clock divisor and multiplier NI, MI values for audio
sampling frequencies 44100 and 48000 Hz and PCLK 19.2 MHz. This is useful
for the Odroid X2/U2 boards when the codec works in master mode and its
MCLK clock is fed from the I2S CDCLK output.

Signed-off-by: Chen Zhen <zhen1.chen@samsung.com>
[s.nawrocki@samsung.com: edited the commit description]
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-26 14:28:57 +01:00
Mark Brown
cee429e5c5 Merge remote-tracking branches 'asoc/topic/ux500', 'asoc/topic/wm8731', 'asoc/topic/wm8804', 'asoc/topic/wm8955' and 'asoc/topic/wm8985' into asoc-next 2014-05-22 00:24:04 +01:00
Mark Brown
04f87446c2 Merge remote-tracking branches 'asoc/topic/rt5651', 'asoc/topic/samsung', 'asoc/topic/sgtl5000', 'asoc/topic/sh', 'asoc/topic/simple', 'asoc/topic/sirf', 'asoc/topic/sta350' and 'asoc/topic/tlv320dac33' into asoc-next 2014-05-22 00:24:00 +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
6630f30ed5 Merge remote-tracking branches 'asoc/topic/headers', 'asoc/topic/intel', 'asoc/topic/jz4740', 'asoc/topic/max98090', 'asoc/topic/max98095', 'asoc/topic/mc13783' and 'asoc/topic/multicodec' into asoc-next 2014-05-22 00:23:54 +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
Mark Brown
497c11a946 Merge remote-tracking branch 'asoc/topic/pcm512x' into asoc-next 2014-05-22 00:23:45 +01:00
Mark Brown
e3ac3f2510 Merge remote-tracking branch 'asoc/topic/enum' into asoc-next 2014-05-22 00:23:44 +01:00
Mark Brown
0f4019e6f4 Merge remote-tracking branch 'asoc/topic/component' into asoc-next 2014-05-22 00:23:41 +01:00
Mark Brown
228704bbdd Merge remote-tracking branch 'asoc/fix/max98090' into asoc-linus 2014-05-22 00:23:37 +01:00
Mark Brown
dd97254f5c ASoC: Driver fixes for v3.15
A small set of driver fixes, nothing remarkable in itself or of any
 relevance outside of the driver.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJTc1hlAAoJELSic+t+oim9H/sP/A6r/9/qBesBiBvK7q+jXKNo
 FW6M6zM2lZpLuAnUlSLNC6nb6e6nQYTvvCV4VIXfuj8r8NPMmxwdreg5Vp2fJdAk
 0Qlr3l025B4VmPxqik5wA04jE74G8BW8ttXHpWxxOXdceaUJ4uDzryJBuCpV3vJk
 +2gprKcnR4/wgqpzkGBAwNfurkfXOxpqB8DfPj+FcfRdWyxTqFtvZi+9dSwm2bLv
 T7z8alaMcG/ZpkH7nF+Q4Vu/0tJhgyHIVRTFsJvBKNYVr8cdGi+VDq++AE/62YOE
 v6EGpsrjn243AA8UDBnCznVVZcnwhSf33OpBg44DHb0/1J343x5r4bsGlQkb+19V
 FkBBnhiozWRwVjTBU/E6ss5eua+ESNqL6/EFLpCrD7ykduNOxC/qyKJxcWmmYq9K
 B7Z3tWjX/EzdQ/tMEt26MTnXWSmtk/Yq8dg2UDkdF5r4zBsGyNgHwpi1nbYDCNcm
 alBF7TKkhCV5woJcF+ygG7oFarnQnjSL+J+LTuKRo1gn6k4/NWaVmb/8K9pkN5wS
 hZhL12rjySVXcijrbwVJC9HfFYCtGDjJeTC0ifGQ9jTvEan/Hwi/vwk5XocTywbF
 PglDm9ygwyLAC3A602RWhd/WdgLdmfCYuyKJEcnlnVlkEFmpa5LyJ7wSi6qYYmAk
 j+xPZI2ROuKtebPAP6Es
 =0trh
 -----END PGP SIGNATURE-----

Merge tag 'asoc-v3.15-rc5-drivers' into asoc-linus

ASoC: Driver fixes for v3.15

A small set of driver fixes, nothing remarkable in itself or of any
relevance outside of the driver.

# gpg: Signature made Wed 14 May 2014 12:49:57 BST using RSA key ID 7EA229BD
# gpg: Good signature from "Mark Brown <broonie@sirena.org.uk>"
# gpg:                 aka "Mark Brown <broonie@debian.org>"
# gpg:                 aka "Mark Brown <broonie@kernel.org>"
# gpg:                 aka "Mark Brown <broonie@tardis.ed.ac.uk>"
# gpg:                 aka "Mark Brown <broonie@linaro.org>"
# gpg:                 aka "Mark Brown <Mark.Brown@linaro.org>"
2014-05-22 00:23:31 +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
Lars-Peter Clausen
cf7b71f46b ASoC: ad1980: Replace goto loop with do-while loop
Using a proper do-while loop here instead of a open-coded goto loop is both
cleaner and shorter.

Also fixes the following warnings from smatch:
	sound/soc/codecs/ad1980.c:213 ad1980_reset() info: loop could be replaced with if statement.
	sound/soc/codecs/ad1980.c:212 ad1980_reset() info: ignoring unreachable code.
	sound/soc/codecs/ad1980.c:215 ad1980_reset() info: ignoring unreachable code.

While we are at it also change retry_cnt to unsigned int, using u16 for a
on-stack loop counter doesn't make that much sense.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-20 22:53:36 +01:00
Axel Lin
8c32570441 ASoC: rt5645: Fix updating wrong register for T5645_AIF2 case
This looks like a copy-paste bug, fix it.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Tested-by: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-19 17:23:14 +01:00
Lars-Peter Clausen
c1406846e4 ASoC: rt5651: Do not use rtd->codec
rtd->codec does not necessarily point to the CODEC instance for which the
callback was called (e.g. for CODEC<->CODEC or multi-CODEC links). Use
dai->codec instead.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-19 17:16:04 +01:00
Lars-Peter Clausen
5958de23ed ASoC: cs42xx8: Do not use rtd->codec
rtd->codec does not necessarily point to the CODEC instance for which the
callback was called (e.g. for CODEC<->CODEC or multi-CODEC links). Use
dai->codec instead.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-19 17:14:02 +01:00
Jarkko Nikula
a735d992c2 ASoC: max98090: Move microphone bias voltage setting to probe function
Microphone bias level configuration register can configure voltage between
2.2 V and 2.8 V but doesn't manage is voltage on or off. Microphone bias
on/off state is controlled by "MICBIAS" DAPM widget.

Therefore there is no need to update bias voltage conditionally depending on
jack state each time when codec goes to SND_SOC_BIAS_ON state and setting
can be moved to max98090_probe() as driver currently doesn't support other
levels than 2.8 V.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-16 19:59:26 +01:00
Liam Girdwood
541423dde4 ASoC: max98090: Make sure we configure BCLK in one place
BCL is being configured in two places producing a warning message.
Make sure we only configure BCLK once and when we are master.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-16 19:59:25 +01:00
Jarkko Nikula
70f29d3889 ASoC: max98090: Add ACPI probing support
Add ACPI ID for MAX98090 and ACPI 5 I2C device probing support.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-16 19:59:25 +01:00
Liam Girdwood
f1c0bc9145 ASoC: max98090: Mark cache as dirty prior to restoring
Make sure the cache is fully flushed at resume time.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-16 19:57:15 +01:00
Liam Girdwood
46b0e97dcf ASoC: max98090: Reset codec on resume
Make sure we reset codec and clear any IRQs on resume. This matches
the init sequence in probe.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-16 19:57:15 +01:00
Liam Girdwood
25b4ab430f ASoC: max98090: Fix reset at resume time
Reset needs to wait 20ms before other codec IO is performed. This wait
was not being performed. Fix this by making sure the reset register is not
restored with the cache, but use the manual reset method in resume with
the wait.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Cc: stable@vger.kernel.org
2014-05-16 19:56:23 +01:00