summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/rt5645.c
AgeCommit message (Collapse)AuthorFilesLines
2016-03-13Merge remote-tracking branch 'asoc/topic/rt5645' into asoc-nextMark Brown1-5/+10
2016-02-26ASoC: rt5645: extend delay time for headphone pop noiseJohn Lin1-1/+1
Headphone needs enough delay time before unmuting for avoiding pop sound. We extend the delay time to make sure headphone doesn't pop. Signed-off-by: John Lin <john.lin@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-02-26ASoC: rt5645: improve headphone pop when system resumes from S3John Lin1-4/+9
When playing audio through headphone, headphone makes pop noise if system resumes from S3 to S0. We modify the sequence of writing register for avoiding pop sound. Signed-off-by: John Lin <john.lin@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-02-10Merge remote-tracking branch 'asoc/fix/rt5645' into asoc-linusMark Brown1-1/+1
2016-01-21ASoC: rt5645: fix the shift bit of IN1 boostBard Liao1-1/+1
The shift bit of IN1 boost gain control is 12. Signed-off-by: Bard Liao <bardliao@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org
2016-01-11Merge remote-tracking branch 'asoc/topic/rt5645' into asoc-nextMark Brown1-4/+26
2016-01-11Merge tag 'asoc-v4.5' into asoc-nextMark Brown1-73/+219
ASoC: Updates for v4.5 This is quite a busy release on the driver front with a lot of new drivers being added but comparatively quiet on the core side with only one big change going in and that a fairly straightforward refactoring. - Conversion of the array of DAI links to a list by Mengdong Lin, supporting dynamically adding and removing DAI links. - Some more fixes for the topology code, though it is still not final and ready for enabling in production. We really need to get to the point where that can be done. - A pile of changes for Intel SkyLake drivers which hopefully deliver some useful initial functionality for systems with this chipset, though there is more work still to come. - New drivers for a number of Imagination Technologies IPs. - Lots of new features and cleanups for the Renesas drivers. - ANC support for WM5110. - New driver for Atmel class D speaker drivers. - New drivers for Cirrus CS47L24 and WM1831. - New driver for Dialog DA7128. - New drivers for Realtek RT5659 and RT56156. - New driver for Rockchip RK3036. - New driver for TI PC3168A # gpg: Signature made Wed 23 Dec 2015 00:42:40 GMT using RSA key ID 5D5487D0 # 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>" # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: 3F25 68AA C269 98F9 E813 A1C5 C3F4 36CA 30F5 D8EB # Subkey fingerprint: ADE6 68AA 6757 18B5 9FE2 9FEA 24D6 8B72 5D54 87D0
2016-01-06Merge remote-tracking branch 'asoc/fix/rt5645' into asoc-linusMark Brown1-0/+4
2016-01-05ASoC: rt5645: improve IRQ reaction time for HS buttonBard Liao1-0/+1
IRQ reaction time is not immediate when headset putton is pressed. This patch shortens the reaction time. 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>
2016-01-04ASoC: rt5645: Constify ACPI device idsMathias Krause1-2/+1
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>
2015-12-30ASoC: rt5645: add sys clk detectionBard Liao1-0/+4
Add system clock detection to prevent output DC from SPO. Signed-off-by: Bard Liao <bardliao@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-12-30ASoC: rt5645: use polling to support HS buttonBard Liao1-2/+24
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>
2015-11-30ASoC: rt5645: merge DMI tables of google projectsBard Liao1-61/+18
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>
2015-11-25Merge branch 'fix/rt5645' of ↵Mark Brown1-0/+7
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-rt5645
2015-11-25ASoC: rt5645: Add dmi_system_id "Google Terra"Bard Liao1-0/+7
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>
2015-11-20Merge branch 'fix/rt5645' of ↵Mark Brown1-1/+15
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-rt5645
2015-11-20ASoC: rt5645: Add dmi_system_id "Google Wizpig"Bard Liao1-0/+7
Add platform specific data for Wizpig project. Signed-off-by: Bard Liao <bardliao@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-11-16ASoC: rt5645: Add struct dmi_system_id "Google Edgar" for Chrome OSJohn Lin1-0/+7
Add platform specific data for Edgar project. Signed-off-by: John Lin <john.lin@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-11-16ASoC: rt5645: Separate regmap for rt5645 and rt5650Bard Liao1-9/+200
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>
2015-11-16ASoC: rt5645: Increase the delay time to imporve the HP pop noiseJohn Lin1-1/+1
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>
2015-11-16ASoC: rt5645: Use the mod_delayed_work instead of the queue_delayed_work and ↵Oder Chiou1-3/+1
cancel_delayed_work_sync Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-11-05ASoC: rt5645: Power up the RC clock to make sure the speaker volume adjust ↵Oder Chiou1-3/+35
properly Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-10-26Merge remote-tracking branch 'asoc/topic/rt5645' into asoc-nextMark Brown1-2/+137
2015-10-26Merge tag 'asoc-v4.3-rc2' into asoc-nextMark Brown1-1/+34
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>"
2015-10-23ASoC: rt5645: Add the HWEQ for the speaker outputOder Chiou1-0/+110
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>
2015-10-22ASoC: rt5645: Add dmi "Google Reks" for chromeJohn Lin1-0/+7
Signed-off-by: John Lin <john.lin@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-10-16ASoC: rt5645: Recheck the jack detect status after resuming from S3Oder Chiou1-0/+4
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>
2015-10-08ASoC: rt5645: fix build warningSudip Mukherjee1-1/+1
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>
2015-10-07Merge remote-tracking branches 'asoc/fix/db1200', 'asoc/fix/dwc', ↵Mark Brown1-3/+3
'asoc/fix/imx-ssi', 'asoc/fix/maintainers', 'asoc/fix/rt5645', 'asoc/fix/sgtl5000' and 'asoc/fix/tas2552' into asoc-linus
2015-10-05ASoC: rt5645: Prevent the weird sound of the headphone while rebootingOder Chiou1-0/+2
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>
2015-10-02ASoC: rt5645: Allow 4 channel recording on AIF1Ben Zhang1-1/+1
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>
2015-10-01ASoC: rt5645: Correct the naming and setting of ADC Boost Volume ControlOder Chiou1-3/+3
Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-10-01ASoC: rt5645: Add the control of ClassD modulator Speaker Gain RatioOder Chiou1-0/+12
Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-09-23Merge remote-tracking branch 'asoc/topic/rt5645' into asoc-nextMark Brown1-1/+34
2015-09-23ASoC: rt5645: Prevent the pop sound in case of playback and the jack is pluggingOder Chiou1-0/+3
Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-09-23ASoC: rt5645: Increase the delay time to remove the pop soundOder Chiou1-1/+1
Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-09-23ASoC: rt5645: Use the type SOC_DAPM_SINGLE_AUTODISABLE to prevent the weird ↵Oder Chiou1-2/+2
sound in runtime of power up Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-09-22ASoC: rt5645: Add jd_invert for BroadwellJohn Lin1-0/+7
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>
2015-09-22ASoC: rt5645: Add dmi for BroadwellJohn Lin1-1/+27
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>
2015-09-14Merge branch 'fix/rt5645' of ↵Mark Brown1-0/+7
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-fix-rt5645
2015-09-11ASoC: rt5645: Remove incorrect settingsOder Chiou1-6/+0
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>
2015-09-09ASoC: rt5645: Add struct dmi_system_id "Google Ultima" for chrome platformJohn Lin1-0/+7
Signed-off-by: John Lin <john.lin@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-30Merge remote-tracking branches 'asoc/topic/tas2552', 'asoc/topic/tas5086', ↵Mark Brown1-4/+3
'asoc/topic/tegra', 'asoc/topic/tlv' and 'asoc/topic/topology' into asoc-next
2015-08-30Merge remote-tracking branches 'asoc/topic/rcar', 'asoc/topic/reg-default', ↵Mark Brown1-5/+6
'asoc/topic/rl6231', 'asoc/topic/rockchip' and 'asoc/topic/rt286' into asoc-next
2015-08-30Merge remote-tracking branches 'asoc/topic/const', 'asoc/topic/cs35l32', ↵Mark Brown1-1/+1
'asoc/topic/cs4265' and 'asoc/topic/cs42l52' into asoc-next
2015-08-30Merge remote-tracking branch 'asoc/topic/ssm4567' into asoc-nextMark Brown1-1/+0
2015-08-30Merge remote-tracking branch 'asoc/topic/rt5645' into asoc-nextMark Brown1-206/+209
2015-08-30Merge remote-tracking branch 'asoc/fix/rt5645' into asoc-linusMark Brown1-0/+7
2015-08-27ASoC: rt5645: Prevent the pop sound of the headphone while rebooting or ↵Oder Chiou1-11/+24
shutdowning 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>
2015-08-25ASoC: rt5645: Add struct dmi_system_id "Google Celes" for chrome platformOder Chiou1-0/+7
Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org