Commit graph

370 commits

Author SHA1 Message Date
Peter Ujfalusi
eb775d38e0 ARM: OMAP/ASoC: Zoom2: Let the codec to handle the hs_extmute GPIO
Remove the use of set_hs_extmute callback and let the codec driver to
handle the extmute GPIO.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-09-22 11:18:25 -04:00
Peter Ujfalusi
946cc36ae5 ASoC: omap-pcm: Convert to use dmaengine
Original author: Russell King <rmk+kernel@arm.linux.org.uk>

Switch the omap-pcm to use dmaengine.
Certain features are not supported by after dmaengine conversion:
1. No period wakeup mode
   DMA engine has no way to communicate this information through
   standard channels.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Tested-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-09-22 11:13:02 -04:00
Peter Ujfalusi
bcd6da7bfd ASoC: OMAP: mcbsp, mcpdm, dmic, hdmi: Set dma_data at startup time
Set the dma_data for the stream (snd_soc_dai_set_dma_data) at dai_startup
time so omap-pcm will have access to the needed information regarding to
the DMA channel earlier.
This is needed for the clean dmaengine support.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Tested-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-09-22 11:13:02 -04:00
Peter Ujfalusi
f05cc9dac9 ASoC: omap-pcm, omap-dmic: Change the use of omap_pcm_dma_data->data_type
Instead of the OMAP DMA data type definition the data_type will be used to
specify the number of bits the DMA word should be configured or 0 in case
when based on the stream's format the omap-pcm can decide the needed DMA
word size.
This feature is needed for the omap-hdmi where the sDMA need to be
configured for 32bit word type regardless of the audio format used.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Tested-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-09-22 11:13:01 -04:00
Peter Ujfalusi
04564e3258 ASoC: OMAP: mcbsp, mcpdm, dmic: Let omap-pcm to pick the dma_type
omap-pcm can figure out the correct dma_type based on the stream's format.
In this way we can get rid of the plat/dma.h include from these drivers.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Tested-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-09-22 11:13:01 -04:00
Peter Ujfalusi
5a40c57af5 ASoC: omap-mcpdm: Use platform_get_resource_* to get resources
Get the needed resources in a correct way and avoid using defines for them.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Tested-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-09-22 11:13:00 -04:00
Peter Ujfalusi
03945e99a8 ASoC: omap-pcm: Prepare to configure the DMA data_type based on stream properties
Based on the format of the stream the omap-pcm can decide alone what data
type should be used with by the sDMA.
Keep the possibility for OMAP dai drivers to tell omap-pcm if they want to
use different data type. This is needed for the omap-hdmi for example which
needs 32bit data type even if the stream format is S16_LE.

The check if (dma_data->data_type) is safe at the moment since omap-pcm
does not support 8bit samples (OMAP_DMA_DATA_TYPE_S8 == 0x00).

The next step is to redefine the meaning of dma_data->data_type to unblock
this limitation.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Tested-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-09-22 11:12:59 -04:00
Peter Ujfalusi
061fb36db7 ASoC: OMAP: Remove sync_mode from omap_pcm_dma_data struct
The omap-pcm platform driver no longer needs this parameter to select
between ELEMENT and PACKET mode. The selection is based on the configured
packet_size.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Tested-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-09-22 11:12:58 -04:00
Peter Ujfalusi
e512589c17 ASoC: omap-pcm: Select sDMA synchronization based on packet_size
Since we only have element or packet synchronization we can use the
dma_data->packet_size to select the desired mode:
if packet_size is 0 we use ELEMENT mode
if packet_size is not 0 we use PACKET mode for sDMA synchronization.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Tested-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-09-22 11:12:57 -04:00
Peter Ujfalusi
dffb360e64 ASoC: omap-mcbsp: Use sDMA packet mode instead of frame mode
When McBSP is configured in threshold mode we can use sDMA packet mode in
all cases.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Tested-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-09-22 11:12:57 -04:00
Peter Ujfalusi
1867b2cdd8 ASoC: am3517evm: Remove unused cpu_dai from hw_params
cpu_dai is not in use in this function and just generates warning at
compile time.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-09-11 11:26:00 +08:00
Mark Brown
75d8f2931a Merge branch 'asoc-omap' into for-3.7 2012-09-05 20:05:11 +08:00
Peter Ujfalusi
e93c7d1bc3 ASoC: omap-mcbsp: Fix compilation error due to leftover code
Part of commit (which patches sound/soc/omap/mcbsp.c file):
8fef626 ARM/ASoC: omap-mcbsp: Remove CLKR/FSR mux configuration code

