Add SPDIF support for Allwinner SoCs
Subsystems (3)
cover Add SPDIF support for Allwinner SoCs
From: Marcus Cooper <[email protected]>
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
Signature · 1 line
2.5.3
PATCH 1/3 dt-bindings: add sunxi SPDIF transceiver bindings
From: Marcus Cooper <[email protected]>
Add devicetree bindings for the SPDIF transceiver found on found on Allwinners A10, A20 and A31 SoCs.
--- .../devicetree/bindings/sound/sunxi,spdif.txt | 49 ++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/sunxi,spdif.txt
Documentation/devicetree/bindings/sound/sunxi,spdif.txt new file +49 -0
@@ -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"; +};
Signature · 1 line
2.5.3
PATCH 2/3 dt-binding: Add sunxi SPDIF machine driver
In reply to [email protected]From: Marcus Cooper <[email protected]>
Add device tree bindings for the SPDIF machine driver for Allwinner SoC devices.
--- .../bindings/sound/sunxi-audio-spdif.txt | 36 ++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/sunxi-audio-spdif.txt
Documentation/devicetree/bindings/sound/sunxi-audio-spdif.txt new file +36 -0
@@ -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; +};
Signature · 1 line
2.5.3
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
Quoted 37 lines · On 23 September 2015 at 20:04, <[email protected]…
From: Marcus Cooper <[email protected]>
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,
CKMarcus 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
Quoted 5 lines · Code Kipper
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
Quoted 41 lines
BR,
CKQuoted 37 lines · On 23 September 2015 at 20:04, <[email protected]> wrote:
From: Marcus Cooper <[email protected]>
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,
CKMarcus 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
Re: [linux-sunxi][alsa-devel][PATCH 2/3] dt-binding: Add sunxi SPDIF machine driver
In reply to [email protected]Quoted 4 lines · On Thu, Sep 24, 2015 at 2:04 AM, <[email protected]…
From: Marcus Cooper <[email protected]>
Add device tree bindings for the SPDIF machine driver for Allwinner SoC devices.
Is there a particular reason for having 2 separate bindings for one piece of hardware?
Also, both this binding and the driver bits look almost like imx-audio-spdif. This seems like unneeded duplication. Can we generalize that and use it? Or just use simple-card?
Regards
ChenYu
Quoted 55 lines
Signed-off-by Marcus Cooper <[email protected]>--- .../bindings/sound/sunxi-audio-spdif.txt | 36 ++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/sunxi-audio-spdif.txtDocumentation/devicetree/bindings/sound/sunxi-audio-spdif.txt new file +36
-1@@ -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; +}; --2.5.3
--
You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/[email protected] For more options, visit https://groups.google.com/d/optout.