ASoC: merge audio-graph-scu into audio-graph - step2
Subsystems (4)
Kuninori Morimoto
maintainercover ASoC: merge audio-graph-scu into audio-graph - step2
Hi Mark
audio-graph card can handle normal sound card, and
audio-graph-scu card can handle DPCM sound card.
But, we can't use these feature in same time now.
So, this is the time to merge audio-graph and audio-graph-scu. The patch-set are a little bit huge (and few patches are depend on posted OF patch. I'm now waiting...),
thus, I separated these into few steps.
These are step2 patches
Kuninori Morimoto (10):
ASoC: soc-core: add snd_soc_of_parse_node_prefix()
ASoC: simple-scu-card: tidyup "prefix" parsing on Doc
ASoC: simple-scu-card: tidyup "prefix" parsing
ASoC: audio-graph-scu-card: tidyup "prefix" parsing on Doc
ASoC: audio-graph-scu-card: tidyup "prefix" parsing
ASoC: audio-graph-scu-card: tidyup "convert-rate/channels" parsing on Doc
ASoC: audio-graph-scu-card: tidyup "convert-rate/channels" parsing
ASoC: audio-graph-scu-card: tidyup asoc_simple_card_parse_daifmt() timing
ASoC: audio-graph-card: tidyup typo SND_AUDIO_GRAPH_CARD
ASoC: audio-graph-card: tidyup define position
.../bindings/sound/audio-graph-scu-card.txt | 4 +- .../devicetree/bindings/sound/simple-scu-card.txt | 2 +- include/sound/soc.h | 6 +- sound/soc/generic/Kconfig | 2 +- sound/soc/generic/audio-graph-card.c | 10 +-- sound/soc/generic/audio-graph-scu-card.c | 71 ++++++++++------------ sound/soc/generic/simple-scu-card.c | 7 +++ sound/soc/soc-core.c | 11 ++-- 8 files changed, 59 insertions(+), 54 deletions(-)
Signature · 1 line
2.7.4
Kuninori Morimoto
maintainerPATCH 1/10 ASoC: soc-core: add snd_soc_of_parse_node_prefix()
From: Kuninori Morimoto <[email protected]>
Current ASoC has snd_soc_of_parse_audio_prefix() to get codec_conf settings from DT which is used to avoid DAI naming conflict when CPU/Codec matching.
Currently, it is parsing from "top node",
but, we want to parse from "each sub node" if sound card had multi cpus/codecs.
This patch adds new snd_soc_of_parse_node_prefix() to allow parsing settings from selected node.
It is keeping existing snd_soc_of_parse_audio_prefix() by using macro.
--- include/sound/soc.h | 6 +++++- sound/soc/soc-core.c | 11 +++++------ 2 files changed, 10 insertions(+), 7 deletions(-)
include/sound/soc.h +5 -1
@@ -1477,10 +1477,14 @@ int snd_soc_of_parse_tdm_slot(struct device_node *np,unsigned int *rx_mask, unsigned int *slots, unsigned int *slot_width); -void snd_soc_of_parse_audio_prefix (struct snd_soc_card *card, +void snd_soc_of_parse_node_prefix (struct device_node *np,struct snd_soc_codec_conf *codec_conf,struct device_node *of_node,const char *propname); +#define snd_soc_of_parse_audio_prefix (card, conf, node, name) \ + snd_soc_of_parse_node_prefix((card)->dev->of_node, \ + (conf), (node), (name)) +int snd_soc_of_parse_audio_routing (struct snd_soc_card *card,const char *propname); unsigned int snd_soc_of_parse_daifmt(struct device_node *np,
sound/soc/soc-core.c +5 -6
@@ -3484,12 +3484,11 @@ int snd_soc_of_parse_tdm_slot(struct device_node *np, }EXPORT_SYMBOL_GPL (snd_soc_of_parse_tdm_slot); -void snd_soc_of_parse_audio_prefix (struct snd_soc_card *card, -struct snd_soc_codec_conf *codec_conf, -struct device_node *of_node, -const char *propname) +void snd_soc_of_parse_node_prefix (struct device_node *np, +struct snd_soc_codec_conf *codec_conf, +struct device_node *of_node, +const char *propname) { -struct device_node *np = card->dev->of_node;const char *str;int ret;
@@ -3502,7 +3501,7 @@ void snd_soc_of_parse_audio_prefix(struct snd_soc_card *card, codec_conf->of_node = of_node; codec_conf->name_prefix = str; } -EXPORT_SYMBOL_GPL (snd_soc_of_parse_audio_prefix); +EXPORT_SYMBOL_GPL (snd_soc_of_parse_node_prefix);int snd_soc_of_parse_audio_routing (struct snd_soc_card *card,const char *propname)
Signature · 1 line
2.7.4
Mark Brown
maintainerRe: [PATCH 01/10] ASoC: soc-core: add snd_soc_of_parse_node_prefix()
include/sound/soc.h int snd_soc_of_parse_tdm_slot(struct device_node *np, · line 1486
Quoted 7 lines · Kuninori Morimoto
include/sound/soc.h +4
-0+void snd_soc_of_parse_node_prefix (struct device_node *np,struct snd_soc_codec_conf *codec_conf,struct device_node *of_node,const char *propname); +#define snd_soc_of_parse_audio_prefix (card, conf, node, name) \ + snd_soc_of_parse_node_prefix((card)->dev->of_node, \ + (conf), (node), (name))
This is basically fine but it'd be better to make this a static inline rather than a #define - it helps with error messages and type safety. I'll apply the series since otherwise this looks good, please send a followup patch fixing this.
Quoted 37 lines
include/sound/soc.h +1
-0+int snd_soc_of_parse_audio_routing (struct snd_soc_card *card,const char *propname); unsigned int snd_soc_of_parse_daifmt(struct device_node *np,sound/soc/soc-core.c +5
-6@@ -3484,12 +3484,11 @@ int snd_soc_of_parse_tdm_slot(struct device_node *np, }EXPORT_SYMBOL_GPL (snd_soc_of_parse_tdm_slot); -void snd_soc_of_parse_audio_prefix (struct snd_soc_card *card, -struct snd_soc_codec_conf *codec_conf, -struct device_node *of_node, -const char *propname) +void snd_soc_of_parse_node_prefix (struct device_node *np, +struct snd_soc_codec_conf *codec_conf, +struct device_node *of_node, +const char *propname) { -struct device_node *np = card->dev->of_node;const char *str;int ret;@@ -3502,7 +3501,7 @@ void snd_soc_of_parse_audio_prefix(struct snd_soc_card *card, codec_conf->of_node = of_node; codec_conf->name_prefix = str; } -EXPORT_SYMBOL_GPL (snd_soc_of_parse_audio_prefix); +EXPORT_SYMBOL_GPL (snd_soc_of_parse_node_prefix);int snd_soc_of_parse_audio_routing (struct snd_soc_card *card,const char *propname)Signature · 1 line
2.7.4
Kuninori Morimoto
maintainerRe: [PATCH 01/10] ASoC: soc-core: add snd_soc_of_parse_node_prefix()
Hi Mark
Quoted 4 lines
Quoted 4 lines
include/sound/soc.h +1
-0+void snd_soc_of_parse_node_prefix (struct device_node *np,struct snd_soc_codec_conf *codec_conf,struct device_node *of_node,const char *propname);
Quoted 8 lines
include/sound/soc.h int snd_soc_of_parse_tdm_slot(struct device_node *np, · line 1486
Quoted 3 lines
include/sound/soc.h +3
-0+#define snd_soc_of_parse_audio_prefix (card, conf, node, name) \ + snd_soc_of_parse_node_prefix((card)->dev->of_node, \ + (conf), (node), (name))This is basically fine but it'd be better to make this a static inline rather than a #define - it helps with error messages and type safety. I'll apply the series since otherwise this looks good, please send a followup patch fixing this.
OK, thanks.
Yes, I will post it soon
Best regards
---
Kuninori Morimoto
Mark Brown
maintainerApplied "ASoC: soc-core: add snd_soc_of_parse_node_prefix()" to the asoc tree
In reply to Kuninori MorimotoThe patch
ASoC: soc-core: add snd_soc_of_parse_node_prefix()
has been applied to the asoc tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
Quoted 1 line
From
3b7103562c03cffb1a351f8c235b3bba2acd9e9bMon Sep 17 00:00:00 2001
From: Kuninori Morimoto <[email protected]>
Date: Thu, 22 Nov 2018 00:55:09 +0000
Subject: [PATCH] ASoC: soc-core: add snd_soc_of_parse_node_prefix()
Current ASoC has snd_soc_of_parse_audio_prefix() to get codec_conf settings from DT which is used to avoid DAI naming conflict when CPU/Codec matching.
Currently, it is parsing from "top node",
but, we want to parse from "each sub node" if sound card had multi cpus/codecs.
This patch adds new snd_soc_of_parse_node_prefix() to allow parsing settings from selected node.
It is keeping existing snd_soc_of_parse_audio_prefix() by using macro.
--- include/sound/soc.h | 6 +++++- sound/soc/soc-core.c | 11 +++++------ 2 files changed, 10 insertions(+), 7 deletions(-)
include/sound/soc.h +5 -1
@@ -1477,10 +1477,14 @@ int snd_soc_of_parse_tdm_slot(struct device_node *np,unsigned int *rx_mask, unsigned int *slots, unsigned int *slot_width); -void snd_soc_of_parse_audio_prefix (struct snd_soc_card *card, +void snd_soc_of_parse_node_prefix (struct device_node *np,struct snd_soc_codec_conf *codec_conf,struct device_node *of_node,const char *propname); +#define snd_soc_of_parse_audio_prefix (card, conf, node, name) \ + snd_soc_of_parse_node_prefix((card)->dev->of_node, \ + (conf), (node), (name)) +int snd_soc_of_parse_audio_routing (struct snd_soc_card *card,const char *propname); unsigned int snd_soc_of_parse_daifmt(struct device_node *np,
sound/soc/soc-core.c +5 -6
@@ -3484,12 +3484,11 @@ int snd_soc_of_parse_tdm_slot(struct device_node *np, }EXPORT_SYMBOL_GPL (snd_soc_of_parse_tdm_slot); -void snd_soc_of_parse_audio_prefix (struct snd_soc_card *card, -struct snd_soc_codec_conf *codec_conf, -struct device_node *of_node, -const char *propname) +void snd_soc_of_parse_node_prefix (struct device_node *np, +struct snd_soc_codec_conf *codec_conf, +struct device_node *of_node, +const char *propname) { -struct device_node *np = card->dev->of_node;const char *str;int ret;
@@ -3502,7 +3501,7 @@ void snd_soc_of_parse_audio_prefix(struct snd_soc_card *card, codec_conf->of_node = of_node; codec_conf->name_prefix = str; } -EXPORT_SYMBOL_GPL (snd_soc_of_parse_audio_prefix); +EXPORT_SYMBOL_GPL (snd_soc_of_parse_node_prefix);int snd_soc_of_parse_audio_routing (struct snd_soc_card *card,const char *propname)
Signature · 1 line
2.19.1
Kuninori Morimoto
maintainerPATCH 2/10 ASoC: simple-scu-card: tidyup "prefix" parsing on Doc
In reply to Kuninori MorimotoFrom: Kuninori Morimoto <[email protected]>
simple-scu-card.c is supporting "prefix" which is used to avoid DAI naming conflict when CPU/Codec matching.
But, sound card might have multi sub-devices, and each codec might need each prefix.
Now, ASoC is supporting snd_soc_of_parse_node_prefix(), let's support it on audio-graph-scu-card, too. It is keeping existing DT style.
It can't support each codec's prefix if sound card had multi sub-devices without this patch.
--- Documentation/devicetree/bindings/sound/simple-scu-card.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/devicetree/bindings/sound/simple-scu-card.txt +1 -1
@@ -75,7 +75,6 @@ sound { simple-audio-card,bitclock-master = <&dpcmcpu>; simple-audio-card,frame-master = <&dpcmcpu>; - simple-audio-card,prefix = "ak4642"; simple-audio-card,routing = "ak4642 Playback", "DAI0 Playback", "ak4642 Playback", "DAI1 Playback";
@@ -88,6 +87,7 @@ sound { }; codec { + prefix = "ak4642"; sound-dai = <&ak4643>; clocks = <&audio_clock>; };
Signature · 1 line
2.7.4
Mark Brown
maintainerApplied "ASoC: simple-scu-card: tidyup "prefix" parsing on Doc" to the asoc tree
The patch
ASoC: simple-scu-card: tidyup "prefix" parsing on Doc
has been applied to the asoc tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
Quoted 1 line
From
f94b0f7f9246013ac158ae3adf194c1bfa1d1847Mon Sep 17 00:00:00 2001
From: Kuninori Morimoto <[email protected]>
Date: Thu, 22 Nov 2018 00:55:24 +0000
Subject: [PATCH] ASoC: simple-scu-card: tidyup "prefix" parsing on Doc
simple-scu-card.c is supporting "prefix" which is used to avoid DAI naming conflict when CPU/Codec matching.
But, sound card might have multi sub-devices, and each codec might need each prefix.
Now, ASoC is supporting snd_soc_of_parse_node_prefix(), let's support it on audio-graph-scu-card, too. It is keeping existing DT style.
It can't support each codec's prefix if sound card had multi sub-devices without this patch.
--- Documentation/devicetree/bindings/sound/simple-scu-card.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/devicetree/bindings/sound/simple-scu-card.txt +1 -1
@@ -75,7 +75,6 @@ sound { simple-audio-card,bitclock-master = <&dpcmcpu>; simple-audio-card,frame-master = <&dpcmcpu>; - simple-audio-card,prefix = "ak4642"; simple-audio-card,routing = "ak4642 Playback", "DAI0 Playback", "ak4642 Playback", "DAI1 Playback";
@@ -88,6 +87,7 @@ sound { }; codec { + prefix = "ak4642"; sound-dai = <&ak4643>; clocks = <&audio_clock>; };
Signature · 1 line
2.19.1
Kuninori Morimoto
maintainerPATCH 3/10 ASoC: simple-scu-card: tidyup "prefix" parsing
In reply to Kuninori MorimotoFrom: Kuninori Morimoto <[email protected]>
simple-scu-card.c is supporting "prefix" which is used to avoid DAI naming conflict when CPU/Codec matching.
But, sound card might have multi sub-devices, and each codec might need each prefix.
Now, ASoC is supporting snd_soc_of_parse_node_prefix(), let's support it on audio-graph-scu-card, too. It is keeping existing DT style.
It can't support each codec's prefix if sound card had multi sub-devices without this patch.
--- sound/soc/generic/simple-scu-card.c | 7 +++++++ 1 file changed, 7 insertions(+)
sound/soc/generic/simple-scu-card.c +7 -0
@@ -157,10 +157,17 @@ static int asoc_simple_card_dai_link_of(struct device_node *np,if (ret <0 )return ret; +/* check "prefix" from top node */ snd_soc_of_parse_audio_prefix (card, &priv->codec_conf, dai_link->codecs->of_node,PREFIX "prefix" ); +/* check "prefix" from each node if top doesn't have */ +if (!priv->codec_conf.of_node) +snd_soc_of_parse_node_prefix (np, + &priv->codec_conf, + dai_link->codecs->of_node, +"prefix" ); } ret =asoc_simple_card_of_parse_tdm (np, &dai_props->dai);
Signature · 1 line
2.7.4
Mark Brown
maintainerApplied "ASoC: simple-scu-card: tidyup "prefix" parsing" to the asoc tree
The patch
ASoC: simple-scu-card: tidyup "prefix" parsing
has been applied to the asoc tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
Quoted 1 line
From
ca8d95c709378d0792c9dbacdab176a75e521ffbMon Sep 17 00:00:00 2001
From: Kuninori Morimoto <[email protected]>
Date: Thu, 22 Nov 2018 00:55:40 +0000
Subject: [PATCH] ASoC: simple-scu-card: tidyup "prefix" parsing
simple-scu-card.c is supporting "prefix" which is used to avoid DAI naming conflict when CPU/Codec matching.
But, sound card might have multi sub-devices, and each codec might need each prefix.
Now, ASoC is supporting snd_soc_of_parse_node_prefix(), let's support it on audio-graph-scu-card, too. It is keeping existing DT style.
It can't support each codec's prefix if sound card had multi sub-devices without this patch.
--- sound/soc/generic/simple-scu-card.c | 7 +++++++ 1 file changed, 7 insertions(+)
sound/soc/generic/simple-scu-card.c +7 -0
@@ -157,10 +157,17 @@ static int asoc_simple_card_dai_link_of(struct device_node *np,if (ret <0 )return ret; +/* check "prefix" from top node */ snd_soc_of_parse_audio_prefix (card, &priv->codec_conf, dai_link->codecs->of_node,PREFIX "prefix" ); +/* check "prefix" from each node if top doesn't have */ +if (!priv->codec_conf.of_node) +snd_soc_of_parse_node_prefix (np, + &priv->codec_conf, + dai_link->codecs->of_node, +"prefix" ); } ret =asoc_simple_card_of_parse_tdm (np, &dai_props->dai);
Signature · 1 line
2.19.1
Kuninori Morimoto
maintainerPATCH 4/10 ASoC: audio-graph-scu-card: tidyup "prefix" parsing on Doc
In reply to Kuninori MorimotoFrom: Kuninori Morimoto <[email protected]>
audio-graph-scu-card.c is supporting "prefix" which is used to avoid DAI naming conflict when CPU/Codec matching.
But, sound card might have multi sub-devices, and each codec might need each prefix.
Now, ASoC is supporting snd_soc_of_parse_node_prefix(), let's support it on audio-graph-scu-card, too. It is keeping existing DT style.
It can't support each codec's prefix if sound card had multi sub-devices without this patch.
--- Documentation/devicetree/bindings/sound/audio-graph-scu-card.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/devicetree/bindings/sound/audio-graph-scu-card.txt +1 -1
@@ -77,7 +77,6 @@ Example 2. 2 CPU 1 Codec (Mixing) compatible = "audio-graph-scu-card"; label = "sound-card"; - prefix = "codec"; routing = "codec Playback", "DAI0 Playback", "codec Playback", "DAI1 Playback", "DAI0 Capture", "codec Capture";
@@ -90,6 +89,7 @@ Example 2. 2 CPU 1 Codec (Mixing) audio-codec { ... + audio-graph-card,prefix = "codec"; port { codec_endpoint0: endpoint { remote-endpoint = <&cpu_endpoint0>;
Signature · 1 line
2.7.4
Mark Brown
maintainerApplied "ASoC: audio-graph-scu-card: tidyup "prefix" parsing on Doc" to the asoc tree
The patch
ASoC: audio-graph-scu-card: tidyup "prefix" parsing on Doc
has been applied to the asoc tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
Quoted 1 line
From
264d15035eac5e779788c435bafb5c8319ffed81Mon Sep 17 00:00:00 2001
From: Kuninori Morimoto <[email protected]>
Date: Thu, 22 Nov 2018 00:55:54 +0000
Subject: [PATCH] ASoC: audio-graph-scu-card: tidyup "prefix" parsing on Doc
audio-graph-scu-card.c is supporting "prefix" which is used to avoid DAI naming conflict when CPU/Codec matching.
But, sound card might have multi sub-devices, and each codec might need each prefix.
Now, ASoC is supporting snd_soc_of_parse_node_prefix(), let's support it on audio-graph-scu-card, too. It is keeping existing DT style.
It can't support each codec's prefix if sound card had multi sub-devices without this patch.
--- .../devicetree/bindings/sound/audio-graph-scu-card.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/devicetree/bindings/sound/audio-graph-scu-card.txt +1 -1
@@ -77,7 +77,6 @@ Example 2. 2 CPU 1 Codec (Mixing) compatible = "audio-graph-scu-card"; label = "sound-card"; - prefix = "codec"; routing = "codec Playback", "DAI0 Playback", "codec Playback", "DAI1 Playback", "DAI0 Capture", "codec Capture";
@@ -90,6 +89,7 @@ Example 2. 2 CPU 1 Codec (Mixing) audio-codec { ... + audio-graph-card,prefix = "codec"; port { codec_endpoint0: endpoint { remote-endpoint = <&cpu_endpoint0>;
Signature · 1 line
2.19.1
Kuninori Morimoto
maintainerPATCH 5/10 ASoC: audio-graph-scu-card: tidyup "prefix" parsing
In reply to Kuninori MorimotoFrom: Kuninori Morimoto <[email protected]>
audio-graph-scu-card.c is supporting "prefix" which is used to avoid DAI naming conflict when CPU/Codec matching.
But, sound card might have multi sub-devices, and each codec might need each prefix.
Now, ASoC is supporting snd_soc_of_parse_node_prefix(), let's support it on audio-graph-scu-card, too. It is keeping existing DT style.
It can't support each codec's prefix if sound card had multi sub-devices without this patch.
--- sound/soc/generic/audio-graph-scu-card.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
sound/soc/generic/audio-graph-scu-card.c +10 -0
@@ -39,6 +39,8 @@ struct graph_card_data {#define graph_priv_to_dev (priv) (graph_priv_to_card(priv)->dev)#define graph_priv_to_link (priv, i) (graph_priv_to_card(priv)->dai_link + (i)) +#define PREFIX "audio-graph-card," +static int asoc_graph_card_startup (struct snd_pcm_substream *substream) {struct snd_soc_pcm_runtime *rtd = substream->private_data;
@@ -98,6 +100,7 @@ static int asoc_graph_card_dai_link_of(struct device_node *ep,struct snd_soc_dai_link *dai_link =graph_priv_to_link (priv, idx);struct graph_dai_props *dai_props =graph_priv_to_props (priv, idx);struct snd_soc_card *card =graph_priv_to_card (priv); +struct device_node *node =of_graph_get_port_parent (ep);int ret;if (is_fe) {
@@ -154,10 +157,17 @@ static int asoc_graph_card_dai_link_of(struct device_node *ep,if (ret <0 )return ret; +/* check "prefix" from top node */ snd_soc_of_parse_audio_prefix (card, &priv->codec_conf, dai_link->codecs->of_node,"prefix" ); +/* check "prefix" from each node if top doesn't have */ +if (!priv->codec_conf.of_node) +snd_soc_of_parse_node_prefix (node, + &priv->codec_conf, + dai_link->codecs->of_node, +PREFIX "prefix" ); } ret =asoc_simple_card_of_parse_tdm (ep, &dai_props->dai);
Signature · 1 line
2.7.4
Mark Brown
maintainerApplied "ASoC: audio-graph-scu-card: tidyup "prefix" parsing" to the asoc tree
The patch
ASoC: audio-graph-scu-card: tidyup "prefix" parsing
has been applied to the asoc tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
Quoted 1 line
From
2624fc7882244abeb4dabbd5b67328676a109b6aMon Sep 17 00:00:00 2001
From: Kuninori Morimoto <[email protected]>
Date: Thu, 22 Nov 2018 00:56:21 +0000
Subject: [PATCH] ASoC: audio-graph-scu-card: tidyup "prefix" parsing
audio-graph-scu-card.c is supporting "prefix" which is used to avoid DAI naming conflict when CPU/Codec matching.
But, sound card might have multi sub-devices, and each codec might need each prefix.
Now, ASoC is supporting snd_soc_of_parse_node_prefix(), let's support it on audio-graph-scu-card, too. It is keeping existing DT style.
It can't support each codec's prefix if sound card had multi sub-devices without this patch.
--- sound/soc/generic/audio-graph-scu-card.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
sound/soc/generic/audio-graph-scu-card.c +10 -0
@@ -39,6 +39,8 @@ struct graph_card_data {#define graph_priv_to_dev (priv) (graph_priv_to_card(priv)->dev)#define graph_priv_to_link (priv, i) (graph_priv_to_card(priv)->dai_link + (i)) +#define PREFIX "audio-graph-card," +static int asoc_graph_card_startup (struct snd_pcm_substream *substream) {struct snd_soc_pcm_runtime *rtd = substream->private_data;
@@ -98,6 +100,7 @@ static int asoc_graph_card_dai_link_of(struct device_node *ep,struct snd_soc_dai_link *dai_link =graph_priv_to_link (priv, idx);struct graph_dai_props *dai_props =graph_priv_to_props (priv, idx);struct snd_soc_card *card =graph_priv_to_card (priv); +struct device_node *node =of_graph_get_port_parent (ep);int ret;if (is_fe) {
@@ -154,10 +157,17 @@ static int asoc_graph_card_dai_link_of(struct device_node *ep,if (ret <0 )return ret; +/* check "prefix" from top node */ snd_soc_of_parse_audio_prefix (card, &priv->codec_conf, dai_link->codecs->of_node,"prefix" ); +/* check "prefix" from each node if top doesn't have */ +if (!priv->codec_conf.of_node) +snd_soc_of_parse_node_prefix (node, + &priv->codec_conf, + dai_link->codecs->of_node, +PREFIX "prefix" ); } ret =asoc_simple_card_of_parse_tdm (ep, &dai_props->dai);
Signature · 1 line
2.19.1
Kuninori Morimoto
maintainerPATCH 6/10 ASoC: audio-graph-scu-card: tidyup "convert-rate/channels" parsing on Doc
In reply to Kuninori MorimotoFrom: Kuninori Morimoto <[email protected]>
audio-graph-scu-card.c is supporting "convert-rate/channels" which is used for DPCM.
But, sound card might have multi codecs, and each codec might need each convert-rate/channels.
This patch supports each codec's convert-rate/channles support. top node convert-rate/channels will overwrite settings if exist.
It can't support each codec's convert-rate/channels if sound card had multi codecs without this patch.
--- Documentation/devicetree/bindings/sound/audio-graph-scu-card.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/devicetree/bindings/sound/audio-graph-scu-card.txt +1 -1
@@ -80,7 +80,6 @@ Example 2. 2 CPU 1 Codec (Mixing) routing = "codec Playback", "DAI0 Playback", "codec Playback", "DAI1 Playback", "DAI0 Capture", "codec Capture"; - convert-rate = <48000>; dais = <&cpu_port0 &cpu_port1>;
@@ -90,6 +89,7 @@ Example 2. 2 CPU 1 Codec (Mixing) ... audio-graph-card,prefix = "codec"; + audio-graph-card,convert-rate = <48000>; port { codec_endpoint0: endpoint { remote-endpoint = <&cpu_endpoint0>;
Signature · 1 line
2.7.4
Mark Brown
maintainerApplied "ASoC: audio-graph-scu-card: tidyup "convert-rate/channels" parsing on Doc" to the asoc tree
The patch
ASoC: audio-graph-scu-card: tidyup "convert-rate/channels" parsing on Doc
has been applied to the asoc tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
Quoted 1 line
From
df976517733e34e9c12828357c19bafea5c90cf5Mon Sep 17 00:00:00 2001
From: Kuninori Morimoto <[email protected]>
Date: Thu, 22 Nov 2018 00:56:41 +0000
Subject: [PATCH] ASoC: audio-graph-scu-card: tidyup "convert-rate/channels"
parsing on Doc
audio-graph-scu-card.c is supporting "convert-rate/channels" which is used for DPCM.
But, sound card might have multi codecs, and each codec might need each convert-rate/channels.
This patch supports each codec's convert-rate/channles support. top node convert-rate/channels will overwrite settings if exist.
It can't support each codec's convert-rate/channels if sound card had multi codecs without this patch.
--- .../devicetree/bindings/sound/audio-graph-scu-card.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/devicetree/bindings/sound/audio-graph-scu-card.txt +1 -1
@@ -80,7 +80,6 @@ Example 2. 2 CPU 1 Codec (Mixing) routing = "codec Playback", "DAI0 Playback", "codec Playback", "DAI1 Playback", "DAI0 Capture", "codec Capture"; - convert-rate = <48000>; dais = <&cpu_port0 &cpu_port1>;
@@ -90,6 +89,7 @@ Example 2. 2 CPU 1 Codec (Mixing) ... audio-graph-card,prefix = "codec"; + audio-graph-card,convert-rate = <48000>; port { codec_endpoint0: endpoint { remote-endpoint = <&cpu_endpoint0>;
Signature · 1 line
2.19.1
Kuninori Morimoto
maintainerPATCH 7/10 ASoC: audio-graph-scu-card: tidyup "convert-rate/channels" parsing
In reply to Kuninori MorimotoFrom: Kuninori Morimoto <[email protected]>
audio-graph-scu-card.c is supporting "convert-rate/channels" which is used for DPCM.
But, sound card might have multi codecs, and each codec might need each convert-rate/channels.
This patch supports each codec's convert-rate/channles support. top node convert-rate/channels will overwrite settings if exist.
It can't support each codec's convert-rate/channels if sound card had multi codecs without this patch.
--- sound/soc/generic/audio-graph-scu-card.c | 7 +++++++ 1 file changed, 7 insertions(+)
sound/soc/generic/audio-graph-scu-card.c +7 -0
@@ -29,6 +29,7 @@ struct graph_card_data {struct asoc_simple_dai dai;struct snd_soc_dai_link_component codecs;struct snd_soc_dai_link_component platform; +struct asoc_simple_card_data adata; } *dai_props;struct snd_soc_dai_link *dai_link;struct asoc_simple_card_data adata;
@@ -85,7 +86,11 @@ static int asoc_graph_card_be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd, struct snd_pcm_hw_params *params) {struct graph_card_data *priv =snd_soc_card_get_drvdata (rtd->card); +struct graph_dai_props *dai_props =graph_priv_to_props (priv, rtd->num); + +asoc_simple_card_convert_fixup (&dai_props->adata, params); +/* overwrite by top level adata if exist */ asoc_simple_card_convert_fixup (&priv->adata, params);return 0 ;
@@ -170,6 +175,8 @@ static int asoc_graph_card_dai_link_of(struct device_node *ep, PREFIX "prefix"); } +asoc_simple_card_parse_convert (dev, node,PREFIX , &dai_props->adata); + ret =asoc_simple_card_of_parse_tdm (ep, &dai_props->dai);if (ret)return ret;
Signature · 1 line
2.7.4
Mark Brown
maintainerApplied "ASoC: audio-graph-scu-card: tidyup "convert-rate/channels" parsing" to the asoc tree
The patch
ASoC: audio-graph-scu-card: tidyup "convert-rate/channels" parsing
has been applied to the asoc tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
Quoted 1 line
From
7f07a39acf0591fd3823abc1af3c5456e708b77eMon Sep 17 00:00:00 2001
From: Kuninori Morimoto <[email protected]>
Date: Thu, 22 Nov 2018 00:56:53 +0000
Subject: [PATCH] ASoC: audio-graph-scu-card: tidyup "convert-rate/channels"
parsing
audio-graph-scu-card.c is supporting "convert-rate/channels" which is used for DPCM.
But, sound card might have multi codecs, and each codec might need each convert-rate/channels.
This patch supports each codec's convert-rate/channles support. top node convert-rate/channels will overwrite settings if exist.
It can't support each codec's convert-rate/channels if sound card had multi codecs without this patch.
--- sound/soc/generic/audio-graph-scu-card.c | 7 +++++++ 1 file changed, 7 insertions(+)
sound/soc/generic/audio-graph-scu-card.c +7 -0
@@ -29,6 +29,7 @@ struct graph_card_data {struct asoc_simple_dai dai;struct snd_soc_dai_link_component codecs;struct snd_soc_dai_link_component platform; +struct asoc_simple_card_data adata; } *dai_props;struct snd_soc_dai_link *dai_link;struct asoc_simple_card_data adata;
@@ -85,7 +86,11 @@ static int asoc_graph_card_be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd, struct snd_pcm_hw_params *params) {struct graph_card_data *priv =snd_soc_card_get_drvdata (rtd->card); +struct graph_dai_props *dai_props =graph_priv_to_props (priv, rtd->num); + +asoc_simple_card_convert_fixup (&dai_props->adata, params); +/* overwrite by top level adata if exist */ asoc_simple_card_convert_fixup (&priv->adata, params);return 0 ;
@@ -170,6 +175,8 @@ static int asoc_graph_card_dai_link_of(struct device_node *ep, PREFIX "prefix"); } +asoc_simple_card_parse_convert (dev, node,PREFIX , &dai_props->adata); + ret =asoc_simple_card_of_parse_tdm (ep, &dai_props->dai);if (ret)return ret;
Signature · 1 line
2.19.1
Kuninori Morimoto
maintainerPATCH 8/10 ASoC: audio-graph-scu-card: tidyup asoc_simple_card_parse_daifmt() timing
In reply to Kuninori MorimotoFrom: Kuninori Morimoto <[email protected]>
Current audio-graph-scu-card driver is parsing codec position for DPCM and consider DAI format. But, current operation is doing totally pointless, because 1) asoc_simple_card_parse_daifmt() will be called not only for 1st codec on current implementation, and it will be used as fixed format
2) it should be called for each CPU/Codec pair.
Let's tidyup asoc_simple_card_parse_daifmt() timing.
--- sound/soc/generic/audio-graph-scu-card.c | 54 ++++++++++---------------------- 1 file changed, 16 insertions(+), 38 deletions(-)
sound/soc/generic/audio-graph-scu-card.c +16 -38
@@ -96,15 +96,16 @@ static int asoc_graph_card_be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd,return 0 ; } -static int asoc_graph_card_dai_link_of (struct device_node *ep, +static int asoc_graph_card_dai_link_of (struct device_node *cpu_ep, +struct device_node *codec_ep,struct graph_card_data *priv, -unsigned int daifmt,int idx,int is_fe) {struct device *dev =graph_priv_to_dev (priv);struct snd_soc_dai_link *dai_link =graph_priv_to_link (priv, idx);struct graph_dai_props *dai_props =graph_priv_to_props (priv, idx);struct snd_soc_card *card =graph_priv_to_card (priv); +struct device_node *ep = is_fe ? cpu_ep : codec_ep;struct device_node *node =of_graph_get_port_parent (ep);int ret;
@@ -185,7 +186,11 @@ static int asoc_graph_card_dai_link_of(struct device_node *ep,if (ret <0 )return ret; - dai_link->dai_fmt = daifmt; + ret =asoc_simple_card_parse_daifmt (dev, cpu_ep, codec_ep, +NULL , &dai_link->dai_fmt); +if (ret <0 ) +return ret; + dai_link->dpcm_playback =1 ; dai_link->dpcm_capture =1 ; dai_link->ops = &asoc_graph_card_ops;
@@ -205,7 +210,6 @@ static int asoc_graph_card_parse_of(struct graph_card_data *priv)struct device_node *codec_ep;struct device_node *codec_port;struct device_node *codec_port_old; -unsigned int daifmt =0 ;int dai_idx, ret;int rc, codec;
@@ -228,26 +232,6 @@ static int asoc_graph_card_parse_of(struct graph_card_data *priv)* see asoc_graph_get_dais_count */ -/* find 1st codec */ -of_for_each_phandle (&it, rc, node,"dais" ,NULL ,0 ) { - cpu_port = it.node; - cpu_ep =of_get_next_child (cpu_port,NULL ); - codec_ep =of_graph_get_remote_endpoint (cpu_ep); - -of_node_put (cpu_ep); -of_node_put (codec_ep); - -if (!codec_ep) -continue ; - - ret =asoc_simple_card_parse_daifmt (dev, cpu_ep, codec_ep, -NULL , &daifmt); -if (ret <0 ) { -of_node_put (cpu_port); - goto parse_of_err; - } - } - dai_idx =0 ; codec_port_old =NULL ;for (codec =0 ; codec <2 ; codec++) {
@@ -264,28 +248,22 @@ static int asoc_graph_card_parse_of(struct graph_card_data *priv)of_node_put (cpu_ep);of_node_put (codec_ep); +of_node_put (cpu_port);of_node_put (codec_port); + it.node =NULL ;if (codec) {if (codec_port_old == codec_port)continue ; codec_port_old = codec_port; - -/* Back-End (= Codec) */ - ret =asoc_graph_card_dai_link_of (codec_ep, priv, daifmt, dai_idx++,0 ); -if (ret <0 ) { -of_node_put (cpu_port); - goto parse_of_err; - } - }else { -/* Front-End (= CPU) */ - ret =asoc_graph_card_dai_link_of (cpu_ep, priv, daifmt, dai_idx++,1 ); -if (ret <0 ) { -of_node_put (cpu_port); - goto parse_of_err; - } } + + ret =asoc_graph_card_dai_link_of (cpu_ep, codec_ep, + priv, dai_idx++, + !codec); +if (ret <0 ) + goto parse_of_err; } }
Signature · 1 line
2.7.4
Mark Brown
maintainerApplied "ASoC: audio-graph-scu-card: tidyup asoc_simple_card_parse_daifmt() timing" to the asoc tree
The patch
ASoC: audio-graph-scu-card: tidyup asoc_simple_card_parse_daifmt() timing
has been applied to the asoc tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
Quoted 1 line
From
338d7159c488268dd4ccc6a69ab4af8f829f75d0Mon Sep 17 00:00:00 2001
From: Kuninori Morimoto <[email protected]>
Date: Thu, 22 Nov 2018 00:57:09 +0000
Subject: [PATCH] ASoC: audio-graph-scu-card: tidyup
asoc_simple_card_parse_daifmt() timing
Current audio-graph-scu-card driver is parsing codec position for DPCM and consider DAI format. But, current operation is doing totally pointless, because 1) asoc_simple_card_parse_daifmt() will be called not only for 1st codec on current implementation, and it will be used as fixed format
2) it should be called for each CPU/Codec pair.
Let's tidyup asoc_simple_card_parse_daifmt() timing.
--- sound/soc/generic/audio-graph-scu-card.c | 54 +++++++----------------- 1 file changed, 16 insertions(+), 38 deletions(-)
sound/soc/generic/audio-graph-scu-card.c +16 -38
@@ -96,15 +96,16 @@ static int asoc_graph_card_be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd,return 0 ; } -static int asoc_graph_card_dai_link_of (struct device_node *ep, +static int asoc_graph_card_dai_link_of (struct device_node *cpu_ep, +struct device_node *codec_ep,struct graph_card_data *priv, -unsigned int daifmt,int idx,int is_fe) {struct device *dev =graph_priv_to_dev (priv);struct snd_soc_dai_link *dai_link =graph_priv_to_link (priv, idx);struct graph_dai_props *dai_props =graph_priv_to_props (priv, idx);struct snd_soc_card *card =graph_priv_to_card (priv); +struct device_node *ep = is_fe ? cpu_ep : codec_ep;struct device_node *node =of_graph_get_port_parent (ep);int ret;
@@ -185,7 +186,11 @@ static int asoc_graph_card_dai_link_of(struct device_node *ep,if (ret <0 )return ret; - dai_link->dai_fmt = daifmt; + ret =asoc_simple_card_parse_daifmt (dev, cpu_ep, codec_ep, +NULL , &dai_link->dai_fmt); +if (ret <0 ) +return ret; + dai_link->dpcm_playback =1 ; dai_link->dpcm_capture =1 ; dai_link->ops = &asoc_graph_card_ops;
@@ -205,7 +210,6 @@ static int asoc_graph_card_parse_of(struct graph_card_data *priv)struct device_node *codec_ep;struct device_node *codec_port;struct device_node *codec_port_old; -unsigned int daifmt =0 ;int dai_idx, ret;int rc, codec;
@@ -228,26 +232,6 @@ static int asoc_graph_card_parse_of(struct graph_card_data *priv)* see asoc_graph_get_dais_count */ -/* find 1st codec */ -of_for_each_phandle (&it, rc, node,"dais" ,NULL ,0 ) { - cpu_port = it.node; - cpu_ep =of_get_next_child (cpu_port,NULL ); - codec_ep =of_graph_get_remote_endpoint (cpu_ep); - -of_node_put (cpu_ep); -of_node_put (codec_ep); - -if (!codec_ep) -continue ; - - ret =asoc_simple_card_parse_daifmt (dev, cpu_ep, codec_ep, -NULL , &daifmt); -if (ret <0 ) { -of_node_put (cpu_port); - goto parse_of_err; - } - } - dai_idx =0 ; codec_port_old =NULL ;for (codec =0 ; codec <2 ; codec++) {
@@ -264,28 +248,22 @@ static int asoc_graph_card_parse_of(struct graph_card_data *priv)of_node_put (cpu_ep);of_node_put (codec_ep); +of_node_put (cpu_port);of_node_put (codec_port); + it.node =NULL ;if (codec) {if (codec_port_old == codec_port)continue ; codec_port_old = codec_port; - -/* Back-End (= Codec) */ - ret =asoc_graph_card_dai_link_of (codec_ep, priv, daifmt, dai_idx++,0 ); -if (ret <0 ) { -of_node_put (cpu_port); - goto parse_of_err; - } - }else { -/* Front-End (= CPU) */ - ret =asoc_graph_card_dai_link_of (cpu_ep, priv, daifmt, dai_idx++,1 ); -if (ret <0 ) { -of_node_put (cpu_port); - goto parse_of_err; - } } + + ret =asoc_graph_card_dai_link_of (cpu_ep, codec_ep, + priv, dai_idx++, + !codec); +if (ret <0 ) + goto parse_of_err; } }
Signature · 1 line
2.19.1
Kuninori Morimoto
maintainerPATCH 9/10 ASoC: audio-graph-card: tidyup typo SND_AUDIO_GRAPH_CARD
In reply to Kuninori MorimotoFrom: Kuninori Morimoto <[email protected]>
1 "simple" is enough on Kconfig help
--- sound/soc/generic/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/generic/Kconfig +1 -1
@@ -20,7 +20,7 @@ config SND_AUDIO_GRAPH_CARD depends on OF select SND_SIMPLE_CARD_UTILS help - This option enables generic simple simple sound card support + This option enables generic simple sound card support with OF-graph DT bindings. config SND_AUDIO_GRAPH_SCU_CARD
Signature · 1 line
2.7.4
Mark Brown
maintainerApplied "ASoC: audio-graph-card: tidyup typo SND_AUDIO_GRAPH_CARD" to the asoc tree
The patch
ASoC: audio-graph-card: tidyup typo SND_AUDIO_GRAPH_CARD
has been applied to the asoc tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
Quoted 1 line
From
c3830f1a00f0c7b224aa64e99adbdc14e86d78d5Mon Sep 17 00:00:00 2001
From: Kuninori Morimoto <[email protected]>
Date: Thu, 22 Nov 2018 00:57:23 +0000
Subject: [PATCH] ASoC: audio-graph-card: tidyup typo SND_AUDIO_GRAPH_CARD
1 "simple" is enough on Kconfig help
--- sound/soc/generic/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/generic/Kconfig +1 -1
@@ -20,7 +20,7 @@ config SND_AUDIO_GRAPH_CARD depends on OF select SND_SIMPLE_CARD_UTILS help - This option enables generic simple simple sound card support + This option enables generic simple sound card support with OF-graph DT bindings. config SND_AUDIO_GRAPH_SCU_CARD
Signature · 1 line
2.19.1
Kuninori Morimoto
maintainerPATCH 10/10 ASoC: audio-graph-card: tidyup define position
In reply to Kuninori MorimotoFrom: Kuninori Morimoto <[email protected]>
commit f986907c9225 ("ASoC: audio-graph-card: add widgets and routing for external amplifier support") added new function asoc_graph_card_outdrv_event(), but the inserted position breaks define area. This patch tidyup it
--- sound/soc/generic/audio-graph-card.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
sound/soc/generic/audio-graph-card.c +5 -5
@@ -36,6 +36,11 @@ struct graph_card_data {struct gpio_desc *pa_gpio; }; +#define graph_priv_to_card (priv) (&(priv)->snd_card) +#define graph_priv_to_props (priv, i) ((priv)->dai_props + (i)) +#define graph_priv_to_dev (priv) (graph_priv_to_card(priv)->dev) +#define graph_priv_to_link (priv, i) (graph_priv_to_card(priv)->dai_link + (i)) +static int asoc_graph_card_outdrv_event (struct snd_soc_dapm_widget *w,struct snd_kcontrol *kcontrol,int event)
@@ -63,11 +68,6 @@ static const struct snd_soc_dapm_widget asoc_graph_card_dapm_widgets[] = { SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD), }; -#define graph_priv_to_card (priv) (&(priv)->snd_card) -#define graph_priv_to_props (priv, i) ((priv)->dai_props + (i)) -#define graph_priv_to_dev (priv) (graph_priv_to_card(priv)->dev) -#define graph_priv_to_link (priv, i) (graph_priv_to_card(priv)->dai_link + (i)) -static int asoc_graph_card_startup (struct snd_pcm_substream *substream) {struct snd_soc_pcm_runtime *rtd = substream->private_data;
Signature · 1 line
2.7.4
Mark Brown
maintainerApplied "ASoC: audio-graph-card: tidyup define position" to the asoc tree
The patch
ASoC: audio-graph-card: tidyup define position
has been applied to the asoc tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
Quoted 1 line
From
64ef0817b9679b525f86773e929777be96f5c728Mon Sep 17 00:00:00 2001
From: Kuninori Morimoto <[email protected]>
Date: Thu, 22 Nov 2018 00:57:40 +0000
Subject: [PATCH] ASoC: audio-graph-card: tidyup define position
commit f986907c9225 ("ASoC: audio-graph-card: add widgets and routing for external amplifier support") added new function asoc_graph_card_outdrv_event(), but the inserted position breaks define area. This patch tidyup it
--- sound/soc/generic/audio-graph-card.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
sound/soc/generic/audio-graph-card.c +5 -5
@@ -36,6 +36,11 @@ struct graph_card_data {struct gpio_desc *pa_gpio; }; +#define graph_priv_to_card (priv) (&(priv)->snd_card) +#define graph_priv_to_props (priv, i) ((priv)->dai_props + (i)) +#define graph_priv_to_dev (priv) (graph_priv_to_card(priv)->dev) +#define graph_priv_to_link (priv, i) (graph_priv_to_card(priv)->dai_link + (i)) +static int asoc_graph_card_outdrv_event (struct snd_soc_dapm_widget *w,struct snd_kcontrol *kcontrol,int event)
@@ -63,11 +68,6 @@ static const struct snd_soc_dapm_widget asoc_graph_card_dapm_widgets[] = { SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD), }; -#define graph_priv_to_card (priv) (&(priv)->snd_card) -#define graph_priv_to_props (priv, i) ((priv)->dai_props + (i)) -#define graph_priv_to_dev (priv) (graph_priv_to_card(priv)->dev) -#define graph_priv_to_link (priv, i) (graph_priv_to_card(priv)->dai_link + (i)) -static int asoc_graph_card_startup (struct snd_pcm_substream *substream) {struct snd_soc_pcm_runtime *rtd = substream->private_data;
Signature · 1 line
2.19.1