since the tree where it has been applied did not had the earlier patch:
d0db84e ASoC: omap-mcbsp: Fix 6pin mux configuration
which changed code around omap_mcbsp_6pin_src_mux().

Because of the missing part from 8fef626 the sound/soc/omap/mcbsp.c does
not compile in linux-next.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-09-05 20:05:02 +08:00
Mark Brown
fc600432cd Linux 3.6-rc4
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.18 (GNU/Linux)
 
 iQEcBAABAgAGBQJQQkiRAAoJEHm+PkMAQRiGk64H/Rp67mBWom2xMmU8gul3gr7d
 MFq7dQOShoHZVyuCtKFNF+RTFkHDT2mw0ZkdszHdMkPEznIVRNklieN6GayOwj7C
 XcRb50z/C0CTvEskLOzWsaC+Rok6doOi5VCgkkZ+6N4CvWQNEqWLfWW5H6wZ7juo
 ME1xx/59GDm/4TYMUXzPI9UygptGGXvH/18n/z47FQpvL5EbAECTVt1nPX1uvn/S
 ZzdSLG8MrbK+IX+62JZqRG5M6TUC2b8ggog2cFfP20JNK0TwU9dMQPtbk2Y+LZRg
 JiUqyRUOuQJFbCgE+b1JuleJHAlsAgqIs7tkY9VfdFYfh+NQcaccWjDjdeB7Hjo=
 =Ooia
 -----END PGP SIGNATURE-----

Merge tag 'v3.6-rc4' into asoc-omap

Linux 3.6-rc4
2012-09-05 13:04:34 +08:00
Mark Brown
b10be23b88 Merge branch 'asoc-omap' into for-3.7 2012-08-25 13:31:39 -07:00
Peter Ujfalusi
db61550931 ASoC: omap-mcbsp: Single macro for st channel volume set/get
Since we always need to have set and get callbacks for McBSP sidetone it
makes sense to combine the two macro to create the two callbacks.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-25 13:30:27 -07:00
Peter Ujfalusi
8996a31c58 ASoC: omap-mcbsp: Use macro to create the McBSP2/3 ST controls
To remove duplicated code from the driver.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-25 13:30:23 -07:00
Peter Ujfalusi
8a88df4cda ASoC: omap-mcbsp: Only print warning if the st_data is missing for the port
When asked to add the ST controls warn only if the st_data is missing.
In this way we do not block the otherwise functional card to probe.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-25 13:30:19 -07:00
Peter Ujfalusi
28739dfcff ASoC: omap-mcbsp: Check mcbsp->id instead of cpu_dai->id when adding ST controls
In ddevice tree booted kernel all device have unique name and their device
id is set to 0.
Use the mcbsp->id for checking to decide which control set we should add
for McBSP sidetone handling.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-25 13:30:11 -07:00
Mark Brown
2bbf6078dc Merge branch 'asoc-omap' into for-3.7 2012-08-22 20:19:01 +01:00
Peter Ujfalusi
11dd586421 ASoC: omap-mcbsp: Add device tree bindings
Device tree support for McBSP modules on OMAP2+ SoC.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-22 20:17:18 +01:00
Peter Ujfalusi
dc26df5245 ASoC: omap-mcbsp: Remove cpu_is_omap* checks from the code
We can use the has_ccr flag to replace the cpu_is_omap* checks.
This provides future proof implementation and we do not need to update the
code if new OMAP revision starts to use the McBSP driver.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-22 20:17:12 +01:00
Peter Ujfalusi
8d3c090965 ASoC: omap-mcbsp: Remove unused defines
NUM_LINKS is no longer in use by the code.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-22 20:17:11 +01:00
Peter Ujfalusi
8fef6263ea ARM/ASoC: omap-mcbsp: Remove CLKR/FSR mux configuration code
Remove the feature to configure the CLKR/FSR mux on McBSP port with 6pin
configuration.
When moving to devicetree these callback can no longer be used in a clean
way anymore.
If a board require to change the 6pin port to work in 4pin setup it needs
to set up the mux in the board file.
For OMAP2/3:
u32 devconf0;

