History log of /linux-master/sound/soc/pxa/pxa2xx-ac97.c
Revision Date Author Comments
# 8e5ffd76 07-Feb-2024 Takashi Iwai <tiwai@suse.de>

ASoC: pxa2xx-ac97: Replace with DEFINE_SIMPLE_DEV_PM_OPS()

Use the new DEFINE_SIMPLE_DEV_PM_OPS() instead of SIMPLE_DEV_PM_OPS()
for code-simplification. We need no longer CONFIG_PM_SLEEP ifdefs.
Just a cleanup, no functional changes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20240207155140.18238-14-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# acb6a698 15-Mar-2023 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

ASoC: pxa: pxa2xx-ac97: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Takashi Iwai <tiwai@suse.de>
Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Link: https://lore.kernel.org/r/20230315150745.67084-118-u.kleine-koenig@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>


# 4d2dba6b 18-Sep-2019 Arnd Bergmann <arnd@arndb.de>

ASoC: pxa: use pdev resource for FIFO regs

The driver currently takes the hardwired FIFO address from
a header file that we want to eliminate. Change it to use
the mmio resource instead and stop including the here.

Acked-by: Mark Brown <broonie@kernel.org>
Cc: alsa-devel@alsa-project.org
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>


# 22f08665 01-Sep-2019 Arnd Bergmann <arnd@arndb.de>

ARM: pxa: move mach/sound.h to linux/platform_data/

