Commit Graph

313 Commits (0034102808e0dbbf3a2394b82b1bb40b5778de9e)

Author SHA1 Message Date
Linus Torvalds 1bfecd9358 ARM: board specific updates
These changes are all specific to one board only. We're trying to keep
 the number of board files low, but generally board level updates are
 ok on platforms that are working on moving towards DT based probing,
 which will eventually lead to removing them.
 
 The board-ams-delta.c board file gets a conflict between the removal of
 ams_delta_config and the addition of a lot of other data. The Kconfig
 file has two changes in the same line, and in exynos, the power domain
 cleanup conflicts with the addition of the image sensor device.
 
 Signed-off-by: Arnd Bergmann <arnd@arndb.de>
 [olof: Amended a fix for a mismerge to board-omap4panda.c]
 Signed-off-by: Olof Johansson <olof@lixom.net>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJPckIXAAoJEIwa5zzehBx35uUP/jns0renNAMmiu2vBHGQtn4z
 xiNXjDTJ8DeD4mKf17rjn/uaJgQ0w3Doq2nEsi5rPqLK4Uqqk+NG1zYa77QBWHbx
 FUgBPz+oViTDkanp4G8cygXvGfNkb1GvuJxEBvxQ1mwuG4JhwlFbQxGIaS8ZwOAN
 DIyVCgSXy40B+748RwdZ2AY7CYvWiQWrQYsIH6NO0rtZIXjyV0kIsyVtEXZpqWtF
 xNz2HHXVMrui2JQ7FQ0zZglY8+YCxjeJk4v++FfqCJiMzU1yZJw7E30NjhcWAaR6
 odJM2YIyhvunxPfx3ZUHimsNjfU+l/0uXgDHeLFSWVyIjPFXwqZDi/6onP3FI4Jc
 sIoTSwDAQpnZJ6KffAYkcyyfsWN61GOE96Xa2eRb6+78CEiMh7vJ8TIRieiOWxjm
 NbB0xzaKxa97F/8z7w6V6Z4dNhnokWJZvtJdgLZUYAqIgnxstFkJZ9+Tqt77G4t3
 5iSbIMeFPsfh5sUeAVjr5+zVeUOm9PTRI0n0RY+Wd16Ke6DO1qobKAYOzrzI5idz
 k7ni76/zgGn3NS5F3TxdRHowkeGUwUU6poyopgQ0pyscDylVpzgMIqmAwLdzrVp5
 joVEoKi6h4oqhAZtiysXuF85bUfCW0ziDUuib07SX8wcEIAIr+mWob1Ei+wJrefe
 g0Ch3ZbCRQMOwSOQ70Ci
 =HPiJ
 -----END PGP SIGNATURE-----

Merge tag 'boards' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull "ARM: board specific updates" from Arnd Bergmann/Olof Johansson:
 "These changes are all specific to one board only.  We're trying to
  keep the number of board files low, but generally board level updates
  are ok on platforms that are working on moving towards DT based
  probing, which will eventually lead to removing them.

  The board-ams-delta.c board file gets a conflict between the removal
  of ams_delta_config and the addition of a lot of other data.  The
  Kconfig file has two changes in the same line, and in exynos, the
  power domain cleanup conflicts with the addition of the image sensor
  device.

  Signed-off-by: Arnd Bergmann <arnd@arndb.de>
  [olof: Amended a fix for a mismerge to board-omap4panda.c]
  Signed-off-by: Olof Johansson <olof@lixom.net>"

Fixed up some fairly trivial conflicts manually.

* tag 'boards' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (82 commits)
  i.MX35-PDK: Add Camera support
  ARM : mx35: 3ds-board: add framebuffer device
  pxa/hx4700: Remove pcmcia platform_device structure
  ARM: pxa/hx4700: Reduce sleep mode battery discharge by 35%
  ARM: pxa/hx4700: Remove unwanted request for GPIO105
  ARM: EXYNOS: support Exynos4210-bus Devfreq driver on Nuri board
  ARM: EXYNOS: Register JPEG on nuri
  ARM: EXYNOS: Register JPEG on universal_c210
  ARM: S5PV210: Enable JPEG on SMDKV210
  ARM: S5PV210: Add JPEG board definition
  ARM: EXYNOS: Enable JPEG on Origen
  ARM: EXYNOS: Enable JPEG on SMDKV310
  ARM: EXYNOS: Add __init attribute to universal_camera_init()
  ARM: EXYNOS: Add __init attribute to nuri_camera_init()
  ARM: S5PV210: Enable FIMC on SMDKC110
  ARM: S5PV210: Enable FIMC on SMDKV210
  ARM: S5PV210: Enable MFC on SMDKC110
  ARM: S5PV210: Enable MFC on SMDKV210
  ARM: EXYNOS: Enable G2D on SMDKV310
  ARM: tegra: update defconfig
  ...
