Commit Graph

6233 Commits

Author SHA1 Message Date
Jiri Kosina
617677295b Merge branch 'master' into for-next
Conflicts:
	drivers/devfreq/exynos4_bus.c

Sync with Linus' tree to be able to apply patches that are
against newer code (mvneta).
2013-01-29 10:48:30 +01:00
Padmavathi Venna
313367e7bf ASoC: Samsung: Update Kconfig for I2S,SPDIF and PCM audio
Update Kconfig file to enable I2S,PCM audio for wm8994 and spdif on all
samsung platforms.

Signed-off-by: Sangsu Park <sangsu4u.park@samsung.com>
Signed-off-by: Sangbeom Kim <sbkim73@samsung.com>
Signed-off-by: Padmavathi Venna <padma.v@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-29 15:36:28 +08:00
Padmavathi Venna
28a4805833 ASoC: SMDK: WM8994: Add device tree support for machine file
Add the basic device tree based lookup.

Signed-off-by: Padmavathi Venna <padma.v@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-29 15:36:28 +08:00
Padmavathi Venna
40476f6189 ASoC: samsung: Add DT support for i2s
Add support for device based discovery.

Signed-off-by: Padmavathi Venna <padma.v@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-29 12:47:46 +08:00
Prashant Gaikwad
79cf5918aa ASoC: tegra: remove auxdata
Configlink clock information is added to device tree. Get the clocks
using device node. Remove AUXDATA.

Signed-off-by: Prashant Gaikwad <pgaikwad@nvidia.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
2013-01-28 11:19:33 -07:00
Prashant Gaikwad
61fd290d21 ARM: tegra: migrate to new clock code
Migrate Tegra clock support to drivers/clk/tegra, this involves
moving:
1. definition of tegra_cpu_car_ops to clk.c
2. definition of reset functions to clk-peripheral.c
3. change parent of cpu clock.
4. Remove legacy clock initialization.
5. Initialize clocks using DT.
6. Remove all instance of mach/clk.h

Signed-off-by: Prashant Gaikwad <pgaikwad@nvidia.com>
[swarren: use to_clk_periph_gate().]
Signed-off-by: Stephen Warren <swarren@nvidia.com>
2013-01-28 11:19:07 -07:00
Mark Brown
06dc374c70 Merge remote-tracking branch 'asoc/fix/adsp' into asoc-adsp
Conflicts:
	sound/soc/codecs/wm_adsp.c
2013-01-29 00:51:05 +08:00
Mark Brown
2d30b5751d ASoC: wm_adsp: Ensure ADSP2 DMAs are quiesced when DSP is halted
Maximise robustness for the widest range of firmwares by ensuring the DSP
is in a consistent state when halted.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-29 00:49:09 +08:00
Shawn Guo
1927661b17 ASoC: fsl: fix snd-soc-imx-pcm module build
When building modules with CONFIG_SND_IMX_SOC=m in imx_v6_v7_defconfig,
we will see the following link error.

  LD [M]  sound/soc/fsl/snd-soc-fsl-ssi.o
  LD [M]  sound/soc/fsl/snd-soc-fsl-utils.o
  LD [M]  sound/soc/fsl/snd-soc-imx-ssi.o
  LD [M]  sound/soc/fsl/snd-soc-imx-audmux.o
  LD [M]  sound/soc/fsl/snd-soc-imx-pcm.o
sound/soc/fsl/imx-pcm-dma.o: In function `init_module':
imx-pcm-dma.c:(.init.text+0x0): multiple definition of `init_module'
sound/soc/fsl/imx-pcm-fiq.o:imx-pcm-fiq.c:(.init.text+0x0): first defined here
sound/soc/fsl/imx-pcm-dma.o: In function `cleanup_module':
imx-pcm-dma.c:(.exit.text+0x0): multiple definition of `cleanup_module'
sound/soc/fsl/imx-pcm-fiq.o:imx-pcm-fiq.c:(.exit.text+0x0): first defined here
make[4]: *** [sound/soc/fsl/snd-soc-imx-pcm.o] Error 1

The module snd-soc-imx-pcm is designed to link imx-pcm.o with
imx-pcm-dma.o or imx-pcm-fiq.o depending on if option SND_SOC_IMX_PCM_DMA
or SND_SOC_IMX_PCM_FIQ is enabled.  Both imx-pcm-dma and imx-pcm-fiq
register their own module_platform_driver.  However, these two options
are not mutually exclusive and can be enabled together.  And that's
why we see above multiple init_module definition error.

Instead of having both imx-pcm-dma and imx-pcm-fiq register their
own platform_driver, we should do only once in imx-pcm.c.  Using
platform_device_id to distinguish between imx-pcm-dma and imx-pcm-fiq,
we can run-time call imx-pcm-dma/fiq specific initialization in .probe
hook to have module snd-soc-imx-pcm work for both cases.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-28 14:46:09 +08:00
Shawn Guo
93d7b7622c Revert "ASoC: fsl: fix multiple definition of init_module"
This reverts commit 25b8d31488.

While the commit fixes multiple init_module definition error with
module build, it breaks build when both imx-pcm-fiq and imx-pcm-dma
are built in as below.

  LD      sound/soc/fsl/snd-soc-fsl-ssi.o
  LD      sound/soc/fsl/snd-soc-fsl-utils.o
  LD      sound/soc/fsl/snd-soc-imx-ssi.o
  LD      sound/soc/fsl/snd-soc-imx-audmux.o
  LD      sound/soc/fsl/snd-soc-imx-pcm-fiq.o
  LD      sound/soc/fsl/snd-soc-imx-pcm-dma.o
  LD      sound/soc/fsl/snd-soc-eukrea-tlv320.o
  LD      sound/soc/fsl/snd-soc-imx-sgtl5000.o
  LD      sound/soc/fsl/snd-soc-imx-mc13783.o
  LD      sound/soc/fsl/built-in.o