This is a basically a platform_data file, so move it out of
the mach/* header directory.

Cc: Marek Vasut <marek.vasut@gmail.com>
Cc: Tomas Cech <sleep_walker@suse.com>
Cc: Sergey Lapin <slapin@ossfans.org>
Acked-by: Mark Brown <broonie@kernel.org>
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
Cc: alsa-devel@alsa-project.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>


# 08d3df8c 01-Sep-2019 Arnd Bergmann <arnd@arndb.de>

ARM: pxa: split up mach/hardware.h

The mach/hardware.h is included in lots of places, and it provides
three different things on pxa:

- the cpu_is_pxa* macros
- an indirect inclusion of mach/addr-map.h
- the __REG() and io_pv2() helper macros

Split it up into separate <linux/soc/pxa/cpu.h> and mach/pxa-regs.h
headers, then change all the files that use mach/hardware.h to
include the exact set of those three headers that they actually
need, allowing for further more targeted cleanup.

linux/soc/pxa/cpu.h can remain permanently exported and is now in
a global location along with similar headers. pxa-regs.h and
addr-map.h are only used in a very small number of drivers now
and can be moved to arch/arm/mach-pxa/ directly when those drivers
are to pass the necessary data as resources.

Cc: Michael Turquette <mturquette@baylibre.com>
Cc: Stephen Boyd <sboyd@kernel.org>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Jacek Anaszewski <jacek.anaszewski@gmail.com>
Cc: Pavel Machek <pavel@ucw.cz>
Acked-by: Ulf Hansson <ulf.hansson@linaro.org>
Cc: Dominik Brodowski <linux@dominikbrodowski.net>
Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Guenter Roeck <linux@roeck-us.net>
Acked-by: Mark Brown <broonie@kernel.org>
Cc: linux-clk@vger.kernel.org
Cc: linux-pm@vger.kernel.org
Cc: linux-input@vger.kernel.org
Cc: linux-leds@vger.kernel.org
Cc: linux-mmc@vger.kernel.org
Cc: linux-mtd@lists.infradead.org
Cc: linux-rtc@vger.kernel.org
Cc: linux-usb@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org
Cc: linux-fbdev@vger.kernel.org
Cc: linux-watchdog@vger.kernel.org
Cc: alsa-devel@alsa-project.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>


# 7f2da3d7 02-Aug-2021 Takashi Iwai <tiwai@suse.de>

ALSA: pxa2xx: Use managed PCM buffer allocation

Now with the recent addition of WC buffer allocation support, we can
use the standard PCM buffer allocation helpers for pxa2xx drivers.
This allows us to remove lots of superfluous code.

Cc: Daniel Mack <daniel@zonque.org>
Cc: Haojian Zhuang <haojian.zhuang@gmail.com>
Cc: Robert Jarzmik <robert.jarzmik@free.fr>
Acked-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20210802072815.13551-6-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 250a15cf 19-Jan-2020 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: soc-core: remove bus_control

Now, snd_soc_dai_driver::bus_control is used for how to resume.
But, no driver which has bus_control has DAI driver suspend/resume
support.
This patch removes pointless bus_control from ALSA SoC.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87pnffx7i4.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# 92e63b55 10-Dec-2019 Takashi Iwai <tiwai@suse.de>

ASoC: pxa: Drop superfluous ioctl PCM ops

ASoC PCM core deals the empty ioctl field now as default.
Let's kill the redundant lines.

Cc: Daniel Mack <daniel@zonque.org>
Cc: Haojian Zhuang <haojian.zhuang@gmail.com>
Cc: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20191210145406.21419-12-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>


# f8772e17 01-Oct-2019 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: pxa: remove snd_pcm_ops

snd_pcm_ops is no longer needed.
Let's use component driver callback.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87o8yz90e9.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# 4b9b73b8 27-Jun-2019 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: pxa: pxa2xx-ac97.c: use devm_snd_soc_register_component()

We have devm_xxx version of snd_soc_register_component,
let's use it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>


# d2912cb1 04-Jun-2019 Thomas Gleixner <tglx@linutronix.de>

treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500

Based on 2 normalized pattern(s):

this program is free software you can redistribute it and or modify
it under the terms of the gnu general public license version 2 as
published by the free software foundation

this program is free software you can redistribute it and or modify
it under the terms of the gnu general public license version 2 as
published by the free software foundation #

extracted by the scancode license scanner the SPDX license identifier

GPL-2.0-only

has been chosen to replace the boilerplate/reference in 4122 file(s).

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Enrico Weigelt <info@metux.net>
Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org>
Reviewed-by: Allison Randal <allison@lohutok.net>
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190604081206.933168790@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 1c8bc7b3 25-Aug-2018 Robert Jarzmik <robert.jarzmik@free.fr>

ASoC: pxa: switch to new ac97 bus support

Switch to the new ac97 bus support in sound/ac97 instead of the legacy
snd_ac97 one.

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Mark Brown <broonie@kernel.org>


# d767d3ce 27-Jun-2018 Daniel Mack <daniel@zonque.org>

ASoC: pxa: provide PCM ops for ssp, i2s and ac97 components

Now that the functions are now available through pxa2xx-lib, hook them up
to pxa-sspi, pxa-ac97 and pxa-i2s. This allows DT platforms to use the DAIs
without a platform driver.

Signed-off-by: Daniel Mack <daniel@zonque.org>
Signed-off-by: Mark Brown <broonie@kernel.org>


# 8f54061d 28-Jun-2018 Robert Jarzmik <robert.jarzmik@free.fr>

ASoC: pxa: remove the dmaengine compat need

As the pxa architecture switched towards the dmaengine slave map, the
old compatibility mechanism to acquire the dma requestor line number and
priority are not needed anymore.

This patch simplifies the dma resource acquisition, using the more
generic function dma_request_slave_channel().

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Daniel Mack <daniel@zonque.org>
Signed-off-by: Mark Brown <broonie@kernel.org>


# a4519526 16-Jun-2018 Robert Jarzmik <robert.jarzmik@free.fr>

ASoC: pxa: add devicetree support

Add the devicetree support, so that the driver can be used in a
devictree platform.

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Mark Brown <broonie@kernel.org>


# 6f8acad6 02-Sep-2017 Robert Jarzmik <robert.jarzmik@free.fr>

ASoC: arm: make pxa2xx-ac97-lib ac97 codec agnostic

All pxa library functions don't use the input parameters for nothing but
slot number. This simplifies their prototypes, and makes them usable by
both the legacy ac97 bus and the new ac97 bus.

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Mark Brown <broonie@kernel.org>


# 291aaff0 25-Feb-2017 Codrut Grosu <codrut.cristian.grosu@gmail.com>

ASoC: pxa: Remove unneeded else after return statement

This was reported by checkpatch.pl

Signed-off-by: Codrut Grosu <codrut.cristian.grosu@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>


# 80691c8f 05-Jan-2017 Lars-Peter Clausen <lars@metafoo.de>

ASoC: pxa2xx-ac97: Remove unused DAI ID defines

The DAI ID defines are back from the time when DAIs were referenced by a
numerical ID. These days a string is used instead and the defines are
unused. The last user of these defines was removed in commit f0fba2ad1b6b
("ASoC: multi-component - ASoC Multi-Component Support"). So remove the
defines as well.

This also means the pxa2xx-ac97.h file no longer has any content and can be
removed.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
Tested-by: Robert Jarzmik <robert.jarzmik@free.fr> (for mioa701_wm9713)
Signed-off-by: Mark Brown <broonie@kernel.org>


# e5b7d71a 06-May-2016 Andrea Adami <andrea.adami@gmail.com>

ASoC: pxa: Fix module autoload for platform drivers

These platform drivers are lacking MODULE_ALIAS so module autoloading
doesn't work. Tested on corgi and poodle with kernel 4.4.

Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>


# 58ceb57e 30-Sep-2015 Daniel Mack <zonque@gmail.com>

ASoC: pxa: pxa-pcm-lib: switch over to snd-soc-dmaengine-pcm

This patch removes the old PXA DMA API usage and switches over to
generic functions provided by snd-soc-dmaengine-pcm.

More cleanups may be done on top of this, and some function stubs can
now be removed completetly. However, the intention here was to keep
the transition as small as possible.

This was tested on the mioa701 pxa27x board.

Signed-off-by: Daniel Mack <zonque@gmail.com>
[trivial change from mmp-dma to pxa-dma]
Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Mark Brown <broonie@kernel.org>


# 8811191f 22-Sep-2015 Robert Jarzmik <robert.jarzmik@free.fr>

ASoC: pxa: pxa2xx-ac97: fix dma requestor lines

PCM receive and transmit DMA requestor lines were reverted, breaking the
PCM playback interface for PXA platforms using the sound/soc/ variant
instead of the sound/arm variant.

The commit below shows the inversion in the requestor lines.

Fixes: d65a14587a9b ("ASoC: pxa: use snd_dmaengine_dai_dma_data")
Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org


# bc263214 10-Nov-2014 Lars-Peter Clausen <lars@metafoo.de>

ASoC: Rename snd_soc_dai_driver struct ac97_control field to bus_control

Setting the ac97_control field on a CPU DAI tells the ASoC core that this
DAI in addition to audio data also transports control data to the CODEC.
This causes the core to suspend the DAI after the CODEC and resume it before
the CODEC so communication to the CODEC is still possible. This is not
necessarily something that is specific to AC'97 and can be used by other
buses with the same requirement. This patch renames the flag from
ac97_control to bus_control to make this explicit.

While we are at it also change the type from int to bool.

The following semantich patch was used for automatic conversion of the
drivers:
// <smpl>
@@
identifier drv;
@@
struct snd_soc_dai_driver drv = {
- .ac97_control
+ .bus_control
=
- 1
+ true
};
// </smpl>

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>


# 08d30ecc 20-Oct-2014 Wolfram Sang <wsa@kernel.org>

ASoC: pxa: 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>


# f62aa9b6 17-Oct-2013 Dmitry Baryshkov <dbaryshkov@gmail.com>

ALSA: ASoC: pxa: fix pxa2xx-ac97 DAI initialization order

After recent changes to codec/DAI initialization order changes, codec
driver (wm9712 in my case) tries to access codec prior to
pxa2xx_ac97_hw_probe() being called (because DAIs are probed after all
codecs are probed). Move hw-related probe/remove/suspend/resume
functions to pxa2xx-ac97 driver level, instead of DAI level.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Signed-off-by: Mark Brown <broonie@linaro.org>


# d65a1458 12-Aug-2013 Daniel Mack <zonque@gmail.com>

ASoC: pxa: use snd_dmaengine_dai_dma_data

Use snd_dmaengine_dai_dma_data for passing the dma parameters from
clients to the pxa pcm lib. This does no functional change, it's just an
intermedia step to migrate the pxa bits over to dmaengine.

The calculation of dcmd is a transition hack which will be removed again
in a later patch. It's just there to make the transition more readable.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Acked-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>


# 7685e016 28-Jun-2013 Kevin Hilman <khilman@linaro.org>

ASoC: pxa2xx: fixup multi-platform AC'97 build failures

commit b047e1cc (ASoC: ac97: Support multi-platform AC'97) introduced
some build failures for the pxa2xx-ac97 support, fix them.

Cc: Mark Brown <broonie@linaro.org>
Signed-off-by: Kevin Hilman <khilman@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>


# b047e1cc 25-Jun-2013 Mark Brown <broonie@linaro.org>

ASoC: ac97: Support multi-platform AC'97

Currently we can only have a single platform built in with AC'97 support
due to the use of a global variable to provide the bus operations. Fix
this by making that variable a pointer and having the bus drivers set the
operations prior to registering.

This is not a particularly good or nice approach but it avoids blocking
multiplatform and a real fix involves fixing the fairly deep problems
with AC'97 support - we should be converting it to a real bus.

Acked-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@linaro.org>


# ad53232c 21-Mar-2013 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: switch over to use snd_soc_register_component() on pxa2xx ac97

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 8abfc260 21-Mar-2013 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: pxa2xx-ac97: move EXPORT_SYMBOL_GPL() next to definition

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 570f6fe1 07-Dec-2012 Bill Pemberton <wfp5p@virginia.edu>

ASoC: pxa: 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>
Acked-by: Haojian Zhuang <haojian.zhuang@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 23019a73 20-Mar-2012 Rob Herring <rob.herring@calxeda.com>

ARM: pxa: use common IOMEM definition

pxa was missed in the moving of IOMEM to a common definition, so lots of
IOMEM redefined warnings were introduced. So remove pxa IOMEM definition
and fix all the fallout.

Reported-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Cc: Eric Miao <eric.y.miao@gmail.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Haojian Zhuang <haojian.zhuang@marvell.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Jaroslav Kysela <perex@perex.cz>
Cc: Takashi Iwai <tiwai@suse.de>
Cc: rtc-linux@googlegroups.com
Cc: alsa-devel@alsa-project.org


# a3874196 19-Feb-2012 Axel Lin <axel.lin@gmail.com>

ASoC: Add __devinit annotation for pxa2xx_ac97_probe

This fixes below build warning:
WARNING: vmlinux.o(.text+0x1e632c): Section mismatch in reference from the function pxa2xx_ac97_probe() to the function .devinit.text:pxa2xx_ac97_hw_probe()
The function pxa2xx_ac97_probe() references
the function __devinit pxa2xx_ac97_hw_probe().
This is often because pxa2xx_ac97_probe lacks a __devinit
annotation or the annotation of pxa2xx_ac97_hw_probe is wrong.

Also rename pxa_ac97_dai to pxa_ac97_dai_driver to fix below build warning:

LD sound/soc/pxa/built-in.o
WARNING: sound/soc/pxa/built-in.o(.data+0x18c): Section mismatch in reference from the variable pxa_ac97_dai to the function .devinit.text:pxa2xx_ac97_probe()
The variable pxa_ac97_dai references
the function __devinit pxa2xx_ac97_probe()
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 2f702a19 24-Nov-2011 Axel Lin <axel.lin@gmail.com>

ASoC: Convert pxa directory to module_platform_driver

Factor out some boilerplate code.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Marek Vasut <marek.vasut@gmail.com>
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 85e7652d 23-Nov-2011 Lars-Peter Clausen <lars@metafoo.de>

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>


# b9c1261d 19-Aug-2010 Axel Lin <axel.lin@gmail.com>

ASoC: remove include of pxa2xx-pcm.h in pxa2xx-ac97.c

Fix reference to moved header file, which was unused anyway.
This change fixes below build error:
CC sound/soc/pxa/pxa2xx-ac97.o
sound/soc/pxa/pxa2xx-ac97.c:27:24: error: pxa2xx-pcm.h: No such file or directory
make[3]: *** [sound/soc/pxa/pxa2xx-ac97.o] Error 1
make[2]: *** [sound/soc/pxa] Error 2
make[1]: *** [sound/soc] Error 2
make: *** [sound] Error 2

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Haojian Zhuang <haojian.zhuang@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# f0fba2ad 17-Mar-2010 Liam Girdwood <lrg@slimlogic.co.uk>

ASoC: multi-component - ASoC Multi-Component Support

This patch extends the ASoC API to allow sound cards to have more than one
CODEC and more than one platform DMA controller. This is achieved by dividing
some current ASoC structures that contain both driver data and device data into
structures that only either contain device data or driver data. i.e.

struct snd_soc_codec ---> struct snd_soc_codec (device data)
+-> struct snd_soc_codec_driver (driver data)

struct snd_soc_platform ---> struct snd_soc_platform (device data)
+-> struct snd_soc_platform_driver (driver data)

struct snd_soc_dai ---> struct snd_soc_dai (device data)
+-> struct snd_soc_dai_driver (driver data)

struct snd_soc_device ---> deleted

This now allows ASoC to be more tightly aligned with the Linux driver model and
also means that every ASoC codec, platform and (platform) DAI is a kernel
device. ASoC component private data is now stored as device private data.

The ASoC sound card struct snd_soc_card has also been updated to store lists
of it's components rather than a pointer to a codec and platform. The PCM
runtime struct soc_pcm_runtime now has pointers to all its components.

This patch adds DAPM support for ASoC multi-component and removes struct
snd_soc_socdev from DAPM core. All DAPM calls are now made on a card, codec
or runtime PCM level basis rather than using snd_soc_socdev.

Other notable multi-component changes:-

* Stream operations now de-reference less structures.
* close_delayed work() now runs on a DAI basis rather than looping all DAIs
in a card.
* PM suspend()/resume() operations can now handle N CODECs and Platforms
per sound card.
* Added soc_bind_dai_link() to bind the component devices to the sound card.
* Added soc_dai_link_probe() and soc_dai_link_remove() to probe and remove
DAI link components.
* sysfs entries can now be registered per component per card.
* snd_soc_new_pcms() functionailty rolled into dai_link_probe().
* snd_soc_register_codec() now does all the codec list and mutex init.

This patch changes the probe() and remove() of the CODEC drivers as follows:-

o Make CODEC driver a platform driver
o Moved all struct snd_soc_codec list, mutex, etc initialiasation to core.
o Removed all static codec pointers (drivers now support > 1 codec dev)
o snd_soc_register_pcms() now done by core.
o snd_soc_register_dai() folded into snd_soc_register_codec().

CS4270 portions:
Acked-by: Timur Tabi <timur@freescale.com>

Some TLV320aic23 and Cirrus platform fixes.
Signed-off-by: Ryan Mallon <ryan@bluewatersys.com>

TI CODEC and OMAP fixes
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>

Samsung platform and misc fixes :-
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Reviewed-by: Jassi Brar <jassi.brar@samsung.com>
Signed-off-by: Seungwhan Youn <sw.youn@samsung.com>

MPC8610 and PPC fixes.
Signed-off-by: Timur Tabi <timur@freescale.com>

i.MX fixes and some core fixes.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>

J4740 platform fixes:-
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>

CC: Tony Lindgren <tony@atomide.com>
CC: Nicolas Ferre <nicolas.ferre@atmel.com>
CC: Kevin Hilman <khilman@deeprootsystems.com>
CC: Sascha Hauer <s.hauer@pengutronix.de>
CC: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
CC: Kuninori Morimoto <morimoto.kuninori@renesas.com>
CC: Daniel Gloeckner <dg@emlix.com>
CC: Manuel Lauss <mano@roarinelk.homelinux.net>
CC: Mike Frysinger <vapier.adi@gmail.com>
CC: Arnaud Patard <apatard@mandriva.com>
CC: Wan ZongShun <mcuos.com@gmail.com>

Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>


# 5f712b2b 22-Mar-2010 Daniel Mack <daniel@caiaq.de>

ALSA: ASoC: move dma_data from snd_soc_dai to snd_soc_pcm_stream

This fixes a memory corruption when ASoC devices are used in
full-duplex mode. Specifically for pxa-ssp code, where this pointer
is dynamically allocated for each direction and destroyed upon each
stream start.

All other platforms are fixed blindly, I couldn't even compile-test
them. Sorry for any breakage I may have caused.

[Note that this is a backported version for 2.6.34.
Upstream commit is fd23b7dee]

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Reported-by: Sven Neumann <s.neumann@raumfeld.com>
Reported-by: Michael Hirsch <m.hirsch@raumfeld.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# fd23b7de 19-Mar-2010 Daniel Mack <daniel@caiaq.de>

ASoC: move dma_data from snd_soc_dai to snd_soc_pcm_stream

This fixes a memory corruption when ASoC devices are used in
full-duplex mode. Specifically for pxa-ssp code, where this pointer
is dynamically allocated for each direction and destroyed upon each
stream start.

All other platforms are fixed blindly, I couldn't even compile-test
them. Sorry for any breakage I may have caused.

Reported-by: Sven Neumann <s.neumann@raumfeld.com>
Reported-by: Michael Hirsch <m.hirsch@raumfeld.com>
Signed-off-by: Daniel Mack <daniel@caiaq.de>
Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# e2365bf3 21-Aug-2009 Marek Vasut <marek.vasut@gmail.com>

ASoC: Pass correct platform data from pxa2xx-ac97

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 4ac0478f 29-Jul-2009 Marek Vasut <marek.vasut@gmail.com>

ALSA: Allow passing platform_data for pxa2xx-ac97

This patch adds support for passing platform data to ac97 bus devices
from PXA2xx-AC97 driver..

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 852fd9e5 16-Mar-2009 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: Each PXA AC97 DAI needs a separate ops

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 6b849bcf 09-Mar-2009 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: Convert PXA AC97 driver to probe with the platform device

This will break any boards that don't register the AC97 controller
device due to using ASoC.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 7ebc8d56 02-Jan-2009 Eric Miao <eric.miao@marvell.com>

[ARM] pxa: move DMA registers definitions into <mach/dma.h>

1. Driver code where pxa_request_dma() is called will most likely
reference DMA registers as well, and it is really unnecessary
to include pxa-regs.h just for this. Move the definitions into
<mach/dma.h> and make relevant drivers include it instead of
<mach/pxa-regs.h>.

2. Introduce DMAC_REGS_VIRT as the virtual address base for these
DMA registers. This allows later processors to re-use the same
IP while registers may start at different I/O address.

Signed-off-by: Eric Miao <eric.miao@marvell.com>


# 6335d055 02-Mar-2009 Eric Miao <eric.y.miao@gmail.com>

ASoC: make ops a pointer in 'struct snd_soc_dai'

Considering the fact that most cpu_dai or codec_dai are using a same
'snd_soc_dai_ops' for several similar interfaces, 'ops' would be better
made a pointer instead, to make sharing easier and code a bit cleaner.

The patch below is rather preliminary since the asoc tree is being
actively developed, and this touches almost every piece of code,
(and possibly many others in development need to be changed as
well). Building of all codecs are OK, yet to every SoC, I didn't test
that.

Signed-off-by: Eric Miao <eric.miao@marvell.com>
Acked-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# c9b3a40f 09-Dec-2008 Takashi Iwai <tiwai@suse.de>

ALSA: ASoC - Fix wrong section types

The module init entries should be __init instead of __devinit.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 3f4b783c 03-Dec-2008 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: Register platform DAIs

Register all platform DAIs with the core. In line with current behaviour
this is done at module probe time rather than when the devices are probed
(since currently that only happens as the entire ASoC card is registered
except for those drivers that currently implement some kind of hotplug).
Since the core currently ignores DAI registration this has no practical
effect.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# dc7d7b83 03-Dec-2008 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: Remove platform device from DAI suspend and resume operations

None of the DAIs use it except s3c2412-i2s which only uses it for
dev_() printouts.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 1f017a99 27-Nov-2008 Eric Miao <eric.miao@marvell.com>

[ARM] pxa: move AC97 register definitions into dedicated regs-ac97.h

The optimal change would be to move the AC97 register definitions into
the AC97 driver, unfortunately, the registers are shared between several
files. Move them into a dedicated regs-ac97.h first.

Signed-off-by: Eric Miao <eric.miao@marvell.com>


# 3ba9e10a 24-Nov-2008 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: Remove DAI type information

DAI type information is only ever used within ASoC in order to special
case AC97 and for diagnostic purposes. Since modern CPUs and codecs
support multi function DAIs which can be configured for several modes
it is more trouble than it's worth to maintain anything other than a
flag identifying AC97 DAIs so remove the type field and replace it with
an ac97_control flag.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# dee89c4d 18-Nov-2008 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: Merge snd_soc_ops into snd_soc_dai_ops

Liam Girdwood's ASoC v2 work avoids having two different ops structures
for DAIs by merging the members of struct snd_soc_ops into struct
snd_soc_dai_ops, allowing per DAI configuration for everything.
Backport this change.

This paves the way for future work allowing any combination of DAIs to
be connected rather than having fixed purpose CODEC and CPU DAIs and
only allowing CODEC<->CPU interconnections.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 87f3dd77 08-Sep-2008 Eric Miao <eric.miao@marvell.com>

[ARM] pxa: simplify DMA register definitions

1. DRCMRxx is no longer recommended, use DRCMR(xx) instead, and
pass DRCMR index by "struct resource" if possible

2. DCSRxx, DDADRxx, DSADRxx, DTADRxx, DCMDxx is never used, use
DCSR(), DDADR(), DSADR(), DTADR(), DCMD() instead

Signed-off-by: Eric Miao <eric.miao@marvell.com>
Acked-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>


# a3927471 25-Sep-2008 Russell King <rmk@dyn-67.arm.linux.org.uk>

[ARM] pxa: avoid needless pxa_gpio_mode() during resume

The pin configurations are restored early on during resume. There's
no need for drivers to re-affirm the gpio modes.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>


# 9c636342 09-Sep-2008 Dmitry Baryshkov <dbaryshkov@gmail.com>

ALSA: Separate common pxa2xx-ac97 code

ASoC and non-ASoC drivers for ACLINK on PXA share lot's of common code.
Move all common code into separate module snd-pxa2xx-lib.

[Fixed handing of SND_AC97_CODEC in Kconfig and some checkpatch warnings
-- broonie]

Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# a09e64fb 05-Aug-2008 Russell King <rmk@dyn-67.arm.linux.org.uk>

[ARM] Move include/asm-arm/arch-* to arch/arm/*/include/mach