2012-03-27 16:27:28 -07:00
Arnd Bergmann a754a87ce8 Merge tag 'asoc-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into next/boards
The asoc branch that was already merged into v3.4 contains some
board-level changes that conflict with patches we already have
here, so pull in that branch to resolve the conflicts.

Conflicts:
	arch/arm/mach-imx/mach-imx27_visstrim_m10.c
	arch/arm/mach-omap2/board-omap4panda.c

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
[olof: Amended fix for mismerge as reported by Kevin Hilman]
Signed-off-by: Olof Johansson <olof@lixom.net>
2012-03-27 15:18:19 -07:00
Peter Ujfalusi d0f47ff17f ASoC: OMAP: Build config cleanup for McBSP
The McBSP driver stack has been moved, and rewritten resulting a single
driver - selected by CONFIG_SND_OMAP_SOC_MCBSP. There is no longer need to
have CONFIG_OMAP_MCBSP anymore.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Mark Brown <broonoie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@ti.com>
2012-03-12 13:34:25 +00:00
Grazvydas Ignotas 94a504c2e0 ASoC: omap-mcbsp: fix snd_pcm_hw_rule_add arguments
We are setting SNDRV_PCM_HW_PARAM_BUFFER_SIZE based on
SNDRV_PCM_HW_PARAM_CHANNELS, not vice versa. This bug didn't
have much impact because the rules are evaluated multiple times
by the core, and intended value got set eventually.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@ti.com>
2012-03-12 13:34:24 +00:00
Peter Ujfalusi 5788c62e72 ASoC: omap-mcbsp: Correct clock muxing for CLKR/FSR signals
Remove the no longer valid check for McBSP1 regarding to signal mux
selection (on OMAP4 McBSP4 has 6 pin setup).
Only clear the srgr2, pcr0 register configuration if the requested clock
configuration will actually going to touch it. In this way we can avoid
issues if the CLKR/FSR mux has been configured after the clock selection.

