History log of /linux-master/sound/soc/mxs/mxs-sgtl5000.c
Revision Date Author Comments
# 340d79a1 06-Oct-2023 Rob Herring <robh@kernel.org>

ASoC: Explicitly include correct DT includes

The DT of_device.h and of_platform.h date back to the separate
of_platform_bus_type before it was merged into the regular platform bus.
As part of that merge prepping Arm DT support 13 years ago, they
"temporarily" include each other. They also include platform_device.h
and of.h. As a result, there's a pretty much random mix of those include
files used throughout the tree. In order to detangle these headers and
replace the implicit includes with struct declarations, users need to
explicitly include the correct includes.

Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea@tuxon.dev> # for at91
Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20231006-dt-asoc-header-cleanups-v3-1-13a4f0f7fee6@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>


# 59b8f718 11-Sep-2023 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: mxs: convert not to use asoc_xxx()

ASoC is now unified asoc_xxx() into snd_soc_xxx().
This patch convert asoc_xxx() to snd_soc_xxx().

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


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

ASoC: mxs: mxs-sgtl5000: 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-116-u.kleine-koenig@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>


# 1e108e60 10-Mar-2023 Rob Herring <robh@kernel.org>

ASoC: Use of_property_present() for testing DT property presence

It is preferred to use typed property access functions (i.e.
of_property_read_<type> functions) rather than low-level
of_get_property/of_find_property functions for reading properties. As
part of this, convert of_get_property/of_find_property calls to the
recently added of_property_present() helper when we just want to test
for presence of a property and nothing more.

Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20230310144732.1546328-1-robh@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>


# 6ae0a4d8 07-Mar-2022 Miaoqian Lin <linmq006@gmail.com>

ASoC: mxs: Fix error handling in mxs_sgtl5000_probe

This function only calls of_node_put() in the regular path.
And it will cause refcount leak in error paths.
For example, when codec_np is NULL, saif_np[0] and saif_np[1]
are not NULL, it will cause leaks.

of_node_put() will check if the node pointer is NULL, so we can
call it directly to release the refcount of regular pointers.

Fixes: e968194b45c4 ("ASoC: mxs: add device tree support for mxs-sgtl5000")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Link: https://lore.kernel.org/r/20220308020146.26496-1-linmq006@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# 7a17f6a9 13-Dec-2021 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: mxs: Use dev_err_probe() helper

Use the dev_err_probe() helper, instead of open-coding the same
operation.

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


# 3359128d 19-Jul-2020 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: mxs: use asoc_substream_to_rtd()

Now we can use asoc_substream_to_rtd() macro,
let's use it.

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


# 84a41e06 22-Mar-2020 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: mxs: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/87lfnrir6c.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>


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

ASoC: mxs: mxs-sgtl5000: consider CPU-Platform possibility

