Skip to contentSkip to conversation

ASoC: rsnd: cleanup for Gen3 support

PATCH New Kuninori Morimoto 1 participant 5 messages Sep 10, 2015

Subsystems (5)
lore
Share & tools
lore

Kuninori Morimoto

author maintainer
#0 lore raw

cover ASoC: rsnd: cleanup for Gen3 support

Hi Mark

These are not so important, but cleanup for preparing of Gen3 support

Kuninori Morimoto (4):
ASoC: rsnd: tidyup rsnd_dma_to_xxx() position
ASoC: rsnd: rename rsnd_src_pcm_new() to rsnd_src_pcm_new_gen2()
ASoC: rsnd: remove unneeded sh_clk header
ASoC: rsnd: add missing #sound-dai-cells explain on Document

 Documentation/devicetree/bindings/sound/renesas,rsnd.txt |  2 ++
 include/sound/rcar_snd.h                                 |  1 -
 sound/soc/sh/rcar/adg.c                                  |  1 -
 sound/soc/sh/rcar/rsnd.h                                 |  3 +--
 sound/soc/sh/rcar/src.c                                  | 11 ++---------
 5 files changed, 5 insertions(+), 13 deletions(-)
author maintainer
#1 lore raw

PATCH 1/4 ASoC: rsnd: tidyup rsnd_dma_to_xxx() position

From: Kuninori Morimoto <[email protected]>

rsnd_dma_to_xxx() macro should exist in same place

---
 sound/soc/sh/rcar/rsnd.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
sound/soc/sh/rcar/rsnd.h +1 -2
index 7a0e52b..6ae8068 100644
@@ -214,6 +214,7 @@ struct rsnd_dma {
 };
 #define rsnd_dma_to_dmaen(dma)	(&(dma)->dma.en)
 #define rsnd_dma_to_dmapp(dma)	(&(dma)->dma.pp)
+#define rsnd_dma_to_mod(_dma) container_of((_dma), struct rsnd_mod, dma)
 
 void rsnd_dma_start(struct rsnd_dai_stream *io, struct rsnd_dma *dma);
 void rsnd_dma_stop(struct rsnd_dai_stream *io, struct rsnd_dma *dma);
@@ -225,8 +226,6 @@ int rsnd_dma_probe(struct platform_device *pdev,
 struct dma_chan *rsnd_dma_request_channel(struct device_node *of_node,
 					  struct rsnd_mod *mod, char *name);
 
-#define rsnd_dma_to_mod(_dma) container_of((_dma), struct rsnd_mod, dma)
-
 /*
  *	R-Car sound mod
  */
Signature · 1 line
1.9.1
author maintainer
#2 lore raw

PATCH 2/4 ASoC: rsnd: rename rsnd_src_pcm_new() to rsnd_src_pcm_new_gen2()

In reply to Kuninori Morimoto

From: Kuninori Morimoto <[email protected]>

rsnd_src_pcm_new() is used only from Gen2. make it clear in function name, and remove unneeded Gen1 check.

---
 sound/soc/sh/rcar/src.c | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)
sound/soc/sh/rcar/src.c +2 -9
index 89a18e1..06555a3 100644
@@ -918,11 +918,10 @@ static void rsnd_src_reconvert_update(struct rsnd_dai_stream *io,
 	rsnd_mod_write(mod, SRC_IFSVR, fsrate);
 }
 
-static int rsnd_src_pcm_new(struct rsnd_mod *mod,
+static int rsnd_src_pcm_new_gen2(struct rsnd_mod *mod,
 			    struct rsnd_dai_stream *io,
 			    struct snd_soc_pcm_runtime *rtd)
 {
-	struct rsnd_priv *priv = rsnd_mod_to_priv(mod);
 	struct rsnd_dai *rdai = rsnd_io_to_rdai(io);
 	struct rsnd_src *src = rsnd_mod_to_src(mod);
 	int ret;
@@ -932,12 +931,6 @@ static int rsnd_src_pcm_new(struct rsnd_mod *mod,
 	 */
 
 	/*
-	 * Gen1 is not supported
-	 */
-	if (rsnd_is_gen1(priv))
-		return 0;
-
-	/*
 	 * SRC sync convert needs clock master
 	 */
 	if (!rsnd_rdai_is_clk_master(rdai))
@@ -975,7 +968,7 @@ static struct rsnd_mod_ops rsnd_src_gen2_ops = {
 	.start	= rsnd_src_start_gen2,
 	.stop	= rsnd_src_stop_gen2,
 	.hw_params = rsnd_src_hw_params,
-	.pcm_new = rsnd_src_pcm_new,
+	.pcm_new = rsnd_src_pcm_new_gen2,
 };
 
 struct rsnd_mod *rsnd_src_mod_get(struct rsnd_priv *priv, int id)
Signature · 1 line
1.9.1
author maintainer
#3 lore raw

PATCH 3/4 ASoC: rsnd: remove unneeded sh_clk header

In reply to Kuninori Morimoto

From: Kuninori Morimoto <[email protected]>

sh_clk header is not needed, and it will create confusion. Let's remove it.

---
 include/sound/rcar_snd.h | 1 -
 sound/soc/sh/rcar/adg.c  | 1 -
 2 files changed, 2 deletions(-)
include/sound/rcar_snd.h +0 -1
index bb7b2eb..d8e33d3 100644
@@ -12,7 +12,6 @@
 #ifndef RCAR_SND_H
 #define RCAR_SND_H
 
-#include <linux/sh_clk.h>
 
 #define RSND_GEN1_SRU	0
 #define RSND_GEN1_ADG	1
sound/soc/sh/rcar/adg.c +0 -1
index fefc881..b512be8 100644
@@ -7,7 +7,6 @@
  * License.  See the file "COPYING" in the main directory of this archive
  * for more details.
  */
-#include <linux/sh_clk.h>
 #include "rsnd.h"
 
 #define CLKA	0
Signature · 1 line
1.9.1
author maintainer
#4 lore raw

PATCH 4/4 ASoC: rsnd: add missing #sound-dai-cells explain on Document

In reply to Kuninori Morimoto

From: Kuninori Morimoto <[email protected]>

---
 Documentation/devicetree/bindings/sound/renesas,rsnd.txt | 2 ++
 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/sound/renesas,rsnd.txt +2 -0
index 1173395..776cf6a 100644
@@ -30,6 +30,8 @@ Required properties:
 - rcar_sound,dai		: DAI contents.
 				  The number of DAI subnode should be same as HW.
 				  see below for detail.
+- #sound-dai-cells		: it must be 0 if your system is using single DAI
+				  it must be 1 if your system is using multi  DAI
 
 SSI subnode properties:
 - interrupts			: Should contain SSI interrupt for PIO transfer
Signature · 1 line
1.9.1