We are going to check for the valid McBSP port in the
omap_mcbsp_6pin_src_mux() function based on the validity of the mux_signal
callback (which is only valid for ports having 6 pin setup).

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@ti.com>
2012-03-12 13:34:23 +00:00
Peter Ujfalusi cd1f08c7f6 ASoC: omap-mcbsp: Single function CLKR/FSR source mux configuration
Use single function for the CLKR/FSR mux configuration.
OMAP2/3 has 6 pin configuration on McBSP1 instance, while on OMAP4
McBSP4 instance have the 6 pin configuration so the omap2_mcbsp1_mux_* is
not correct name for all support OMAP versions

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@ti.com>
2012-03-12 13:34:23 +00:00
Peter Ujfalusi 33cec39904 ARM/ASoC: OMAP McBSP: Move remainig defines from arch to ASoC header
Clock signal muxing, and functional clock related defines are only needed
in ASoC drivers.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Acked-by: Mark Brown <broonoie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@ti.com>
2012-03-12 13:34:23 +00:00
Peter Ujfalusi 73c9522e76 ASoC: omap McBSP: Clear rx_irq at probe time for OMAP4
On OMAP4 we have one interrupt line per McBSP port.
At probe time tx, and rx irq value will be -ENXIO,
and only the tx irq will get corrected.
In omap_mcbsp_request if the rx_irq is not 0 we proceed,
and try to request the interrupt, which will fail on
OMAP4 (rx_irq == -6).
To avoid this error, clear the rx_irq at probe time
on OMAP4.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Signed-off-by: Liam Girdwood <lrg@ti.com>
2012-03-12 13:34:23 +00:00
Peter Ujfalusi e386615c01 ASoC: omap-mcbsp: When closing the port select PRCM source for CLKS signal
If external source for the CLKS signal selection kept after the port is no
longer in use the system might refuse to go suspend.
There is also a chance that the external clock is not running when next
time the McBSP port is started which can result errors when we try to
access McBSP registers.
Reset the CLKS source back to PRCM source unconditionally.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Tested-by: Grazvydas Ignotas <notasas@gmail.com>
Signed-off-by: Liam Girdwood <lrg@ti.com>
2012-03-12 13:34:23 +00:00
Peter Ujfalusi 08905d8ab4 ASoC: omap-mcbsp: Configure wakeup in later phase
Configure the WAKEUPEN register at the same time we configure the rest of
the McBSP registers.
In case of OMAP3+, if the sysclock has been reconfigured we are going to
disable McBSP for the duration of the clock change, which will reset the
McBSP registers. The WAKEUPEN register need to be configured later, so
the changes will be effective during runtime.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicrocom>
Signed-off-by: Liam Girdwood <lrg@ti.com>
2012-03-12 13:34:23 +00:00
Peter Ujfalusi 58db1dcde0 ASoC: omap: mcbsp: Remove redundant checks for the st_data pointer
The parent functions of omap_st_start/stop also checks the validity of the
st_data pointer so we do not need to do it again inside of omap_st_start/stop

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Signed-off-by: Liam Girdwood <lrg@ti.com>
2012-03-12 13:34:23 +00:00
Peter Ujfalusi e2002ab35f ASoC: omap: mcbsp: Use uniform st_data pointer initialization
In this way we can save few lines, and have uniform way of initializing the
st_data in all functions.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Signed-off-by: Liam Girdwood <lrg@ti.com>
2012-03-12 13:34:23 +00:00
Peter Ujfalusi b8fb4907a7 ASoC: omap-mcbsp: Simplify DMA configuration
Configure the DMA request line, port address, and stream name at
probe time instead of every time we start a stream.
These settings are static in the system.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Tested-by: Grazvydas Ignotas <notasas@gmail.com>
Tested-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Signed-off-by: Liam Girdwood <lrg@ti.com>
2012-03-12 13:34:22 +00:00
Peter Ujfalusi 256d9c251f ASoC: omap-mcbsp: Merge the omap_mcbsp_data into omap_mcbsp structure
Since the drivers has been merged, merge the two structures together.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Tested-by: Grazvydas Ignotas <notasas@gmail.com>
Tested-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Signed-off-by: Liam Girdwood <lrg@ti.com>
2012-03-12 13:34:22 +00:00
Peter Ujfalusi 2ee6595069 ASoC: omap-mcbsp: Cleanup of module probe/remove code
Use devm_* where it is possible to save on cleanup path.
Start merging the two mcbsp file content.
Move pm_runtime_enable/disable calls to ASoC probe, remove from module
probe/remove time.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Tested-by: Grazvydas Ignotas <notasas@gmail.com>
Tested-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Signed-off-by: Liam Girdwood <lrg@ti.com>
2012-03-12 13:34:21 +00:00
Peter Ujfalusi cb40b63a22 ASoC: OMAP McBSP: Remove redundant accessors
We no longer need accessor functions for max_tx/rx_threshold, dma_op_mode
or for the FIFO size.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Tested-by: Grazvydas Ignotas <notasas@gmail.com>
Tested-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Signed-off-by: Liam Girdwood <lrg@ti.com>
2012-03-12 13:34:21 +00:00
Peter Ujfalusi 81da6a9e49 ASoC: OMAP: mcbsp.h: Clean up bit definitions
Use BIT() for bit position, correct field definition by adding mask to
them, and also adding the missing spaces around '<<'

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Tested-by: Grazvydas Ignotas <notasas@gmail.com>
Tested-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Signed-off-by: Liam Girdwood <lrg@ti.com>
2012-03-12 13:34:20 +00:00
Peter Ujfalusi 45656b44f6 ASoC: omap-mcbsp: Create a single driver for McBSP
The OMAP McBSP driver stack used to contain two different
drivers. One of them was used as kind low-level access to
the IP, while the other driver was the ASoC DAI driver.
There were global, shared structures, in different places,
the McBSP instances are reffered with id numbers (sometimes
0 based, in other cases 1 based id numbers).

Create one single driver for OMAP McBSP with name: omap-mcbsp.
Convert the old omap-mcbsp driver initially to be a library
for the omap-mcbsp DAI driver. With this change we can get rid
of all global variables, structures.