sound/soc/fsl/snd-soc-imx-pcm-dma.o: In function `imx_pcm_free':
imx-pcm.c:(.text+0x464): multiple definition of `imx_pcm_free'
sound/soc/fsl/snd-soc-imx-pcm-fiq.o:imx-pcm-fiq.c:(.text+0x1a8): first defined here
sound/soc/fsl/snd-soc-imx-pcm-dma.o: In function `snd_imx_pcm_mmap':
imx-pcm.c:(.text+0x35c): multiple definition of `snd_imx_pcm_mmap'
sound/soc/fsl/snd-soc-imx-pcm-fiq.o:imx-pcm-fiq.c:(.text+0xa0): first defined here
sound/soc/fsl/snd-soc-imx-pcm-dma.o: In function `imx_pcm_new':
imx-pcm.c:(.text+0x3dc): multiple definition of `imx_pcm_new'
sound/soc/fsl/snd-soc-imx-pcm-fiq.o:imx-pcm-fiq.c:(.text+0x120): first defined here
make[4]: *** [sound/soc/fsl/built-in.o] Error 1

Let's revert the commit and find a proper fix for multiple init_module
definition error later.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-28 14:46:09 +08:00
Michal Bachraty
dde109fb46 ASoC: McASP: Fix data rotation for playback. Enables 24bit audio playback
u32 rotate = (32 - word_length) / 4;
This implementation is wrong, but it works only for 16, or 32 bit audio data.
(rotation for 16 or 32 bit is same as in code I present) Mcasp rotated data in
4 bits (max value 0x7)and then masks them . That data are sended to i2s bus.
For 24 bit or 20 bit or other data formats, this code rotates data badly and
you hear somethink like noise.  You need to use
u32 rotate = (word_length / 4) & 0x7;
to proper data rotation.

Signed-off-by: Michal Bachraty <michal.bachraty@streamunlimited.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-27 14:14:46 +08:00
Kuninori Morimoto
a7930ed458 ASoC: add snd_soc_of_parse_daifmt() for DeviceTree
This patch adds snd_soc_of_parse_daifmt() and supports below style on DT.

        [prefix]format = "i2c";
        [prefix]clock-gating = "continuous";
        [prefix]bitclock-inversion;
        [prefix]bitclock-master;
        [prefix]frame-master;

Each driver can use specific [prefix]
(ex simple-card,cpu,dai,format = xxx;)

This sample will be
SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_CONT |
SND_SOC_DAIFMT_IB_NF | SND_SOC_DAIFMT_CBM_CFM

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-27 11:41:54 +08:00
Dan Carpenter
0099d24c6b ASoC: dwc: fix support for more than two channels
There were missing break statements so everything used
TWO_CHANNEL_SUPPORT.

Also I added a return statement to silence a GCC warning:

	sound/soc/dwc/designware_i2s.c: In function ‘dw_i2s_hw_params’:
	sound/soc/dwc/designware_i2s.c:236:32: warning: ‘ch_reg’ may be
		used uninitialized in this function
		[-Wmaybe-uninitialized]

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Rajeev Kumar <rajeev-dlh.kumar@st.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-26 15:37:09 +08:00
Padmavathi Venna
2d77828d99 ASoC: Samsung: Add I2S S/W RST in startup function
I2S module need to be reset after S2R. Keeping the S/W rst
control part in resume didn't help in playing audio after resume.
So this patch adds S/W RST control part in startup function which
gets triggered for every new audio stream playback.

Signed-off-by: Padmavathi Venna <padma.v@samsung.com>
Signed-off-by: R. Chandrasekar <rcsekar@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-26 15:24:51 +08:00
Mark Brown
7480800ea6 ASoC: wm_adsp: Accept 0 as a parameter block address
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-26 11:39:44 +08:00
Mark Brown
36e8fe9901 ASoC: wm_adsp: Add speaker Tx as a firmware option
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-26 11:39:42 +08:00
Greg Kroah-Hartman
9f9cba810f Merge 3.8-rc5 into tty-next
This resolves a number of tty driver merge issues found in linux-next

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-25 13:27:36 -08:00
Sachin Kamat
ec05cc554e ASoC: tegra: Staticize some functions in tegra30_i2s.c
'tegra30_i2s_startup' and 'tegra30_i2s_shutdown' are used only in this file and
hence made static. Fixes the following sparse warnings:
sound/soc/tegra/tegra30_i2s.c:74:5: warning:
symbol 'tegra30_i2s_startup' was not declared. Should it be static?
sound/soc/tegra/tegra30_i2s.c:101:6: warning:
symbol 'tegra30_i2s_shutdown' was not declared. Should it be static?

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-24 18:55:17 +08:00
Sachin Kamat
ecb2c17434 ASoC: tegra: Use NULL instead of 0 for pointers
Fixes the following sparse warnings:
sound/soc/tegra/tegra30_ahub.c:583:16: warning:
Using plain integer as NULL pointer
sound/soc/tegra/tegra30_ahub.c:600:16: warning:
Using plain integer as NULL pointer

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-24 18:55:16 +08:00
Sachin Kamat
d58579e3c3 ASoC: tegra20_ac97: Remove __devinitconst attribute
__devinitconst has been removed from the kernel and gives
the following build errors:
sound/soc/tegra/tegra20_ac97.c:460:58: error: Expected ; at end of declaration
sound/soc/tegra/tegra20_ac97.c:460:58: error: got __devinitconst

Cc: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-24 18:55:15 +08:00
Sachin Kamat
b10fedf892 ASoC: tegra_wm9712: Remove __devinitconst attribute
This has been removed from the kernel recently and gives following build errors:
sound/soc/tegra/tegra_wm9712.c:155:58: error:
expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__devinitconst’
sound/soc/tegra/tegra_wm9712.c:165:21: error:
‘tegra_wm9712_of_match’ undeclared here (not in a function)

