History log of /linux-master/sound/soc/atmel/atmel_ssc_dai.c
Revision Date Author Comments
# 62bd431b 23-Aug-2022 ye xingchen <ye.xingchen@zte.com.cn>

ASoC: atmel_ssc_dai: Remove the unneeded result variable

Return the value from asoc_ssc_init() directly instead of storing it
in another redundant variable.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
Link: https://lore.kernel.org/r/20220823075335.209072-1-ye.xingchen@zte.com.cn
Signed-off-by: Mark Brown <broonie@kernel.org>


# e1d1ffed 14-Jul-2022 Claudiu Beznea <claudiu.beznea@microchip.com>

ASoC: atmel_ssc_dai: remove #ifdef CONFIG_PM

Remove #ifdef CONFIG_PM and use pm_ptr() instead.

Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Link: https://lore.kernel.org/r/20220715090939.1679963-1-claudiu.beznea@microchip.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# 7593e008 23-Jun-2022 Charles Keepax <ckeepax@opensource.cirrus.com>

ASoC: atmel: Migrate to new style legacy DAI naming flag

Change the legacy DAI naming flag from opting in to the new scheme
(non_legacy_dai_naming), to opting out of it (legacy_dai_naming).
These drivers appear to be on the CPU side of the DAI link and
currently uses the legacy naming, so add the new flag.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220623125250.2355471-20-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# a839a53b 19-May-2022 Charles Keepax <ckeepax@opensource.cirrus.com>

ASoC: atmel: Rename set_fmt_new back to set_fmt

Now the core has been migrated across to the new direct clock
specification we can move the drivers back to the normal set_fmt
callback.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220519154318.2153729-31-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# 0fd054a5 19-May-2022 Charles Keepax <ckeepax@opensource.cirrus.com>

ASoC: atmel: Update to use set_fmt_new callback

As part of updating the core to directly tell drivers if they are clock
provider or consumer update these CPU side drivers to use the new direct
callback.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220519154318.2153729-4-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# f9e2ca06 01-Mar-2022 Jiasheng Jiang <jiasheng@iscas.ac.cn>

ASoC: atmel_ssc_dai: Handle errors for clk_enable

As the potential failure of the clk_enable(),
it should be better to check it and return error if fals.

Fixes: cbaadf0f90d6 ("ASoC: atmel_ssc_dai: refactor the startup and shutdown")
Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
Link: https://lore.kernel.org/r/20220301090637.3776558-1-jiasheng@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>


# 4a8cf938 15-Sep-2021 Mark Brown <broonie@kernel.org>

ASoC: atmel: Convert to new style DAI format definitions

Convert the Atmel drivers to use the new style defines for clocking in DAI
formats.

Signed-off-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Codrin Ciubotariu <codrin.ciubotariu@microchip.com>
Acked-by: Peter Rosin <peda@axentia.se>


# 0bdaef8a 07-Jul-2020 Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>

ASoC: atmel: fix kernel-doc

Fix W=1 warning

Kernel-doc is not used in one file and missing argument in the second.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20200707190612.97799-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# e1c7e1fa 14-May-2020 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: atomel: use snd_soc_xxx_active()

We have snd_soc_dai/dai_stream/component_active() macro
This patch uses it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/871rnm6n3z.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>


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

ASoC: atmel: atmel_ssc_dai: move .suspend/.resume to component

There is no big difference at implementation for .suspend/.resume
between DAI driver and Component driver.
But because some driver is using DAI version, thus ALSA SoC needs
to keep supporting it, hence, framework becoming verbose.
If we can switch all DAI driver .suspend/.resume to Component driver,
we can remove verbose code from ALSA SoC.

Driver is getting its private data via dai->dev.
But dai->dev and component->dev are same dev, thus, we can convert
these. For same reason, we can convert dai->active to
component->active if necessary.

This patch moves DAI driver .suspend/.resume to Component driver

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