This just leaves include/asm-arm/plat-* to deal with.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>


# be509729 04-Aug-2008 Russell King <rmk@dyn-67.arm.linux.org.uk>

[ARM] Remove asm/hardware.h, use asm/arch/hardware.h instead

Remove includes of asm/hardware.h in addition to asm/arch/hardware.h.
Then, since asm/hardware.h only exists to include asm/arch/hardware.h,
update everything to directly include asm/arch/hardware.h and remove
asm/hardware.h.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>


# a84534dc 08-Jul-2008 Dmitry Baryshkov <dbaryshkov@gmail.com>

ALSA: ASoC: pxa2xx-ac97: fix warning due to missing argument in fuction declaration

Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# 917f93ac 07-Jul-2008 Liam Girdwood <lg@opensource.wolfsonmicro.com>

ALSA: asoc: pxa - merge structs snd_soc_codec_dai and snd_soc_cpu_dai.

This patch merges struct snd_soc_codec_dai and struct
snd_soc_cpu_dai into struct snd_soc_dai for the PXA platform.

Signed-off-by: Liam Girdwood <lg@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# bdb92876 11-Jun-2008 Mark Brown <broonie@opensource.wolfsonmicro.com>

ALSA: ASoC: Pass the DAI being configured into CPU DAI probe and remove

