summaryrefslogtreecommitdiffstats
path: root/sound/soc/meson/axg-card.c
Commit message (Collapse)AuthorAgeFilesLines
* ASoC: soc-core: add for_each_xxx macro for aux_devKuninori Morimoto2019-08-091-3/+4
| | | | | | | | | To be more readable code, this patch adds new for_each_xxx() macro for aux_dev. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87ftmc6w8s.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: meson: axg-card: use snd_soc_dai_link_component for aux_devKuninori Morimoto2019-08-091-3/+3
| | | | | | | | | We can use snd_soc_dai_link_component to specify aux_dev. Let's use it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87r25w6wa1.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: meson: axg-card: remove useless check on codecJerome Brunet2019-06-281-2/+1
| | | | | | | | | While checking cpus before dereferencing the pointer is required, it is not necessary for codecs. 'codec' can't possibly be NULL in the loop Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: meson: axg-card: fix null pointer dereference in clean upJerome Brunet2019-06-101-2/+4
| | | | | | | | | | | | | | When using modern dai_link style, we must first make sure the struct snd_soc_dai_link_component exists before accessing its members. In case of early probe deferral, some of the '.cpus' or '.codecs' may not have been allocated yet. Check this before calling of_node_put() on the structure member. Fixes: c84836d7f650 ("ASoC: meson: axg-card: use modern dai_link style") Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: meson: axg-card: use modern dai_link styleKuninori Morimoto2019-06-061-15/+42
| | | | | | | | | 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>
* ASoC: meson: axg-card: add basic codec-to-codec link supportJerome Brunet2019-05-161-0/+19
| | | | | | | | | | | | | | Add basic support for codec-to-codec link in the axg sound card. The cpu side of these links is expected to properly set the hw_params and format of the link. ATM, only the tohdmitx glue is supported but others (like the internal DAC glue) should follow. Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> Tested-by: Neil Armstrong <narmstrong@baylibre.com> Tested-by: Kevin Hilman <khilman@baylibre.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: meson: axg-card: set link name based on link node nameJerome Brunet2019-05-161-5/+7
| | | | | | | | | | | | | | | So far the link names of the axg sound card was derived from the cpu name of the link. Since the dai link must be unique, it works as long as a device does not provide more than one cpu dai. However, the 'tohdmitx' does provide 2 dais used as cpu on codec-to-codec links Instead of cpu name, use the node name of the dai link. DT already enforce the uniqueness of this name Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> Tested-by: Neil Armstrong <narmstrong@baylibre.com> Tested-by: Kevin Hilman <khilman@baylibre.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: add for_each_card_prelinks() macroKuninori Morimoto2018-09-201-2/+1
| | | | | | | | To be more readable code, this patch adds new for_each_card_prelinks() macro, and replace existing code to it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: add for_each_rtd_codec_dai() macroKuninori Morimoto2018-09-041-4/+2
| | | | | | | | | ALSA SoC snd_soc_pcm_runtime has snd_soc_dai array for codec_dai. To be more readable code, this patch adds new for_each_rtd_codec_dai() macro, and replace existing code to it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: add for_each_link_codecs() macroKuninori Morimoto2018-09-041-2/+3
| | | | | | | | | | ALSA SoC snd_soc_dai_link has snd_soc_dai_link_component array for codecs. To be more readable code, this patch adds new for_each_link_codecs() macro, and replace existing code to it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Convert to using %pOFn instead of device_node.nameRob Herring2018-08-281-1/+1
| | | | | | | | In preparation to remove the node name pointer from struct device_node, convert printf users to use the %pOFn format specifier. Signed-off-by: Rob Herring <robh@kernel.org> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: meson: align axg card driver with DT bindings documentationJerome Brunet2018-07-261-6/+6
| | | | | | | | Drop amlogic prefix in front of the generic DT properties and change property "name" to "model". Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: meson: add axg sound card supportJerome Brunet2018-07-201-0/+671
Add the axg sound card to handle the specifities of the axg audio sub system. This card is required to: * setup the dpcm links specific to the AXG (with a cpu sound dai) * handle the 4 lanes masks of the tdm interfaces * add the loopback link when a tdm pad interface has a playback stream * handle multi-codec links Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> Signed-off-by: Mark Brown <broonie@kernel.org>