Further cleanup is coming...

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Tested-by: Grazvydas Ignotas <notasas@gmail.com>
Tested-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Signed-off-by: Liam Girdwood <lrg@ti.com>
2012-03-12 13:34:19 +00:00
Peter Ujfalusi 219f43164e ASoC: OMAP: McBSP: Consolidate plat/mcbsp.h content
Move most of the content of the plat/mcbsp.h header file under
sound/soc/omap/ to help further cleanups.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Tested-by: Grazvydas Ignotas <notasas@gmail.com>
Tested-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Signed-off-by: Liam Girdwood <lrg@ti.com>
2012-03-12 13:34:19 +00:00
Peter Ujfalusi 71e822e9dc OMAP: mcbsp: Move core driver under sound/soc/omap
In order to consolidate the McBSP driver move it out from
arch/arm/plat-omap directory under sound/soc/omap/

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Tested-by: Grazvydas Ignotas <notasas@gmail.com>
Tested-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Signed-off-by: Liam Girdwood <lrg@ti.com>
2012-03-12 13:34:19 +00:00
Janusz Krzysztofik 0379c1f55b ASoC: OMAP: ams-delta: drop .set_bias_level callback
This functionality has already been implemented in the cx20442 codec
driver (commit f75a8ff67d, "ASoC: cx20442:
add bias control over a platform provided regulator"), no need to keep
it here duplicated.

Once done, remove the no longer used AMS_DELTA_LATCH2_MODEM_NRESET
symbol from the board header file and a call to the regulator_toggle()
helper function from the old API wrapper found in the board file.  While
being at it, simplify the way the modem .pm callback handles the
regulator and drop that helper function and its related consumer setup
completely.

Depends on patches 1/3 and 2/3 for clean apply and keep things working.

Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Tony Lindgren <tony@atomide.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2012-03-05 11:25:34 -08:00
Takashi Iwai 650d6e25cd This has been a very active release for ASoC, as well as the usual raft
of bugfixes and driver updates there's quite a few framework enhancements.
 Most are either small or are laying the groundwork for user visible
 features (especially dynamic PCM), the most directly visible change is
 the dmaengine library.  There's also a bunch of regmap API enhancements
 pulled into the tree so that either the framework or drivers can take
 advantage of the new features.
 
 Changes include:
 
 - Support for widgets not associated with a CODEC, an important part of
   the dynamic PCM framework.
 
 - A library factoring out the common code shared by dmaengine based DMA
   drivers contributed by Lars-Peter Clausen.  This will save a lot of
   code and make it much easier to deploy enhancements to dmaengine.
 
 - Support for binary controls, used for providing runtime configuration
   of algorithm coefficients.
 
 - A new DAPM widget type for regulator supplies allowing drivers for
   devices that can power down unused supplies while active to do without
   any per-driver code.
 
 - DAPM widgets for DAIs, initially giving a speed boost for playback
   startup and shutdown and also the basis for CODEC<->CODEC DAI link
   support.
 
 - Support for specifying the number of significant bits on audio
   interfaces, useful for allowing applications to know how much effort to
   put into generating data for a larger sample format.
 
 - Conversion of the FSI driver used on some SH processors to DMAEngine.
 
 - New CODEC drivers for Maxim MAX9768 and Wolfson Microelectronics WM2200.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJPU4IOAAoJEBus8iNuMP3de34P/2aEhzOwxZE3DviqSR6qIag0
 exdEqMVUzoRoAJ5NHVFd4qClqUv7k6TxiDKdcIVXXjVm4L2imF5iqkB5VPK4dJSy
 YMYOIBtruHzTsUmjnJzbTc4GSk3lJ/GfYDPvrNslFBywkNy+uAoNRGQQN1wywgA0
 OJhbCoGfgtT+ULKLg9ke5ckHtdgkSFQNpGjb7IuGy+9JDH72CUiSbZzffxRGFR4X
 Ah2/5VuDqXj56ENfp011K7uMRTv2i57+388JAW7kGR/D5TBs3mTD5AkyJUvGYxVY
 bzfUyNoOek7X22mCSZEuP3W/rtyyuAaaA67yBbC1jTKpbACEriSVBauIApHPvUB5
 a9mz03V2knEcrCVgoyt0yMnvWh2UcWtH3BlaGZhlUrmrMvAEYKCW7xYRMScBvlDA
 NPUPBuf6MCMaKbpu+PnuyhTr4TVjkZqHSmotOMgiP5IUzzdlHzAgUSbnU/DQiNV0
 jS6u9+rkc8j9wRVkBXuzaj1uJ6iSI1T3ElS3WrpsMV33/HBqJLHY9LyWyxhBF3Su
 S4dGeo+I6zljrkZeAU4aNHWXRciv37TMNGNVYVs0xZajtLllgpp3IHrOCPzJtoXF
 tJwmXiZUdAo+3QQci0aH4p2Mem2RH2lLOrxKkKD65CqvNC6mCWC3Dc13B+kiZ/Qn
 9GVK/O9CRuwMcBdVsUy9
 =FpJH
 -----END PGP SIGNATURE-----

Merge tag 'asoc-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into topic/asoc

This has been a very active release for ASoC, as well as the usual raft
of bugfixes and driver updates there's quite a few framework enhancements.
Most are either small or are laying the groundwork for user visible
features (especially dynamic PCM), the most directly visible change is
the dmaengine library.  There's also a bunch of regmap API enhancements
pulled into the tree so that either the framework or drivers can take
advantage of the new features.

Changes include:

- Support for widgets not associated with a CODEC, an important part of
  the dynamic PCM framework.

- A library factoring out the common code shared by dmaengine based DMA
  drivers contributed by Lars-Peter Clausen.  This will save a lot of
  code and make it much easier to deploy enhancements to dmaengine.

- Support for binary controls, used for providing runtime configuration
  of algorithm coefficients.

- A new DAPM widget type for regulator supplies allowing drivers for
  devices that can power down unused supplies while active to do without
  any per-driver code.

- DAPM widgets for DAIs, initially giving a speed boost for playback
  startup and shutdown and also the basis for CODEC<->CODEC DAI link
  support.

- Support for specifying the number of significant bits on audio
  interfaces, useful for allowing applications to know how much effort to
  put into generating data for a larger sample format.

- Conversion of the FSI driver used on some SH processors to DMAEngine.

- New CODEC drivers for Maxim MAX9768 and Wolfson Microelectronics WM2200.
2012-03-05 15:07:33 +01:00
Axel Lin 625136eb4a ASoC: Fix build error in sound/soc/omap/n810.c
Fix below build error which is introduced by
commit 022658 "ASoC: core: Add support for DAI and machine kcontrols".

  CC [M]  sound/soc/omap/n810.o
sound/soc/omap/n810.c: In function 'n810_set_input':
sound/soc/omap/n810.c:194: error: 'codec' undeclared (first use in this function)
sound/soc/omap/n810.c:194: error: (Each undeclared identifier is reported only once
sound/soc/omap/n810.c:194: error: for each function it appears in.)
sound/soc/omap/n810.c:188: warning: unused variable 'card'
make[3]: *** [sound/soc/omap/n810.o] Error 1
make[2]: *** [sound/soc/omap] Error 2
make[1]: *** [sound/soc] Error 2
make: *** [sound] Error 2

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-10 11:38:00 +00:00
Liam Girdwood 022658beab ASoC: core: Add support for DAI and machine kcontrols.
Currently ASoC can only add kcontrols using codec and platform component device
handles. It's also desirable to add kcontrols for DAIs (i.e. McBSP) and for
SoC card machine drivers too. This allows the kcontrol to have a direct handle to
the parent ASoC component DAI/SoC Card/Platform/Codec device and hence easily
get it's private data.

This change makes snd_soc_add_controls() static and wraps it in the folowing
calls (card and dai are new) :-

snd_soc_add_card_controls()
snd_soc_add_codec_controls()
snd_soc_add_dai_controls()
snd_soc_add_platform_controls()

This patch also does a lot of small mechanical changes in individual codec drivers
to replace snd_soc_add_controls() with snd_soc_add_codec_controls().

It also updates the McBSP DAI driver to use snd_soc_add_dai_controls().

Finally, it updates the existing machine drivers that register controls to either :-

1) Use snd_soc_add_card_controls() where no direct codec control is required.
2) Use snd_soc_add_codec_controls() where there is direct codec control.