This allows per-DAI initialisation to be done by the CPU DAI drivers.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# 7a22323b 22-Apr-2008 Mark Brown <broonie@opensource.wolfsonmicro.com>

[ALSA] soc - Support PXA3xx AC97

The PXA3xx does not support the use of interrupts during reset and access
to the GPIO status requires similar handling to that for PXA27x.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 9bf8e7dd 03-Mar-2008 Harvey Harrison <harvey.harrison@gmail.com>

[ALSA] sound: replace remaining __FUNCTION__ occurences

__FUNCTION__ is gcc-specific, use __func__

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# b907ef68 15-Apr-2008 Mark Brown <broonie@sirena.org.uk>

[ARM] 4977/2: soc - pxa2xx-ac97 - Add missing clk_enable()

Add missing clk_enable()

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: eric miao <eric.y.miao@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>


# a683b14d 02-Mar-2008 eric miao <eric.miao@marvell.com>

[ARM] pxa: separate GPIOs and their mode definitions to pxa2xx-gpio.h

two reasons:
1. GPIO namings and their mode definitions are conceptually not part
of the PXA register definitions

2. this is actually a temporary move in the transition of PXA2xx to
use MFP-alike APIs (as what PXA3xx is now doing), so that legacy
code will still work and new code can be added in step by step