# 0dce49ef 17-Sep-2019 Gregory CLEMENT <gregory.clement@bootlin.com>

ASoC: atmel_ssc_dai: Remove wrong spinlock usage

A potential bug was reported in the email "[BUG] atmel_ssc_dai: a
possible sleep-in-atomic bug in atmel_ssc_shutdown"[1]

Indeed in the function atmel_ssc_shutdown() free_irq() was called in a
critical section protected by spinlock.

However this spinlock is only used in atmel_ssc_shutdown() and
atmel_ssc_startup() functions. After further analysis, it occurred that
the call to these function are already protected by mutex used on the
calling functions.

Then we can remove the spinlock which will fix this bug as a side
effect. Thanks to this patch the following message disappears:

"BUG: sleeping function called from invalid context at
kernel/locking/mutex.c:909"

[1]: https://www.spinics.net/lists/alsa-devel/msg71286.html

Reviewed-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
Link: https://lore.kernel.org/r/20190918100344.23629-1-gregory.clement@bootlin.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# 376142b7 24-Aug-2019 Michał Mirosław <mirq-linux@rere.qmqm.pl>

ASoC: atmel_ssc_dai: implement left-justified data mode

Enable support for left-justified data mode for SSC-codec link.

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Reviewed-by: Codrin Ciubotariu <codrin.ciubotariu@microchip.com>
Link: https://lore.kernel.org/r/44fa6b700421e80778f20ff9ead2b148cf6d2e92.1566677788.git.mirq-linux@rere.qmqm.pl
Signed-off-by: Mark Brown <broonie@kernel.org>


# db8e3e20 24-Aug-2019 Michał Mirosław <mirq-linux@rere.qmqm.pl>

ASoC: atmel_ssc_dai: rework DAI format configuration

Rework DAI format calculation in preparation for adding more formats
later. As a side-effect this enables all CBM/CBS x CFM/CFS combinations
for supported formats. (Note: the additional modes are not tested.)

Note: this changes FSEDGE to POSITIVE for I2S CBM_CFS mode as the TXSYN
interrupt is not used anyway.

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Link: https://lore.kernel.org/r/f5949b0326fdcdca072f3ed03f77de9e207631cd.1566677788.git.mirq-linux@rere.qmqm.pl
Signed-off-by: Mark Brown <broonie@kernel.org>


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

ASoC: atmel: atmel-pcm-dma.c: use devm_snd_dmaengine_pcm_register()

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

This patch also removes related empty functions

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Codrin Ciubotariu <codrin.ciubotariu@microchip.com>
Signed-off-by: Mark Brown <broonie@kernel.org>


# 1a59d1b8 27-May-2019 Thomas Gleixner <tglx@linutronix.de>

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

Based on 1 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 as published by
the free software foundation either version 2 of the license or at
your option any later version this program is distributed in the
hope that it will be useful but without any warranty without even
the implied warranty of merchantability or fitness for a particular
purpose see the gnu general public license for more details you
should have received a copy of the gnu general public license along
with this program if not write to the free software foundation inc
59 temple place suite 330 boston ma 02111 1307 usa

extracted by the scancode license scanner the SPDX license identifier

GPL-2.0-or-later

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

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Allison Randal <allison@lohutok.net>
Reviewed-by: Richard Fontana <rfontana@redhat.com>
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190527070033.113240726@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# e14614dc 06-Sep-2018 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: atmel_ssc_dai: use devm_snd_soc_register_component()

Now we have devm_snd_soc_register_component().
Let's use it instead of snd_soc_register_component().

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


# c0380478 19-Apr-2018 Wolfram Sang <wsa+renesas@sang-engineering.com>

ASoC: atmel: simplify getting .drvdata

We should get drvdata from struct device directly. Going via
platform_device is an unneeded step back and forth.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Mark Brown <broonie@kernel.org>


# 7bdeac2e 30-Mar-2018 Colin Ian King <colin.king@canonical.com>