commit 5f92229d184b ("ASoC: mxs: mxs-sgtl5000: don't select unnecessary
Platform")

Current ALSA SoC avoid to add duplicate component to rtd,
and this driver was selecting CPU component as Platform component.
Thus, above patch removed Platform settings from this driver,
because it assumed these are same component.

But, some CPU driver is using generic DMAEngine, in such case, both
CPU component and Platform component will have same of_node/name.
In other words, there are some components which are different but
have same of_node/name.

In such case, Card driver definitely need to select Platform even
though it is same as CPU.
It is depends on CPU driver, but is difficult to know it from Card driver.
This patch reverts above patch.

Fixes: commit 5f92229d184b ("ASoC: mxs: mxs-sgtl5000: don't select unnecessary Platform")
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>


# 5f92229d 18-Jun-2019 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: mxs: mxs-sgtl5000: don't select unnecessary Platform

ALSA SoC is now supporting "no Platform". Sound card doesn't need to
select "CPU component" as "Platform" anymore if it doesn't need
special Platform.
This patch removes such settings.

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


# 49cb4488 05-Jun-2019 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: mxs: mxs-sgtl5000: use modern dai_link style

ASoC is now supporting modern style dai_link
(= snd_soc_dai_link_component) for CPU/Codec/Platform.
This patch switches to use it.

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


# 16216333 19-May-2019 Thomas Gleixner <tglx@linutronix.de>

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

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 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
51 franklin street fifth floor boston ma 02110 1301 usa

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 [no]_[pad]_[ctrl] 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 51 franklin street fifth floor boston ma
02110 1301 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 176 file(s).

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Jilayne Lovejoy <opensource@jilayne.com>
Reviewed-by: Steve Winslow <swinslow@gmail.com>
Reviewed-by: Allison Randal <allison@lohutok.net>
Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org>
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190519154040.652910950@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# d04c413f 17-Jan-2018 Fabio Estevam <fabio.estevam@nxp.com>

ASoC: mxs-sgtl5000: Do not print error on probe deferral

Probe deferral may happen, so do not print an error message in this
case.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: Mark Brown <broonie@kernel.org>


# 949293d4 12-Jan-2018 Christian Fischer <fischerc@swissphone.de>

ASoC: mxs-sgtl5000: add audio-routing support

Add dapm_widgets to machine-driver (from imx-sgtl5000).
If the "audio-routing"-property is present at probing the dapm-widgets
getting linked to the card.

Signed-off-by: Christian Fischer <fischerc@swissphone.de>
Signed-off-by: Mark Brown <broonie@kernel.org>


# 4c316783 19-Aug-2017 Donglin Peng <dolinux.peng@gmail.com>

ASoC: mxs-sgtl5000: Remove unnecessary function call

First of all,the address of pdev->dev is assigned to card->dev,then
the function platform_set_drvdata copies the value the variable card
to pdev->dev.driver_data, but when calling snd_soc_register_card,the
function dev_set_drvdata(card->dev, card) will also do the same copy
operation,so i think that the former copy operation can be removed.

Signed-off-by: Peng Donglin <dolinux.peng@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>


# 9b6fdef6 15-Oct-2016 Julia Lawall <Julia.Lawall@lip6.fr>

ASoC: constify snd_soc_ops structures

Check for snd_soc_ops structures that are only stored in the ops field of a
snd_soc_dai_link structure. This field is declared const, so snd_soc_ops
structures that have this property can be declared as const also.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct snd_soc_ops i@p = { ... };

@ok1@
identifier r.i;
struct snd_soc_dai_link e;
position p;
@@
e.ops = &i@p;

@ok2@
identifier r.i, e;
position p;
@@
struct snd_soc_dai_link e[] = { ..., { .ops = &i@p, }, ..., };

@bad@
position p != {r.p,ok1.p,ok2.p};
identifier r.i;
struct snd_soc_ops e;
@@
e@i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
struct snd_soc_ops i = { ... };
// </smpl>

The effect on the layout of the .o files is shown by the following output
of the size command, first before then after the transformation:

text data bss dec hex filename
4500 696 0 5196 144c sound/soc/generic/simple-card.o
4564 632 0 5196 144c sound/soc/generic/simple-card.o

text data bss dec hex filename
3018 608 0 3626 e2a sound/soc/generic/simple-scu-card.o
3074 544 0 3618 e22 sound/soc/generic/simple-scu-card.o

text data bss dec hex filename
4148 2448 768 7364 1cc4 sound/soc/intel/boards/bdw-rt5677.o
4212 2384 768 7364 1cc4 sound/soc/intel/boards/bdw-rt5677.o

text data bss dec hex filename
5403 4628 384 10415 28af sound/soc/intel/boards/bxt_da7219_max98357a.o
5531 4516 384 10431 28bf sound/soc/intel/boards/bxt_da7219_max98357a.o

text data bss dec hex filename
5275 4496 384 10155 27ab sound/soc/intel/boards/bxt_rt298.o
5403 4368 384 10155 27ab sound/soc/intel/boards/bxt_rt298.o

text data bss dec hex filename
10017 2344 48 12409 3079 sound/soc/intel/boards/bytcr_rt5640.o
10145 2232 48 12425 3089 sound/soc/intel/boards/bytcr_rt5640.o

text data bss dec hex filename
3719 2356 0 6075 17bb sound/soc/intel/boards/bytcr_rt5651.o
3847 2244 0 6091 17cb sound/soc/intel/boards/bytcr_rt5651.o

text data bss dec hex filename
3598 2392 0 5990 1766 sound/soc/intel/boards/cht_bsw_max98090_ti.o
3726 2280 0 6006 1776 sound/soc/intel/boards/cht_bsw_max98090_ti.o

text data bss dec hex filename
5343 3624 16 8983 2317 sound/soc/intel/boards/cht_bsw_rt5645.o
5471 3496 16 8983 2317 sound/soc/intel/boards/cht_bsw_rt5645.o

text data bss dec hex filename
4662 2592 384 7638 1dd6 sound/soc/intel/boards/cht_bsw_rt5672.o
4790 2464 384 7638 1dd6 sound/soc/intel/boards/cht_bsw_rt5672.o

text data bss dec hex filename
1595 2528 0 4123 101b sound/soc/intel/boards/haswell.o
1659 2472 0 4131 1023 sound/soc/intel/boards/haswell.o

text data bss dec hex filename
6272 4760 416 11448 2cb8 sound/soc/intel/boards/skl_nau88l25_max98357a.o
6464 4568 416 11448 2cb8 sound/soc/intel/boards/skl_nau88l25_max98357a.o

text data bss dec hex filename
7075 4888 416 12379 305b sound/soc/intel/boards/skl_nau88l25_ssm4567.o
7267 4696 416 12379 305b sound/soc/intel/boards/skl_nau88l25_ssm4567.o

text data bss dec hex filename
5659 4496 384 10539 292b sound/soc/intel/boards/skl_rt286.o
5787 4368 384 10539 292b sound/soc/intel/boards/skl_rt286.o

text data bss dec hex filename
1721 2048 0 3769 eb9 sound/soc/kirkwood/armada-370-db.o
1769 1976 0 3745 ea1 sound/soc/kirkwood/armada-370-db.o

text data bss dec hex filename
1363 1792 0 3155 c53 sound/soc/mxs/mxs-sgtl5000.o
1427 1728 0 3155 c53 sound/soc/mxs/mxs-sgtl5000.o

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Mark Brown <broonie@kernel.org>


# 5b73de19 30-Aug-2015 Axel Lin <axel.lin@ingics.com>

ASoC: mxs-sgtl5000: Convert to devm_snd_soc_register_card

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>


# bc6a5d64 01-Jan-2015 Lars-Peter Clausen <lars@metafoo.de>

ASoC: mxs-sgtl5000: Use static DAI format setup

Set the dai_fmt field in the dai_link struct instead of manually calling
snd_soc_dai_fmt(). This makes the code cleaner and shorter.

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


# d206f661 27-Nov-2014 Fabio Estevam <fabio.estevam@freescale.com>

ASoC: mxs-sgtl5000: Remove MCLK restriction

According to the sgtl5000 datasheet the MCLK frequency range restriction of
8 to 27 MHz only applies when the PLL is used - synchronous SYS_MCLK input mode.

mxs-sgtl5000 machine sets the codec as slave, and mx28 generates MCLK in the
range of 256*fs, 384*fs or 512*fs, which is called asynchronous SYS_MCLK
input.

In asynchronous SYS_MCLK we cannot have the 8 to 27 MHz check because if we
want to play a 8KHz sample rate track, with a MCLK of 8k * 512 = 4.096MHz the
current check would return -EINVAL, which is not correct.

Remove the 8 to 27MHz frequency check, since this only applies to the
synchronous SYS_MCLK input case.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@kernel.org>


# 38b089d7 20-Oct-2014 Wolfram Sang <wsa@kernel.org>

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


# 38f2b8cb 02-Sep-2013 Fabio Estevam <fabio.estevam@freescale.com>

ASoC: mxs: mxs-sgtl5000: Simplify probe function

mxs is a device tree only platform, which allows us to simplify a bit
mxs_sgtl5000_probe(), because there is no need to check whether device tree is
supported or not.

Remove mxs_sgtl5000_probe_dt() and place its content inside mxs_sgtl5000_probe()
for making the code simpler.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>


# a90e6053 29-Aug-2013 Fabio Estevam <fabio.estevam@freescale.com>

ASoC: mxs-sgtl5000: Configure the dai_links as unidirectional

On a mx28 board, running "aplay -l" and "arecord -l" results in the following:

$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: mxssgtl5000 [mxs_sgtl5000], device 0: Playback sgtl5000-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: mxssgtl5000 [mxs_sgtl5000], device 1: Capture sgtl5000-1 []
Subdevices: 1/1
Subdevice #0: subdevice #0

$ arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: mxssgtl5000 [mxs_sgtl5000], device 0: Playback sgtl5000-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: mxssgtl5000 [mxs_sgtl5000], device 1: Capture sgtl5000-1 []
Subdevices: 1/1
Subdevice #0: subdevice #0

,which is not correct because we got a capture device listed in aplay and a
playback device listed in arecord.

On mx28 there are two serial audio interface ports (SAIF0 and SAIF1) and each
one of them are unidirectional.

Allow to specify a dai link as 'playback_only' or 'capture_only', which suits
well for this case.

After this change we can correctly report the capabilities as follows:

$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: mxssgtl5000 [mxs_sgtl5000], device 0: HiFi Playback sgtl5000-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0

$ arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: mxssgtl5000 [mxs_sgtl5000], device 1: HiFi Capture sgtl5000-1 []
Subdevices: 1/1
Subdevice #0: subdevice #0

Also tested playback and capture on the mx28evk board.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>


# d66a5b9c 02-Aug-2013 Lothar Waßmann <LW@KARO-electronics.de>

ASoC: mxs: add some error messages to help identifying problems

Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de>
Signed-off-by: Mark Brown <broonie@linaro.org>


# 204f0291 18-Jul-2013 Mark Brown <broonie@linaro.org>

ASoC: mxs: Remove unneeded mach-types.h inclusions

Signed-off-by: Mark Brown <broonie@linaro.org>
Acked-by: Shawn Guo <shawn.guo@linaro.org>


# 24279dce 24-Apr-2013 Fabio Estevam <fabio.estevam@freescale.com>

ASoC: mxs-sgtl5000: Remove unneeded fields from snd_soc_dai_link

It makes no sense to hardcode the I2C bus into the codec_name field.

cpu_dai_name and platform_name are also overwritten later in
mxs_sgtl5000_probe_dt().

So remove the three fields, as mxs platform is dt-only platform.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 29f421c2 24-Apr-2013 Fabio Estevam <fabio.estevam@freescale.com>

ASoC: mxs-sgtl5000: Remove unneeded 'ret' variable

Variable 'ret' is not needed here, so just remove it.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 666c25e3 24-Apr-2013 Fabio Estevam <fabio.estevam@freescale.com>

ASoC: mxs-sgtl5000: Remove unneeded fields from snd_soc_dai_link

It makes no sense to hardcode the I2C bus into the codec_name field.

cpu_dai_name and platform_name are also overwritten later in
mxs_sgtl5000_probe_dt().

So remove the three fields, as mxs platform is dt-only platform.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# f8b24fcb 24-Apr-2013 Fabio Estevam <fabio.estevam@freescale.com>

ASoC: mxs-sgtl5000: Remove unneeded 'ret' variable

Variable 'ret' is not needed here, so just remove it.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


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

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


# bc92657a 25-May-2012 Stephen Warren <swarren@nvidia.com>

ASoC: make snd_soc_dai_link more symmetrical

Prior to this patch, the CPU side of a DAI link was specified using a
single name. Often, this was the result of calling dev_name() on the
device providing the DAI, but in the case of a CPU DAI driver that
provided multiple DAIs, it needed to mix together both the device name
and some device-relative name, in order to form a single globally unique
name.

However, the CODEC side of the DAI link was specified using separate
fields for device (name or OF node) and device-relative DAI name.

This patch allows the CPU side of a DAI link to be specified in the same
way as the CODEC side, separating concepts of device and device-relative
DAI name.

I believe this will be important in multi-codec and/or dynamic PCM
scenarios, where a single CPU driver provides multiple DAIs, while also
booting using device tree, with accompanying desire not to hard-code the
CPU side device's name into the original .cpu_dai_name field.

Ideally, both the CPU DAI and CODEC DAI loops in soc_bind_dai_link()
would now be identical. However, two things prevent that at present:

1) The need to save rtd->codec for the CODEC side, which means we have
to search for the CODEC explicitly, and not just the CODEC side DAI.