Signed-off-by: eric miao <eric.miao@marvell.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>


# 942de47b 04-Mar-2008 Mark Brown <broonie@sirena.org.uk>

[ARM] 4834/3: Convert ASoC pxa2xx-ac97 driver to use the clock API

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Takashi Iwai <tiwai@suse.de>
Acked-by: eric miao <eric.miao@marvell.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>


# 9004acc7 08-Jan-2008 Takashi Iwai <tiwai@suse.de>

[ALSA] Remove sound/driver.h

This header file exists only for some hacks to adapt alsa-driver
tree. It's useless for building in the kernel. Let's move a few
lines in it to sound/core.h and remove it.
With this patch, sound/driver.h isn't removed but has just a single
compile warning to include it. This should be really killed in
future.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# 03d14a55 04-Dec-2007 Michael Brunner <mibru@gmx.de>

[ARM] 4690/1: PXA: fix CKEN corruption in PXA27x AC97 cold reset code

Fix CKEN register corruption in the PXA27x cold reset code
located in sound/arm/pxa27x-ac97.c. The problem has been
introduced with a pxa_set_cken() function change in linux 2.6.23.
This patch is based on patch 4527/1 that fixes the same problem in
the ASoC PXA-AC97 driver. Additionally a definition for the CKEN
index value is added and applied to both PXA AC97 drivers.

