Constify the ACPI device ID array, no need to have it writable at
runtime. Also drop the unused RT5645_INIT_REG_LEN define.
Signed-off-by: Mathias Krause <minipli@googlemail.com>
Cc: Bard Liao <bardliao@realtek.com>
Cc: Oder Chiou <oder_chiou@realtek.com>
Cc: John Lin <john.lin@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
The IRQ pin will keep high when the headset button is pressed. And
keep low when the headset button is released. So, we need irq trigger
at both edges. However, some platform can't support it. Therefore,
we polling the register to report the button release event once a
button presse event is received.
To support the headset button detection function for those can't
support both edges trigger platforms, we also need to invert the
polarity of jack detection irq since we need to keep the IRQ pin
low in normal case.
Signed-off-by: John Lin <john.lin@realtek.com>
Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
There are more and more google projects need to use DMI to get the
platform data configuration. And those projects use the same
configuration. To clean those redundant code, we define a general
DMI for those projects with the same platform data configuration.
Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Add platform specific data for Terra project.
Signed-off-by: Luke_Yin@asus.com <Luke_Yin@asus.com>
Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
rt5645.c support both rt5645 and rt5650 codec. And the default
value of registers are not identical. So we use different regmap
for the two codecs.
Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Unmuting headphone has pop noise in particular hardware design. So we extend
the delay time in headphone unmuting sequence to avoid pop.
Signed-off-by: John Lin <john.lin@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
A first batch of updates targetted at v4.4. There are no substantial
core fixes here, the biggest block of changes is updates to the rcar
drivers and the addition of a CODEC driver for the AK4613.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQEcBAABAgAGBQJWBF7yAAoJECTWi3JdVIfQ1MEH/jnzSyEVIuG+l8UkMaz6gf4w
zGsM1KCn//mfPl7yAoOdsnElOLR+Fmf+0jx4pCPQKrjvBGwjwH/IwBR1rwuEeUPY
7d66efpWOKlTf3qpsF1S7ZIlAZOs0NFvo0jwA1ZY/pc3YEBekyWxbABk/uWAVrM5
HJJKafI7WeiYrF0l0z2sG7BpsFtr8JKqrOVM+SGaPTNn2k+/lQ1bwTk1liOEUbsv
oq8NFNrUWPBCwbUNJQxBOvmoXC6Oa6+JBVO3+SsoS0q2FweNpqtZopjmoqHM8CiN
SkBeFT+wYlSGSnnFgAXXA2+kq74TeP2CvToo6tw+gf4LZXydKIaAdeuT6M9weZA=
=8h3u
-----END PGP SIGNATURE-----
Merge tag 'asoc-v4.3-rc2' into asoc-next
ASoC: Updates for v4.4
A first batch of updates targetted at v4.4. There are no substantial
core fixes here, the biggest block of changes is updates to the rcar
drivers and the addition of a CODEC driver for the AK4613.
# gpg: Signature made Fri 25 Sep 2015 05:37:06 KST using RSA key ID 5D5487D0
# gpg: key CD7BEEBC: no public key for trusted key - skipped
# gpg: key CD7BEEBC marked as ultimately trusted
# gpg: key AF88CD16: no public key for trusted key - skipped
# gpg: key AF88CD16 marked as ultimately trusted
# gpg: key 16005C11: no public key for trusted key - skipped
# gpg: key 16005C11 marked as ultimately trusted
# gpg: key 5621E907: no public key for trusted key - skipped
# gpg: key 5621E907 marked as ultimately trusted
# gpg: key 5C6153AD: no public key for trusted key - skipped
# gpg: key 5C6153AD marked as ultimately trusted
# 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>"
The patch adds the HWEQ function for the speaker output. User can set the
HWEQ parameters using the ALSA binary control byte-by-byte. We use the
following struct array to store the HWEQ parameters for implementing as
simple as possible.
struct rt5645_eq_param_s {
unsigned short reg;
unsigned short val;
};
It supports the variant length of the HWEQ parameters that are required.
We add the validating function in the function "rt5645_hweq_put" of the
ALSA binary control to avoid the user that puts the invalid parameters.
In the HWEQ enable function of speaker event, we also add the validating
function to prevent that the invalid parameters are applied to codec.
The HWEQ parameters should be controlled by DAPM for a specific sequence,
so the parameters will be applied to the codec in the speaker power up
event of DAPM, and will be disabled in the speaker power down event of
DAPM.
Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
The patch rechecks the jack detect status after resuming from S3.
Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
We were getting build warning about "Section mismatch".
dmi_platform_intel_broadwell is being referenced from the probe function
rt5645_i2c_probe(), but dmi_platform_intel_broadwell was marked with
__initdata.
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Reviewed-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
The patch adds the codec reset setting in the shutdown function to prevent
the weird sound of the headphone happened by rebooting.
Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
The codec supports 4 channel recording with TDM on AIF1.
This patch modifies the DAI capability to allow it.
Signed-off-by: Ben Zhang <benzh@chromium.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Broadwell can not triger the IRQ falling and rising simultaneously,
so it can not detect jack-in and jack-out simultaneously.
We add a flag "jd_invert" to platform data. If this flag is set,
codec IRQ will be set to invert that forces IRQ as pulse when jack-in
and jack-out.
Signed-off-by: John Lin <john.lin@realtek.com>
Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Add DMI data for Buddy project.
Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: John Lin <john.lin@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
The patch removes the incorrect settings to avoid the pop sound in the
first playback with headphone after boot.
Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Add i2c shutdown function to prevent the pop sound of the headphone while
the system is rebooting or shutdowning. It de-initials the jack detection
function, and it cannot be turned off in _BIAS_OFF. If we don't de-initial
it, the pop sound will be heard in the situation of powering off. And
replace the related register settings from magic number to meaningful
defined name.
Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
The patch removes the incorrect setting of the JD mode. It will cause pop
sound in the booting time.
Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
The patch corrects the sequence of the jack detection. It will prevent the
pop sound while the jack plug in.
Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Remove the original calibration function and modify the depop and
calibration function to prevent the pop sound in the booting time.
Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
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>
I2S2_DAC pin can be used for I2S or GPIO. We should set it as GPIO
if we use GPIO5 as DMIC1 data pin.
Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
"ASoC: rt5645: Check if codec is initialized in workqueue handler"
adds a check if codec is NULL in rt5645_irq_detection, which
returns an int. However, "ASoC: rt5645: Remove irq_jack_detection
function" removes that function, and moves the code in
jack_detect_work, which returns void.
Remove the return value to fix compilation warning.
Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
Signed-off-by: Mark Brown <broonie@kernel.org>