Cc: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-24 18:55:15 +08:00
Charles Keepax
202c8f7082 ASoC: soc-compress: Initialise delayed work to power down audio
Delayed work was scheduled but not initialised, this patch adds the
actual work and initialises it.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Tested-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-24 18:53:43 +08:00
Charles Keepax
15e2e6194a ASoC: soc-compress: Serialise compressed ops
Use the pcm_mutex to serialise the compressed ops.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Tested-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-24 18:53:34 +08:00
Charles Keepax
8c3d2aa4cf ASoC: soc-compress: Add missing brackets around else
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Tested-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-24 18:53:18 +08:00
Mark Brown
33e7546e19 ASoC: wm2000: Expose some additional registers
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-24 15:59:14 +08:00
Padmavathi Venna
7c62eebbf7 ASoC: samsung: Rename samsung i2s secondary device name
All Samsung SoCs has max 3 i2s controllers. So the i2s secondary fifo
interface device id was named as samsung-i2s.4. Renaming this to
"samsung-i2s-sec" to support device tree in i2s driver.

Signed-off-by: Padmavathi Venna <padma.v@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-24 14:40:13 +08:00
Chris Rattray
0098389564 ASoC: wm2200: Set system clock control register is adsp structs
Allows ADSP control code to set the dsp clock rate to match the
sys clock rate.

Signed-off-by: Chris Rattray <crattray@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-24 14:03:23 +08:00
Mark Brown
338c5188f6 ASoC: wm_adsp: Correct handling of some coefficeint blocks
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-24 00:42:27 +08:00
Thierry Reding
b25b5aa066 ASoC: Convert to devm_ioremap_resource()
Convert all uses of devm_request_and_ioremap() to the newly introduced
devm_ioremap_resource() which provides more consistent error handling.

devm_ioremap_resource() provides its own error messages so all explicit
error messages can be removed from the failure code paths.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Liam Girdwood <lrg@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-22 11:41:58 -08:00
Mark Brown
a8c136d2eb Merge remote-tracking branch 'asoc/fix/wm2200' into tmp 2013-01-22 16:26:33 +08:00
Mark Brown
32eca984f6 Merge remote-tracking branch 'asoc/fix/fsl' into tmp 2013-01-22 16:26:21 +08:00
Mark Brown
05780d7771 Merge remote-tracking branch 'asoc/fix/core' into tmp 2013-01-22 16:26:15 +08:00
Mark Brown
bc04c93bbc Merge remote-tracking branch 'asoc/fix/arizona' into tmp 2013-01-22 16:26:06 +08:00
Charles Keepax
a4cdbec758 ASoC: wm_adsp: Release firmware on error
This patch correctly releases the firmware if the magic string in the
firmware header does not match.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-22 16:40:26 +09:00
Charles Keepax
f63d944b71 ASoC: wm_adsp: Release firmware on error
This patch correctly releases the firmware if the magic string in the
firmware header does not match.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-22 16:27:21 +09:00
Mark Brown
b5a8fe439a ASoC: core: Ensure SND_SOC_BYTES writes are from DMA safe memory
With some buses the transfers may DMAed, especially for larger blocks.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-21 17:49:52 +09:00
Mark Brown
c94aa30eda ASoC: arizona: Allow number of channels clocked to be restricted
Place a cap on the number of channels clocks are generated for. This is
intended for use with systems which have the WM5102 master an I2S bus with
multiple data lines.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-21 17:47:39 +09:00
Mark Brown
20da6d5ac0 ASoC: wm_adsp: Provide explicit trace of coefficient writes
Helpful for debugging.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-21 17:46:35 +09:00
Mark Brown
69485d3e6d Merge remote-tracking branch 'asoc/fix/adsp' into asoc-adsp 2013-01-21 17:46:16 +09:00
Mark Brown
f2c26d48d9 ASoC: arizona: Support clearing clocks
Some systems may wish to support switching between telephony and CD audio
clock rates but this is restricted by enforcement of constraints on the
current DAI clock. Support setting clocks to zero and don't enforce any
constraints in that case in order to facilitate this use case.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-21 17:38:54 +09:00
Rusty Russell
373d4d0997 taint: add explicit flag to show whether lock dep is still OK.
Fix up all callers as they were before, with make one change: an
unsigned module taints the kernel, but doesn't turn off lockdep.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2013-01-21 17:17:57 +10:30
Mark Brown
f2a93e2a4c ASoC: wm_adsp: Use GFP_DMA for algorithm readback
Normally kmalloc() returns things that are DMA safe so not visible on all
platforms but we do need to explicitly request DMA safe memory.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-20 22:17:30 +09:00
Mark Brown
7881fd0fb3 ASoC: wm_adsp: Use GFP_DMA for things that may be DMAed
Normally kmalloc() returns things that are DMA safe so not visible on all
platforms but we do need to explicitly request DMA safe memory.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-20 22:14:34 +09:00
Mark Brown
25c62f7e70 ASoC: wm_adsp: Make region identification errors more informative
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-20 22:13:24 +09:00
Mark Brown
908a5741ab ASoC: wm2200: Implement EQ and LHPF coefficient configuration
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-20 22:10:25 +09:00
Mark Brown
20fc48632f ASoC: wm5100: Implement DRC, EQ and LHPF coefficient configuration
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-20 22:09:40 +09:00
Joe Millenbach
4f73bc4dd3 tty: Added a CONFIG_TTY option to allow removal of TTY
The option allows you to remove TTY and compile without errors. This
saves space on systems that won't support TTY interfaces anyway.
bloat-o-meter output is below.

The bulk of this patch consists of Kconfig changes adding "depends on
TTY" to various serial devices and similar drivers that require the TTY
layer.  Ideally, these dependencies would occur on a common intermediate
symbol such as SERIO, but most drivers "select SERIO" rather than
"depends on SERIO", and "select" does not respect dependencies.

bloat-o-meter output comparing our previous minimal to new minimal by
removing TTY.  The list is filtered to not show removed entries with awk
'$3 != "-"' as the list was very long.

