summaryrefslogtreecommitdiff
path: root/sound/soc
AgeCommit message (Collapse)AuthorFilesLines
2013-09-27Merge remote-tracking branch 'asoc/fix/ab8500' into asoc-linusMark Brown1-1/+6
2013-09-27Merge remote-tracking branch 'asoc/fix/88pm860x' into asoc-linusMark Brown1-0/+3
2013-09-27ASoC: adav80x: Convert to direct regmap usageLars-Peter Clausen1-45/+102
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-27ASoC: adau1373: Issue soft reset on probeLars-Peter Clausen1-0/+2
Reset the device on probe to make sure that the register settings match the register cache defaults. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-27ASoC: adau1373: Remove ADAU1373_PLL_CTRL7 register definitionLars-Peter Clausen1-1/+0
There is no such register. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-27ASoC: adau1373: Convert to direct regmap usageLars-Peter Clausen1-60/+235
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-26ASoC: si476x: Remove custom register I/O implementationMark Brown1-45/+1
The current si476x I/O implementation wraps the regmap for the core with functions that make the register map cache only when the device is powered down. This implementation appears to be incomplete since there is no code to synchronise the cache so writes done while the core is powered down will be ignored, the device will only be configured if it is powered. A better and more idiomatic approach would be to have the MFD manage the cache, making the device cache only when it powers things down. This also allows ASoC to use the standard regmap helpers for the device which helps remove the ASoC custom ones so do convert to do that. Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-26Merge remote-tracking branch 'asoc/fix/fsl' into asoc-devmMark Brown1-2/+13
Conflicts: sound/soc/fsl/imx-sgtl5000.c
2013-09-26ASoC: imx-sgtl5000: Fix uninitialized pointer use in error pathPhilipp Zabel1-2/+2
This patch avoids to dereference the uninitialized data pointer if the error path is entered before devm_kzalloc is called (or if the allocation fails). It fixes the following warning: sound/soc/fsl/imx-sgtl5000.c: In function 'imx_sgtl5000_probe': sound/soc/fsl/imx-sgtl5000.c:175:18: warning: 'data' may be used uninitialized in this function [-Wmaybe-uninitialized] Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-26ASoC: imx-sgtl5000: do not use devres on a foreign devicePhilipp Zabel1-1/+4
Calling devm_clk_get with any device pointer other than our own confuses devres. Use clk_get instead. This avoids hitting the following warning in the imx-sgtl5000 error path: imx-sgtl5000 sound.12: snd_soc_register_card failed (-517) platform sound.12: Driver imx-sgtl5000 requests probe deferral ------------[ cut here ]------------ WARNING: CPU: 0 PID: 75 at drivers/base/dd.c:272 driver_probe_device+0x194/0x218() Modules linked in: snd_soc_sgtl5000(+) snd_soc_imx_sgtl5000 coda snd_soc_imx_audmux imx_sdma snd_soc_fsl_spdif snd_soc_fsl_ssi CPU: 0 PID: 75 Comm: udevd Not tainted 3.11.0-rc6+ #4682 Backtrace: [<80010bc4>] (dump_backtrace+0x0/0x10c) from [<80010d60>] (show_stack+0x18/0x1c) r6:00000110 r5:00000009 r4:00000000 r3:00000000 [<80010d48>] (show_stack+0x0/0x1c) from [<804f0764>] (dump_stack+0x20/0x28) [<804f0744>] (dump_stack+0x0/0x28) from [<8001a4a4>] (warn_slowpath_common+0x6c/0x8c) [<8001a438>] (warn_slowpath_common+0x0/0x8c) from [<8001a4e8>] (warn_slowpath_null+0x24/0x2c) r8:7f032000 r7:7f02f93c r6:cf8eaa54 r5:cf8eaa20 r4:80728a0c [<8001a4c4>] (warn_slowpath_null+0x0/0x2c) from [<80286bdc>] (driver_probe_device+0x194/0x218) [<80286a48>] (driver_probe_device+0x0/0x218) from [<80286cf4>] (__driver_attach+0x94/0x98) r7:00000000 r6:cf8eaa54 r5:7f02f93c r4:cf8eaa20 [<80286c60>] (__driver_attach+0x0/0x98) from [<802851c8>] (bus_for_each_dev+0x5c/0x90) r6:80286c60 r5:7f02f93c r4:00000000 r3:cf8ef03c [<8028516c>] (bus_for_each_dev+0x0/0x90) from [<80286654>] (driver_attach+0x24/0x28) r6:806d0424 r5:cf16a580 r4:7f02f93c [<80286630>] (driver_attach+0x0/0x28) from [<802861e4>] (bus_add_driver+0xdc/0x234) [<80286108>] (bus_add_driver+0x0/0x234) from [<802871d4>] (driver_register+0x80/0x154) r8:7f032000 r7:00000001 r6:7f02fa68 r5:7f02fa74 r4:7f02f93c [<80287154>] (driver_register+0x0/0x154) from [<8033c278>] (i2c_register_driver+0x34/0xbc) [<8033c244>] (i2c_register_driver+0x0/0xbc) from [<7f032018>] (sgtl5000_i2c_driver_init+0x18/0x24 [snd_soc_sgtl5000]) r5:7f02fa74 r4:cfb7ff48 [<7f032000>] (sgtl5000_i2c_driver_init+0x0/0x24 [snd_soc_sgtl5000]) from [<80008738>] (do_one_initcall+0xf4/0x150) [<80008644>] (do_one_initcall+0x0/0x150) from [<80053f64>] (load_module+0x174c/0x1db4) [<80052818>] (load_module+0x0/0x1db4) from [<800546ac>] (SyS_init_module+0xe0/0xf4) [<800545cc>] (SyS_init_module+0x0/0xf4) from [<8000e540>] (ret_fast_syscall+0x0/0x30) r6:00005b22 r5:00afed68 r4:00000000 ---[ end trace b24c5c3bb145dbdd ]--- Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Acked-by: Shawn Guo <shawn.guo@linaro.org> Reviewed-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-26ASoC: fsl_ssi: let check zero instead of check NO_IRQChen Gang1-1/+1
NO_IRQ may be defined as '(unsigned int) -1' in some architectures (arm, sh ...), and either may not be defined in some architectures which can enable SND_SOC_FSL_SSI (e.g. allmodconfig for arc). When irq_of_parse_and_map() fails, it will always return 0, so need check zero instead of NO_IRQ, or will cause compiling issue or run time bug in some architectures. Signed-off-by: Chen Gang <gang.chen@asianux.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-26ASoC: atmel-pcm: fix warningAndrew Morton1-1/+1
i386 allmodconfig: sound/soc/atmel/atmel-pcm.c: In function 'atmel_pcm_preallocate_dma_buffer': sound/soc/atmel/atmel-pcm.c:52: warning: cast to pointer from integer of different size Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-26ASoc: kirkwood: Extend the min and max number of bytes per periodJean-Francois Moine1-2/+2
This patch extends the min and max number of bytes per period. It mainly permits to reduce the sound delay in MIDI real-time playing. Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-26ASoC: tlv320aic32x4: Convert to direct regmap API usageMark Brown1-66/+23
This moves us towards being able to remove the duplicate register I/O functionality in ASoC and saves some code. Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-26ASoC: tlv320aic32x4: Move GPIO acquisition to I2C probeMark Brown1-5/+7
This is more idiomatic and interacts better with deferred probe. Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-26ASoC: sn95031: Convert to regmapMark Brown1-15/+20
This moves us towards being able to remove the duplicated register I/O functionality in ASoC. Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-25ASoC: mc13783: Use regmap directly from ASoCMark Brown1-46/+9
As part of a push to remove the register I/O functionality from ASoC (since it is now duplicated in the regmap API) convert the mc13783 driver to use regmap directly. Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-25mfd: mc13xxx: Move SPI erratum workaround into SPI I/O functionMark Brown1-4/+0
Move the workaround for double sending AUDIO_CODEC and AUDIO_DAC writes into the SPI core, aiding refactoring to eliminate the ASoC custom I/O functions and avoiding the extra writes for I2C. Signed-off-by: Mark Brown <broonie@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2013-09-25ASoC: tlv320aic26: Convert to direct regmap API usageMark Brown2-72/+13
This moves us towards being able to remove the duplicated register I/O code in ASoC. The datasheet and the driver document the device as having a register map divided into pages but since the paging is actually done by sending the page address and the register address with each transaction this is no different to having a simple register address. The datasheet does also document the low five bits of the 16 bit "command" as unused which we could represent as padding but it seems simpler and less confusing to things that use block transfers or autoincrement to represent these as part of the register address. Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-25ASoC: tlv320aic26: Use snd_soc_update_bits()Mark Brown1-38/+13
Use snd_soc_update_bits() rather than open coding. Since the register cache is currently only used where update_bits() is used this means the current register cache can be removed entirely. Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-25ASoC: tlv320aic26: Convert to table based control initMark Brown1-7/+3
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-24ASoC: tlv320aic23: Convert to direct regmap API usageMark Brown1-23/+31
This moves us towards being able to remove the duplicated register I/O code in ASoC. Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-24ASoC: rsnd: use regmap instead of original register mapping methodKuninori Morimoto2-126/+143
Current Linux kernel is supporting regmap/regmap_field, and, it is good match for Renesas Sound Gen1/Gen2 register mapping. This patch uses regmap instead of original method for register access Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-24ASoC: rsnd: remove rsnd_priv_read/write/bset()Kuninori Morimoto2-7/+7
adg.c only used rsnd_priv_read/write/bset() which is the only user of NULL mod. but, it can be removed. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-24ASoC: cq93vc: Use regmap for I/OMark Brown1-21/+3
Avoid use of the ASoC-specific register I/O functions by converting to use the MMIO regmap provided the core MFD. Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-24ASoC: cq93vc: Use core I/O functionsMark Brown1-7/+9
Support future refactoring by using the core I/O functions rather than calling the driver provided I/O functions directly. Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-24ASoC: cq93vc: Use table based control registrationMark Brown1-4/+2
Saves a little code. Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-24ASoC: max9850: Convert to direct regmap API usageMark Brown1-10/+29
This prepares for removal of the duplicated register I/O functionality in ASoC. Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-24ASoC: max98088: Set max_registerMark Brown1-0/+1
Makes some of the debug functions more useful. Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-24ASoC: tlv320aic3x: Convert to direct regmap API usageMark Brown1-78/+73
This is slightly more complex than a standard regmap conversion due to the moderately detailed cache control and the open coding of a register patch for the class D speaker on the TLV320AIC3007. Although the device supports paging this is not currently implemented as the additional pages are only used during the application of the patch for the TLV320AIC3007. Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-24ASoC: tlv320aic3x: Don't reference cache datastructure directlyMark Brown1-5/+6
Rather than referencing the cache directly read back the values we are going to restore, supporting refactoring to use regmap. Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-24ASoC: tlv320aic3x: Move to table based DAPM initMark Brown1-6/+4
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-24ASoC: tlv320aic3x: Move to table based control initMark Brown1-2/+2
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-24ASoC: tlv320aic3x: Move resource acquisition to I2C probeMark Brown1-30/+33
This is more idiomatic and interacts better with deferred probing. Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-24ASoC: tlv320aic3x: Remove nonsense comment for register cacheMark Brown1-6/+0
Every statement in this comment is incorrect either through bitrot or (mostly) through never having corresponded to reality in the first place. Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-24ASoC: tlv320aic23: Convert to table based control initMark Brown1-3/+2
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-24ASoC: tlv320aic23: Remove #defines for I2CMark Brown1-24/+1
The only control interface supported by this driver is I2C so there is no need for conditional compilation around the control interface. Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-24ASoC: max98095: Convert to direct regmap API usageMark Brown1-268/+167
Saves code and moves us towards being able to remove the duplicate ASoC level register I/O functionality. Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-24ASoC: max90895: Convert to table based control initMark Brown1-10/+2
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-24ASoC: max98095: Remove custom hw_write() implementationMark Brown1-21/+4
The registers that are being kept uncached are marked as volatile anyway so the call has no practical impact. Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-24ASoC: ab8500: Explicitly set I/O upMark Brown1-0/+2
We do some I/O in probe so we need to ensure the I/O operations are fully set up then. Reported-by: Olof Johansson <olof@lixom.net> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-24ASoC: max98088: Convert to direct regmap API usageMark Brown1-329/+251
This saves code and moves us towards removing the redundant register I/O implementation in ASoC. Tested-by: Dylan Reid <dgreid@chromium.org> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-24ASoC: max98088: Use table based control initMark Brown1-3/+2
Tested-by: Dylan Reid <dgreid@chromium.org> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-24ASoC: max98088: Fix indentationMark Brown1-23/+23
Tested-by: Dylan Reid <dgreid@chromium.org> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-24ASoC: rcar: remove unnecessary mach/clock.hKuninori Morimoto1-1/+0
${LINUX}/sound/soc/sh driver can be compiled from SuperH and ARM. but, ${LINUX}/sound/soc/sh/rcar driver included SH-ARM specific header. This patch removes it Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-24ASoC: fsl: fsl_ssi: Fix simultaneous capture and playbackFabio Estevam1-11/+4
When doing simultaneous capture and playback on a mx6 board we get the following error: $ arecord -f cd | aplay -f cd imx-sgtl5000 sound.13: set sample size in capture stream first fsl-ssi-dai 2028000.ssi: ASoC: can't open interface 2028000.ssi: -11 ALSA lib pcm_dmix.c:1018:(snd_pcm_dmix_ open) unable to open slave aplay: main:660: audio open error: Device or resource busy Recording WAVE 'stdin' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo The 'arecord -f cd | aplay -f cd' always trigger cause the 'if (!first_runtime->sample_bits)' block to be true which returns an error. Adjust the logic inside fsl_ssi_startup(), so that we do not always hit the error when playing 'arecord | aplay' line for the first time. Reported-by: Chris Clepper <cgclepper@gmail.com> Suggested-by: Nicolin Chen <b42378@freescale.com> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-21ASoC: kirkwood: fix loss of external clock at probe timeJean-Francois Moine1-1/+4
At probe time, when the clock driver is not yet initialized, the external clock of the kirkwood sound device will not be usable. This patch fixes this problem defering the device probe. Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-20ASoC: ab8500: Convert register I/O to regmapMark Brown1-34/+30
As part of a general push to eliminate the duplicated register I/O support in ASoC convert ab8500 to use regmap. Signed-off-by: Mark Brown <broonie@linaro.org> Acked-by: Lee Jones <lee.jones@linaro.org>
2013-09-20ASoC: ab8500: Use ASoC I/O functionsMark Brown1-6/+4
In preparation for moving away from implementing the ASoC level register I/O functionality change direct calls to the ab8500 implementation of that to use snd_soc_write() Signed-off-by: Mark Brown <broonie@linaro.org> Acked-by: Lee Jones <lee.jones@linaro.org>
2013-09-20ASoC: ab8500: Downgrade noisy log messageMark Brown1-1/+1
Signed-off-by: Mark Brown <broonie@linaro.org> Acked-by: Lee Jones <lee.jones@linaro.org>