summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/rt5645.c
Commit message (Collapse)AuthorAgeFilesLines
* ASoC: rt5645: Add dmi_system_id "Google Terra"Bard Liao2015-11-251-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>
* ASoC: rt5645: Add dmi_system_id "Google Wizpig"Bard Liao2015-11-201-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>
* ASoC: rt5645: Add struct dmi_system_id "Google Edgar" for Chrome OSJohn Lin2015-11-161-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>
* ASoC: rt5645: Increase the delay time to imporve the HP pop noiseJohn Lin2015-11-161-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>
* ASoC: rt5645: Power up the RC clock to make sure the speaker volume adjust ↵Oder Chiou2015-11-051-3/+35
| | | | | | | properly Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* Merge remote-tracking branch 'asoc/topic/rt5645' into asoc-nextMark Brown2015-10-261-2/+137
|\
| * ASoC: rt5645: Add the HWEQ for the speaker outputOder Chiou2015-10-241-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>
| * ASoC: rt5645: Add dmi "Google Reks" for chromeJohn Lin2015-10-231-0/+7
| | | | | | | | | | Signed-off-by: John Lin <john.lin@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * ASoC: rt5645: Recheck the jack detect status after resuming from S3Oder Chiou2015-10-161-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>
| * ASoC: rt5645: fix build warningSudip Mukherjee2015-10-081-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>
| * ASoC: rt5645: Prevent the weird sound of the headphone while rebootingOder Chiou2015-10-051-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>
| * ASoC: rt5645: Allow 4 channel recording on AIF1Ben Zhang2015-10-021-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>
| * ASoC: rt5645: Add the control of ClassD modulator Speaker Gain RatioOder Chiou2015-10-011-0/+12
| | | | | | | | | | Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | Merge tag 'asoc-v4.3-rc2' into asoc-nextMark Brown2015-10-261-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>"
| * \ Merge remote-tracking branch 'asoc/topic/rt5645' into asoc-nextMark Brown2015-09-231-1/+34
| |\ \ | | |/
| | * ASoC: rt5645: Add jd_invert for BroadwellJohn Lin2015-09-221-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>
| | * ASoC: rt5645: Add dmi for BroadwellJohn Lin2015-09-221-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>
| | |
| \ \
*-. \ \ Merge remote-tracking branches 'asoc/fix/db1200', 'asoc/fix/dwc', ↵Mark Brown2015-10-071-3/+3
|\ \ \ \ | |_|/ / |/| | | | | | | 'asoc/fix/imx-ssi', 'asoc/fix/maintainers', 'asoc/fix/rt5645', 'asoc/fix/sgtl5000' and 'asoc/fix/tas2552' into asoc-linus
| | * | ASoC: rt5645: Correct the naming and setting of ADC Boost Volume ControlOder Chiou2015-10-011-3/+3
| |/ / | | | | | | | | | | | | Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | | ASoC: rt5645: Prevent the pop sound in case of playback and the jack is pluggingOder Chiou2015-09-231-0/+3
| | | | | | | | | | | | | | | Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | | ASoC: rt5645: Increase the delay time to remove the pop soundOder Chiou2015-09-231-1/+1
| | | | | | | | | | | | | | | Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | | ASoC: rt5645: Use the type SOC_DAPM_SINGLE_AUTODISABLE to prevent the weird ↵Oder Chiou2015-09-231-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>
* | Merge branch 'fix/rt5645' of ↵Mark Brown2015-09-141-0/+7
|\ \ | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-fix-rt5645
| * | ASoC: rt5645: Add struct dmi_system_id "Google Ultima" for chrome platformJohn Lin2015-09-091-0/+7
| | | | | | | | | | | | | | | Signed-off-by: John Lin <john.lin@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | | ASoC: rt5645: Remove incorrect settingsOder Chiou2015-09-111-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>
| |
| \
| \
| \
*---. \ Merge remote-tracking branches 'asoc/topic/tas2552', 'asoc/topic/tas5086', ↵Mark Brown2015-08-301-4/+3
|\ \ \ \ | | | | | | | | | | | | | | | 'asoc/topic/tegra', 'asoc/topic/tlv' and 'asoc/topic/topology' into asoc-next
| | * | | ASoC: rt5645: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGELars-Peter Clausen2015-08-051-4/+3
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | | |
| \ \ \
| \ \ \
| \ \ \
*---. \ \ \ Merge remote-tracking branches 'asoc/topic/rcar', 'asoc/topic/reg-default', ↵Mark Brown2015-08-301-5/+6
|\ \ \ \ \ \ | | |_|/ / / | |/| | | | | | | | | | 'asoc/topic/rl6231', 'asoc/topic/rockchip' and 'asoc/topic/rt286' into asoc-next
| | | * | | ASoC: Add function "rl6231_get_pre_div" to correct the dmic clock calculationOder Chiou2015-08-051-3/+4
| | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | 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>
| | * | | regmap: Use reg_sequence for multi_reg_write / register_patchNariman Poushin2015-07-161-2/+2
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | | |
| \ \ \
*-. \ \ \ Merge remote-tracking branches 'asoc/topic/const', 'asoc/topic/cs35l32', ↵Mark Brown2015-08-301-1/+1
|\ \ \ \ \ | | |/ / / | | | | | | | | | | 'asoc/topic/cs4265' and 'asoc/topic/cs42l52' into asoc-next
| * | | | ASoC: Constify snd_soc_dai_ops variablesAxel Lin2015-07-151-1/+1
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | The snd_soc_dai_ops variables are not modified after initialization in these drivers, so make them const. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | | | Merge remote-tracking branch 'asoc/topic/ssm4567' into asoc-nextMark Brown2015-08-301-1/+0
|\ \ \ \
| * | | | ASoC: drivers: Drop owner assignment from i2c_driverKrzysztof Kozlowski2015-07-151-1/+0
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | Merge remote-tracking branch 'asoc/topic/rt5645' into asoc-nextMark Brown2015-08-301-206/+209
|\ \ \ \
| * | | | ASoC: rt5645: Prevent the pop sound of the headphone while rebooting or ↵Oder Chiou2015-08-271-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>
| * | | | ASoC: rt5645: Add the register RT5645_CHARGE_PUMP to readable check functionOder Chiou2015-08-251-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * | | | ASoC: rt5645: Remove the incorrect setting of the JD modeOder Chiou2015-08-251-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | | ASoC: rt5645: Modify the jack detection function to prevent the pop sound ↵Oder Chiou2015-08-251-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | while the jack plug in 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>
| * | | | ASoC: rt5645: Modify the headphone depop and calibration function to prevent ↵Oder Chiou2015-08-251-79/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the pop sound in the booting time 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>
| * | | | ASoC: rt5645: Remove return value in jack detect workNicolas Boichat2015-07-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "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>
| * | | | Merge branch 'fix/rt5645' of ↵Mark Brown2015-07-201-0/+3
| |\ \ \ \ | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-rt5645
| * | | | | ASoC: rt5645: Add regulator supportKoro Chen2015-07-171-3/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds basic regulator support for rt5645. Signed-off-by: Koro Chen <koro.chen@mediatek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * | | | | ASoC: rt5645: Fix missing free_irqKoro Chen2015-07-171-3/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The driver does not free irq when snd_soc_register_codec returns error. It does not return error when request irq failed, either. Add return when request irq failed, and free_irq if snd_soc_register_codec failed. Signed-off-by: Koro Chen <koro.chen@mediatek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * | | | | ASoC: rt5645: Remove unused rt5645 variableNicolas Boichat2015-07-171-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "ASoC: rt5645: Simplify rt5645_enable_push_button_irq" removes the test that accessed rt5645->pdata.jd_mode (that test is now done in rt5645_jack_detect only), so we do not need that variable anymore. Signed-off-by: Nicolas Boichat <drinkcat@chromium.org> Signed-off-by: Mark Brown <broonie@kernel.org>
| * | | | | ASoC: rt5645: Simplify rt5645_enable_push_button_irqNicolas Boichat2015-07-161-21/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | LDO2/Mic Det Power pins are already enabled/disabled in rt5645_jack_detect (the jack out code path previously did not disable those if button function is enabled: modify it to make it so). Signed-off-by: Nicolas Boichat <drinkcat@chromium.org> Signed-off-by: Mark Brown <broonie@kernel.org>
| * | | | | ASoC: rt5645: Update dapm pins when the card is not instantiated yetNicolas Boichat2015-07-161-25/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes sure the dapm state is consistent when the card is instantiated. However, if the card is not instantiated yet, we still update the registers manually in the "jack in" case, so that we can immediately report if a mic is present or not. Disabling "Mic Det Power" after detection, and on jack out, can wait until the card gets instantiated. Signed-off-by: Nicolas Boichat <drinkcat@chromium.org> Signed-off-by: Mark Brown <broonie@kernel.org>
| * | | | | ASoC: rt5645: Remove irq_jack_detection functionNicolas Boichat2015-07-141-31/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | irq_jack_detection is only called from rt5645_jack_detect_work: remove the function to simplify the code. Signed-off-by: Nicolas Boichat <drinkcat@chromium.org> Signed-off-by: Mark Brown <broonie@kernel.org>
| * | | | | Merge branch 'topic/codec-dapm' of ↵Mark Brown2015-07-071-42/+33
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-rt5645 Conflicts: sound/soc/codecs/rt5645.c
| | * | | | | ASoC: rt5645: Replace direct snd_soc_codec dapm field accessLars-Peter Clausen2015-07-071-41/+32
| | | |/ / / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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() and replace all other manual access to codec->dapm with snd_soc_codec_get_dapm(). Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
OpenPOWER on IntegriCloud