1. 15 Nov, 2018 8 commits
  2. 14 Nov, 2018 3 commits
  3. 13 Nov, 2018 21 commits
  4. 09 Nov, 2018 1 commit
    • Kuninori Morimoto's avatar
      ASoC: rsnd: use ring buffer for rsnd_mod_name() · 0246c661
      Kuninori Morimoto authored
      commit c0ea089d ("ASoC: rsnd: rsnd_mod_name() handles both name and
      ID") merged "name" and "ID" on rsnd_mod_name() to handle sub-ID
      (= for CTU/BUSIF).
      Then, it decided to share static char to avoid pointless memory.
      But, it doesn't work correctry in below case, because last called
      name will be used.
      
      	dev_xxx(dev, "%s is connected to %s\n",
      		rsnd_mod_name(mod_a),  /* ssiu[00] */
      		rsnd_mod_name(mod_b)); /* ssi[0]   */
      	->
      	rcar_sound ec500000.sound: ssi[0] is connected to ssi[0]
      	                           ~~~~~~                 ~~~~~~
      We still don't want to have pointless memory, so let's use ring buffer.
      16byte x 5 is very enough for this purpose.
      
      	dev_xxx(dev, "%s is connected to %s\n",
      		rsnd_mod_name(mod_a),  /* ssiu[00] */
      		rsnd_mod_name(mod_b)); /* ssi[0]   */
      	->
      	rcar_sound ec500000.sound: ssiu[00] is connected to ssi[0]
      	                           ~~~~~~~~                 ~~~~~~
      Signed-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      0246c661
  5. 07 Nov, 2018 1 commit
  6. 06 Nov, 2018 6 commits
    • Kuninori Morimoto's avatar
      ASoC: rsnd: add TDM Split mode support · f69f4522
      Kuninori Morimoto authored
      This patch adds TDM Split mode support. rsnd driver is assuming
      audio-graph-scu-card is used for Sound Card.
      
      This is very simple sample DT settings to use it.
      
      	sound_card: sound {
      		compatible = "audio-graph-scu-card";
      		...
      		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>;
      				};
      			};
      		};
      	};
      Signed-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      f69f4522
    • Kuninori Morimoto's avatar
      ASoC: rsnd: add TDM Split mode support for Document · cf704dc8
      Kuninori Morimoto authored
      This patch adds TDM Split mode support. rsnd driver is assuming
      audio-graph-scu-card is used for Sound Card.
      Signed-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      cf704dc8
    • Kuninori Morimoto's avatar
      ASoC: rsnd: add SSIU BUSIF support · 4e7788fb
      Kuninori Morimoto authored
      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: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      4e7788fb
    • Kuninori Morimoto's avatar
      ASoC: rsnd: add SSIU BUSIF support for Document · da48a6eb
      Kuninori Morimoto authored
      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: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      da48a6eb
    • Kuninori Morimoto's avatar
      ASoC: rsnd: tidyup Document for DT binding · bd7ff187
      Kuninori Morimoto authored
      It has duplicated DT example code on Document.
      This patch tidyup these.
      Signed-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      bd7ff187
    • Kuninori Morimoto's avatar
      ASoC: rsnd: handle DPCM converted rate/chan under core · c2aaaa57
      Kuninori Morimoto authored
      converted rate/chan are handled each rated module, but
      it will be used other module too.
      For examle, converted channel is currently used for CTU,
      but, it will be used for TDM Split mode, too.
      
      This patch move/merge SRC/CTU hw_param under core.c
      and handles converted rate/chan under rsnd_dai_stream.
      Signed-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      c2aaaa57