summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/rt5645.c
AgeCommit message (Collapse)Author
2016-05-05ASoC: rt5645: polling jd status in all conditionsBard Liao
We only polling jd status when rt5645->pdata.jd_invert is true. However, it should be done at all time since there will be no interrupt for jd if we press a headset button and remove the headset at the same time. Signed-off-by: Bard Liao <bardliao@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-03-21ASoC: rt5645: Add dmi_system_id "Google Setzer"John Lin
Add platform specific data for Setzer project. Signed-off-by: John Lin <john.lin@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-03-13Merge remote-tracking branch 'asoc/topic/rt5645' into asoc-nextMark Brown
2016-02-26ASoC: rt5645: extend delay time for headphone pop noiseJohn Lin
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 Lin
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 Brown
2016-01-21ASoC: rt5645: fix the shift bit of IN1 boostBard Liao
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 Brown
2016-01-11Merge tag 'asoc-v4.5' into asoc-nextMark Brown
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-05Merge remote-tracking branch 'asoc/fix/rt5645' into asoc-linusMark Brown
2016-01-05ASoC: rt5645: improve IRQ reaction time for HS buttonBard Liao
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 Krause
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 Liao
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 Liao
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 Liao
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 Brown
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 Liao
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 Brown
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 Liao
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 Lin
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 Liao
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 Lin
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 Chiou
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 Chiou
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 Brown
2015-10-26Merge tag 'asoc-v4.3-rc2' into asoc-nextMark Brown
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 Chiou
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 Lin
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 Chiou
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 Mukherjee
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 Brown
'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 Chiou
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 Zhang
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 Chiou
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 Chiou
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 Brown
2015-09-23ASoC: rt5645: Prevent the pop sound in case of playback and the jack is pluggingOder Chiou
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 Chiou
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 Chiou
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 Lin
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 Lin
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 Brown
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-fix-rt5645
2015-09-11ASoC: rt5645: Remove incorrect settingsOder Chiou
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 Lin
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 Brown
'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 Brown
'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 Brown
'asoc/topic/cs4265' and 'asoc/topic/cs42l52' into asoc-next
2015-08-30Merge remote-tracking branch 'asoc/topic/ssm4567' into asoc-nextMark Brown
2015-08-30Merge remote-tracking branch 'asoc/topic/rt5645' into asoc-nextMark Brown
2015-08-30Merge remote-tracking branch 'asoc/fix/rt5645' into asoc-linusMark Brown