2) Since we know the CODEC side DAI is part of a codec, and not just
a standalone DAI, it's slightly more efficient to convert .codec_name/
.codec_of_node into a codec first, and then compare each DAI's .codec
field, since this avoids strcmp() on each DAI's CODEC's name within
the loop.

However, the two loops are essentially semantically equivalent.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# e968194b 11-May-2012 Shawn Guo <shawn.guo@linaro.org>

ASoC: mxs: add device tree support for mxs-sgtl5000

Add device tree probe for mxs-sgtl5000 machine driver.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 4da3fe78 11-May-2012 Shawn Guo <shawn.guo@linaro.org>

ASoC: mxs: mxs-pcm does not need to be a plaform_driver

Same as the commit 518de86 (ASoC: tegra: register 'platform' from DAIs,
get rid of pdev), it makes mxs-pcm not a platform_driver but helper to
register "platform", so that the platform_device for mxs-pcm can be
saved completely.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# a5b68348 28-Dec-2011 Lothar Waßmann <LW@KARO-electronics.de>

ASoC: mxs: Add .owner to struct snd_soc_card

Add missing .owner of struct snd_soc_card. This prevents the module from being
removed from underneath its users.

Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de>
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 9fd369b1 09-Dec-2011 Lothar Waßmann <LW@KARO-electronics.de>

ASoC: mxs: Add appropriate MODULE_ALIAS()

Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de>
Acked-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 85aa0960 23-Nov-2011 Axel Lin <axel.lin@gmail.com>

ASoC: Convert mxs directory to module_platform_driver

Factor out some boilerplate code.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Wolfram Sang <w.sang@pengutronix.de>
Acked-by: Dong Aisheng <dong.aisheng@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 78a262c8 21-Aug-2011 Dong Aisheng <b29396@freescale.com>

ASoC: mxs-sgtl5000: add record function

Signed-off-by: Dong Aisheng <b29396@freescale.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# fcb5e47e 20-Jul-2011 Dong Aisheng <b29396@freescale.com>

ASoC: mxs: add mxs-sgtl5000 machine driver

The driver only supports playback firstly.
For recording, as we have to use two saif instances to implement full
duplex (playback & recording) due to hardware limitation, we need to
figure out a good design to fit in ASoC.

Signed-off-by: Dong Aisheng <b29396@freescale.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Tested-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>