add/remove: 0/226 grow/shrink: 2/14 up/down: 6/-35356 (-35350)
function                                     old     new   delta
chr_dev_init                                 166     170      +4
allow_signal                                  80      82      +2
static.__warned                              143     142      -1
disallow_signal                               63      62      -1
__set_special_pids                            95      94      -1
unregister_console                           126     121      -5
start_kernel                                 546     541      -5
register_console                             593     588      -5
copy_from_user                                45      40      -5
sys_setsid                                   128     120      -8
sys_vhangup                                   32      19     -13
do_exit                                     1543    1526     -17
bitmap_zero                                   60      40     -20
arch_local_irq_save                          137     117     -20
release_task                                 674     652     -22
static.spin_unlock_irqrestore                308     260     -48

Signed-off-by: Joe Millenbach <jmillenbach@gmail.com>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-18 16:15:27 -08:00
Mark Brown
ba3b8cd26d Merge remote-tracking branch 'asoc/topic/adsp' into asoc-wm2200 2013-01-18 17:54:36 +09:00
Chris Rattray
94e205bfb7 ASoC: wm_adsp: Set ADSP1 clock rate to match sys clock
Sets the ADSP1 clock rate to match the system clock
rate. To support this the codec driver provides
details of register containing the system clock
control bits.

Signed-off-by: Chris Rattray <crattray@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-18 17:46:28 +09:00
Mark Brown
e5ddd30321 ASoC: wm5102: Add controls for firmware selection
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-18 15:07:49 +09:00
Mark Brown
82e993fac4 ASoC: wm2200: Add controls for firmware enumeration
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-18 15:06:26 +09:00
Mark Brown
c712326d6c ASoC: wm_adsp: Implement support for coefficeint file format 1
Implement support for a new revision of the coefficeint file format for
ADSP cores.

Since coefficient file format 0 has not been widely deployed and is very
unlikely to ever be used with this driver code support for it has been
removed.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-18 15:02:17 +09:00
Lucas Stach
6995b8cb96 ASoC: tegra: add tegra machine driver using wm9712 codec
This adds a very simple machine driver using the Wolfson wm9712 AC97
codec.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-17 16:02:41 +09:00
Mark Brown
4706ccbbe8 Merge remote-tracking branch 'asoc/fix/arizona' into asoc-arizona
Conflicts:
	sound/soc/codecs/arizona.c
2013-01-17 15:31:54 +09:00
Mark Brown
b59e0f82aa ASoC: arizona: Use actual rather than desired BCLK when calculating LRCLK
Otherwise we'll get the wrong LRCLK if we need to pick a higher BCLK than
is required.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
2013-01-17 14:36:07 +09:00
Chris Rattray
a80cc73428 ASoC: wm2200: correct mixer values and text
Signed-off-by: Chris Rattray <crattray@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
2013-01-16 20:47:26 +09:00
Thierry Reding
e43fc6af25 ASoC: fsi: Remove __devinitconst
__devinitconst and friends have recently been removed and must not be
used anymore.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-16 20:28:59 +09:00
Mark Brown
c98137bfcb ASoC: arizona: Don't request FLL lock IRQ
We only log the result and since the interrupt triggers on loss of lock
during shutdown this may lead to spurious interrupts during shutdown
delaying the process.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-16 19:28:59 +09:00
Mark Brown
5851cb3daf ASoC: wm2200: Initialise the ADSPs
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-16 10:25:24 +09:00
Mark Brown
5e7a7a221f ASoC: wm_adsp: Add initialisation function for ADSP1
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-16 10:21:57 +09:00
Stephen Rothwell
c890caee54 ASoC: ak4642: remove __devinitconst annotation
CONFIG_HOTPLUG is always true now and the __dev* macros have been removed.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-14 13:52:21 +09:00
Kuninori Morimoto
9e7b6d60d8 ASoC: fsi: add device tree support
Support for loading the Renesas FSI driver via devicetree.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-14 08:27:18 +09:00
Lucas Stach
609dad9bdf ASoC: tegra: add ac97 host driver
This adds the driver for the Tegra 2x AC97 host controller.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-14 08:21:04 +09:00
Kuninori Morimoto
a4a2992c53 ASoC: simple-card: add asoc_simple_dai for initializing
Current simple-card driver calls asoc_simple_card_dai_init()
if platform had a asoc_simple_card_dai_init pointer.
And, this initialization function works only
when platform has an applicable initial value for each dai settings.
And basically, almost all sound card requires certain initialization.
This means that almost all platform has initialization settings,
and driver do nothing if it doesn't have settings.

And additionally, current simple-card supports sysclk settings but it was
only for codec.  In order to abolish deviation between cpu and codec,
and in order to simplify processing,
this patch adds asoc_simple_dai, and removed pointless
struct asoc_simple_dai_init_info which was trigger of
calling asoc_simple_card_dai_init().

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-14 06:55:43 +09:00
Mark Brown
2eebcef31a Merge branch 'topic/fsi' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-simple-card 2013-01-14 06:55:33 +09:00
Peter Ujfalusi
f4d8ada2a0 ASoC: tlv320dac33: Remove suspend/resume soc driver operations
With idle_bias_off these are no longer needed.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-13 21:34:47 +09:00
Mark Brown
f48aa39221 Merge remote-tracking branch 'asoc/fix/arizona' into asoc-arizona 2013-01-13 21:34:01 +09:00
Mark Brown
d37fb92326 Merge remote-tracking branch 'asoc/topic/adsp' into asoc-arizona 2013-01-13 21:33:03 +09:00
Mark Brown
57a10a1fc3 ASoC: wm5110: Provide MICSUPP widget for regulator driver
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-13 21:31:04 +09:00
Mark Brown
55e7276e93 ASoC: wm5102: Provide MICSUPP widget for regulator driver
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-13 21:31:03 +09:00
Mark Brown
1023dbd90c ASoC: wm_adsp: Add basic firmware selection support
There are many firmwares available for ADSP devices. Add basic support
for selecting between them, including a couple of feature sets in the
set of available firmware to start off with.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-12 18:36:07 +00:00
Mark Brown
7d5cb4f710 ASoC: wm5110: Correct AEC loopback mask
The generated defines in the header are pre-shifted.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-12 00:16:30 +00:00
Mark Brown
7f39bb9e9f ASoC: wm5102: Correct AEC loopback mask
The generated defines in the header are pre-shifted.