/* McBSP1 CLKR/FSR signal to be connected to CLKX/FSX pin */
devconf0 = omap_ctrl_readl(OMAP2_CONTROL_DEVCONF0);
devconf0 |=  OMAP2_MCBSP1_CLKR_MASK | OMAP2_MCBSP1_FSR_MASK;
omap_ctrl_writel(devconf0, OMAP2_CONTROL_DEVCONF0);

For OMAP4:
u32 mcbsp_pad;

/* McBSP4 CLKR/FSR signal to be connected to CLKX/FSX pin */
mcbsp_pad = omap4_ctrl_pad_readl(OMAP2_CONTROL_DEVCONF0);
mcbsp_pad |=  ((1 << 31) | (1 << 30));
omap4_ctrl_pad_writel(mcbsp_pad, OMAP2_CONTROL_DEVCONF0);

In case when the kernel is booted with DT blob the pinctrl-single will be
provided as soon as it is enabled on the platform.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-22 20:17:05 +01:00
Peter Ujfalusi
fca04aea36 ASoC: am3517evm: Do not configure McBSP1 CLKR/FSR signal muxing
The muxing is done at board level, no need to do it in the ASoC machine
driver.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-22 20:17:04 +01:00
Peter Ujfalusi
f199131a8f ARM/ASoC: omap-mcbsp: Move OMAP2+ clock parenting code to ASoC driver
Move the McBSP CLKS re-parenting code to ASoC driver from
arch/arm/mach-omap2.
The call fort the re-parenting has been already limited to OMAP2+ SoC in
the ASoC driver. There is no longer need to have callback function for it.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-22 20:16:55 +01:00
Mark Brown
1837ce352d Merge remote-tracking branch 'asoc/topic/omap' into for-3.7 2012-08-15 17:14:04 +01:00
Peter Ujfalusi
152c6e56f6 ASoC: Remove obsolete OMAP3 machine drivers
The new omap-twl4030 handles the boards used the following drivers:
igep0020, omap3beagle, omap3evm and overo.
Remove these drivers since they are mostly identical and we already have
drop in replacement for all of them.

Note: Earlier patch added the needed code for the board files to retain the
audio support for boards I can identify that used one of the removed
drivers.
If I missed something please take a look at for example:
arch/arm/mach-omap2/board-omap3beagle.c on how add support for omap-twl4030
audio.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-15 17:10:00 +01:00
Peter Ujfalusi
fff8491c8b ASoC: omap-twl4030: Simple machine driver for TI SoC with twl4030 codec
Machine driver to handle simple devices using twl4030 as audio codec.
The driver supports the following boards:
- Beagleboard or Devkit8000
- Gumstix Overo or CompuLab CM-T35/CM-T3730
- IGEP v2
- OMAP3EVM

All of these boards can be switched to use this driver since their setup is
identical.
Devicetree support for the omap-twl4030 machine driver also implemented.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-15 17:09:59 +01:00
Peter Ujfalusi
d0db84e713 ASoC: omap-mcbsp: Fix 6pin mux configuration
The check for the mux_signal callback was wrong which prevents us to
configure the 6pin port's FSR/CLKR signal mux.

Reported-by: CF Adad <cfadad@rocketmail.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org (3.4+)
2012-08-07 15:04:02 +01:00
Peter Ujfalusi
5ef75e710b ASoC: omap-abe-twl6040: Add device tree support
When the board boots with device tree the driver will receive the name of the
card, DAPM routing map, phandle for the audio components described in the dts
file, mclk speed, and the possibility of detecting the jack detection.

