* [alsa-devel] [PATCH 00/15] ASoC: soc-core cleanup step7
@ 2019-12-12 1:06 Kuninori Morimoto
2019-12-12 1:07 ` [alsa-devel] [PATCH 01/15] ASoC: soc-core: support snd_soc_dai_link_component for codec_conf Kuninori Morimoto
` (14 more replies)
0 siblings, 15 replies; 18+ messages in thread
From: Kuninori Morimoto @ 2019-12-12 1:06 UTC (permalink / raw)
To: Mark Brown; +Cc: Linux-ALSA
Hi Mark
ASoC has codec_conf, and we are using original
dev_name, of_node for it to finding codec.
But, we already have snd_soc_dai_link_component method.
We can reuse it for codec_conf, too.
This patches are for it.
Kuninori Morimoto (15):
ASoC: soc-core: support snd_soc_dai_link_component for codec_conf
ASoC: fsl: imx-audmix: use snd_soc_dai_link_component for codec_conf
ASoC: intel: kbl_da7219_max98927: use snd_soc_dai_link_component for codec_conf
ASoC: intel: kbl_rt5663_max98927: use snd_soc_dai_link_component for codec_conf
ASoC: intel: kbl_rt5663_rt5514_max98927: use snd_soc_dai_link_component for codec_conf
ASoC: intel: skl_nau88l25_ssm4567: use snd_soc_dai_link_component for codec_conf
ASoC: mediatek: mt8173-rt5650-rt5514: use snd_soc_dai_link_component for codec_conf
ASoC: mediatek: mt8173-rt5650-rt5676: use snd_soc_dai_link_component for codec_conf
ASoC: mediatek: mt8183-da7219-max98357: use snd_soc_dai_link_component for codec_conf
ASoC: samsung: bells: use snd_soc_dai_link_component for codec_conf
ASoC: samsung: lowland: use snd_soc_dai_link_component for codec_conf
ASoC: samsung: neo1973_wm8753: use snd_soc_dai_link_component for codec_conf
ASoC: samsung: speyside: use snd_soc_dai_link_component for codec_conf
ASoC: ti: rx51: use snd_soc_dai_link_component for codec_conf
ASoC: soc-core: remove legacy style of codec_conf
include/sound/soc.h | 4 ++--
sound/soc/fsl/imx-audmix.c | 2 +-
sound/soc/intel/boards/kbl_da7219_max98927.c | 8 ++++----
sound/soc/intel/boards/kbl_rt5663_max98927.c | 4 ++--
sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c | 4 ++--
sound/soc/intel/boards/skl_nau88l25_ssm4567.c | 4 ++--
sound/soc/mediatek/mt8173/mt8173-rt5650-rt5514.c | 2 +-
sound/soc/mediatek/mt8173/mt8173-rt5650-rt5676.c | 2 +-
sound/soc/mediatek/mt8183/mt8183-da7219-max98357.c | 2 +-
sound/soc/samsung/bells.c | 2 +-
sound/soc/samsung/lowland.c | 2 +-
sound/soc/samsung/neo1973_wm8753.c | 2 +-
sound/soc/samsung/speyside.c | 2 +-
sound/soc/soc-core.c | 12 +++++-------
sound/soc/ti/rx51.c | 12 ++++++------
15 files changed, 31 insertions(+), 33 deletions(-)
--
2.7.4
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply [flat|nested] 18+ messages in thread
* [alsa-devel] [PATCH 01/15] ASoC: soc-core: support snd_soc_dai_link_component for codec_conf
2019-12-12 1:06 [alsa-devel] [PATCH 00/15] ASoC: soc-core cleanup step7 Kuninori Morimoto
@ 2019-12-12 1:07 ` Kuninori Morimoto
2019-12-12 2:28 ` Pierre-Louis Bossart
2019-12-12 1:07 ` [alsa-devel] [PATCH 02/15] ASoC: fsl: imx-audmix: use " Kuninori Morimoto
` (13 subsequent siblings)
14 siblings, 1 reply; 18+ messages in thread
From: Kuninori Morimoto @ 2019-12-12 1:07 UTC (permalink / raw)
To: Mark Brown; +Cc: Linux-ALSA
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
To find codec_conf component, it is using dev_name, of_node.
But, we already has this kind of finding component method by
snd_soc_dai_link_component, and snd_soc_is_matching_component().
We shouldn't have duplicate implementation to do same things.
This patch adds snd_soc_dai_link_component support to find
codec_conf component.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
include/sound/soc.h | 3 +++
sound/soc/soc-core.c | 18 +++++++++++-------
2 files changed, 14 insertions(+), 7 deletions(-)
diff --git a/include/sound/soc.h b/include/sound/soc.h
index 82e6523..dab1212 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -949,6 +949,7 @@ struct snd_soc_dai_link {
#define COMP_CODEC(_name, _dai) { .name = _name, .dai_name = _dai, }
#define COMP_PLATFORM(_name) { .name = _name }
#define COMP_AUX(_name) { .name = _name }
+#define COMP_CODEC_CNF(_name) { .name = _name }
#define COMP_DUMMY() { .name = "snd-soc-dummy", .dai_name = "snd-soc-dummy-dai", }
extern struct snd_soc_dai_link_component null_dailink_component[0];
@@ -962,6 +963,8 @@ struct snd_soc_codec_conf {
const char *dev_name;
struct device_node *of_node;
+ struct snd_soc_dai_link_component dlc;
+
/*
* optional map of kcontrol, widget and path name prefixes that are
* associated per device
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index ee77db2..411b83b 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1185,12 +1185,16 @@ static void soc_set_name_prefix(struct snd_soc_card *card,
for (i = 0; i < card->num_configs; i++) {
struct snd_soc_codec_conf *map = &card->codec_conf[i];
- if (map->of_node && of_node != map->of_node)
- continue;
- if (map->dev_name && strcmp(component->name, map->dev_name))
- continue;
- component->name_prefix = map->name_prefix;
- return;
+ /* fixme */
+ if (map->dev_name)
+ map->dlc.name = map->dev_name;
+ if (map->of_node)
+ map->dlc.of_node = map->of_node;
+
+ if (snd_soc_is_matching_component(&map->dlc, component)) {
+ component->name_prefix = map->name_prefix;
+ return;
+ }
}
/*
@@ -2915,7 +2919,7 @@ void snd_soc_of_parse_node_prefix(struct device_node *np,
return;
}
- codec_conf->of_node = of_node;
+ codec_conf->dlc.of_node = of_node;
codec_conf->name_prefix = str;
}
EXPORT_SYMBOL_GPL(snd_soc_of_parse_node_prefix);
--
2.7.4
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [alsa-devel] [PATCH 02/15] ASoC: fsl: imx-audmix: use snd_soc_dai_link_component for codec_conf
2019-12-12 1:06 [alsa-devel] [PATCH 00/15] ASoC: soc-core cleanup step7 Kuninori Morimoto
2019-12-12 1:07 ` [alsa-devel] [PATCH 01/15] ASoC: soc-core: support snd_soc_dai_link_component for codec_conf Kuninori Morimoto
@ 2019-12-12 1:07 ` Kuninori Morimoto
2019-12-12 1:07 ` [alsa-devel] [PATCH 03/15] ASoC: intel: kbl_da7219_max98927: " Kuninori Morimoto
` (12 subsequent siblings)
14 siblings, 0 replies; 18+ messages in thread
From: Kuninori Morimoto @ 2019-12-12 1:07 UTC (permalink / raw)
To: Mark Brown; +Cc: Linux-ALSA
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
We can use snd_soc_dai_link_component to specify codec_conf.
Let's use it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
sound/soc/fsl/imx-audmix.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/fsl/imx-audmix.c b/sound/soc/fsl/imx-audmix.c
index 71590ca..5ef6881 100644
--- a/sound/soc/fsl/imx-audmix.c
+++ b/sound/soc/fsl/imx-audmix.c
@@ -289,7 +289,7 @@ static int imx_audmix_probe(struct platform_device *pdev)
priv->dai[num_dai + i].ignore_pmdown_time = 1;
priv->dai[num_dai + i].ops = &imx_audmix_be_ops;
- priv->dai_conf[i].of_node = args.np;
+ priv->dai_conf[i].dlc.of_node = args.np;
priv->dai_conf[i].name_prefix = dai_name;
priv->dapm_routes[i].source =
--
2.7.4
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [alsa-devel] [PATCH 03/15] ASoC: intel: kbl_da7219_max98927: use snd_soc_dai_link_component for codec_conf
2019-12-12 1:06 [alsa-devel] [PATCH 00/15] ASoC: soc-core cleanup step7 Kuninori Morimoto
2019-12-12 1:07 ` [alsa-devel] [PATCH 01/15] ASoC: soc-core: support snd_soc_dai_link_component for codec_conf Kuninori Morimoto
2019-12-12 1:07 ` [alsa-devel] [PATCH 02/15] ASoC: fsl: imx-audmix: use " Kuninori Morimoto
@ 2019-12-12 1:07 ` Kuninori Morimoto
2019-12-12 1:07 ` [alsa-devel] [PATCH 04/15] ASoC: intel: kbl_rt5663_max98927: " Kuninori Morimoto
` (11 subsequent siblings)
14 siblings, 0 replies; 18+ messages in thread
From: Kuninori Morimoto @ 2019-12-12 1:07 UTC (permalink / raw)
To: Mark Brown; +Cc: Linux-ALSA
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
We can use snd_soc_dai_link_component to specify codec_conf.
Let's use it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
sound/soc/intel/boards/kbl_da7219_max98927.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/sound/soc/intel/boards/kbl_da7219_max98927.c b/sound/soc/intel/boards/kbl_da7219_max98927.c
index 829f95f..2511c05 100644
--- a/sound/soc/intel/boards/kbl_da7219_max98927.c
+++ b/sound/soc/intel/boards/kbl_da7219_max98927.c
@@ -571,12 +571,12 @@ static struct snd_soc_ops skylake_refcap_ops = {
static struct snd_soc_codec_conf max98927_codec_conf[] = {
{
- .dev_name = MAX98927_DEV0_NAME,
+ .dlc = COMP_CODEC_CNF(MAX98927_DEV0_NAME),
.name_prefix = "Right",
},
{
- .dev_name = MAX98927_DEV1_NAME,
+ .dlc = COMP_CODEC_CNF(MAX98927_DEV1_NAME),
.name_prefix = "Left",
},
};
@@ -584,12 +584,12 @@ static struct snd_soc_codec_conf max98927_codec_conf[] = {
static struct snd_soc_codec_conf max98373_codec_conf[] = {
{
- .dev_name = MAX98373_DEV0_NAME,
+ .dlc = COMP_CODEC_CNF(MAX98373_DEV0_NAME),
.name_prefix = "Right",
},
{
- .dev_name = MAX98373_DEV1_NAME,
+ .dlc = COMP_CODEC_CNF(MAX98373_DEV1_NAME),
.name_prefix = "Left",
},
};
--
2.7.4
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [alsa-devel] [PATCH 04/15] ASoC: intel: kbl_rt5663_max98927: use snd_soc_dai_link_component for codec_conf
2019-12-12 1:06 [alsa-devel] [PATCH 00/15] ASoC: soc-core cleanup step7 Kuninori Morimoto
` (2 preceding siblings ...)
2019-12-12 1:07 ` [alsa-devel] [PATCH 03/15] ASoC: intel: kbl_da7219_max98927: " Kuninori Morimoto
@ 2019-12-12 1:07 ` Kuninori Morimoto
2019-12-12 1:07 ` [alsa-devel] [PATCH 05/15] ASoC: intel: kbl_rt5663_rt5514_max98927: " Kuninori Morimoto
` (10 subsequent siblings)
14 siblings, 0 replies; 18+ messages in thread
From: Kuninori Morimoto @ 2019-12-12 1:07 UTC (permalink / raw)
To: Mark Brown; +Cc: Linux-ALSA
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
We can use snd_soc_dai_link_component to specify codec_conf.
Let's use it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
sound/soc/intel/boards/kbl_rt5663_max98927.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/soc/intel/boards/kbl_rt5663_max98927.c b/sound/soc/intel/boards/kbl_rt5663_max98927.c
index 7cefda3..13ed97d 100644
--- a/sound/soc/intel/boards/kbl_rt5663_max98927.c
+++ b/sound/soc/intel/boards/kbl_rt5663_max98927.c
@@ -229,11 +229,11 @@ static const struct snd_soc_dapm_route kabylake_5663_map[] = {
static struct snd_soc_codec_conf max98927_codec_conf[] = {
{
- .dev_name = MAXIM_DEV0_NAME,
+ .dlc = COMP_CODEC_CNF(MAXIM_DEV0_NAME),
.name_prefix = "Right",
},
{
- .dev_name = MAXIM_DEV1_NAME,
+ .dlc = COMP_CODEC_CNF(MAXIM_DEV1_NAME),
.name_prefix = "Left",
},
};
--
2.7.4
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [alsa-devel] [PATCH 05/15] ASoC: intel: kbl_rt5663_rt5514_max98927: use snd_soc_dai_link_component for codec_conf
2019-12-12 1:06 [alsa-devel] [PATCH 00/15] ASoC: soc-core cleanup step7 Kuninori Morimoto
` (3 preceding siblings ...)
2019-12-12 1:07 ` [alsa-devel] [PATCH 04/15] ASoC: intel: kbl_rt5663_max98927: " Kuninori Morimoto
@ 2019-12-12 1:07 ` Kuninori Morimoto
2019-12-12 1:08 ` [alsa-devel] [PATCH 06/15] ASoC: intel: skl_nau88l25_ssm4567: " Kuninori Morimoto
` (9 subsequent siblings)
14 siblings, 0 replies; 18+ messages in thread
From: Kuninori Morimoto @ 2019-12-12 1:07 UTC (permalink / raw)
To: Mark Brown; +Cc: Linux-ALSA
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
We can use snd_soc_dai_link_component to specify codec_conf.
Let's use it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c b/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c
index 3e5f6be..b382986 100644
--- a/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c
+++ b/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c
@@ -193,11 +193,11 @@ static const struct snd_soc_dapm_route kabylake_map[] = {
static struct snd_soc_codec_conf max98927_codec_conf[] = {
{
- .dev_name = MAXIM_DEV0_NAME,
+ .dlc = COMP_CODEC_CNF(MAXIM_DEV0_NAME),
.name_prefix = "Right",
},
{
- .dev_name = MAXIM_DEV1_NAME,
+ .dlc = COMP_CODEC_CNF(MAXIM_DEV1_NAME),
.name_prefix = "Left",
},
};
--
2.7.4
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [alsa-devel] [PATCH 06/15] ASoC: intel: skl_nau88l25_ssm4567: use snd_soc_dai_link_component for codec_conf
2019-12-12 1:06 [alsa-devel] [PATCH 00/15] ASoC: soc-core cleanup step7 Kuninori Morimoto
` (4 preceding siblings ...)
2019-12-12 1:07 ` [alsa-devel] [PATCH 05/15] ASoC: intel: kbl_rt5663_rt5514_max98927: " Kuninori Morimoto
@ 2019-12-12 1:08 ` Kuninori Morimoto
2019-12-12 1:08 ` [alsa-devel] [PATCH 07/15] ASoC: mediatek: mt8173-rt5650-rt5514: " Kuninori Morimoto
` (8 subsequent siblings)
14 siblings, 0 replies; 18+ messages in thread
From: Kuninori Morimoto @ 2019-12-12 1:08 UTC (permalink / raw)
To: Mark Brown; +Cc: Linux-ALSA
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
We can use snd_soc_dai_link_component to specify codec_conf.
Let's use it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
sound/soc/intel/boards/skl_nau88l25_ssm4567.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/soc/intel/boards/skl_nau88l25_ssm4567.c b/sound/soc/intel/boards/skl_nau88l25_ssm4567.c
index 1a7ac8b..d4c167a 100644
--- a/sound/soc/intel/boards/skl_nau88l25_ssm4567.c
+++ b/sound/soc/intel/boards/skl_nau88l25_ssm4567.c
@@ -147,11 +147,11 @@ static const struct snd_soc_dapm_route skylake_map[] = {
static struct snd_soc_codec_conf ssm4567_codec_conf[] = {
{
- .dev_name = "i2c-INT343B:00",
+ .dlc = COMP_CODEC_CNF("i2c-INT343B:00"),
.name_prefix = "Left",
},
{
- .dev_name = "i2c-INT343B:01",
+ .dlc = COMP_CODEC_CNF("i2c-INT343B:01"),
.name_prefix = "Right",
},
};
--
2.7.4
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [alsa-devel] [PATCH 07/15] ASoC: mediatek: mt8173-rt5650-rt5514: use snd_soc_dai_link_component for codec_conf
2019-12-12 1:06 [alsa-devel] [PATCH 00/15] ASoC: soc-core cleanup step7 Kuninori Morimoto
` (5 preceding siblings ...)
2019-12-12 1:08 ` [alsa-devel] [PATCH 06/15] ASoC: intel: skl_nau88l25_ssm4567: " Kuninori Morimoto
@ 2019-12-12 1:08 ` Kuninori Morimoto
2019-12-12 1:08 ` [alsa-devel] [PATCH 08/15] ASoC: mediatek: mt8173-rt5650-rt5676: " Kuninori Morimoto
` (7 subsequent siblings)
14 siblings, 0 replies; 18+ messages in thread
From: Kuninori Morimoto @ 2019-12-12 1:08 UTC (permalink / raw)
To: Mark Brown; +Cc: Linux-ALSA
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
We can use snd_soc_dai_link_component to specify codec_conf.
Let's use it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
sound/soc/mediatek/mt8173/mt8173-rt5650-rt5514.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/mediatek/mt8173/mt8173-rt5650-rt5514.c b/sound/soc/mediatek/mt8173/mt8173-rt5650-rt5514.c
index 8717e87..2e1e61d 100644
--- a/sound/soc/mediatek/mt8173/mt8173-rt5650-rt5514.c
+++ b/sound/soc/mediatek/mt8173/mt8173-rt5650-rt5514.c
@@ -209,7 +209,7 @@ static int mt8173_rt5650_rt5514_dev_probe(struct platform_device *pdev)
"Property 'audio-codec' missing or invalid\n");
return -EINVAL;
}
- mt8173_rt5650_rt5514_codec_conf[0].of_node =
+ mt8173_rt5650_rt5514_codec_conf[0].dlc.of_node =
mt8173_rt5650_rt5514_dais[DAI_LINK_CODEC_I2S].codecs[1].of_node;
card->dev = &pdev->dev;
--
2.7.4
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [alsa-devel] [PATCH 08/15] ASoC: mediatek: mt8173-rt5650-rt5676: use snd_soc_dai_link_component for codec_conf
2019-12-12 1:06 [alsa-devel] [PATCH 00/15] ASoC: soc-core cleanup step7 Kuninori Morimoto
` (6 preceding siblings ...)
2019-12-12 1:08 ` [alsa-devel] [PATCH 07/15] ASoC: mediatek: mt8173-rt5650-rt5514: " Kuninori Morimoto
@ 2019-12-12 1:08 ` Kuninori Morimoto
2019-12-12 1:08 ` [alsa-devel] [PATCH 09/15] ASoC: mediatek: mt8183-da7219-max98357: " Kuninori Morimoto
` (6 subsequent siblings)
14 siblings, 0 replies; 18+ messages in thread
From: Kuninori Morimoto @ 2019-12-12 1:08 UTC (permalink / raw)
To: Mark Brown; +Cc: Linux-ALSA
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
We can use snd_soc_dai_link_component to specify codec_conf.
Let's use it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
sound/soc/mediatek/mt8173/mt8173-rt5650-rt5676.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/mediatek/mt8173/mt8173-rt5650-rt5676.c b/sound/soc/mediatek/mt8173/mt8173-rt5650-rt5676.c
index 9d4dd97..ebcc0b8 100644
--- a/sound/soc/mediatek/mt8173/mt8173-rt5650-rt5676.c
+++ b/sound/soc/mediatek/mt8173/mt8173-rt5650-rt5676.c
@@ -265,7 +265,7 @@ static int mt8173_rt5650_rt5676_dev_probe(struct platform_device *pdev)
"Property 'audio-codec' missing or invalid\n");
return -EINVAL;
}
- mt8173_rt5650_rt5676_codec_conf[0].of_node =
+ mt8173_rt5650_rt5676_codec_conf[0].dlc.of_node =
mt8173_rt5650_rt5676_dais[DAI_LINK_CODEC_I2S].codecs[1].of_node;
mt8173_rt5650_rt5676_dais[DAI_LINK_INTERCODEC].codecs->of_node =
--
2.7.4
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [alsa-devel] [PATCH 09/15] ASoC: mediatek: mt8183-da7219-max98357: use snd_soc_dai_link_component for codec_conf
2019-12-12 1:06 [alsa-devel] [PATCH 00/15] ASoC: soc-core cleanup step7 Kuninori Morimoto
` (7 preceding siblings ...)
2019-12-12 1:08 ` [alsa-devel] [PATCH 08/15] ASoC: mediatek: mt8173-rt5650-rt5676: " Kuninori Morimoto
@ 2019-12-12 1:08 ` Kuninori Morimoto
2019-12-12 1:08 ` [alsa-devel] [PATCH 10/15] ASoC: samsung: bells: " Kuninori Morimoto
` (5 subsequent siblings)
14 siblings, 0 replies; 18+ messages in thread
From: Kuninori Morimoto @ 2019-12-12 1:08 UTC (permalink / raw)
To: Mark Brown; +Cc: Linux-ALSA
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
We can use snd_soc_dai_link_component to specify codec_conf.
Let's use it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
sound/soc/mediatek/mt8183/mt8183-da7219-max98357.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/mediatek/mt8183/mt8183-da7219-max98357.c b/sound/soc/mediatek/mt8183/mt8183-da7219-max98357.c
index 43f99e5..581533c 100644
--- a/sound/soc/mediatek/mt8183/mt8183-da7219-max98357.c
+++ b/sound/soc/mediatek/mt8183/mt8183-da7219-max98357.c
@@ -367,7 +367,7 @@ static struct snd_soc_aux_dev mt8183_da7219_max98357_headset_dev = {
static struct snd_soc_codec_conf mt6358_codec_conf[] = {
{
- .dev_name = "mt6358-sound",
+ .dlc = COMP_CODEC_CNF("mt6358-sound"),
.name_prefix = "Mt6358",
},
};
--
2.7.4
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [alsa-devel] [PATCH 10/15] ASoC: samsung: bells: use snd_soc_dai_link_component for codec_conf
2019-12-12 1:06 [alsa-devel] [PATCH 00/15] ASoC: soc-core cleanup step7 Kuninori Morimoto
` (8 preceding siblings ...)
2019-12-12 1:08 ` [alsa-devel] [PATCH 09/15] ASoC: mediatek: mt8183-da7219-max98357: " Kuninori Morimoto
@ 2019-12-12 1:08 ` Kuninori Morimoto
2019-12-12 1:08 ` [alsa-devel] [PATCH 11/15] ASoC: samsung: lowland: " Kuninori Morimoto
` (4 subsequent siblings)
14 siblings, 0 replies; 18+ messages in thread
From: Kuninori Morimoto @ 2019-12-12 1:08 UTC (permalink / raw)
To: Mark Brown; +Cc: Linux-ALSA
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
We can use snd_soc_dai_link_component to specify codec_conf.
Let's use it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
sound/soc/samsung/bells.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/samsung/bells.c b/sound/soc/samsung/bells.c
index 58d8a81..c1bea86 100644
--- a/sound/soc/samsung/bells.c
+++ b/sound/soc/samsung/bells.c
@@ -381,7 +381,7 @@ static struct snd_soc_dai_link bells_dai_wm5110[] = {
static struct snd_soc_codec_conf bells_codec_conf[] = {
{
- .dev_name = "wm9081.1-006c",
+ .dlc = COMP_CODEC_CNF("wm9081.1-006c"),
.name_prefix = "Sub",
},
};
--
2.7.4
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [alsa-devel] [PATCH 11/15] ASoC: samsung: lowland: use snd_soc_dai_link_component for codec_conf
2019-12-12 1:06 [alsa-devel] [PATCH 00/15] ASoC: soc-core cleanup step7 Kuninori Morimoto
` (9 preceding siblings ...)
2019-12-12 1:08 ` [alsa-devel] [PATCH 10/15] ASoC: samsung: bells: " Kuninori Morimoto
@ 2019-12-12 1:08 ` Kuninori Morimoto
2019-12-12 1:08 ` [alsa-devel] [PATCH 12/15] ASoC: samsung: neo1973_wm8753: " Kuninori Morimoto
` (3 subsequent siblings)
14 siblings, 0 replies; 18+ messages in thread
From: Kuninori Morimoto @ 2019-12-12 1:08 UTC (permalink / raw)
To: Mark Brown; +Cc: Linux-ALSA
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
We can use snd_soc_dai_link_component to specify codec_conf.
Let's use it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
sound/soc/samsung/lowland.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/samsung/lowland.c b/sound/soc/samsung/lowland.c
index 973f22b..0f53bc0 100644
--- a/sound/soc/samsung/lowland.c
+++ b/sound/soc/samsung/lowland.c
@@ -126,7 +126,7 @@ static struct snd_soc_dai_link lowland_dai[] = {
static struct snd_soc_codec_conf lowland_codec_conf[] = {
{
- .dev_name = "wm9081.1-006c",
+ .dlc = COMP_CODEC_CNF("wm9081.1-006c"),
.name_prefix = "Sub",
},
};
--
2.7.4
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [alsa-devel] [PATCH 12/15] ASoC: samsung: neo1973_wm8753: use snd_soc_dai_link_component for codec_conf
2019-12-12 1:06 [alsa-devel] [PATCH 00/15] ASoC: soc-core cleanup step7 Kuninori Morimoto
` (10 preceding siblings ...)
2019-12-12 1:08 ` [alsa-devel] [PATCH 11/15] ASoC: samsung: lowland: " Kuninori Morimoto
@ 2019-12-12 1:08 ` Kuninori Morimoto
2019-12-12 1:08 ` [alsa-devel] [PATCH 13/15] ASoC: samsung: speyside: " Kuninori Morimoto
` (2 subsequent siblings)
14 siblings, 0 replies; 18+ messages in thread
From: Kuninori Morimoto @ 2019-12-12 1:08 UTC (permalink / raw)
To: Mark Brown; +Cc: Linux-ALSA
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
We can use snd_soc_dai_link_component to specify codec_conf.
Let's use it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
sound/soc/samsung/neo1973_wm8753.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/samsung/neo1973_wm8753.c b/sound/soc/samsung/neo1973_wm8753.c
index 38f536b..649d769 100644
--- a/sound/soc/samsung/neo1973_wm8753.c
+++ b/sound/soc/samsung/neo1973_wm8753.c
@@ -303,7 +303,7 @@ static struct snd_soc_aux_dev neo1973_aux_devs[] = {
static struct snd_soc_codec_conf neo1973_codec_conf[] = {
{
- .dev_name = "lm4857.0-007c",
+ .dlc = COMP_CODEC_CNF("lm4857.0-007c"),
.name_prefix = "Amp",
},
};
--
2.7.4
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [alsa-devel] [PATCH 13/15] ASoC: samsung: speyside: use snd_soc_dai_link_component for codec_conf
2019-12-12 1:06 [alsa-devel] [PATCH 00/15] ASoC: soc-core cleanup step7 Kuninori Morimoto
` (11 preceding siblings ...)
2019-12-12 1:08 ` [alsa-devel] [PATCH 12/15] ASoC: samsung: neo1973_wm8753: " Kuninori Morimoto
@ 2019-12-12 1:08 ` Kuninori Morimoto
2019-12-12 1:08 ` [alsa-devel] [PATCH 14/15] ASoC: ti: rx51: " Kuninori Morimoto
2019-12-12 1:08 ` [alsa-devel] [PATCH 15/15] ASoC: soc-core: remove legacy style of codec_conf Kuninori Morimoto
14 siblings, 0 replies; 18+ messages in thread
From: Kuninori Morimoto @ 2019-12-12 1:08 UTC (permalink / raw)
To: Mark Brown; +Cc: Linux-ALSA
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
We can use snd_soc_dai_link_component to specify codec_conf.
Let's use it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
sound/soc/samsung/speyside.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/samsung/speyside.c b/sound/soc/samsung/speyside.c
index 5ccdfe0..7491d16 100644
--- a/sound/soc/samsung/speyside.c
+++ b/sound/soc/samsung/speyside.c
@@ -247,7 +247,7 @@ static struct snd_soc_aux_dev speyside_aux_dev[] = {
static struct snd_soc_codec_conf speyside_codec_conf[] = {
{
- .dev_name = "wm9081.1-006c",
+ .dlc = COMP_CODEC_CNF("wm9081.1-006c"),
.name_prefix = "Sub",
},
};
--
2.7.4
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [alsa-devel] [PATCH 14/15] ASoC: ti: rx51: use snd_soc_dai_link_component for codec_conf
2019-12-12 1:06 [alsa-devel] [PATCH 00/15] ASoC: soc-core cleanup step7 Kuninori Morimoto
` (12 preceding siblings ...)
2019-12-12 1:08 ` [alsa-devel] [PATCH 13/15] ASoC: samsung: speyside: " Kuninori Morimoto
@ 2019-12-12 1:08 ` Kuninori Morimoto
2019-12-12 1:08 ` [alsa-devel] [PATCH 15/15] ASoC: soc-core: remove legacy style of codec_conf Kuninori Morimoto
14 siblings, 0 replies; 18+ messages in thread
From: Kuninori Morimoto @ 2019-12-12 1:08 UTC (permalink / raw)
To: Mark Brown; +Cc: Linux-ALSA
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
We can use snd_soc_dai_link_component to specify codec_conf.
Let's use it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
sound/soc/ti/rx51.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/sound/soc/ti/rx51.c b/sound/soc/ti/rx51.c
index 588f680..1dfc858 100644
--- a/sound/soc/ti/rx51.c
+++ b/sound/soc/ti/rx51.c
@@ -328,11 +328,11 @@ static struct snd_soc_aux_dev rx51_aux_dev[] = {
static struct snd_soc_codec_conf rx51_codec_conf[] = {
{
- .dev_name = "tlv320aic3x-codec.2-0019",
+ .dlc = COMP_CODEC_CNF("tlv320aic3x-codec.2-0019"),
.name_prefix = "b",
},
{
- .dev_name = "tpa6130a2.2-0060",
+ .dlc = COMP_CODEC_CNF("tpa6130a2.2-0060"),
.name_prefix = "TPA6130A2",
},
};
@@ -397,8 +397,8 @@ static int rx51_soc_probe(struct platform_device *pdev)
}
rx51_aux_dev[0].dlc.name = NULL;
rx51_aux_dev[0].dlc.of_node = dai_node;
- rx51_codec_conf[0].dev_name = NULL;
- rx51_codec_conf[0].of_node = dai_node;
+ rx51_codec_conf[0].dlc.name = NULL;
+ rx51_codec_conf[0].dlc.of_node = dai_node;
dai_node = of_parse_phandle(np, "nokia,headphone-amplifier", 0);
if (!dai_node) {
@@ -407,8 +407,8 @@ static int rx51_soc_probe(struct platform_device *pdev)
}
rx51_aux_dev[1].dlc.name = NULL;
rx51_aux_dev[1].dlc.of_node = dai_node;
- rx51_codec_conf[1].dev_name = NULL;
- rx51_codec_conf[1].of_node = dai_node;
+ rx51_codec_conf[1].dlc.name = NULL;
+ rx51_codec_conf[1].dlc.of_node = dai_node;
}
pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL);
--
2.7.4
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [alsa-devel] [PATCH 15/15] ASoC: soc-core: remove legacy style of codec_conf
2019-12-12 1:06 [alsa-devel] [PATCH 00/15] ASoC: soc-core cleanup step7 Kuninori Morimoto
` (13 preceding siblings ...)
2019-12-12 1:08 ` [alsa-devel] [PATCH 14/15] ASoC: ti: rx51: " Kuninori Morimoto
@ 2019-12-12 1:08 ` Kuninori Morimoto
14 siblings, 0 replies; 18+ messages in thread
From: Kuninori Morimoto @ 2019-12-12 1:08 UTC (permalink / raw)
To: Mark Brown; +Cc: Linux-ALSA
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Now all driver is using snd_soc_dai_link_component for codec_conf.
Let's remove legacy style
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
include/sound/soc.h | 3 ---
sound/soc/soc-core.c | 6 ------
2 files changed, 9 deletions(-)
diff --git a/include/sound/soc.h b/include/sound/soc.h
index dab1212..0bd1c18 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -960,9 +960,6 @@ struct snd_soc_codec_conf {
* specify device either by device name, or by
* DT/OF node, but not both.
*/
- const char *dev_name;
- struct device_node *of_node;
-
struct snd_soc_dai_link_component dlc;
/*
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 411b83b..0bd2cb2 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1185,12 +1185,6 @@ static void soc_set_name_prefix(struct snd_soc_card *card,
for (i = 0; i < card->num_configs; i++) {
struct snd_soc_codec_conf *map = &card->codec_conf[i];
- /* fixme */
- if (map->dev_name)
- map->dlc.name = map->dev_name;
- if (map->of_node)
- map->dlc.of_node = map->of_node;
-
if (snd_soc_is_matching_component(&map->dlc, component)) {
component->name_prefix = map->name_prefix;
return;
--
2.7.4
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply related [flat|nested] 18+ messages in thread
* Re: [alsa-devel] [PATCH 01/15] ASoC: soc-core: support snd_soc_dai_link_component for codec_conf
2019-12-12 1:07 ` [alsa-devel] [PATCH 01/15] ASoC: soc-core: support snd_soc_dai_link_component for codec_conf Kuninori Morimoto
@ 2019-12-12 2:28 ` Pierre-Louis Bossart
2019-12-12 2:41 ` Kuninori Morimoto
0 siblings, 1 reply; 18+ messages in thread
From: Pierre-Louis Bossart @ 2019-12-12 2:28 UTC (permalink / raw)
To: Kuninori Morimoto, Mark Brown; +Cc: Linux-ALSA
On 12/11/19 7:07 PM, Kuninori Morimoto wrote:
> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
>
> To find codec_conf component, it is using dev_name, of_node.
> But, we already has this kind of finding component method by
> snd_soc_dai_link_component, and snd_soc_is_matching_component().
> We shouldn't have duplicate implementation to do same things.
> This patch adds snd_soc_dai_link_component support to find
> codec_conf component.
>
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Thanks Morimoto-san, this looks good to me, but I couldn't resist a
small nit-pick below.
> ---
> include/sound/soc.h | 3 +++
> sound/soc/soc-core.c | 18 +++++++++++-------
> 2 files changed, 14 insertions(+), 7 deletions(-)
>
> diff --git a/include/sound/soc.h b/include/sound/soc.h
> index 82e6523..dab1212 100644
> --- a/include/sound/soc.h
> +++ b/include/sound/soc.h
> @@ -949,6 +949,7 @@ struct snd_soc_dai_link {
> #define COMP_CODEC(_name, _dai) { .name = _name, .dai_name = _dai, }
> #define COMP_PLATFORM(_name) { .name = _name }
> #define COMP_AUX(_name) { .name = _name }
> +#define COMP_CODEC_CNF(_name) { .name = _name }
COMP_CODEC_CONF() ?
CNF is not an acronym/concept we use anywhere else, whereas codec_conf
is pretty much the default for variable naming.
> - codec_conf->of_node = of_node;
> + codec_conf->dlc.of_node = of_node;
> codec_conf->name_prefix = str;
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [alsa-devel] [PATCH 01/15] ASoC: soc-core: support snd_soc_dai_link_component for codec_conf
2019-12-12 2:28 ` Pierre-Louis Bossart
@ 2019-12-12 2:41 ` Kuninori Morimoto
0 siblings, 0 replies; 18+ messages in thread
From: Kuninori Morimoto @ 2019-12-12 2:41 UTC (permalink / raw)
To: Pierre-Louis Bossart; +Cc: Linux-ALSA, Mark Brown
Hi Pierre-Louis
Thank you for your feedback
> > From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> >
> > To find codec_conf component, it is using dev_name, of_node.
> > But, we already has this kind of finding component method by
> > snd_soc_dai_link_component, and snd_soc_is_matching_component().
> > We shouldn't have duplicate implementation to do same things.
> > This patch adds snd_soc_dai_link_component support to find
> > codec_conf component.
> >
> > Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
>
> Thanks Morimoto-san, this looks good to me, but I couldn't resist a
> small nit-pick below.
>
> > ---
> > include/sound/soc.h | 3 +++
> > sound/soc/soc-core.c | 18 +++++++++++-------
> > 2 files changed, 14 insertions(+), 7 deletions(-)
> >
> > diff --git a/include/sound/soc.h b/include/sound/soc.h
> > index 82e6523..dab1212 100644
> > --- a/include/sound/soc.h
> > +++ b/include/sound/soc.h
> > @@ -949,6 +949,7 @@ struct snd_soc_dai_link {
> > #define COMP_CODEC(_name, _dai) { .name = _name, .dai_name = _dai, }
> > #define COMP_PLATFORM(_name) { .name = _name }
> > #define COMP_AUX(_name) { .name = _name }
> > +#define COMP_CODEC_CNF(_name) { .name = _name }
>
> COMP_CODEC_CONF() ?
>
> CNF is not an acronym/concept we use anywhere else, whereas codec_conf
> is pretty much the default for variable naming.
I see.
I will fixup and post v2 tomorrow.
Thank you for your help !!
Best regards
---
Kuninori Morimoto
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2019-12-12 2:42 UTC | newest]
Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-12 1:06 [alsa-devel] [PATCH 00/15] ASoC: soc-core cleanup step7 Kuninori Morimoto
2019-12-12 1:07 ` [alsa-devel] [PATCH 01/15] ASoC: soc-core: support snd_soc_dai_link_component for codec_conf Kuninori Morimoto
2019-12-12 2:28 ` Pierre-Louis Bossart
2019-12-12 2:41 ` Kuninori Morimoto
2019-12-12 1:07 ` [alsa-devel] [PATCH 02/15] ASoC: fsl: imx-audmix: use " Kuninori Morimoto
2019-12-12 1:07 ` [alsa-devel] [PATCH 03/15] ASoC: intel: kbl_da7219_max98927: " Kuninori Morimoto
2019-12-12 1:07 ` [alsa-devel] [PATCH 04/15] ASoC: intel: kbl_rt5663_max98927: " Kuninori Morimoto
2019-12-12 1:07 ` [alsa-devel] [PATCH 05/15] ASoC: intel: kbl_rt5663_rt5514_max98927: " Kuninori Morimoto
2019-12-12 1:08 ` [alsa-devel] [PATCH 06/15] ASoC: intel: skl_nau88l25_ssm4567: " Kuninori Morimoto
2019-12-12 1:08 ` [alsa-devel] [PATCH 07/15] ASoC: mediatek: mt8173-rt5650-rt5514: " Kuninori Morimoto
2019-12-12 1:08 ` [alsa-devel] [PATCH 08/15] ASoC: mediatek: mt8173-rt5650-rt5676: " Kuninori Morimoto
2019-12-12 1:08 ` [alsa-devel] [PATCH 09/15] ASoC: mediatek: mt8183-da7219-max98357: " Kuninori Morimoto
2019-12-12 1:08 ` [alsa-devel] [PATCH 10/15] ASoC: samsung: bells: " Kuninori Morimoto
2019-12-12 1:08 ` [alsa-devel] [PATCH 11/15] ASoC: samsung: lowland: " Kuninori Morimoto
2019-12-12 1:08 ` [alsa-devel] [PATCH 12/15] ASoC: samsung: neo1973_wm8753: " Kuninori Morimoto
2019-12-12 1:08 ` [alsa-devel] [PATCH 13/15] ASoC: samsung: speyside: " Kuninori Morimoto
2019-12-12 1:08 ` [alsa-devel] [PATCH 14/15] ASoC: ti: rx51: " Kuninori Morimoto
2019-12-12 1:08 ` [alsa-devel] [PATCH 15/15] ASoC: soc-core: remove legacy style of codec_conf Kuninori Morimoto
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).