summaryrefslogtreecommitdiff
path: root/sound/soc/meson
AgeCommit message (Collapse)Author
2019-02-06ASoC: meson: Drop superfluous PCM preallocation error checksTakashi Iwai
snd_pcm_lib_preallocate_pages() and co always succeed, so the error check is simply redundant. Drop it. Reviewed-by: Jaroslav Kysela <perex@perex.cz> Acked-by: Mark Brown <broonie@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-12-13ASoC: meson: fix do_div warning in spdifinJerome Brunet
Even if this spdif input driver is only supposed to be used on 64bits platform, there is possible problem with 32bits and do_div, as reported by the kbuild robot. Just fix it. Fixes: 5ce5658375e6 ("ASoC: meson: add axg spdif input") Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-12-13ASoC: meson: add axg spdif inputJerome Brunet
Add support for the spdif input decoder of the axg SoC family Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-12-13ASoC: meson: axg-toddr: add support for spdifin backendJerome Brunet
add IEC958_SUBFRAME_LE to the list of format accepted by the fifo frontend. As opposed to what was initially noted in the toddr dai driver, the spdifin does not place the msb at bit 28, it just output a whole spdif subframe. Placing the msb at bit 28 in the toddr driver just filters out the parity, user, channel status and validity bits. It is better to just provide the whole spdif subframe to the userspace and let the iec958 plugin deal with it. Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-09-20ASoC: add for_each_card_prelinks() macroKuninori Morimoto
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>
2018-09-04ASoC: add for_each_rtd_codec_dai() macroKuninori Morimoto
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>
2018-09-04ASoC: add for_each_link_codecs() macroKuninori Morimoto
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>
2018-08-29ASoC: meson: add axg pdm inputJerome Brunet
Add pdm input driver for the device found on the amlogic AXG SoC family Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-08-28ASoC: meson: axg-tdm: restrict formats depending on slot widthJerome Brunet
Restrict the formats possible on the TDM interface depending on the width of the TDM slot and let dpcm merging do the rest. Fixes: d60e4f1e4be5 ("ASoC: meson: add tdm interface driver") Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-08-28ASoC: meson: axg-fifo: report interrupt request failureJerome Brunet
Return value of request_irq() was irgnored. Fix this and report the failure if any Fixes: 6dc4fa179fb8 ("ASoC: meson: add axg fifo base driver") Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-08-28ASoC: meson: imply clock and reset controllersJerome Brunet
Add audio clock controller and ARB reset controller module implication for the device using them Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-08-28ASoC: Convert to using %pOFn instead of device_node.nameRob Herring
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>
2018-07-26ASoC: meson: align axg card driver with DT bindings documentationJerome Brunet
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>
2018-07-26ASoC: meson: use IRQ_RETVAL in the fifo irq handlerJerome Brunet
Use IRQ_RETVAL instead of the open coded ternary operation. Suggested-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-07-24ASoC: meson: axg-spdifout: select SND_PCM_IEC958Arnd Bergmann
When CONFIG_SND_PCM_IEC958 is disabled, we get a link error for the new driver: sound/soc/meson/axg-spdifout.o: In function `axg_spdifout_hw_params': axg-spdifout.c:(.text+0x650): undefined reference to `snd_pcm_create_iec958_consumer_hw_params' The other users use 'select', so we should do the same here. Fixes: 53eb4b7aaa04 ("ASoC: meson: add axg spdif output") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Jerome Brunet <jbrunet@baylibre.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-07-20ASoC: meson: add axg sound card supportJerome Brunet
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>
2018-07-20ASoC: meson: add tdm input driverJerome Brunet
Add Amlogic's axg TDM input driver which take the TDM signal of 4 input lanes and push the decoded audio samples to TODDR fifo Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-07-20ASoC: meson: add tdm output driverJerome Brunet
Add Amlogic's axg tdm output driver which pulls data from FRDDR fifo and produce the TDM signals for 4 output lanes. Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-07-20ASoC: meson: add tdm interface driverJerome Brunet
Add Amlogic's axg TDM interface driver. This driver manages the format and clocks provided on the pads. On this SoC, each stream direction provides 4 serial lanes. This makes a maximum of 8 channels in i2s modes and 128 channels in DSP modes. While each lanes operate on the same slot number (same bit clock), they may have different TDM masks. This requires to provide a function to let the card set the 4 masks, in lieu of the usual set_tdm_slots() callback of the dai driver. Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-07-20ASoC: meson: add tdm formatter base driverJerome Brunet
Add Amlogic's axg TDM core driver. On this SoC, tdm is bit more complex than usual, mainly because the different TDM input decoders can be attached to any of TDM pad interface, including the output pads. For the this, TDM on this SoC is modeled like this: - TDM interface provides the DAIs the codecs will be attached to. The main responsibility of this driver is to manage the pad format and the TDM clock rates. - TDM Formatters: These are the entities which are actually dealing with the TDM signal. TDMOUT produce a TDM signal from the audio sample provided by FRDDR using the clocks provided the TDM interface. TDMIN feeds TODDR with audio sample using the clocks and TDM signal provided by the TDM Interface. - TDM Streams: This provides the link between 1 DAI stream of the TDM interface and one (or more) TDM formatters. This driver provides the TDM formatter and TDM stream operations. Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-07-18ASoC: meson: add axg spdif outputJerome Brunet
Add support for the spdif output serializer of the axg SoC family Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-07-18ASoC: meson: add axg toddr driverJerome Brunet
Add the capture memory interface of Amlogic's axg SoCs. TDM, SPDIF or PDM input devices place audio samples inside this FIFO. The FIFO content is then pushed to DDR Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-07-18ASoC: meson: add axg frddr driverJerome Brunet
Add the playback memory interface of Amlogic's axg SoCs. This device pulls data from DDR to an internal FIFO. This FIFO is then used to feed TDM and SPDIF Output devices. Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-07-18ASoC: meson: add axg fifo base driverJerome Brunet
Amlogic's axg SoCs have two types of fifos which are the memory interfaces of the audio subsystem. FRDDR provides the playback interface while TODDR provides the capture interface. The way these fifos operate is very similar. Only a few settings are specific to each. They implement the same pcm driver here and the specifics of each will be dealt with the related DAI driver. Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> Signed-off-by: Mark Brown <broonie@kernel.org>