1Renesas R-Car sound 2 3============================================= 4* Modules 5============================================= 6 7Renesas R-Car and RZ/G sound is constructed from below modules 8(for Gen2 or later) 9 10 SCU : Sampling Rate Converter Unit 11 - SRC : Sampling Rate Converter 12 - CMD 13 - CTU : Channel Transfer Unit 14 - MIX : Mixer 15 - DVC : Digital Volume and Mute Function 16 SSIU : Serial Sound Interface Unit 17 SSI : Serial Sound Interface 18 19See detail of each module's channels, connection, limitation on datasheet 20 21============================================= 22* Multi channel 23============================================= 24 25Multi channel is supported by Multi-SSI, or TDM-SSI. 26 27 Multi-SSI : 6ch case, you can use stereo x 3 SSI 28 TDM-SSI : 6ch case, you can use TDM 29 30============================================= 31* Enable/Disable each modules 32============================================= 33 34See datasheet to check SRC/CTU/MIX/DVC connect-limitation. 35DT controls enabling/disabling module. 36${LINUX}/arch/arm/boot/dts/r8a7790-lager.dts can be good example. 37This is example of 38 39Playback: [MEM] -> [SRC2] -> [DVC0] -> [SSIU0/SSI0] -> [codec] 40Capture: [MEM] <- [DVC1] <- [SRC3] <- [SSIU1/SSI1] <- [codec] 41 42see "Example: simple sound card" 43 44You can use below. 45${LINUX}/arch/arm/boot/dts/r8a7790.dts can be good example. 46 47 &src0 &ctu00 &mix0 &dvc0 &ssi0 48 &src1 &ctu01 &mix1 &dvc1 &ssi1 49 &src2 &ctu02 &ssi2 50 &src3 &ctu03 &ssi3 51 &src4 &ssi4 52 &src5 &ctu10 &ssi5 53 &src6 &ctu11 &ssi6 54 &src7 &ctu12 &ssi7 55 &src8 &ctu13 &ssi8 56 &src9 &ssi9 57 58============================================= 59* SRC (Sampling Rate Converter) 60============================================= 61 62 [xx]Hz [yy]Hz 63 ------> [SRC] ------> 64 65SRC can convert [xx]Hz to [yy]Hz. Then, it has below 2 modes 66 67 Asynchronous mode: input data / output data are based on different clocks. 68 you can use this mode on Playback / Capture 69 Synchronous mode: input data / output data are based on same clocks. 70 This mode will be used if system doesn't have its input clock, 71 for example digital TV case. 72 you can use this mode on Playback 73 74------------------ 75** Asynchronous mode 76------------------ 77 78You need to use "simple-scu-audio-card" or "audio-graph-scu-card" for it. 79see "Example: simple sound card for Asynchronous mode" 80 81------------------ 82** Synchronous mode 83------------------ 84 85 > amixer set "SRC Out Rate" on 86 > aplay xxxx.wav 87 > amixer set "SRC Out Rate" 48000 88 > amixer set "SRC Out Rate" 44100 89 90============================================= 91* CTU (Channel Transfer Unit) 92============================================= 93 94 [xx]ch [yy]ch 95 ------> [CTU] --------> 96 97CTU can convert [xx]ch to [yy]ch, or exchange outputed channel. 98CTU conversion needs matrix settings. 99For more detail information, see below 100 101 Renesas R-Car datasheet 102 - Sampling Rate Converter Unit (SCU) 103 - SCU Operation 104 - CMD Block 105 - Functional Blocks in CMD 106 107 Renesas R-Car datasheet 108 - Sampling Rate Converter Unit (SCU) 109 - Register Description 110 - CTUn Scale Value exx Register (CTUn_SVxxR) 111 112 ${LINUX}/sound/soc/sh/rcar/ctu.c 113 - comment of header 114 115You need to use "simple-scu-audio-card" or "audio-graph-scu-card" for it. 116see "Example: simple sound card for channel convert" 117 118Ex) Exchange output channel 119 Input -> Output 120 1ch -> 0ch 121 0ch -> 1ch 122 123 example of using matrix 124 output 0ch = (input 0ch x 0) + (input 1ch x 1) 125 output 1ch = (input 0ch x 1) + (input 1ch x 0) 126 127 amixer set "CTU Reset" on 128 amixer set "CTU Pass" 9,10 129 amixer set "CTU SV0" 0,4194304 130 amixer set "CTU SV1" 4194304,0 131 132 example of changing connection 133 amixer set "CTU Reset" on 134 amixer set "CTU Pass" 2,1 135 136============================================= 137* MIX (Mixer) 138============================================= 139 140MIX merges 2 sounds path. You can see 2 sound interface on system, 141and these sounds will be merged by MIX. 142 143 aplay -D plughw:0,0 xxxx.wav & 144 aplay -D plughw:0,1 yyyy.wav 145 146You need to use "simple-scu-audio-card" or "audio-graph-scu-card" for it. 147Ex) 148 [MEM] -> [SRC1] -> [CTU02] -+-> [MIX0] -> [DVC0] -> [SSI0] 149 | 150 [MEM] -> [SRC2] -> [CTU03] -+ 151 152see "Example: simple sound card for MIXer" 153 154============================================= 155* DVC (Digital Volume and Mute Function) 156============================================= 157 158DVC controls Playback/Capture volume. 159 160Playback Volume 161 amixer set "DVC Out" 100% 162 163Capture Volume 164 amixer set "DVC In" 100% 165 166Playback Mute 167 amixer set "DVC Out Mute" on 168 169Capture Mute 170 amixer set "DVC In Mute" on 171 172Volume Ramp 173 amixer set "DVC Out Ramp Up Rate" "0.125 dB/64 steps" 174 amixer set "DVC Out Ramp Down Rate" "0.125 dB/512 steps" 175 amixer set "DVC Out Ramp" on 176 aplay xxx.wav & 177 amixer set "DVC Out" 80% // Volume Down 178 amixer set "DVC Out" 100% // Volume Up 179 180============================================= 181* SSIU (Serial Sound Interface Unit) 182============================================= 183 184SSIU can avoid some under/over run error, because it has some buffer. 185But you can't use it if SSI was PIO mode. 186In DMA mode, you can select not to use SSIU by using "no-busif" via SSI. 187 188SSIU handles BUSIF which will be used for TDM Split mode. 189This driver is assuming that audio-graph card will be used. 190 191TDM Split mode merges 4 sounds. You can see 4 sound interface on system, 192and these sounds will be merged SSIU/SSI. 193 194 aplay -D plughw:0,0 xxxx.wav & 195 aplay -D plughw:0,1 xxxx.wav & 196 aplay -D plughw:0,2 xxxx.wav & 197 aplay -D plughw:0,3 xxxx.wav 198 199 2ch 8ch 200 [MEM] -> [SSIU 30] -+-> [SSIU 3] --> [Codec] 201 2ch | 202 [MEM] -> [SSIU 31] -+ 203 2ch | 204 [MEM] -> [SSIU 32] -+ 205 2ch | 206 [MEM] -> [SSIU 33] -+ 207 208see "Example: simple sound card for TDM Split" 209 210============================================= 211* SSI (Serial Sound Interface) 212============================================= 213 214** PIO mode 215 216You can use PIO mode which is for connection check by using. 217Note: The system will drop non-SSI modules in PIO mode 218even though if DT is selecting other modules. 219 220 &ssi0 { 221 pio-transfer 222 }; 223 224** DMA mode without SSIU 225 226You can use DMA without SSIU. 227Note: under/over run, or noise are likely to occur 228 229 &ssi0 { 230 no-busif; 231 }; 232 233** PIN sharing 234 235Each SSI can share WS pin. It is based on platform. 236This is example if SSI1 want to share WS pin with SSI0 237 238 &ssi1 { 239 shared-pin; 240 }; 241 242** Multi-SSI 243 244You can use Multi-SSI. 245This is example of SSI0/SSI1/SSI2 (= for 6ch) 246 247see "Example: simple sound card for Multi channel" 248 249** TDM-SSI 250 251You can use TDM with SSI. 252This is example of TDM 6ch. 253Driver can automatically switches TDM <-> stereo mode in this case. 254 255see "Example: simple sound card for TDM" 256 257============================================= 258Required properties: 259============================================= 260 261- compatible : "renesas,rcar_sound-<soctype>", fallbacks 262 "renesas,rcar_sound-gen1" if generation1, and 263 "renesas,rcar_sound-gen2" if generation2 (or RZ/G1) 264 "renesas,rcar_sound-gen3" if generation3 (or RZ/G2) 265 Examples with soctypes are: 266 - "renesas,rcar_sound-r8a7742" (RZ/G1H) 267 - "renesas,rcar_sound-r8a7743" (RZ/G1M) 268 - "renesas,rcar_sound-r8a7744" (RZ/G1N) 269 - "renesas,rcar_sound-r8a7745" (RZ/G1E) 270 - "renesas,rcar_sound-r8a77470" (RZ/G1C) 271 - "renesas,rcar_sound-r8a774a1" (RZ/G2M) 272 - "renesas,rcar_sound-r8a774b1" (RZ/G2N) 273 - "renesas,rcar_sound-r8a774c0" (RZ/G2E) 274 - "renesas,rcar_sound-r8a774e1" (RZ/G2H) 275 - "renesas,rcar_sound-r8a7778" (R-Car M1A) 276 - "renesas,rcar_sound-r8a7779" (R-Car H1) 277 - "renesas,rcar_sound-r8a7790" (R-Car H2) 278 - "renesas,rcar_sound-r8a7791" (R-Car M2-W) 279 - "renesas,rcar_sound-r8a7793" (R-Car M2-N) 280 - "renesas,rcar_sound-r8a7794" (R-Car E2) 281 - "renesas,rcar_sound-r8a7795" (R-Car H3) 282 - "renesas,rcar_sound-r8a7796" (R-Car M3-W) 283 - "renesas,rcar_sound-r8a77965" (R-Car M3-N) 284 - "renesas,rcar_sound-r8a77990" (R-Car E3) 285 - "renesas,rcar_sound-r8a77995" (R-Car D3) 286- reg : Should contain the register physical address. 287 required register is 288 SRU/ADG/SSI if generation1 289 SRU/ADG/SSIU/SSI/AUDIO-DMAC-periperi if generation2/generation3 290 Select extended AUDIO-DMAC-periperi address if SoC has it, 291 otherwise select normal AUDIO-DMAC-periperi address. 292- reg-names : Should contain the register names. 293 scu/adg/ssi if generation1 294 scu/adg/ssiu/ssi/audmapp if generation2/generation3 295- rcar_sound,ssi : Should contain SSI feature. 296 The number of SSI subnode should be same as HW. 297 see below for detail. 298- rcar_sound,ssiu : Should contain SSIU feature. 299 The number of SSIU subnode should be same as HW. 300 see below for detail. 301- rcar_sound,src : Should contain SRC feature. 302 The number of SRC subnode should be same as HW. 303 see below for detail. 304- rcar_sound,ctu : Should contain CTU feature. 305 The number of CTU subnode should be same as HW. 306 see below for detail. 307- rcar_sound,mix : Should contain MIX feature. 308 The number of MIX subnode should be same as HW. 309 see below for detail. 310- rcar_sound,dvc : Should contain DVC feature. 311 The number of DVC subnode should be same as HW. 312 see below for detail. 313- rcar_sound,dai : DAI contents. 314 The number of DAI subnode should be same as HW. 315 see below for detail. 316- #sound-dai-cells : it must be 0 if your system is using single DAI 317 it must be 1 if your system is using multi DAI 318- clocks : References to SSI/SRC/MIX/CTU/DVC/AUDIO_CLK clocks. 319- clock-names : List of necessary clock names. 320 "ssi-all", "ssi.X", "src.X", "mix.X", "ctu.X", 321 "dvc.X", "clk_a", "clk_b", "clk_c", "clk_i" 322 323Optional properties: 324- #clock-cells : it must be 0 if your system has audio_clkout 325 it must be 1 if your system has audio_clkout0/1/2/3 326- clock-frequency : for all audio_clkout0/1/2/3 327- clkout-lr-asynchronous : boolean property. it indicates that audio_clkoutn 328 is asynchronizes with lr-clock. 329- resets : References to SSI resets. 330- reset-names : List of valid reset names. 331 "ssi-all", "ssi.X" 332 333SSI subnode properties: 334- interrupts : Should contain SSI interrupt for PIO transfer 335- shared-pin : if shared clock pin 336- pio-transfer : use PIO transfer mode 337- no-busif : BUSIF is not ussed when [mem -> SSI] via DMA case 338- dma : Should contain Audio DMAC entry 339- dma-names : SSI case "rx" (=playback), "tx" (=capture) 340 Deprecated: see SSIU subnode properties 341 SSIU case "rxu" (=playback), "txu" (=capture) 342 343SSIU subnode properties: 344- dma : Should contain Audio DMAC entry 345- dma-names : "rx" (=playback), "tx" (=capture) 346 347SRC subnode properties: 348- dma : Should contain Audio DMAC entry 349- dma-names : "rx" (=playback), "tx" (=capture) 350 351DVC subnode properties: 352- dma : Should contain Audio DMAC entry 353- dma-names : "tx" (=playback/capture) 354 355DAI subnode properties: 356- playback : list of playback modules 357- capture : list of capture modules 358 359 360============================================= 361Example: 362============================================= 363 364rcar_sound: sound@ec500000 { 365 #sound-dai-cells = <1>; 366 compatible = "renesas,rcar_sound-r8a7791", "renesas,rcar_sound-gen2"; 367 reg = <0 0xec500000 0 0x1000>, /* SCU */ 368 <0 0xec5a0000 0 0x100>, /* ADG */ 369 <0 0xec540000 0 0x1000>, /* SSIU */ 370 <0 0xec541000 0 0x1280>, /* SSI */ 371 <0 0xec740000 0 0x200>; /* Audio DMAC peri peri*/ 372 reg-names = "scu", "adg", "ssiu", "ssi", "audmapp"; 373 374 clocks = <&mstp10_clks R8A7790_CLK_SSI_ALL>, 375 <&mstp10_clks R8A7790_CLK_SSI9>, <&mstp10_clks R8A7790_CLK_SSI8>, 376 <&mstp10_clks R8A7790_CLK_SSI7>, <&mstp10_clks R8A7790_CLK_SSI6>, 377 <&mstp10_clks R8A7790_CLK_SSI5>, <&mstp10_clks R8A7790_CLK_SSI4>, 378 <&mstp10_clks R8A7790_CLK_SSI3>, <&mstp10_clks R8A7790_CLK_SSI2>, 379 <&mstp10_clks R8A7790_CLK_SSI1>, <&mstp10_clks R8A7790_CLK_SSI0>, 380 <&mstp10_clks R8A7790_CLK_SCU_SRC9>, <&mstp10_clks R8A7790_CLK_SCU_SRC8>, 381 <&mstp10_clks R8A7790_CLK_SCU_SRC7>, <&mstp10_clks R8A7790_CLK_SCU_SRC6>, 382 <&mstp10_clks R8A7790_CLK_SCU_SRC5>, <&mstp10_clks R8A7790_CLK_SCU_SRC4>, 383 <&mstp10_clks R8A7790_CLK_SCU_SRC3>, <&mstp10_clks R8A7790_CLK_SCU_SRC2>, 384 <&mstp10_clks R8A7790_CLK_SCU_SRC1>, <&mstp10_clks R8A7790_CLK_SCU_SRC0>, 385 <&mstp10_clks R8A7790_CLK_SCU_DVC0>, <&mstp10_clks R8A7790_CLK_SCU_DVC1>, 386 <&audio_clk_a>, <&audio_clk_b>, <&audio_clk_c>, <&m2_clk>; 387 clock-names = "ssi-all", 388 "ssi.9", "ssi.8", "ssi.7", "ssi.6", "ssi.5", 389 "ssi.4", "ssi.3", "ssi.2", "ssi.1", "ssi.0", 390 "src.9", "src.8", "src.7", "src.6", "src.5", 391 "src.4", "src.3", "src.2", "src.1", "src.0", 392 "dvc.0", "dvc.1", 393 "clk_a", "clk_b", "clk_c", "clk_i"; 394 395 rcar_sound,dvc { 396 dvc0: dvc-0 { 397 dmas = <&audma0 0xbc>; 398 dma-names = "tx"; 399 }; 400 dvc1: dvc-1 { 401 dmas = <&audma0 0xbe>; 402 dma-names = "tx"; 403 }; 404 }; 405 406 rcar_sound,mix { 407 mix0: mix-0 { }; 408 mix1: mix-1 { }; 409 }; 410 411 rcar_sound,ctu { 412 ctu00: ctu-0 { }; 413 ctu01: ctu-1 { }; 414 ctu02: ctu-2 { }; 415 ctu03: ctu-3 { }; 416 ctu10: ctu-4 { }; 417 ctu11: ctu-5 { }; 418 ctu12: ctu-6 { }; 419 ctu13: ctu-7 { }; 420 }; 421 422 rcar_sound,src { 423 src0: src-0 { 424 interrupts = <0 352 IRQ_TYPE_LEVEL_HIGH>; 425 dmas = <&audma0 0x85>, <&audma1 0x9a>; 426 dma-names = "rx", "tx"; 427 }; 428 src1: src-1 { 429 interrupts = <0 353 IRQ_TYPE_LEVEL_HIGH>; 430 dmas = <&audma0 0x87>, <&audma1 0x9c>; 431 dma-names = "rx", "tx"; 432 }; 433 src2: src-2 { 434 interrupts = <0 354 IRQ_TYPE_LEVEL_HIGH>; 435 dmas = <&audma0 0x89>, <&audma1 0x9e>; 436 dma-names = "rx", "tx"; 437 }; 438 src3: src-3 { 439 interrupts = <0 355 IRQ_TYPE_LEVEL_HIGH>; 440 dmas = <&audma0 0x8b>, <&audma1 0xa0>; 441 dma-names = "rx", "tx"; 442 }; 443 src4: src-4 { 444 interrupts = <0 356 IRQ_TYPE_LEVEL_HIGH>; 445 dmas = <&audma0 0x8d>, <&audma1 0xb0>; 446 dma-names = "rx", "tx"; 447 }; 448 src5: src-5 { 449 interrupts = <0 357 IRQ_TYPE_LEVEL_HIGH>; 450 dmas = <&audma0 0x8f>, <&audma1 0xb2>; 451 dma-names = "rx", "tx"; 452 }; 453 src6: src-6 { 454 interrupts = <0 358 IRQ_TYPE_LEVEL_HIGH>; 455 dmas = <&audma0 0x91>, <&audma1 0xb4>; 456 dma-names = "rx", "tx"; 457 }; 458 src7: src-7 { 459 interrupts = <0 359 IRQ_TYPE_LEVEL_HIGH>; 460 dmas = <&audma0 0x93>, <&audma1 0xb6>; 461 dma-names = "rx", "tx"; 462 }; 463 src8: src-8 { 464 interrupts = <0 360 IRQ_TYPE_LEVEL_HIGH>; 465 dmas = <&audma0 0x95>, <&audma1 0xb8>; 466 dma-names = "rx", "tx"; 467 }; 468 src9: src-9 { 469 interrupts = <0 361 IRQ_TYPE_LEVEL_HIGH>; 470 dmas = <&audma0 0x97>, <&audma1 0xba>; 471 dma-names = "rx", "tx"; 472 }; 473 }; 474 475 rcar_sound,ssiu { 476 ssiu00: ssiu-0 { 477 dmas = <&audma0 0x15>, <&audma1 0x16>; 478 dma-names = "rx", "tx"; 479 }; 480 ssiu01: ssiu-1 { 481 dmas = <&audma0 0x35>, <&audma1 0x36>; 482 dma-names = "rx", "tx"; 483 }; 484 485 ... 486 487 ssiu95: ssiu-49 { 488 dmas = <&audma0 0xA5>, <&audma1 0xA6>; 489 dma-names = "rx", "tx"; 490 }; 491 ssiu96: ssiu-50 { 492 dmas = <&audma0 0xA7>, <&audma1 0xA8>; 493 dma-names = "rx", "tx"; 494 }; 495 ssiu97: ssiu-51 { 496 dmas = <&audma0 0xA9>, <&audma1 0xAA>; 497 dma-names = "rx", "tx"; 498 }; 499 }; 500 501 rcar_sound,ssi { 502 ssi0: ssi-0 { 503 interrupts = <0 370 IRQ_TYPE_LEVEL_HIGH>; 504 dmas = <&audma0 0x01>, <&audma1 0x02>; 505 dma-names = "rx", "tx"; 506 }; 507 ssi1: ssi-1 { 508 interrupts = <0 371 IRQ_TYPE_LEVEL_HIGH>; 509 dmas = <&audma0 0x03>, <&audma1 0x04>; 510 dma-names = "rx", "tx"; 511 }; 512 513 ... 514 515 ssi8: ssi-8 { 516 interrupts = <0 378 IRQ_TYPE_LEVEL_HIGH>; 517 dmas = <&audma0 0x11>, <&audma1 0x12>; 518 dma-names = "rx", "tx"; 519 }; 520 ssi9: ssi-9 { 521 interrupts = <0 379 IRQ_TYPE_LEVEL_HIGH>; 522 dmas = <&audma0 0x13>, <&audma1 0x14>; 523 dma-names = "rx", "tx"; 524 }; 525 }; 526 527 rcar_sound,dai { 528 dai0 { 529 playback = <&ssi5 &src5>; 530 capture = <&ssi6>; 531 }; 532 dai1 { 533 playback = <&ssi3>; 534 }; 535 dai2 { 536 capture = <&ssi4>; 537 }; 538 dai3 { 539 playback = <&ssi7>; 540 }; 541 dai4 { 542 capture = <&ssi8>; 543 }; 544 }; 545}; 546 547============================================= 548Example: simple sound card 549============================================= 550 551 rsnd_ak4643: sound { 552 compatible = "simple-audio-card"; 553 554 simple-audio-card,format = "left_j"; 555 simple-audio-card,bitclock-master = <&sndcodec>; 556 simple-audio-card,frame-master = <&sndcodec>; 557 558 sndcpu: simple-audio-card,cpu { 559 sound-dai = <&rcar_sound>; 560 }; 561 562 sndcodec: simple-audio-card,codec { 563 sound-dai = <&ak4643>; 564 clocks = <&audio_clock>; 565 }; 566 }; 567 568&rcar_sound { 569 pinctrl-0 = <&sound_pins &sound_clk_pins>; 570 pinctrl-names = "default"; 571 572 /* Single DAI */ 573 #sound-dai-cells = <0>; 574 575 576 rcar_sound,dai { 577 dai0 { 578 playback = <&ssi0 &src2 &dvc0>; 579 capture = <&ssi1 &src3 &dvc1>; 580 }; 581 }; 582}; 583 584&ssi1 { 585 shared-pin; 586}; 587 588============================================= 589Example: simple sound card for Asynchronous mode 590============================================= 591 592sound { 593 compatible = "simple-scu-audio-card"; 594 ... 595 /* 596 * SRC Asynchronous mode setting 597 * Playback: 598 * All input data will be converted to 48kHz 599 * Capture: 600 * Inputed 48kHz data will be converted to 601 * system specified Hz 602 */ 603 simple-audio-card,convert-rate = <48000>; 604 ... 605 simple-audio-card,cpu { 606 sound-dai = <&rcar_sound>; 607 }; 608 simple-audio-card,codec { 609 ... 610 }; 611}; 612 613============================================= 614Example: simple sound card for channel convert 615============================================= 616 617sound { 618 compatible = "simple-scu-audio-card"; 619 ... 620 /* 621 * CTU setting 622 * All input data will be converted to 2ch 623 * as output data 624 */ 625 simple-audio-card,convert-channels = <2>; 626 ... 627 simple-audio-card,cpu { 628 sound-dai = <&rcar_sound>; 629 }; 630 simple-audio-card,codec { 631 ... 632 }; 633}; 634 635============================================= 636Example: simple sound card for MIXer 637============================================= 638 639sound { 640 compatible = "simple-scu-audio-card"; 641 ... 642 simple-audio-card,cpu@0 { 643 sound-dai = <&rcar_sound 0>; 644 }; 645 simple-audio-card,cpu@1 { 646 sound-dai = <&rcar_sound 1>; 647 }; 648 simple-audio-card,codec { 649 ... 650 }; 651}; 652 653&rcar_sound { 654 ... 655 rcar_sound,dai { 656 dai0 { 657 playback = <&src1 &ctu02 &mix0 &dvc0 &ssi0>; 658 }; 659 dai1 { 660 playback = <&src2 &ctu03 &mix0 &dvc0 &ssi0>; 661 }; 662 }; 663}; 664 665============================================= 666Example: simple sound card for TDM 667============================================= 668 669rsnd_tdm: sound { 670 compatible = "simple-audio-card"; 671 672 simple-audio-card,format = "left_j"; 673 simple-audio-card,bitclock-master = <&sndcodec>; 674 simple-audio-card,frame-master = <&sndcodec>; 675 676 sndcpu: simple-audio-card,cpu { 677 sound-dai = <&rcar_sound>; 678 dai-tdm-slot-num = <6>; 679 }; 680 681 sndcodec: simple-audio-card,codec { 682 sound-dai = <&xxx>; 683 }; 684}; 685 686============================================= 687Example: simple sound card for TDM Split 688============================================= 689 690sound_card: sound { 691 compatible = "audio-graph-scu-card"; 692 prefix = "xxxx"; 693 routing = "xxxx Playback", "DAI0 Playback", 694 "xxxx Playback", "DAI1 Playback", 695 "xxxx Playback", "DAI2 Playback", 696 "xxxx Playback", "DAI3 Playback"; 697 convert-channels = <8>; /* TDM Split */ 698 699 dais = <&rsnd_port0 /* playback ch1/ch2 */ 700 &rsnd_port1 /* playback ch3/ch4 */ 701 &rsnd_port2 /* playback ch5/ch6 */ 702 &rsnd_port3 /* playback ch7/ch8 */ 703 >; 704}; 705 706audio-codec { 707 ... 708 port { 709 codec_0: endpoint@1 { 710 remote-endpoint = <&rsnd_ep0>; 711 }; 712 codec_1: endpoint@2 { 713 remote-endpoint = <&rsnd_ep1>; 714 }; 715 codec_2: endpoint@3 { 716 remote-endpoint = <&rsnd_ep2>; 717 }; 718 codec_3: endpoint@4 { 719 remote-endpoint = <&rsnd_ep3>; 720 }; 721 }; 722}; 723 724&rcar_sound { 725 ... 726 ports { 727 rsnd_port0: port@0 { 728 rsnd_ep0: endpoint { 729 remote-endpoint = <&codec_0>; 730 ... 731 playback = <&ssiu30 &ssi3>; 732 }; 733 }; 734 rsnd_port1: port@1 { 735 rsnd_ep1: endpoint { 736 remote-endpoint = <&codec_1>; 737 ... 738 playback = <&ssiu31 &ssi3>; 739 }; 740 }; 741 rsnd_port2: port@2 { 742 rsnd_ep2: endpoint { 743 remote-endpoint = <&codec_2>; 744 ... 745 playback = <&ssiu32 &ssi3>; 746 }; 747 }; 748 rsnd_port3: port@3 { 749 rsnd_ep3: endpoint { 750 remote-endpoint = <&codec_3>; 751 ... 752 playback = <&ssiu33 &ssi3>; 753 }; 754 }; 755 }; 756}; 757 758============================================= 759Example: simple sound card for Multi channel 760============================================= 761 762&rcar_sound { 763 pinctrl-0 = <&sound_pins &sound_clk_pins>; 764 pinctrl-names = "default"; 765 766 /* Single DAI */ 767 #sound-dai-cells = <0>; 768 769 770 rcar_sound,dai { 771 dai0 { 772 playback = <&ssi0 &ssi1 &ssi2 &src0 &dvc0>; 773 }; 774 }; 775}; 776