Commit graph

23 commits

Author SHA1 Message Date
Wolfram Sang d34135b4c0 ASoC: omap: drop owner assignment from platform_drivers
A platform_driver does not need to set an owner, it will be populated by the
driver core.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2014-10-20 16:22:11 +02:00
Himangi Saraogi 9cb0fe9b0e ASoC: omap-dmic: Use devm_clk_get
This patch introduces the use of managed interfaces like devm_clk_get
and does away with the clk_puts in the probe and remove functions. A
label is also done away with.

Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-07-14 19:02:45 +01:00
Manish Badarkhe 159baadf59 ASoC: omap-dmic: Use devm_snd_soc_register_component
Replaced snd_soc_register_component with its devres equivalent,
devm_snd_soc_register_component.

Signed-off-by: Manish Badarkhe <badarkhe.manish@gmail.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-07-09 10:14:56 +02:00
Jyri Sarha 87c1936426 ASoC: omap-pcm: Move omap-pcm under include/sound
Make including the omap-pcm.h outside sound/soc/omap more convenient.

Signed-off-by: Jyri Sarha <jsarha@ti.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-26 15:32:32 +01:00
Peter Ujfalusi 18d7cfea28 ASoC: omap-dmic: Bind the platform driver to the dai driver when loading
Use the same device for the platform driver when registering as the dai
driver. This will enable us to clean up some DT booted cases.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-18 18:00:36 +01:00
Peter Ujfalusi 3802a25927 ASoC: omap-dmic: Assign the dai DMA data at earlier time
Assign the dai dma data at dai driver probe time, not in startup.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-18 18:00:36 +01:00
Victor Kamensky 1b488a481c ASoC: omap: mcbsp, mcpdm, dmic: raw read and write endian fix
All OMAP IP blocks expect LE data, but CPU may operate in BE mode.
Need to use endian neutral functions to read/write h/w registers.
I.e instead of __raw_read[lw] and __raw_write[lw] functions code
need to use read[lw]_relaxed and write[lw]_relaxed functions.
If the first simply reads/writes register, the second will byteswap
it if host operates in BE mode.

Changes are trivial sed like replacement of __raw_xxx functions
with xxx_relaxed variant.

Signed-off-by: Victor Kamensky <victor.kamensky@linaro.org>
Signed-off-by: Taras Kondratiuk <taras.kondratiuk@linaro.org>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-11-24 13:40:59 +00:00
Julia Lawall 673c24e957 ASoC: omap: simplify platform_get_resource_byname/devm_ioremap_resource
Remove unneeded error handling on the result of a call to
platform_get_resource_byname when the value is passed to devm_ioremap_resource.

In the case of omap-dmic.c, the error-handling code of
devm_ioremap_resource is also corrected to include releasing the clock.

A simplified version of the semantic patch that makes this change is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@@
expression pdev,res,e,e1;
expression ret != 0;
identifier l;
@@

  res = platform_get_resource_byname(...);
- if (res == NULL) { ... \(goto l;\|return ret;\) }
  e = devm_ioremap_resource(e1, res);
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-20 11:50:58 +01:00
Peter Ujfalusi 2ebef44789 ASoC: omap-dmic: Do not use platform_get_resource_byname() for DMA
The DMA resource no longer available via this API when booting with DT.
DMIC is only available on OMAP4/5 and both can boot with DT only.
Set the dma_data.filter_data to the DMA name which will be used by omap-pcm
to request the DMA channel.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Reviewed-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-07-11 17:38:00 +01:00
Mark Brown 38e8c895d3 Merge remote-tracking branch 'asoc/topic/dma' into asoc-next 2013-04-12 13:57:04 +01:00
Lars-Peter Clausen 09ae3aaf3c ASoC: omap: Use common DAI DMA data
Use the common DAI DMA data struct for omap, this allows us to use the common
helper function to configure the DMA slave config based on the DAI DMA data.

For omap-dmic and omap-mcpdm also move the DMA data from a global variable to
the driver state struct.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-04-03 18:12:58 +01:00
Kuninori Morimoto ed22853a5b ASoC: switch over to use snd_soc_register_component() on omap dmic
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-03-26 21:57:24 +00:00
Silviu-Mihai Popescu 77c641d346 ASoC: omap: 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: Silviu-Mihai Popescu <silviupopescu1990@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>
2013-03-13 10:35:59 +00:00
Sebastien Guiriec 4f224c6124 ASoC: omap-dmic: Clean up with devm_request_and_ioremap
Clean up dmic code with devm_request_and_ioremap function.

Signed-off-by: Sebastien Guiriec <s-guiriec@ti.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-03-04 11:17:28 +08:00
Bill Pemberton 7ff6000627 ASoC: OMAP: remove __dev* attributes
CONFIG_HOTPLUG is going away as an option.  As result the __dev*
markings will be going away.

Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst,
and __devexit.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-12-10 00:31:32 +09:00
Peter Ujfalusi 19118eb8dc ASoC: omap-dmic: Correct functional clock name
We should really use "fck" when asking for the functional clock and not
"dmic_fck".
This way we can ensure that multiple dmic modules can exist in the system.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-10-27 23:00:18 +01: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 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 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 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 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
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 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