summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/sgtl5000.c
Commit message (Collapse)AuthorAgeFilesLines
*-. Merge remote-tracking branches 'asoc/topic/suspend', 'asoc/topic/tas2552', ↵Mark Brown2014-10-061-29/+1
|\ \ | | | | | | | | | 'asoc/topic/tegra', 'asoc/topic/tlv320aic31xx' and 'asoc/topic/tlv320aic3x' into asoc-next
| * | ASoC: sgtl5000: Cleanup bias level transitionsLars-Peter Clausen2014-09-061-29/+1
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: sgtl5000: Do a sanity check on SYS_MCLKFabio Estevam2014-10-031-0/+9
| | | | | | | | | | | | | | | | | | | | 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: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: sgtl5000: Improve the error message on slave mode settingFabio Estevam2014-10-031-0/+3
|/ | | | | | | | | | | | | | | | | 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: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Mark Brown <broonie@kernel.org>
*-. Merge remote-tracking branches 'asoc/topic/tlv320aic3x', 'asoc/topic/width', ↵Mark Brown2014-08-041-5/+5
|\ \ | | | | | | | | | 'asoc/topic/wm0010', 'asoc/topic/wm8904' and 'asoc/topic/wm8962' into asoc-next
| | * ASoC: sgtl5000: Convert to params_width()Mark Brown2014-07-311-5/+5
| |/ | | | | | | | | | | The CODEC doesn't care how data is laid out in memory. Signed-off-by: Mark Brown <broonie@linaro.org>
| |
| \
*-. \ Merge remote-tracking branches 'asoc/topic/omap', 'asoc/topic/oom' and ↵Mark Brown2014-08-041-3/+1
|\ \ \ | | |/ | |/| | | | 'asoc/topic/pxa' into asoc-next
| | * ASoC: sgtl5000: Remove redundant OOM messageSachin Kamat2014-06-271-3/+1
| |/ | | | | | | | | | | | | Let memory subsystem handle the error logging. Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* / ASoC: sgtl5000: Fix driver unboundFabio Estevam2014-07-091-2/+9
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using the sgtl5000 codec driver as a module and trying to remove it causes the followig kernel oops: root@freescale /$ rmmod snd-soc-imx-sgtl5000 [ 117.122920] ------------[ cut here ]------------ [ 117.127609] WARNING: CPU: 0 PID: 631 at drivers/regulator/core.c:3604 regula) [ 117.137046] Modules linked in: snd_soc_imx_sgtl5000(-) snd_soc_sgtl5000 evbug [ 117.144315] CPU: 0 PID: 631 Comm: rmmod Not tainted 3.16.0-rc3-next-201407043 [ 117.153366] Backtrace: [ 117.155865] [<80011e5c>] (dump_backtrace) from [<80011ff8>] (show_stack+0x18) [ 117.163484] r6:802fcc48 r5:00000000 r4:00000000 r3:00000000 [ 117.169228] [<80011fe0>] (show_stack) from [<80668cc0>] (dump_stack+0x88/0xa) [ 117.176508] [<80668c38>] (dump_stack) from [<80029a38>] (warn_slowpath_commo) [ 117.184696] r5:00000009 r4:00000000 [ 117.188322] [<800299c8>] (warn_slowpath_common) from [<80029a80>] (warn_slow) [ 117.197150] r8:dd60d600 r7:ddfa6d00 r6:dd5d9064 r5:dd5e0f90 r4:dd5d9400 [ 117.203983] [<80029a5c>] (warn_slowpath_null) from [<802fcc48>] (regulator_u) [ 117.212828] [<802fcb74>] (regulator_unregister) from [<7f0047c4>] (ldo_regul) [ 117.223475] r4:dd59e300 r3:dd5e0f90 [ 117.227100] [<7f00479c>] (ldo_regulator_remove [snd_soc_sgtl5000]) from [<7f) [ 117.238959] r4:dd5d8000 r3:ddd51420 [ 117.242623] [<7f0047dc>] (sgtl5000_remove [snd_soc_sgtl5000]) from [<804e5b1) [ 117.252489] r5:00000000 r4:dd5d8000 [ 117.256111] [<804e5af8>] (soc_remove_codec) from [<804e5ed4>] (soc_remove_da) [ 117.264933] r4:ddfb640c r3:00000000 [ 117.268555] [<804e5c10>] (soc_remove_dai_links) from [<804e5fbc>] (snd_soc_u) [ 117.277810] r10:80359e48 r9:dd684000 r8:dd5ca800 r7:dd685e60 r6:00000001 r5c [ 117.285761] r4:dd5d9064 [ 117.288329] [<804e5f28>] (snd_soc_unregister_card) from [<804f29f0>] (devm_c) [ 117.297324] r6:00000004 r5:ddd0fc10 r4:dd5a7980 r3:804f29dc [ 117.303095] [<804f29dc>] (devm_card_release) from [<8035a418>] (release_node) [ 117.311369] [<8035a2a8>] (release_nodes) from [<8035aab4>] (devres_release_a) [ 117.319583] r10:00000000 r9:dd684000 r8:8000ed64 r7:00000081 r6:ddd0fc44 r54 [ 117.327543] r4:ddd0fc10 [ 117.330108] [<8035aa7c>] (devres_release_all) from [<803571c8>] (__device_re) [ 117.339214] r4:ddd0fc10 r3:dd5d9010 [ 117.342989] [<80357148>] (__device_release_driver) from [<80357a48>] (driver) [ 117.351607] r5:7f00c9e4 r4:ddd0fc10 [ 117.355285] [<8035798c>] (driver_detach) from [<80357030>] (bus_remove_drive) [ 117.363454] r6:00000880 r5:00000000 r4:7f00c9e4 r3:dd6c3a80 [ 117.369195] [<80356fdc>] (bus_remove_driver) from [<803580b8>] (driver_unreg) [ 117.377683] r4:7f00c9e4 r3:dd60d480 [ 117.381305] [<80358088>] (driver_unregister) from [<80358bb4>] (platform_dri) [ 117.390642] r4:7f00ca28 r3:7f00c35c [ 117.394309] [<80358ba0>] (platform_driver_unregister) from [<7f00c370>] (imx) [ 117.406188] [<7f00c35c>] (imx_sgtl5000_driver_exit [snd_soc_imx_sgtl5000]) f) [ 117.417452] [<8008c2b8>] (SyS_delete_module) from [<8000eba0>] (ret_fast_sys) [ 117.425753] r6:5f636f73 r5:5f646e73 r4:00016f40 [ 117.430428] ---[ end trace 8fd8a5cb39e46d0e ]--- This problem is well explained by Russell King: "The sgtl5000 uses a two-stage initialisation process. The first stage is when the platform driver is probed, where some resources are found and initialised. The second stage is via the codec driver's probe function, where regulators are found and initialised using the managed resource support. The problem here is that this works fine until the codec driver is unbound. When this occurs, sgtl5000_remove() is called which is a no-op as far as the managed resource code is concerned. The regulators remain allocated, and their pointers in sgtl5000_priv remain valid. If the codec is now re-probed, it will again try and find the regulators, which will now be busy. This will fail. That's not the only problem - if using the LDO regulator, the regulator is unregistered from the regulator core code, but it still has a user. When the user is cleaned up (eg, by removing the module) it hits the free'd regulator, and this can oops the kernel. This bug was originally introduced by 63e54cd9caa3ce ("ASoC: sgtl5000: Use devm_regulator_bulk_get()")." This reverts commit 63e54cd9caa3ce. Tested on a imx53-qsb board. Reported-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org>
*-. Merge remote-tracking branches 'asoc/topic/samsung', 'asoc/topic/sgtl5000', ↵Mark Brown2014-06-031-60/+15
|\ \ | | | | | | | | | 'asoc/topic/simple' and 'asoc/topic/sirf' into asoc-next
| | * ASoC: sgtl5000: Fix the cache handlingFabio Estevam2014-05-271-60/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit e5d80e82e32e (ASoC: sgtl5000: Convert to use regmap directly) a kernel oops is observed after a suspend/resume sequence. The kernel oops happens inside sgtl5000_restore_regs() as codec->reg_cache is no longer a valid pointer. Add the remaining register entries into sgtl5000_reg_defaults[] and remove sgtl5000_restore_regs() completely, which allows suspend/resume to work fine and make the code simpler. Tested on a im53-qsb board. Reported-by: Shawn Guo <shawn.guo@freescale.com> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Tested-by: Shawn Guo <shawn.guo@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org>
| | |
| \ \
*-. \ \ Merge remote-tracking branches 'asoc/topic/rt5651', 'asoc/topic/samsung', ↵Mark Brown2014-05-221-9/+2
|\ \ \ \ | | |/ / | |/| / | | |/ 'asoc/topic/sgtl5000', 'asoc/topic/sh', 'asoc/topic/simple', 'asoc/topic/sirf', 'asoc/topic/sta350' and 'asoc/topic/tlv320dac33' into asoc-next
| | * ASoC: sgtl5000: Use devm_regulator_bulk_get()Fabio Estevam2014-04-241-9/+2
| |/ | | | | | | | | | | | | | | Using devm_regulator_bulk_get() can make the code cleaner and smaller as we do not need to call regulator_bulk_free() in the error and remove paths. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* / ASoC: Add snd_soc_kcontrol_codec() helper functionLars-Peter Clausen2014-04-141-2/+2
|/ | | | | | | | | | | | | | | For CODEC controls snd_kcontrol_chip() currently returns a pointer to the CODEC that registered the control. With the upcoming consolidation of platform and CODEC controls this will change. Prepare for this by introducing the snd_soc_kcontrol_codec() helper function that will hide the implementation details of how the CODEC for a control can be obtained. This will allow us to change this easily in the future. The patch also updates all CODEC drivers to use the new helper function. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* Merge remote-tracking branch 'asoc/topic/io' into asoc-nextMark Brown2014-03-131-8/+0
|\
| * ASoC: sgtl5000: Simplify ASoC probe codeXiubo Li2014-02-281-8/+0
| | | | | | | | | | Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* | ASoC: sgtl5000: Use SOC_ENUM_SINGLE_DECL()Takashi Iwai2014-02-231-4/+6
|/ | | | | | | | | Just replace with the helper macro. No functional change at all. Signed-off-by: Takashi Iwai <tiwai@suse.de> Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: sgtl5000: clean up sgtl5000_enable_regulators()Shawn Guo2013-12-181-40/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Function sgtl5000_enable_regulators() is somehow odd in handling the optional external VDDD supply. The driver can only enable this supply on SGTL5000 chip before revision 0x11, and of course when this external VDDD is present. It currently does something like below. 1. Check if regulator_bulk_get() on VDDA, VDDIO and VDDD will fail. If it fails, VDDD must be absent and it falls on internal LDO by calling sgtl5000_replace_vddd_with_ldo(). Otherwise, VDDD is used. And in either case, regulator_bulk_enable() will be called to enable 3 supplies. 2. In case that SGTL5000 revision is later than 0x11, even if external VDDD is present, it has to roll back the 'enable' and 'get' calls with regulator_bulk_disable() and regulator_bulk_free(), and starts over again by calling sgtl5000_replace_vddd_with_ldo() and regulator_bulk_enable(). Such back and forth calls sequence is complicated and unnecessary. Also, since commit 4ddfebd (regulator: core: Provide a dummy regulator with full constraints), regulator_bulk_get() will always succeeds because of the dummy regulator. Thus the VDDD detection is broken. The patch changes the flow to something like the following, which should be more reasonable and clear, and also fix the VDDD detection breakage. 1. Check if we're running a chip before revision 0x11, on which an external VDDD can possibly be an option. 2. If it is an early revision, call regulator_get_optional() to detect whether an external VDDD supply is available. 3. If external VDDD is present, call sgtl5000_replace_vddd_with_ldo() to update sgtl5000->supplies info. 4. Drop regulator_bulk_get() call in sgtl5000_replace_vddd_with_ldo(), and call it in sgtl5000_enable_regulators() no matter it's an external VDDD or internal LDO. 5. Call regulator_bulk_enable() to enable these 3 regulators. Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: sgtl5000: read chip revision for onceShawn Guo2013-12-161-13/+3
| | | | | | | | | Store chip revision in struct sgtl5000_priv when sgtl5000_i2c_probe() reads it out from register, so that we can use it in sgtl5000_enable_regulators() with no need to read register again. Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>
* Merge remote-tracking branch 'asoc/topic/sgtl5000' into asoc-nextMark Brown2013-08-221-3/+7
|\
| * ASoC: sgtl5000: fix codec clock source transition to avoid clockless momentOskar Schirmer2013-08-051-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | Powering down PLL before switching to a mode that does not use it is a bad idea. It would cause the SGTL5000 be without internal clock supply, especially on the I2C interface, which would make subsequent access to it fail. Thus, in case of not using PLL any longer, first set the mode control, then power down PLL. Signed-off-by: Oskar Schirmer <oskar@scara.com> Signed-off-by: Mark Brown <broonie@linaro.org>
| * ASoC: sglt5000: Provide the reg_stride fieldFabio Estevam2013-07-151-0/+1
| | | | | | | | | | | | | | | | | | | | | | sgtl5000 has 16-bit registers, and only even numbers are valid for its registers addresses. Let regmap knows about this feature by specifying the 'reg_stride' field, so that it can access only the valid registers. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* | ASoC: sgtl5000: fix buggy 'Capture Attenuate Switch' controlLothar Waßmann2013-08-011-1/+1
| | | | | | | | | | | | | | | | | | The SGTL5000 Capture Attenuate Switch (or "ADC Volume Range Reduction" as it is called in the manual) is single bit only. Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de> Reviewed-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* | ASoC: sgtl5000: prevent playback to be muted when terminating concurrent captureLothar Waßmann2013-08-011-3/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When a sound capture/playback is terminated while a playback/capture is running, power_vag_event() will clear SGTL5000_CHIP_ANA_POWER in the SND_SOC_DAPM_PRE_PMD event, thus muting the respective other channel. Don't clear SGTL5000_CHIP_ANA_POWER when both DAC and ADC are active to prevent this. Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de> Reviewed-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* | ASoC: sgtl5000: defer the probe if clock is not foundShawn Guo2013-07-161-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's not always the case that clock is already available when sgtl5000 get probed at the first time, e.g. the clock is provided by CPU DAI which may be probed after sgtl5000. So let's defer the probe when devm_clk_get() call fails and give it chance to try later. It fixes the regression on imx28 since commit 9e13f34 (ASoC: sgtl5000: Let the codec acquire its clock). [ 1.927637] sgtl5000 0-000a: Failed to get mclock: -2 [ 1.934280] sgtl5000: probe of 0-000a failed with error -2 [ 1.945906] mxs-sgtl5000 sound.13: ASoC: CODEC (null) not registered [ 1.953787] mxs-sgtl5000 sound.13: snd_soc_register_card failed (-517) [ 1.960865] platform sound.13: Driver mxs-sgtl5000 requests probe deferral Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>
* | ASoC: sglt5000: Fix the default value of CHIP_SSS_CTRLFabio Estevam2013-07-051-1/+1
|/ | | | | | | | | | According to the sgtl5000 reference manual, the default value of CHIP_SSS_CTRL is 0x10. Reported-by: Oskar Schirmer <oskar@scara.com> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org> Cc: stable@vger.kernel.org
* ASoC: sgtl5000: Use i2c_get_clientdata()Fabio Estevam2013-06-121-5/+1
| | | | | | | We should use i2c_get_clientdata() to get the codec private structure. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: sgtl5000: Let the codec acquire its clockFabio Estevam2013-06-101-4/+30
| | | | | | | | | | | | | | | | | On a mx6qsabrelite board the following error happens on probe: sgtl5000: probe of 0-000a failed with error -5 imx-sgtl5000 sound.13: ASoC: CODEC (null) not registered imx-sgtl5000 sound.13: snd_soc_register_card failed (-517) platform sound.13: Driver imx-sgtl5000 requests probe defer Prior to reading the codec ID we need to turn the SYS_MCLK clock, so let's enable the codec clock inside sgtl5000_i2c_probe(). Also remove the codec clock enable/disable functions from the machine driver. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: sgtl5000: Make device cache only when powered offMark Brown2013-06-051-0/+15
| | | | | | | When the regulators have been disabled mark the device as cache only so that we don't try to interact with the hardware. Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: sgtl5000: Fix VAG_POWER enabling/disabling orderMarek Vasut2013-06-041-9/+5
| | | | | | | | | | | | | | The VAG_POWER must be enabled after all other bits in CHIP_ANA_POWER and disabled before any other bit in CHIP_ANA_POWER. See the SGTL5000 datasheet (Table 31, BIT 7, page 42-43). Failing to follow this order will result in ugly loud "POP" noise at the end of playback. To achieve such order, use the _PRE and _POST DAPM widgets to trigger the power_vag_event, where the event type check has to be fixed accordingly as well. Signed-off-by: Marek Vasut <marex@denx.de> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: sgtl5000: Fix driver probe after resetFabio Estevam2013-05-121-0/+30
| | | | | | | | | | | | | | | | | | | | | | | After a 'reboot' command in Linux or after pressing the system's reset button the sgtl5000 driver fails to probe: sgtl5000 0-000a: Device with ID register ffff is not a sgtl5000 sgtl5000 0-000a: ASoC: failed to probe CODEC -19 imx-sgtl5000 sound.12: ASoC: failed to instantiate card -19 imx-sgtl5000 sound.12: snd_soc_register_card failed (-19) sgtl5000 codec does not have a reset line, nor a reset command in software, so after a system reset the codec does not contain the default register values from sgtl5000_reg_defaults[] anymore, as these are only valid after a power-on-reset cycle. Fix this issue by explicitly reading all the reset register values from sgtl5000_reg_defaults[] and writing them back into sgtl5000 to ensure a sane state. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Tested-by: Eric Nelson <eric.nelson@boundarydevices.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: sgtl5000: Read SGTL5000_CHIP_ID in i2c_probe()Fabio Estevam2013-05-121-15/+24
| | | | | | | | | | | The usual place for reading chip ID is inside i2c_probe, so move it there and also convert it to regmap. sgtl5000_enable_regulators() needs to read the chip revision, so keep the revision check there. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: sgtl5000: Convert to use regmap directlyFabio Estevam2013-05-121-34/+111
| | | | | Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: sgtl5000: Fix maximum value for microphone gainFabio Estevam2012-12-241-2/+2
| | | | | | | | | | | | | | sgtl5000 microphone gain only has 2 bits of resolution, so maximum value is 3. From Eric Nelson: "We also found that for the microphones we have here (commodity PC boom mics) a default value of 2 for the gain gives the best results." So change the default microphone gain as well. Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: codecs: remove __dev* attributesBill Pemberton2012-12-101-4/+4
| | | | | | | | | | | CONFIG_HOTPLUG is going away as an option. As result the __dev* markings will be going away. Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst, and __devexit. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: sgtl5000: enable VAG_POWER for LINE_INDong Aisheng2012-07-311-0/+1
| | | | | | | | | LINE_IN also needs VAG_POWER on or we may hear noise when directly route LINE_IN to Headphone Mux. Tested on imx28evk. Signed-off-by: Dong Aisheng <dong.aisheng@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: sgtl5000: remove unneeded snd_soc_dapm_new_widgets in probeDong Aisheng2012-07-241-2/+0
| | | | | | | | | | | | | | | | | | | | | There's a driver bug that sgtl5000 dapm widget kcontrols do not work. e.g. can not select capture mux with amixer tool(no error info prompted). The root cause is that we still call snd_soc_dapm_new_widgets in codec driver probe function afer converting to table based widgets. This will cause the card dapm widgets are instantiated before the dapm_routes are registered. Then, no available dapm widget pathes can be found during instantiation which finally will cause soc_dapm_mux_update_power to fail(can not find correct path with kcontrol) in snd_soc_dapm_put_enum_double function. Here we remove the unneeded snd_soc_dapm_new_widgets in codec probe and let the soc core to handle the register sequence properly. Then we can fix above issue. Signed-off-by: Dong Aisheng <dong.aisheng@linaro.org> Acked-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* Merge tag 'sound-3.5' of ↵Linus Torvalds2012-05-231-18/+7
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound updates from Takashi Iwai: "This is the first big chunk for 3.5 merges of sound stuff. There are a few big changes in different areas. First off, the streaming logic of USB-audio endpoints has been largely rewritten for the better support of "implicit feedback". If anything about USB got broken, this change has to be checked. For HD-audio, the resume procedure was changed; instead of delaying the resume of the hardware until the first use, now waking up immediately at resume. This is for buggy BIOS. For ASoC, dynamic PCM support and the improved support for digital links between off-SoC devices are major framework changes. Some highlights are below: * HD-audio - Avoid accesses of invalid pin-control bits that may stall the codec - V-ref setup cleanups - Fix the races in power-saving code - Fix the races in codec cache hashes and connection lists - Split some common codes for BIOS auto-parser to hda_auto_parser.c - Changed the PM resume code to wake up immediately for buggy BIOS - Creative SoundCore3D support - Add Conexant CX20751/2/3/4 codec support * ASoC - Dynamic PCM support, allowing support for SoCs with internal routing through components with tight sequencing and formatting constraints within their internal paths or where there are multiple components connected with CPU managed DMA controllers inside the SoC. - Greatly improved support for direct digital links between off-SoC devices, providing a much simpler way of connecting things like digital basebands to CODECs. - Much more fine grained and robust locking, cleaning up some of the confusion that crept in with multi-component. - CPU support for nVidia Tegra 30 I2S and audio hub controllers and ST-Ericsson MSP I2S controolers - New CODEC drivers for Cirrus CS42L52, LAPIS Semiconductor ML26124, Texas Instruments LM49453. - Some regmap changes needed by the Tegra I2S driver. - mc13783 audio support. * Misc - Rewrite with module_pci_driver() - Xonar DGX support for snd-oxygen - Improvement of packet handling in snd-firewire driver - New USB-endpoint streaming logic - Enhanced M-audio FTU quirks and relevant cleanups - Increment the support of OSS devices to 256 - snd-aloop accuracy improvement There are a few more pending changes for 3.5, but they will be sent slightly later as partly depending on the changes of DRM." Fix up conflicts in regmap (due to duplicate patches, with some further updates then having already come in from the regmap tree). Also some fairly trivial context conflicts in the imx and mcx soc drivers. * tag 'sound-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (280 commits) ALSA: snd-usb: fix stream info output in /proc ALSA: pcm - Add proper state checks to snd_pcm_drain() ALSA: sh: Fix up namespace collision in sh_dac_audio. ALSA: hda/realtek - Fix unused variable compile warning ASoC: sh: fsi: enable chip specific data transfer mode ASoC: sh: fsi: call fsi_hw_startup/shutdown from fsi_dai_trigger() ASoC: sh: fsi: use same format for IN/OUT ASoC: sh: fsi: add fsi_version() and removed meaningless version check ASoC: sh: fsi: use register field macro name on IN/OUT_DMAC ASoC: tegra: Add machine driver for WM8753 codec ALSA: hda - Fix possible races of accesses to connection list array ASoC: OMAP: HDMI: Introduce codec ARM: mx31_3ds: Add sound support ASoC: imx-mc13783 cleanup mx31moboard: Add sound support ASoC: mc13783 codec cleanups ASoC: add imx-mc13783 sound support ASoC: Add mc13783 codec mfd: mc13xxx: add codec platform data ASoC: don't flip master of DT-instantiated DAI links ...
| * ASoC: Merge tag 'v3.4-rc3' into for-3.5Mark Brown2012-04-161-12/+13
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Linux 3.4-rc3 contains a bunch of Tegra changes which are conflicting annoyingly with the new development that's going on for Tegra so merge it up to resolve those conflicts. Conflicts: sound/soc/soc-core.c sound/soc/tegra/tegra_i2s.c sound/soc/tegra/tegra_spdif.c
| * | ASoC: codecs: Remove rtd->codec usage from CODEC driversMark Brown2012-04-041-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to support CODEC<->CODEC links remove the assumption that there is only a single CODEC on a DAI link by removing the use of the CODEC pointer in the rtd from the CODEC drivers. They are already being passed their DAI whenever they are passed an rtd and can get the CODEC from there. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * | ASoC: sgtl5000: Convert to module_i2c_driver()Mark Brown2012-04-041-11/+1
| | | | | | | | | | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * | ASoC: sgtl5000: Fix warning due to the lack of REGULATOR_CHANGE_VOLTAGEFabio Estevam2012-04-041-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix the following warning during kernel boot: 0-000a: 850 <--> 1600 mV at 1200 mV normal 0-000a: Voltage range but no REGULATOR_CHANGE_VOLTAGE Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * | ASoC: sgtl5000: Convert mic bias to a supply widgetMark Brown2012-04-011-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | No current users and it's the last user of MICBIAS_E(). Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Dong Aisheng <dong.aisheng@linaro.org> Acked-by: Zeng Zhaoming <zengzm.kernel@gmail.com> Tested-by: Shawn Guo <shawn.guo@linaro.org>
| | |
| \ \
*-. \ \ Merge remote-tracking branches 'regulator/topic/core', ↵Mark Brown2012-05-121-2/+6
|\ \ \ \ | | |/ / | |/| / | |_|/ |/| | 'regulator/topic/regmap' and 'regulator/topic/register' into regulator-next
| | * regulator: core: Use a struct to pass in regulator runtime configurationMark Brown2012-04-091-2/+6
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | Rather than adding new arguments to regulator_register() every time we want to add a new bit of dynamic information at runtime change the function to take these via a struct. By doing this we avoid needing to do further changes like the recent addition of device tree support which required each regulator driver to be updated to take an additional parameter. The regulator_desc which should (mostly) be static data is still passed separately as most drivers are able to configure this statically at build time. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* / ASoC: sgtl5000: Enable VAG when DAC/ADC upZeng Zhaoming2012-04-021-12/+13
|/ | | | | | | | | | | | As manual described, VAG is an internal voltage reference of DAC/ADC, So enabled it before DAC/ADC up. One more thing should care about is VAG fully ramped down requires 400ms, wait it to avoid pop. Signed-off-by: Zeng Zhaoming <zengzm.kernel@gmail.com> Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: sgtl5000: It's sgtl5000 not sgtl500Mark Brown2012-01-231-4/+4
| | | | | Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: sgtl5000: Convert to table based DAPM and control initFabio Estevam2012-01-221-10/+7
| | | | | | | Convert to table based DAPM and control init. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: sgtl5000: Print revision number in hexFabio Estevam2012-01-201-1/+1
| | | | | | | | | | Throughout the sgtl5000 driver source code and also in the sgtl5000 datasheet the revision code is shown in hexadecimal. Print it hex format, for consistency. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: sgtl5000: Fix wrong register name in restoreZeng Zhaoming2012-01-201-4/+13
| | | | | | | | | | | Correct SGTL5000_CHIP_CLK_CTRL to SGTL5000_CHIP_REF_CTRL in sgtl5000_restore_regs(), and add comment to explain the restore order. Reported-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Zeng Zhaoming <zengzm.kernel@gmail.com> Acked-by: Dong Aisheng <dong.aisheng@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>