ASoC: meson: gx: add audio output support
Subsystems (5)
Jerome Brunet
maintainercover ASoC: meson: gx: add audio output support
This patchset adds support for the i2s and spdif audio outputs of the amlogic GX SoC family, such the S905, S905X/D, S912 and S805X. These SoCs are used by a fair amount of boards actively maintained upstream.
This was tested on:
* amlogic s912 q200
* libretech s805x-ac (frite)
* libretech s905x-cc (potato)
* libretech s905d-pc (tartiflette)
This could also possibly support meson8 32bits SoCs but I have not tested it myself and it could require some further tweaks.
The audio subsystem found on these SoCs has now been dropped in the newer designs. All recent SoCs families (like g12a and sm1) derive from the AXG audio architecture.
Jerome Brunet (9):
ASoC: core: allow a dt node to provide several components
ASoC: meson: g12a: extract codec-to-codec utils
ASoC: meson: aiu: add audio output dt-bindings
ASoC: meson: aiu: add i2s and spdif support
ASoC: meson: aiu: add hdmi codec control support
ASoC: meson: aiu: add internal dac codec control support
ASoC: meson: axg: extract sound card utils
ASoC: meson: gx: add sound card dt-binding documentation
ASoC: meson: gx: add sound card support
.../bindings/sound/amlogic,aiu.yaml | 111 +++++ .../bindings/sound/amlogic,gx-sound-card.yaml | 113 +++++ include/dt-bindings/sound/meson-aiu.h | 18 + sound/soc/meson/Kconfig | 24 ++ sound/soc/meson/Makefile | 15 + sound/soc/meson/aiu-acodec-ctrl.c | 205 +++++++++ sound/soc/meson/aiu-codec-ctrl.c | 152 +++++++ sound/soc/meson/aiu-encoder-i2s.c | 324 ++++++++++++++ sound/soc/meson/aiu-encoder-spdif.c | 209 +++++++++ sound/soc/meson/aiu-fifo-i2s.c | 153 +++++++ sound/soc/meson/aiu-fifo-spdif.c | 186 ++++++++ sound/soc/meson/aiu-fifo.c | 223 ++++++++++ sound/soc/meson/aiu-fifo.h | 50 +++ sound/soc/meson/aiu.c | 390 +++++++++++++++++ sound/soc/meson/aiu.h | 91 ++++ sound/soc/meson/axg-card.c | 403 ++---------------- sound/soc/meson/g12a-tohdmitx.c | 219 ++-------- sound/soc/meson/gx-card.c | 141 ++++++ sound/soc/meson/meson-card-utils.c | 385 +++++++++++++++++ sound/soc/meson/meson-card.h | 55 +++ sound/soc/meson/meson-codec-glue.c | 149 +++++++ sound/soc/meson/meson-codec-glue.h | 32 ++ sound/soc/soc-core.c | 8 + 23 files changed, 3104 insertions(+), 552 deletions(-) create mode 100644 Documentation/devicetree/bindings/sound/amlogic,aiu.yaml create mode 100644 Documentation/devicetree/bindings/sound/amlogic,gx-sound-card.yaml create mode 100644 include/dt-bindings/sound/meson-aiu.h create mode 100644 sound/soc/meson/aiu-acodec-ctrl.c create mode 100644 sound/soc/meson/aiu-codec-ctrl.c create mode 100644 sound/soc/meson/aiu-encoder-i2s.c create mode 100644 sound/soc/meson/aiu-encoder-spdif.c create mode 100644 sound/soc/meson/aiu-fifo-i2s.c create mode 100644 sound/soc/meson/aiu-fifo-spdif.c create mode 100644 sound/soc/meson/aiu-fifo.c create mode 100644 sound/soc/meson/aiu-fifo.h create mode 100644 sound/soc/meson/aiu.c create mode 100644 sound/soc/meson/aiu.h create mode 100644 sound/soc/meson/gx-card.c create mode 100644 sound/soc/meson/meson-card-utils.c create mode 100644 sound/soc/meson/meson-card.h create mode 100644 sound/soc/meson/meson-codec-glue.c create mode 100644 sound/soc/meson/meson-codec-glue.h
Signature · 1 line
2.24.1
Jerome Brunet
maintainerPATCH 1/9 ASoC: core: allow a dt node to provide several components
At the moment, querying the dai_name will stop of the first component matching the dt node. This does not allow a device (single dt node) to provide several ASoC components which could then be used through DT.
This change let the search go on if the xlate function of the component returns an error, giving the possibility to another component to match and return the dai_name.
--- sound/soc/soc-core.c | 8 ++++++++ 1 file changed, 8 insertions(+)
sound/soc/soc-core.c +8 -0
@@ -3102,6 +3102,14 @@ int snd_soc_get_dai_name(struct of_phandle_args *args, *dai_name = dai->driver->name;if (!*dai_name) *dai_name = pos->name; + }else if (ret) { +/* +* if another error than ENOTSUPP is returned go on and +* check if another component is provided with the same +* node. This may happen if a device provides several +* components +*/ +continue ; }break ;
Signature · 1 line
2.24.1
Mark Brown
maintainerRe: [PATCH 1/9] ASoC: core: allow a dt node to provide several components
Quoted 7 lines · Jerome Brunet
At the moment, querying the
dai_namewill stop of the first component matching the dt node. This does not allow a device (single dt node) to provide several ASoC components which could then be used through DT.This change let the search go on if the xlate function of the component returns an error, giving the possibility to another component to match and return the
dai_name.
My first question here would be why you'd want to do that rather than combine everything into a single component since the hardware seems to be doing that anyway. Hopefully the rest of the series will answer this but it'd be good in the changelog here.
Jerome Brunet
maintainerRe: [PATCH 1/9] ASoC: core: allow a dt node to provide several components
Quoted 6 lines · Mark Brown
Quoted 3 lines · Jerome Brunet
At the moment, querying the
dai_namewill stop of the first component matching the dt node. This does not allow a device (single dt node) to provide several ASoC components which could then be used through DT.
Quoted 8 lines
Quoted 3 lines
This change let the search go on if the xlate function of the component returns an error, giving the possibility to another component to match and return the
dai_name.My first question here would be why you'd want to do that rather than combine everything into a single component since the hardware seems to be doing that anyway. Hopefully the rest of the series will answer this but it'd be good in the changelog here.
Hi Mark,
Sorry if I was not clear enough.
This HW is messy. It is indeed one monolithic device which provides several functions/sub-devices/components
I tried several approaches:
* Just 1 component: This was ugly because the part that is present only on 1 SoC variant, I needed to reconstruct the dai, widget, route and control table which involved a fair amount of useless copies.
* A lot of devices (and components) with syscon: This ended up being even uglier, difficult to work with since it did not really reflected the actual HW.
The solution proposed here is just one device with 3 possible components (groups):
* The CPU producers a associated path
* The HDMI control
* The Internal DAC control
The impact on ASoC is rather small, the driver reflect quite well what the HW is and, with a sound-dai-cell=2, it fairly simple in DT as well.
Do you think there is something wrong with a linux device providing several ASoC components ?
Mark Brown
maintainerRe: [PATCH 1/9] ASoC: core: allow a dt node to provide several components
Quoted 7 lines · Jerome Brunet
Quoted 4 lines
My first question here would be why you'd want to do that rather than combine everything into a single component since the hardware seems to be doing that anyway. Hopefully the rest of the series will answer this but it'd be good in the changelog here.
Do you think there is something wrong with a linux device providing several ASoC components ?
I don't know that it's actively wrong, it's more a comment about the changelog only describing the what of the change and not the why - the original idea for a component was that there should be a 1:1 mapping between components and devices but as you say it's not actually a big change to let things get split up more.
Mark Brown
maintainerApplied "ASoC: core: allow a dt node to provide several components" to the asoc tree
In reply to Jerome BrunetThe patch
ASoC: core: allow a dt node to provide several components
has been applied to the asoc tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
From 1dfa5a5ab34560fd9647083f623d19705be2e706 Mon Sep 17 00:00:00 2001
From: Jerome Brunet <[email protected]>
Date: Thu, 13 Feb 2020 16:51:51 +0100
Subject: [PATCH] ASoC: core: allow a dt node to provide several components
At the moment, querying the dai_name will stop of the first component matching the dt node. This does not allow a device (single dt node) to provide several ASoC components which could then be used through DT.
This change let the search go on if the xlate function of the component returns an error, giving the possibility to another component to match and return the dai_name.
--- sound/soc/soc-core.c | 8 ++++++++ 1 file changed, 8 insertions(+)
sound/soc/soc-core.c +8 -0
@@ -3102,6 +3102,14 @@ int snd_soc_get_dai_name(struct of_phandle_args *args, *dai_name = dai->driver->name;if (!*dai_name) *dai_name = pos->name; + }else if (ret) { +/* +* if another error than ENOTSUPP is returned go on and +* check if another component is provided with the same +* node. This may happen if a device provides several +* components +*/ +continue ; }break ;
Signature · 1 line
2.20.1
Jerome Brunet
maintainerPATCH 2/9 ASoC: meson: g12a: extract codec-to-codec utils
In reply to Jerome BrunetThe hdmi routing mechanism used on g12a hdmi is also used:
* other Amlogic SoC types
* for the internal DAC path
Each of these codec glues are slightly different but the idea behind it remains the same. This change extract some helper functions from the g12a-tohdmitx driver to make them available for other Amlogic codecs.
--- sound/soc/meson/Kconfig | 4 + sound/soc/meson/Makefile | 2 + sound/soc/meson/g12a-tohdmitx.c | 219 ++++++----------------------- sound/soc/meson/meson-codec-glue.c | 149 ++++++++++++++++++++ sound/soc/meson/meson-codec-glue.h | 32 +++++ 5 files changed, 230 insertions(+), 176 deletions(-) create mode 100644 sound/soc/meson/meson-codec-glue.c create mode 100644 sound/soc/meson/meson-codec-glue.h
sound/soc/meson/Kconfig +4 -0
@@ -85,9 +85,13 @@ config SND_MESON_AXG_PDM Select Y or M to add support for PDM input embedded in the Amlogic AXG SoC family +config SND_MESON_CODEC_GLUE + tristate + config SND_MESON_G12A_TOHDMITX tristate "Amlogic G12A To HDMI TX Control Support" select REGMAP_MMIO + select SND_MESON_CODEC_GLUE imply SND_SOC_HDMI_CODEC help Select Y or M to add support for HDMI audio on the g12a SoC
sound/soc/meson/Makefile +2 -0
@@ -11,6 +11,7 @@ snd-soc-meson-axg-sound-card-objs := axg-card.o snd-soc-meson-axg-spdifin-objs := axg-spdifin.o snd-soc-meson-axg-spdifout-objs := axg-spdifout.o snd-soc-meson-axg-pdm-objs := axg-pdm.o +snd-soc-meson-codec-glue-objs := meson-codec-glue.o snd-soc-meson-g12a-tohdmitx-objs := g12a-tohdmitx.o obj-$(CONFIG_SND_MESON_AXG_FIFO) += snd-soc-meson-axg-fifo.o
@@ -24,4 +25,5 @@ obj-$(CONFIG_SND_MESON_AXG_SOUND_CARD) += snd-soc-meson-axg-sound-card.o obj-$(CONFIG_SND_MESON_AXG_SPDIFIN) += snd-soc-meson-axg-spdifin.o obj-$(CONFIG_SND_MESON_AXG_SPDIFOUT) += snd-soc-meson-axg-spdifout.o obj-$(CONFIG_SND_MESON_AXG_PDM) += snd-soc-meson-axg-pdm.o +obj-$(CONFIG_SND_MESON_CODEC_GLUE) += snd-soc-meson-codec-glue.o obj-$(CONFIG_SND_MESON_G12A_TOHDMITX) += snd-soc-meson-g12a-tohdmitx.o
sound/soc/meson/g12a-tohdmitx.c +43 -176
298 lines not on this page · raw message
sound/soc/meson/meson-codec-glue.c new file +149 -0
149 lines not on this page · raw message
sound/soc/meson/meson-codec-glue.h new file +32 -0
@@ -0,0 +1,32 @@ +/* SPDX-License-Identifier: GPL-2.0 +* +* Copyright (c) 2018 Baylibre SAS. +* Author: Jerome Brunet <[email protected]> +*/ + +#ifndef _MESON_CODEC_GLUE_H +#define _MESON_CODEC_GLUE_H + +#include <sound/soc.h> + +struct meson_codec_glue_input { +struct snd_soc_pcm_stream params; +unsigned int fmt; +}; + +/* Input helpers */ +struct meson_codec_glue_input * +meson_codec_glue_input_get_data (struct snd_soc_dai *dai); +int meson_codec_glue_input_hw_params (struct snd_pcm_substream *substream, +struct snd_pcm_hw_params *params, +struct snd_soc_dai *dai); +int meson_codec_glue_input_set_fmt (struct snd_soc_dai *dai, +unsigned int fmt); +int meson_codec_glue_input_dai_probe (struct snd_soc_dai *dai); +int meson_codec_glue_input_dai_remove (struct snd_soc_dai *dai); + +/* Output helpers */ +int meson_codec_glue_output_startup (struct snd_pcm_substream *substream, +struct snd_soc_dai *dai); + +#endif /* _MESON_CODEC_GLUE_H */
Signature · 7 lines
2.24.1 _______________________________________________ linux-amlogic mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-amlogic
Mark Brown
maintainerApplied "ASoC: meson: g12a: extract codec-to-codec utils" to the asoc tree
The patch
ASoC: meson: g12a: extract codec-to-codec utils
has been applied to the asoc tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
From 9c29fd9bdf92900dc0cc5c2d8f58951a7bdc0f41 Mon Sep 17 00:00:00 2001
From: Jerome Brunet <[email protected]>
Date: Thu, 13 Feb 2020 16:51:52 +0100
Subject: [PATCH] ASoC: meson: g12a: extract codec-to-codec utils
The hdmi routing mechanism used on g12a hdmi is also used:
* other Amlogic SoC types
* for the internal DAC path
Each of these codec glues are slightly different but the idea behind it remains the same. This change extract some helper functions from the g12a-tohdmitx driver to make them available for other Amlogic codecs.
--- sound/soc/meson/Kconfig | 4 + sound/soc/meson/Makefile | 2 + sound/soc/meson/g12a-tohdmitx.c | 219 ++++++----------------------- sound/soc/meson/meson-codec-glue.c | 149 ++++++++++++++++++++ sound/soc/meson/meson-codec-glue.h | 32 +++++ 5 files changed, 230 insertions(+), 176 deletions(-) create mode 100644 sound/soc/meson/meson-codec-glue.c create mode 100644 sound/soc/meson/meson-codec-glue.h
sound/soc/meson/Kconfig +4 -0
@@ -85,9 +85,13 @@ config SND_MESON_AXG_PDM Select Y or M to add support for PDM input embedded in the Amlogic AXG SoC family +config SND_MESON_CODEC_GLUE + tristate + config SND_MESON_G12A_TOHDMITX tristate "Amlogic G12A To HDMI TX Control Support" select REGMAP_MMIO + select SND_MESON_CODEC_GLUE imply SND_SOC_HDMI_CODEC help Select Y or M to add support for HDMI audio on the g12a SoC
sound/soc/meson/Makefile +2 -0
@@ -11,6 +11,7 @@ snd-soc-meson-axg-sound-card-objs := axg-card.o snd-soc-meson-axg-spdifin-objs := axg-spdifin.o snd-soc-meson-axg-spdifout-objs := axg-spdifout.o snd-soc-meson-axg-pdm-objs := axg-pdm.o +snd-soc-meson-codec-glue-objs := meson-codec-glue.o snd-soc-meson-g12a-tohdmitx-objs := g12a-tohdmitx.o obj-$(CONFIG_SND_MESON_AXG_FIFO) += snd-soc-meson-axg-fifo.o
@@ -24,4 +25,5 @@ obj-$(CONFIG_SND_MESON_AXG_SOUND_CARD) += snd-soc-meson-axg-sound-card.o obj-$(CONFIG_SND_MESON_AXG_SPDIFIN) += snd-soc-meson-axg-spdifin.o obj-$(CONFIG_SND_MESON_AXG_SPDIFOUT) += snd-soc-meson-axg-spdifout.o obj-$(CONFIG_SND_MESON_AXG_PDM) += snd-soc-meson-axg-pdm.o +obj-$(CONFIG_SND_MESON_CODEC_GLUE) += snd-soc-meson-codec-glue.o obj-$(CONFIG_SND_MESON_G12A_TOHDMITX) += snd-soc-meson-g12a-tohdmitx.o
sound/soc/meson/g12a-tohdmitx.c +43 -176
298 lines not on this page · raw message
sound/soc/meson/meson-codec-glue.c new file +149 -0
149 lines not on this page · raw message
sound/soc/meson/meson-codec-glue.h new file +32 -0
@@ -0,0 +1,32 @@ +/* SPDX-License-Identifier: GPL-2.0 +* +* Copyright (c) 2018 Baylibre SAS. +* Author: Jerome Brunet <[email protected]> +*/ + +#ifndef _MESON_CODEC_GLUE_H +#define _MESON_CODEC_GLUE_H + +#include <sound/soc.h> + +struct meson_codec_glue_input { +struct snd_soc_pcm_stream params; +unsigned int fmt; +}; + +/* Input helpers */ +struct meson_codec_glue_input * +meson_codec_glue_input_get_data (struct snd_soc_dai *dai); +int meson_codec_glue_input_hw_params (struct snd_pcm_substream *substream, +struct snd_pcm_hw_params *params, +struct snd_soc_dai *dai); +int meson_codec_glue_input_set_fmt (struct snd_soc_dai *dai, +unsigned int fmt); +int meson_codec_glue_input_dai_probe (struct snd_soc_dai *dai); +int meson_codec_glue_input_dai_remove (struct snd_soc_dai *dai); + +/* Output helpers */ +int meson_codec_glue_output_startup (struct snd_pcm_substream *substream, +struct snd_soc_dai *dai); + +#endif /* _MESON_CODEC_GLUE_H */
Signature · 1 line
2.20.1
Jerome Brunet
maintainerPATCH 3/9 ASoC: meson: aiu: add audio output dt-bindings
In reply to Jerome BrunetAdd the dt-bindings and documentation of the AIU audio controller. This component provides most of the audio outputs found on the Amlogic Gx SoC family.
--- .../bindings/sound/amlogic,aiu.yaml | 111 ++++++++++++++++++ include/dt-bindings/sound/meson-aiu.h | 18 +++ 2 files changed, 129 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/amlogic,aiu.yaml create mode 100644 include/dt-bindings/sound/meson-aiu.h
Documentation/devicetree/bindings/sound/amlogic,aiu.yaml new file +111 -0
@@ -0,0 +1,111 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/amlogic,aiu.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Amlogic AIU audio output controller + +maintainers: + - Jerome Brunet <[email protected]> + +properties: + $nodename: + pattern: "^audio-controller@.*" + + "#sound-dai-cells": + const: 2 + + compatible: + items: + - enum: + - amlogic,aiu-gxbb + - amlogic,aiu-gxl + - const: + amlogic,aiu + + clocks: + items: + - description: AIU peripheral clock + - description: I2S peripheral clock + - description: I2S output clock + - description: I2S master clock + - description: I2S mixer clock + - description: SPDIF peripheral clock + - description: SPDIF output clock + - description: SPDIF master clock + - description: SPDIF master clock multiplexer + + clock-names: + items: + - const: pclk + - const: i2s_pclk + - const: i2s_aoclk + - const: i2s_mclk + - const: i2s_mixer + - const: spdif_pclk + - const: spdif_aoclk + - const: spdif_mclk + - const: spdif_mclk_sel + + interrupts: + items: + - description: I2S interrupt line + - description: SPDIF interrupt line + + interrupt-names: + items: + - const: i2s + - const: spdif + + reg: + maxItems: 1 + + resets: + maxItems: 1 + +required: + - "#sound-dai-cells" + - compatible + - clocks + - clock-names + - interrupts + - interrupt-names + - reg + - resets + +examples: + - | + #include <dt-bindings/clock/gxbb-clkc.h> + #include <dt-bindings/interrupt-controller/irq.h> + #include <dt-bindings/interrupt-controller/arm-gic.h> + #include <dt-bindings/reset/amlogic,meson-gxbb-reset.h> + + aiu: audio-controller@5400 { + compatible = "amlogic,aiu-gxl", "amlogic,aiu"; + #sound-dai-cells = <2>; + reg = <0x0 0x5400 0x0 0x2ac>; + interrupts = <GIC_SPI 48 IRQ_TYPE_EDGE_RISING>, + <GIC_SPI 50 IRQ_TYPE_EDGE_RISING>; + interrupt-names = "i2s", "spdif"; + clocks = <&clkc CLKID_AIU_GLUE>, + <&clkc CLKID_I2S_OUT>, + <&clkc CLKID_AOCLK_GATE>, + <&clkc CLKID_CTS_AMCLK>, + <&clkc CLKID_MIXER_IFACE>, + <&clkc CLKID_IEC958>, + <&clkc CLKID_IEC958_GATE>, + <&clkc CLKID_CTS_MCLK_I958>, + <&clkc CLKID_CTS_I958>; + clock-names = "pclk", + "i2s_pclk", + "i2s_aoclk", + "i2s_mclk", + "i2s_mixer", + "spdif_pclk", + "spdif_aoclk", + "spdif_mclk", + "spdif_mclk_sel"; + resets = <&reset RESET_AIU>; + }; +
include/dt-bindings/sound/meson-aiu.h new file +18 -0
@@ -0,0 +1,18 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef __DT_MESON_AIU_H +#define __DT_MESON_AIU_H + +#define AIU_CPU 0 +#define AIU_HDMI 1 +#define AIU_ACODEC 2 + +#define CPU_I2S_FIFO 0 +#define CPU_SPDIF_FIFO 1 +#define CPU_I2S_ENCODER 2 +#define CPU_SPDIF_ENCODER 3 + +#define CTRL_I2S 0 +#define CTRL_PCM 1 +#define CTRL_OUT 2 + +#endif /* __DT_MESON_AIU_H */
Signature · 1 line
2.24.1
Mark Brown
maintainerApplied "ASoC: meson: aiu: add audio output dt-bindings" to the asoc tree
The patch
ASoC: meson: aiu: add audio output dt-bindings
has been applied to the asoc tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
From 06b72824386795bf6f0a6ac0f0cfef6b7f0165c1 Mon Sep 17 00:00:00 2001
From: Jerome Brunet <[email protected]>
Date: Thu, 13 Feb 2020 16:51:53 +0100
Subject: [PATCH] ASoC: meson: aiu: add audio output dt-bindings
Add the dt-bindings and documentation of the AIU audio controller. This component provides most of the audio outputs found on the Amlogic Gx SoC family.
--- .../bindings/sound/amlogic,aiu.yaml | 111 ++++++++++++++++++ include/dt-bindings/sound/meson-aiu.h | 18 +++ 2 files changed, 129 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/amlogic,aiu.yaml create mode 100644 include/dt-bindings/sound/meson-aiu.h
Documentation/devicetree/bindings/sound/amlogic,aiu.yaml new file +111 -0
@@ -0,0 +1,111 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/amlogic,aiu.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Amlogic AIU audio output controller + +maintainers: + - Jerome Brunet <[email protected]> + +properties: + $nodename: + pattern: "^audio-controller@.*" + + "#sound-dai-cells": + const: 2 + + compatible: + items: + - enum: + - amlogic,aiu-gxbb + - amlogic,aiu-gxl + - const: + amlogic,aiu + + clocks: + items: + - description: AIU peripheral clock + - description: I2S peripheral clock + - description: I2S output clock + - description: I2S master clock + - description: I2S mixer clock + - description: SPDIF peripheral clock + - description: SPDIF output clock + - description: SPDIF master clock + - description: SPDIF master clock multiplexer + + clock-names: + items: + - const: pclk + - const: i2s_pclk + - const: i2s_aoclk + - const: i2s_mclk + - const: i2s_mixer + - const: spdif_pclk + - const: spdif_aoclk + - const: spdif_mclk + - const: spdif_mclk_sel + + interrupts: + items: + - description: I2S interrupt line + - description: SPDIF interrupt line + + interrupt-names: + items: + - const: i2s + - const: spdif + + reg: + maxItems: 1 + + resets: + maxItems: 1 + +required: + - "#sound-dai-cells" + - compatible + - clocks + - clock-names + - interrupts + - interrupt-names + - reg + - resets + +examples: + - | + #include <dt-bindings/clock/gxbb-clkc.h> + #include <dt-bindings/interrupt-controller/irq.h> + #include <dt-bindings/interrupt-controller/arm-gic.h> + #include <dt-bindings/reset/amlogic,meson-gxbb-reset.h> + + aiu: audio-controller@5400 { + compatible = "amlogic,aiu-gxl", "amlogic,aiu"; + #sound-dai-cells = <2>; + reg = <0x0 0x5400 0x0 0x2ac>; + interrupts = <GIC_SPI 48 IRQ_TYPE_EDGE_RISING>, + <GIC_SPI 50 IRQ_TYPE_EDGE_RISING>; + interrupt-names = "i2s", "spdif"; + clocks = <&clkc CLKID_AIU_GLUE>, + <&clkc CLKID_I2S_OUT>, + <&clkc CLKID_AOCLK_GATE>, + <&clkc CLKID_CTS_AMCLK>, + <&clkc CLKID_MIXER_IFACE>, + <&clkc CLKID_IEC958>, + <&clkc CLKID_IEC958_GATE>, + <&clkc CLKID_CTS_MCLK_I958>, + <&clkc CLKID_CTS_I958>; + clock-names = "pclk", + "i2s_pclk", + "i2s_aoclk", + "i2s_mclk", + "i2s_mixer", + "spdif_pclk", + "spdif_aoclk", + "spdif_mclk", + "spdif_mclk_sel"; + resets = <&reset RESET_AIU>; + }; +
include/dt-bindings/sound/meson-aiu.h new file +18 -0
@@ -0,0 +1,18 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef __DT_MESON_AIU_H +#define __DT_MESON_AIU_H + +#define AIU_CPU 0 +#define AIU_HDMI 1 +#define AIU_ACODEC 2 + +#define CPU_I2S_FIFO 0 +#define CPU_SPDIF_FIFO 1 +#define CPU_I2S_ENCODER 2 +#define CPU_SPDIF_ENCODER 3 + +#define CTRL_I2S 0 +#define CTRL_PCM 1 +#define CTRL_OUT 2 + +#endif /* __DT_MESON_AIU_H */
Signature · 1 line
2.20.1
Jerome Brunet
maintainerPATCH 4/9 ASoC: meson: aiu: add i2s and spdif support
In reply to Jerome BrunetAdd support for the i2s and spdif audio outputs (AIU) found in the amlogic Gx SoC family
--- sound/soc/meson/Kconfig | 7 + sound/soc/meson/Makefile | 7 + sound/soc/meson/aiu-encoder-i2s.c | 324 ++++++++++++++++++++++++++ sound/soc/meson/aiu-encoder-spdif.c | 209 +++++++++++++++++ sound/soc/meson/aiu-fifo-i2s.c | 153 ++++++++++++ sound/soc/meson/aiu-fifo-spdif.c | 186 +++++++++++++++ sound/soc/meson/aiu-fifo.c | 223 ++++++++++++++++++ sound/soc/meson/aiu-fifo.h | 50 ++++ sound/soc/meson/aiu.c | 348 ++++++++++++++++++++++++++++ sound/soc/meson/aiu.h | 82 +++++++ 10 files changed, 1589 insertions(+) create mode 100644 sound/soc/meson/aiu-encoder-i2s.c create mode 100644 sound/soc/meson/aiu-encoder-spdif.c create mode 100644 sound/soc/meson/aiu-fifo-i2s.c create mode 100644 sound/soc/meson/aiu-fifo-spdif.c create mode 100644 sound/soc/meson/aiu-fifo.c create mode 100644 sound/soc/meson/aiu-fifo.h create mode 100644 sound/soc/meson/aiu.c create mode 100644 sound/soc/meson/aiu.h
sound/soc/meson/Kconfig +7 -0
@@ -2,6 +2,13 @@ menu "ASoC support for Amlogic platforms" depends on ARCH_MESON || COMPILE_TEST +config SND_MESON_AIU + tristate "Amlogic AIU" + select SND_PCM_IEC958 + help + Select Y or M to add support for the Audio output subsystem found + in the Amlogic GX SoC family + config SND_MESON_AXG_FIFO tristate select REGMAP_MMIO
sound/soc/meson/Makefile +7 -0
@@ -1,5 +1,11 @@ # SPDX-License-Identifier: (GPL-2.0 OR MIT) +snd-soc-meson-aiu-objs := aiu.o +snd-soc-meson-aiu-objs += aiu-encoder-i2s.o +snd-soc-meson-aiu-objs += aiu-encoder-spdif.o +snd-soc-meson-aiu-objs += aiu-fifo.o +snd-soc-meson-aiu-objs += aiu-fifo-i2s.o +snd-soc-meson-aiu-objs += aiu-fifo-spdif.o snd-soc-meson-axg-fifo-objs := axg-fifo.o snd-soc-meson-axg-frddr-objs := axg-frddr.o snd-soc-meson-axg-toddr-objs := axg-toddr.o
@@ -14,6 +20,7 @@ snd-soc-meson-axg-pdm-objs := axg-pdm.o snd-soc-meson-codec-glue-objs := meson-codec-glue.o snd-soc-meson-g12a-tohdmitx-objs := g12a-tohdmitx.o +obj-$(CONFIG_SND_MESON_AIU) += snd-soc-meson-aiu.o obj-$(CONFIG_SND_MESON_AXG_FIFO) += snd-soc-meson-axg-fifo.o obj-$(CONFIG_SND_MESON_AXG_FRDDR) += snd-soc-meson-axg-frddr.o obj-$(CONFIG_SND_MESON_AXG_TODDR) += snd-soc-meson-axg-toddr.o
sound/soc/meson/aiu-encoder-i2s.c new file +324 -0
324 lines not on this page · raw message
sound/soc/meson/aiu-encoder-spdif.c new file +209 -0
209 lines not on this page · raw message
sound/soc/meson/aiu-fifo-i2s.c new file +153 -0
153 lines not on this page · raw message
sound/soc/meson/aiu-fifo-spdif.c new file +186 -0
186 lines not on this page · raw message
sound/soc/meson/aiu-fifo.c new file +223 -0
223 lines not on this page · raw message
sound/soc/meson/aiu-fifo.h new file +50 -0
50 lines not on this page · raw message
sound/soc/meson/aiu.c new file +348 -0
348 lines not on this page · raw message
sound/soc/meson/aiu.h new file +82 -0
82 lines not on this page · raw message
Signature · 7 lines
2.24.1 _______________________________________________ linux-amlogic mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-amlogic
Mark Brown
maintainerApplied "ASoC: meson: aiu: add i2s and spdif support" to the asoc tree
The patch
ASoC: meson: aiu: add i2s and spdif support
has been applied to the asoc tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
From 6ae9ca9ce986bffe71fd0fbf9595de8500891b52 Mon Sep 17 00:00:00 2001
From: Jerome Brunet <[email protected]>
Date: Thu, 13 Feb 2020 16:51:54 +0100
Subject: [PATCH] ASoC: meson: aiu: add i2s and spdif support
Add support for the i2s and spdif audio outputs (AIU) found in the amlogic Gx SoC family
--- sound/soc/meson/Kconfig | 7 + sound/soc/meson/Makefile | 7 + sound/soc/meson/aiu-encoder-i2s.c | 324 ++++++++++++++++++++++++++ sound/soc/meson/aiu-encoder-spdif.c | 209 +++++++++++++++++ sound/soc/meson/aiu-fifo-i2s.c | 153 ++++++++++++ sound/soc/meson/aiu-fifo-spdif.c | 186 +++++++++++++++ sound/soc/meson/aiu-fifo.c | 223 ++++++++++++++++++ sound/soc/meson/aiu-fifo.h | 50 ++++ sound/soc/meson/aiu.c | 348 ++++++++++++++++++++++++++++ sound/soc/meson/aiu.h | 82 +++++++ 10 files changed, 1589 insertions(+) create mode 100644 sound/soc/meson/aiu-encoder-i2s.c create mode 100644 sound/soc/meson/aiu-encoder-spdif.c create mode 100644 sound/soc/meson/aiu-fifo-i2s.c create mode 100644 sound/soc/meson/aiu-fifo-spdif.c create mode 100644 sound/soc/meson/aiu-fifo.c create mode 100644 sound/soc/meson/aiu-fifo.h create mode 100644 sound/soc/meson/aiu.c create mode 100644 sound/soc/meson/aiu.h
sound/soc/meson/Kconfig +7 -0
@@ -2,6 +2,13 @@ menu "ASoC support for Amlogic platforms" depends on ARCH_MESON || COMPILE_TEST +config SND_MESON_AIU + tristate "Amlogic AIU" + select SND_PCM_IEC958 + help + Select Y or M to add support for the Audio output subsystem found + in the Amlogic GX SoC family + config SND_MESON_AXG_FIFO tristate select REGMAP_MMIO
sound/soc/meson/Makefile +7 -0
@@ -1,5 +1,11 @@ # SPDX-License-Identifier: (GPL-2.0 OR MIT) +snd-soc-meson-aiu-objs := aiu.o +snd-soc-meson-aiu-objs += aiu-encoder-i2s.o +snd-soc-meson-aiu-objs += aiu-encoder-spdif.o +snd-soc-meson-aiu-objs += aiu-fifo.o +snd-soc-meson-aiu-objs += aiu-fifo-i2s.o +snd-soc-meson-aiu-objs += aiu-fifo-spdif.o snd-soc-meson-axg-fifo-objs := axg-fifo.o snd-soc-meson-axg-frddr-objs := axg-frddr.o snd-soc-meson-axg-toddr-objs := axg-toddr.o
@@ -14,6 +20,7 @@ snd-soc-meson-axg-pdm-objs := axg-pdm.o snd-soc-meson-codec-glue-objs := meson-codec-glue.o snd-soc-meson-g12a-tohdmitx-objs := g12a-tohdmitx.o +obj-$(CONFIG_SND_MESON_AIU) += snd-soc-meson-aiu.o obj-$(CONFIG_SND_MESON_AXG_FIFO) += snd-soc-meson-axg-fifo.o obj-$(CONFIG_SND_MESON_AXG_FRDDR) += snd-soc-meson-axg-frddr.o obj-$(CONFIG_SND_MESON_AXG_TODDR) += snd-soc-meson-axg-toddr.o
sound/soc/meson/aiu-encoder-i2s.c new file +324 -0
324 lines not on this page · raw message
sound/soc/meson/aiu-encoder-spdif.c new file +209 -0
209 lines not on this page · raw message
sound/soc/meson/aiu-fifo-i2s.c new file +153 -0
153 lines not on this page · raw message
sound/soc/meson/aiu-fifo-spdif.c new file +186 -0
186 lines not on this page · raw message
sound/soc/meson/aiu-fifo.c new file +223 -0
223 lines not on this page · raw message
sound/soc/meson/aiu-fifo.h new file +50 -0
50 lines not on this page · raw message
sound/soc/meson/aiu.c new file +348 -0
348 lines not on this page · raw message
sound/soc/meson/aiu.h new file +82 -0
82 lines not on this page · raw message
Signature · 1 line
2.20.1
Jerome Brunet
maintainerPATCH 5/9 ASoC: meson: aiu: add hdmi codec control support
In reply to Jerome BrunetAdd the codec to codec component which handles the routing between the audio producers (PCM and I2S) and the synopsys hdmi controller on the amlogic GX SoC family
--- sound/soc/meson/Kconfig | 2 + sound/soc/meson/Makefile | 1 + sound/soc/meson/aiu-codec-ctrl.c | 152 +++++++++++++++++++++++++++++++ sound/soc/meson/aiu.c | 34 ++++++- sound/soc/meson/aiu.h | 8 ++ 5 files changed, 196 insertions(+), 1 deletion(-) create mode 100644 sound/soc/meson/aiu-codec-ctrl.c
sound/soc/meson/Kconfig +2 -0
@@ -4,7 +4,9 @@ menu "ASoC support for Amlogic platforms" config SND_MESON_AIU tristate "Amlogic AIU" + select SND_MESON_CODEC_GLUE select SND_PCM_IEC958 + imply SND_SOC_HDMI_CODEC if DRM_MESON_DW_HDMI help Select Y or M to add support for the Audio output subsystem found in the Amlogic GX SoC family
sound/soc/meson/Makefile +1 -0
@@ -1,6 +1,7 @@ # SPDX-License-Identifier: (GPL-2.0 OR MIT) snd-soc-meson-aiu-objs := aiu.o +snd-soc-meson-aiu-objs += aiu-codec-ctrl.o snd-soc-meson-aiu-objs += aiu-encoder-i2s.o snd-soc-meson-aiu-objs += aiu-encoder-spdif.o snd-soc-meson-aiu-objs += aiu-fifo.o
sound/soc/meson/aiu-codec-ctrl.c new file +152 -0
152 lines not on this page · raw message
sound/soc/meson/aiu.c +33 -1
@@ -71,6 +71,26 @@ int aiu_of_xlate_dai_name(struct snd_soc_component *component,return 0 ; } +int aiu_add_component (struct device *dev, +const struct snd_soc_component_driver *component_driver, +struct snd_soc_dai_driver *dai_drv, +int num_dai, +const char *debugfs_prefix) +{ +struct snd_soc_component *component; + + component =devm_kzalloc (dev,sizeof (*component),GFP_KERNEL ); +if (!component) +return -ENOMEM ; + +#ifdef CONFIG_DEBUG_FS + component->debugfs_prefix = debugfs_prefix; +#endif + +return snd_soc_add_component (dev, component, component_driver, + dai_drv, num_dai); +} +static int aiu_cpu_of_xlate_dai_name (struct snd_soc_component *component,struct of_phandle_args *args,const char **dai_name)
@@ -313,9 +333,21 @@ static int aiu_probe(struct platform_device *pdev) ret =snd_soc_register_component (dev, &aiu_cpu_component, aiu_cpu_dai_drv,ARRAY_SIZE (aiu_cpu_dai_drv)); -if (ret) +if (ret) {dev_err (dev,"Failed to register cpu component\n" ); +return ret; + } +/* Register the hdmi codec control component */ + ret =aiu_hdmi_ctrl_register_component (dev); +if (ret) { +dev_err (dev,"Failed to register hdmi control component\n" ); + goto err; + } + +return 0 ; +err: +snd_soc_unregister_component (dev);return ret; }
sound/soc/meson/aiu.h +8 -0
@@ -45,6 +45,14 @@ int aiu_of_xlate_dai_name(struct snd_soc_component *component,const char **dai_name, unsigned int component_id); +int aiu_add_component (struct device *dev, +const struct snd_soc_component_driver *component_driver, +struct snd_soc_dai_driver *dai_drv, +int num_dai, +const char *debugfs_prefix); + +int aiu_hdmi_ctrl_register_component (struct device *dev); +int aiu_fifo_i2s_dai_probe (struct snd_soc_dai *dai);int aiu_fifo_spdif_dai_probe (struct snd_soc_dai *dai);
Signature · 7 lines
2.24.1 _______________________________________________ linux-amlogic mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-amlogic
Mark Brown
maintainerRe: [PATCH 5/9] ASoC: meson: aiu: add hdmi codec control support
Quoted 5 lines · Jerome Brunet
sound/soc/meson/aiu.c +5
-0+int aiu_add_component (struct device *dev, +const struct snd_soc_component_driver *component_driver, +struct snd_soc_dai_driver *dai_drv, +int num_dai, +const char *debugfs_prefix)
sound/soc/meson/aiu.c int aiu_of_xlate_dai_name(struct snd_soc_component *component, · line 88
Quoted 10 lines
sound/soc/meson/aiu.c +10
-0+{ +struct snd_soc_component *component; + + component =devm_kzalloc (dev,sizeof (*component),GFP_KERNEL ); +if (!component) +return -ENOMEM ; + +#ifdef CONFIG_DEBUG_FS + component->debugfs_prefix = debugfs_prefix; +#endif
You really shouldn't be doing this as it could conflict with something the machine driver wants to do however it's probably not going to be an issue in practice as it's not like there's going to be multiple SoCs in the card at once and if there were there'd doubltess be other issues.
Jerome Brunet
maintainerRe: [PATCH 5/9] ASoC: meson: aiu: add hdmi codec control support
Quoted 14 lines · Mark Brown
Quoted 12 lines · Jerome Brunet
sound/soc/meson/aiu.c +12
-0+int aiu_add_component (struct device *dev, +const struct snd_soc_component_driver *component_driver, +struct snd_soc_dai_driver *dai_drv, +int num_dai, +const char *debugfs_prefix) +{ +struct snd_soc_component *component; + + component =devm_kzalloc (dev,sizeof (*component),GFP_KERNEL ); +if (!component) +return -ENOMEM ; +
Quoted 8 lines
sound/soc/meson/aiu.c int aiu_of_xlate_dai_name(struct snd_soc_component *component, · line 88
Quoted 3 lines
sound/soc/meson/aiu.c +3
-0+#ifdef CONFIG_DEBUG_FS + component->debugfs_prefix = debugfs_prefix; +#endif You really shouldn't be doing this as it could conflict with something the machine driver wants to do however it's probably not going to be an issue in practice as it's not like there's going to be multiple SoCs in the card at once and if there were there'd doubltess be other issues.
I'm not sure I understand (and I'd prefer to :) )
As you said before, initially the there was supposed to be a 1:1 mapping between device and component. The component name is directly derived from the device name, and the debugfs directory is created from component name.
I would have preferred to use snd_soc_register_component() directly, but with multiple components from the same device I got:
debugfs: Directory 'c1105400.audio-controller' with parent 'AWESOME-CARD' already present!
debugfs: Directory 'c1105400.audio-controller' with parent 'AWESOME-CARD' already present!
I copied the code above from other direct users of snd_soc_add_component() (soc-generic-dmaengine-pcm.c and stm32_adfsdm.c). I suppose they had the same name collision issue.
Instead of addressing the debugfs side effect, maybe we could just make sure that each component name is unique within ASoC ? I'd be happy submit something if you think this can helpful.
Mark Brown
maintainerRe: [PATCH 5/9] ASoC: meson: aiu: add hdmi codec control support
Quoted 11 lines · Jerome Brunet
Quoted 8 lines · Mark Brown
sound/soc/meson/aiu.c int aiu_of_xlate_dai_name(struct snd_soc_component *component, · line 88
Quoted 3 lines
sound/soc/meson/aiu.c +3
-0+#ifdef CONFIG_DEBUG_FS + component->debugfs_prefix = debugfs_prefix; +#endif You really shouldn't be doing this as it could conflict with something the machine driver wants to do however it's probably not going to be an issue in practice as it's not like there's going to be multiple SoCs in the card at once and if there were there'd doubltess be other issues.
Quoted 5 lines
I'm not sure I understand (and I'd prefer to :) )
As you said before, initially the there was supposed to be a 1:1 mapping between device and component. The component name is directly derived from the device name, and the debugfs directory is created from component name.
I understand why you're doing it but that feature is intended for the use of cards when they're integrating components, not for devices trying to register multiple components on the same device. This means that a card that tries to use the feature will conflict with what the driver is doing, but like I say there's no obvious use case for a card doing that.
Quoted 3 lines
Instead of addressing the debugfs side effect, maybe we could just make sure that each component name is unique within ASoC ? I'd be happy submit something if you think this can helpful.
That'd be better.
Mark Brown
maintainerApplied "ASoC: meson: aiu: add hdmi codec control support" to the asoc tree
In reply to Jerome BrunetThe patch
ASoC: meson: aiu: add hdmi codec control support
has been applied to the asoc tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
From b82b734c0e9a75e1b956214ac523a8eb590f51f3 Mon Sep 17 00:00:00 2001
From: Jerome Brunet <[email protected]>
Date: Thu, 13 Feb 2020 16:51:55 +0100
Subject: [PATCH] ASoC: meson: aiu: add hdmi codec control support
Add the codec to codec component which handles the routing between the audio producers (PCM and I2S) and the synopsys hdmi controller on the amlogic GX SoC family
--- sound/soc/meson/Kconfig | 2 + sound/soc/meson/Makefile | 1 + sound/soc/meson/aiu-codec-ctrl.c | 152 +++++++++++++++++++++++++++++++ sound/soc/meson/aiu.c | 34 ++++++- sound/soc/meson/aiu.h | 8 ++ 5 files changed, 196 insertions(+), 1 deletion(-) create mode 100644 sound/soc/meson/aiu-codec-ctrl.c
sound/soc/meson/Kconfig +2 -0
@@ -4,7 +4,9 @@ menu "ASoC support for Amlogic platforms" config SND_MESON_AIU tristate "Amlogic AIU" + select SND_MESON_CODEC_GLUE select SND_PCM_IEC958 + imply SND_SOC_HDMI_CODEC if DRM_MESON_DW_HDMI help Select Y or M to add support for the Audio output subsystem found in the Amlogic GX SoC family
sound/soc/meson/Makefile +1 -0
@@ -1,6 +1,7 @@ # SPDX-License-Identifier: (GPL-2.0 OR MIT) snd-soc-meson-aiu-objs := aiu.o +snd-soc-meson-aiu-objs += aiu-codec-ctrl.o snd-soc-meson-aiu-objs += aiu-encoder-i2s.o snd-soc-meson-aiu-objs += aiu-encoder-spdif.o snd-soc-meson-aiu-objs += aiu-fifo.o
sound/soc/meson/aiu-codec-ctrl.c new file +152 -0
152 lines not on this page · raw message
sound/soc/meson/aiu.c +33 -1
@@ -71,6 +71,26 @@ int aiu_of_xlate_dai_name(struct snd_soc_component *component,return 0 ; } +int aiu_add_component (struct device *dev, +const struct snd_soc_component_driver *component_driver, +struct snd_soc_dai_driver *dai_drv, +int num_dai, +const char *debugfs_prefix) +{ +struct snd_soc_component *component; + + component =devm_kzalloc (dev,sizeof (*component),GFP_KERNEL ); +if (!component) +return -ENOMEM ; + +#ifdef CONFIG_DEBUG_FS + component->debugfs_prefix = debugfs_prefix; +#endif + +return snd_soc_add_component (dev, component, component_driver, + dai_drv, num_dai); +} +static int aiu_cpu_of_xlate_dai_name (struct snd_soc_component *component,struct of_phandle_args *args,const char **dai_name)
@@ -313,9 +333,21 @@ static int aiu_probe(struct platform_device *pdev) ret =snd_soc_register_component (dev, &aiu_cpu_component, aiu_cpu_dai_drv,ARRAY_SIZE (aiu_cpu_dai_drv)); -if (ret) +if (ret) {dev_err (dev,"Failed to register cpu component\n" ); +return ret; + } +/* Register the hdmi codec control component */ + ret =aiu_hdmi_ctrl_register_component (dev); +if (ret) { +dev_err (dev,"Failed to register hdmi control component\n" ); + goto err; + } + +return 0 ; +err: +snd_soc_unregister_component (dev);return ret; }
sound/soc/meson/aiu.h +8 -0
@@ -45,6 +45,14 @@ int aiu_of_xlate_dai_name(struct snd_soc_component *component,const char **dai_name, unsigned int component_id); +int aiu_add_component (struct device *dev, +const struct snd_soc_component_driver *component_driver, +struct snd_soc_dai_driver *dai_drv, +int num_dai, +const char *debugfs_prefix); + +int aiu_hdmi_ctrl_register_component (struct device *dev); +int aiu_fifo_i2s_dai_probe (struct snd_soc_dai *dai);int aiu_fifo_spdif_dai_probe (struct snd_soc_dai *dai);
Signature · 1 line
2.20.1
Jerome Brunet
maintainerPATCH 6/9 ASoC: meson: aiu: add internal dac codec control support
In reply to Jerome BrunetAdd the codec to codec component which handles the routing between the audio producers and the internal audio DAC found on the amlogic GXL SoC family
--- sound/soc/meson/Makefile | 1 + sound/soc/meson/aiu-acodec-ctrl.c | 205 ++++++++++++++++++++++++++++++ sound/soc/meson/aiu.c | 10 ++ sound/soc/meson/aiu.h | 1 + 4 files changed, 217 insertions(+) create mode 100644 sound/soc/meson/aiu-acodec-ctrl.c
sound/soc/meson/Makefile +1 -0
@@ -1,6 +1,7 @@ # SPDX-License-Identifier: (GPL-2.0 OR MIT) snd-soc-meson-aiu-objs := aiu.o +snd-soc-meson-aiu-objs += aiu-acodec-ctrl.o snd-soc-meson-aiu-objs += aiu-codec-ctrl.o snd-soc-meson-aiu-objs += aiu-encoder-i2s.o snd-soc-meson-aiu-objs += aiu-encoder-spdif.o
sound/soc/meson/aiu-acodec-ctrl.c new file +205 -0
205 lines not on this page · raw message
sound/soc/meson/aiu.c +10 -0
@@ -345,6 +345,16 @@ static int aiu_probe(struct platform_device *pdev) goto err; } +/* Register the internal dac control component on gxl */ +if (of_device_is_compatible (dev->of_node,"amlogic,aiu-gxl" )) { + ret =aiu_acodec_ctrl_register_component (dev); +if (ret) { +dev_err (dev, +"Failed to register acodec control component\n" ); + goto err; + } + } +return 0 ; err:snd_soc_unregister_component (dev);
sound/soc/meson/aiu.h +1 -0
@@ -52,6 +52,7 @@ int aiu_add_component(struct device *dev, const char *debugfs_prefix);int aiu_hdmi_ctrl_register_component (struct device *dev); +int aiu_acodec_ctrl_register_component (struct device *dev);int aiu_fifo_i2s_dai_probe (struct snd_soc_dai *dai);int aiu_fifo_spdif_dai_probe (struct snd_soc_dai *dai);
Signature · 1 line
2.24.1
Mark Brown
maintainerApplied "ASoC: meson: aiu: add internal dac codec control support" to the asoc tree
The patch
ASoC: meson: aiu: add internal dac codec control support
has been applied to the asoc tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
From 65816025d46169973d308d83fbcf5c3981ed5621 Mon Sep 17 00:00:00 2001
From: Jerome Brunet <[email protected]>
Date: Thu, 13 Feb 2020 16:51:56 +0100
Subject: [PATCH] ASoC: meson: aiu: add internal dac codec control support
Add the codec to codec component which handles the routing between the audio producers and the internal audio DAC found on the amlogic GXL SoC family
--- sound/soc/meson/Makefile | 1 + sound/soc/meson/aiu-acodec-ctrl.c | 205 ++++++++++++++++++++++++++++++ sound/soc/meson/aiu.c | 10 ++ sound/soc/meson/aiu.h | 1 + 4 files changed, 217 insertions(+) create mode 100644 sound/soc/meson/aiu-acodec-ctrl.c
sound/soc/meson/Makefile +1 -0
@@ -1,6 +1,7 @@ # SPDX-License-Identifier: (GPL-2.0 OR MIT) snd-soc-meson-aiu-objs := aiu.o +snd-soc-meson-aiu-objs += aiu-acodec-ctrl.o snd-soc-meson-aiu-objs += aiu-codec-ctrl.o snd-soc-meson-aiu-objs += aiu-encoder-i2s.o snd-soc-meson-aiu-objs += aiu-encoder-spdif.o
sound/soc/meson/aiu-acodec-ctrl.c new file +205 -0
205 lines not on this page · raw message
sound/soc/meson/aiu.c +10 -0
@@ -345,6 +345,16 @@ static int aiu_probe(struct platform_device *pdev) goto err; } +/* Register the internal dac control component on gxl */ +if (of_device_is_compatible (dev->of_node,"amlogic,aiu-gxl" )) { + ret =aiu_acodec_ctrl_register_component (dev); +if (ret) { +dev_err (dev, +"Failed to register acodec control component\n" ); + goto err; + } + } +return 0 ; err:snd_soc_unregister_component (dev);
sound/soc/meson/aiu.h +1 -0
@@ -52,6 +52,7 @@ int aiu_add_component(struct device *dev, const char *debugfs_prefix);int aiu_hdmi_ctrl_register_component (struct device *dev); +int aiu_acodec_ctrl_register_component (struct device *dev);int aiu_fifo_i2s_dai_probe (struct snd_soc_dai *dai);int aiu_fifo_spdif_dai_probe (struct snd_soc_dai *dai);
Signature · 1 line
2.20.1
Jerome Brunet
maintainerPATCH 7/9 ASoC: meson: axg: extract sound card utils
In reply to Jerome BrunetThis prepares the addition of the GX SoC family sound card driver. The GX sound card, while slightly different, will be similar to the AXG one. The purpose of this change is to share the utils common to both sound card driver.
--- sound/soc/meson/Kconfig | 4 + sound/soc/meson/Makefile | 2 + sound/soc/meson/axg-card.c | 403 ++--------------------------- sound/soc/meson/meson-card-utils.c | 385 +++++++++++++++++++++++++++ sound/soc/meson/meson-card.h | 55 ++++ 5 files changed, 473 insertions(+), 376 deletions(-) create mode 100644 sound/soc/meson/meson-card-utils.c create mode 100644 sound/soc/meson/meson-card.h
sound/soc/meson/Kconfig +4 -0
@@ -59,6 +59,7 @@ config SND_MESON_AXG_TDMOUT config SND_MESON_AXG_SOUND_CARD tristate "Amlogic AXG Sound Card Support" select SND_MESON_AXG_TDM_INTERFACE + select SND_MESON_CARD_UTILS imply SND_MESON_AXG_FRDDR imply SND_MESON_AXG_TODDR imply SND_MESON_AXG_TDMIN
@@ -94,6 +95,9 @@ config SND_MESON_AXG_PDM Select Y or M to add support for PDM input embedded in the Amlogic AXG SoC family +config SND_MESON_CARD_UTILS + tristate + config SND_MESON_CODEC_GLUE tristate
sound/soc/meson/Makefile +2 -0
@@ -19,6 +19,7 @@ snd-soc-meson-axg-sound-card-objs := axg-card.o snd-soc-meson-axg-spdifin-objs := axg-spdifin.o snd-soc-meson-axg-spdifout-objs := axg-spdifout.o snd-soc-meson-axg-pdm-objs := axg-pdm.o +snd-soc-meson-card-utils-objs := meson-card-utils.o snd-soc-meson-codec-glue-objs := meson-codec-glue.o snd-soc-meson-g12a-tohdmitx-objs := g12a-tohdmitx.o
@@ -34,5 +35,6 @@ obj-$(CONFIG_SND_MESON_AXG_SOUND_CARD) += snd-soc-meson-axg-sound-card.o obj-$(CONFIG_SND_MESON_AXG_SPDIFIN) += snd-soc-meson-axg-spdifin.o obj-$(CONFIG_SND_MESON_AXG_SPDIFOUT) += snd-soc-meson-axg-spdifout.o obj-$(CONFIG_SND_MESON_AXG_PDM) += snd-soc-meson-axg-pdm.o +obj-$(CONFIG_SND_MESON_CARD_UTILS) += snd-soc-meson-card-utils.o obj-$(CONFIG_SND_MESON_CODEC_GLUE) += snd-soc-meson-codec-glue.o obj-$(CONFIG_SND_MESON_G12A_TOHDMITX) += snd-soc-meson-g12a-tohdmitx.o
sound/soc/meson/axg-card.c +27 -376
508 lines not on this page · raw message
sound/soc/meson/meson-card-utils.c new file +385 -0
385 lines not on this page · raw message
sound/soc/meson/meson-card.h new file +55 -0
55 lines not on this page · raw message
Signature · 1 line
2.24.1
Mark Brown
maintainerApplied "ASoC: meson: axg: extract sound card utils" to the asoc tree
The patch
ASoC: meson: axg: extract sound card utils
has been applied to the asoc tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
From aa9c3b7273a58b5d9b2c1161b76b5fc8ea8c159b Mon Sep 17 00:00:00 2001
From: Jerome Brunet <[email protected]>
Date: Thu, 13 Feb 2020 16:51:57 +0100
Subject: [PATCH] ASoC: meson: axg: extract sound card utils
This prepares the addition of the GX SoC family sound card driver. The GX sound card, while slightly different, will be similar to the AXG one. The purpose of this change is to share the utils common to both sound card driver.
--- sound/soc/meson/Kconfig | 4 + sound/soc/meson/Makefile | 2 + sound/soc/meson/axg-card.c | 403 ++--------------------------- sound/soc/meson/meson-card-utils.c | 385 +++++++++++++++++++++++++++ sound/soc/meson/meson-card.h | 55 ++++ 5 files changed, 473 insertions(+), 376 deletions(-) create mode 100644 sound/soc/meson/meson-card-utils.c create mode 100644 sound/soc/meson/meson-card.h
sound/soc/meson/Kconfig +4 -0
@@ -59,6 +59,7 @@ config SND_MESON_AXG_TDMOUT config SND_MESON_AXG_SOUND_CARD tristate "Amlogic AXG Sound Card Support" select SND_MESON_AXG_TDM_INTERFACE + select SND_MESON_CARD_UTILS imply SND_MESON_AXG_FRDDR imply SND_MESON_AXG_TODDR imply SND_MESON_AXG_TDMIN
@@ -94,6 +95,9 @@ config SND_MESON_AXG_PDM Select Y or M to add support for PDM input embedded in the Amlogic AXG SoC family +config SND_MESON_CARD_UTILS + tristate + config SND_MESON_CODEC_GLUE tristate
sound/soc/meson/Makefile +2 -0
@@ -19,6 +19,7 @@ snd-soc-meson-axg-sound-card-objs := axg-card.o snd-soc-meson-axg-spdifin-objs := axg-spdifin.o snd-soc-meson-axg-spdifout-objs := axg-spdifout.o snd-soc-meson-axg-pdm-objs := axg-pdm.o +snd-soc-meson-card-utils-objs := meson-card-utils.o snd-soc-meson-codec-glue-objs := meson-codec-glue.o snd-soc-meson-g12a-tohdmitx-objs := g12a-tohdmitx.o
@@ -34,5 +35,6 @@ obj-$(CONFIG_SND_MESON_AXG_SOUND_CARD) += snd-soc-meson-axg-sound-card.o obj-$(CONFIG_SND_MESON_AXG_SPDIFIN) += snd-soc-meson-axg-spdifin.o obj-$(CONFIG_SND_MESON_AXG_SPDIFOUT) += snd-soc-meson-axg-spdifout.o obj-$(CONFIG_SND_MESON_AXG_PDM) += snd-soc-meson-axg-pdm.o +obj-$(CONFIG_SND_MESON_CARD_UTILS) += snd-soc-meson-card-utils.o obj-$(CONFIG_SND_MESON_CODEC_GLUE) += snd-soc-meson-codec-glue.o obj-$(CONFIG_SND_MESON_G12A_TOHDMITX) += snd-soc-meson-g12a-tohdmitx.o
sound/soc/meson/axg-card.c +27 -376
508 lines not on this page · raw message
sound/soc/meson/meson-card-utils.c new file +385 -0
385 lines not on this page · raw message
sound/soc/meson/meson-card.h new file +55 -0
55 lines not on this page · raw message
Signature · 1 line
2.20.1
Jerome Brunet
maintainerPATCH 8/9 ASoC: meson: gx: add sound card dt-binding documentation
In reply to Jerome BrunetAdd the dt-binding documentation of sound card supporting the amlogic GX SoC family
--- .../bindings/sound/amlogic,gx-sound-card.yaml | 113 ++++++++++++++++++ 1 file changed, 113 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/amlogic,gx-sound-card.yaml
Documentation/devicetree/bindings/sound/amlogic,gx-sound-card.yaml new file +113 -0
@@ -0,0 +1,113 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/amlogic,gx-sound-card.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Amlogic GX sound card + +maintainers: + - Jerome Brunet <[email protected]> + +properties: + compatible: + items: + - const: amlogic,gx-sound-card + + audio-aux-devs: + $ref: /schemas/types.yaml#/definitions/phandle-array + description: list of auxiliary devices + + audio-routing: + $ref: /schemas/types.yaml#/definitions/non-unique-string-array + minItems: 2 + description: |- + A list of the connections between audio components. Each entry is a + pair of strings, the first being the connection's sink, the second + being the connection's source. + + audio-widgets: + $ref: /schemas/types.yaml#/definitions/non-unique-string-array + minItems: 2 + description: |- + A list off component DAPM widget. Each entry is a pair of strings, + the first being the widget type, the second being the widget name + + model: + $ref: /schemas/types.yaml#/definitions/string + description: User specified audio sound card name + +patternProperties: + "^dai-link-[0-9]+$": + type: object + description: |- + dai-link child nodes: + Container for dai-link level properties and the CODEC sub-nodes. + There should be at least one (and probably more) subnode of this type + + properties: + dai-format: + $ref: /schemas/types.yaml#/definitions/string + enum: [ i2s, left-j, dsp_a ] + + mclk-fs: + $ref: /schemas/types.yaml#/definitions/uint32 + description: |- + Multiplication factor between the frame rate and master clock + rate + + sound-dai: + $ref: /schemas/types.yaml#/definitions/phandle + description: phandle of the CPU DAI + + patternProperties: + "^codec-[0-9]+$": + type: object + description: |- + Codecs: + dai-link representing backend links should have at least one subnode. + One subnode for each codec of the dai-link. dai-link representing + frontend links have no codec, therefore have no subnodes + + properties: + sound-dai: + $ref: /schemas/types.yaml#/definitions/phandle + description: phandle of the codec DAI + + required: + - sound-dai + + required: + - sound-dai + +required: + - model + - dai-link-0 + +examples: + - | + sound { + compatible = "amlogic,gx-sound-card"; + model = "GXL-ACME-S905X-FOO"; + audio-aux-devs = <&>; + audio-routing = "I2S ENCODER I2S IN", "I2S FIFO Playback"; + + dai-link-0 { + sound-dai = <&i2s_fifo>; + }; + + dai-link-1 { + sound-dai = <&i2s_encoder>; + dai-format = "i2s"; + mclk-fs = <256>; + + codec-0 { + sound-dai = <&codec0>; + }; + + codec-1 { + sound-dai = <&codec1>; + }; + }; + }; +
Signature · 1 line
2.24.1
Mark Brown
maintainerApplied "ASoC: meson: gx: add sound card dt-binding documentation" to the asoc tree
The patch
ASoC: meson: gx: add sound card dt-binding documentation
has been applied to the asoc tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
From fd00366b8e4125d29e32d49053a702ddf77430f6 Mon Sep 17 00:00:00 2001
From: Jerome Brunet <[email protected]>
Date: Thu, 13 Feb 2020 16:51:58 +0100
Subject: [PATCH] ASoC: meson: gx: add sound card dt-binding documentation
Add the dt-binding documentation of sound card supporting the amlogic GX SoC family
--- .../bindings/sound/amlogic,gx-sound-card.yaml | 113 ++++++++++++++++++ 1 file changed, 113 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/amlogic,gx-sound-card.yaml
Documentation/devicetree/bindings/sound/amlogic,gx-sound-card.yaml new file +113 -0
@@ -0,0 +1,113 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/amlogic,gx-sound-card.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Amlogic GX sound card + +maintainers: + - Jerome Brunet <[email protected]> + +properties: + compatible: + items: + - const: amlogic,gx-sound-card + + audio-aux-devs: + $ref: /schemas/types.yaml#/definitions/phandle-array + description: list of auxiliary devices + + audio-routing: + $ref: /schemas/types.yaml#/definitions/non-unique-string-array + minItems: 2 + description: |- + A list of the connections between audio components. Each entry is a + pair of strings, the first being the connection's sink, the second + being the connection's source. + + audio-widgets: + $ref: /schemas/types.yaml#/definitions/non-unique-string-array + minItems: 2 + description: |- + A list off component DAPM widget. Each entry is a pair of strings, + the first being the widget type, the second being the widget name + + model: + $ref: /schemas/types.yaml#/definitions/string + description: User specified audio sound card name + +patternProperties: + "^dai-link-[0-9]+$": + type: object + description: |- + dai-link child nodes: + Container for dai-link level properties and the CODEC sub-nodes. + There should be at least one (and probably more) subnode of this type + + properties: + dai-format: + $ref: /schemas/types.yaml#/definitions/string + enum: [ i2s, left-j, dsp_a ] + + mclk-fs: + $ref: /schemas/types.yaml#/definitions/uint32 + description: |- + Multiplication factor between the frame rate and master clock + rate + + sound-dai: + $ref: /schemas/types.yaml#/definitions/phandle + description: phandle of the CPU DAI + + patternProperties: + "^codec-[0-9]+$": + type: object + description: |- + Codecs: + dai-link representing backend links should have at least one subnode. + One subnode for each codec of the dai-link. dai-link representing + frontend links have no codec, therefore have no subnodes + + properties: + sound-dai: + $ref: /schemas/types.yaml#/definitions/phandle + description: phandle of the codec DAI + + required: + - sound-dai + + required: + - sound-dai + +required: + - model + - dai-link-0 + +examples: + - | + sound { + compatible = "amlogic,gx-sound-card"; + model = "GXL-ACME-S905X-FOO"; + audio-aux-devs = <&>; + audio-routing = "I2S ENCODER I2S IN", "I2S FIFO Playback"; + + dai-link-0 { + sound-dai = <&i2s_fifo>; + }; + + dai-link-1 { + sound-dai = <&i2s_encoder>; + dai-format = "i2s"; + mclk-fs = <256>; + + codec-0 { + sound-dai = <&codec0>; + }; + + codec-1 { + sound-dai = <&codec1>; + }; + }; + }; +
Signature · 1 line
2.20.1
Jerome Brunet
maintainerPATCH 9/9 ASoC: meson: gx: add sound card support
In reply to Jerome BrunetAdd support for the sound card used on the amlogic GX SoC family
--- sound/soc/meson/Kconfig | 7 ++ sound/soc/meson/Makefile | 2 + sound/soc/meson/gx-card.c | 141 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 150 insertions(+) create mode 100644 sound/soc/meson/gx-card.c
sound/soc/meson/Kconfig +7 -0
@@ -101,6 +101,13 @@ config SND_MESON_CARD_UTILS config SND_MESON_CODEC_GLUE tristate +config SND_MESON_GX_SOUND_CARD + tristate "Amlogic GX Sound Card Support" + select SND_MESON_CARD_UTILS + imply SND_MESON_AIU + help + Select Y or M to add support for the GXBB/GXL SoC sound card + config SND_MESON_G12A_TOHDMITX tristate "Amlogic G12A To HDMI TX Control Support" select REGMAP_MMIO
sound/soc/meson/Makefile +2 -0
@@ -21,6 +21,7 @@ snd-soc-meson-axg-spdifout-objs := axg-spdifout.o snd-soc-meson-axg-pdm-objs := axg-pdm.o snd-soc-meson-card-utils-objs := meson-card-utils.o snd-soc-meson-codec-glue-objs := meson-codec-glue.o +snd-soc-meson-gx-sound-card-objs := gx-card.o snd-soc-meson-g12a-tohdmitx-objs := g12a-tohdmitx.o obj-$(CONFIG_SND_MESON_AIU) += snd-soc-meson-aiu.o
@@ -37,4 +38,5 @@ obj-$(CONFIG_SND_MESON_AXG_SPDIFOUT) += snd-soc-meson-axg-spdifout.o obj-$(CONFIG_SND_MESON_AXG_PDM) += snd-soc-meson-axg-pdm.o obj-$(CONFIG_SND_MESON_CARD_UTILS) += snd-soc-meson-card-utils.o obj-$(CONFIG_SND_MESON_CODEC_GLUE) += snd-soc-meson-codec-glue.o +obj-$(CONFIG_SND_MESON_GX_SOUND_CARD) += snd-soc-meson-gx-sound-card.o obj-$(CONFIG_SND_MESON_G12A_TOHDMITX) += snd-soc-meson-g12a-tohdmitx.o
sound/soc/meson/gx-card.c new file +141 -0
141 lines not on this page · raw message
Signature · 1 line
2.24.1
Mark Brown
maintainerApplied "ASoC: meson: gx: add sound card support" to the asoc tree
The patch
ASoC: meson: gx: add sound card support
has been applied to the asoc tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
From e37a0c313a0f8ba0b8de9c30db98fbc77bd8d446 Mon Sep 17 00:00:00 2001
From: Jerome Brunet <[email protected]>
Date: Thu, 13 Feb 2020 16:51:59 +0100
Subject: [PATCH] ASoC: meson: gx: add sound card support
Add support for the sound card used on the amlogic GX SoC family
--- sound/soc/meson/Kconfig | 7 ++ sound/soc/meson/Makefile | 2 + sound/soc/meson/gx-card.c | 141 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 150 insertions(+) create mode 100644 sound/soc/meson/gx-card.c
sound/soc/meson/Kconfig +7 -0
@@ -101,6 +101,13 @@ config SND_MESON_CARD_UTILS config SND_MESON_CODEC_GLUE tristate +config SND_MESON_GX_SOUND_CARD + tristate "Amlogic GX Sound Card Support" + select SND_MESON_CARD_UTILS + imply SND_MESON_AIU + help + Select Y or M to add support for the GXBB/GXL SoC sound card + config SND_MESON_G12A_TOHDMITX tristate "Amlogic G12A To HDMI TX Control Support" select REGMAP_MMIO
sound/soc/meson/Makefile +2 -0
@@ -21,6 +21,7 @@ snd-soc-meson-axg-spdifout-objs := axg-spdifout.o snd-soc-meson-axg-pdm-objs := axg-pdm.o snd-soc-meson-card-utils-objs := meson-card-utils.o snd-soc-meson-codec-glue-objs := meson-codec-glue.o +snd-soc-meson-gx-sound-card-objs := gx-card.o snd-soc-meson-g12a-tohdmitx-objs := g12a-tohdmitx.o obj-$(CONFIG_SND_MESON_AIU) += snd-soc-meson-aiu.o
@@ -37,4 +38,5 @@ obj-$(CONFIG_SND_MESON_AXG_SPDIFOUT) += snd-soc-meson-axg-spdifout.o obj-$(CONFIG_SND_MESON_AXG_PDM) += snd-soc-meson-axg-pdm.o obj-$(CONFIG_SND_MESON_CARD_UTILS) += snd-soc-meson-card-utils.o obj-$(CONFIG_SND_MESON_CODEC_GLUE) += snd-soc-meson-codec-glue.o +obj-$(CONFIG_SND_MESON_GX_SOUND_CARD) += snd-soc-meson-gx-sound-card.o obj-$(CONFIG_SND_MESON_G12A_TOHDMITX) += snd-soc-meson-g12a-tohdmitx.o
sound/soc/meson/gx-card.c new file +141 -0
141 lines not on this page · raw message
Signature · 1 line
2.20.1
This series was applied to khilman/linux-amlogic.git (refs/heads/for-next).
Hello:
This series was applied to khilman/linux-amlogic.git (refs/heads/for-next).
Quoted 11 lines · On Thu, 13 Feb 2020 16:51:50 +0100 you wrote:
This patchset adds support for the i2s and spdif audio outputs of the amlogic GX SoC family, such the S905, S905X/D, S912 and S805X. These SoCs are used by a fair amount of boards actively maintained upstream.
This was tested on:
* amlogic s912 q200
* libretech s805x-ac (frite)
* libretech s905x-cc (potato)
* libretech s905d-pc (tartiflette)[...]
Here is a summary with links:
- [1/9] ASoC: core: allow a dt node to provide several components
https://git.kernel.org/khilman/linux-amlogic/c/1dfa5a5ab34560fd9647083f623d19705be2e706 - [2/9] ASoC: meson: g12a: extract codec-to-codec utils https://git.kernel.org/khilman/linux-amlogic/c/9c29fd9bdf92900dc0cc5c2d8f58951a7bdc0f41 - [3/9] ASoC: meson: aiu: add audio output dt-bindings https://git.kernel.org/khilman/linux-amlogic/c/06b72824386795bf6f0a6ac0f0cfef6b7f0165c1 - [4/9] ASoC: meson: aiu: add i2s and spdif support https://git.kernel.org/khilman/linux-amlogic/c/6ae9ca9ce986bffe71fd0fbf9595de8500891b52 - [5/9] ASoC: meson: aiu: add hdmi codec control support https://git.kernel.org/khilman/linux-amlogic/c/b82b734c0e9a75e1b956214ac523a8eb590f51f3 - [6/9] ASoC: meson: aiu: add internal dac codec control support https://git.kernel.org/khilman/linux-amlogic/c/65816025d46169973d308d83fbcf5c3981ed5621 - [7/9] ASoC: meson: axg: extract sound card utils https://git.kernel.org/khilman/linux-amlogic/c/aa9c3b7273a58b5d9b2c1161b76b5fc8ea8c159b - [8/9] ASoC: meson: gx: add sound card dt-binding documentation https://git.kernel.org/khilman/linux-amlogic/c/fd00366b8e4125d29e32d49053a702ddf77430f6 - [9/9] ASoC: meson: gx: add sound card support https://git.kernel.org/khilman/linux-amlogic/c/e37a0c313a0f8ba0b8de9c30db98fbc77bd8d446
You are awesome, thank you!
Signature · 7 lines
Deet-doot-dot, I am a bot. https://korg.wiki.kernel.org/userdoc/pwbot _______________________________________________ linux-amlogic mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-amlogic