- 16 2月, 2018 1 次提交
-
-
由 Fabio Estevam 提交于
Commit 8419caa7 ("ASoC: sgtl5000: Do not disable regulators in SND_SOC_BIAS_OFF") causes the sgtl5000 to fail after a suspend/resume sequence: Playing WAVE '/media/a2002011001-e02.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo aplay: pcm_write:2051: write error: Input/output error The problem is caused by the fact that the aforementioned commit dropped the cache handling, so re-introduce the register map resync to fix the problem. Suggested-by: NMark Brown <broonie@kernel.org> Signed-off-by: NFabio Estevam <fabio.estevam@nxp.com> Signed-off-by: NMark Brown <broonie@kernel.org> Cc: <stable@vger.kernel.org>
-
- 14 2月, 2018 1 次提交
-
-
由 Michal Oleszczyk 提交于
Current implementation mute codec in global way (DAC block). That means when user routes sound not from I2S but from AUX source (LINE_IN) it also will be muted by alsa core. This should not happen. Signed-off-by: NMichal Oleszczyk <oleszczyk.m@gmail.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 18 1月, 2018 2 次提交
-
-
由 Fabio Estevam 提交于
The "check ER1" message is not very clear about its meaning. Improve it a bit by referring to it as "ER1 erratum" so that it becomes clearer that ER1 references to a SGTL5000 erratum. Signed-off-by: NFabio Estevam <fabio.estevam@nxp.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Fabio Estevam 提交于
When the MCLK is not yet available when the codec is probed, probe deferral will happen and in this case we should not print an error message. Signed-off-by: NFabio Estevam <fabio.estevam@nxp.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 10 8月, 2017 1 次提交
-
-
由 Bhumika Goyal 提交于
Declare snd_soc_codec_driver structures as const as they are only passed as an argument to the function snd_soc_register_codec. This argument is of type const, so declare the structures with this property as const. In file codecs/sn95031.c, snd_soc_codec_driver structure is also used in a copy operation along with getting passed to snd_soc_register_codec. So, it can be made const too. Done using Coccinelle: @match disable optional_qualifier@ identifier s; position p; @@ static struct snd_soc_codec_driver s@p={...}; @good1@ identifier match.s; position p; @@ snd_soc_register_codec(...,&s@p,...) @bad@ identifier match.s; position p!={match.p,good1.p}; @@ s@p @depends on !bad disable optional_qualifier@ identifier match.s; @@ static +const struct snd_soc_codec_driver s={...}; Signed-off-by: NBhumika Goyal <bhumirks@gmail.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 21 7月, 2017 1 次提交
-
-
由 Fabio Estevam 提交于
Since commit a7295267 ("ASoC: sgtl5000: add avc support") the following kernel crash happens after running a 'reboot' command: ALSA: Storing mixer settings... [ 20.031604] Unable to handle kernel paging request at virtual address fffffffe [ 20.039268] pgd = de2a0000 [ 20.041999] [fffffffe] *pgd=8fffd861, *pte=00000000, *ppte=00000000 [ 20.048387] Internal error: Oops: 80000007 [#1] SMP ARM The function that takes a kcontrol parameter and returns the codec that registered the control is snd_soc_kcontrol_codec(), so use the correct function to fix the problem. Fixes: a7295267 ("ASoC: sgtl5000: add avc support") Signed-off-by: NFabio Estevam <fabio.estevam@nxp.com> Tested-by: NRichard Leitner <richard.leitner@skidata.com> Reviewed-by: NRichard Leitner <richard.leitner@skidata.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 14 6月, 2017 1 次提交
-
-
由 Richard Leitner 提交于
The sgtl5000 features an automatic volume control block (AVC), which reduces loud signals and amplifies low level signals for easier listening. This patch adds support for this AVC block to the driver. Apart from the "AVC Switch" control which enables the block following controls for the configuration of AVC are added: + AVC Threshold Volume: threshold where audio is compressed when the measured level is above or expanded when below + AVC Max Gain Volume: maximum gain which can be applied when the measured audio level is below threshold + AVC Hard Limiter Switch: when enabled the signal is limited to the programmed threshold. + AVC Integrator Response: response time of the integrator The AVC block is enabled and configured using the DAP_AVC_CTRL and DAP_AVC_THRESHOLD registers. Following 2 checkpatch.pl strict checks are ignored because the indentation style is different for the struct snd_kcontrol_new definition: patch:147: CHECK: Alignment should match open parenthesis patch:150: CHECK: Alignment should match open parenthesis Signed-off-by: NRichard Leitner <richard.leitner@skidata.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 11 4月, 2017 1 次提交
-
-
由 Fabio Estevam 提交于
Introduce the "lrclk-strength" property to allow LRCLK pad drive strength to be changed via device tree. When running a stress playback loop test on a mx6dl wandboard channel swap can be noticed on about 10% of the times. While debugging this issue I noticed that when probing the SGTL5000 LRCLK pin with the scope the swap did not happen. After removing the probe the swap started to happen again. After changing the LRCLK pad drive strength to the maximum value the issue is gone. Same fix works on a mx6dl Colibri board as well. Signed-off-by: NFabio Estevam <fabio.estevam@nxp.com> Tested-by: NMax Krummenacher <max.krummenacher@toradex.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 02 9月, 2016 1 次提交
-
-
由 Richard Leitner 提交于
These controls mute/unmute the LINEOUT and headphone outputs of SGTL5000 using its CHIP_ANA_CTRL register. Signed-off-by: NRichard Leitner <dev@g0hl1n.net> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 08 8月, 2016 1 次提交
-
-
由 Kuninori Morimoto 提交于
codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 12 7月, 2016 1 次提交
-
-
由 Kalle Kankare 提交于
This controls the volume for the line out pins of SGTL5000. Signed-off-by: NFabien Lahoudere <fabien.lahoudere@collabora.co.uk> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 15 6月, 2016 6 次提交
-
-
由 Eric Nelson 提交于
Disabling the SGTL5000 through regulators would certainly save more power than simply disabling the reference voltages as described in the data sheet, but won't properly restore things on resume. This driver does not support active regulators. So we simply disable the reference bias currents. Signed-off-by: NEric Nelson <eric@nelint.com> Signed-off-by: NClemens Gruber <clemens.gruber@pqgruber.com> Reviewed-by: NFabio Estevam <fabio.estevam@nxp.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Eric Nelson 提交于
To handle the soft reboot case, the internal PLL must be disabled in SGTL5000_CHIP_CLK_CTRL before clearing bits SGTL5000_VCOAMP_POWERUP and SGTL5000_PLL_POWERUP in register SGTL5000_CHIP_ANA_POWER. Signed-off-by: NEric Nelson <eric@nelint.com> Signed-off-by: NClemens Gruber <clemens.gruber@pqgruber.com> Tested-by: NFabio Estevam <fabio.estevam@nxp.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Eric Nelson 提交于
Initialize CHIP_ANA_POWER to match power on defaults, which disables ADC, DAC, and charge pumps. In the process, remove references to the following register/bitfields from the sgtl5000_set_power_regs routine: CHIP_ANA_POWER/LINREG_SIMPLE_POWERUP and CHIP_LINREG_CTRL/LINREG_VDD_MASK And remove CHIP_ANA_POWER and CHIP_LINREG_CTRL from the set of default registers so they don't get clobbered by sgtl5000_fill_defaults(). Signed-off-by: NEric Nelson <eric@nelint.com> Signed-off-by: NClemens Gruber <clemens.gruber@pqgruber.com> Tested-by: NFabio Estevam <fabio.estevam@nxp.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Eric Nelson 提交于
If an error occurs writing defaults, produce an error message but continue writing other registers. The failure of a single write should not cause catastrophic device failure. In at least one occurrence, I2C writes of CHIP_ANA_POWER were nacked, though continuing allowed the device to operate properly. Signed-off-by: NEric Nelson <eric@nelint.com> Signed-off-by: NClemens Gruber <clemens.gruber@pqgruber.com> Tested-by: NFabio Estevam <fabio.estevam@nxp.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Eric Nelson 提交于
Regulator support on SGTL5000 is broken because the VDDIO and VDDA and VDDD should be powered on before enabling MCLK as shown in Figure 4 of [1]. This requires moving control of the regulators from the codec block to the I2C block of the driver. The bulk of this patch consists of swapping the codec device with the i2c client. The new field num_supplies in struct sgtl5000_priv is used instead of ARRAY_SIZE(supplies) to handle the special case when the internal LDO is used instead of external VDDD. Note that ER1 in the SGTL5000 Errata document [2] suggests that all designs should use external VDDD. Since the internal LDO can only be enabled after I2C is available, there's no benefit in treating it as a regulator, so this patch removes the regulator structure surrounding it. Instead, a single block of code in sgtl5000_i2c_probe() performs the initialization sequence in section 2.2.1.1 of [3] and page 26 of [1]. References: [1] SGTL5000 data sheet http://cache.nxp.com/files/analog/doc/data_sheet/SGTL5000.pdf [2] SGTL5000 errata http://cache.nxp.com/files/analog/doc/errata/SGTL5000ER.pdf [3] SGTL5000 Initialization and programming app note http://cache.nxp.com/files/analog/doc/app_note/AN3663.pdfSigned-off-by: NEric Nelson <eric@nelint.com> Signed-off-by: NClemens Gruber <clemens.gruber@pqgruber.com> Tested-by: NFabio Estevam <fabio.estevam@nxp.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Clemens Gruber 提交于
All new designs should use external VDDD according to official documentation. See ER1 in errata sheet: http://cache.nxp.com/files/analog/doc/errata/SGTL5000ER.pdfSigned-off-by: NClemens Gruber <clemens.gruber@pqgruber.com> Tested-by: NFabio Estevam <fabio.estevam@nxp.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 17 12月, 2015 1 次提交
-
-
由 Jean-Michel Hautbois 提交于
When power up, a "pop" is heard on line-in and mic-in. An analysis of the PCM shows it lasts ~400ms and looks like a filter response. VAG power up should be delayed by 400ms as VAG power down is. Signed-off-by: NJean-Michel Hautbois <jean-michel.hautbois@veo-labs.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 01 10月, 2015 1 次提交
-
-
由 Gianluca Renzi 提交于
Signed-off-by: NGianluca Renzi <gianlucarenzi@eurekelettronica.it> Signed-off-by: NMark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org
-
- 30 9月, 2015 1 次提交
-
-
由 Gianluca Renzi 提交于
Cc: Liam Girdwood <lgirdwood@gmail.com> Cc: Takashi Iwai <tiwai@suse.com> Cc: Fabio Estevam <fabio.estevam@freescale.com> Cc: alsa-devel@alsa-project.org Cc: linux-kernel@vger.kernel.org Signed-off-by: NGianluca Renzi <gianlucarenzi@eurekelettronica.it> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 05 8月, 2015 1 次提交
-
-
由 Lars-Peter Clausen 提交于
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: NLars-Peter Clausen <lars@metafoo.de> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 15 7月, 2015 1 次提交
-
-
由 Krzysztof Kozlowski 提交于
i2c_driver does not need to set an owner because i2c_register_driver() will set it. Signed-off-by: NKrzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 12 5月, 2015 1 次提交
-
-
由 Lars-Peter Clausen 提交于
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: NLars-Peter Clausen <lars@metafoo.de> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 28 4月, 2015 1 次提交
-
-
由 Lars-Peter Clausen 提交于
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: NLars-Peter Clausen <lars@metafoo.de> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 27 4月, 2015 2 次提交
-
-
由 Alexander Stein 提交于
Currently LO_VOL_* stays at it's default (0x4 each) but this should be calculated after setting VAG_VAL and LO_VAGCNTRL. LO_VOL_* = 40 * log10(VAG_VAL / LO_VAGCNTRL) + 15 To avoid the log10 operation a table for all valid register values is precalculated which contains the corresponding value (VAG_VAL * 100 / LO_VAGCNTRL). Signed-off-by: NAlexander Stein <alexander.stein@systec-electronic.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Alexander Stein 提交于
This is a preparation for calculating lo_vol which needs both vag and lo_vag. Signed-off-by: NAlexander Stein <alexander.stein@systec-electronic.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 07 3月, 2015 1 次提交
-
-
由 Eric Nelson 提交于
The SGTL5000_CHIP_ANA_POWER register is cached. Update the cached value instead of writing it directly. Patch inspired by Russell King's more colorful remarks in this patch: https://github.com/SolidRun/linux-imx6-3.14/commit/dd4bf6aSigned-off-by: NEric Nelson <eric.nelson@boundarydevices.com> Signed-off-by: NMark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org
-
- 03 2月, 2015 1 次提交
-
-
由 Eric Nelson 提交于
To quote from section 1.3.1 of the data sheet: The SGTL5000 has an internal reset that is deasserted 8 SYS_MCLK cycles after all power rails have been brought up. After this time, communication can start ... 1.0us represents 8 SYS_MCLK cycles at the minimum 8.0 MHz SYS_MCLK. Signed-off-by: NEric Nelson <eric.nelson@boundarydevices.com> Reviewed-by: NFabio Estevam <fabio.estevam@freescale.com> Signed-off-by: NMark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org
-
- 30 1月, 2015 1 次提交
-
-
由 Filip Brozovic 提交于
Shift the I2S mode value by the necessary amount before writing the registers. This makes Right Justified and PCM mode work in addition to the default Left Justified mode. Signed-off-by: NFilip Brozovic <fbrozovic@gmail.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 15 1月, 2015 1 次提交
-
-
由 Lars-Peter Clausen 提交于
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: NLars-Peter Clausen <lars@metafoo.de> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 28 11月, 2014 2 次提交
-
-
由 Fabio Estevam 提交于
When trying to play a 8kHz file with codec in slave mode we get the following error on a mx28evk: $ aplay -Dhw:0,0 stereo_8k.wav Playing WAVE 'stereo_8k.wav' : Signed 16 bit Little Endian, Rate 8000 Hz, Stereo [ 21.218647] sgtl5000 0-000a: PLL not supported in slave mode [ 21.224559] sgtl5000 0-000a: 128 ratio is not supported. SYS_MCLK needs to be 256, 384 or 512 * fs [ 21.233687] sgtl5000 0-000a: ASoC: can't set sgtl5000 hw params: -22 aplay: set_params:1123: Unable to install hw params: This error happens because we are using 'sys_fs' instead of 'frame_rate' in the valid ratio check. Use the real'frame_rate' so that the ratio is correctly calculated and the playback can run. sgtl5000 codec manual states that in 'Synchronous SYS_MCLK input' mode that the following SYS_CLK frequencies are allowed: 256*fs, 384*fs, 512*fs. , where fs is the sampling frequency, which can be in the range of: 8, 11.025, 16, 22.5, 32, 44.1, 48, 96 kHz. Signed-off-by: NFabio Estevam <fabio.estevam@freescale.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Fabio Estevam 提交于
According to the sgtl5000 datasheet the MCLK frequency range restriction of 8 to 27 MHz only applies when the PLL is used - synchronous SYS_MCLK input mode. When running the codec as slave, the master should generate MCLK in the range of 256*fs, 384*fs or 512*fs, which is called asynchronous SYS_MCLK input mode. In asynchronous SYS_MCLK we cannot have the 8 to 27 MHz check because if we want to play a 8KHz sample rate track, with a MCLK of 8k * 512 = 4.096MHz the current check would return -EINVAL, which is not correct. Remove the 8 to 27MHz frequency check, since this only applies to the synchronous SYS_MCLK input case. Signed-off-by: NFabio Estevam <fabio.estevam@freescale.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 14 11月, 2014 1 次提交
-
-
由 Fabio Estevam 提交于
On a mx28evk with a sgtl5000 codec we notice a loud 'click' sound to happen 5 seconds after the end of a playback. The SMALL_POP bit should fix this, but its definition is incorrect: according to the sgtl5000 manual it is bit 0 of CHIP_REF_CTRL register, not bit 1. Fix the definition accordingly and enable the bit as intended per the code comment. After applying this change, no loud 'click' sound is heard after playback Signed-off-by: NFabio Estevam <fabio.estevam@freescale.com> Signed-off-by: NMark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org
-
- 28 10月, 2014 1 次提交
-
-
由 Fabio Estevam 提交于
According to Documentation/CodingStyle - Chapter 14: "The preferred form for passing a size of a struct is the following: p = kmalloc(sizeof(*p), ...); The alternative form where struct name is spelled out hurts readability and introduces an opportunity for a bug when the pointer variable type is changed but the corresponding sizeof that is passed to a memory allocator is not." So do it as recommeded. Signed-off-by: NFabio Estevam <fabio.estevam@freescale.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 20 10月, 2014 3 次提交
-
-
由 Jean-Michel Hautbois 提交于
Some systems may require to specify a bias different than default (1.25V). This adds a property in sgtl5000 codec. The property is specified in milli-volts so that it is coherent with datasheet. Signed-off-by: NJean-Michel Hautbois <jean-michel.hautbois@vodalys.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Jean-Michel Hautbois 提交于
Some systems may require a different resistor than the default one (4K). This adds a property in sgtl5000 codec. It keeps the default of 4K when nothing is specified so it does not break existing code. Signed-off-by: NJean-Michel Hautbois <jean-michel.hautbois@vodalys.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Fabio Estevam 提交于
Fix grammar and typos. Besides that, also fix the comment about the range of SYS_MCLK, which is from 8 to 27 MHz. Signed-off-by: NFabio Estevam <fabio.estevam@freescale.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 03 10月, 2014 2 次提交
-
-
由 Fabio Estevam 提交于
According to the sgtl5000 datasheet the valid range for SYS_MCLK is from 8 to 27 MHz. Add a sanity check prior to enabling SYS_MCLK. Signed-off-by: NFabio Estevam <fabio.estevam@freescale.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Fabio Estevam 提交于
For sgtl5000 to operate in slave mode it can only work in "Synchronous SYS_MCLK input" mode. In this mode only the following rates can be supported: 256*Fs, 384*Fs, 512*Fs. Improve the error message to give a better indication as to why the clocking failed for slave mode: [ 12.515399] sgtl5000 1-000a: PLL not supported in slave mode [ 12.524124] sgtl5000 1-000a: 233 ratio is not supported. SYS_MCLK needs to be 256, 384 or 512 * fs [ 12.535938] sgtl5000 1-000a: ASoC: can't set sgtl5000 hw params: -22 Signed-off-by: NFabio Estevam <fabio.estevam@freescale.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 06 9月, 2014 1 次提交
-
-
由 Lars-Peter Clausen 提交于
Set the CODEC driver's suspend_bias_off flag rather than manually going to SND_SOC_BIAS_OFF in suspend and SND_SOC_BIAS_STANDBY in resume. This makes the code a bit shorter and cleaner. Since the ASoC core now takes care of setting the bias level to SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually anymore either. The manual transition to SND_SOC_BIAS_STANDBY at the end of CODEC probe() can also be removed as the core will automatically do this after the CODEC has been probed. Signed-off-by: NLars-Peter Clausen <lars@metafoo.de> Signed-off-by: NMark Brown <broonie@kernel.org>
-