Reported-by: Heather Lomond <Heather.Lomond@wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-12 00:16:23 +00:00
Mark Brown
8784c77a6c ASoC: dapm: Fix sense of regulator bypass mode
Enable bypass when the regulator is idle, not when it is in use. This is
consistent with what the few existing users actually want.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-12 00:11:47 +00:00
Dan Carpenter
fffc0ca29f ASoC: pcm: delete some dead code
I've removed several unreachable returns.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-12 00:05:58 +00:00
Shawn Guo
25b8d31488 ASoC: fsl: fix multiple definition of init_module
With commit f2818d0 (ASoC: fsl: fix miscompilation of snd-soc-imx-pcm),
we will see the following build error when building modules with
CONFIG_SND_IMX_SOC=m in imx_v6_v7_defconfig.

  CC [M]  sound/soc/fsl/phycore-ac97.o
  LD [M]  sound/soc/fsl/snd-soc-fsl-ssi.o
  LD [M]  sound/soc/fsl/snd-soc-fsl-utils.o
  LD [M]  sound/soc/fsl/snd-soc-imx-ssi.o
  LD [M]  sound/soc/fsl/snd-soc-imx-audmux.o
  LD [M]  sound/soc/fsl/snd-soc-imx-pcm.o
sound/soc/fsl/imx-pcm-dma.o: In function `init_module':
imx-pcm-dma.c:(.init.text+0x0): multiple definition of `init_module'
sound/soc/fsl/imx-pcm-fiq.o:imx-pcm-fiq.c:(.init.text+0x0): first defined here
sound/soc/fsl/imx-pcm-dma.o: In function `cleanup_module':
imx-pcm-dma.c:(.exit.text+0x0): multiple definition of `cleanup_module'
sound/soc/fsl/imx-pcm-fiq.o:imx-pcm-fiq.c:(.exit.text+0x0): first defined here
make[4]: *** [sound/soc/fsl/snd-soc-imx-pcm.o] Error 1

Instead of using bool for SND_SOC_IMX_PCM_FIQ and SND_SOC_IMX_PCM_DMA
to fix the original issue, we should completely remove SND_SOC_IMX_PCM
and have imx-pcm.o statically linked with imx-pcm-fiq.o or imx-pcm-dma.o.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-12 00:05:14 +00:00
Ricardo Neri
a88fedfd34 ASoC: OMAP: HDMI: Initialize IEC-60958 channel status word
As the IEC-60958 channel status word is set by ANDing and ORing with
the appropriate definitions, the word bytes need to be initialized
to zero to avoid misconfiguration due to previous hw_params calls.

Signed-off-by: Ricardo Neri <rneri@dextratech.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-11 23:58:37 +00:00
Peter Ujfalusi
85becda62c ASoC: twl6040: Remove leftover code from hs/hf ramp implementation
The code to do the ramp has been removed a long time ago. Remove the
remaining code as well since this is not needed.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-11 23:55:12 +00:00
Peter Ujfalusi
da2107d1e4 ASoC: twl6040: Switch to use system workqueue for jack reporting
There's no need to create a queue for this anymore

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-11 23:54:57 +00:00
Peter Ujfalusi
9523fcdcc0 ASoC: twl6040: Convert to use devm_* when possible
In this way we can clean up the probe and remove paths

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-11 23:54:57 +00:00
Peter Ujfalusi
156db9f3bb ASoC: twl6040: Only set the bias_level once in twl6040_resume()
No need to set the bias_level twice to _STANDBY - since this is the only
state the device could be at suspend time. The driver do not support
idle_bias_off yet.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-11 23:54:57 +00:00
Peter Ujfalusi
09a8b6719c ASoC: twl4030: Remove suspend/resume soc driver operations
With idle_bias_off these are no longer needed.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-11 23:54:56 +00:00
Misael Lopez Cruz
8d61f4901f ASoC: twl6040: Convert PLUGINT to no-suspend irq
Convert headset PLUGINT interrupt to NO_SUSPEND type in order to
allow handling of insertion/removal events while device is suspended.

Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-11 23:54:47 +00:00
Kukjin Kim
232910d6bf ARM: S3C24XX: make h1940.h and h1940-latch.h local
The headers can be local in mach-s3c24xx/.

Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2013-01-10 10:45:35 -08:00
Kukjin Kim
b2ca78717c ARM: S3C24XX: make gta02.h local
The header can be local in mach-s3c24xx/ and sort out inclusions.
Accordingly, the GTA02_ macro in driver can be replaced.