In the case of 1) above we also update the machine drivers to get the correct
component data pointers from the kcontrol (rather than getting the machine pointer
via the codec pointer).

Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-04 12:40:11 +00:00
Peter Ujfalusi 6b21ed8516 ASoC: Kconfig: OMAP4: Enable support for PandaBoards
Enable ASoC audio support for OMAP4 based machines with
twl6040 codec via the omap-abe-twl6040 machine driver.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-26 15:40:58 +02:00
Peter Ujfalusi 62ba98ce4a ASoC: omap-abe-twl6040: Use provided MCLK frequency from pdata
Avoid using hardwired configuration for MCLK frequency.
Different board design might use other MCLK frequency.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-26 15:40:53 +02:00
Peter Ujfalusi 4ca07cb0cf ASoC: omap-abe-twl6040: Configure card according to platform data
Disable the not connected pins on the board based on the
received platform data.
DO not register the jack function on boards, which does not have
means to detect it (jack is always connected).

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-26 15:40:52 +02:00
Peter Ujfalusi 8d946dd7dc ASoC: omap-abe-twl6040: DAI link selection based on platform data
We can have machines without DMIC connected. In this case there is
no need to create amother (unusable) capture PCM on the card.
The existence of the DMIC connection can be checked via
pdata->has_dmic.
Select the correct dai_link structure for the card based on
pdata->has_dmic.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-26 15:40:49 +02:00
Peter Ujfalusi b320883910 ASoC: omap-abe-twl6040: Add complete DAPM routing
SDP4430 is a reference platform, and as such it has all possible
audio routing implemented.
Correct the DAPM routing to be complete.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-26 15:40:46 +02:00
Peter Ujfalusi 778cee7afd ASoC: twl6040: Convert MICBIAS to SUPPLY widget
In order to avoid breakage change the omap-abe-twl6040
machine driver's routing.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-26 15:40:43 +02:00
Peter Ujfalusi d1be1d2fd1 ASoC: omap-abe-twl6040: Convert to platform deriver
Convert the OMAP4 ABE/TWL6040 machine driver to platform
driver.
For the card name use the string provided via platform data.
The card's name for OMAP4 SDP4430 has been changed:
SDP4430 -> OMAP4-SDP4430

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-26 15:39:13 +02:00
Peter Ujfalusi 13f81d6595 ASoC: omap-abe-twl6040: Correct internal prefix, Kconfig entry
Change the internal prefixes within the driver from sdp4430.
At he same time correct the Kconfig text as well.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-26 15:39:05 +02:00
Peter Ujfalusi e15422edd4 ASoC: OMAP4: Rename the sdp4430 machine driver
The same machine driver will support other boards
with similar audio configuration (OMAP4, ABE, twl6040).
Rename the driver to have more generic name.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-26 15:38:47 +02:00
Peter Ujfalusi 8747a6b7d5 ASoC: sdp4430: Correct author e-mail address
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-26 15:38:44 +02:00
Peter Ujfalusi b4badd4960 ASoC: omap-mcpdm: Set 24msbits constraint
McPDM internal FIFO is 24 bit wide. From the 32 bit sample
8 bit is discarded. Let application know about this
via msbits constraint.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:31 +00:00
Peter Ujfalusi 7df6f2551f ASoC: omap-dmic: Use core to set the msbits constraint
Core can set the msbits constraint in behalf of the dai.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:31 +00:00
Tony Lindgren 967809bd7f Merge branch 'omap1-part2' into omap1
Conflicts:
	drivers/leds/leds-ams-delta.c