Signed-off-by: Michael Brunner <mibru@gmx.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>


# 0a9c2df2 25-Jul-2007 Eric Miao <eric.y.miao@gmail.com>

[ARM] 4527/1: pxa: fix pxa27x ac97 cold reset in ASoC due to CKEN change

due to CKEN_xxx definition and pxa_set_cken() change, the pxa27x
ac97 cold reset is broken in ASoC, fixed to use bit index instead
of bit mask

Signed-off-by: eric miao <eric.y.miao@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>


# 1f750a78 02-Jul-2007 Richard Purdie <rpurdie@rpsys.net>

[ARM] 4458/1: pxa: Fix CKEN usage and hence fix pxa suspend/resume

The PXA CKEN changes broken syspend/resume on the pxa27x. This patch
corrects the problem and fixes another couple of bad references.

Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>


# 7053acbd 04-Apr-2007 Eric Miao <eric.y.miao@gmail.com>

[ARM] 4304/1: removes the unnecessary bit number from CKENnn_XXXX

This patch removes the unnecessary bit number from CKENnn_XXXX
definitions for PXA, so that

CKEN0_PWM0 --> CKEN_PWM0
CKEN1_PWM1 --> CKEN_PWM1
...
CKEN24_CAMERA --> CKEN_CAMERA

