diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2019-03-20 00:54:42 -0400 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2019-03-21 10:50:50 -0400 |
commit | 0580dde59438686d60762b6da9229ebec693b94f (patch) | |
tree | 25717d2a2c6752dc165ea79d352253042fe2c192 /sound/soc/generic | |
parent | 883149027a989dc121ad277785a4b4a901b7fd31 (diff) |
ASoC: simple-card-utils: add asoc_simple_debug_info()
Current simple-card-utils has dev_dbg(), but people want to
add #define DEBUG at simple-card/audio-graph, not simple-card-utils.
And, people want to get all information.
This patch adds new asoc_simple_debug_info() to indicates information.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/generic')
-rw-r--r-- | sound/soc/generic/audio-graph-card.c | 2 | ||||
-rw-r--r-- | sound/soc/generic/simple-card-utils.c | 12 | ||||
-rw-r--r-- | sound/soc/generic/simple-card.c | 2 |
3 files changed, 4 insertions, 12 deletions
diff --git a/sound/soc/generic/audio-graph-card.c b/sound/soc/generic/audio-graph-card.c index 7dd772a895e2..2a95355540d1 100644 --- a/sound/soc/generic/audio-graph-card.c +++ b/sound/soc/generic/audio-graph-card.c | |||
@@ -712,6 +712,8 @@ static int graph_probe(struct platform_device *pdev) | |||
712 | 712 | ||
713 | snd_soc_card_set_drvdata(card, priv); | 713 | snd_soc_card_set_drvdata(card, priv); |
714 | 714 | ||
715 | asoc_simple_debug_info(priv); | ||
716 | |||
715 | ret = devm_snd_soc_register_card(dev, card); | 717 | ret = devm_snd_soc_register_card(dev, card); |
716 | if (ret < 0) | 718 | if (ret < 0) |
717 | goto err; | 719 | goto err; |
diff --git a/sound/soc/generic/simple-card-utils.c b/sound/soc/generic/simple-card-utils.c index 5c1424f03620..f5ba5ad300cc 100644 --- a/sound/soc/generic/simple-card-utils.c +++ b/sound/soc/generic/simple-card-utils.c | |||
@@ -49,9 +49,6 @@ void asoc_simple_card_parse_convert(struct device *dev, | |||
49 | /* channels transfer */ | 49 | /* channels transfer */ |
50 | snprintf(prop, sizeof(prop), "%s%s", prefix, "convert-channels"); | 50 | snprintf(prop, sizeof(prop), "%s%s", prefix, "convert-channels"); |
51 | of_property_read_u32(np, prop, &data->convert_channels); | 51 | of_property_read_u32(np, prop, &data->convert_channels); |
52 | |||
53 | dev_dbg(dev, "convert_rate %d\n", data->convert_rate); | ||
54 | dev_dbg(dev, "convert_channels %d\n", data->convert_channels); | ||
55 | } | 52 | } |
56 | EXPORT_SYMBOL_GPL(asoc_simple_card_parse_convert); | 53 | EXPORT_SYMBOL_GPL(asoc_simple_card_parse_convert); |
57 | 54 | ||
@@ -93,8 +90,6 @@ int asoc_simple_card_parse_daifmt(struct device *dev, | |||
93 | 90 | ||
94 | *retfmt = daifmt; | 91 | *retfmt = daifmt; |
95 | 92 | ||
96 | dev_dbg(dev, "format : %04x\n", daifmt); | ||
97 | |||
98 | return 0; | 93 | return 0; |
99 | } | 94 | } |
100 | EXPORT_SYMBOL_GPL(asoc_simple_card_parse_daifmt); | 95 | EXPORT_SYMBOL_GPL(asoc_simple_card_parse_daifmt); |
@@ -116,8 +111,6 @@ int asoc_simple_card_set_dailink_name(struct device *dev, | |||
116 | 111 | ||
117 | dai_link->name = name; | 112 | dai_link->name = name; |
118 | dai_link->stream_name = name; | 113 | dai_link->stream_name = name; |
119 | |||
120 | dev_dbg(dev, "name : %s\n", name); | ||
121 | } | 114 | } |
122 | 115 | ||
123 | return ret; | 116 | return ret; |
@@ -146,8 +139,6 @@ int asoc_simple_card_parse_card_name(struct snd_soc_card *card, | |||
146 | if (!card->name && card->dai_link) | 139 | if (!card->name && card->dai_link) |
147 | card->name = card->dai_link->name; | 140 | card->name = card->dai_link->name; |
148 | 141 | ||
149 | dev_dbg(card->dev, "Card Name: %s\n", card->name ? card->name : ""); | ||
150 | |||
151 | return 0; | 142 | return 0; |
152 | } | 143 | } |
153 | EXPORT_SYMBOL_GPL(asoc_simple_card_parse_card_name); | 144 | EXPORT_SYMBOL_GPL(asoc_simple_card_parse_card_name); |
@@ -211,9 +202,6 @@ int asoc_simple_card_parse_clk(struct device *dev, | |||
211 | if (of_property_read_bool(node, "system-clock-direction-out")) | 202 | if (of_property_read_bool(node, "system-clock-direction-out")) |
212 | simple_dai->clk_direction = SND_SOC_CLOCK_OUT; | 203 | simple_dai->clk_direction = SND_SOC_CLOCK_OUT; |
213 | 204 | ||
214 | dev_dbg(dev, "%s : sysclk = %d, direction %d\n", dai_name, | ||
215 | simple_dai->sysclk, simple_dai->clk_direction); | ||
216 | |||
217 | return 0; | 205 | return 0; |
218 | } | 206 | } |
219 | EXPORT_SYMBOL_GPL(asoc_simple_card_parse_clk); | 207 | EXPORT_SYMBOL_GPL(asoc_simple_card_parse_clk); |
diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c index b792638a11c8..77899624787e 100644 --- a/sound/soc/generic/simple-card.c +++ b/sound/soc/generic/simple-card.c | |||
@@ -813,6 +813,8 @@ static int simple_probe(struct platform_device *pdev) | |||
813 | 813 | ||
814 | snd_soc_card_set_drvdata(card, priv); | 814 | snd_soc_card_set_drvdata(card, priv); |
815 | 815 | ||
816 | asoc_simple_debug_info(priv); | ||
817 | |||
816 | ret = devm_snd_soc_register_card(dev, card); | 818 | ret = devm_snd_soc_register_card(dev, card); |
817 | if (ret < 0) | 819 | if (ret < 0) |
818 | goto err; | 820 | goto err; |