Cc: Sangbeom Kim <sbkim73@samsung.com>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2013-01-10 10:45:35 -08:00
Mark Brown
49a170bcf2 Merge remote-tracking branch 'asoc/fix/wm5100' into tmp 2013-01-10 12:22:30 +00:00
Mark Brown
921c038d87 Merge remote-tracking branch 'asoc/fix/wm2200' into tmp 2013-01-10 12:22:29 +00:00
Mark Brown
28f2675db8 Merge remote-tracking branch 'asoc/fix/wm2000' into tmp 2013-01-10 12:22:26 +00:00
Mark Brown
92a9d1524e Merge remote-tracking branch 'asoc/fix/wm-adsp' into tmp 2013-01-10 12:22:25 +00:00
Mark Brown
a883eae513 Merge remote-tracking branch 'asoc/fix/sta529' into tmp 2013-01-10 12:22:22 +00:00
Mark Brown
fd2eab87a2 Merge remote-tracking branch 'asoc/fix/sgtl5000' into tmp 2013-01-10 12:22:17 +00:00
Mark Brown
c31b71de6f Merge remote-tracking branch 'asoc/fix/lm49453' into tmp 2013-01-10 12:22:15 +00:00
Mark Brown
fa17cb4a02 Merge remote-tracking branch 'asoc/fix/cs42l52' into tmp 2013-01-10 12:22:14 +00:00
Mark Brown
587691ea39 Merge remote-tracking branch 'asoc/fix/cs4271' into tmp 2013-01-10 12:22:11 +00:00
Mark Brown
a18a31a161 Merge remote-tracking branch 'asoc/fix/core' into tmp 2013-01-10 12:21:50 +00:00
Kuninori Morimoto
bbf1453e28 ASoC: ak4642: add Device Tree support
Support for loading the ak4642 codec module via devicetree.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-10 12:19:39 +00:00
Masanari Iida
c46d5c04f3 sound: soc: Fix typo in sound/codecs
Correct spelling typo in sound/soc/codecs

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2013-01-09 11:44:56 +01:00
Mark Brown
471f488583 ASoC: wm_adsp: Implement support for algorithm-specific coefficient blocks
WMDR coefficient files can specify coefficients in terms of algorithm
specific data regions. Record the start addresses of these regions while
parsing the algorithms and then use them to handle coefficients with
these formats.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-08 20:47:34 +00:00
Mark Brown
d62f4bc665 ASoC: wm_asdp: Validate sanity of algorithm count
If we run into I/O problems the algorithm count may be crazy, validate it
before we proceed and dump the read data for diagnostic purposes.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-08 20:47:32 +00:00
Mark Brown
45b9ee72d0 ASoC: wm_adsp: Factor out calculation of memory base addresses
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-08 20:47:30 +00:00
Mark Brown
db40517c75 ASoC: wm_adsp: Add support for parsing algorithms
ADSP devices report information on the algorithms loaded on them.  Parse
this data and use it to allow coefficients to be configured for specific
algorithms.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-08 20:47:29 +00:00
Charles Keepax
e31c194672 ASoC: arizona: Disable free-running mode on FLL1
The free running mode can cause problems when attempting to bring up the
FLL running from a defined clock source. This patch disables
free-running mode.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-08 18:01:17 +00:00
Fabio Estevam
324a7fb02b ASoC: mxs-saif: Use a signed integer for error value
saif->id and saif->master_id are unsigned, so they can not be negative.

Fix the following warning when building with W=1 option:

sound/soc/mxs/mxs-saif.c: In function 'mxs_saif_probe':
sound/soc/mxs/mxs-saif.c:676:2: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
sound/soc/mxs/mxs-saif.c:688:3: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
sound/soc/mxs/mxs-saif.c:692:2: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]

Use a signed variable 'ret' to handle the error values.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-08 17:58:32 +00:00
Fabio Estevam
4498a3cae5 ASoC: mxs-saif: Remove platform data
All MXS users have been converted to device tree and the board files have been
removed.

No need to keep platform data in the driver.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Dong Aisheng <dong.aisheng@linaro.org>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-08 11:23:26 +00:00
Mark Brown
a76fefab5c ASoC: wm_adsp: Ensure that block writes are from DMA aligned addresses
Otherwise we won't run correctly on systems that require this for larger
data transfers.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-07 19:13:35 +00:00
Mark Brown
b272efc860 ASoC: arizona: Factor out rate selection code
In preparation for more advanced sample rate managment move the existing
code out of the main hw_params() function.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-04 21:30:21 +00:00
Mark Brown
66b6eaf23a Merge branch 'fix/arizona' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-arizona 2013-01-04 21:30:16 +00:00
Mark Brown
bc9ab6d31c ASoC: arizona: Allow runtime reconfiguration of the output mode
Some systems use external analogue switches to connect more analogue
devices to the CODEC than are supported by the device.  In some systems
this requires changing the switched output from single ended to
differential mode dynamically at runtime. Add a new function
arizona_set_output_mode() to support this.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-04 21:20:59 +00:00
Mark Brown
267f8fa2e1 ASoC: wm2000: Fix sense of speech clarity enable
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
2013-01-04 21:19:42 +00:00
Mark Brown
5f960294e2 ASoC: wm5100: Remove DSP B and left justified formats
These are not supported

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
2013-01-04 21:06:08 +00:00
Mark Brown
91660bd65c ASoC: wm5102: Implement routing and power management for ISRCs
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-04 20:55:55 +00:00
Mark Brown
d71753e22b ASoC: arizona: Remove DSP B and left justified AIF modes
These are not supported.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
2013-01-04 11:33:22 +00:00
Mark Brown
0cc411b934 ASoC: wm2200: Remove DSP B and left justified AIF modes
These are not supported.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
2013-01-04 11:31:57 +00:00
Philippe De Muyter
9a32299394 powerpc, dma: move bestcomm driver from arch/powerpc/sysdev to drivers/dma
The bestcomm dma hardware, and some of its users like the FEC ethernet
component, is used in different FreeScale parts, including non-powerpc
parts like the ColdFire MCF547x & MCF548x families.  Don't keep the
driver hidden in arch/powerpc where it is inaccessible for other arches.
.c files are moved to drivers/dma/bestcomm, while .h files are moved to
include/linux/fsl/bestcomm.  Makefiles, Kconfigs and #include directives
are updated for the new file locations.

Tested by recompiling for MPC5200 with all bestcomm users enabled.