ASoC: atmel_ssc_dai: fix spelling mistake: "Stoping" -> "Stopping"

Trivial fix to spelling mistake in pr_debug message text

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Signed-off-by: Mark Brown <broonie@kernel.org>


# a85787ed 15-Nov-2016 Peter Rosin <peda@axentia.se>

ASoC: atmel_ssc_dai: if not provided, default to sensible dividers

When this driver masters BCLK and/or LRCLK, and noone has stated
differently, assume that all the bits of a frame are used.

This relieves the cpu dai users from the duty to fill in the dividers for
the common case.

Signed-off-by: Peter Rosin <peda@axentia.se>
Signed-off-by: Mark Brown <broonie@kernel.org>


# 3e103a65 15-Aug-2016 Christoph Huber <c.huber@bct-electronic.com>

ASoC: atmel_ssc_dai: Don't unconditionally reset SSC on stream startup

commit cbaadf0f90d6 ("ASoC: atmel_ssc_dai: refactor the startup and
shutdown") refactored code such that the SSC is reset on every
startup; this breaks duplex audio (e.g. first start audio playback,
then start record, causing the playback to stop/hang)

Fixes: cbaadf0f90d6 (ASoC: atmel_ssc_dai: refactor the startup and shutdown)
Signed-off-by: Christoph Huber <c.huber@bct-electronic.com>
Signed-off-by: Peter Meerwald-Stadler <p.meerwald@bct-electronic.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org


# e401029e 05-Jul-2016 Peter Meerwald <p.meerwald@bct-electronic.com>

ASoC: atmel_ssc_dai: Fix DMA params for different SSC

follow-up patch from c706f2e55f ASoC: atmel_ssc_dai: distinguish the
different SSC

cpu_dai id is always 0, use platform_device id to distinguish DMA
parameters of SSCs

Signed-off-by: Peter Meerwald-Stadler <p.meerwald@bct-electronic.com>
Signed-off-by: Mark Brown <broonie@kernel.org>


# 80833ff0 27-Apr-2016 Peter Rosin <peda@axentia.se>

ASoC: atmel_ssc_dai: read DSP mode A data on rising edges of bclk

Signed-off-by: Peter Rosin <peda@axentia.se>
Signed-off-by: Mark Brown <broonie@kernel.org>


# c706f2e5 01-Mar-2016 Songjun Wu <songjun.wu@atmel.com>

ASoC: atmel_ssc_dai: distinguish the different SSC

Cpu_dai id always equals 0, can't distinguish the
different SSC. Use platform_device id to record
and distinguish the different SSC.

Signed-off-by: Songjun Wu <songjun.wu@atmel.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>


# 56113f6e 03-Aug-2015 Joe Perches <joe@perches.com>

ASoC: atmel_ssc_dai: Correct misuse of 0x%<decimal>

Correct misuse of 0x%d in logging message.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Mark Brown <broonie@kernel.org>


# b6d6c6e9 09-Feb-2015 Peter Rosin <peda@axentia.se>

ASoC: atmel_ssc_dai: Allow more rates

When the SSC acts as BCK master, use a ratnum rule to limit
the rate instead of only doing the standard rates. When the SSC
acts as BCK slave, allow any BCK frequency up to the SSC master
clock, divided by either of 2, 3 or 6.

Put a cap at 384kHz. Who's /ever/ going to need more than that?

The divider of 2, 3 or 6 is selected based on the Serial Clock Ratio
Considerations section from the SSC documentation:

The Transmitter and the Receiver can be programmed to operate
with the clock signals provided on either the TK or RK pins.
This allows the SSC to support many slave-mode data transfers.
In this case, the maximum clock speed allowed on the RK pin is:
- Peripheral clock divided by 2 if Receiver Frame Synchro is input
- Peripheral clock divided by 3 if Receiver Frame Synchro is output
In addition, the maximum clock speed allowed on the TK pin is:
- Peripheral clock divided by 6 if Transmit Frame Synchro is input
- Peripheral clock divided by 2 if Transmit Frame Synchro is output

Signed-off-by: Peter Rosin <peda@axentia.se>
Acked-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>


# 3fd5b30c 30-Jan-2015 Bo Shen <voice.shen@atmel.com>

ASoC: atmel_ssc_dai: only clean PDC when using PDC

Only using PDC, it needs to clean PDC registers.

Signed-off-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>


# cbaadf0f 30-Jan-2015 Bo Shen <voice.shen@atmel.com>

ASoC: atmel_ssc_dai: refactor the startup and shutdown

In startup function, enable ssc clock and in shutdown function,
disable clock. And also remove disable ssc in shutdown function,
as ssc is disabled in prepare function.

Signed-off-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>


# 20cf2603 30-Jan-2015 Bo Shen <voice.shen@atmel.com>

ASoC: atmel_ssc_dai: fix the setting for DSP mode

When SCC work in DSP A mode, the data outputs/inputs are shift out on
falling edge, the frame sync are sample on the rising edge.

Reported-by: Songjun Wu <songjun.wu@atmel.com>
Signed-off-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>


# eb527149 29-Jan-2015 Peter Rosin <peda@axentia.se>

ASoC: atmel_ssc_dai: Support SND_SOC_DAIFMT_CBM_CFS on I2S

Signed-off-by: Peter Rosin <peda@axentia.se>
Acked-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>


# 67d1aed0 20-Jan-2015 Bo Shen <voice.shen@atmel.com>

ASoC: atmel_ssc_dai: remove clock pin comments

As the clock can be get from TK/RK pin, so remove the comments.

Signed-off-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>


# a43bd7e1 20-Jan-2015 Bo Shen <voice.shen@atmel.com>

ASoC: atmel_ssc_dai: fix start event for I2S mode

According to the I2S specification information as following:
- WS = 0, channel 1 (left)
- WS = 1, channel 2 (right)
So, the start event should be TF/RF falling edge.

Reported-by: Songjun Wu <songjun.wu@atmel.com>
Signed-off-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org


# 15f6c588 08-Dec-2014 Matthieu Crapet <mcrapet@gmail.com>

ASoC: atmel_ssc_dai/trivial: typo fix

Signed-off-by: Matthieu Crapet <mcrapet@gmail.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>


# eb58960e 24-Oct-2014 Peter Rosin <peda@axentia.se>

ASoC: atmel_ssc_dai: Match the CMR divider only in full duplex.

The CMR divider register is shared by playback and capture. The SSC driver
therefore tries to enforce rules so that the needed register content do
not conflict during simultaneous playback/capture. However, the
implementation also prevents changing the register content in
half-duplex scenarios, which is needed when using the OSS API.

Thus, only lock the divider if there is a stream in the other direction.

Fixes the below program to not fail with the atmel ssc dai in master mode.

int
main(void)
{
int fd;
int format;
int channels;
int speed;

if ((fd = open("/dev/dsp", O_WRONLY, 0)) == -1) {
perror("open");
return 1;
}
format = AFMT_S16_LE;
if (ioctl(fd, SNDCTL_DSP_SETFMT, &format) == -1) {
perror("SNDCTL_DSP_SETFMT");
return 1;
}
channels = 2;
if (ioctl(fd, SNDCTL_DSP_CHANNELS, &channels) == -1) {
perror("SNDCTL_DSP_CHANNELS");
return 1;
}
speed = 22025;
if (ioctl(fd, SNDCTL_DSP_SPEED, &speed) == -1) {
perror("SNDCTL_DSP_SPEED");
return 1;
}
return 0;
}

Signed-off-by: Peter Rosin <peda@axentia.se>
Acked-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>


# dfaf5356 11-Jun-2014 Bo Shen <voice.shen@atmel.com>

ASoC: atmel_ssc_dai: enable fslen extension feature

When SSC work as master, it will generate the frame sync signal.
On old SoCs, it only supports frame sync length less or equal to
16bits, on newer SoCs, it supports frame sync length extension,
which can support frame size larger than 16 bits.
So, add this to make it supports playback 24/32 bits audio clips.

Signed-off-by: Bo Shen <voice.shen@atmel.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>


# 048d4ff8 09-Feb-2014 Bo Shen <voice.shen@atmel.com>

ASoC: atmel_ssc_dai: make option to choose clock

When SSC works in slave mode, according to the hardware design, the
clock can get from TK pin, also can get from RK pin. So, add one
parameter to choose where the clock from.

Signed-off-by: Bo Shen <voice.shen@atmel.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>


# a8f1f100 03-Dec-2013 Bo Shen <voice.shen@atmel.com>

ASoC: atmel_ssc_dai: add dai trigger ops

According to the SSC specifiation, it should be enabled after DMA is
enabled. So, add trigger operation to make sure the right sequence.

Signed-off-by: Bo Shen <voice.shen@atmel.com>
Tested-by: Richard Genoud <richard.genoud@gmail.com>
Signed-off-by: Mark Brown <broonie@linaro.org>


# 1d198f26 08-Oct-2013 Joe Perches <joe@perches.com>

sound: Remove unnecessary semicolons

These aren't necessary after switch and if blocks.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# e0111434 04-Sep-2013 Bo Shen <voice.shen@atmel.com>

ASoC: atmel: disable error interrupt

As once the error interrupt is triggered, it can not be cleared.
So, disable it.

No side effect found while testing on sama5d3xek and at91sam9x5ek
boards.

Signed-off-by: Bo Shen <voice.shen@atmel.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>


# cede8d7a 03-Jul-2013 Bo Shen <voice.shen@atmel.com>

ASoC: atmel-pcm-dma: move prepare for dma to dai prepare

as prepare callback for dma is acctually access ssc register
which better done in dai driver, so move it to dai prepare
callback function

Signed-off-by: Bo Shen <voice.shen@atmel.com>
Reviewed-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>


# f1b0dd8b 03-Jul-2013 Bo Shen <voice.shen@atmel.com>

ASoC: atmel_ssc_dai: add error mask define

add error mask define, which will be used when execute DMA transfer

Signed-off-by: Bo Shen <voice.shen@atmel.com>
Reviewed-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>


# 01f00d55 03-Jul-2013 Bo Shen <voice.shen@atmel.com>

ASoC: atmel_ssc_dai: move set dma data to startup callback

move set dma data to startup callback function, if the set dma
data exist in hw_params callback, so the dma data only usable when
call hw_params, if want use it before hw_params callback, it will
cause NULL pointer access oops

Signed-off-by: Bo Shen <voice.shen@atmel.com>
Reviewed-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>


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

ASoC: switch over to use snd_soc_register_component() on atmel ssc

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


# f6a75d95 20-Feb-2013 Zoltan Puskas <zpuskas@dension.com>

ASoC: atmel: Add slave mode support to SSC in DSP Mode A

Add previously unsupported slave mode to the SSC peripheral when using
DSP/PCM Mode A format on the Atmel ARM platform.

Signed-off-by: Zoltan Puskas <zpuskas@dension.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 69706028 30-Jan-2013 Bo Shen <voice.shen@atmel.com>

ASoC: atmel_ssc_dai: correct sequence when unload

correct the sequence when unload this module

Signed-off-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# e08b273c 30-Jan-2013 Bo Shen <voice.shen@atmel.com>

ASoC: atmel_ssc_dai: remove error set private data

ssc private data has been set in ssc driver, this cause the error
private data set to ssc, remove it

Signed-off-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 153f5a18 08-Dec-2012 Joachim Eastwood <manabian@gmail.com>

ASoC: atmel-soc: make it buildable on other architectures

Not very useful on non AT91/AVR32 platforms but it provides
more build coverage and prepares for ARM multiplatform.

Also fixes a couple of format type warnings.

Signed-off-by: Joachim Eastwood <manabian@gmail.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 3951e4aa 27-Nov-2012 Bo Shen <voice.shen@atmel.com>

ASoC: atmel-pcm: dma support based on pcm dmaengine

Specify overrun bit in interrupt mask
Add dmaengine specific routines

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
[voice.shen@atmel.com: adapt to soc dmaengine framework]
Signed-off-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 92dfa619 27-Nov-2012 Bo Shen <voice.shen@atmel.com>

ASoC: atmel-pcm: split into two file

This patch is split original atmel-pcm.c into new atmel-pcm.c and
atmel-pcm-pdc.c two files. The new atmel-pcm.c is the share routine
while will be used for pdc or dma transfer.

Using SND_ATMEL_SOC_PDC to select using PDC for audio transfer

Signed-off-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# be681a82 14-Nov-2012 Bo Shen <voice.shen@atmel.com>

ASoC: atmel-ssc-dai: register dai and pcm directly

change the method for register dai and pcm
- let the atmel-ssc-dai no longer as a standalone platform device
- remap ssc and then register dai directly
- register pcm from dai directly
- modify the code which related with this change

Signed-off-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


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

ASoC: Convert atmel directory to module_platform_driver

Factor out some boilerplate code.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
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>


# 2f2b3cf1 09-Jun-2011 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

sound/atmel_ssc_dai: add a missing space to an error message

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 840d8e5e 01-Jun-2011 Joachim Eastwood <manabian@gmail.com>

ASoC: atmel_ssc: Don't try to free ssc if request failed

We should only call ssc_free() when ssc_request() succeeds or bad
things will happen.

Signed-off-by: Joachim Eastwood <joachim.eastwood@jotron.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 2cdcd951 26-May-2011 Nicolas Ferre <nicolas.ferre@microchip.com>

ASoC: atmel_ssc_dai: fix ssc error path

We do not have to free a resource that is not allocated yet.

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 25985edc 30-Mar-2011 Lucas De Marchi <lucas.demarchi@profusion.mobi>

Fix common misspellings

Fixes generated by 'codespell' and manually reviewed.

Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>


# abfa4eae 18-Aug-2010 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: Add simplfied device registration for Atmel SSC devices

Since the SSC is already being registered as a device under arch and
the DMA and SSC hardware are pretty much the same provide a simplified
device registration function for the Atmel SSC which will add the
ASoC-specific devices within the ASoC code, parenting the SSC device
off the actual SSC device. Also use it in the sam9g20-ek driver.

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


# 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>


# 911ff689 07-Jun-2010 Wan ZongShun <mcuos.com@gmail.com>

ASoC: atmel: trivial code cleanup

Remove break after return, it is not needed.

Signed-off-by: Wan ZongShun <mcuos.com@gmail.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 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>


# 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>


# 64ca0404 02-Feb-2009 Liam Girdwood <lrg@slimlogic.co.uk>

ALSA: ASoC: email - update email addresses.

This just updates my email address on some drivers I'd forgotten in a
previous patch.

Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 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>


# 471716f7 09-Dec-2008 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: Fix typos in Atmel module registration

I wish I had boards which work with unmodified kernels :/

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


# 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>


# 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>


# 6c742509 03-Oct-2008 Sedji Gaouaou <sedji.gaouaou@atmel.com>

ASoC: Merge AT91 and AVR32 support into a single atmel architecture

The Ateml AT91 and AVR32 SoC share common IP for audio and can share the
same driver code using the atmel-ssc API provided for both architectures.
Do this, creating a new unified atmel ASoC architecture to replace the
previous at32 and at91 ones.

[This was contributed as a patch series for reviewability but has been
squashed down to a single commit to help preserve both the history and
bisectability. A small bugfix from Jukka is included.]

Tested-by: Jukka Hynninen <ext-jukka.hynninen@vaisala.com>
Signed-off-by: Sedji Gaouaou <sedji.gaouaou@atmel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>