The reasons for the change of these defitions are:

1. they do not scale - they are currently valid for pxa2xx, but
definitely not valid for pxa3xx, e.g., pxa3xx has bit 3 for camera
instead of bit 24

2. they are unnecessary - the peripheral name within the definition
has already announced its usage, we don't need those bit numbers
to know which peripheral we are going to enable/disable clock for

3. they are inconvenient - think about this: a driver programmer
for pxa has to remember which bit in the CKEN register to turn
on/off

Another change in the patch is to make the definitions equal to its
clock bit index, so that

#define CKEN_CAMERA (24)

instead of

#define CKEN_CAMERA (1 << 24)

this change, however, will add a run-time bit shift operation in
pxa_set_cken(), but the benefit of this change is that it scales
when bit index exceeds 32, e.g., pxa3xx has two registers CKENA
and CKENB, totally 64 bit for this, suppose CAMERA clock enabling
bit is CKENB:10, one can simply define CKEN_CAMERA to be (32 + 10)
and so that pxa_set_cken() need minimum change to adapt to that.

Signed-off-by: eric miao <eric.y.miao@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>


# 596ce32b 02-Feb-2007 Liam Girdwood <lg@opensource.wolfsonmicro.com>

[ALSA] soc - ASoC 0.13 pxa2xx AC97 driver

This patch updates the pxa2xx AC97 driver to the new API in ASoC 0.13.
Changes:-
o Removed DAI capabilities matching code in favour of manual matching in
the machine drivers.
o Added DAI operations for codec and CPU interfaces.
o Added pxa2xx-ac97.h header

Signed-off-by: Liam Girdwood <lg@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 75b41027 12-Oct-2006 Liam Girdwood <liam.girdwood@wolfsonmicro.com>

[ALSA] ASoC pxa2xx AC97 support

This patch adds pxa2xx AC97 ASoC audio support. It's based on
sound/arm/pxa-ac97 by Nicolas Pitre with the following differences.
o Modified driver structure to use ASoC core PCM callbacks.
o Removed AC97 configuration function (all handled in ASoC core)
o Added and exported ASoC DAI configuration table.
o Added DMA support for AUX DAC and Mic ADC
o Separated out AC97 reset into cold and warm reset functions.
From: Liam Girdwood <liam.girdwood@wolfsonmicro.com>
Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Liam Girdwood <liam.girdwood@wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>