* [PATCH v2 0/7] ASoC: add soc-link
@ 2020-05-21 1:55 Kuninori Morimoto
2020-05-21 1:56 ` [PATCH v2 1/7] ASoC: add soc-link.c Kuninori Morimoto
` (7 more replies)
0 siblings, 8 replies; 21+ messages in thread
From: Kuninori Morimoto @ 2020-05-21 1:55 UTC (permalink / raw)
To: Mark Brown; +Cc: Linux-ALSA
Hi Mark
Current ALSA SoC is handling dai_link related operation,
but it is implmemented directly without using function/macro,
and at random place.
This v2 patch-set creates new snd_soc_link_xxx() functions
which handles dai_link related operation,
and implmement these at new soc-link.c.
v1 -> v2
- #include <sound/soc-link.h> is added on each c source file
instead of soc.h
- not have extra error message after snd_soc_link_xxx(),
because it already indicate it via snc_link_ret()
- snd_soc_link_compr_xxx() doesn't have rtd parameter,
because it can be created from cstream
Link: https://lore.kernel.org/r/877dx868op.wl-kuninori.morimoto.gx@renesas.com
Kuninori Morimoto (7):
ASoC: add soc-link.c
ASoC: soc-link: move soc_rtd_xxx()
ASoC: soc-link: remove unneeded parameter from snd_soc_link_xxx()
ASoC: soc-link: add snd_soc_link_be_hw_params_fixup()
ASoC: soc-link: add snd_soc_link_compr_startup()
ASoC: soc-link: add snd_soc_link_compr_shutdown()
ASoC: soc-link: add snd_soc_link_compr_set_params()
include/sound/soc-link.h | 27 +++++++
sound/soc/Makefile | 2 +-
sound/soc/soc-compress.c | 46 ++++--------
sound/soc/soc-core.c | 18 ++---
sound/soc/soc-dai.c | 9 ++-
sound/soc/soc-link.c | 150 +++++++++++++++++++++++++++++++++++++++
sound/soc/soc-pcm.c | 86 ++++------------------
7 files changed, 219 insertions(+), 119 deletions(-)
create mode 100644 include/sound/soc-link.h
create mode 100644 sound/soc/soc-link.c
--
2.17.1
Thank you for your help !!
Best regards
---
Kuninori Morimoto
^ permalink raw reply [flat|nested] 21+ messages in thread
* [PATCH v2 1/7] ASoC: add soc-link.c
2020-05-21 1:55 [PATCH v2 0/7] ASoC: add soc-link Kuninori Morimoto
@ 2020-05-21 1:56 ` Kuninori Morimoto
2020-05-21 8:34 ` kbuild test robot
` (2 more replies)
2020-05-21 1:56 ` [PATCH v2 2/7] ASoC: soc-link: move soc_rtd_xxx() Kuninori Morimoto
` (6 subsequent siblings)
7 siblings, 3 replies; 21+ messages in thread
From: Kuninori Morimoto @ 2020-05-21 1:56 UTC (permalink / raw)
To: Mark Brown; +Cc: Linux-ALSA
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Current ALSA SoC has many dai_link->xxx() functions.
But, it is implemented randomly at random place.
This patch creats new soc-link.c and collect dai_link related
operation into it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
include/sound/soc-link.h | 13 +++++++++++++
sound/soc/Makefile | 2 +-
sound/soc/soc-core.c | 12 ++++--------
sound/soc/soc-link.c | 36 ++++++++++++++++++++++++++++++++++++
4 files changed, 54 insertions(+), 9 deletions(-)
create mode 100644 include/sound/soc-link.h
create mode 100644 sound/soc/soc-link.c
diff --git a/include/sound/soc-link.h b/include/sound/soc-link.h
new file mode 100644
index 000000000000..7fc5cead5942
--- /dev/null
+++ b/include/sound/soc-link.h
@@ -0,0 +1,13 @@
+/* SPDX-License-Identifier: GPL-2.0
+ *
+ * soc-link.h
+ *
+ * Copyright (C) 2019 Renesas Electronics Corp.
+ * Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
+ */
+#ifndef __SOC_LINK_H
+#define __SOC_LINK_H
+
+int snd_soc_link_init(struct snd_soc_pcm_runtime *rtd);
+
+#endif /* __SOC_LINK_H */
diff --git a/sound/soc/Makefile b/sound/soc/Makefile
index 861a21b79484..70a5f19ea3a1 100644
--- a/sound/soc/Makefile
+++ b/sound/soc/Makefile
@@ -1,6 +1,6 @@
# SPDX-License-Identifier: GPL-2.0
snd-soc-core-objs := soc-core.o soc-dapm.o soc-jack.o soc-utils.o soc-dai.o soc-component.o
-snd-soc-core-objs += soc-pcm.o soc-io.o soc-devres.o soc-ops.o
+snd-soc-core-objs += soc-pcm.o soc-io.o soc-devres.o soc-ops.o soc-link.o
snd-soc-core-$(CONFIG_SND_SOC_COMPRESS) += soc-compress.o
ifneq ($(CONFIG_SND_SOC_TOPOLOGY),)
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index e697258d2ffc..955e175643d7 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -38,6 +38,7 @@
#include <sound/soc.h>
#include <sound/soc-dpcm.h>
#include <sound/soc-topology.h>
+#include <sound/soc-link.h>
#include <sound/initval.h>
#define CREATE_TRACE_POINTS
@@ -1049,14 +1050,9 @@ static int soc_init_pcm_runtime(struct snd_soc_card *card,
rtd->pmdown_time = pmdown_time;
/* do machine specific initialization */
- if (dai_link->init) {
- ret = dai_link->init(rtd);
- if (ret < 0) {
- dev_err(card->dev, "ASoC: failed to init %s: %d\n",
- dai_link->name, ret);
- return ret;
- }
- }
+ ret = snd_soc_link_init(rtd);
+ if (ret < 0)
+ return ret;
if (dai_link->dai_fmt) {
ret = snd_soc_runtime_set_dai_fmt(rtd, dai_link->dai_fmt);
diff --git a/sound/soc/soc-link.c b/sound/soc/soc-link.c
new file mode 100644
index 000000000000..4bdd8d0dd93a
--- /dev/null
+++ b/sound/soc/soc-link.c
@@ -0,0 +1,36 @@
+// SPDX-License-Identifier: GPL-2.0
+//
+// soc-link.c
+//
+// Copyright (C) 2019 Renesas Electronics Corp.
+// Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
+//
+#include <sound/soc.h>
+
+#define soc_link_ret(rtd, ret) _soc_link_ret(rtd, __func__, ret)
+static inline int _soc_link_ret(struct snd_soc_pcm_runtime *rtd,
+ const char *func, int ret)
+{
+ switch (ret) {
+ case -EPROBE_DEFER:
+ case -ENOTSUPP:
+ case 0:
+ break;
+ default:
+ dev_err(rtd->dev,
+ "ASoC: error at %s on %s: %d\n",
+ func, rtd->dai_link->name, ret);
+ }
+
+ return ret;
+}
+
+int snd_soc_link_init(struct snd_soc_pcm_runtime *rtd)
+{
+ int ret = 0;
+
+ if (rtd->dai_link->init)
+ ret = rtd->dai_link->init(rtd);
+
+ return soc_link_ret(rtd, ret);
+}
--
2.17.1
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [PATCH v2 2/7] ASoC: soc-link: move soc_rtd_xxx()
2020-05-21 1:55 [PATCH v2 0/7] ASoC: add soc-link Kuninori Morimoto
2020-05-21 1:56 ` [PATCH v2 1/7] ASoC: add soc-link.c Kuninori Morimoto
@ 2020-05-21 1:56 ` Kuninori Morimoto
2020-05-21 9:34 ` kbuild test robot
2020-05-21 10:54 ` kbuild test robot
2020-05-21 1:57 ` [PATCH v2 3/7] ASoC: soc-link: remove unneeded parameter from snd_soc_link_xxx() Kuninori Morimoto
` (5 subsequent siblings)
7 siblings, 2 replies; 21+ messages in thread
From: Kuninori Morimoto @ 2020-05-21 1:56 UTC (permalink / raw)
To: Mark Brown; +Cc: Linux-ALSA
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
dai_link related function should be implemented at
soc-link.c.
This patch moves soc-pcm soc_rtd_xxx()
to soc-link as snd_soc_link_xxx()
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
include/sound/soc-link.h | 13 ++++++
sound/soc/soc-link.c | 65 +++++++++++++++++++++++++++++
sound/soc/soc-pcm.c | 88 ++++++----------------------------------
3 files changed, 91 insertions(+), 75 deletions(-)
diff --git a/include/sound/soc-link.h b/include/sound/soc-link.h
index 7fc5cead5942..689aa93be78e 100644
--- a/include/sound/soc-link.h
+++ b/include/sound/soc-link.h
@@ -9,5 +9,18 @@
#define __SOC_LINK_H
int snd_soc_link_init(struct snd_soc_pcm_runtime *rtd);
+int snd_soc_link_startup(struct snd_soc_pcm_runtime *rtd,
+ struct snd_pcm_substream *substream);
+void snd_soc_link_shutdown(struct snd_soc_pcm_runtime *rtd,
+ struct snd_pcm_substream *substream);
+int snd_soc_link_prepare(struct snd_soc_pcm_runtime *rtd,
+ struct snd_pcm_substream *substream);
+int snd_soc_link_hw_params(struct snd_soc_pcm_runtime *rtd,
+ struct snd_pcm_substream *substream,
+ struct snd_pcm_hw_params *params);
+void snd_soc_link_hw_free(struct snd_soc_pcm_runtime *rtd,
+ struct snd_pcm_substream *substream);
+int snd_soc_link_trigger(struct snd_soc_pcm_runtime *rtd,
+ struct snd_pcm_substream *substream, int cmd);
#endif /* __SOC_LINK_H */
diff --git a/sound/soc/soc-link.c b/sound/soc/soc-link.c
index 4bdd8d0dd93a..be6a6ecfc9dc 100644
--- a/sound/soc/soc-link.c
+++ b/sound/soc/soc-link.c
@@ -34,3 +34,68 @@ int snd_soc_link_init(struct snd_soc_pcm_runtime *rtd)
return soc_link_ret(rtd, ret);
}
+
+int snd_soc_link_startup(struct snd_soc_pcm_runtime *rtd,
+ struct snd_pcm_substream *substream)
+{
+ int ret = 0;
+
+ if (rtd->dai_link->ops &&
+ rtd->dai_link->ops->startup)
+ ret = rtd->dai_link->ops->startup(substream);
+
+ return soc_link_ret(rtd, ret);
+}
+
+void snd_soc_link_shutdown(struct snd_soc_pcm_runtime *rtd,
+ struct snd_pcm_substream *substream)
+{
+ if (rtd->dai_link->ops &&
+ rtd->dai_link->ops->shutdown)
+ rtd->dai_link->ops->shutdown(substream);
+}
+
+int snd_soc_link_prepare(struct snd_soc_pcm_runtime *rtd,
+ struct snd_pcm_substream *substream)
+{
+ int ret = 0;
+
+ if (rtd->dai_link->ops &&
+ rtd->dai_link->ops->prepare)
+ ret = rtd->dai_link->ops->prepare(substream);
+
+ return soc_link_ret(rtd, ret);
+}
+
+int snd_soc_link_hw_params(struct snd_soc_pcm_runtime *rtd,
+ struct snd_pcm_substream *substream,
+ struct snd_pcm_hw_params *params)
+{
+ int ret = 0;
+
+ if (rtd->dai_link->ops &&
+ rtd->dai_link->ops->hw_params)
+ ret = rtd->dai_link->ops->hw_params(substream, params);
+
+ return soc_link_ret(rtd, ret);
+}
+
+void snd_soc_link_hw_free(struct snd_soc_pcm_runtime *rtd,
+ struct snd_pcm_substream *substream)
+{
+ if (rtd->dai_link->ops &&
+ rtd->dai_link->ops->hw_free)
+ rtd->dai_link->ops->hw_free(substream);
+}
+
+int snd_soc_link_trigger(struct snd_soc_pcm_runtime *rtd,
+ struct snd_pcm_substream *substream, int cmd)
+{
+ int ret = 0;
+
+ if (rtd->dai_link->ops &&
+ rtd->dai_link->ops->trigger)
+ ret = rtd->dai_link->ops->trigger(substream, cmd);
+
+ return soc_link_ret(rtd, ret);
+}
diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
index b7899da4217e..f79e2305dcc9 100644
--- a/sound/soc/soc-pcm.c
+++ b/sound/soc/soc-pcm.c
@@ -24,6 +24,7 @@
#include <sound/pcm_params.h>
#include <sound/soc.h>
#include <sound/soc-dpcm.h>
+#include <sound/soc-link.h>
#include <sound/initval.h>
#define DPCM_MAX_BE_USERS 8
@@ -202,60 +203,6 @@ static inline void dpcm_remove_debugfs_state(struct snd_soc_dpcm *dpcm)
}
#endif
-static int soc_rtd_startup(struct snd_soc_pcm_runtime *rtd,
- struct snd_pcm_substream *substream)
-{
- if (rtd->dai_link->ops &&
- rtd->dai_link->ops->startup)
- return rtd->dai_link->ops->startup(substream);
- return 0;
-}
-
-static void soc_rtd_shutdown(struct snd_soc_pcm_runtime *rtd,
- struct snd_pcm_substream *substream)
-{
- if (rtd->dai_link->ops &&
- rtd->dai_link->ops->shutdown)
- rtd->dai_link->ops->shutdown(substream);
-}
-
-static int soc_rtd_prepare(struct snd_soc_pcm_runtime *rtd,
- struct snd_pcm_substream *substream)
-{
- if (rtd->dai_link->ops &&
- rtd->dai_link->ops->prepare)
- return rtd->dai_link->ops->prepare(substream);
- return 0;
-}
-
-static int soc_rtd_hw_params(struct snd_soc_pcm_runtime *rtd,
- struct snd_pcm_substream *substream,
- struct snd_pcm_hw_params *params)
-{
- if (rtd->dai_link->ops &&
- rtd->dai_link->ops->hw_params)
- return rtd->dai_link->ops->hw_params(substream, params);
- return 0;
-}
-
-static void soc_rtd_hw_free(struct snd_soc_pcm_runtime *rtd,
- struct snd_pcm_substream *substream)
-{
- if (rtd->dai_link->ops &&
- rtd->dai_link->ops->hw_free)
- rtd->dai_link->ops->hw_free(substream);
-}
-
-static int soc_rtd_trigger(struct snd_soc_pcm_runtime *rtd,
- struct snd_pcm_substream *substream,
- int cmd)
-{
- if (rtd->dai_link->ops &&
- rtd->dai_link->ops->trigger)
- return rtd->dai_link->ops->trigger(substream, cmd);
- return 0;
-}
-
/**
* snd_soc_runtime_action() - Increment/Decrement active count for
* PCM runtime components
@@ -736,7 +683,7 @@ static int soc_pcm_close(struct snd_pcm_substream *substream)
for_each_rtd_dais(rtd, i, dai)
snd_soc_dai_shutdown(dai, substream);
- soc_rtd_shutdown(rtd, substream);
+ snd_soc_link_shutdown(rtd, substream);
soc_pcm_components_close(substream);
@@ -783,12 +730,9 @@ static int soc_pcm_open(struct snd_pcm_substream *substream)
if (ret < 0)
goto component_err;
- ret = soc_rtd_startup(rtd, substream);
- if (ret < 0) {
- pr_err("ASoC: %s startup failed: %d\n",
- rtd->dai_link->name, ret);
+ ret = snd_soc_link_startup(substream);
+ if (ret < 0)
goto rtd_startup_err;
- }
/* startup the audio subsystem */
for_each_rtd_dais(rtd, i, dai) {
@@ -870,7 +814,7 @@ static int soc_pcm_open(struct snd_pcm_substream *substream)
for_each_rtd_dais(rtd, i, dai)
snd_soc_dai_shutdown(dai, substream);
- soc_rtd_shutdown(rtd, substream);
+ snd_soc_link_shutdown(rtd, substream);
rtd_startup_err:
soc_pcm_components_close(substream);
component_err:
@@ -912,12 +856,9 @@ static int soc_pcm_prepare(struct snd_pcm_substream *substream)
mutex_lock_nested(&rtd->card->pcm_mutex, rtd->card->pcm_subclass);
- ret = soc_rtd_prepare(rtd, substream);
- if (ret < 0) {
- dev_err(rtd->card->dev,
- "ASoC: machine prepare error: %d\n", ret);
+ ret = snd_soc_link_prepare(substream);
+ if (ret < 0)
goto out;
- }
for_each_rtd_components(rtd, i, component) {
ret = snd_soc_component_prepare(component, substream);
@@ -1002,12 +943,9 @@ static int soc_pcm_hw_params(struct snd_pcm_substream *substream,
if (ret)
goto out;
- ret = soc_rtd_hw_params(rtd, substream, params);
- if (ret < 0) {
- dev_err(rtd->card->dev,
- "ASoC: machine hw_params failed: %d\n", ret);
+ ret = snd_soc_link_hw_params(substream, params);
+ if (ret < 0)
goto out;
- }
for_each_rtd_codec_dais(rtd, i, codec_dai) {
struct snd_pcm_hw_params codec_params;
@@ -1117,7 +1055,7 @@ static int soc_pcm_hw_params(struct snd_pcm_substream *substream,
codec_dai->rate = 0;
}
- soc_rtd_hw_free(rtd, substream);
+ snd_soc_link_hw_free(rtd, substream);
mutex_unlock(&rtd->card->pcm_mutex);
return ret;
@@ -1149,7 +1087,7 @@ static int soc_pcm_hw_free(struct snd_pcm_substream *substream)
}
/* free any machine hw params */
- soc_rtd_hw_free(rtd, substream);
+ snd_soc_link_hw_free(rtd, substream);
/* free any component resources */
soc_pcm_components_hw_free(substream, NULL);
@@ -1172,7 +1110,7 @@ static int soc_pcm_trigger_start(struct snd_pcm_substream *substream, int cmd)
struct snd_soc_component *component;
int i, ret;
- ret = soc_rtd_trigger(rtd, substream, cmd);
+ ret = snd_soc_link_trigger(rtd, substream, cmd);
if (ret < 0)
return ret;
@@ -1201,7 +1139,7 @@ static int soc_pcm_trigger_stop(struct snd_pcm_substream *substream, int cmd)
return ret;
}
- ret = soc_rtd_trigger(rtd, substream, cmd);
+ ret = snd_soc_link_trigger(rtd, substream, cmd);
if (ret < 0)
return ret;
--
2.17.1
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [PATCH v2 3/7] ASoC: soc-link: remove unneeded parameter from snd_soc_link_xxx()
2020-05-21 1:55 [PATCH v2 0/7] ASoC: add soc-link Kuninori Morimoto
2020-05-21 1:56 ` [PATCH v2 1/7] ASoC: add soc-link.c Kuninori Morimoto
2020-05-21 1:56 ` [PATCH v2 2/7] ASoC: soc-link: move soc_rtd_xxx() Kuninori Morimoto
@ 2020-05-21 1:57 ` Kuninori Morimoto
2020-05-21 1:57 ` [PATCH v2 4/7] ASoC: soc-link: add snd_soc_link_be_hw_params_fixup() Kuninori Morimoto
` (4 subsequent siblings)
7 siblings, 0 replies; 21+ messages in thread
From: Kuninori Morimoto @ 2020-05-21 1:57 UTC (permalink / raw)
To: Mark Brown; +Cc: Linux-ALSA
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
"rtd" can be created from "substream".
Let's cleanup snd_soc_link_xxx().
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
include/sound/soc-link.h | 18 ++++++------------
sound/soc/soc-link.c | 26 ++++++++++++++------------
sound/soc/soc-pcm.c | 12 ++++++------
3 files changed, 26 insertions(+), 30 deletions(-)
diff --git a/include/sound/soc-link.h b/include/sound/soc-link.h
index 689aa93be78e..2a81dca945cd 100644
--- a/include/sound/soc-link.h
+++ b/include/sound/soc-link.h
@@ -9,18 +9,12 @@
#define __SOC_LINK_H
int snd_soc_link_init(struct snd_soc_pcm_runtime *rtd);
-int snd_soc_link_startup(struct snd_soc_pcm_runtime *rtd,
- struct snd_pcm_substream *substream);
-void snd_soc_link_shutdown(struct snd_soc_pcm_runtime *rtd,
- struct snd_pcm_substream *substream);
-int snd_soc_link_prepare(struct snd_soc_pcm_runtime *rtd,
- struct snd_pcm_substream *substream);
-int snd_soc_link_hw_params(struct snd_soc_pcm_runtime *rtd,
- struct snd_pcm_substream *substream,
+int snd_soc_link_startup(struct snd_pcm_substream *substream);
+void snd_soc_link_shutdown(struct snd_pcm_substream *substream);
+int snd_soc_link_prepare(struct snd_pcm_substream *substream);
+int snd_soc_link_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params);
-void snd_soc_link_hw_free(struct snd_soc_pcm_runtime *rtd,
- struct snd_pcm_substream *substream);
-int snd_soc_link_trigger(struct snd_soc_pcm_runtime *rtd,
- struct snd_pcm_substream *substream, int cmd);
+void snd_soc_link_hw_free(struct snd_pcm_substream *substream);
+int snd_soc_link_trigger(struct snd_pcm_substream *substream, int cmd);
#endif /* __SOC_LINK_H */
diff --git a/sound/soc/soc-link.c b/sound/soc/soc-link.c
index be6a6ecfc9dc..691910e82bff 100644
--- a/sound/soc/soc-link.c
+++ b/sound/soc/soc-link.c
@@ -35,9 +35,9 @@ int snd_soc_link_init(struct snd_soc_pcm_runtime *rtd)
return soc_link_ret(rtd, ret);
}
-int snd_soc_link_startup(struct snd_soc_pcm_runtime *rtd,
- struct snd_pcm_substream *substream)
+int snd_soc_link_startup(struct snd_pcm_substream *substream)
{
+ struct snd_soc_pcm_runtime *rtd = substream->private_data;
int ret = 0;
if (rtd->dai_link->ops &&
@@ -47,17 +47,18 @@ int snd_soc_link_startup(struct snd_soc_pcm_runtime *rtd,
return soc_link_ret(rtd, ret);
}
-void snd_soc_link_shutdown(struct snd_soc_pcm_runtime *rtd,
- struct snd_pcm_substream *substream)
+void snd_soc_link_shutdown(struct snd_pcm_substream *substream)
{
+ struct snd_soc_pcm_runtime *rtd = substream->private_data;
+
if (rtd->dai_link->ops &&
rtd->dai_link->ops->shutdown)
rtd->dai_link->ops->shutdown(substream);
}
-int snd_soc_link_prepare(struct snd_soc_pcm_runtime *rtd,
- struct snd_pcm_substream *substream)
+int snd_soc_link_prepare(struct snd_pcm_substream *substream)
{
+ struct snd_soc_pcm_runtime *rtd = substream->private_data;
int ret = 0;
if (rtd->dai_link->ops &&
@@ -67,10 +68,10 @@ int snd_soc_link_prepare(struct snd_soc_pcm_runtime *rtd,
return soc_link_ret(rtd, ret);
}
-int snd_soc_link_hw_params(struct snd_soc_pcm_runtime *rtd,
- struct snd_pcm_substream *substream,
+int snd_soc_link_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params)
{
+ struct snd_soc_pcm_runtime *rtd = substream->private_data;
int ret = 0;
if (rtd->dai_link->ops &&
@@ -80,17 +81,18 @@ int snd_soc_link_hw_params(struct snd_soc_pcm_runtime *rtd,
return soc_link_ret(rtd, ret);
}
-void snd_soc_link_hw_free(struct snd_soc_pcm_runtime *rtd,
- struct snd_pcm_substream *substream)
+void snd_soc_link_hw_free(struct snd_pcm_substream *substream)
{
+ struct snd_soc_pcm_runtime *rtd = substream->private_data;
+
if (rtd->dai_link->ops &&
rtd->dai_link->ops->hw_free)
rtd->dai_link->ops->hw_free(substream);
}
-int snd_soc_link_trigger(struct snd_soc_pcm_runtime *rtd,
- struct snd_pcm_substream *substream, int cmd)
+int snd_soc_link_trigger(struct snd_pcm_substream *substream, int cmd)
{
+ struct snd_soc_pcm_runtime *rtd = substream->private_data;
int ret = 0;
if (rtd->dai_link->ops &&
diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
index f79e2305dcc9..0204a3ecfc8b 100644
--- a/sound/soc/soc-pcm.c
+++ b/sound/soc/soc-pcm.c
@@ -683,7 +683,7 @@ static int soc_pcm_close(struct snd_pcm_substream *substream)
for_each_rtd_dais(rtd, i, dai)
snd_soc_dai_shutdown(dai, substream);
- snd_soc_link_shutdown(rtd, substream);
+ snd_soc_link_shutdown(substream);
soc_pcm_components_close(substream);
@@ -814,7 +814,7 @@ static int soc_pcm_open(struct snd_pcm_substream *substream)
for_each_rtd_dais(rtd, i, dai)
snd_soc_dai_shutdown(dai, substream);
- snd_soc_link_shutdown(rtd, substream);
+ snd_soc_link_shutdown(substream);
rtd_startup_err:
soc_pcm_components_close(substream);
component_err:
@@ -1055,7 +1055,7 @@ static int soc_pcm_hw_params(struct snd_pcm_substream *substream,
codec_dai->rate = 0;
}
- snd_soc_link_hw_free(rtd, substream);
+ snd_soc_link_hw_free(substream);
mutex_unlock(&rtd->card->pcm_mutex);
return ret;
@@ -1087,7 +1087,7 @@ static int soc_pcm_hw_free(struct snd_pcm_substream *substream)
}
/* free any machine hw params */
- snd_soc_link_hw_free(rtd, substream);
+ snd_soc_link_hw_free(substream);
/* free any component resources */
soc_pcm_components_hw_free(substream, NULL);
@@ -1110,7 +1110,7 @@ static int soc_pcm_trigger_start(struct snd_pcm_substream *substream, int cmd)
struct snd_soc_component *component;
int i, ret;
- ret = snd_soc_link_trigger(rtd, substream, cmd);
+ ret = snd_soc_link_trigger(substream, cmd);
if (ret < 0)
return ret;
@@ -1139,7 +1139,7 @@ static int soc_pcm_trigger_stop(struct snd_pcm_substream *substream, int cmd)
return ret;
}
- ret = snd_soc_link_trigger(rtd, substream, cmd);
+ ret = snd_soc_link_trigger(substream, cmd);
if (ret < 0)
return ret;
--
2.17.1
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [PATCH v2 4/7] ASoC: soc-link: add snd_soc_link_be_hw_params_fixup()
2020-05-21 1:55 [PATCH v2 0/7] ASoC: add soc-link Kuninori Morimoto
` (2 preceding siblings ...)
2020-05-21 1:57 ` [PATCH v2 3/7] ASoC: soc-link: remove unneeded parameter from snd_soc_link_xxx() Kuninori Morimoto
@ 2020-05-21 1:57 ` Kuninori Morimoto
2020-05-21 10:18 ` kbuild test robot
2020-05-21 11:37 ` kbuild test robot
2020-05-21 1:57 ` [PATCH v2 5/7] ASoC: soc-link: add snd_soc_link_compr_startup() Kuninori Morimoto
` (3 subsequent siblings)
7 siblings, 2 replies; 21+ messages in thread
From: Kuninori Morimoto @ 2020-05-21 1:57 UTC (permalink / raw)
To: Mark Brown; +Cc: Linux-ALSA
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
dai_link related function should be implemented at soc-link.c.
This patch adds snd_soc_link_be_hw_params_fixup().
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
include/sound/soc-link.h | 3 +++
sound/soc/soc-core.c | 6 +++++-
sound/soc/soc-dai.c | 9 ++++-----
sound/soc/soc-link.c | 11 +++++++++++
sound/soc/soc-pcm.c | 13 +++----------
5 files changed, 26 insertions(+), 16 deletions(-)
diff --git a/include/sound/soc-link.h b/include/sound/soc-link.h
index 2a81dca945cd..aae72f668de6 100644
--- a/include/sound/soc-link.h
+++ b/include/sound/soc-link.h
@@ -9,6 +9,9 @@
#define __SOC_LINK_H
int snd_soc_link_init(struct snd_soc_pcm_runtime *rtd);
+int snd_soc_link_be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd,
+ struct snd_pcm_hw_params *params);
+
int snd_soc_link_startup(struct snd_pcm_substream *substream);
void snd_soc_link_shutdown(struct snd_pcm_substream *substream);
int snd_soc_link_prepare(struct snd_pcm_substream *substream);
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 955e175643d7..e1b65059c0c4 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1656,7 +1656,11 @@ static void soc_check_tplg_fes(struct snd_soc_card *card)
dai_link->dpcm_playback = 1;
dai_link->dpcm_capture = 1;
- /* override any BE fixups */
+ /*
+ * override any BE fixups
+ * see
+ * snd_soc_link_be_hw_params_fixup()
+ */
dai_link->be_hw_params_fixup =
component->driver->be_hw_params_fixup;
diff --git a/sound/soc/soc-dai.c b/sound/soc/soc-dai.c
index ce4e1fd1ab79..2c6ac3b0afa5 100644
--- a/sound/soc/soc-dai.c
+++ b/sound/soc/soc-dai.c
@@ -8,6 +8,7 @@
#include <sound/soc.h>
#include <sound/soc-dai.h>
+#include <sound/soc-link.h>
#define soc_dai_ret(dai, ret) _soc_dai_ret(dai, __func__, ret)
static inline int _soc_dai_ret(struct snd_soc_dai *dai,
@@ -313,11 +314,9 @@ int snd_soc_dai_hw_params(struct snd_soc_dai *dai,
int ret = 0;
/* perform any topology hw_params fixups before DAI */
- if (rtd->dai_link->be_hw_params_fixup) {
- ret = rtd->dai_link->be_hw_params_fixup(rtd, params);
- if (ret < 0)
- goto end;
- }
+ ret = snd_soc_link_be_hw_params_fixup(rtd, params);
+ if (ret < 0)
+ goto end;
if (dai->driver->ops &&
dai->driver->ops->hw_params)
diff --git a/sound/soc/soc-link.c b/sound/soc/soc-link.c
index 691910e82bff..a735b3ba2385 100644
--- a/sound/soc/soc-link.c
+++ b/sound/soc/soc-link.c
@@ -35,6 +35,17 @@ int snd_soc_link_init(struct snd_soc_pcm_runtime *rtd)
return soc_link_ret(rtd, ret);
}
+int snd_soc_link_be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd,
+ struct snd_pcm_hw_params *params)
+{
+ int ret = 0;
+
+ if (rtd->dai_link->be_hw_params_fixup)
+ ret = rtd->dai_link->be_hw_params_fixup(rtd, params);
+
+ return soc_link_ret(rtd, ret);
+}
+
int snd_soc_link_startup(struct snd_pcm_substream *substream)
{
struct snd_soc_pcm_runtime *rtd = substream->private_data;
diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
index 0204a3ecfc8b..80dd3cf6200c 100644
--- a/sound/soc/soc-pcm.c
+++ b/sound/soc/soc-pcm.c
@@ -2079,16 +2079,9 @@ int dpcm_be_dai_hw_params(struct snd_soc_pcm_runtime *fe, int stream)
sizeof(struct snd_pcm_hw_params));
/* perform any hw_params fixups */
- if (be->dai_link->be_hw_params_fixup) {
- ret = be->dai_link->be_hw_params_fixup(be,
- &dpcm->hw_params);
- if (ret < 0) {
- dev_err(be->dev,
- "ASoC: hw_params BE fixup failed %d\n",
- ret);
- goto unwind;
- }
- }
+ ret = snd_soc_link_be_hw_params_fixup(be, &dpcm->hw_params);
+ if (ret < 0)
+ goto unwind;
/* copy the fixed-up hw params for BE dai */
memcpy(&be->dpcm[stream].hw_params, &dpcm->hw_params,
--
2.17.1
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [PATCH v2 5/7] ASoC: soc-link: add snd_soc_link_compr_startup()
2020-05-21 1:55 [PATCH v2 0/7] ASoC: add soc-link Kuninori Morimoto
` (3 preceding siblings ...)
2020-05-21 1:57 ` [PATCH v2 4/7] ASoC: soc-link: add snd_soc_link_be_hw_params_fixup() Kuninori Morimoto
@ 2020-05-21 1:57 ` Kuninori Morimoto
2020-05-21 11:19 ` kbuild test robot
2020-05-21 12:17 ` kbuild test robot
2020-05-21 1:57 ` [PATCH v2 6/7] ASoC: soc-link: add snd_soc_link_compr_shutdown() Kuninori Morimoto
` (2 subsequent siblings)
7 siblings, 2 replies; 21+ messages in thread
From: Kuninori Morimoto @ 2020-05-21 1:57 UTC (permalink / raw)
To: Mark Brown; +Cc: Linux-ALSA
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
dai_link related function should be implemented at soc-link.c.
This patch adds snd_soc_link_compr_startup().
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
include/sound/soc-link.h | 2 ++
sound/soc/soc-compress.c | 24 +++++++-----------------
sound/soc/soc-link.c | 13 +++++++++++++
3 files changed, 22 insertions(+), 17 deletions(-)
diff --git a/include/sound/soc-link.h b/include/sound/soc-link.h
index aae72f668de6..20fe46f31e33 100644
--- a/include/sound/soc-link.h
+++ b/include/sound/soc-link.h
@@ -20,4 +20,6 @@ int snd_soc_link_hw_params(struct snd_pcm_substream *substream,
void snd_soc_link_hw_free(struct snd_pcm_substream *substream);
int snd_soc_link_trigger(struct snd_pcm_substream *substream, int cmd);
+int snd_soc_link_compr_startup(struct snd_compr_stream *cstream);
+
#endif /* __SOC_LINK_H */
diff --git a/sound/soc/soc-compress.c b/sound/soc/soc-compress.c
index 62ece729e425..ddc6c6f69d2f 100644
--- a/sound/soc/soc-compress.c
+++ b/sound/soc/soc-compress.c
@@ -19,6 +19,7 @@
#include <sound/soc.h>
#include <sound/initval.h>
#include <sound/soc-dpcm.h>
+#include <sound/soc-link.h>
#include <linux/pm_runtime.h>
static int soc_compr_components_open(struct snd_compr_stream *cstream,
@@ -95,15 +96,9 @@ static int soc_compr_open(struct snd_compr_stream *cstream)
if (ret < 0)
goto machine_err;
- if (rtd->dai_link->compr_ops && rtd->dai_link->compr_ops->startup) {
- ret = rtd->dai_link->compr_ops->startup(cstream);
- if (ret < 0) {
- dev_err(rtd->dev,
- "Compress ASoC: %s startup failed: %d\n",
- rtd->dai_link->name, ret);
- goto machine_err;
- }
- }
+ ret = snd_soc_link_compr_startup(cstream);
+ if (ret < 0)
+ goto machine_err;
snd_soc_runtime_activate(rtd, cstream->direction);
@@ -179,14 +174,9 @@ static int soc_compr_open_fe(struct snd_compr_stream *cstream)
if (ret < 0)
goto open_err;
- if (fe->dai_link->compr_ops && fe->dai_link->compr_ops->startup) {
- ret = fe->dai_link->compr_ops->startup(cstream);
- if (ret < 0) {
- pr_err("Compress ASoC: %s startup failed: %d\n",
- fe->dai_link->name, ret);
- goto machine_err;
- }
- }
+ ret = snd_soc_link_compr_startup(cstream);
+ if (ret < 0)
+ goto machine_err;
dpcm_clear_pending_state(fe, stream);
dpcm_path_put(&list);
diff --git a/sound/soc/soc-link.c b/sound/soc/soc-link.c
index a735b3ba2385..9e1c524db3d6 100644
--- a/sound/soc/soc-link.c
+++ b/sound/soc/soc-link.c
@@ -112,3 +112,16 @@ int snd_soc_link_trigger(struct snd_pcm_substream *substream, int cmd)
return soc_link_ret(rtd, ret);
}
+
+int snd_soc_link_compr_startup(struct snd_compr_stream *cstream)
+{
+ struct snd_soc_pcm_runtime *rtd = cstream->private_data;
+ int ret = 0;
+
+ if (rtd->dai_link->compr_ops &&
+ rtd->dai_link->compr_ops->startup)
+ ret = rtd->dai_link->compr_ops->startup(cstream);
+
+ return soc_link_ret(rtd, ret);
+}
+EXPORT_SYMBOL_GPL(snd_soc_link_compr_startup);
--
2.17.1
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [PATCH v2 6/7] ASoC: soc-link: add snd_soc_link_compr_shutdown()
2020-05-21 1:55 [PATCH v2 0/7] ASoC: add soc-link Kuninori Morimoto
` (4 preceding siblings ...)
2020-05-21 1:57 ` [PATCH v2 5/7] ASoC: soc-link: add snd_soc_link_compr_startup() Kuninori Morimoto
@ 2020-05-21 1:57 ` Kuninori Morimoto
2020-05-21 12:33 ` kbuild test robot
2020-05-21 1:57 ` [PATCH v2 7/7] ASoC: soc-link: add snd_soc_link_compr_set_params() Kuninori Morimoto
2020-05-21 18:25 ` [PATCH v2 0/7] ASoC: add soc-link Ranjani Sridharan
7 siblings, 1 reply; 21+ messages in thread
From: Kuninori Morimoto @ 2020-05-21 1:57 UTC (permalink / raw)
To: Mark Brown; +Cc: Linux-ALSA
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
dai_link related function should be implemented at soc-link.c.
This patch adds snd_soc_link_compr_shutdown().
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
include/sound/soc-link.h | 1 +
sound/soc/soc-compress.c | 6 ++----
sound/soc/soc-link.c | 10 ++++++++++
3 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/include/sound/soc-link.h b/include/sound/soc-link.h
index 20fe46f31e33..9ada62f8186f 100644
--- a/include/sound/soc-link.h
+++ b/include/sound/soc-link.h
@@ -21,5 +21,6 @@ void snd_soc_link_hw_free(struct snd_pcm_substream *substream);
int snd_soc_link_trigger(struct snd_pcm_substream *substream, int cmd);
int snd_soc_link_compr_startup(struct snd_compr_stream *cstream);
+void snd_soc_link_compr_shutdown(struct snd_compr_stream *cstream);
#endif /* __SOC_LINK_H */
diff --git a/sound/soc/soc-compress.c b/sound/soc/soc-compress.c
index ddc6c6f69d2f..327bec052954 100644
--- a/sound/soc/soc-compress.c
+++ b/sound/soc/soc-compress.c
@@ -227,8 +227,7 @@ static int soc_compr_free(struct snd_compr_stream *cstream)
if (!snd_soc_dai_active(codec_dai))
codec_dai->rate = 0;
- if (rtd->dai_link->compr_ops && rtd->dai_link->compr_ops->shutdown)
- rtd->dai_link->compr_ops->shutdown(cstream);
+ snd_soc_link_compr_shutdown(cstream);
soc_compr_components_free(cstream, NULL);
@@ -283,8 +282,7 @@ static int soc_compr_free_fe(struct snd_compr_stream *cstream)
fe->dpcm[stream].runtime = NULL;
- if (fe->dai_link->compr_ops && fe->dai_link->compr_ops->shutdown)
- fe->dai_link->compr_ops->shutdown(cstream);
+ snd_soc_link_compr_shutdown(cstream);
soc_compr_components_free(cstream, NULL);
diff --git a/sound/soc/soc-link.c b/sound/soc/soc-link.c
index 9e1c524db3d6..b5abb8298248 100644
--- a/sound/soc/soc-link.c
+++ b/sound/soc/soc-link.c
@@ -125,3 +125,13 @@ int snd_soc_link_compr_startup(struct snd_compr_stream *cstream)
return soc_link_ret(rtd, ret);
}
EXPORT_SYMBOL_GPL(snd_soc_link_compr_startup);
+
+void snd_soc_link_compr_shutdown(struct snd_compr_stream *cstream)
+{
+ struct snd_soc_pcm_runtime *rtd = cstream->private_data;
+
+ if (rtd->dai_link->compr_ops &&
+ rtd->dai_link->compr_ops->shutdown)
+ rtd->dai_link->compr_ops->shutdown(cstream);
+}
+EXPORT_SYMBOL_GPL(snd_soc_link_compr_shutdown);
--
2.17.1
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [PATCH v2 7/7] ASoC: soc-link: add snd_soc_link_compr_set_params()
2020-05-21 1:55 [PATCH v2 0/7] ASoC: add soc-link Kuninori Morimoto
` (5 preceding siblings ...)
2020-05-21 1:57 ` [PATCH v2 6/7] ASoC: soc-link: add snd_soc_link_compr_shutdown() Kuninori Morimoto
@ 2020-05-21 1:57 ` Kuninori Morimoto
2020-05-21 18:25 ` [PATCH v2 0/7] ASoC: add soc-link Ranjani Sridharan
7 siblings, 0 replies; 21+ messages in thread
From: Kuninori Morimoto @ 2020-05-21 1:57 UTC (permalink / raw)
To: Mark Brown; +Cc: Linux-ALSA
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
dai_link related function should be implemented at soc-link.c.
This patch adds snd_soc_link_compr_set_params().
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
include/sound/soc-link.h | 1 +
sound/soc/soc-compress.c | 16 ++++++----------
sound/soc/soc-link.c | 13 +++++++++++++
3 files changed, 20 insertions(+), 10 deletions(-)
diff --git a/include/sound/soc-link.h b/include/sound/soc-link.h
index 9ada62f8186f..3dd6e33e94ec 100644
--- a/include/sound/soc-link.h
+++ b/include/sound/soc-link.h
@@ -22,5 +22,6 @@ int snd_soc_link_trigger(struct snd_pcm_substream *substream, int cmd);
int snd_soc_link_compr_startup(struct snd_compr_stream *cstream);
void snd_soc_link_compr_shutdown(struct snd_compr_stream *cstream);
+int snd_soc_link_compr_set_params(struct snd_compr_stream *cstream);
#endif /* __SOC_LINK_H */
diff --git a/sound/soc/soc-compress.c b/sound/soc/soc-compress.c
index 327bec052954..4984b6a2c370 100644
--- a/sound/soc/soc-compress.c
+++ b/sound/soc/soc-compress.c
@@ -439,11 +439,9 @@ static int soc_compr_set_params(struct snd_compr_stream *cstream,
if (ret < 0)
goto err;
- if (rtd->dai_link->compr_ops && rtd->dai_link->compr_ops->set_params) {
- ret = rtd->dai_link->compr_ops->set_params(cstream);
- if (ret < 0)
- goto err;
- }
+ ret = snd_soc_link_compr_set_params(cstream);
+ if (ret < 0)
+ goto err;
if (cstream->direction == SND_COMPRESS_PLAYBACK)
snd_soc_dapm_stream_event(rtd, SNDRV_PCM_STREAM_PLAYBACK,
@@ -507,11 +505,9 @@ static int soc_compr_set_params_fe(struct snd_compr_stream *cstream,
if (ret < 0)
goto out;
- if (fe->dai_link->compr_ops && fe->dai_link->compr_ops->set_params) {
- ret = fe->dai_link->compr_ops->set_params(cstream);
- if (ret < 0)
- goto out;
- }
+ ret = snd_soc_link_compr_set_params(cstream);
+ if (ret < 0)
+ goto out;
dpcm_dapm_stream_event(fe, stream, SND_SOC_DAPM_STREAM_START);
fe->dpcm[stream].state = SND_SOC_DPCM_STATE_PREPARE;
diff --git a/sound/soc/soc-link.c b/sound/soc/soc-link.c
index b5abb8298248..0f27ea67b075 100644
--- a/sound/soc/soc-link.c
+++ b/sound/soc/soc-link.c
@@ -135,3 +135,16 @@ void snd_soc_link_compr_shutdown(struct snd_compr_stream *cstream)
rtd->dai_link->compr_ops->shutdown(cstream);
}
EXPORT_SYMBOL_GPL(snd_soc_link_compr_shutdown);
+
+int snd_soc_link_compr_set_params(struct snd_compr_stream *cstream)
+{
+ struct snd_soc_pcm_runtime *rtd = cstream->private_data;
+ int ret = 0;
+
+ if (rtd->dai_link->compr_ops &&
+ rtd->dai_link->compr_ops->set_params)
+ ret = rtd->dai_link->compr_ops->set_params(cstream);
+
+ return soc_link_ret(rtd, ret);
+}
+EXPORT_SYMBOL_GPL(snd_soc_link_compr_set_params);
--
2.17.1
^ permalink raw reply related [flat|nested] 21+ messages in thread
* Re: [PATCH v2 1/7] ASoC: add soc-link.c
2020-05-21 1:56 ` [PATCH v2 1/7] ASoC: add soc-link.c Kuninori Morimoto
@ 2020-05-21 8:34 ` kbuild test robot
2020-05-21 10:12 ` kbuild test robot
2020-05-21 18:10 ` Ranjani Sridharan
2 siblings, 0 replies; 21+ messages in thread
From: kbuild test robot @ 2020-05-21 8:34 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 2042 bytes --]
Hi Kuninori,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on asoc/for-next]
[also build test WARNING on sound/for-next v5.7-rc6 next-20200519]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Kuninori-Morimoto/ASoC-add-soc-link/20200521-100326
base: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
config: x86_64-randconfig-r016-20200521 (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 3393cc4cebf9969db94dc424b7a2b6195589c33b)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>
All warnings (new ones prefixed by >>, old ones prefixed by <<):
>> sound/soc/soc-link.c:28:5: warning: no previous prototype for function 'snd_soc_link_init' [-Wmissing-prototypes]
int snd_soc_link_init(struct snd_soc_pcm_runtime *rtd)
^
sound/soc/soc-link.c:28:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int snd_soc_link_init(struct snd_soc_pcm_runtime *rtd)
^
static
1 warning generated.
vim +/snd_soc_link_init +28 sound/soc/soc-link.c
27
> 28 int snd_soc_link_init(struct snd_soc_pcm_runtime *rtd)
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 48594 bytes --]
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH v2 2/7] ASoC: soc-link: move soc_rtd_xxx()
2020-05-21 1:56 ` [PATCH v2 2/7] ASoC: soc-link: move soc_rtd_xxx() Kuninori Morimoto
@ 2020-05-21 9:34 ` kbuild test robot
2020-05-21 10:54 ` kbuild test robot
1 sibling, 0 replies; 21+ messages in thread
From: kbuild test robot @ 2020-05-21 9:34 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 6043 bytes --]
Hi Kuninori,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on asoc/for-next]
[also build test WARNING on next-20200519]
[cannot apply to sound/for-next v5.7-rc6]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Kuninori-Morimoto/ASoC-add-soc-link/20200521-100326
base: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
config: x86_64-randconfig-r016-20200521 (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 3393cc4cebf9969db94dc424b7a2b6195589c33b)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>
All warnings (new ones prefixed by >>, old ones prefixed by <<):
sound/soc/soc-link.c:28:5: warning: no previous prototype for function 'snd_soc_link_init' [-Wmissing-prototypes]
int snd_soc_link_init(struct snd_soc_pcm_runtime *rtd)
^
sound/soc/soc-link.c:28:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int snd_soc_link_init(struct snd_soc_pcm_runtime *rtd)
^
static
>> sound/soc/soc-link.c:38:5: warning: no previous prototype for function 'snd_soc_link_startup' [-Wmissing-prototypes]
int snd_soc_link_startup(struct snd_soc_pcm_runtime *rtd,
^
sound/soc/soc-link.c:38:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int snd_soc_link_startup(struct snd_soc_pcm_runtime *rtd,
^
static
>> sound/soc/soc-link.c:50:6: warning: no previous prototype for function 'snd_soc_link_shutdown' [-Wmissing-prototypes]
void snd_soc_link_shutdown(struct snd_soc_pcm_runtime *rtd,
^
sound/soc/soc-link.c:50:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void snd_soc_link_shutdown(struct snd_soc_pcm_runtime *rtd,
^
static
>> sound/soc/soc-link.c:58:5: warning: no previous prototype for function 'snd_soc_link_prepare' [-Wmissing-prototypes]
int snd_soc_link_prepare(struct snd_soc_pcm_runtime *rtd,
^
sound/soc/soc-link.c:58:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int snd_soc_link_prepare(struct snd_soc_pcm_runtime *rtd,
^
static
>> sound/soc/soc-link.c:70:5: warning: no previous prototype for function 'snd_soc_link_hw_params' [-Wmissing-prototypes]
int snd_soc_link_hw_params(struct snd_soc_pcm_runtime *rtd,
^
sound/soc/soc-link.c:70:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int snd_soc_link_hw_params(struct snd_soc_pcm_runtime *rtd,
^
static
>> sound/soc/soc-link.c:83:6: warning: no previous prototype for function 'snd_soc_link_hw_free' [-Wmissing-prototypes]
void snd_soc_link_hw_free(struct snd_soc_pcm_runtime *rtd,
^
sound/soc/soc-link.c:83:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void snd_soc_link_hw_free(struct snd_soc_pcm_runtime *rtd,
^
static
>> sound/soc/soc-link.c:91:5: warning: no previous prototype for function 'snd_soc_link_trigger' [-Wmissing-prototypes]
int snd_soc_link_trigger(struct snd_soc_pcm_runtime *rtd,
^
sound/soc/soc-link.c:91:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int snd_soc_link_trigger(struct snd_soc_pcm_runtime *rtd,
^
static
7 warnings generated.
vim +/snd_soc_link_startup +38 sound/soc/soc-link.c
37
> 38 int snd_soc_link_startup(struct snd_soc_pcm_runtime *rtd,
39 struct snd_pcm_substream *substream)
40 {
41 int ret = 0;
42
43 if (rtd->dai_link->ops &&
44 rtd->dai_link->ops->startup)
45 ret = rtd->dai_link->ops->startup(substream);
46
47 return soc_link_ret(rtd, ret);
48 }
49
> 50 void snd_soc_link_shutdown(struct snd_soc_pcm_runtime *rtd,
51 struct snd_pcm_substream *substream)
52 {
53 if (rtd->dai_link->ops &&
54 rtd->dai_link->ops->shutdown)
55 rtd->dai_link->ops->shutdown(substream);
56 }
57
> 58 int snd_soc_link_prepare(struct snd_soc_pcm_runtime *rtd,
59 struct snd_pcm_substream *substream)
60 {
61 int ret = 0;
62
63 if (rtd->dai_link->ops &&
64 rtd->dai_link->ops->prepare)
65 ret = rtd->dai_link->ops->prepare(substream);
66
67 return soc_link_ret(rtd, ret);
68 }
69
> 70 int snd_soc_link_hw_params(struct snd_soc_pcm_runtime *rtd,
71 struct snd_pcm_substream *substream,
72 struct snd_pcm_hw_params *params)
73 {
74 int ret = 0;
75
76 if (rtd->dai_link->ops &&
77 rtd->dai_link->ops->hw_params)
78 ret = rtd->dai_link->ops->hw_params(substream, params);
79
80 return soc_link_ret(rtd, ret);
81 }
82
> 83 void snd_soc_link_hw_free(struct snd_soc_pcm_runtime *rtd,
84 struct snd_pcm_substream *substream)
85 {
86 if (rtd->dai_link->ops &&
87 rtd->dai_link->ops->hw_free)
88 rtd->dai_link->ops->hw_free(substream);
89 }
90
> 91 int snd_soc_link_trigger(struct snd_soc_pcm_runtime *rtd,
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 48594 bytes --]
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH v2 1/7] ASoC: add soc-link.c
2020-05-21 1:56 ` [PATCH v2 1/7] ASoC: add soc-link.c Kuninori Morimoto
2020-05-21 8:34 ` kbuild test robot
@ 2020-05-21 10:12 ` kbuild test robot
2020-05-21 18:10 ` Ranjani Sridharan
2 siblings, 0 replies; 21+ messages in thread
From: kbuild test robot @ 2020-05-21 10:12 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 2922 bytes --]
Hi Kuninori,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on asoc/for-next]
[also build test WARNING on sound/for-next v5.7-rc6 next-20200519]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Kuninori-Morimoto/ASoC-add-soc-link/20200521-100326
base: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
config: parisc-randconfig-r011-20200521 (attached as .config)
compiler: hppa-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=parisc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>
All warnings (new ones prefixed by >>, old ones prefixed by <<):
In file included from arch/parisc/include/asm/io.h:6,
from include/linux/io.h:13,
from include/linux/irq.h:20,
from arch/parisc/include/asm/hardirq.h:13,
from include/linux/hardirq.h:9,
from include/linux/interrupt.h:11,
from include/sound/soc.h:18,
from sound/soc/soc-link.c:8:
include/asm-generic/pgtable.h: In function 'pte_clear_not_present_full':
arch/parisc/include/asm/pgtable.h:96:9: warning: variable 'old_pte' set but not used [-Wunused-but-set-variable]
96 | pte_t old_pte; | ^~~~~~~
arch/parisc/include/asm/pgtable.h:322:34: note: in expansion of macro 'set_pte_at'
322 | #define pte_clear(mm, addr, xp) set_pte_at(mm, addr, xp, __pte(0))
| ^~~~~~~~~~
include/asm-generic/pgtable.h:202:2: note: in expansion of macro 'pte_clear'
202 | pte_clear(mm, address, ptep);
| ^~~~~~~~~
include/asm-generic/pgtable.h: In function '__ptep_modify_prot_commit':
arch/parisc/include/asm/pgtable.h:96:9: warning: variable 'old_pte' set but not used [-Wunused-but-set-variable]
96 | pte_t old_pte; | ^~~~~~~
include/asm-generic/pgtable.h:641:2: note: in expansion of macro 'set_pte_at'
641 | set_pte_at(vma->vm_mm, addr, ptep, pte);
| ^~~~~~~~~~
sound/soc/soc-link.c: At top level:
>> sound/soc/soc-link.c:28:5: warning: no previous prototype for 'snd_soc_link_init' [-Wmissing-prototypes]
28 | int snd_soc_link_init(struct snd_soc_pcm_runtime *rtd)
| ^~~~~~~~~~~~~~~~~
vim +/snd_soc_link_init +28 sound/soc/soc-link.c
27
> 28 int snd_soc_link_init(struct snd_soc_pcm_runtime *rtd)
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 33328 bytes --]
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH v2 4/7] ASoC: soc-link: add snd_soc_link_be_hw_params_fixup()
2020-05-21 1:57 ` [PATCH v2 4/7] ASoC: soc-link: add snd_soc_link_be_hw_params_fixup() Kuninori Morimoto
@ 2020-05-21 10:18 ` kbuild test robot
2020-05-21 11:37 ` kbuild test robot
1 sibling, 0 replies; 21+ messages in thread
From: kbuild test robot @ 2020-05-21 10:18 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 5362 bytes --]
Hi Kuninori,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on asoc/for-next]
[also build test WARNING on next-20200519]
[cannot apply to sound/for-next v5.7-rc6]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Kuninori-Morimoto/ASoC-add-soc-link/20200521-100326
base: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
config: x86_64-randconfig-r016-20200521 (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 3393cc4cebf9969db94dc424b7a2b6195589c33b)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>
All warnings (new ones prefixed by >>, old ones prefixed by <<):
sound/soc/soc-link.c:28:5: warning: no previous prototype for function 'snd_soc_link_init' [-Wmissing-prototypes]
int snd_soc_link_init(struct snd_soc_pcm_runtime *rtd)
^
sound/soc/soc-link.c:28:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int snd_soc_link_init(struct snd_soc_pcm_runtime *rtd)
^
static
>> sound/soc/soc-link.c:38:5: warning: no previous prototype for function 'snd_soc_link_be_hw_params_fixup' [-Wmissing-prototypes]
int snd_soc_link_be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd,
^
sound/soc/soc-link.c:38:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int snd_soc_link_be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd,
^
static
sound/soc/soc-link.c:49:5: warning: no previous prototype for function 'snd_soc_link_startup' [-Wmissing-prototypes]
int snd_soc_link_startup(struct snd_pcm_substream *substream)
^
sound/soc/soc-link.c:49:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int snd_soc_link_startup(struct snd_pcm_substream *substream)
^
static
sound/soc/soc-link.c:61:6: warning: no previous prototype for function 'snd_soc_link_shutdown' [-Wmissing-prototypes]
void snd_soc_link_shutdown(struct snd_pcm_substream *substream)
^
sound/soc/soc-link.c:61:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void snd_soc_link_shutdown(struct snd_pcm_substream *substream)
^
static
sound/soc/soc-link.c:70:5: warning: no previous prototype for function 'snd_soc_link_prepare' [-Wmissing-prototypes]
int snd_soc_link_prepare(struct snd_pcm_substream *substream)
^
sound/soc/soc-link.c:70:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int snd_soc_link_prepare(struct snd_pcm_substream *substream)
^
static
sound/soc/soc-link.c:82:5: warning: no previous prototype for function 'snd_soc_link_hw_params' [-Wmissing-prototypes]
int snd_soc_link_hw_params(struct snd_pcm_substream *substream,
^
sound/soc/soc-link.c:82:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int snd_soc_link_hw_params(struct snd_pcm_substream *substream,
^
static
sound/soc/soc-link.c:95:6: warning: no previous prototype for function 'snd_soc_link_hw_free' [-Wmissing-prototypes]
void snd_soc_link_hw_free(struct snd_pcm_substream *substream)
^
sound/soc/soc-link.c:95:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void snd_soc_link_hw_free(struct snd_pcm_substream *substream)
^
static
sound/soc/soc-link.c:104:5: warning: no previous prototype for function 'snd_soc_link_trigger' [-Wmissing-prototypes]
int snd_soc_link_trigger(struct snd_pcm_substream *substream, int cmd)
^
sound/soc/soc-link.c:104:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int snd_soc_link_trigger(struct snd_pcm_substream *substream, int cmd)
^
static
8 warnings generated.
vim +/snd_soc_link_be_hw_params_fixup +38 sound/soc/soc-link.c
27
> 28 int snd_soc_link_init(struct snd_soc_pcm_runtime *rtd)
29 {
30 int ret = 0;
31
32 if (rtd->dai_link->init)
33 ret = rtd->dai_link->init(rtd);
34
35 return soc_link_ret(rtd, ret);
36 }
37
> 38 int snd_soc_link_be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd,
39 struct snd_pcm_hw_params *params)
40 {
41 int ret = 0;
42
43 if (rtd->dai_link->be_hw_params_fixup)
44 ret = rtd->dai_link->be_hw_params_fixup(rtd, params);
45
46 return soc_link_ret(rtd, ret);
47 }
48
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 48594 bytes --]
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH v2 2/7] ASoC: soc-link: move soc_rtd_xxx()
2020-05-21 1:56 ` [PATCH v2 2/7] ASoC: soc-link: move soc_rtd_xxx() Kuninori Morimoto
2020-05-21 9:34 ` kbuild test robot
@ 2020-05-21 10:54 ` kbuild test robot
1 sibling, 0 replies; 21+ messages in thread
From: kbuild test robot @ 2020-05-21 10:54 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 6166 bytes --]
Hi Kuninori,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on asoc/for-next]
[also build test WARNING on next-20200519]
[cannot apply to sound/for-next v5.7-rc6]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Kuninori-Morimoto/ASoC-add-soc-link/20200521-100326
base: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
config: parisc-randconfig-r011-20200521 (attached as .config)
compiler: hppa-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=parisc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>
All warnings (new ones prefixed by >>, old ones prefixed by <<):
In file included from arch/parisc/include/asm/io.h:6,
from include/linux/io.h:13,
from include/linux/irq.h:20,
from arch/parisc/include/asm/hardirq.h:13,
from include/linux/hardirq.h:9,
from include/linux/interrupt.h:11,
from include/sound/soc.h:18,
from sound/soc/soc-link.c:8:
include/asm-generic/pgtable.h: In function 'pte_clear_not_present_full':
arch/parisc/include/asm/pgtable.h:96:9: warning: variable 'old_pte' set but not used [-Wunused-but-set-variable]
96 | pte_t old_pte; | ^~~~~~~
arch/parisc/include/asm/pgtable.h:322:34: note: in expansion of macro 'set_pte_at'
322 | #define pte_clear(mm, addr, xp) set_pte_at(mm, addr, xp, __pte(0))
| ^~~~~~~~~~
include/asm-generic/pgtable.h:202:2: note: in expansion of macro 'pte_clear'
202 | pte_clear(mm, address, ptep);
| ^~~~~~~~~
include/asm-generic/pgtable.h: In function '__ptep_modify_prot_commit':
arch/parisc/include/asm/pgtable.h:96:9: warning: variable 'old_pte' set but not used [-Wunused-but-set-variable]
96 | pte_t old_pte; | ^~~~~~~
include/asm-generic/pgtable.h:641:2: note: in expansion of macro 'set_pte_at'
641 | set_pte_at(vma->vm_mm, addr, ptep, pte);
| ^~~~~~~~~~
sound/soc/soc-link.c: At top level:
sound/soc/soc-link.c:28:5: warning: no previous prototype for 'snd_soc_link_init' [-Wmissing-prototypes]
28 | int snd_soc_link_init(struct snd_soc_pcm_runtime *rtd)
| ^~~~~~~~~~~~~~~~~
<< from sound/soc/soc-link.c:8:
>> sound/soc/soc-link.c:38:5: warning: no previous prototype for 'snd_soc_link_startup' [-Wmissing-prototypes]
38 | int snd_soc_link_startup(struct snd_soc_pcm_runtime *rtd,
| ^~~~~~~~~~~~~~~~~~~~
<< from sound/soc/soc-link.c:8:
>> sound/soc/soc-link.c:50:6: warning: no previous prototype for 'snd_soc_link_shutdown' [-Wmissing-prototypes]
50 | void snd_soc_link_shutdown(struct snd_soc_pcm_runtime *rtd,
| ^~~~~~~~~~~~~~~~~~~~~
<< from sound/soc/soc-link.c:8:
>> sound/soc/soc-link.c:58:5: warning: no previous prototype for 'snd_soc_link_prepare' [-Wmissing-prototypes]
58 | int snd_soc_link_prepare(struct snd_soc_pcm_runtime *rtd,
| ^~~~~~~~~~~~~~~~~~~~
<< from sound/soc/soc-link.c:8:
>> sound/soc/soc-link.c:70:5: warning: no previous prototype for 'snd_soc_link_hw_params' [-Wmissing-prototypes]
70 | int snd_soc_link_hw_params(struct snd_soc_pcm_runtime *rtd,
| ^~~~~~~~~~~~~~~~~~~~~~
<< from sound/soc/soc-link.c:8:
>> sound/soc/soc-link.c:83:6: warning: no previous prototype for 'snd_soc_link_hw_free' [-Wmissing-prototypes]
83 | void snd_soc_link_hw_free(struct snd_soc_pcm_runtime *rtd,
| ^~~~~~~~~~~~~~~~~~~~
<< from sound/soc/soc-link.c:8:
>> sound/soc/soc-link.c:91:5: warning: no previous prototype for 'snd_soc_link_trigger' [-Wmissing-prototypes]
91 | int snd_soc_link_trigger(struct snd_soc_pcm_runtime *rtd,
| ^~~~~~~~~~~~~~~~~~~~
vim +/snd_soc_link_startup +38 sound/soc/soc-link.c
37
> 38 int snd_soc_link_startup(struct snd_soc_pcm_runtime *rtd,
39 struct snd_pcm_substream *substream)
40 {
41 int ret = 0;
42
43 if (rtd->dai_link->ops &&
44 rtd->dai_link->ops->startup)
45 ret = rtd->dai_link->ops->startup(substream);
46
47 return soc_link_ret(rtd, ret);
48 }
49
> 50 void snd_soc_link_shutdown(struct snd_soc_pcm_runtime *rtd,
51 struct snd_pcm_substream *substream)
52 {
53 if (rtd->dai_link->ops &&
54 rtd->dai_link->ops->shutdown)
55 rtd->dai_link->ops->shutdown(substream);
56 }
57
> 58 int snd_soc_link_prepare(struct snd_soc_pcm_runtime *rtd,
59 struct snd_pcm_substream *substream)
60 {
61 int ret = 0;
62
63 if (rtd->dai_link->ops &&
64 rtd->dai_link->ops->prepare)
65 ret = rtd->dai_link->ops->prepare(substream);
66
67 return soc_link_ret(rtd, ret);
68 }
69
> 70 int snd_soc_link_hw_params(struct snd_soc_pcm_runtime *rtd,
71 struct snd_pcm_substream *substream,
72 struct snd_pcm_hw_params *params)
73 {
74 int ret = 0;
75
76 if (rtd->dai_link->ops &&
77 rtd->dai_link->ops->hw_params)
78 ret = rtd->dai_link->ops->hw_params(substream, params);
79
80 return soc_link_ret(rtd, ret);
81 }
82
> 83 void snd_soc_link_hw_free(struct snd_soc_pcm_runtime *rtd,
84 struct snd_pcm_substream *substream)
85 {
86 if (rtd->dai_link->ops &&
87 rtd->dai_link->ops->hw_free)
88 rtd->dai_link->ops->hw_free(substream);
89 }
90
> 91 int snd_soc_link_trigger(struct snd_soc_pcm_runtime *rtd,
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 33328 bytes --]
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH v2 5/7] ASoC: soc-link: add snd_soc_link_compr_startup()
2020-05-21 1:57 ` [PATCH v2 5/7] ASoC: soc-link: add snd_soc_link_compr_startup() Kuninori Morimoto
@ 2020-05-21 11:19 ` kbuild test robot
2020-05-21 12:17 ` kbuild test robot
1 sibling, 0 replies; 21+ messages in thread
From: kbuild test robot @ 2020-05-21 11:19 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 5234 bytes --]
Hi Kuninori,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on asoc/for-next]
[also build test WARNING on next-20200519]
[cannot apply to sound/for-next v5.7-rc6]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Kuninori-Morimoto/ASoC-add-soc-link/20200521-100326
base: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
config: x86_64-randconfig-r016-20200521 (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 3393cc4cebf9969db94dc424b7a2b6195589c33b)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>
All warnings (new ones prefixed by >>, old ones prefixed by <<):
sound/soc/soc-link.c:28:5: warning: no previous prototype for function 'snd_soc_link_init' [-Wmissing-prototypes]
int snd_soc_link_init(struct snd_soc_pcm_runtime *rtd)
^
sound/soc/soc-link.c:28:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int snd_soc_link_init(struct snd_soc_pcm_runtime *rtd)
^
static
sound/soc/soc-link.c:38:5: warning: no previous prototype for function 'snd_soc_link_be_hw_params_fixup' [-Wmissing-prototypes]
int snd_soc_link_be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd,
^
sound/soc/soc-link.c:38:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int snd_soc_link_be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd,
^
static
sound/soc/soc-link.c:49:5: warning: no previous prototype for function 'snd_soc_link_startup' [-Wmissing-prototypes]
int snd_soc_link_startup(struct snd_pcm_substream *substream)
^
sound/soc/soc-link.c:49:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int snd_soc_link_startup(struct snd_pcm_substream *substream)
^
static
sound/soc/soc-link.c:61:6: warning: no previous prototype for function 'snd_soc_link_shutdown' [-Wmissing-prototypes]
void snd_soc_link_shutdown(struct snd_pcm_substream *substream)
^
sound/soc/soc-link.c:61:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void snd_soc_link_shutdown(struct snd_pcm_substream *substream)
^
static
sound/soc/soc-link.c:70:5: warning: no previous prototype for function 'snd_soc_link_prepare' [-Wmissing-prototypes]
int snd_soc_link_prepare(struct snd_pcm_substream *substream)
^
sound/soc/soc-link.c:70:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int snd_soc_link_prepare(struct snd_pcm_substream *substream)
^
static
sound/soc/soc-link.c:82:5: warning: no previous prototype for function 'snd_soc_link_hw_params' [-Wmissing-prototypes]
int snd_soc_link_hw_params(struct snd_pcm_substream *substream,
^
sound/soc/soc-link.c:82:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int snd_soc_link_hw_params(struct snd_pcm_substream *substream,
^
static
sound/soc/soc-link.c:95:6: warning: no previous prototype for function 'snd_soc_link_hw_free' [-Wmissing-prototypes]
void snd_soc_link_hw_free(struct snd_pcm_substream *substream)
^
sound/soc/soc-link.c:95:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void snd_soc_link_hw_free(struct snd_pcm_substream *substream)
^
static
sound/soc/soc-link.c:104:5: warning: no previous prototype for function 'snd_soc_link_trigger' [-Wmissing-prototypes]
int snd_soc_link_trigger(struct snd_pcm_substream *substream, int cmd)
^
sound/soc/soc-link.c:104:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int snd_soc_link_trigger(struct snd_pcm_substream *substream, int cmd)
^
static
>> sound/soc/soc-link.c:116:5: warning: no previous prototype for function 'snd_soc_link_compr_startup' [-Wmissing-prototypes]
int snd_soc_link_compr_startup(struct snd_compr_stream *cstream)
^
sound/soc/soc-link.c:116:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int snd_soc_link_compr_startup(struct snd_compr_stream *cstream)
^
static
9 warnings generated.
vim +/snd_soc_link_compr_startup +116 sound/soc/soc-link.c
115
> 116 int snd_soc_link_compr_startup(struct snd_compr_stream *cstream)
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 48594 bytes --]
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH v2 4/7] ASoC: soc-link: add snd_soc_link_be_hw_params_fixup()
2020-05-21 1:57 ` [PATCH v2 4/7] ASoC: soc-link: add snd_soc_link_be_hw_params_fixup() Kuninori Morimoto
2020-05-21 10:18 ` kbuild test robot
@ 2020-05-21 11:37 ` kbuild test robot
1 sibling, 0 replies; 21+ messages in thread
From: kbuild test robot @ 2020-05-21 11:37 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 5026 bytes --]
Hi Kuninori,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on asoc/for-next]
[also build test WARNING on next-20200519]
[cannot apply to sound/for-next v5.7-rc6]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Kuninori-Morimoto/ASoC-add-soc-link/20200521-100326
base: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
config: parisc-randconfig-r011-20200521 (attached as .config)
compiler: hppa-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=parisc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>
All warnings (new ones prefixed by >>, old ones prefixed by <<):
In file included from arch/parisc/include/asm/io.h:6,
from include/linux/io.h:13,
from include/linux/irq.h:20,
from arch/parisc/include/asm/hardirq.h:13,
from include/linux/hardirq.h:9,
from include/linux/interrupt.h:11,
from include/sound/soc.h:18,
from sound/soc/soc-link.c:8:
include/asm-generic/pgtable.h: In function 'pte_clear_not_present_full':
arch/parisc/include/asm/pgtable.h:96:9: warning: variable 'old_pte' set but not used [-Wunused-but-set-variable]
96 | pte_t old_pte; | ^~~~~~~
arch/parisc/include/asm/pgtable.h:322:34: note: in expansion of macro 'set_pte_at'
322 | #define pte_clear(mm, addr, xp) set_pte_at(mm, addr, xp, __pte(0))
| ^~~~~~~~~~
include/asm-generic/pgtable.h:202:2: note: in expansion of macro 'pte_clear'
202 | pte_clear(mm, address, ptep);
| ^~~~~~~~~
include/asm-generic/pgtable.h: In function '__ptep_modify_prot_commit':
arch/parisc/include/asm/pgtable.h:96:9: warning: variable 'old_pte' set but not used [-Wunused-but-set-variable]
96 | pte_t old_pte; | ^~~~~~~
include/asm-generic/pgtable.h:641:2: note: in expansion of macro 'set_pte_at'
641 | set_pte_at(vma->vm_mm, addr, ptep, pte);
| ^~~~~~~~~~
sound/soc/soc-link.c: At top level:
sound/soc/soc-link.c:28:5: warning: no previous prototype for 'snd_soc_link_init' [-Wmissing-prototypes]
28 | int snd_soc_link_init(struct snd_soc_pcm_runtime *rtd)
| ^~~~~~~~~~~~~~~~~
<< from sound/soc/soc-link.c:8:
>> sound/soc/soc-link.c:38:5: warning: no previous prototype for 'snd_soc_link_be_hw_params_fixup' [-Wmissing-prototypes]
38 | int snd_soc_link_be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/soc/soc-link.c:49:5: warning: no previous prototype for 'snd_soc_link_startup' [-Wmissing-prototypes]
49 | int snd_soc_link_startup(struct snd_pcm_substream *substream)
| ^~~~~~~~~~~~~~~~~~~~
sound/soc/soc-link.c:61:6: warning: no previous prototype for 'snd_soc_link_shutdown' [-Wmissing-prototypes]
61 | void snd_soc_link_shutdown(struct snd_pcm_substream *substream)
| ^~~~~~~~~~~~~~~~~~~~~
sound/soc/soc-link.c:70:5: warning: no previous prototype for 'snd_soc_link_prepare' [-Wmissing-prototypes]
70 | int snd_soc_link_prepare(struct snd_pcm_substream *substream)
| ^~~~~~~~~~~~~~~~~~~~
sound/soc/soc-link.c:82:5: warning: no previous prototype for 'snd_soc_link_hw_params' [-Wmissing-prototypes]
82 | int snd_soc_link_hw_params(struct snd_pcm_substream *substream,
| ^~~~~~~~~~~~~~~~~~~~~~
sound/soc/soc-link.c:95:6: warning: no previous prototype for 'snd_soc_link_hw_free' [-Wmissing-prototypes]
95 | void snd_soc_link_hw_free(struct snd_pcm_substream *substream)
| ^~~~~~~~~~~~~~~~~~~~
sound/soc/soc-link.c:104:5: warning: no previous prototype for 'snd_soc_link_trigger' [-Wmissing-prototypes]
104 | int snd_soc_link_trigger(struct snd_pcm_substream *substream, int cmd)
| ^~~~~~~~~~~~~~~~~~~~
vim +/snd_soc_link_be_hw_params_fixup +38 sound/soc/soc-link.c
27
> 28 int snd_soc_link_init(struct snd_soc_pcm_runtime *rtd)
29 {
30 int ret = 0;
31
32 if (rtd->dai_link->init)
33 ret = rtd->dai_link->init(rtd);
34
35 return soc_link_ret(rtd, ret);
36 }
37
> 38 int snd_soc_link_be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd,
39 struct snd_pcm_hw_params *params)
40 {
41 int ret = 0;
42
43 if (rtd->dai_link->be_hw_params_fixup)
44 ret = rtd->dai_link->be_hw_params_fixup(rtd, params);
45
46 return soc_link_ret(rtd, ret);
47 }
48
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 33328 bytes --]
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH v2 5/7] ASoC: soc-link: add snd_soc_link_compr_startup()
2020-05-21 1:57 ` [PATCH v2 5/7] ASoC: soc-link: add snd_soc_link_compr_startup() Kuninori Morimoto
2020-05-21 11:19 ` kbuild test robot
@ 2020-05-21 12:17 ` kbuild test robot
1 sibling, 0 replies; 21+ messages in thread
From: kbuild test robot @ 2020-05-21 12:17 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 4721 bytes --]
Hi Kuninori,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on asoc/for-next]
[also build test WARNING on next-20200519]
[cannot apply to sound/for-next v5.7-rc6]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Kuninori-Morimoto/ASoC-add-soc-link/20200521-100326
base: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
config: parisc-randconfig-r011-20200521 (attached as .config)
compiler: hppa-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=parisc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>
All warnings (new ones prefixed by >>, old ones prefixed by <<):
In file included from arch/parisc/include/asm/io.h:6,
from include/linux/io.h:13,
from include/linux/irq.h:20,
from arch/parisc/include/asm/hardirq.h:13,
from include/linux/hardirq.h:9,
from include/linux/interrupt.h:11,
from include/sound/soc.h:18,
from sound/soc/soc-link.c:8:
include/asm-generic/pgtable.h: In function 'pte_clear_not_present_full':
arch/parisc/include/asm/pgtable.h:96:9: warning: variable 'old_pte' set but not used [-Wunused-but-set-variable]
96 | pte_t old_pte; | ^~~~~~~
arch/parisc/include/asm/pgtable.h:322:34: note: in expansion of macro 'set_pte_at'
322 | #define pte_clear(mm, addr, xp) set_pte_at(mm, addr, xp, __pte(0))
| ^~~~~~~~~~
include/asm-generic/pgtable.h:202:2: note: in expansion of macro 'pte_clear'
202 | pte_clear(mm, address, ptep);
| ^~~~~~~~~
include/asm-generic/pgtable.h: In function '__ptep_modify_prot_commit':
arch/parisc/include/asm/pgtable.h:96:9: warning: variable 'old_pte' set but not used [-Wunused-but-set-variable]
96 | pte_t old_pte; | ^~~~~~~
include/asm-generic/pgtable.h:641:2: note: in expansion of macro 'set_pte_at'
641 | set_pte_at(vma->vm_mm, addr, ptep, pte);
| ^~~~~~~~~~
sound/soc/soc-link.c: At top level:
sound/soc/soc-link.c:28:5: warning: no previous prototype for 'snd_soc_link_init' [-Wmissing-prototypes]
28 | int snd_soc_link_init(struct snd_soc_pcm_runtime *rtd)
| ^~~~~~~~~~~~~~~~~
sound/soc/soc-link.c:38:5: warning: no previous prototype for 'snd_soc_link_be_hw_params_fixup' [-Wmissing-prototypes]
38 | int snd_soc_link_be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/soc/soc-link.c:49:5: warning: no previous prototype for 'snd_soc_link_startup' [-Wmissing-prototypes]
49 | int snd_soc_link_startup(struct snd_pcm_substream *substream)
| ^~~~~~~~~~~~~~~~~~~~
sound/soc/soc-link.c:61:6: warning: no previous prototype for 'snd_soc_link_shutdown' [-Wmissing-prototypes]
61 | void snd_soc_link_shutdown(struct snd_pcm_substream *substream)
| ^~~~~~~~~~~~~~~~~~~~~
sound/soc/soc-link.c:70:5: warning: no previous prototype for 'snd_soc_link_prepare' [-Wmissing-prototypes]
70 | int snd_soc_link_prepare(struct snd_pcm_substream *substream)
| ^~~~~~~~~~~~~~~~~~~~
sound/soc/soc-link.c:82:5: warning: no previous prototype for 'snd_soc_link_hw_params' [-Wmissing-prototypes]
82 | int snd_soc_link_hw_params(struct snd_pcm_substream *substream,
| ^~~~~~~~~~~~~~~~~~~~~~
sound/soc/soc-link.c:95:6: warning: no previous prototype for 'snd_soc_link_hw_free' [-Wmissing-prototypes]
95 | void snd_soc_link_hw_free(struct snd_pcm_substream *substream)
| ^~~~~~~~~~~~~~~~~~~~
sound/soc/soc-link.c:104:5: warning: no previous prototype for 'snd_soc_link_trigger' [-Wmissing-prototypes]
104 | int snd_soc_link_trigger(struct snd_pcm_substream *substream, int cmd)
| ^~~~~~~~~~~~~~~~~~~~
<< from sound/soc/soc-link.c:8:
>> sound/soc/soc-link.c:116:5: warning: no previous prototype for 'snd_soc_link_compr_startup' [-Wmissing-prototypes]
116 | int snd_soc_link_compr_startup(struct snd_compr_stream *cstream)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
vim +/snd_soc_link_compr_startup +116 sound/soc/soc-link.c
115
> 116 int snd_soc_link_compr_startup(struct snd_compr_stream *cstream)
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 33328 bytes --]
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH v2 6/7] ASoC: soc-link: add snd_soc_link_compr_shutdown()
2020-05-21 1:57 ` [PATCH v2 6/7] ASoC: soc-link: add snd_soc_link_compr_shutdown() Kuninori Morimoto
@ 2020-05-21 12:33 ` kbuild test robot
2020-05-21 18:57 ` Nick Desaulniers
0 siblings, 1 reply; 21+ messages in thread
From: kbuild test robot @ 2020-05-21 12:33 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 5642 bytes --]
Hi Kuninori,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on asoc/for-next]
[also build test WARNING on next-20200519]
[cannot apply to sound/for-next v5.7-rc6]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Kuninori-Morimoto/ASoC-add-soc-link/20200521-100326
base: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
config: x86_64-randconfig-r016-20200521 (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 3393cc4cebf9969db94dc424b7a2b6195589c33b)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>
All warnings (new ones prefixed by >>, old ones prefixed by <<):
sound/soc/soc-link.c:28:5: warning: no previous prototype for function 'snd_soc_link_init' [-Wmissing-prototypes]
int snd_soc_link_init(struct snd_soc_pcm_runtime *rtd)
^
sound/soc/soc-link.c:28:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int snd_soc_link_init(struct snd_soc_pcm_runtime *rtd)
^
static
sound/soc/soc-link.c:38:5: warning: no previous prototype for function 'snd_soc_link_be_hw_params_fixup' [-Wmissing-prototypes]
int snd_soc_link_be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd,
^
sound/soc/soc-link.c:38:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int snd_soc_link_be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd,
^
static
sound/soc/soc-link.c:49:5: warning: no previous prototype for function 'snd_soc_link_startup' [-Wmissing-prototypes]
int snd_soc_link_startup(struct snd_pcm_substream *substream)
^
sound/soc/soc-link.c:49:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int snd_soc_link_startup(struct snd_pcm_substream *substream)
^
static
sound/soc/soc-link.c:61:6: warning: no previous prototype for function 'snd_soc_link_shutdown' [-Wmissing-prototypes]
void snd_soc_link_shutdown(struct snd_pcm_substream *substream)
^
sound/soc/soc-link.c:61:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void snd_soc_link_shutdown(struct snd_pcm_substream *substream)
^
static
sound/soc/soc-link.c:70:5: warning: no previous prototype for function 'snd_soc_link_prepare' [-Wmissing-prototypes]
int snd_soc_link_prepare(struct snd_pcm_substream *substream)
^
sound/soc/soc-link.c:70:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int snd_soc_link_prepare(struct snd_pcm_substream *substream)
^
static
sound/soc/soc-link.c:82:5: warning: no previous prototype for function 'snd_soc_link_hw_params' [-Wmissing-prototypes]
int snd_soc_link_hw_params(struct snd_pcm_substream *substream,
^
sound/soc/soc-link.c:82:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int snd_soc_link_hw_params(struct snd_pcm_substream *substream,
^
static
sound/soc/soc-link.c:95:6: warning: no previous prototype for function 'snd_soc_link_hw_free' [-Wmissing-prototypes]
void snd_soc_link_hw_free(struct snd_pcm_substream *substream)
^
sound/soc/soc-link.c:95:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void snd_soc_link_hw_free(struct snd_pcm_substream *substream)
^
static
sound/soc/soc-link.c:104:5: warning: no previous prototype for function 'snd_soc_link_trigger' [-Wmissing-prototypes]
int snd_soc_link_trigger(struct snd_pcm_substream *substream, int cmd)
^
sound/soc/soc-link.c:104:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int snd_soc_link_trigger(struct snd_pcm_substream *substream, int cmd)
^
static
sound/soc/soc-link.c:116:5: warning: no previous prototype for function 'snd_soc_link_compr_startup' [-Wmissing-prototypes]
int snd_soc_link_compr_startup(struct snd_compr_stream *cstream)
^
sound/soc/soc-link.c:116:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int snd_soc_link_compr_startup(struct snd_compr_stream *cstream)
^
static
>> sound/soc/soc-link.c:129:6: warning: no previous prototype for function 'snd_soc_link_compr_shutdown' [-Wmissing-prototypes]
void snd_soc_link_compr_shutdown(struct snd_compr_stream *cstream)
^
sound/soc/soc-link.c:129:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void snd_soc_link_compr_shutdown(struct snd_compr_stream *cstream)
^
static
10 warnings generated.
vim +/snd_soc_link_compr_shutdown +129 sound/soc/soc-link.c
128
> 129 void snd_soc_link_compr_shutdown(struct snd_compr_stream *cstream)
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 48594 bytes --]
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH v2 1/7] ASoC: add soc-link.c
2020-05-21 1:56 ` [PATCH v2 1/7] ASoC: add soc-link.c Kuninori Morimoto
2020-05-21 8:34 ` kbuild test robot
2020-05-21 10:12 ` kbuild test robot
@ 2020-05-21 18:10 ` Ranjani Sridharan
2020-05-21 23:17 ` Kuninori Morimoto
2 siblings, 1 reply; 21+ messages in thread
From: Ranjani Sridharan @ 2020-05-21 18:10 UTC (permalink / raw)
To: Kuninori Morimoto, Mark Brown; +Cc: Linux-ALSA
On Thu, 2020-05-21 at 10:56 +0900, Kuninori Morimoto wrote:
> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
>
> Current ALSA SoC has many dai_link->xxx() functions.
> But, it is implemented randomly at random place.
>
> This patch creats new soc-link.c and collect dai_link related
> operation into it.
>
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> ---
> include/sound/soc-link.h | 13 +++++++++++++
> sound/soc/Makefile | 2 +-
> sound/soc/soc-core.c | 12 ++++--------
> sound/soc/soc-link.c | 36 ++++++++++++++++++++++++++++++++++++
> 4 files changed, 54 insertions(+), 9 deletions(-)
> create mode 100644 include/sound/soc-link.h
> create mode 100644 sound/soc/soc-link.c
>
> diff --git a/include/sound/soc-link.h b/include/sound/soc-link.h
> new file mode 100644
> index 000000000000..7fc5cead5942
> --- /dev/null
> +++ b/include/sound/soc-link.h
> @@ -0,0 +1,13 @@
> +/* SPDX-License-Identifier: GPL-2.0
> + *
> + * soc-link.h
> + *
> + * Copyright (C) 2019 Renesas Electronics Corp.
> + * Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> + */
> +#ifndef __SOC_LINK_H
> +#define __SOC_LINK_H
> +
> +int snd_soc_link_init(struct snd_soc_pcm_runtime *rtd);
> +
> +#endif /* __SOC_LINK_H */
> diff --git a/sound/soc/Makefile b/sound/soc/Makefile
> index 861a21b79484..70a5f19ea3a1 100644
> --- a/sound/soc/Makefile
> +++ b/sound/soc/Makefile
> @@ -1,6 +1,6 @@
> # SPDX-License-Identifier: GPL-2.0
> snd-soc-core-objs := soc-core.o soc-dapm.o soc-jack.o soc-utils.o
> soc-dai.o soc-component.o
> -snd-soc-core-objs += soc-pcm.o soc-io.o soc-devres.o soc-ops.o
> +snd-soc-core-objs += soc-pcm.o soc-io.o soc-devres.o soc-ops.o soc-
> link.o
> snd-soc-core-$(CONFIG_SND_SOC_COMPRESS) += soc-compress.o
>
> ifneq ($(CONFIG_SND_SOC_TOPOLOGY),)
> diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
> index e697258d2ffc..955e175643d7 100644
> --- a/sound/soc/soc-core.c
> +++ b/sound/soc/soc-core.c
> @@ -38,6 +38,7 @@
> #include <sound/soc.h>
> #include <sound/soc-dpcm.h>
> #include <sound/soc-topology.h>
> +#include <sound/soc-link.h>
> #include <sound/initval.h>
>
> #define CREATE_TRACE_POINTS
> @@ -1049,14 +1050,9 @@ static int soc_init_pcm_runtime(struct
> snd_soc_card *card,
> rtd->pmdown_time = pmdown_time;
>
> /* do machine specific initialization */
> - if (dai_link->init) {
> - ret = dai_link->init(rtd);
> - if (ret < 0) {
> - dev_err(card->dev, "ASoC: failed to init %s:
> %d\n",
> - dai_link->name, ret);
> - return ret;
> - }
> - }
> + ret = snd_soc_link_init(rtd);
> + if (ret < 0)
> + return ret;
>
> if (dai_link->dai_fmt) {
> ret = snd_soc_runtime_set_dai_fmt(rtd, dai_link-
> >dai_fmt);
> diff --git a/sound/soc/soc-link.c b/sound/soc/soc-link.c
> new file mode 100644
> index 000000000000..4bdd8d0dd93a
> --- /dev/null
> +++ b/sound/soc/soc-link.c
> @@ -0,0 +1,36 @@
> +// SPDX-License-Identifier: GPL-2.0
> +//
> +// soc-link.c
> +//
> +// Copyright (C) 2019 Renesas Electronics Corp.
> +// Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> +//
> +#include <sound/soc.h>
Morimoto-san,
Dont we also need to include soc-link.h in soc-link.c?
Thanks,
Ranjani
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH v2 0/7] ASoC: add soc-link
2020-05-21 1:55 [PATCH v2 0/7] ASoC: add soc-link Kuninori Morimoto
` (6 preceding siblings ...)
2020-05-21 1:57 ` [PATCH v2 7/7] ASoC: soc-link: add snd_soc_link_compr_set_params() Kuninori Morimoto
@ 2020-05-21 18:25 ` Ranjani Sridharan
7 siblings, 0 replies; 21+ messages in thread
From: Ranjani Sridharan @ 2020-05-21 18:25 UTC (permalink / raw)
To: Kuninori Morimoto, Mark Brown; +Cc: Linux-ALSA
On Thu, 2020-05-21 at 10:55 +0900, Kuninori Morimoto wrote:
> Hi Mark
>
> Current ALSA SoC is handling dai_link related operation,
> but it is implmemented directly without using function/macro,
> and at random place.
>
> This v2 patch-set creates new snd_soc_link_xxx() functions
> which handles dai_link related operation,
> and implmement these at new soc-link.c.
>
> v1 -> v2
> - #include <sound/soc-link.h> is added on each c source file
> instead of soc.h
> - not have extra error message after snd_soc_link_xxx(),
> because it already indicate it via snc_link_ret()
> - snd_soc_link_compr_xxx() doesn't have rtd parameter,
> because it can be created from cstream
>
> Link:
> https://lore.kernel.org/r/877dx868op.wl-kuninori.morimoto.gx@renesas.com
>
> Kuninori Morimoto (7):
> ASoC: add soc-link.c
> ASoC: soc-link: move soc_rtd_xxx()
> ASoC: soc-link: remove unneeded parameter from snd_soc_link_xxx()
> ASoC: soc-link: add snd_soc_link_be_hw_params_fixup()
> ASoC: soc-link: add snd_soc_link_compr_startup()
> ASoC: soc-link: add snd_soc_link_compr_shutdown()
> ASoC: soc-link: add snd_soc_link_compr_set_params()
The series LGTM except for the missing include for soc-link.h in soc-
link.c. Thanks, Morimoto-san.
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH v2 6/7] ASoC: soc-link: add snd_soc_link_compr_shutdown()
2020-05-21 12:33 ` kbuild test robot
@ 2020-05-21 18:57 ` Nick Desaulniers
0 siblings, 0 replies; 21+ messages in thread
From: Nick Desaulniers @ 2020-05-21 18:57 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 297 bytes --]
On Thu, May 21, 2020 at 5:33 AM kbuild test robot <lkp@intel.com> wrote:
>
> compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 3393cc4cebf9969db94dc424b7a2b6195589c33b)
> reproduce (this is a W=1 build):
^ ah, nice, thanks Philip and team!
--
Thanks,
~Nick Desaulniers
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH v2 1/7] ASoC: add soc-link.c
2020-05-21 18:10 ` Ranjani Sridharan
@ 2020-05-21 23:17 ` Kuninori Morimoto
0 siblings, 0 replies; 21+ messages in thread
From: Kuninori Morimoto @ 2020-05-21 23:17 UTC (permalink / raw)
To: Ranjani Sridharan; +Cc: Linux-ALSA, Mark Brown
Hi Ranjani
Thank you for the review
> > From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> >
> > Current ALSA SoC has many dai_link->xxx() functions.
> > But, it is implemented randomly at random place.
> >
> > This patch creats new soc-link.c and collect dai_link related
> > operation into it.
> >
> > Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> > ---
(snip)
> > +#include <sound/soc.h>
> Morimoto-san,
>
> Dont we also need to include soc-link.h in soc-link.c?
Ah, Yes, indeed, Thanks.
Will fix it in v3
Thank you for your help !!
Best regards
---
Kuninori Morimoto
^ permalink raw reply [flat|nested] 21+ messages in thread
end of thread, other threads:[~2020-05-21 23:18 UTC | newest]
Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-21 1:55 [PATCH v2 0/7] ASoC: add soc-link Kuninori Morimoto
2020-05-21 1:56 ` [PATCH v2 1/7] ASoC: add soc-link.c Kuninori Morimoto
2020-05-21 8:34 ` kbuild test robot
2020-05-21 10:12 ` kbuild test robot
2020-05-21 18:10 ` Ranjani Sridharan
2020-05-21 23:17 ` Kuninori Morimoto
2020-05-21 1:56 ` [PATCH v2 2/7] ASoC: soc-link: move soc_rtd_xxx() Kuninori Morimoto
2020-05-21 9:34 ` kbuild test robot
2020-05-21 10:54 ` kbuild test robot
2020-05-21 1:57 ` [PATCH v2 3/7] ASoC: soc-link: remove unneeded parameter from snd_soc_link_xxx() Kuninori Morimoto
2020-05-21 1:57 ` [PATCH v2 4/7] ASoC: soc-link: add snd_soc_link_be_hw_params_fixup() Kuninori Morimoto
2020-05-21 10:18 ` kbuild test robot
2020-05-21 11:37 ` kbuild test robot
2020-05-21 1:57 ` [PATCH v2 5/7] ASoC: soc-link: add snd_soc_link_compr_startup() Kuninori Morimoto
2020-05-21 11:19 ` kbuild test robot
2020-05-21 12:17 ` kbuild test robot
2020-05-21 1:57 ` [PATCH v2 6/7] ASoC: soc-link: add snd_soc_link_compr_shutdown() Kuninori Morimoto
2020-05-21 12:33 ` kbuild test robot
2020-05-21 18:57 ` Nick Desaulniers
2020-05-21 1:57 ` [PATCH v2 7/7] ASoC: soc-link: add snd_soc_link_compr_set_params() Kuninori Morimoto
2020-05-21 18:25 ` [PATCH v2 0/7] ASoC: add soc-link Ranjani Sridharan
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.