From bd7ff187fac33c2fd221aa4073215d38d9c6b6ed Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Tue, 6 Nov 2018 05:20:25 +0000 Subject: ASoC: rsnd: tidyup Document for DT binding It has duplicated DT example code on Document. This patch tidyup these. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- .../devicetree/bindings/sound/renesas,rsnd.txt | 214 ++++++++++----------- 1 file changed, 98 insertions(+), 116 deletions(-) (limited to 'Documentation/devicetree') diff --git a/Documentation/devicetree/bindings/sound/renesas,rsnd.txt b/Documentation/devicetree/bindings/sound/renesas,rsnd.txt index d92b705e7917..8986764508db 100644 --- a/Documentation/devicetree/bindings/sound/renesas,rsnd.txt +++ b/Documentation/devicetree/bindings/sound/renesas,rsnd.txt @@ -39,15 +39,7 @@ This is example of Playback: [MEM] -> [SRC2] -> [DVC0] -> [SSIU0/SSI0] -> [codec] Capture: [MEM] <- [DVC1] <- [SRC3] <- [SSIU1/SSI1] <- [codec] - &rcar_sound { - ... - rcar_sound,dai { - dai0 { - playback = <&ssi0 &src2 &dvc0>; - capture = <&ssi1 &src3 &dvc1>; - }; - }; - }; +see "Example: simple sound card" You can use below. ${LINUX}/arch/arm/boot/dts/r8a7790.dts can be good example. @@ -83,29 +75,8 @@ SRC can convert [xx]Hz to [yy]Hz. Then, it has below 2 modes ** Asynchronous mode ------------------ -You need to use "simple-scu-audio-card" sound card for it. -example) - - sound { - compatible = "simple-scu-audio-card"; - ... - /* - * SRC Asynchronous mode setting - * Playback: - * All input data will be converted to 48kHz - * Capture: - * Inputed 48kHz data will be converted to - * system specified Hz - */ - simple-audio-card,convert-rate = <48000>; - ... - simple-audio-card,cpu { - sound-dai = <&rcar_sound>; - }; - simple-audio-card,codec { - ... - }; - }; +You need to use "simple-scu-audio-card" or "audio-graph-scu-card" for it. +see "Example: simple sound card for Asynchronous mode" ------------------ ** Synchronous mode @@ -141,26 +112,8 @@ For more detail information, see below ${LINUX}/sound/soc/sh/rcar/ctu.c - comment of header -You need to use "simple-scu-audio-card" sound card for it. -example) - - sound { - compatible = "simple-scu-audio-card"; - ... - /* - * CTU setting - * All input data will be converted to 2ch - * as output data - */ - simple-audio-card,convert-channels = <2>; - ... - simple-audio-card,cpu { - sound-dai = <&rcar_sound>; - }; - simple-audio-card,codec { - ... - }; - }; +You need to use "simple-scu-audio-card" or "audio-graph-scu-card" for it. +see "Example: simple sound card for channel convert" Ex) Exchange output channel Input -> Output @@ -190,42 +143,13 @@ and these sounds will be merged by MIX. aplay -D plughw:0,0 xxxx.wav & aplay -D plughw:0,1 yyyy.wav -You need to use "simple-scu-audio-card" sound card for it. +You need to use "simple-scu-audio-card" or "audio-graph-scu-card" for it. Ex) [MEM] -> [SRC1] -> [CTU02] -+-> [MIX0] -> [DVC0] -> [SSI0] | [MEM] -> [SRC2] -> [CTU03] -+ - sound { - #address-cells = <1>; - #size-cells = <0>; - - compatible = "simple-scu-audio-card"; - ... - simple-audio-card,cpu@0 { - reg = <0>; - sound-dai = <&rcar_sound 0>; - }; - simple-audio-card,cpu@1 { - reg = <1>; - sound-dai = <&rcar_sound 1>; - }; - simple-audio-card,codec { - ... - }; - }; - - &rcar_sound { - ... - rcar_sound,dai { - dai0 { - playback = <&src1 &ctu02 &mix0 &dvc0 &ssi0>; - }; - dai1 { - playback = <&src2 &ctu03 &mix0 &dvc0 &ssi0>; - }; - }; - }; +see "Example: simple sound card for MIXer" ============================================= * DVC (Digital Volume and Mute Function) @@ -304,14 +228,7 @@ This is example if SSI1 want to share WS pin with SSI0 You can use Multi-SSI. This is example of SSI0/SSI1/SSI2 (= for 6ch) - &rcar_sound { - ... - rcar_sound,dai { - dai0 { - playback = <&ssi0 &ssi1 &ssi2 &src0 &dvc0>; - }; - }; - }; +see "Example: simple sound card for Multi channel" ** TDM-SSI @@ -319,19 +236,7 @@ You can use TDM with SSI. This is example of TDM 6ch. Driver can automatically switches TDM <-> stereo mode in this case. - rsnd_tdm: sound { - compatible = "simple-audio-card"; - ... - simple-audio-card,cpu { - /* system can use TDM 6ch */ - dai-tdm-slot-num = <6>; - sound-dai = <&rcar_sound>; - }; - simple-audio-card,codec { - ... - }; - }; - +see "Example: simple sound card for TDM" ============================================= Required properties: @@ -647,25 +552,102 @@ Example: simple sound card }; ============================================= -Example: simple sound card for TDM +Example: simple sound card for Asynchronous mode ============================================= - rsnd_tdm: sound { - compatible = "simple-audio-card"; +sound { + compatible = "simple-scu-audio-card"; + ... + /* + * SRC Asynchronous mode setting + * Playback: + * All input data will be converted to 48kHz + * Capture: + * Inputed 48kHz data will be converted to + * system specified Hz + */ + simple-audio-card,convert-rate = <48000>; + ... + simple-audio-card,cpu { + sound-dai = <&rcar_sound>; + }; + simple-audio-card,codec { + ... + }; +}; - simple-audio-card,format = "left_j"; - simple-audio-card,bitclock-master = <&sndcodec>; - simple-audio-card,frame-master = <&sndcodec>; +============================================= +Example: simple sound card for channel convert +============================================= - sndcpu: simple-audio-card,cpu { - sound-dai = <&rcar_sound>; - dai-tdm-slot-num = <6>; - }; +sound { + compatible = "simple-scu-audio-card"; + ... + /* + * CTU setting + * All input data will be converted to 2ch + * as output data + */ + simple-audio-card,convert-channels = <2>; + ... + simple-audio-card,cpu { + sound-dai = <&rcar_sound>; + }; + simple-audio-card,codec { + ... + }; +}; - sndcodec: simple-audio-card,codec { - sound-dai = <&xxx>; +============================================= +Example: simple sound card for MIXer +============================================= + +sound { + compatible = "simple-scu-audio-card"; + ... + simple-audio-card,cpu@0 { + sound-dai = <&rcar_sound 0>; + }; + simple-audio-card,cpu@1 { + sound-dai = <&rcar_sound 1>; + }; + simple-audio-card,codec { + ... + }; +}; + +&rcar_sound { + ... + rcar_sound,dai { + dai0 { + playback = <&src1 &ctu02 &mix0 &dvc0 &ssi0>; + }; + dai1 { + playback = <&src2 &ctu03 &mix0 &dvc0 &ssi0>; }; }; +}; + +============================================= +Example: simple sound card for TDM +============================================= + +rsnd_tdm: sound { + compatible = "simple-audio-card"; + + simple-audio-card,format = "left_j"; + simple-audio-card,bitclock-master = <&sndcodec>; + simple-audio-card,frame-master = <&sndcodec>; + + sndcpu: simple-audio-card,cpu { + sound-dai = <&rcar_sound>; + dai-tdm-slot-num = <6>; + }; + + sndcodec: simple-audio-card,codec { + sound-dai = <&xxx>; + }; +}; ============================================= Example: simple sound card for Multi channel -- cgit v1.2.3-59-g8ed1b From da48a6eb82ea2eaa26464f863f0f39908727bfdb Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Tue, 6 Nov 2018 05:20:56 +0000 Subject: ASoC: rsnd: add SSIU BUSIF support for Document Gen2 has BUSIF0-3, Gen3 has BUSIF0-7 on some SSIU. Current driver is assuming it is using BUSIF0 as default. Thus, SSI is attaching SSIU (with BUSIF0) by using rsnd_ssiu_attach(). But, TDM split mode also needs other BUSIF to use it. This patch adds missing SSIU BUSIFx support. BUSIF is handled by SSIU instead of SSI anymore. Thus, its settings no longer needed on SSI node on DT. This patch removes its settings from Document, but driver is still keeping compatibility. Thus, old DT style is still working. But, to avoid confusing, it doesn't indicate old compatibility things on Document. New SoC should have SSIU on DT from this patch. 1) old style DT is still supported (= no rcar_sound,ssiu node on DT) 2) If ssiu is not indicated on playback/capture, BUSIF0 will be used as default playback = <&ssi3>; /* ssiu30 will be selected */ 3) you can select own ssiu playback = <&ssi32 &ssi3>; /* ssiu32 will be selected */ Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- .../devicetree/bindings/sound/renesas,rsnd.txt | 87 +++++++++++----------- 1 file changed, 43 insertions(+), 44 deletions(-) (limited to 'Documentation/devicetree') diff --git a/Documentation/devicetree/bindings/sound/renesas,rsnd.txt b/Documentation/devicetree/bindings/sound/renesas,rsnd.txt index 8986764508db..6ed1a3658ffd 100644 --- a/Documentation/devicetree/bindings/sound/renesas,rsnd.txt +++ b/Documentation/devicetree/bindings/sound/renesas,rsnd.txt @@ -181,15 +181,12 @@ Volume Ramp * SSIU (Serial Sound Interface Unit) ============================================= -There is no DT settings for SSIU, because SSIU will be automatically -selected via SSI. SSIU can avoid some under/over run error, because it has some buffer. But you can't use it if SSI was PIO mode. -In DMA mode, you can select not to use SSIU by using "no-busif" on DT. +In DMA mode, you can select not to use SSIU by using "no-busif" via SSI. - &ssi0 { - no-busif; - }; +SSIU handles BUSIF which will be used for TDM Split mode. +This driver is assuming that audio-graph card will be used. ============================================= * SSI (Serial Sound Interface) @@ -268,6 +265,9 @@ Required properties: - rcar_sound,ssi : Should contain SSI feature. The number of SSI subnode should be same as HW. see below for detail. +- rcar_sound,ssiu : Should contain SSIU feature. + The number of SSIU subnode should be same as HW. + see below for detail. - rcar_sound,src : Should contain SRC feature. The number of SRC subnode should be same as HW. see below for detail. @@ -437,56 +437,55 @@ rcar_sound: sound@ec500000 { }; }; + rcar_sound,ssiu { + ssiu00: ssiu-0 { + dmas = <&audma0 0x15>, <&audma1 0x16>; + dma-names = "rx", "tx"; + }; + ssiu01: ssiu-1 { + dmas = <&audma0 0x35>, <&audma1 0x36>; + dma-names = "rx", "tx"; + }; + + ... + + ssiu95: ssiu-49 { + dmas = <&audma0 0xA5>, <&audma1 0xA6>; + dma-names = "rx", "tx"; + }; + ssiu96: ssiu-50 { + dmas = <&audma0 0xA7>, <&audma1 0xA8>; + dma-names = "rx", "tx"; + }; + ssiu97: ssiu-51 { + dmas = <&audma0 0xA9>, <&audma1 0xAA>; + dma-names = "rx", "tx"; + }; + }; + rcar_sound,ssi { ssi0: ssi-0 { interrupts = <0 370 IRQ_TYPE_LEVEL_HIGH>; - dmas = <&audma0 0x01>, <&audma1 0x02>, <&audma0 0x15>, <&audma1 0x16>; - dma-names = "rx", "tx", "rxu", "txu"; + dmas = <&audma0 0x01>, <&audma1 0x02>; + dma-names = "rx", "tx"; }; ssi1: ssi-1 { interrupts = <0 371 IRQ_TYPE_LEVEL_HIGH>; - dmas = <&audma0 0x03>, <&audma1 0x04>, <&audma0 0x49>, <&audma1 0x4a>; - dma-names = "rx", "tx", "rxu", "txu"; - }; - ssi2: ssi-2 { - interrupts = <0 372 IRQ_TYPE_LEVEL_HIGH>; - dmas = <&audma0 0x05>, <&audma1 0x06>, <&audma0 0x63>, <&audma1 0x64>; - dma-names = "rx", "tx", "rxu", "txu"; - }; - ssi3: ssi-3 { - interrupts = <0 373 IRQ_TYPE_LEVEL_HIGH>; - dmas = <&audma0 0x07>, <&audma1 0x08>, <&audma0 0x6f>, <&audma1 0x70>; - dma-names = "rx", "tx", "rxu", "txu"; - }; - ssi4: ssi-4 { - interrupts = <0 374 IRQ_TYPE_LEVEL_HIGH>; - dmas = <&audma0 0x09>, <&audma1 0x0a>, <&audma0 0x71>, <&audma1 0x72>; - dma-names = "rx", "tx", "rxu", "txu"; - }; - ssi5: ssi-5 { - interrupts = <0 375 IRQ_TYPE_LEVEL_HIGH>; - dmas = <&audma0 0x0b>, <&audma1 0x0c>, <&audma0 0x73>, <&audma1 0x74>; - dma-names = "rx", "tx", "rxu", "txu"; - }; - ssi6: ssi-6 { - interrupts = <0 376 IRQ_TYPE_LEVEL_HIGH>; - dmas = <&audma0 0x0d>, <&audma1 0x0e>, <&audma0 0x75>, <&audma1 0x76>; - dma-names = "rx", "tx", "rxu", "txu"; - }; - ssi7: ssi-7 { - interrupts = <0 377 IRQ_TYPE_LEVEL_HIGH>; - dmas = <&audma0 0x0f>, <&audma1 0x10>, <&audma0 0x79>, <&audma1 0x7a>; - dma-names = "rx", "tx", "rxu", "txu"; + dmas = <&audma0 0x03>, <&audma1 0x04>; + dma-names = "rx", "tx"; }; + + ... + ssi8: ssi-8 { interrupts = <0 378 IRQ_TYPE_LEVEL_HIGH>; - dmas = <&audma0 0x11>, <&audma1 0x12>, <&audma0 0x7b>, <&audma1 0x7c>; - dma-names = "rx", "tx", "rxu", "txu"; + dmas = <&audma0 0x11>, <&audma1 0x12>; + dma-names = "rx", "tx"; }; ssi9: ssi-9 { interrupts = <0 379 IRQ_TYPE_LEVEL_HIGH>; - dmas = <&audma0 0x13>, <&audma1 0x14>, <&audma0 0x7d>, <&audma1 0x7e>; - dma-names = "rx", "tx", "rxu", "txu"; + dmas = <&audma0 0x13>, <&audma1 0x14>; + dma-names = "rx", "tx"; }; }; -- cgit v1.2.3-59-g8ed1b From cf704dc83fd6600758e98ac71769eaeb00dfc770 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Tue, 6 Nov 2018 05:21:22 +0000 Subject: ASoC: rsnd: add TDM Split mode support for Document This patch adds TDM Split mode support. rsnd driver is assuming audio-graph-scu-card is used for Sound Card. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- .../devicetree/bindings/sound/renesas,rsnd.txt | 91 ++++++++++++++++++++++ 1 file changed, 91 insertions(+) (limited to 'Documentation/devicetree') diff --git a/Documentation/devicetree/bindings/sound/renesas,rsnd.txt b/Documentation/devicetree/bindings/sound/renesas,rsnd.txt index 6ed1a3658ffd..453e8ec2ac78 100644 --- a/Documentation/devicetree/bindings/sound/renesas,rsnd.txt +++ b/Documentation/devicetree/bindings/sound/renesas,rsnd.txt @@ -188,6 +188,25 @@ In DMA mode, you can select not to use SSIU by using "no-busif" via SSI. SSIU handles BUSIF which will be used for TDM Split mode. This driver is assuming that audio-graph card will be used. +TDM Split mode merges 4 sounds. You can see 4 sound interface on system, +and these sounds will be merged SSIU/SSI. + + aplay -D plughw:0,0 xxxx.wav & + aplay -D plughw:0,1 xxxx.wav & + aplay -D plughw:0,2 xxxx.wav & + aplay -D plughw:0,3 xxxx.wav + + 2ch 8ch + [MEM] -> [SSIU 30] -+-> [SSIU 3] --> [Codec] + 2ch | + [MEM] -> [SSIU 31] -+ + 2ch | + [MEM] -> [SSIU 32] -+ + 2ch | + [MEM] -> [SSIU 33] -+ + +see "Example: simple sound card for TDM Split" + ============================================= * SSI (Serial Sound Interface) ============================================= @@ -648,6 +667,78 @@ rsnd_tdm: sound { }; }; +============================================= +Example: simple sound card for TDM Split +============================================= + +sound_card: sound { + compatible = "audio-graph-scu-card"; + prefix = "xxxx"; + routing = "xxxx Playback", "DAI0 Playback", + "xxxx Playback", "DAI1 Playback", + "xxxx Playback", "DAI2 Playback", + "xxxx Playback", "DAI3 Playback"; + convert-channels = <8>; /* TDM Split */ + + dais = <&rsnd_port0 /* playback ch1/ch2 */ + &rsnd_port1 /* playback ch3/ch4 */ + &rsnd_port2 /* playback ch5/ch6 */ + &rsnd_port3 /* playback ch7/ch8 */ + >; +}; + +audio-codec { + ... + port { + codec_0: endpoint@1 { + remote-endpoint = <&rsnd_ep0>; + }; + codec_1: endpoint@2 { + remote-endpoint = <&rsnd_ep1>; + }; + codec_2: endpoint@3 { + remote-endpoint = <&rsnd_ep2>; + }; + codec_3: endpoint@4 { + remote-endpoint = <&rsnd_ep3>; + }; + }; +}; + +&rcar_sound { + ... + ports { + rsnd_port0: port@0 { + rsnd_ep0: endpoint { + remote-endpoint = <&codec_0>; + ... + playback = <&ssiu30 &ssi3>; + }; + }; + rsnd_port1: port@1 { + rsnd_ep1: endpoint { + remote-endpoint = <&codec_1>; + ... + playback = <&ssiu31 &ssi3>; + }; + }; + rsnd_port2: port@2 { + rsnd_ep2: endpoint { + remote-endpoint = <&codec_2>; + ... + playback = <&ssiu32 &ssi3>; + }; + }; + rsnd_port3: port@3 { + rsnd_ep3: endpoint { + remote-endpoint = <&codec_3>; + ... + playback = <&ssiu33 &ssi3>; + }; + }; + }; +}; + ============================================= Example: simple sound card for Multi channel ============================================= -- cgit v1.2.3-59-g8ed1b From 8076de2244c6c1bf703c844134bfa13110b16349 Mon Sep 17 00:00:00 2001 From: Clément Péron Date: Wed, 14 Nov 2018 13:16:42 +0100 Subject: ASoC: dt-bindings: add bindings for AK4118 transceiver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Document the bindings for AK4118 S/PDIF transceiver Signed-off-by: Clément Péron Signed-off-by: Mark Brown --- Documentation/devicetree/bindings/sound/ak4118.txt | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/ak4118.txt (limited to 'Documentation/devicetree') diff --git a/Documentation/devicetree/bindings/sound/ak4118.txt b/Documentation/devicetree/bindings/sound/ak4118.txt new file mode 100644 index 000000000000..6e11a2f7404c --- /dev/null +++ b/Documentation/devicetree/bindings/sound/ak4118.txt @@ -0,0 +1,22 @@ +AK4118 S/PDIF transceiver + +This device supports I2C mode. + +Required properties: + +- compatible : "asahi-kasei,ak4118" +- reg : The I2C address of the device for I2C +- reset-gpios: A GPIO specifier for the reset pin +- irq-gpios: A GPIO specifier for the IRQ pin + +Example: + +&i2c { + ak4118: ak4118@13 { + #sound-dai-cells = <0>; + compatible = "asahi-kasei,ak4118"; + reg = <0x13>; + reset-gpios = <&gpio 0 GPIO_ACTIVE_LOW> + irq-gpios = <&gpio 1 GPIO_ACTIVE_HIGH>; + }; +}; -- cgit v1.2.3-59-g8ed1b From fd7de6370cb62b147185834d60069568a21acacd Mon Sep 17 00:00:00 2001 From: Kirill Marinushkin Date: Thu, 15 Nov 2018 08:12:53 +0100 Subject: ASoC: Add documentation for pcm3060 property out-single-ended Output of pcm3060 codec may be configured as single-ended or differential Signed-off-by: Kirill Marinushkin Signed-off-by: Mark Brown --- Documentation/devicetree/bindings/sound/pcm3060.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Documentation/devicetree') diff --git a/Documentation/devicetree/bindings/sound/pcm3060.txt b/Documentation/devicetree/bindings/sound/pcm3060.txt index 90fcb8523099..97de66932d44 100644 --- a/Documentation/devicetree/bindings/sound/pcm3060.txt +++ b/Documentation/devicetree/bindings/sound/pcm3060.txt @@ -9,9 +9,15 @@ Required properties: - reg : the I2C address of the device for I2C, the chip select number for SPI. +Optional properties: + +- ti,out-single-ended: "true" if output is single-ended; + "false" or not specified if output is differential. + Examples: pcm3060: pcm3060@46 { compatible = "ti,pcm3060"; reg = <0x46>; + ti,out-single-ended = "true"; }; -- cgit v1.2.3-59-g8ed1b From 276aa6d38e619d2bd61fbac71388a4da680e7ed5 Mon Sep 17 00:00:00 2001 From: Cheng-Yi Chiang Date: Fri, 16 Nov 2018 10:12:43 +0800 Subject: ASoC: rt5663: Add documentation for power supply support rt5663 codec driver will support setting CPVDD and AVDD power supply from device tree. Signed-off-by: Cheng-Yi Chiang Signed-off-by: Mark Brown --- Documentation/devicetree/bindings/sound/rt5663.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Documentation/devicetree') diff --git a/Documentation/devicetree/bindings/sound/rt5663.txt b/Documentation/devicetree/bindings/sound/rt5663.txt index 23386446c63d..2a55e9133408 100644 --- a/Documentation/devicetree/bindings/sound/rt5663.txt +++ b/Documentation/devicetree/bindings/sound/rt5663.txt @@ -10,6 +10,10 @@ Required properties: - interrupts : The CODEC's interrupt output. +- avdd-supply: Power supply for AVDD, providing 1.8V. + +- cpvdd-supply: Power supply for CPVDD, providing 3.5V. + Optional properties: - "realtek,dc_offset_l_manual" @@ -51,4 +55,6 @@ rt5663: codec@12 { compatible = "realtek,rt5663"; reg = <0x12>; interrupts = <7 IRQ_TYPE_EDGE_FALLING>; + avdd-supply = <&pp1800_a_alc5662>; + cpvdd-supply = <&pp3500_a_alc5662>; }; -- cgit v1.2.3-59-g8ed1b From f6c2d6026afe2f1e611bdec270e1f42af0a42f06 Mon Sep 17 00:00:00 2001 From: Hiroyuki Yokoyama Date: Wed, 21 Nov 2018 01:06:43 +0000 Subject: ASoC: rsnd: Add device tree support for r8a77995 Simply document new compat strings. There appears to be no need for a driver updates. Signed-off-by: Hiroyuki Yokoyama Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- Documentation/devicetree/bindings/sound/renesas,rsnd.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'Documentation/devicetree') diff --git a/Documentation/devicetree/bindings/sound/renesas,rsnd.txt b/Documentation/devicetree/bindings/sound/renesas,rsnd.txt index 453e8ec2ac78..47dc8190f0a7 100644 --- a/Documentation/devicetree/bindings/sound/renesas,rsnd.txt +++ b/Documentation/devicetree/bindings/sound/renesas,rsnd.txt @@ -277,6 +277,7 @@ Required properties: - "renesas,rcar_sound-r8a7796" (R-Car M3-W) - "renesas,rcar_sound-r8a77965" (R-Car M3-N) - "renesas,rcar_sound-r8a77990" (R-Car E3) + - "renesas,rcar_sound-r8a77995" (R-Car D3) - reg : Should contain the register physical address. required register is SRU/ADG/SSI if generation1 -- cgit v1.2.3-59-g8ed1b From 21dd30200e3d350fe420d23a2a00b17633a3d1a2 Mon Sep 17 00:00:00 2001 From: Chen-Yu Tsai Date: Thu, 22 Nov 2018 18:23:18 +0800 Subject: ASoC: dt-bindings: sun50i-codec-analog: Add headphone amp regulator supply On the Allwinner A64 SoC, the audio codec has a built-in headphone amplifier. This amplifier has a power supply separate from the rest of the analog audio circuitry. Add a regulator supply property to handle this. Signed-off-by: Chen-Yu Tsai Signed-off-by: Mark Brown --- Documentation/devicetree/bindings/sound/sun50i-codec-analog.txt | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Documentation/devicetree') diff --git a/Documentation/devicetree/bindings/sound/sun50i-codec-analog.txt b/Documentation/devicetree/bindings/sound/sun50i-codec-analog.txt index 4f8ad0e04d20..056a098495cc 100644 --- a/Documentation/devicetree/bindings/sound/sun50i-codec-analog.txt +++ b/Documentation/devicetree/bindings/sound/sun50i-codec-analog.txt @@ -4,9 +4,11 @@ Required properties: - compatible: must be one of the following compatibles: - "allwinner,sun50i-a64-codec-analog" - reg: must contain the registers location and length +- cpvdd-supply: Regulator supply for the headphone amplifier Example: codec_analog: codec-analog@1f015c0 { compatible = "allwinner,sun50i-a64-codec-analog"; reg = <0x01f015c0 0x4>; + cpvdd-supply = <®_eldo1>; }; -- cgit v1.2.3-59-g8ed1b From 8e84de031a11c4240f3654fd4c380542e358f5f6 Mon Sep 17 00:00:00 2001 From: Vasily Khoruzhick Date: Thu, 22 Nov 2018 18:23:20 +0800 Subject: ASoC: dt-bindings: add regulator property to simple amplifier Amplifier may have associated regulator, so add a property for it. Signed-off-by: Vasily Khoruzhick Signed-off-by: Chen-Yu Tsai Signed-off-by: Mark Brown --- Documentation/devicetree/bindings/sound/simple-amplifier.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Documentation/devicetree') diff --git a/Documentation/devicetree/bindings/sound/simple-amplifier.txt b/Documentation/devicetree/bindings/sound/simple-amplifier.txt index 8647edae7af0..7182ac4f1e65 100644 --- a/Documentation/devicetree/bindings/sound/simple-amplifier.txt +++ b/Documentation/devicetree/bindings/sound/simple-amplifier.txt @@ -4,9 +4,14 @@ Required properties: - compatible : "dioo,dio2125" or "simple-audio-amplifier" - enable-gpios : the gpio connected to the enable pin of the simple amplifier +Optional properties: +- VCC-supply : power supply for the device, as covered + in Documentation/devicetree/bindings/regulator/regulator.txt + Example: amp: analog-amplifier { compatible = "simple-audio-amplifier"; + VCC-supply = <®ulator>; enable-gpios = <&gpio GPIOH_3 0>; }; -- cgit v1.2.3-59-g8ed1b From f94b0f7f9246013ac158ae3adf194c1bfa1d1847 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Thu, 22 Nov 2018 00:55:24 +0000 Subject: ASoC: simple-scu-card: tidyup "prefix" parsing on Doc simple-scu-card.c is supporting "prefix" which is used to avoid DAI naming conflict when CPU/Codec matching. But, sound card might have multi sub-devices, and each codec might need each prefix. Now, ASoC is supporting snd_soc_of_parse_node_prefix(), let's support it on audio-graph-scu-card, too. It is keeping existing DT style. It can't support each codec's prefix if sound card had multi sub-devices without this patch. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- Documentation/devicetree/bindings/sound/simple-scu-card.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Documentation/devicetree') diff --git a/Documentation/devicetree/bindings/sound/simple-scu-card.txt b/Documentation/devicetree/bindings/sound/simple-scu-card.txt index 32f8dbce5241..3a2f71616cda 100644 --- a/Documentation/devicetree/bindings/sound/simple-scu-card.txt +++ b/Documentation/devicetree/bindings/sound/simple-scu-card.txt @@ -75,7 +75,6 @@ sound { simple-audio-card,bitclock-master = <&dpcmcpu>; simple-audio-card,frame-master = <&dpcmcpu>; - simple-audio-card,prefix = "ak4642"; simple-audio-card,routing = "ak4642 Playback", "DAI0 Playback", "ak4642 Playback", "DAI1 Playback"; @@ -88,6 +87,7 @@ sound { }; codec { + prefix = "ak4642"; sound-dai = <&ak4643>; clocks = <&audio_clock>; }; -- cgit v1.2.3-59-g8ed1b From 264d15035eac5e779788c435bafb5c8319ffed81 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Thu, 22 Nov 2018 00:55:54 +0000 Subject: ASoC: audio-graph-scu-card: tidyup "prefix" parsing on Doc audio-graph-scu-card.c is supporting "prefix" which is used to avoid DAI naming conflict when CPU/Codec matching. But, sound card might have multi sub-devices, and each codec might need each prefix. Now, ASoC is supporting snd_soc_of_parse_node_prefix(), let's support it on audio-graph-scu-card, too. It is keeping existing DT style. It can't support each codec's prefix if sound card had multi sub-devices without this patch. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- Documentation/devicetree/bindings/sound/audio-graph-scu-card.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Documentation/devicetree') diff --git a/Documentation/devicetree/bindings/sound/audio-graph-scu-card.txt b/Documentation/devicetree/bindings/sound/audio-graph-scu-card.txt index 441dd6f29df1..a3610888e121 100644 --- a/Documentation/devicetree/bindings/sound/audio-graph-scu-card.txt +++ b/Documentation/devicetree/bindings/sound/audio-graph-scu-card.txt @@ -77,7 +77,6 @@ Example 2. 2 CPU 1 Codec (Mixing) compatible = "audio-graph-scu-card"; label = "sound-card"; - prefix = "codec"; routing = "codec Playback", "DAI0 Playback", "codec Playback", "DAI1 Playback", "DAI0 Capture", "codec Capture"; @@ -90,6 +89,7 @@ Example 2. 2 CPU 1 Codec (Mixing) audio-codec { ... + audio-graph-card,prefix = "codec"; port { codec_endpoint0: endpoint { remote-endpoint = <&cpu_endpoint0>; -- cgit v1.2.3-59-g8ed1b From df976517733e34e9c12828357c19bafea5c90cf5 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Thu, 22 Nov 2018 00:56:41 +0000 Subject: ASoC: audio-graph-scu-card: tidyup "convert-rate/channels" parsing on Doc audio-graph-scu-card.c is supporting "convert-rate/channels" which is used for DPCM. But, sound card might have multi codecs, and each codec might need each convert-rate/channels. This patch supports each codec's convert-rate/channles support. top node convert-rate/channels will overwrite settings if exist. It can't support each codec's convert-rate/channels if sound card had multi codecs without this patch. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- Documentation/devicetree/bindings/sound/audio-graph-scu-card.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Documentation/devicetree') diff --git a/Documentation/devicetree/bindings/sound/audio-graph-scu-card.txt b/Documentation/devicetree/bindings/sound/audio-graph-scu-card.txt index a3610888e121..62d42768a00b 100644 --- a/Documentation/devicetree/bindings/sound/audio-graph-scu-card.txt +++ b/Documentation/devicetree/bindings/sound/audio-graph-scu-card.txt @@ -80,7 +80,6 @@ Example 2. 2 CPU 1 Codec (Mixing) routing = "codec Playback", "DAI0 Playback", "codec Playback", "DAI1 Playback", "DAI0 Capture", "codec Capture"; - convert-rate = <48000>; dais = <&cpu_port0 &cpu_port1>; @@ -90,6 +89,7 @@ Example 2. 2 CPU 1 Codec (Mixing) ... audio-graph-card,prefix = "codec"; + audio-graph-card,convert-rate = <48000>; port { codec_endpoint0: endpoint { remote-endpoint = <&cpu_endpoint0>; -- cgit v1.2.3-59-g8ed1b From 7121779fec95ce106ed3a7948d265809bd4e849b Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 26 Nov 2018 01:17:01 +0000 Subject: ASoC: rsnd: tidyup for SSIU subnode commit da48a6eb82ea2 ("ASoC: rsnd: add SSIU BUSIF support for Document") updated Documentation for SSIU, but 1) we want to keep old/deprecated DMA description, 2) it is missing SSIU subnode properties. This patch tidyup these Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- Documentation/devicetree/bindings/sound/renesas,rsnd.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Documentation/devicetree') diff --git a/Documentation/devicetree/bindings/sound/renesas,rsnd.txt b/Documentation/devicetree/bindings/sound/renesas,rsnd.txt index 47dc8190f0a7..4d19d2bd6286 100644 --- a/Documentation/devicetree/bindings/sound/renesas,rsnd.txt +++ b/Documentation/devicetree/bindings/sound/renesas,rsnd.txt @@ -327,8 +327,13 @@ SSI subnode properties: - no-busif : BUSIF is not ussed when [mem -> SSI] via DMA case - dma : Should contain Audio DMAC entry - dma-names : SSI case "rx" (=playback), "tx" (=capture) + Deprecated: see SSIU subnode properties SSIU case "rxu" (=playback), "txu" (=capture) +SSIU subnode properties: +- dma : Should contain Audio DMAC entry +- dma-names : "rx" (=playback), "tx" (=capture) + SRC subnode properties: - dma : Should contain Audio DMAC entry - dma-names : "rx" (=playback), "tx" (=capture) -- cgit v1.2.3-59-g8ed1b From a3641b30c19b93b1298028a7210b55145e70056c Mon Sep 17 00:00:00 2001 From: Peter Ujfalusi Date: Fri, 16 Nov 2018 15:41:40 +0200 Subject: ASoC: davinci-mcasp: Document dismod optional property The dismod property can be used to specify the drive on level of inactive TX slots. Signed-off-by: Peter Ujfalusi Signed-off-by: Mark Brown --- Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Documentation/devicetree') diff --git a/Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt b/Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt index 46bc9829c71a..b279b6072bd5 100644 --- a/Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt +++ b/Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt @@ -30,6 +30,11 @@ Optional properties: - ti,hwmods : Must be "mcasp", n is controller instance starting 0 - tx-num-evt : FIFO levels. - rx-num-evt : FIFO levels. +- dismod : Specify the drive on TX pin during inactive slots + 0 : 3-state + 2 : logic low + 3 : logic high + Defaults to 'logic low' when the property is not present - sram-size-playback : size of sram to be allocated during playback - sram-size-capture : size of sram to be allocated during capture - interrupts : Interrupt numbers for McASP -- cgit v1.2.3-59-g8ed1b From 22cc062c4dfb16330fe18e8d7e155d733fd59e61 Mon Sep 17 00:00:00 2001 From: Peter Ujfalusi Date: Wed, 14 Nov 2018 14:46:30 +0200 Subject: dt-bindings: sound: omap-mcpdm: Update documentation for pdmclk McPDM module receives it's functional clock from external source. This clock is the pdmclk provided by the twl6040 audio IC. If the clock is not available all register accesses to McPDM fails and the module is not operational. Signed-off-by: Peter Ujfalusi Acked-by: Rob Herring Signed-off-by: Mark Brown --- Documentation/devicetree/bindings/sound/omap-mcpdm.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'Documentation/devicetree') diff --git a/Documentation/devicetree/bindings/sound/omap-mcpdm.txt b/Documentation/devicetree/bindings/sound/omap-mcpdm.txt index 5f4e68ca228c..ff98a0cb5b3f 100644 --- a/Documentation/devicetree/bindings/sound/omap-mcpdm.txt +++ b/Documentation/devicetree/bindings/sound/omap-mcpdm.txt @@ -7,6 +7,8 @@ Required properties: ; - interrupts: Interrupt number for McPDM - ti,hwmods: Name of the hwmod associated to the McPDM +- clocks: phandle for the pdmclk provider, likely <&twl6040> +- clock-names: Must be "pdmclk" Example: @@ -18,3 +20,11 @@ mcpdm: mcpdm@40132000 { interrupt-parent = <&gic>; ti,hwmods = "mcpdm"; }; + +In board DTS file the pdmclk needs to be added: + +&mcpdm { + clocks = <&twl6040>; + clock-names = "pdmclk"; + status = "okay"; +}; -- cgit v1.2.3-59-g8ed1b From bc0a7dbc5a54a06b925064adba8b07d65acf8718 Mon Sep 17 00:00:00 2001 From: Jenny TC Date: Wed, 28 Nov 2018 12:22:45 +0530 Subject: ASoC: dmic: introduce mode switch delay On startup, applications such as PulseAudio or CRAS enable playback or capture on all PCM devices to verify that configurations are correct, and close them immediately. For DMICs, this can result in the clock being turned off very quickly, which may not compatible with internal state machine transition requirements. This patch add a mode-switch delay which will prevent the clock from being turned off without complying with manufacturer timing specifications. While the DMIC clock may be controlled at a lower level, be it with hardware or firmware, applying the delay during the STOP_TRIGGER phase ensures that there is no race condition, e.g. with the hardware/firmware turning off the clock earlier Signed-off-by: Sathyanarayana Nujella Signed-off-by: Jairaj Arava Signed-off-by: Harsha Priya Signed-off-by: Jenny TC Signed-off-by: Mark Brown --- Documentation/devicetree/bindings/sound/dmic.txt | 2 ++ sound/soc/codecs/dmic.c | 35 ++++++++++++++++++++++++ 2 files changed, 37 insertions(+) (limited to 'Documentation/devicetree') diff --git a/Documentation/devicetree/bindings/sound/dmic.txt b/Documentation/devicetree/bindings/sound/dmic.txt index e957b4136716..32e871037269 100644 --- a/Documentation/devicetree/bindings/sound/dmic.txt +++ b/Documentation/devicetree/bindings/sound/dmic.txt @@ -9,6 +9,7 @@ Optional properties: - dmicen-gpios: GPIO specifier for dmic to control start and stop - num-channels: Number of microphones on this DAI - wakeup-delay-ms: Delay (in ms) after enabling the DMIC + - modeswitch-delay-ms: Delay (in ms) to complete DMIC mode switch Example node: @@ -17,4 +18,5 @@ Example node: dmicen-gpios = <&gpio4 3 GPIO_ACTIVE_HIGH>; num-channels = <1>; wakeup-delay-ms <50>; + modeswitch-delay-ms <35>; }; diff --git a/sound/soc/codecs/dmic.c b/sound/soc/codecs/dmic.c index 71322e0410ee..f4eb0a438a3a 100644 --- a/sound/soc/codecs/dmic.c +++ b/sound/soc/codecs/dmic.c @@ -30,9 +30,36 @@ #include #include +#define MAX_MODESWITCH_DELAY 70 +static int modeswitch_delay; +module_param(modeswitch_delay, uint, 0644); + struct dmic { struct gpio_desc *gpio_en; int wakeup_delay; + /* Delay after DMIC mode switch */ + int modeswitch_delay; +}; + +int dmic_daiops_trigger(struct snd_pcm_substream *substream, + int cmd, struct snd_soc_dai *dai) +{ + struct snd_soc_component *component = dai->component; + struct dmic *dmic = snd_soc_component_get_drvdata(component); + + switch (cmd) { + case SNDRV_PCM_TRIGGER_STOP: + if (dmic->modeswitch_delay) + mdelay(dmic->modeswitch_delay); + + break; + } + + return 0; +} + +static const struct snd_soc_dai_ops dmic_dai_ops = { + .trigger = dmic_daiops_trigger, }; static int dmic_aif_event(struct snd_soc_dapm_widget *w, @@ -68,6 +95,7 @@ static struct snd_soc_dai_driver dmic_dai = { | SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S16_LE, }, + .ops = &dmic_dai_ops, }; static int dmic_component_probe(struct snd_soc_component *component) @@ -85,6 +113,13 @@ static int dmic_component_probe(struct snd_soc_component *component) device_property_read_u32(component->dev, "wakeup-delay-ms", &dmic->wakeup_delay); + device_property_read_u32(component->dev, "modeswitch-delay-ms", + &dmic->modeswitch_delay); + if (modeswitch_delay) + dmic->modeswitch_delay = modeswitch_delay; + + if (dmic->modeswitch_delay > MAX_MODESWITCH_DELAY) + dmic->modeswitch_delay = MAX_MODESWITCH_DELAY; snd_soc_component_set_drvdata(component, dmic); -- cgit v1.2.3-59-g8ed1b From 1286f930a0d7447748b398564d14e84ea5dfe890 Mon Sep 17 00:00:00 2001 From: Lubomir Rintel Date: Mon, 3 Dec 2018 12:47:28 +0100 Subject: ASoC: dt-bindings: use a generic node name for rt5631 The example should follow the practice or using a generic node name instead of the precise programming model, as recommended by the DTSpec. Signed-off-by: Lubomir Rintel Signed-off-by: Mark Brown --- Documentation/devicetree/bindings/sound/rt5631.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Documentation/devicetree') diff --git a/Documentation/devicetree/bindings/sound/rt5631.txt b/Documentation/devicetree/bindings/sound/rt5631.txt index 92b986ca337b..56bc85232c49 100644 --- a/Documentation/devicetree/bindings/sound/rt5631.txt +++ b/Documentation/devicetree/bindings/sound/rt5631.txt @@ -35,14 +35,14 @@ Pins on the device (for linking into audio routes): Example: -alc5631: alc5631@1a { +alc5631: audio-codec@1a { compatible = "realtek,alc5631"; reg = <0x1a>; }; or -rt5631: rt5631@1a { +rt5631: audio-codec@1a { compatible = "realtek,rt5631"; reg = <0x1a>; }; -- cgit v1.2.3-59-g8ed1b From eab8e354a8c7b4496cb68a6f5adc5ec3a1f59151 Mon Sep 17 00:00:00 2001 From: Daniel Mack Date: Thu, 6 Dec 2018 13:24:25 +0100 Subject: ASoC: dt-bindings: cs4270: use 'reset-gpios' rather than 'reset-gpio' Bindings should use 'reset-gpios', not 'reset-gpio'. The driver needs to switch to the gpiod consume API to handle this correctly. Signed-off-by: Daniel Mack Signed-off-by: Mark Brown --- Documentation/devicetree/bindings/sound/cs4270.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Documentation/devicetree') diff --git a/Documentation/devicetree/bindings/sound/cs4270.txt b/Documentation/devicetree/bindings/sound/cs4270.txt index 6b222f9b8ef5..c33770ec4c3c 100644 --- a/Documentation/devicetree/bindings/sound/cs4270.txt +++ b/Documentation/devicetree/bindings/sound/cs4270.txt @@ -10,8 +10,8 @@ Required properties: Optional properties: - - reset-gpio : a GPIO spec for the reset pin. If specified, it will be - deasserted before communication to the codec starts. + - reset-gpios : a GPIO spec for the reset pin. If specified, it will be + deasserted before communication to the codec starts. Example: -- cgit v1.2.3-59-g8ed1b From db097f95b4b81c5371928449706fabfa576cd65c Mon Sep 17 00:00:00 2001 From: Daniel Mack Date: Thu, 6 Dec 2018 13:24:56 +0100 Subject: ASoC: dt-bindings: ak4104: use 'reset-gpios' rather than 'reset-gpio' Bindings should use 'reset-gpios', not 'reset-gpio'. The driver needs to switch to the gpiod consume API to handle this correctly. Signed-off-by: Daniel Mack Signed-off-by: Mark Brown --- Documentation/devicetree/bindings/sound/ak4104.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Documentation/devicetree') diff --git a/Documentation/devicetree/bindings/sound/ak4104.txt b/Documentation/devicetree/bindings/sound/ak4104.txt index deca5e18f304..ae5f7f057dc3 100644 --- a/Documentation/devicetree/bindings/sound/ak4104.txt +++ b/Documentation/devicetree/bindings/sound/ak4104.txt @@ -12,8 +12,8 @@ Required properties: Optional properties: - - reset-gpio : a GPIO spec for the reset pin. If specified, it will be - deasserted before communication to the device starts. + - reset-gpios : a GPIO spec for the reset pin. If specified, it will be + deasserted before communication to the device starts. Example: -- cgit v1.2.3-59-g8ed1b From f0b3f8418711d2e482bd57d6c0b5790947ca6863 Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Thu, 13 Dec 2018 08:36:38 -0200 Subject: ASoC: fsl-sai: Fix typo in "transmitter" Fix the spelling of "transmitter". Signed-off-by: Fabio Estevam Signed-off-by: Mark Brown --- Documentation/devicetree/bindings/sound/fsl-sai.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Documentation/devicetree') diff --git a/Documentation/devicetree/bindings/sound/fsl-sai.txt b/Documentation/devicetree/bindings/sound/fsl-sai.txt index dd9e59738e08..2e726b983845 100644 --- a/Documentation/devicetree/bindings/sound/fsl-sai.txt +++ b/Documentation/devicetree/bindings/sound/fsl-sai.txt @@ -35,13 +35,13 @@ Required properties: - fsl,sai-synchronous-rx: This is a boolean property. If present, indicating that SAI will work in the synchronous mode (sync Tx - with Rx) which means both the transimitter and the + with Rx) which means both the transmitter and the receiver will send and receive data by following receiver's bit clocks and frame sync clocks. - fsl,sai-asynchronous: This is a boolean property. If present, indicating that SAI will work in the asynchronous mode, which - means both transimitter and receiver will send and + means both transmitter and receiver will send and receive data by following their own bit clocks and frame sync clocks separately. @@ -58,8 +58,8 @@ Optional properties (for mx6ul): Note: - If both fsl,sai-asynchronous and fsl,sai-synchronous-rx are absent, the default synchronous mode (sync Rx with Tx) will be used, which means both - transimitter and receiver will send and receive data by following clocks - of transimitter. + transmitter and receiver will send and receive data by following clocks + of transmitter. - fsl,sai-asynchronous and fsl,sai-synchronous-rx are exclusive. Example: -- cgit v1.2.3-59-g8ed1b From 18dc4665fb6f3bb617c2e6d7da3f19586d06ab17 Mon Sep 17 00:00:00 2001 From: Jerome Brunet Date: Tue, 11 Dec 2018 14:47:11 +0100 Subject: ASoC: meson: add axg spdif input DT binding documentation Add the DT binding documentation for axg's SPDIF input. Signed-off-by: Jerome Brunet Signed-off-by: Mark Brown --- .../bindings/sound/amlogic,axg-spdifin.txt | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/amlogic,axg-spdifin.txt (limited to 'Documentation/devicetree') diff --git a/Documentation/devicetree/bindings/sound/amlogic,axg-spdifin.txt b/Documentation/devicetree/bindings/sound/amlogic,axg-spdifin.txt new file mode 100644 index 000000000000..2e6cb7d9b202 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/amlogic,axg-spdifin.txt @@ -0,0 +1,22 @@ +* Amlogic Audio SPDIF Input + +Required properties: +- compatible: 'amlogic,axg-spdifin' +- interrupts: interrupt specifier for the spdif input. +- clocks: list of clock phandle, one for each entry clock-names. +- clock-names: should contain the following: + * "pclk" : peripheral clock. + * "refclk" : spdif input reference clock +- #sound-dai-cells: must be 0. + +Example on the A113 SoC: + +spdifin: audio-controller@400 { + compatible = "amlogic,axg-spdifin"; + reg = <0x0 0x400 0x0 0x30>; + #sound-dai-cells = <0>; + interrupts = ; + clocks = <&clkc_audio AUD_CLKID_SPDIFIN>, + <&clkc_audio AUD_CLKID_SPDIFIN_CLK>; + clock-names = "pclk", "refclk"; +}; -- cgit v1.2.3-59-g8ed1b From 644c2dcf2f2ea113602aa24170d3203942d3d140 Mon Sep 17 00:00:00 2001 From: Maruthi Srinivas Bayyavarapu Date: Sat, 8 Dec 2018 00:02:36 +0530 Subject: dt-bindings: ASoC: xlnx, i2s: Document i2s bindings Added documentation for I2S IP core DT bindings. Signed-off-by: Maruthi Srinivas Bayyavarapu Signed-off-by: Mark Brown --- .../devicetree/bindings/sound/xlnx,i2s.txt | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/xlnx,i2s.txt (limited to 'Documentation/devicetree') diff --git a/Documentation/devicetree/bindings/sound/xlnx,i2s.txt b/Documentation/devicetree/bindings/sound/xlnx,i2s.txt new file mode 100644 index 000000000000..5e7c7d5bb60a --- /dev/null +++ b/Documentation/devicetree/bindings/sound/xlnx,i2s.txt @@ -0,0 +1,28 @@ +Device-Tree bindings for Xilinx I2S PL block + +The IP supports I2S based playback/capture audio + +Required property: + - compatible: "xlnx,i2s-transmitter-1.0" for playback and + "xlnx,i2s-receiver-1.0" for capture + +Required property common to both I2S playback and capture: + - reg: Base address and size of the IP core instance. + - xlnx,dwidth: sample data width. Can be any of 16, 24. + - xlnx,num-channels: Number of I2S streams. Can be any of 1, 2, 3, 4. + supported channels = 2 * xlnx,num-channels + +Example: + + i2s_receiver@a0080000 { + compatible = "xlnx,i2s-receiver-1.0"; + reg = <0x0 0xa0080000 0x0 0x10000>; + xlnx,dwidth = <0x18>; + xlnx,num-channels = <1>; + }; + i2s_transmitter@a0090000 { + compatible = "xlnx,i2s-transmitter-1.0"; + reg = <0x0 0xa0090000 0x0 0x10000>; + xlnx,dwidth = <0x18>; + xlnx,num-channels = <1>; + }; -- cgit v1.2.3-59-g8ed1b From 91a531e48b20677c1f820f3bbd4237abd8144919 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Fri, 14 Dec 2018 11:32:06 +0900 Subject: ASoC: audio-graph-card: merge audio-graph-scu-card on Doc audio-graph-card and audio-graph-scu-card are very similar driver, but the former is supporting normal sound card, the latter is supporting DPCM sound card. We couldn't use normal sound and DPCM sound in same sound card by audio-graph-card. This patch merges both feature into it on Documentation. Now we can use both feature on same driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- .../devicetree/bindings/sound/audio-graph-card.txt | 205 +++++++++++++++++++++ 1 file changed, 205 insertions(+) (limited to 'Documentation/devicetree') diff --git a/Documentation/devicetree/bindings/sound/audio-graph-card.txt b/Documentation/devicetree/bindings/sound/audio-graph-card.txt index 7e63e53a901c..269682619a70 100644 --- a/Documentation/devicetree/bindings/sound/audio-graph-card.txt +++ b/Documentation/devicetree/bindings/sound/audio-graph-card.txt @@ -32,7 +32,9 @@ Required properties: Optional properties: - pa-gpios: GPIO used to control external amplifier. +----------------------- Example: Single DAI case +----------------------- sound_card { compatible = "audio-graph-card"; @@ -61,7 +63,9 @@ Example: Single DAI case }; }; +----------------------- Example: Multi DAI case +----------------------- sound-card { compatible = "audio-graph-card"; @@ -130,3 +134,204 @@ Example: Multi DAI case }; }; + +----------------------- +Example: Sampling Rate Conversion +----------------------- + + sound_card { + compatible = "audio-graph-card"; + + label = "sound-card"; + prefix = "codec"; + routing = "codec Playback", "DAI0 Playback", + "DAI0 Capture", "codec Capture"; + convert-rate = <48000>; + + dais = <&cpu_port>; + }; + + audio-codec { + ... + port { + codec_endpoint: endpoint { + remote-endpoint = <&cpu_endpoint>; + }; + }; + }; + + dai-controller { + ... + cpu_port: port { + cpu_endpoint: endpoint { + remote-endpoint = <&codec_endpoint>; + + dai-format = "left_j"; + ... + }; + }; + }; + +----------------------- +Example: 2 CPU 1 Codec (Mixing) +----------------------- + + sound_card { + compatible = "audio-graph-card"; + + label = "sound-card"; + routing = "codec Playback", "DAI0 Playback", + "codec Playback", "DAI1 Playback", + "DAI0 Capture", "codec Capture"; + + dais = <&cpu_port>; + }; + + audio-codec { + ... + + audio-graph-card,prefix = "codec"; + audio-graph-card,convert-rate = <48000>; + port { + reg = <0>; + codec_endpoint0: endpoint@0 { + remote-endpoint = <&cpu_endpoint0>; + }; + codec_endpoint1: endpoint@1 { + remote-endpoint = <&cpu_endpoint1>; + }; + }; + }; + + dai-controller { + ... + cpu_port: port { + cpu_endpoint0: endpoint@0 { + remote-endpoint = <&codec_endpoint0>; + + dai-format = "left_j"; + ... + }; + cpu_endpoint1: endpoint@1 { + remote-endpoint = <&codec_endpoint1>; + + dai-format = "left_j"; + ... + }; + }; + }; + +----------------------- +Example: Multi DAI with DPCM +----------------------- + + CPU0 ------ ak4613 + CPU1 ------ HDMI + CPU2 ------ PCM3168A-p /* DPCM 1ch/2ch */ + CPU3 --/ /* DPCM 3ch/4ch */ + CPU4 --/ /* DPCM 5ch/6ch */ + CPU5 --/ /* DPCM 7ch/8ch */ + CPU6 ------ PCM3168A-c + + sound_card: sound { + compatible = "audio-graph-card"; + + label = "sound-card"; + + routing = "pcm3168a Playback", "DAI2 Playback", + "pcm3168a Playback", "DAI3 Playback", + "pcm3168a Playback", "DAI4 Playback", + "pcm3168a Playback", "DAI5 Playback"; + + dais = <&snd_port0 /* ak4613 */ + &snd_port1 /* HDMI0 */ + &snd_port2 /* pcm3168a playback */ + &snd_port3 /* pcm3168a capture */ + >; + }; + + ak4613: codec@10 { + ... + port { + ak4613_endpoint: endpoint { + remote-endpoint = <&rsnd_endpoint0>; + }; + }; + }; + + pcm3168a: audio-codec@44 { + ... + audio-graph-card,prefix = "pcm3168a"; + audio-graph-card,convert-channels = <8>; /* TDM Split */ + ports { + port@0 { + reg = <0>; + pcm3168a_endpoint_p1: endpoint@1 { + remote-endpoint = <&rsnd_endpoint2>; + ... + }; + pcm3168a_endpoint_p2: endpoint@2 { + remote-endpoint = <&rsnd_endpoint3>; + ... + }; + pcm3168a_endpoint_p3: endpoint@3 { + remote-endpoint = <&rsnd_endpoint4>; + ... + }; + pcm3168a_endpoint_p4: endpoint@4 { + remote-endpoint = <&rsnd_endpoint5>; + ... + }; + }; + port@1 { + reg = <1>; + pcm3168a_endpoint_c: endpoint { + remote-endpoint = <&rsnd_endpoint6>; + ... + }; + }; + }; + }; + + &sound { + ports { + snd_port0: port@0 { + rsnd_endpoint0: endpoint { + remote-endpoint = <&ak4613_endpoint>; + ... + }; + }; + snd_port1: port@1 { + rsnd_endpoint1: endpoint { + remote-endpoint = <&dw_hdmi0_snd_in>; + ... + }; + }; + snd_port2: port@2 { + #address-cells = <1>; + #size-cells = <0>; + rsnd_endpoint2: endpoint@2 { + remote-endpoint = <&pcm3168a_endpoint_p1>; + ... + }; + rsnd_endpoint3: endpoint@3 { + remote-endpoint = <&pcm3168a_endpoint_p2>; + ... + }; + rsnd_endpoint4: endpoint@4 { + remote-endpoint = <&pcm3168a_endpoint_p3>; + ... + }; + rsnd_endpoint5: endpoint@5 { + remote-endpoint = <&pcm3168a_endpoint_p4>; + ... + }; + }; + snd_port3: port@6 { + rsnd_endpoint6: endpoint { + remote-endpoint = <&pcm3168a_endpoint_c>; + ... + }; + }; + }; + }; -- cgit v1.2.3-59-g8ed1b From c4e8ebb9f2624da8302b6683ecb5ead7108ccb79 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Fri, 14 Dec 2018 11:35:05 +0900 Subject: ASoC: simple-card: merge simple-scu-card on Doc simple-card and simple-scu-card are very similar driver, but the former is supporting normal sound card, the latter is supporting DPCM sound card. We couldn't use normal sound and DPCM sound in same time by one sound card. This patch merges both sound card into simple-card. Now we can use both feature on same driver. simple-card is now supporting .compatible = "simple-scu-audio-card". Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- .../devicetree/bindings/sound/simple-card.txt | 137 +++++++++++++++++++++ 1 file changed, 137 insertions(+) (limited to 'Documentation/devicetree') diff --git a/Documentation/devicetree/bindings/sound/simple-card.txt b/Documentation/devicetree/bindings/sound/simple-card.txt index a4c72d09cd45..4629c8f8a6b6 100644 --- a/Documentation/devicetree/bindings/sound/simple-card.txt +++ b/Documentation/devicetree/bindings/sound/simple-card.txt @@ -95,7 +95,9 @@ Optional CPU/CODEC subnodes properties: initialization. It is useful for some aCPUs with fixed clocks. +------------------------------------------- Example 1 - single DAI link: +------------------------------------------- sound { compatible = "simple-audio-card"; @@ -138,7 +140,9 @@ sh_fsi2: sh_fsi2@ec230000 { interrupts = <0 146 0x4>; }; +------------------------------------------- Example 2 - many DAI links: +------------------------------------------- sound { compatible = "simple-audio-card"; @@ -176,8 +180,10 @@ sound { }; }; +------------------------------------------- Example 3 - route audio from IMX6 SSI2 through TLV320DAC3100 codec through TPA6130A2 amplifier to headphones: +------------------------------------------- &i2c0 { codec: tlv320dac3100@18 { @@ -210,3 +216,134 @@ sound { clocks = ... }; }; + +------------------------------------------- +Example 4. Sampling Rate Conversion +------------------------------------------- + +sound { + compatible = "simple-audio-card"; + + simple-audio-card,name = "rsnd-ak4643"; + simple-audio-card,format = "left_j"; + simple-audio-card,bitclock-master = <&sndcodec>; + simple-audio-card,frame-master = <&sndcodec>; + + simple-audio-card,convert-rate = <48000>; + + simple-audio-card,prefix = "ak4642"; + simple-audio-card,routing = "ak4642 Playback", "DAI0 Playback", + "DAI0 Capture", "ak4642 Capture"; + + sndcpu: simple-audio-card,cpu { + sound-dai = <&rcar_sound>; + }; + + sndcodec: simple-audio-card,codec { + sound-dai = <&ak4643>; + system-clock-frequency = <11289600>; + }; +}; + +------------------------------------------- +Example 5. 2 CPU 1 Codec (Mixing) +------------------------------------------- +sound { + compatible = "simple-audio-card"; + + simple-audio-card,name = "rsnd-ak4643"; + simple-audio-card,format = "left_j"; + simple-audio-card,bitclock-master = <&dpcmcpu>; + simple-audio-card,frame-master = <&dpcmcpu>; + + simple-audio-card,routing = "ak4642 Playback", "DAI0 Playback", + "ak4642 Playback", "DAI1 Playback"; + + dpcmcpu: cpu@0 { + sound-dai = <&rcar_sound 0>; + }; + + cpu@1 { + sound-dai = <&rcar_sound 1>; + }; + + codec { + prefix = "ak4642"; + sound-dai = <&ak4643>; + clocks = <&audio_clock>; + }; +}; + +------------------------------------------- +Example 6 - many DAI links with DPCM: +------------------------------------------- + +CPU0 ------ ak4613 +CPU1 ------ PCM3168A-p /* DPCM 1ch/2ch */ +CPU2 --/ /* DPCM 3ch/4ch */ +CPU3 --/ /* DPCM 5ch/6ch */ +CPU4 --/ /* DPCM 7ch/8ch */ +CPU5 ------ PCM3168A-c + +sound { + compatible = "simple-audio-card"; + + simple-audio-card,routing = + "pcm3168a Playback", "DAI1 Playback", + "pcm3168a Playback", "DAI2 Playback", + "pcm3168a Playback", "DAI3 Playback", + "pcm3168a Playback", "DAI4 Playback"; + + simple-audio-card,dai-link@0 { + format = "left_j"; + bitclock-master = <&sndcpu0>; + frame-master = <&sndcpu0>; + + sndcpu0: cpu { + sound-dai = <&rcar_sound 0>; + }; + codec { + sound-dai = <&ak4613>; + }; + }; + simple-audio-card,dai-link@1 { + format = "i2s"; + bitclock-master = <&sndcpu1>; + frame-master = <&sndcpu1>; + + convert-channels = <8>; /* TDM Split */ + + sndcpu1: cpu@0 { + sound-dai = <&rcar_sound 1>; + }; + cpu@1 { + sound-dai = <&rcar_sound 2>; + }; + cpu@2 { + sound-dai = <&rcar_sound 3>; + }; + cpu@3 { + sound-dai = <&rcar_sound 4>; + }; + codec { + mclk-fs = <512>; + prefix = "pcm3168a"; + dai-tdm-slot-num = <8>; + sound-dai = <&pcm3168a 0>; + }; + }; + simple-audio-card,dai-link@2 { + format = "i2s"; + bitclock-master = <&sndcpu2>; + frame-master = <&sndcpu2>; + + sndcpu2: cpu { + sound-dai = <&rcar_sound 5>; + }; + codec { + mclk-fs = <512>; + prefix = "pcm3168a"; + sound-dai = <&pcm3168a 1>; + }; + }; +}; -- cgit v1.2.3-59-g8ed1b From ae38d267417291db40de7439f2b0b690ab615f0e Mon Sep 17 00:00:00 2001 From: Fabrizio Castro Date: Thu, 13 Dec 2018 20:20:06 +0000 Subject: ASoC: rsnd: Add r8a774c0 support Document RZ/G2E (R8A774C0) SoC bindings. Signed-off-by: Fabrizio Castro Acked-by: Kuninori Morimoto Signed-off-by: Mark Brown --- Documentation/devicetree/bindings/sound/renesas,rsnd.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'Documentation/devicetree') diff --git a/Documentation/devicetree/bindings/sound/renesas,rsnd.txt b/Documentation/devicetree/bindings/sound/renesas,rsnd.txt index 4d19d2bd6286..648d43e1b1e9 100644 --- a/Documentation/devicetree/bindings/sound/renesas,rsnd.txt +++ b/Documentation/devicetree/bindings/sound/renesas,rsnd.txt @@ -267,6 +267,7 @@ Required properties: - "renesas,rcar_sound-r8a7744" (RZ/G1N) - "renesas,rcar_sound-r8a7745" (RZ/G1E) - "renesas,rcar_sound-r8a774a1" (RZ/G2M) + - "renesas,rcar_sound-r8a774c0" (RZ/G2E) - "renesas,rcar_sound-r8a7778" (R-Car M1A) - "renesas,rcar_sound-r8a7779" (R-Car H1) - "renesas,rcar_sound-r8a7790" (R-Car H2) -- cgit v1.2.3-59-g8ed1b From ee23cf37fd586769febab95e2fbbbb50da5f9f2d Mon Sep 17 00:00:00 2001 From: Srinivas Kandagatla Date: Thu, 15 Nov 2018 18:13:22 +0000 Subject: ASoC: q6asm-dai: dt-bindings: Add support to compress dais This patch adds board specific bindings required for dais, In particular for compressed dais and dai direction. Board specific setup involves setting up some of dais as compressed dais and also specify direction of any dai. Some of the dais might only support capture/playback depending on the board level wiring. These two new dt properties will allow such flexibilty at board level dts. Signed-off-by: Srinivas Kandagatla Reviewed-by: Vinod Koul Reviewed-by: Rob Herring Acked-by: Vinod Koul Signed-off-by: Mark Brown --- .../devicetree/bindings/sound/qcom,q6asm.txt | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'Documentation/devicetree') diff --git a/Documentation/devicetree/bindings/sound/qcom,q6asm.txt b/Documentation/devicetree/bindings/sound/qcom,q6asm.txt index f9c7bd8c1bc0..9f5378c51686 100644 --- a/Documentation/devicetree/bindings/sound/qcom,q6asm.txt +++ b/Documentation/devicetree/bindings/sound/qcom,q6asm.txt @@ -27,6 +27,28 @@ used by the apr service device. Value type: Definition: Must be 1 +== ASM DAI is subnode of "dais" and represent a dai, it includes board specific +configuration of each dai. Must contain the following properties. + +- reg + Usage: required + Value type: + Definition: Must be dai id + +- direction: + Usage: Required for Compress offload dais + Value type: + Definition: Specifies the direction of the dai stream + 0 for both tx and rx + 1 for only tx (Capture/Encode) + 2 for only rx (Playback/Decode) + +- is-compress-dai: + Usage: Required for Compress offload dais + Value type: + Definition: present for Compress offload dais + + = EXAMPLE q6asm@7 { @@ -35,5 +57,10 @@ q6asm@7 { q6asmdai: dais { compatible = "qcom,q6asm-dais"; #sound-dai-cells = <1>; + mm@0 { + reg = <0>; + direction = <2>; + is-compress-dai; + }; }; }; -- cgit v1.2.3-59-g8ed1b