The card will be set up based on this information.
Since the routing is provided via DT we can mark the card fully routed so
core can take care of disconnecting the unused pins.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Reviwed-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-03 23:03:56 +01:00
Peter Ujfalusi
d77ae33292 ASoC: omap-mcpdm: Convert to use devm_*
Switch to use devm_* te make the probe/remove code more cleaner.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-03 23:03:55 +01:00
Guillaume Gardet
5e70b7fc38 ASoC: omap: Add missing modules aliases to get sound working on omap devices
This patch add missing modules aliases to get sound working on omap devices.

Tested on Beagleboard xM rev. B.

This patch is against 3.5-rc6 vanilla.

Signed-off-by: Guillaume GARDET <guillaume.gardet@free.fr>
Signed-off-by: Mans Rullgard <mans.rullgard@linaro.org>

From 18b1ba8becc3dd256bdaad2d825f46b551debda3 Mon Sep 17 00:00:00 2001
From: Guillaume GARDET <guillaume.gardet@oliseo.fr>
Date: Tue, 10 Jul 2012 13:47:16 +0200
Subject: [PATCH] Add missing modules aliases to fix audio on omap devices
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-07-26 23:00:42 +01:00
Peter Ujfalusi
d66a547cdd ASoC: omap-mcpdm: Add missing MODULE_ALIAS
The MODULE_ALIAS() was missing from the driver.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-07-06 19:07:38 +01:00
Ricardo Neri
ced47a3117 ASoC: OMAP: HDMI: Rename sound card source file
Rename sound card driver source file to encompass not only OMAP4 but future
OMAP versions that feature HDMI.

Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@ti.com>
2012-05-22 17:33:24 +01:00
Ricardo Neri
aff4833999 ASoC: OMAP: HDMI: Make sound card naming more generic
Rename all the relevant structures, variables and functions to not
make specific reference to OMAP4. This is to make the driver encompass
future OMAP versions that feature HDMI and not only OMAP4. These
changes are only in naming. There are not functional changes.

Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@ti.com>
2012-05-22 17:33:24 +01:00
Ricardo Neri
dc314cde04 ASoC: OMAP: HDMI: Make build config options more generic
Make Kconfig and Makefile more generic to encompass not only
OMAP4 but other OMAP processors featuring HDMI.

Also, relax the dependency list to depend only on any OMAP processor
supporting OMAP2_DSS and OMAP4_DSS_HDMI. As HDMI support for
future OMAP versions is added, the dependency list must change
accordingly.

Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@ti.com>
2012-05-22 17:33:24 +01:00
Ricardo Neri
a1ab92da14 ASoC: OMAP: HDMI: Expand capabilities of the HDMI DAI
According to the HDMI specification, a source is permitted to
transmit L-PCM audio in the following sample rates: 32kHz, 44.1kHz,
48kHz, 88.2kHz, 96kHz, 176.4kHz or 192kHz.

It also supports up to 8 audio channels.

The sink may not necessarily support all these sample rates and
channels. However, as this CPU DAI describes the HDMI source, it
makes sense to include them. The limitation of capabilities as
supported by the sink should be done in the ASoC HDMI codec.

Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@ti.com>
2012-05-22 17:33:23 +01:00
Ricardo Neri
a0534e3bb6 ASoC: OMAP: HDMI: Improve how the display state is verified
Before starting to play audio, we need to make sure that the
display is active and the current video mode supports audio. instead
of using the overlay manager in the machine driver, we use the DSS audio
interface's audio_supported function. As we already have a pointer to
the correct dssdev, we do not have to look for it every time audio is
to be played. Also, the CPU DAI startup function is called earlier
than the card hw_param function. Hence and we can detect the state of
the display earlier.

While there, add a error message if the constraint cannot be applied.

Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>

