[alsa-devel] [linux-sunxi][PATCH 0/3]Add SPDIF support for Allwinner SoCs
From: Marcus Cooper codekipper@gmail.com
This patch set adds support for the Allwinner SPDIF transceiver as present on the A10, A20 and A31 SoC boards.
For now just the SPDIF transmitter has been tested on a Mele A2000.
In order for this patch set to be functional we require audio clock patches which will be delivered separately. For those that are interested I've pushed the patches here with all the required changes to get SPDIF audio out of the device.
https://github.com/codekipper/linux-sunxi/commits/spdif_delivery
Thanks in advance, CK
Marcus Cooper (3): dt-bindings: add sunxi SPDIF transceiver bindings dt-binding: Add sunxi SPDIF machine driver ASOC: sunxi: Add support for the spdif block
.../devicetree/bindings/sound/sunxi,spdif.txt | 49 ++ .../bindings/sound/sunxi-audio-spdif.txt | 36 + sound/soc/sunxi/Kconfig | 10 + sound/soc/sunxi/Makefile | 4 + sound/soc/sunxi/sunxi-machine-spdif.c | 110 +++ sound/soc/sunxi/sunxi-spdif.c | 801 +++++++++++++++++++++ 6 files changed, 1010 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/sunxi,spdif.txt create mode 100644 Documentation/devicetree/bindings/sound/sunxi-audio-spdif.txt create mode 100644 sound/soc/sunxi/sunxi-machine-spdif.c create mode 100644 sound/soc/sunxi/sunxi-spdif.c
From: Marcus Cooper codekipper@gmail.com
Add devicetree bindings for the SPDIF transceiver found on found on Allwinners A10, A20 and A31 SoCs.
Signed-off-by: Marcus Cooper codekipper@gmail.com --- .../devicetree/bindings/sound/sunxi,spdif.txt | 49 ++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/sunxi,spdif.txt
diff --git a/Documentation/devicetree/bindings/sound/sunxi,spdif.txt b/Documentation/devicetree/bindings/sound/sunxi,spdif.txt new file mode 100644 index 0000000..1868722 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/sunxi,spdif.txt @@ -0,0 +1,49 @@ +Allwinner Sony/Philips Digital Interface Format (S/PDIF) Controller + +The Allwinner S/PDIF audio block is a transceiver that allows the +processor to receive and transmit digital audio via an coaxial cable or +a fibre cable. + +Required properties: + + - compatible : should be one of the following: + - "allwinner,sun4i-a10-spdif": for the Allwinner A10 SoC + - "allwinner,sun7i-a20-spdif": for the Allwinner A20 SoC + - "allwinner,sun6i-a31-spdif": for the Allwinner A31 SoC + + - reg : Offset and length of the register set for the device. + + - interrupts : Contains the spdif interrupt. + + - dmas : Generic dma devicetree binding as described in + Documentation/devicetree/bindings/dma/dma.txt. + + - dma-names : Two dmas have to be defined, "tx" and "rx". + + - clocks : Contains an entry for each entry in clock-names. + + - clock-names : Includes the following entries: + "apb" clock for the spdif bus. + "audio" clock from the audio pll. + "spdif" clock for spdif controller. + +Optional: + + - spdif-in : Enable block for capturing an SPDIF signal. + + - spdif-out : Enable block for transmitting an SPDIF signal. + +Example: + +spdif: spdif@01c21000 { + compatible = "allwinner,sun4i-a10-spdif"; + reg = <0x01c21000 0x40>; + interrupts = <13>; + clocks = <&apb0_gates 1>, <&pll2 0>, <&spdif_clk>; + clock-names = "apb", "audio", "spdif"; + dmas = <&dma 0 2>, <&dma 0 2>; + dma-names = "rx", "tx"; + spdif-in = "disabled"; + spdif-out = "okay"; + status = "okay"; +};
From: Marcus Cooper codekipper@gmail.com
Add device tree bindings for the SPDIF machine driver for Allwinner SoC devices.
Signed-off-by: Marcus Cooper codekipper@gmail.com --- .../bindings/sound/sunxi-audio-spdif.txt | 36 ++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/sunxi-audio-spdif.txt
diff --git a/Documentation/devicetree/bindings/sound/sunxi-audio-spdif.txt b/Documentation/devicetree/bindings/sound/sunxi-audio-spdif.txt new file mode 100644 index 0000000..b9e8152 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/sunxi-audio-spdif.txt @@ -0,0 +1,36 @@ +Allwinner audio complex with S/PDIF transceiver + +Required properties: + + - compatible : "Allwinner,sunxi-audio-spdif" + + - model : The user-visible name of this sound complex + + - spdif-controller : The phandle of the Allwinner S/PDIF controller + + +Optional properties: + + - spdif-out : This is a boolean property. If present, the + transmitting function of S/PDIF will be enabled, + indicating there's a physical S/PDIF out connector + or jack on the board or it's connecting to some + other IP block, such as an HDMI encoder or + display-controller. + + - spdif-in : This is a boolean property. If present, the receiving + function of S/PDIF will be enabled, indicating there + is a physical S/PDIF in connector/jack on the board. + +* Note: At least one of these two properties should be set in the DT binding. + + +Example: + +sound-spdif { + compatible = "allwinner,sunxi-audio-spdif"; + model = "sunxi-spdif"; + spdif-controller = <&spdif>; + spdif-out; + spdif-in; +};
Hi All, I'm getting a "fatal: 'send-email'" response with the last patch(even though the dry run of the patch series worked) and I've not been able to work around it. I'll post it as soon as I can work out what the issue is, BR, CK
On 23 September 2015 at 20:04, codekipper@gmail.com wrote:
From: Marcus Cooper codekipper@gmail.com
This patch set adds support for the Allwinner SPDIF transceiver as present on the A10, A20 and A31 SoC boards.
For now just the SPDIF transmitter has been tested on a Mele A2000.
In order for this patch set to be functional we require audio clock patches which will be delivered separately. For those that are interested I've pushed the patches here with all the required changes to get SPDIF audio out of the device.
https://github.com/codekipper/linux-sunxi/commits/spdif_delivery
Thanks in advance, CK
Marcus Cooper (3): dt-bindings: add sunxi SPDIF transceiver bindings dt-binding: Add sunxi SPDIF machine driver ASOC: sunxi: Add support for the spdif block
.../devicetree/bindings/sound/sunxi,spdif.txt | 49 ++ .../bindings/sound/sunxi-audio-spdif.txt | 36 + sound/soc/sunxi/Kconfig | 10 + sound/soc/sunxi/Makefile | 4 + sound/soc/sunxi/sunxi-machine-spdif.c | 110 +++ sound/soc/sunxi/sunxi-spdif.c | 801 +++++++++++++++++++++ 6 files changed, 1010 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/sunxi,spdif.txt create mode 100644 Documentation/devicetree/bindings/sound/sunxi-audio-spdif.txt create mode 100644 sound/soc/sunxi/sunxi-machine-spdif.c create mode 100644 sound/soc/sunxi/sunxi-spdif.c
-- 2.5.3
On 23 September 2015 at 20:41, Code Kipper codekipper@gmail.com wrote:
Hi All, I'm getting a "fatal: 'send-email'" response with the last patch(even though the dry run of the patch series worked) and I've not been able to work around it. I'll post it as soon as I can work out what the issue is,
DONE
BR, CK
On 23 September 2015 at 20:04, codekipper@gmail.com wrote:
From: Marcus Cooper codekipper@gmail.com
This patch set adds support for the Allwinner SPDIF transceiver as present on the A10, A20 and A31 SoC boards.
For now just the SPDIF transmitter has been tested on a Mele A2000.
In order for this patch set to be functional we require audio clock patches which will be delivered separately. For those that are interested I've pushed the patches here with all the required changes to get SPDIF audio out of the device.
https://github.com/codekipper/linux-sunxi/commits/spdif_delivery
Thanks in advance, CK
Marcus Cooper (3): dt-bindings: add sunxi SPDIF transceiver bindings dt-binding: Add sunxi SPDIF machine driver ASOC: sunxi: Add support for the spdif block
.../devicetree/bindings/sound/sunxi,spdif.txt | 49 ++ .../bindings/sound/sunxi-audio-spdif.txt | 36 + sound/soc/sunxi/Kconfig | 10 + sound/soc/sunxi/Makefile | 4 + sound/soc/sunxi/sunxi-machine-spdif.c | 110 +++ sound/soc/sunxi/sunxi-spdif.c | 801 +++++++++++++++++++++ 6 files changed, 1010 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/sunxi,spdif.txt create mode 100644 Documentation/devicetree/bindings/sound/sunxi-audio-spdif.txt create mode 100644 sound/soc/sunxi/sunxi-machine-spdif.c create mode 100644 sound/soc/sunxi/sunxi-spdif.c
-- 2.5.3
participants (2)
-
Code Kipper
-
codekipper@gmail.com