2012-01-20 05:31:52 -08:00
Takashi Iwai 29abceb67f Merge branch 'for-3.3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into topic/asoc 2012-01-12 09:48:20 +01:00
Janusz Krzysztofik f75a8ff67d ASoC: cx20442: add bias control over a platform provided regulator
Now that a regulator device for controlling the codec chip reset state
over a platform agnostic regulator API is available on the only board
using this driver so far, extend the driver with a bias control function
which will request virtual power to the codec chip from that virtual
regulator, and will supersede the present implementation existing at the
sound card level.

Thanks to the regulator sharing mechanism, both the old (the sound card)
and the new (the codec) implementations should coexist smoothly until
the sound card file is updated. For this to work as expected, update the
sound card .set_bias_level callback to not touch codec->dapm.bias_level.

While extending the cx20442 structure, drop unused control_type member.

Created against linxu-3.2-rc6, tested on top of patch 1/4 "ARM: OMAP1:
ams-delta: set up a regulator over the modem reset GPIO pin".

Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@ti.com>
2012-01-09 11:20:16 +00:00
Joachim Eastwood 25e9e7565f ASoC: check for substream not channels_min in pcm engines
This is a follow up on 53dea36c70 which fixes the other affected
pcm engines.

Description from 53dea36c70c1857:
 Don't rely on the codec's channels_min information to decide wheter or
 not allocate a substream's DMA buffer. Rather check if the substream
 itself was allocated previously.

