summaryrefslogtreecommitdiffstats
path: root/sound/soc/generic
Commit message (Collapse)AuthorAgeFilesLines
* ASoC: simple card: set cpu-dai sysclk with mclk-fsArnaud Pouliquen2015-07-071-0/+9
| | | | | | | | | Allows to request a specific mclk frequency per cpu_dai. To support some codecs with mclk provided by the cpu_dai, the mclk rate must be set depending on frame rate. Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: simple card: Add mclk-fs property in dai-linkArnaud Pouliquen2015-06-121-3/+15
| | | | | | | | Add mclk-fs ratio property per dai-link sub node. This will allow to manage several codecs with different ratio. Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: simple-card: support platform in dts parseJun Nie2015-05-041-2/+14
| | | | | | | | Support platform in dts parse so that dma pcm component can be added in dts. Signed-off-by: Jun Nie <jun.nie@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
*-. Merge remote-tracking branches 'asoc/topic/rt5641', 'asoc/topic/rt5677' and ↵Mark Brown2015-04-121-22/+8Star
|\ \ | | | | | | | | | 'asoc/topic/sh-cleanup' into asoc-next
| | * ASoC: simple-card: Remove support for setting differing DAI formatsLars-Peter Clausen2015-03-271-22/+8Star
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Having to set different formats on the CPU side and the CODEC side of a DAI link is usually indication that something is terribly wrong and in most cases is a result of a broken driver that implements a set_fmt() callback which does not follow the specification. In the past this feature has been used to work around broken drivers, rather than fixing them. We don't really want to encourage this, so remove support for setting different formats on both ends of the link. Along the way switch to static DAI format setup by setting the the dai_fmt field of the snd_soc_dai_link rather than calling snd_soc_dai_fmt(). Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| |
| \
| \
| \
| \
| \
*-----. | Merge remote-tracking branches 'asoc/topic/jack', 'asoc/topic/max98357a', ↵Mark Brown2015-03-051-10/+10
|\ \ \ \| | | | | | | | | | | | | | | | 'asoc/topic/omap' and 'asoc/topic/rt286' into asoc-next
| | | \ \
| | | \ \
| | *-. | | Merge remote-tracking branches 'asoc/topic/simple', 'asoc/topic/sta32x', ↵Mark Brown2015-02-091-0/+34
| | |\ \| | | | | | | | | | | | | | | | | | | | 'asoc/topic/tdm-slot', 'asoc/topic/tegra' and 'asoc/topic/tlv320aic3x' into asoc-next
| * | | | | ASoC: simple-card: Register jacks at the card levelLars-Peter Clausen2015-03-041-10/+10
| | |_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The jacks are card level elements so use snd_soc_card_jack_new() instead of snd_soc_jack_new() to register them. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
* / | | | ASoC: simple-card: Add a NULL pointer check in asoc_simple_card_dai_link_ofVishal Thanki2015-03-031-0/+5
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | Make sure devm_kzalloc() succeeds. Signed-off-by: Vishal Thanki <vishalthanki@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | |
| \ \ \
*-. \ \ \ Merge remote-tracking branches 'asoc/topic/rx51', 'asoc/topic/samsung', ↵Mark Brown2015-02-041-0/+34
|\ \ \ \ \ | |_|/ / / |/| | / / | | |/ / | | | / | | |/ | |/| 'asoc/topic/sh', 'asoc/topic/simple' and 'asoc/topic/sta32x' into asoc-next
| | * ASoC: simple-card: Enable and disable DAI clocks as neededJyri Sarha2015-01-151-0/+34
| |/ | | | | | | | | | | | | | | | | | | Call clk_prepare_enable() and clk_disable_unprepare() for cpu dai clock and codec dai clock in dai statup and shutdown callbacks. This to make sure the related clock are enabled when the audio device is used. Signed-off-by: Jyri Sarha <jsarha@ti.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* / ASoC: simple-card: Fix crash in asoc_simple_card_unref()Geert Uytterhoeven2015-01-141-4/+3Star
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | If asoc_simple_card_probe() fails, asoc_simple_card_unref() may be called before dev_set_drvdata(), causing a NULL pointer dereference in asoc_simple_card_unref(): Unable to handle kernel NULL pointer dereference at virtual address 000000d4 ... PC is at asoc_simple_card_unref+0x14/0x48 LR is at asoc_simple_card_probe+0x3d4/0x40c This typically happens because asoc_simple_card_parse_of() returns -EPROBE_DEFER, but other failure modes are possible. devm_snd_soc_register_card()/snd_soc_register_card() may fail either before or after dev_set_drvdata(). Pass a snd_soc_card pointer instead of a platform_device pointer to asoc_simple_card_unref() to fix this. Note that if CONFIG_OF_DYNAMIC=n, of_node_put() is a dummy, and gcc may optimize away the loop over card->dai_link, never actually dereferencing card, and thus avoiding the crash... Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Fixes: e512e001dafa54e5 ("ASoC: simple-card: Fix the reference count of device nodes") Signed-off-by: Mark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org
* Merge tag 'driver-core-3.19-rc1' of ↵Linus Torvalds2014-12-151-1/+0Star
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core update from Greg KH: "Here's the set of driver core patches for 3.19-rc1. They are dominated by the removal of the .owner field in platform drivers. They touch a lot of files, but they are "simple" changes, just removing a line in a structure. Other than that, a few minor driver core and debugfs changes. There are some ath9k patches coming in through this tree that have been acked by the wireless maintainers as they relied on the debugfs changes. Everything has been in linux-next for a while" * tag 'driver-core-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (324 commits) Revert "ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries" fs: debugfs: add forward declaration for struct device type firmware class: Deletion of an unnecessary check before the function call "vunmap" firmware loader: fix hung task warning dump devcoredump: provide a one-way disable function device: Add dev_<level>_once variants ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries ath: use seq_file api for ath9k debugfs files debugfs: add helper function to create device related seq_file drivers/base: cacheinfo: remove noisy error boot message Revert "core: platform: add warning if driver has no owner" drivers: base: support cpu cache information interface to userspace via sysfs drivers: base: add cpu_device_create to support per-cpu devices topology: replace custom attribute macros with standard DEVICE_ATTR* cpumask: factor out show_cpumap into separate helper function driver core: Fix unbalanced device reference in drivers_probe driver core: fix race with userland in device_add() sysfs/kernfs: make read requests on pre-alloc files use the buffer. sysfs/kernfs: allow attributes to request write buffer be pre-allocated. fs: sysfs: return EGBIG on write if offset is larger than file size ...
| * ASoC: generic: drop owner assignment from platform_driversWolfram Sang2014-10-201-1/+0Star
| | | | | | | | | | | | | | 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>
* | ASoC: simple-card: Remove useless function argumentJean-Francois Moine2014-11-251-2/+1Star
| | | | | | | | | | | | | | | | The device node pointer 'cpu' is not used in the function asoc_simple_card_parse_daifmt(). Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: simple-card: Remove useless castsJean-Francois Moine2014-11-101-5/+2Star
| | | | | | | | | | | | | | | | There is no need to cast the cpu_of_node or codec_of_node of the dai_links when calling of_put_node. Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: simple-card: add "invert" property for detect GPIOsJianqun2014-11-031-4/+11
| | | | | | | | | | | | | | | | Since hardware may invert detect GPIO of headphone or mic, add one property to support software invert. Signed-off-by: Jianqun <jay.xu@rock-chips.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: simple-card: add asoc_simple_card_parse_daifmt()Kuninori Morimoto2014-10-281-69/+65Star
| | | | | | | | | | | | | | | | | | | | Current daifmt setting method in simple-card driver is placed to many places, and using un-readable/confusable method. This patch adds new asoc_simple_card_parse_daifmt() and tidyup code. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: simple-card: Delete unneeded test before of_node_putFabio Estevam2014-10-201-10/+5Star
|/ | | | | | | | of_node_put() supports NULL as its argument, so the initial test is not necessary. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: simple-card: Initialize headphone and mic GPIO numbersGeert Uytterhoeven2014-10-071-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | The uninitialized default of 0 for gpio_hp_det and gpio_mic_det doesn't play well with asm-generic's gpio_is_valid(): static inline bool gpio_is_valid(int number) { return number >= 0 && number < ARCH_NR_GPIOS; } Hence on r8a7740/armadillo-legacy: sh-mobile-hdmi sh-mobile-hdmi: SH Mobile HDMI Audio Codec sh-mobile-hdmi sh-mobile-hdmi: ASoC: DAPM unknown pin Headphones sh-mobile-hdmi sh-mobile-hdmi: ASoC: DAPM unknown pin Mic Jack After that the kernel log is spammed ca. 7 times per second with: sh-mobile-hdmi sh-mobile-hdmi: ASoC: DAPM unknown pin Headphones Initialize the GPIO numbers with a negative number (-ENOENT) to fix this. Fixes: 3fe240326cc395c6 ("ASoC: simple-card: Add mic and hp detect gpios.") Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: simple-card: Add mic and hp detect gpios.Dylan Reid2014-10-021-0/+73
| | | | | | | | | Allow Headphone and Microphone jack detect gpios to be specified in device tree. This will allow a few systems including rk3288_max98090 to use simple-card instead of having their own board file. Signed-off-by: Dylan Reid <dgreid@chromium.org> Signed-off-by: Mark Brown <broonie@kernel.org>
* Merge tag 'v3.17-rc4' into asoc-simpleMark Brown2014-10-021-0/+8
|\ | | | | | | Linux 3.17-rc4
| * ASoC: simple-card: Fix bug of wrong decrement DT node's refcountXiubo Li2014-09-011-0/+8
| | | | | | | | | | | | | | | | | | DAI links's cpu_of_node's and codec_of_node's refcounts shouldn't be decremented immediately at the end of the probe() fucntion. Because we will still use them before the audio card is removed. Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: simple-card: tidyup get dai_link/dai_props from privKuninori Morimoto2014-09-121-9/+7Star
| | | | | | | | | | | | | | It can get dai_link/dai_props pointer from priv + index Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: simple-card: tidyup use priv in parameterKuninori Morimoto2014-09-121-6/+9
| | | | | | | | | | | | | | | | | | priv has many information about simple-card driver. Using it becomes easy to extend feature. This patch gets dev from priv as 1st step Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: simple-card: fix regression in clock rate lookupArnd Bergmann2014-09-101-2/+1Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 7c7b9cf53d284f ("ASoC: simple-card: fixup cpu_dai_name clear case") changed the way that "sound-dai" properties are handled, which leads to the clock frequency not being picked up from the node that the phandle points to, as correctly identified by gcc with this warning: sound/soc/generic/simple-card.c: In function 'asoc_simple_card_sub_parse_of': sound/soc/generic/simple-card.c:165:7: warning: 'node' may be used uninitialized in this function [-Wmaybe-uninitialized] This restores the previous behavior by using the node from of_parse_phandle_with_args() that was previously being returned from of_parse_phandle(). Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: simple-card: Adjust the comments of simple card.Xiubo Li2014-09-101-24/+24
| | | | | | | | | | Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: simple-card: Merge single and muti DAI link(s) code.Xiubo Li2014-09-091-10/+12
| | | | | | | | | | | | | | | | | | | | | | | | This patch will split the DT node into old style and new style: The new style will merge the single DAI link and muti DAI links code together, the new style will be easier to add muti DAI links from old single DAI link DTs. This patch will maintian compatibility with the old DTs. Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* | ASoC: simple-card: fixup cpu_dai_name clear caseKuninori Morimoto2014-09-031-10/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | f687d900d30a61dda38db2a99239f5284a86a309 (ASoC: simple-card: cpu_dai_name creates confusion when DT case) cleared cpu_dai_name for caring fmt_single_name case, and 179949bc04c7157a4b2279f62a842638b61f78f9 (ASoC: simple-card: remove dai_link->cpu_dai_name when DT) cared multi dai-link case. but, cpu_dai_name matching is required when fmt_multiple_name was used Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Tested-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: simple-card: use common for_each_child_of_node() for loopKuninori Morimoto2014-08-291-2/+4
| | | | | | | | | | Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: simple-card: dai_link->init should be cared when multi DAIKuninori Morimoto2014-08-291-5/+2Star
| | | | | | | | | | | | | | | | | | | | | | | | 6a91a17bd7b92b2d2aa9ece85457f52a62fd7708 (ASoC: simple-card: Handle many DAI links) added multi DAI support on simple-card. This means priv->dai_link might be pointer of multi DAI. dai_link->init is needed for all DAI. This patch cares it for all DAIs on DT/non-DT Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: simple-card: remove dai_link->cpu_dai_name when DTKuninori Morimoto2014-08-291-12/+11Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | f687d900d30a61dda38db2a99239f5284a86a309 (ASoC: simple-card: cpu_dai_name creates confusion when DT case) removed dai_link->cpu_dai_name when DT case, since it uses DT phand in soc_bind_dai_link(). This binding will fail if it has cpu_dai_name. 6a91a17bd7b92b2d2aa9ece85457f52a62fd7708 (ASoC: simple-card: Handle many DAI links) added multi DAI link support to simple-card driver. Then, removing cpu_dai_name was cared only single DAI. But, it is needed in all DT cases. This patch moves it to asoc_simple_card_dai_link_of() so that care about all DAIs. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: simple-card: use asoc_simple_xxx prefixKuninori Morimoto2014-08-291-9/+11
| | | | | | | | | | | | | | | | | | simple-card driver is using asoc_simple_xxx() prefix. simple_card_dai_link_of() should be asoc_simple_card_dai_link_of(). Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: simple-card: Fix the compile warning.Xiubo Li2014-08-181-1/+1
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | sound/soc/generic/simple-card.c: In function simple_card_dai_link_of: sound/soc/generic/simple-card.c:198:10: warning: passing argument 3 of asoc_simple_card_sub_parse_of from incompatible pointer type [enabled by default] &dai_link->cpu_dai_name); ^ sound/soc/generic/simple-card.c:112:1: note: expected const struct device_node ** but argument is of type struct device_node ** asoc_simple_card_sub_parse_of(struct device_node *np, ^ sound/soc/generic/simple-card.c:229:10: warning: passing argument 3 of asoc_simple_card_sub_parse_of from incompatible pointer type [enabled by default] &dai_link->codec_dai_name); ^ sound/soc/generic/simple-card.c:112:1: note: expected const struct device_node ** but argument is of type struct device_node ** asoc_simple_card_sub_parse_of(struct device_node *np, ^ Since the asoc_simple_card_sub_parse_of() is used in simple-card module only, and the third argument is just used to get the node ponters address, so there is no need it must to be 'const' type. Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: simple-card: Make u32 DT parameter handling 64-bit proofJyri Sarha2014-06-211-6/+7
| | | | | | | | Passing unsigned int pointers as u32 ponters may be dangerous on 64-bit system. Signed-off-by: Jyri Sarha <jsarha@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: simple-card: Support setting mclk via a fixed factorAndrew Lunn2014-05-261-0/+28
| | | | | | | | | | Some platforms require that the codecs mclk is a fixed multiplication factor of the audio stream rate. Add a optional property to the binding to hold this factor and implement a hw_params() function to make use of it. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: simple-card: is_top_level_node parameter to simple_card_dai_link_of()Jyri Sarha2014-04-241-4/+7
| | | | | | | | | Restore correct parsing of dai-link subnodes with more explicit implementation for applying the "simple-audio-card,"-prefix to dai-link property and subnode names. Signed-off-by: Jyri Sarha <jsarha@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: simple-card: Improve coding styleNicolin Chen2014-04-241-12/+11Star
| | | | | | | Improve indentation and space. Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: simple-card: Simplify error msg in simple_card_dai_link_of()Nicolin Chen2014-04-241-4/+2Star
| | | | | | | It would look better to use prop instead. Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: simple-card: Drop node->name checkingNicolin Chen2014-04-241-2/+1Star
| | | | | | | | | | | | | The current simple-card driver limits the DT node name to "sound". Any of other names is forbidden while actually we should allow DT to pass other node names. And if this function is being called, the node must already have the compatible "simple-audio-card" in DTB. So there should be no need to check the name here. Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: simple-card: Move dai-link level properties away from dai subnodesJyri Sarha2014-04-231-99/+140
| | | | | | | | | | | | The properties like format, bitclock-master, frame-master, bitclock-inversion, and frame-inversion should be common to the dais connected with a dai-link. For bitclock-master and frame-master properties to be unambiguous they need to indicate the mastering dai node with a phandle. Signed-off-by: Jyri Sarha <jsarha@ti.com> Acked-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: core: Update snd_soc_of_parse_daifmt() interfaceJyri Sarha2014-04-231-2/+3
| | | | | | | | | | | | | Adds struct device_node **bitclkmaster and struct device_node **framemaster function parameters. With the new syntax bitclock-master and frame-master properties can explicitly indicate the dai-link bit-clock and frame masters with a phandle. This patch also makes the minimal changes to simple-card for it to work with the updated snd_soc_of_parse_daifmt(). Simple-card appears to be the only user of snd_soc_of_parse_daifmt() for now. Signed-off-by: Jyri Sarha <jsarha@ti.com> Acked-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: simple-card: Handle many DAI linksJean-Francois Moine2014-03-251-69/+121
| | | | | | | | Some simple audio cards may have many DAI links. This patch extends the simple-card driver for handling such cards. Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: simple-card: dynamically allocate the DAI link and propertiesJean-Francois Moine2014-03-251-15/+27
| | | | | | | | | | | The DAI link array and the properties (fmt, sysclk slots) are hard-coded for a single CPU / CODEC link. This patch dynamically allocates the DAI link array and the properties with the aim of supporting many DAI links. Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: simple-card: overwrite cpu_dai->fmt with codec_dai->fmtNicolin Chen2014-03-191-6/+14
| | | | | | | | | | | | | | | | | | | The current simple-card driver separates the daimft for cpu_dai and codec_dai. So we might get different values for them (0x4003 and 0x1003 for example): asoc-simple-card sound-cs42888.12: cpu : 2024000.esai / 4003 / 132000000 asoc-simple-card sound-cs42888.12: codec : cs42888 / 1003 / 24576000 asoc-simple-card sound-cs42888.12: cs42888 <-> 2024000.esai mapping ok This is not allowed at all as we need to keep the DAIFMT settings identical for both the ends of the link. Thus this patch fixes it by overwriting the cpu_dai->fmt with codec_dai->fmt since we defined the DAIFMT_MASTER basing on CODEC at the first place while the other bits are same. Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: simple-card: Simplify codeJean-Francois Moine2014-03-171-5/+5
| | | | | | | | | | The global DAI format is used only in the function asoc_simple_card_parse_of(). So, move it from the private data to the stack. Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Reviewed-by: Xiubo Li <Li.Xiubo@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: simple-card: Fix the reference count of device nodesJean-Francois Moine2014-03-141-13/+37
| | | | | | | | The reference count of some device nodes is not correctly reset at end of card probe. Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: simple-card: card name can be optionKuninori Morimoto2014-03-101-2/+1Star
| | | | | | | | | snd_card.name is now option on DT case. non-DT case can follow same style, and it is understandable from platform point of view. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: simple-card: tidyup cpu/codec dai_fmt settings for non-DTKuninori Morimoto2014-03-051-0/+3
| | | | | | | | | | | | 30d0341e7da0c012f64fb290dd1153360fb49a8d (ASoC: simple-card: simplify the daifmt code) simplify cpu/codec dai_fmt which consists from dai specific format + common format. But, it didn't care about non-DT case. This patch fixes it Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: simple-card: cpu_dai_name creates confusion when DT caseKuninori Morimoto2014-02-281-0/+11
| | | | | | | | | | | | | | | | | | | | Basically, soc_bind_dai_link() checks cpu_dai->dev->of_node and dai_link->cpu_of_node in DT case. But after that it will check cpu_dai->name and dai_link->cpu_dai_name too. On the other hand, snd_soc_dai :: name is created by fmt_single_name() or fmt_multiple_name(). There is no confusion if dai name is created by fmt_multiple_name(), since cpu_dai->name is same as dai_link->cpu_dai_name. but, if dai name is created by fmt_single_name(), CPU DAI never match. Thus, simple-card not set dai_link->cpu_dai_name if DT case to skip naming match on soc_bind_dai_link() Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@linaro.org>