Signed-off-by: Philippe De Muyter <phdm@macqel.be>
Signed-off-by: Anatolij Gustschin <agust@denx.de>
2013-01-03 15:41:20 +01:00
Kuninori Morimoto
fd974e52db ASoC: fsi: don't use platform info pointer on probe()
Current FSI driver is using platform info pointer,
but it is not good design for DT support.
This patch made it not to use platform info pointer.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-03 12:49:54 +00:00
Mark Brown
1b8d52e63c ASoC: wm5102: Improve speaker enable performance
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-02 13:08:42 +00:00
Mike Dunn
01a61f490c ASoC: palm27x: register card in platform_driver probe
Remove creation of an soc-audio device from the machine platform_driver probe
function, and add a call to snd_soc_register_card() instead.

The current code still works, but this mechanism has been deprecated, if I'm not
mistaken.  The ASoC core code produces the warning "ASoC: machine Palm/PXA27x
should use snd_soc_register_card()"

Signed-off-by: Mike Dunn <mikedunn@newsguy.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-02 13:07:01 +00:00
Mike Dunn
016fb39c98 ASoC: palm27x: fix widgets and routes in dai_link init
ASoC core code now handles creation of controls and routing based on contents of
struct snd_soc_card, so remove calls to snd_soc_dapm_new_controls() and
snd_soc_dapm_add_routes() from the snd_soc_dai_link init function, and add
widget and route definitions to struct snd_soc_card.

Signed-off-by: Mike Dunn <mikedunn@newsguy.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-02 13:07:00 +00:00
Peter Ujfalusi
57d61b9d2d ASoC: OMAP: Remove obsolete machine drivers for Zoom2 and SDP3430
These boards are using the common omap-twl4030 machine driver, no need for
separate machine drivers anymore.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-02 13:04:25 +00:00
Peter Ujfalusi
bd0b286e83 ASoC: omap-twl4030: Add support for routing, voice port and jack detect
Update the common machine driver to support more boards including Zoom2 and
SDP3430.
- Support for voice port of twl4030
- HS jack plug detection support
- The audio routing can be fine tuned via pdata or via provided routing
  table from DT.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-02 13:04:25 +00:00
Peter Ujfalusi
fff3dd4013 ASoC: sdp3430: No need to configure pin mux for extmute
The codec driver takes care of this.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-02 13:04:25 +00:00
Peter Ujfalusi
5712ded9cf ASoC: twl4030: Configure extmute pinmux when the dedicated pin is in use
When HS extmute is enabled without custom GPIO we should configure the mux
to allow the pin to be used as extmute signal.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-02 13:04:25 +00:00
Peter Ujfalusi
e04d6e55fe ASoC: twl4030: Convert MICBIAS to SUPPLY widget
In order to avoid breakage update the machine drivers at the same time using
twl4030: omap3pandora, sdp3430 and zoom2

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-02 13:04:25 +00:00
Peter Ujfalusi
57296cc28c ASoC: sdp3430: No need to configure the Voice port anymore
The codec driver takes care of these bits.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-02 13:04:24 +00:00
Peter Ujfalusi
01df26edaf ASoC: zoom2: No need to configure the Voice port anymore
The codec driver takes care of these bits.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-02 13:04:24 +00:00
Peter Ujfalusi
927a77476e ASoC: twl4030: Correct the support for Voice port
In order to be able to use the Voice port of twl4030 three bits need to be
handled in VOICE_IF register:
VIF_EN: to enable the voice port (needed for both playback and capture)
VIF_DIN_EN: Need to be enabled for playback only (input to the codec)
VIF_DOUT_EN: Need to be enabled for capture only (output from codec)

Use DAPM_SUPPLY for the VIF_EN bit and add DAPM_AIF_IO/OUT widget to handle
the playback/capture bit.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-02 13:04:24 +00:00
Kuninori Morimoto
f89983ef61 ASoC: simple-card: use struct device pointer for dev_xxx()
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-12-27 16:51:16 +00:00
Fabio Estevam
5f3d25c08d ASoC: wm8985: Refactor set_pll code to avoid gcc warnings
Refactor set_pll code to avoid the following warnings:

sound/soc/codecs/wm8985.c:852:50: warning: 'pll_div.k' may be used uninitialized in this function
sound/soc/codecs/wm8985.c:849:9: warning: 'pll_div.n' may be used uninitialized in this function
sound/soc/codecs/wm8985.c:848:23: warning: 'pll_div.div2' may be used uninitialized in this function

Do the same as in commit 86ce6c9a (ASoC: WM8804: Refactor set_pll code to avoid
GCC warnings).

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-12-27 16:49:00 +00:00
Axel Lin
e958f8b806 ASoC: cs42l52: Convert to devm_input_allocate_device()
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-12-27 16:46:38 +00:00
Chuansheng Liu
d3bf156125 ASoC: core: fix the memory leak in case of remove_aux_dev()
When probing aux_dev, initializing is as below:
device_initialize()
device_add()

So when remove aux_dev, we need do as below:
device_del()
device_put()
Otherwise, the rtd_release() will not be called.

So here using device_unregister() to replace device_del(),
like the action in soc_remove_link_dais().
Signed-off-by: liu chuansheng <chuansheng.liu@intel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-12-27 16:14:43 +00:00
Chuansheng Liu
865df9cb12 ASoC: core: fix the memory leak in case of device_add() failure
After called device_initialize(), even device_add() returns
error, we still need use the put_device() to release the reference
to call rtd_release(), which will do the free() action.

Signed-off-by: liu chuansheng <chuansheng.liu@intel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-12-27 16:14:43 +00:00
Tejun Heo
8a47ca957a ASoC: wm8350: don't use [delayed_]work_pending()
There's no need to test whether a (delayed) work item in pending
before queueing, flushing or cancelling it.  Most uses are unnecessary
and quite a few of them are buggy.

Remove unnecessary pending tests from wm8350.  Only compile tested.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-12-24 16:10:22 +00:00
Axel Lin
3271a4fc7d ASoC: cs42l52: Catch no-match case in cs42l52_get_clk
In the case of no-match, return -EINVAL instead of 0.

