Commit Graph

23 Commits

Author SHA1 Message Date
Bard Liao 3ae08dc0fc ASoC: rt5651: add ACPI and OF support
Add required tables and the binding document for ACPI and OF matching.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-12-23 12:21:14 +00:00
Mark Brown 428157c1e8 Merge remote-tracking branches 'asoc/topic/tas2552', 'asoc/topic/tas5086', 'asoc/topic/tegra', 'asoc/topic/tlv' and 'asoc/topic/topology' into asoc-next 2015-08-30 15:57:34 +01:00
Mark Brown a8f1d97bfa Merge remote-tracking branches 'asoc/topic/rt298', 'asoc/topic/rt5640', 'asoc/topic/rt5651' and 'asoc/topic/rt5670' into asoc-next 2015-08-30 15:56:27 +01:00
Mark Brown 532161e6cc Merge remote-tracking branches 'asoc/topic/rcar', 'asoc/topic/reg-default', 'asoc/topic/rl6231', 'asoc/topic/rockchip' and 'asoc/topic/rt286' into asoc-next 2015-08-30 15:55:54 +01:00
Lars-Peter Clausen 8e3648e10f ASoC: rt5651: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
DECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD()
that it automatically calculates the number of items in the TLV and is
hence less prone to manual error.

Generate using the following coccinelle script

// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
-	TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
	...
-};
+);
// </smpl>

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-05 13:23:21 +01:00
Oder Chiou 00a6d6e50f ASoC: Add function "rl6231_get_pre_div" to correct the dmic clock calculation
Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-05 10:42:35 +01:00
Mark Brown 41a5fefeff regmap: Create a new struct reg_sequence for register sequences
In order to allow us to start adding extra annotations for sequences
 without bloating register default tables duplicate the structure under
 the new name reg_sequence and update the APIs to use that instead of
 reg_default.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEbBAABAgAGBQJVqUFGAAoJECTWi3JdVIfQ3YUH+LWLxVerlyUj/uug4vhRLlp2
 KkKLInX1r9Al8cRWo6ln3kdB8jTmOxFxm1XUkpz+IQLiF0yV5kGtVm7uBup/X4DA
 5oi7313rPs4maS/jqwyuOUi8X+ZMkKxp1Pgf4dJAzRJPN5tlks3drYdqY2c7JdT0
 q5IqUR1KIsouK1/wCBy17BEe9PLpjV6U/yN2E/b1tsW1utjtAgY5pPjv/MZpPJ8C
 NI6WXHjdykIi6Peg1mHqczgGEkyRlKBllZVsOvFhX1yjy0ITvao5/Mpv8NK5BwwU
 cOWPVLlXOwa4m+kVXePPgA4GlB2q1Xupw5k6TDPip5aCGUgS+ryKQmOVcNaJnA==
 =C5/o
 -----END PGP SIGNATURE-----

Merge tag 'regmap-seq-delay-api' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap into asoc-reg-default

regmap: Create a new struct reg_sequence for register sequences

In order to allow us to start adding extra annotations for sequences
without bloating register default tables duplicate the structure under
the new name reg_sequence and update the APIs to use that instead of
reg_default.

Conflicts:
	sound/soc/codecs/da7210.c
	sound/soc/codecs/rt5651.c
	sound/soc/codecs/wm8993.c
2015-07-17 19:32:04 +01:00
Nariman Poushin 8019ff6cfc regmap: Use reg_sequence for multi_reg_write / register_patch
Separate the functionality using sequences of register writes from the
functions that take register defaults. This change renames the arguments
in order to support the extension of reg_sequence to take an optional
delay to be applied after any given register in a sequence is written.
This avoids adding an int to all register defaults, which could
substantially increase memory usage for regmaps with large default tables.

This also updates all the clients of multi_reg_write/register_patch.

Signed-off-by: Nariman Poushin <nariman@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-16 22:02:55 +01:00
Mark Brown 7d9fb377a7 Merge branches 'topic/owner' and 'topic/reg-default' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-max9877 2015-07-16 21:35:01 +01:00
Krzysztof Kozlowski 1c07a4de5b ASoC: drivers: Drop owner assignment from i2c_driver
i2c_driver does not need to set an owner because i2c_register_driver()
will set it.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-15 12:50:43 +01:00
Axel Lin c418a84a8c ASoC: Constify reg_default tables
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Peter Rosin <peda@axentia.se>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-07 14:39:02 +01:00
Jarkko Nikula 469444fb13 ASoC: rt5651: Prefix hexadecimal ID register value with 0x in error print
Make it obvious that unexpected value read from ID register is printed in
hexadecimal.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-06 20:30:07 +01:00
Lars-Peter Clausen eb13bd563a ASoC: rt5651: Replace direct snd_soc_codec dapm field access
The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-20 11:18:32 +01:00
Lars-Peter Clausen f4bf8d770b ASoC: Move bias level update to the core
All drivers have the same line at the end of the set_bias_level callback to
update the bias_level state. Move this update into
snd_soc_dapm_force_bias_level() and remove them from the drivers.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-27 21:34:45 +01:00
Lars-Peter Clausen bd1204cb51 ASoC: Route all bias level updates through the core
Use the new snd_soc_codec_force_bias_level() helper function to invoke the
bias_level callback of a driver instead of calling the callback by hand.
Currently the effect of this is the same, but having all bias level updates
go through a central place will allow us to move more of the bias level
management into the DAPM core.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-27 21:34:45 +01:00
Lars-Peter Clausen 30c173ed3e ASoC: rt5651: Replace w->codec snd_soc_dapm_to_codec(w->dapm)
The codec field of the snd_soc_widget struct is eventually going to be
removed, use snd_soc_dapm_to_codec(w->dapm) instead.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-15 11:57:06 +00:00
Mark Brown 794f33d2fb ASoC: rt5651: Convert to params_width()
The CODEC doesn't care how data is laid out in memory.

Signed-off-by: Mark Brown <broonie@linaro.org>
2014-07-31 13:30:05 +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
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
Mark Brown 871c131dcb ASoC: rt5651: Staticise non-exported symbols
Make the dai_ops const too since we can.

Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-18 20:02:06 +01: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