Without this patch I was seeing null-pointer dereferenc in atmel-pcm.

Signed-off-by: Joachim Eastwood <joachim.eastwood@jotron.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-07 11:18:05 -08:00
Axel Lin b425b88418 ASoC: omap: Add .owner to struct snd_soc_card
Missed .owner of struct snd_soc_card will prevent the module from being
removed from underneath its users.

Reported-by: Lothar Waßmann <LW@KARO-electronics.de>
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@ti.com>
2011-12-23 18:13:01 +00:00
Janusz Krzysztofik f7519d8c82 ARM: OMAP1: ams-delta: register latch dependent devices later
In preparation to converting Amstrad Delta on-board latches to
basic_mmio_gpio devices, registration of platform devices which depend
on latches and will require initialization of their GPIO pins first,
should be moved out of .machine_init down to late_initcall level, as the
gpio-generic driver is not available until device_initcall time.  The
latch reset operation, which will be replaced with GPIO initialization,
must also be moved to late_initcall for the same reason.

Since there was already another, separate arch_initcall function for
setting up one of those latch dependent devices, the on-board modem
device, reuse that function, i.e., rename it to a name that matches the
new purpose, extend with other device setup relocated from
.machine_init, and move down to the late_initcall level.

While being at it, add missing gpio_free() in case the modem platform
device registration fails.

Thanks to Tony Lindgren <tony@atomide.com> who suggested this approach
instead of shifting up the gpio-generic driver initialization.

In addition, defer registration of the Amstrad Delta ASoC and serio
devices, done from their device driver files, until late_initcall time,
as those drivers will depend on their GPIO pins already requested from
the board late_init() function until updated to register their GPIO pins
themselves.

Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2011-12-21 10:47:01 -08:00
Peter Ujfalusi 7243a4b1eb ASoC: omap-mcbsp: Enable FIFO usage on OMAP4
Allow McBSP FIFO configuration from ASoC dai driver
on OMAP4 platform.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-17 09:31:28 +00:00
Axel Lin a0e17b4e3e ASoC: Staticise rx51_aux_dev
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-13 12:10:33 +08:00
Mark Brown beaff340e0 ASoC: Use core pm_runtime callbacks for omap-mcpdm
Now that the core holds a pm_runtime reference to the device while the
link is active there is no need for the driver to do so.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
2011-12-08 09:22:04 +08:00
Mark Brown 06d07b6b1c ASoC: Use core pm_runtime callbacks for omap-dmic
Now that the core holds a pm_runtime reference to the device while the
link is active there is no need for the driver to do so.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
2011-12-08 09:21:51 +08:00
Peter Ujfalusi 6524c8e3e6 ASoC: sdp4430: Add support for digital microphones
OMAP4 SDP/Blaze boards have digital microphones.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-28 17:21:45 +00:00
Peter Ujfalusi fd26f94746 ASoC: OMAP4: omap-dmic: Initial support for OMAP DMIC
Add support for OMAP4 Digital Microphone interface.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-28 17:21:44 +00:00
Axel Lin beda5bf575 ASoC: Convert omap directory to module_platform_driver
Factor out some boilerplate code.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-25 13:15:31 +00:00
Lars-Peter Clausen 85e7652d89 ASoC: Constify snd_soc_dai_ops structs
Commit 1ee46ebd("ASoC: Make the DAI ops constant in the DAI structure")
introduced the possibility to have constant DAI ops structures, yet this is
barley used in both existing drivers and also new drivers being submitted,
although none of them modifies its DAI ops structure. The later is not
surprising since existing drivers are often used as templates for new drivers.
So this patch just constifies all existing snd_soc_dai_ops structs to eliminate
the issue altogether.

The patch was generated with the following coccinelle semantic patch:
// <smpl>
@@
identifier ops;
@@
-struct snd_soc_dai_ops ops =
+const struct snd_soc_dai_ops ops =
{ ... };
// </smpl>

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-23 10:40:46 +00:00