squash to improve err
Signed-off-by: Liam Girdwood <lrg@ti.com>
2012-05-22 17:33:23 +01:00
Ricardo Neri
7e6aa22079 ASoC: OMAP: HDMI: Expand configuration of hw_params
Expand the configuration of the hw_params to include the IEC-60958
channel status word and the CEA-861 audio infoframe. The configuration
of such structures depends on the snd_pcm_hw_params received. A
omap_dss_audio is used to pass the configuration parameters to DSS.

Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@ti.com>
2012-05-22 17:33:23 +01:00
Ricardo Neri
a48d9b7586 ASoC: OMAP: HDMI: Use the DSS audio interface
Instead of accessing the HDMI IP directly, the CPU DAI driver takes
advantage of the audio interface provided by the DSS device driver.
The ASoC driver will link the DSS audio functionality with ALSA by
calling the appropriate DSS device driver functions at the relevant
moments. For this, three new DAI operations are added: trigger, prepare
and shutdown operations.

At the moment, it is assumed that only one HDMI display is available
in the system, as it is the case in OMAP4. However, in the future,
one DAI for each HDMI display should be provided.

Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@ti.com>
2012-05-22 17:33:23 +01:00
Ricardo Neri
2603915336 ASoC: OMAP: HDMI: Create a structure for private data of the CPU DAI
Create a struct hdmi_priv to store the relevant data of the CPU DAI
driver. As more data is added to the driver, having all the data
in the same location eases its handling. At the moment, only the DMA
configuration parameters are included in the structure.

Also, the required memory is allocated using devm_kzalloc rather than
using a static global variable.

Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@ti.com>
2012-05-22 17:33:23 +01:00
Ricardo Neri
0ff5ee871f ASoC: OMAP: HDMI: Change error values in HDMI CPU DAI
When getting the needed resources fails, return -ENODEV. This is more
in line with other drivers do and it gives a more descriptive error.

Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@ti.com>
2012-05-22 17:33:23 +01:00
Ricardo Neri
e412ec64bd ASoC: OMAP: HDMI: Update the platform device names
In order to utilize the new OMAP HDMI codec and the updated name of
the device of the CPU DAI, update the names at the drivers accordingly.

While there, also update the name of the machine driver to be more
generic and encompass more OMAP processors featuring HDMI and not
only OMAP4.

Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@ti.com>
2012-05-22 17:33:23 +01:00
Peter Ujfalusi
356bccbea1 ASoC: omap-abe-twl6040: Introduce driver data for runtime parameters
In preparation to Device Tree support.
With DT booted kernel we can not rely on pdata which used to
hold information needed for the driver at runtime.
Use the card's driver data to hold these informations from now on.

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-05-22 17:33:19 +01:00
Peter Ujfalusi
7d09f9e989 ASoC: omap-abe-twl6040: Move Digital Mic widget into dapm table
The needed change in routing will be done runtime for the non
twl6040 connected widgets, like the Digital microphone.

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-05-22 17:33:19 +01:00
Peter Ujfalusi
c2f98956e3 ASoC: omap-abe-twl6040: Keep only one snd_soc_dai_link structure
There is no need to have two snd_soc_dai_link structure for the two setup
the machine driver supports.
We can just tell core to register only the first link if the DMIC link is
not in use on the device.

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-05-22 17:33:19 +01:00
Peter Ujfalusi
2ec1be3721 ASoC: omap-dmic: Add device tree bindings
Device tree support for OMAP4+ dmic cpu dai driver.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@ti.com>
2012-05-22 17:33:19 +01:00
Peter Ujfalusi
7cb8a1b5ba ASoC: omap-mcpdm: Add device tree bindings
Device tree support for OMAP4+ McPDM cpu dai driver.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@ti.com>
2012-05-22 17:33:19 +01:00
Peter Ujfalusi
ce37f5ea4b ASoC: omap-mcbsp: buffer size constraint only applies to playback stream
In capture stream the buffer size does not need to be constrained to be
bigger then the McBSP FIFO.
In capture the FIFO content is taken out in period length burst, this
enusres that the FIFO is not going to overflow.

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-05-22 17:33:19 +01:00