Skip to content
Permalink
Browse files
card2
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
  • Loading branch information
morimoto committed Jan 19, 2021
1 parent 780b043 commit 752125acb1c44fc46f3eeae868dbb2f518bf5a18
Show file tree
Hide file tree
Showing 6 changed files with 995 additions and 0 deletions.
@@ -152,6 +152,55 @@
#clock-cells = <0>;
clock-frequency = <25000000>;
};

/*
* cpu0 <--> codec0
* cpu1 <--> codec1
* cpu2 <--> codec2
* cpu3 <-/
*/
card2 {
compatible = "sample-custom-card";

routing = "BE DAI2 Playback", "DAI2 Playback",
"BE DAI2 Playback", "DAI3 Playback",
"DAI2 Capture", "BE DAI2 Capture",
"DAI3 Capture", "BE DAI2 Capture";

links = <&cpu0 &cpu1
&mix_fe0 &mix_fe1 &mix_be0>;
};

mix {
compatible = "audio-graph-card2-dsp";
ports@0 {
mix_fe0: port@0 { mix_fe0_ep: endpoint { remote-endpoint = <&cpu2_ep>; }; };
mix_fe1: port@1 { mix_fe1_ep: endpoint { remote-endpoint = <&cpu3_ep>; }; };
};
ports@1 {
mix_be0: port { mix_be0_ep: endpoint { remote-endpoint = <&codec2_ep>; }; };
};
};

test_cpu1 {
compatible = "test-cpu";
ports {
cpu0: port@0 { cpu0_ep: endpoint { remote-endpoint = <&codec0_ep>; }; };
cpu1: port@1 { cpu1_ep: endpoint { remote-endpoint = <&codec1_ep>; }; };
cpu2: port@2 { cpu2_ep: endpoint { remote-endpoint = <&mix_fe0_ep>; }; };
cpu3: port@3 { cpu3_ep: endpoint { remote-endpoint = <&mix_fe1_ep>; }; };
};
};

test_codec1 {
compatible = "test-codec";
ports {
port@0 { codec0_ep: endpoint { remote-endpoint = <&cpu0_ep>; }; };
port@1 { codec1_ep: endpoint { remote-endpoint = <&cpu1_ep>; }; };
port@2 { prefix = "BE";
codec2_ep: endpoint { remote-endpoint = <&mix_be0_ep>; }; };
};
};
};

&audio_clk_a {
@@ -9,8 +9,15 @@

#include <sound/simple_card_utils.h>

struct graph_custom_hooks {
int (*parse_of_hook_pre)(struct asoc_simple_priv *priv);
int (*parse_of_hook_post)(struct asoc_simple_priv *priv);
};

int asoc_graph_card_probe(struct snd_soc_card *card);

int asoc_graph_parse_of(struct asoc_simple_priv *priv, struct device *dev);
int asoc_graph_parse_of2(struct asoc_simple_priv *priv, struct device *dev,
struct graph_custom_hooks *hooks);

#endif /* __GRAPH_CARD_H */
@@ -18,6 +18,20 @@ config SND_AUDIO_GRAPH_CARD
with OF-graph DT bindings.
It also support DPCM of multi CPU single Codec ststem.

config SND_AUDIO_GRAPH_CARD2
tristate "ASoC Audio Graph Sound Card2 support"
depends on OF
select SND_SIMPLE_CARD_UTILS
help
This option enables generic simple sound card support
with OF-graph DT bindings.

config SND_SAMPLE_CUSTOM_CARD
tristate "ASoC Audio Graph Sound Card2 base custom card sample support"
depends on OF && SND_AUDIO_GRAPH_CARD2
help
This option enables Audio Graph Sound Card2 base custom card support

config SND_TEST_COMPONENT
tristate "ASoC Test component sound support"
depends on OF
@@ -2,9 +2,13 @@
snd-soc-simple-card-utils-objs := simple-card-utils.o
snd-soc-simple-card-objs := simple-card.o
snd-soc-audio-graph-card-objs := audio-graph-card.o
snd-soc-audio-graph-card2-objs := audio-graph-card2.o
snd-soc-sample-custom-card-objs := sample-custom-card.o
snd-soc-test-component-objs := test-component.o

obj-$(CONFIG_SND_SIMPLE_CARD_UTILS) += snd-soc-simple-card-utils.o
obj-$(CONFIG_SND_SIMPLE_CARD) += snd-soc-simple-card.o
obj-$(CONFIG_SND_AUDIO_GRAPH_CARD) += snd-soc-audio-graph-card.o
obj-$(CONFIG_SND_AUDIO_GRAPH_CARD2) += snd-soc-audio-graph-card2.o
obj-$(CONFIG_SND_SAMPLE_CUSTOM_CARD) += snd-soc-sample-custom-card.o
obj-$(CONFIG_SND_TEST_COMPONENT) += snd-soc-test-component.o

0 comments on commit 752125a

Please sign in to comment.