Since we assign i to ret in the for loop, ret always less than
ARRAY_SIZE(clk_map_table). Thus remove the boundary checking for ret.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-12-24 16:02:19 +00:00
Lucas Stach
15fab58507 ASoC: tegra: setup DAP3<->DAC3 connection by default
This connection is used by the AC97 controller.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-12-24 16:01:08 +00:00
Lucas Stach
919ad49c21 ASoC: tegra: add function to set ac97 rate
AC97 uses a fixed rate, unrelated to the sample rate. Add a function to
make the setup more trivial.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-12-24 15:59:10 +00:00
Kuninori Morimoto
abca75814a ASoC: fsi: remove SH_FSI_xxx_INV flags
3449f5fab8
(ASoC: fsi: add SND_SOC_DAIFMT_INV_xxx support)
added clock inversion support via snd_soc_dai_set_fmt().
Thus, this patch removed SH_FSI_xxx_INV and fsi_get_info()
from fsi driver, and modified platform settings to use new style.
Then, it cleaned up meaningless settings from platform.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-12-24 15:57:09 +00:00
Kuninori Morimoto
6cbdbffba1 ASoC: fsi: remove platform depended .set_rate() callback support
ab6f6d8521
(ASoC: fsi: add master clock control functions)
added driver level clock control functions.
And now, platform depended .set_rate() is no longer needed.
This patch removed unnecessary .set_rate() platform callback support.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-12-24 15:56:55 +00:00
Fabio Estevam
6757d8cc0c ASoC: wm8993: Refactor set_pll code to avoid GCC warnings
Refactor set_pll code to avoid the following warnings:

sound/soc/codecs/wm8983.c:873:40: warning: 'pll_div.k' may be used uninitialized in this function [-Wuninitialized]
sound/soc/codecs/wm8983.c:870:9: warning: 'pll_div.n' may be used uninitialized in this function [-Wuninitialized]
sound/soc/codecs/wm8983.c:869:23: warning: 'pll_div.div2' may be used uninitialized in this function [-Wuninitialized]

Do the same as in commit 86ce6c9a (ASoC: WM8804: Refactor set_pll code to avoid
GCC warnings).

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-12-24 15:55:40 +00:00
Fabio Estevam
1edbd35667 ASoC: wm8804: Remove redundant check
The condition "if (!freq_in || !freq_out)" has already been tested previously,
so no need to do it again.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-12-24 15:54:27 +00:00
Daniel Mack
fd23fb9f6b ALSA: ASoC: cs4271: add optional soft reset workaround
The CS4271 requires its LRCLK and MCLK to be stable before its RESET
line is de-asserted. That also means that clocks cannot be changed
without putting the chip back into hardware reset, which also requires
a complete re-initialization of all registers.

One (undocumented) workaround is to assert and de-assert the PDN bit
in the MODE2 register.

This patch adds a new flag to both the DT bindings as well as to the
platform data to enable that workaround.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Acked-by: Alexander Sverdlin <subaparts@yandex.ru>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-12-24 15:53:28 +00:00
Mark Brown
133d2e6188 Merge branch 'asoc-fix-cs4271' into asoc-cs4271 2012-12-24 15:52:48 +00:00
Joachim Eastwood
153f5a18e4 ASoC: atmel-soc: make it buildable on other architectures
Not very useful on non AT91/AVR32 platforms but it provides
more build coverage and prepares for ARM multiplatform.

Also fixes a couple of format type warnings.

Signed-off-by: Joachim Eastwood <manabian@gmail.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-12-24 15:48:25 +00:00
MR.Swami.Reddy@ti.com
9dc754dfa7 ASoC: lm49453: Update lm49453_reg_defs values as per LM49453 HW revision-B
Update lm49453_reg_defs values as per LM49453 HW revision-B

Signed-off-by: M R Swami Reddy <mr.swami.reddy@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-12-24 15:45:10 +00:00
MR.Swami.Reddy@ti.com
88ac43924b ASoC: lm49453: Fix adc, mic and sidetone volume ranges
Add adc, mic, sidetone volume ranges and appropriately added the controls.
Fix the DAC HP/EP/LS/LO/HA maximum gain values.

Signed-off-by: MR Swami Reddy <mr.swami.reddy@ti.com>
Tested-by: Vinod Koul <vinod.koul@intel.com>

--
 sound/soc/codecs/lm49453.c |   43 ++++++++++++++++++++++++-------------------
 1 files changed, 24 insertions(+), 19 deletions(-)
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-12-24 15:43:56 +00:00
Mark Brown
d61100bbd1 ASoC: wm2000: Use clock API integration to configure MCLK divisor
Since we are now using the clock API integration to manage MCLK we can now
use clk_get_rate() to determine if we need to divide MCLK without relying
on platform data.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-12-24 15:42:35 +00:00
Mark Brown
514cfd6dd7 ASoC: wm2000: Integrate with clock API
Request MCLK as a clock and then enable it when carrying out a state
transtion and while ANC is active, minimising system power consumption
in idle modes.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-12-24 15:42:33 +00:00
Mark Brown
a8c02db029 ASoC: arizona: Correct FLL source definitions
The FLL source constants were numbered as a simple enumeration but were
being used in the code as direct values to be written to the registers.
Renumber the constants to reflect the usage.

Reported-by: Ryo Tsutsui <Ryo.Tsutsui@wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
2012-12-24 15:41:44 +00:00
Axel Lin
7110a287ff ASoC: arizona: Do proper shift for setting AIF rate
ARIZONA_AIF1_RATE_MASK is 0x7800 /* AIF1_RATE - [14:11] */
Thus we need left shift ARIZONA_AIF1_RATE_SHIFT when setting aif1 rate.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
2012-12-24 15:41:44 +00:00
Mark Brown
01df259f59 ASoC: arizona: Implement tristate support
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-12-24 15:39:23 +00:00
Mark Brown
bd7fe24bc4 ASoC: wm5110: Add noise gate control
The references used for the noise gates and parameters for their triggering
are configurable, expose that to users.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-12-24 15:39:11 +00:00