[PATCH v2 00/12] ASoC: soc-component: add snd_soc_component_xxx()
Hi Mark
These are v2 of snd_soc_component_compr_xxx() function patches. I think component related function should be implemented at soc-component.c, otherwise it is confusable to read. These are for it.
v1 -> v2 - fixup function return timing on snd_soc_component_compr_get_params() snd_soc_component_compr_get_metadata()
- use mutex at compr side on snd_soc_component_compr_get_caps() snd_soc_component_compr_get_codec_caps() snd_soc_component_compr_copy()
Link: https://lore.kernel.org/r/878sb78ac4.wl-kuninori.morimoto.gx@renesas.com
Kuninori Morimoto (12): ASoC: soc-component: add snd_soc_component_compr_open() ASoC: soc-component: add snd_soc_component_compr_free() ASoC: soc-component: add snd_soc_component_compr_trigger() ASoC: soc-component: add snd_soc_component_compr_set_params() ASoC: soc-component: add snd_soc_component_compr_get_params() ASoC: soc-component: add snd_soc_component_compr_get_caps() ASoC: soc-component: add snd_soc_component_compr_get_codec_caps() ASoC: soc-component: add snd_soc_component_compr_ack() ASoC: soc-component: add snd_soc_component_compr_pointer() ASoC: soc-component: add snd_soc_component_compr_copy() ASoC: soc-component: add snd_soc_component_compr_set_metadata() ASoC: soc-component: add snd_soc_component_compr_get_metadata()
include/sound/soc-component.h | 22 +++ sound/soc/soc-component.c | 255 ++++++++++++++++++++++++++++++++ sound/soc/soc-compress.c | 263 ++++------------------------------ 3 files changed, 303 insertions(+), 237 deletions(-)
From: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
component related function should be implemented at soc-component.c. This patch moves soc-compress soc_compr_components_open() to soc-component as snd_soc_component_compr_open().
Signed-off-by: Kuninori Morimoto kuninori.morimoto.gx@renesas.com --- include/sound/soc-component.h | 2 ++ sound/soc/soc-component.c | 23 +++++++++++++++++++++++ sound/soc/soc-compress.c | 31 ++----------------------------- 3 files changed, 27 insertions(+), 29 deletions(-)
diff --git a/include/sound/soc-component.h b/include/sound/soc-component.h index 21f1d120b68e..0d79a0b30aba 100644 --- a/include/sound/soc-component.h +++ b/include/sound/soc-component.h @@ -444,6 +444,8 @@ int snd_soc_component_of_xlate_dai_id(struct snd_soc_component *component, int snd_soc_component_of_xlate_dai_name(struct snd_soc_component *component, struct of_phandle_args *args, const char **dai_name); +int snd_soc_component_compr_open(struct snd_compr_stream *cstream, + struct snd_soc_component **last);
int snd_soc_pcm_component_pointer(struct snd_pcm_substream *substream); int snd_soc_pcm_component_ioctl(struct snd_pcm_substream *substream, diff --git a/sound/soc/soc-component.c b/sound/soc/soc-component.c index 6d719c2db92e..a711bee11712 100644 --- a/sound/soc/soc-component.c +++ b/sound/soc/soc-component.c @@ -421,6 +421,29 @@ EXPORT_SYMBOL_GPL(snd_soc_component_exit_regmap);
#endif
+int snd_soc_component_compr_open(struct snd_compr_stream *cstream, + struct snd_soc_component **last) +{ + struct snd_soc_pcm_runtime *rtd = cstream->private_data; + struct snd_soc_component *component; + int i, ret; + + for_each_rtd_components(rtd, i, component) { + if (component->driver->compress_ops && + component->driver->compress_ops->open) { + ret = component->driver->compress_ops->open(component, cstream); + if (ret < 0) { + *last = component; + return soc_component_ret(component, ret); + } + } + } + + *last = NULL; + return 0; +} +EXPORT_SYMBOL_GPL(snd_soc_component_compr_open); + static unsigned int soc_component_read_no_lock( struct snd_soc_component *component, unsigned int reg) diff --git a/sound/soc/soc-compress.c b/sound/soc/soc-compress.c index c7ad52a21a29..d55ea0db7901 100644 --- a/sound/soc/soc-compress.c +++ b/sound/soc/soc-compress.c @@ -22,33 +22,6 @@ #include <sound/soc-link.h> #include <linux/pm_runtime.h>
-static int soc_compr_components_open(struct snd_compr_stream *cstream, - struct snd_soc_component **last) -{ - struct snd_soc_pcm_runtime *rtd = cstream->private_data; - struct snd_soc_component *component; - int i, ret; - - for_each_rtd_components(rtd, i, component) { - if (!component->driver->compress_ops || - !component->driver->compress_ops->open) - continue; - - ret = component->driver->compress_ops->open(component, cstream); - if (ret < 0) { - dev_err(component->dev, - "Compress ASoC: can't open platform %s: %d\n", - component->name, ret); - - *last = component; - return ret; - } - } - - *last = NULL; - return 0; -} - static int soc_compr_components_free(struct snd_compr_stream *cstream, struct snd_soc_component *last) { @@ -88,7 +61,7 @@ static int soc_compr_open(struct snd_compr_stream *cstream) if (ret < 0) goto out;
- ret = soc_compr_components_open(cstream, &component); + ret = snd_soc_component_compr_open(cstream, &component); if (ret < 0) goto machine_err;
@@ -156,7 +129,7 @@ static int soc_compr_open_fe(struct snd_compr_stream *cstream) if (ret < 0) goto out;
- ret = soc_compr_components_open(cstream, &component); + ret = snd_soc_component_compr_open(cstream, &component); if (ret < 0) goto open_err;
From: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
component related function should be implemented at soc-component.c. This patch moves soc-compress soc_compr_components_free() to soc-component as snd_soc_component_compr_free().
Signed-off-by: Kuninori Morimoto kuninori.morimoto.gx@renesas.com --- include/sound/soc-component.h | 2 ++ sound/soc/soc-component.c | 18 ++++++++++++++++++ sound/soc/soc-compress.c | 29 ++++------------------------- 3 files changed, 24 insertions(+), 25 deletions(-)
diff --git a/include/sound/soc-component.h b/include/sound/soc-component.h index 0d79a0b30aba..1b2ed4a463b2 100644 --- a/include/sound/soc-component.h +++ b/include/sound/soc-component.h @@ -446,6 +446,8 @@ int snd_soc_component_of_xlate_dai_name(struct snd_soc_component *component, const char **dai_name); int snd_soc_component_compr_open(struct snd_compr_stream *cstream, struct snd_soc_component **last); +void snd_soc_component_compr_free(struct snd_compr_stream *cstream, + struct snd_soc_component *last);
int snd_soc_pcm_component_pointer(struct snd_pcm_substream *substream); int snd_soc_pcm_component_ioctl(struct snd_pcm_substream *substream, diff --git a/sound/soc/soc-component.c b/sound/soc/soc-component.c index a711bee11712..5dcbdfe411f6 100644 --- a/sound/soc/soc-component.c +++ b/sound/soc/soc-component.c @@ -444,6 +444,24 @@ int snd_soc_component_compr_open(struct snd_compr_stream *cstream, } EXPORT_SYMBOL_GPL(snd_soc_component_compr_open);
+void snd_soc_component_compr_free(struct snd_compr_stream *cstream, + struct snd_soc_component *last) +{ + struct snd_soc_pcm_runtime *rtd = cstream->private_data; + struct snd_soc_component *component; + int i; + + for_each_rtd_components(rtd, i, component) { + if (component == last) + break; + + if (component->driver->compress_ops && + component->driver->compress_ops->free) + component->driver->compress_ops->free(component, cstream); + } +} +EXPORT_SYMBOL_GPL(snd_soc_component_compr_free); + static unsigned int soc_component_read_no_lock( struct snd_soc_component *component, unsigned int reg) diff --git a/sound/soc/soc-compress.c b/sound/soc/soc-compress.c index d55ea0db7901..4517baf0e62c 100644 --- a/sound/soc/soc-compress.c +++ b/sound/soc/soc-compress.c @@ -22,27 +22,6 @@ #include <sound/soc-link.h> #include <linux/pm_runtime.h>
-static int soc_compr_components_free(struct snd_compr_stream *cstream, - struct snd_soc_component *last) -{ - struct snd_soc_pcm_runtime *rtd = cstream->private_data; - struct snd_soc_component *component; - int i; - - for_each_rtd_components(rtd, i, component) { - if (component == last) - break; - - if (!component->driver->compress_ops || - !component->driver->compress_ops->free) - continue; - - component->driver->compress_ops->free(component, cstream); - } - - return 0; -} - static int soc_compr_open(struct snd_compr_stream *cstream) { struct snd_soc_pcm_runtime *rtd = cstream->private_data; @@ -76,7 +55,7 @@ static int soc_compr_open(struct snd_compr_stream *cstream) return 0;
machine_err: - soc_compr_components_free(cstream, component); + snd_soc_component_compr_free(cstream, component);
snd_soc_dai_compr_shutdown(cpu_dai, cstream); out: @@ -150,7 +129,7 @@ static int soc_compr_open_fe(struct snd_compr_stream *cstream) return 0;
machine_err: - soc_compr_components_free(cstream, component); + snd_soc_component_compr_free(cstream, component); open_err: snd_soc_dai_compr_shutdown(cpu_dai, cstream); out: @@ -182,7 +161,7 @@ static int soc_compr_free(struct snd_compr_stream *cstream)
snd_soc_link_compr_shutdown(cstream);
- soc_compr_components_free(cstream, NULL); + snd_soc_component_compr_free(cstream, NULL);
snd_soc_dai_compr_shutdown(cpu_dai, cstream);
@@ -230,7 +209,7 @@ static int soc_compr_free_fe(struct snd_compr_stream *cstream)
snd_soc_link_compr_shutdown(cstream);
- soc_compr_components_free(cstream, NULL); + snd_soc_component_compr_free(cstream, NULL);
snd_soc_dai_compr_shutdown(cpu_dai, cstream);
From: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
component related function should be implemented at soc-component.c. This patch moves soc-compress soc_compr_components_trigger() to soc-component as snd_soc_component_compr_trigger().
Signed-off-by: Kuninori Morimoto kuninori.morimoto.gx@renesas.com --- include/sound/soc-component.h | 1 + sound/soc/soc-component.c | 20 ++++++++++++++++++++ sound/soc/soc-compress.c | 27 +++------------------------ 3 files changed, 24 insertions(+), 24 deletions(-)
diff --git a/include/sound/soc-component.h b/include/sound/soc-component.h index 1b2ed4a463b2..6cb4a6a0bc39 100644 --- a/include/sound/soc-component.h +++ b/include/sound/soc-component.h @@ -448,6 +448,7 @@ int snd_soc_component_compr_open(struct snd_compr_stream *cstream, struct snd_soc_component **last); void snd_soc_component_compr_free(struct snd_compr_stream *cstream, struct snd_soc_component *last); +int snd_soc_component_compr_trigger(struct snd_compr_stream *cstream, int cmd);
int snd_soc_pcm_component_pointer(struct snd_pcm_substream *substream); int snd_soc_pcm_component_ioctl(struct snd_pcm_substream *substream, diff --git a/sound/soc/soc-component.c b/sound/soc/soc-component.c index 5dcbdfe411f6..cf34545f4108 100644 --- a/sound/soc/soc-component.c +++ b/sound/soc/soc-component.c @@ -462,6 +462,26 @@ void snd_soc_component_compr_free(struct snd_compr_stream *cstream, } EXPORT_SYMBOL_GPL(snd_soc_component_compr_free);
+int snd_soc_component_compr_trigger(struct snd_compr_stream *cstream, int cmd) +{ + struct snd_soc_pcm_runtime *rtd = cstream->private_data; + struct snd_soc_component *component; + int i, ret; + + for_each_rtd_components(rtd, i, component) { + if (component->driver->compress_ops && + component->driver->compress_ops->trigger) { + ret = component->driver->compress_ops->trigger( + component, cstream, cmd); + if (ret < 0) + return soc_component_ret(component, ret); + } + } + + return 0; +} +EXPORT_SYMBOL_GPL(snd_soc_component_compr_trigger); + static unsigned int soc_component_read_no_lock( struct snd_soc_component *component, unsigned int reg) diff --git a/sound/soc/soc-compress.c b/sound/soc/soc-compress.c index 4517baf0e62c..d85bd1d1c119 100644 --- a/sound/soc/soc-compress.c +++ b/sound/soc/soc-compress.c @@ -217,27 +217,6 @@ static int soc_compr_free_fe(struct snd_compr_stream *cstream) return 0; }
-static int soc_compr_components_trigger(struct snd_compr_stream *cstream, - int cmd) -{ - struct snd_soc_pcm_runtime *rtd = cstream->private_data; - struct snd_soc_component *component; - int i, ret; - - for_each_rtd_components(rtd, i, component) { - if (!component->driver->compress_ops || - !component->driver->compress_ops->trigger) - continue; - - ret = component->driver->compress_ops->trigger( - component, cstream, cmd); - if (ret < 0) - return ret; - } - - return 0; -} - static int soc_compr_trigger(struct snd_compr_stream *cstream, int cmd) { struct snd_soc_pcm_runtime *rtd = cstream->private_data; @@ -248,7 +227,7 @@ static int soc_compr_trigger(struct snd_compr_stream *cstream, int cmd)
mutex_lock_nested(&rtd->card->pcm_mutex, rtd->card->pcm_subclass);
- ret = soc_compr_components_trigger(cstream, cmd); + ret = snd_soc_component_compr_trigger(cstream, cmd); if (ret < 0) goto out;
@@ -279,7 +258,7 @@ static int soc_compr_trigger_fe(struct snd_compr_stream *cstream, int cmd)
if (cmd == SND_COMPR_TRIGGER_PARTIAL_DRAIN || cmd == SND_COMPR_TRIGGER_DRAIN) - return soc_compr_components_trigger(cstream, cmd); + return snd_soc_component_compr_trigger(cstream, cmd);
mutex_lock_nested(&fe->card->mutex, SND_SOC_CARD_CLASS_RUNTIME);
@@ -287,7 +266,7 @@ static int soc_compr_trigger_fe(struct snd_compr_stream *cstream, int cmd) if (ret < 0) goto out;
- ret = soc_compr_components_trigger(cstream, cmd); + ret = snd_soc_component_compr_trigger(cstream, cmd); if (ret < 0) goto out;
From: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
component related function should be implemented at soc-component.c. This patch moves soc-compress soc_compr_components_set_params() to soc-component as snd_soc_component_compr_set_params().
Signed-off-by: Kuninori Morimoto kuninori.morimoto.gx@renesas.com --- include/sound/soc-component.h | 2 ++ sound/soc/soc-component.c | 21 +++++++++++++++++++++ sound/soc/soc-compress.c | 25 ++----------------------- 3 files changed, 25 insertions(+), 23 deletions(-)
diff --git a/include/sound/soc-component.h b/include/sound/soc-component.h index 6cb4a6a0bc39..d18a16a0881b 100644 --- a/include/sound/soc-component.h +++ b/include/sound/soc-component.h @@ -449,6 +449,8 @@ int snd_soc_component_compr_open(struct snd_compr_stream *cstream, void snd_soc_component_compr_free(struct snd_compr_stream *cstream, struct snd_soc_component *last); int snd_soc_component_compr_trigger(struct snd_compr_stream *cstream, int cmd); +int snd_soc_component_compr_set_params(struct snd_compr_stream *cstream, + struct snd_compr_params *params);
int snd_soc_pcm_component_pointer(struct snd_pcm_substream *substream); int snd_soc_pcm_component_ioctl(struct snd_pcm_substream *substream, diff --git a/sound/soc/soc-component.c b/sound/soc/soc-component.c index cf34545f4108..4afd63223724 100644 --- a/sound/soc/soc-component.c +++ b/sound/soc/soc-component.c @@ -482,6 +482,27 @@ int snd_soc_component_compr_trigger(struct snd_compr_stream *cstream, int cmd) } EXPORT_SYMBOL_GPL(snd_soc_component_compr_trigger);
+int snd_soc_component_compr_set_params(struct snd_compr_stream *cstream, + struct snd_compr_params *params) +{ + struct snd_soc_pcm_runtime *rtd = cstream->private_data; + struct snd_soc_component *component; + int i, ret; + + for_each_rtd_components(rtd, i, component) { + if (component->driver->compress_ops && + component->driver->compress_ops->set_params) { + ret = component->driver->compress_ops->set_params( + component, cstream, params); + if (ret < 0) + return soc_component_ret(component, ret); + } + } + + return 0; +} +EXPORT_SYMBOL_GPL(snd_soc_component_compr_set_params); + static unsigned int soc_component_read_no_lock( struct snd_soc_component *component, unsigned int reg) diff --git a/sound/soc/soc-compress.c b/sound/soc/soc-compress.c index d85bd1d1c119..437ccd121b99 100644 --- a/sound/soc/soc-compress.c +++ b/sound/soc/soc-compress.c @@ -295,27 +295,6 @@ static int soc_compr_trigger_fe(struct snd_compr_stream *cstream, int cmd) return ret; }
-static int soc_compr_components_set_params(struct snd_compr_stream *cstream, - struct snd_compr_params *params) -{ - struct snd_soc_pcm_runtime *rtd = cstream->private_data; - struct snd_soc_component *component; - int i, ret; - - for_each_rtd_components(rtd, i, component) { - if (!component->driver->compress_ops || - !component->driver->compress_ops->set_params) - continue; - - ret = component->driver->compress_ops->set_params( - component, cstream, params); - if (ret < 0) - return ret; - } - - return 0; -} - static int soc_compr_set_params(struct snd_compr_stream *cstream, struct snd_compr_params *params) { @@ -337,7 +316,7 @@ static int soc_compr_set_params(struct snd_compr_stream *cstream, if (ret < 0) goto err;
- ret = soc_compr_components_set_params(cstream, params); + ret = snd_soc_component_compr_set_params(cstream, params); if (ret < 0) goto err;
@@ -394,7 +373,7 @@ static int soc_compr_set_params_fe(struct snd_compr_stream *cstream, if (ret < 0) goto out;
- ret = soc_compr_components_set_params(cstream, params); + ret = snd_soc_component_compr_set_params(cstream, params); if (ret < 0) goto out;
From: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
component related function should be implemented at soc-component.c. This patch adds snd_soc_component_compr_get_params().
Signed-off-by: Kuninori Morimoto kuninori.morimoto.gx@renesas.com --- include/sound/soc-component.h | 2 ++ sound/soc/soc-component.c | 20 ++++++++++++++++++++ sound/soc/soc-compress.c | 14 ++------------ 3 files changed, 24 insertions(+), 12 deletions(-)
diff --git a/include/sound/soc-component.h b/include/sound/soc-component.h index d18a16a0881b..6841c3037548 100644 --- a/include/sound/soc-component.h +++ b/include/sound/soc-component.h @@ -451,6 +451,8 @@ void snd_soc_component_compr_free(struct snd_compr_stream *cstream, int snd_soc_component_compr_trigger(struct snd_compr_stream *cstream, int cmd); int snd_soc_component_compr_set_params(struct snd_compr_stream *cstream, struct snd_compr_params *params); +int snd_soc_component_compr_get_params(struct snd_compr_stream *cstream, + struct snd_codec *params);
int snd_soc_pcm_component_pointer(struct snd_pcm_substream *substream); int snd_soc_pcm_component_ioctl(struct snd_pcm_substream *substream, diff --git a/sound/soc/soc-component.c b/sound/soc/soc-component.c index 4afd63223724..f87071c6edb0 100644 --- a/sound/soc/soc-component.c +++ b/sound/soc/soc-component.c @@ -503,6 +503,26 @@ int snd_soc_component_compr_set_params(struct snd_compr_stream *cstream, } EXPORT_SYMBOL_GPL(snd_soc_component_compr_set_params);
+int snd_soc_component_compr_get_params(struct snd_compr_stream *cstream, + struct snd_codec *params) +{ + struct snd_soc_pcm_runtime *rtd = cstream->private_data; + struct snd_soc_component *component; + int i, ret; + + for_each_rtd_components(rtd, i, component) { + if (component->driver->compress_ops && + component->driver->compress_ops->get_params) { + ret = component->driver->compress_ops->get_params( + component, cstream, params); + return soc_component_ret(component, ret); + } + } + + return 0; +} +EXPORT_SYMBOL_GPL(snd_soc_component_compr_get_params); + static unsigned int soc_component_read_no_lock( struct snd_soc_component *component, unsigned int reg) diff --git a/sound/soc/soc-compress.c b/sound/soc/soc-compress.c index 437ccd121b99..a98defdecad7 100644 --- a/sound/soc/soc-compress.c +++ b/sound/soc/soc-compress.c @@ -394,9 +394,8 @@ static int soc_compr_get_params(struct snd_compr_stream *cstream, struct snd_codec *params) { struct snd_soc_pcm_runtime *rtd = cstream->private_data; - struct snd_soc_component *component; struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); - int i, ret = 0; + int ret = 0;
mutex_lock_nested(&rtd->card->pcm_mutex, rtd->card->pcm_subclass);
@@ -404,16 +403,7 @@ static int soc_compr_get_params(struct snd_compr_stream *cstream, if (ret < 0) goto err;
- for_each_rtd_components(rtd, i, component) { - if (!component->driver->compress_ops || - !component->driver->compress_ops->get_params) - continue; - - ret = component->driver->compress_ops->get_params( - component, cstream, params); - break; - } - + ret = snd_soc_component_compr_get_params(cstream, params); err: mutex_unlock(&rtd->card->pcm_mutex); return ret;
From: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
component related function should be implemented at soc-component.c. This patch adds snd_soc_component_compr_get_caps().
Signed-off-by: Kuninori Morimoto kuninori.morimoto.gx@renesas.com --- include/sound/soc-component.h | 2 ++ sound/soc/soc-component.c | 24 ++++++++++++++++++++++++ sound/soc/soc-compress.c | 27 ++------------------------- 3 files changed, 28 insertions(+), 25 deletions(-)
diff --git a/include/sound/soc-component.h b/include/sound/soc-component.h index 6841c3037548..7fd45462963e 100644 --- a/include/sound/soc-component.h +++ b/include/sound/soc-component.h @@ -453,6 +453,8 @@ int snd_soc_component_compr_set_params(struct snd_compr_stream *cstream, struct snd_compr_params *params); int snd_soc_component_compr_get_params(struct snd_compr_stream *cstream, struct snd_codec *params); +int snd_soc_component_compr_get_caps(struct snd_compr_stream *cstream, + struct snd_compr_caps *caps);
int snd_soc_pcm_component_pointer(struct snd_pcm_substream *substream); int snd_soc_pcm_component_ioctl(struct snd_pcm_substream *substream, diff --git a/sound/soc/soc-component.c b/sound/soc/soc-component.c index f87071c6edb0..b885e96cc8ae 100644 --- a/sound/soc/soc-component.c +++ b/sound/soc/soc-component.c @@ -523,6 +523,30 @@ int snd_soc_component_compr_get_params(struct snd_compr_stream *cstream, } EXPORT_SYMBOL_GPL(snd_soc_component_compr_get_params);
+int snd_soc_component_compr_get_caps(struct snd_compr_stream *cstream, + struct snd_compr_caps *caps) +{ + struct snd_soc_pcm_runtime *rtd = cstream->private_data; + struct snd_soc_component *component; + int i, ret = 0; + + mutex_lock_nested(&rtd->card->pcm_mutex, rtd->card->pcm_subclass); + + for_each_rtd_components(rtd, i, component) { + if (component->driver->compress_ops && + component->driver->compress_ops->get_caps) { + ret = component->driver->compress_ops->get_caps( + component, cstream, caps); + break; + } + } + + mutex_unlock(&rtd->card->pcm_mutex); + + return soc_component_ret(component, ret); +} +EXPORT_SYMBOL_GPL(snd_soc_component_compr_get_caps); + static unsigned int soc_component_read_no_lock( struct snd_soc_component *component, unsigned int reg) diff --git a/sound/soc/soc-compress.c b/sound/soc/soc-compress.c index a98defdecad7..e7530712ab91 100644 --- a/sound/soc/soc-compress.c +++ b/sound/soc/soc-compress.c @@ -409,29 +409,6 @@ static int soc_compr_get_params(struct snd_compr_stream *cstream, return ret; }
-static int soc_compr_get_caps(struct snd_compr_stream *cstream, - struct snd_compr_caps *caps) -{ - struct snd_soc_pcm_runtime *rtd = cstream->private_data; - struct snd_soc_component *component; - int i, ret = 0; - - mutex_lock_nested(&rtd->card->pcm_mutex, rtd->card->pcm_subclass); - - for_each_rtd_components(rtd, i, component) { - if (!component->driver->compress_ops || - !component->driver->compress_ops->get_caps) - continue; - - ret = component->driver->compress_ops->get_caps( - component, cstream, caps); - break; - } - - mutex_unlock(&rtd->card->pcm_mutex); - return ret; -} - static int soc_compr_get_codec_caps(struct snd_compr_stream *cstream, struct snd_compr_codec_caps *codec) { @@ -596,7 +573,7 @@ static struct snd_compr_ops soc_compr_ops = { .trigger = soc_compr_trigger, .pointer = soc_compr_pointer, .ack = soc_compr_ack, - .get_caps = soc_compr_get_caps, + .get_caps = snd_soc_component_compr_get_caps, .get_codec_caps = soc_compr_get_codec_caps };
@@ -611,7 +588,7 @@ static struct snd_compr_ops soc_compr_dyn_ops = { .trigger = soc_compr_trigger_fe, .pointer = soc_compr_pointer, .ack = soc_compr_ack, - .get_caps = soc_compr_get_caps, + .get_caps = snd_soc_component_compr_get_caps, .get_codec_caps = soc_compr_get_codec_caps };
From: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
component related function should be implemented at soc-component.c. This patch adds snd_soc_component_compr_get_codec_caps().
Signed-off-by: Kuninori Morimoto kuninori.morimoto.gx@renesas.com --- include/sound/soc-component.h | 2 ++ sound/soc/soc-component.c | 24 ++++++++++++++++++++++++ sound/soc/soc-compress.c | 27 ++------------------------- 3 files changed, 28 insertions(+), 25 deletions(-)
diff --git a/include/sound/soc-component.h b/include/sound/soc-component.h index 7fd45462963e..d91e0eb1546d 100644 --- a/include/sound/soc-component.h +++ b/include/sound/soc-component.h @@ -455,6 +455,8 @@ int snd_soc_component_compr_get_params(struct snd_compr_stream *cstream, struct snd_codec *params); int snd_soc_component_compr_get_caps(struct snd_compr_stream *cstream, struct snd_compr_caps *caps); +int snd_soc_component_compr_get_codec_caps(struct snd_compr_stream *cstream, + struct snd_compr_codec_caps *codec);
int snd_soc_pcm_component_pointer(struct snd_pcm_substream *substream); int snd_soc_pcm_component_ioctl(struct snd_pcm_substream *substream, diff --git a/sound/soc/soc-component.c b/sound/soc/soc-component.c index b885e96cc8ae..8fba1a395f1e 100644 --- a/sound/soc/soc-component.c +++ b/sound/soc/soc-component.c @@ -547,6 +547,30 @@ int snd_soc_component_compr_get_caps(struct snd_compr_stream *cstream, } EXPORT_SYMBOL_GPL(snd_soc_component_compr_get_caps);
+int snd_soc_component_compr_get_codec_caps(struct snd_compr_stream *cstream, + struct snd_compr_codec_caps *codec) +{ + struct snd_soc_pcm_runtime *rtd = cstream->private_data; + struct snd_soc_component *component; + int i, ret = 0; + + mutex_lock_nested(&rtd->card->pcm_mutex, rtd->card->pcm_subclass); + + for_each_rtd_components(rtd, i, component) { + if (component->driver->compress_ops && + component->driver->compress_ops->get_codec_caps) { + ret = component->driver->compress_ops->get_codec_caps( + component, cstream, codec); + break; + } + } + + mutex_unlock(&rtd->card->pcm_mutex); + + return soc_component_ret(component, ret); +} +EXPORT_SYMBOL_GPL(snd_soc_component_compr_get_codec_caps); + static unsigned int soc_component_read_no_lock( struct snd_soc_component *component, unsigned int reg) diff --git a/sound/soc/soc-compress.c b/sound/soc/soc-compress.c index e7530712ab91..a82bd02d5519 100644 --- a/sound/soc/soc-compress.c +++ b/sound/soc/soc-compress.c @@ -409,29 +409,6 @@ static int soc_compr_get_params(struct snd_compr_stream *cstream, return ret; }
-static int soc_compr_get_codec_caps(struct snd_compr_stream *cstream, - struct snd_compr_codec_caps *codec) -{ - struct snd_soc_pcm_runtime *rtd = cstream->private_data; - struct snd_soc_component *component; - int i, ret = 0; - - mutex_lock_nested(&rtd->card->pcm_mutex, rtd->card->pcm_subclass); - - for_each_rtd_components(rtd, i, component) { - if (!component->driver->compress_ops || - !component->driver->compress_ops->get_codec_caps) - continue; - - ret = component->driver->compress_ops->get_codec_caps( - component, cstream, codec); - break; - } - - mutex_unlock(&rtd->card->pcm_mutex); - return ret; -} - static int soc_compr_ack(struct snd_compr_stream *cstream, size_t bytes) { struct snd_soc_pcm_runtime *rtd = cstream->private_data; @@ -574,7 +551,7 @@ static struct snd_compr_ops soc_compr_ops = { .pointer = soc_compr_pointer, .ack = soc_compr_ack, .get_caps = snd_soc_component_compr_get_caps, - .get_codec_caps = soc_compr_get_codec_caps + .get_codec_caps = snd_soc_component_compr_get_codec_caps, };
/* ASoC Dynamic Compress operations */ @@ -589,7 +566,7 @@ static struct snd_compr_ops soc_compr_dyn_ops = { .pointer = soc_compr_pointer, .ack = soc_compr_ack, .get_caps = snd_soc_component_compr_get_caps, - .get_codec_caps = soc_compr_get_codec_caps + .get_codec_caps = snd_soc_component_compr_get_codec_caps, };
/**
From: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
component related function should be implemented at soc-component.c. This patch adds snd_soc_component_compr_ack().
Signed-off-by: Kuninori Morimoto kuninori.morimoto.gx@renesas.com --- include/sound/soc-component.h | 1 + sound/soc/soc-component.c | 20 ++++++++++++++++++++ sound/soc/soc-compress.c | 15 ++------------- 3 files changed, 23 insertions(+), 13 deletions(-)
diff --git a/include/sound/soc-component.h b/include/sound/soc-component.h index d91e0eb1546d..ba0eb49f8885 100644 --- a/include/sound/soc-component.h +++ b/include/sound/soc-component.h @@ -457,6 +457,7 @@ int snd_soc_component_compr_get_caps(struct snd_compr_stream *cstream, struct snd_compr_caps *caps); int snd_soc_component_compr_get_codec_caps(struct snd_compr_stream *cstream, struct snd_compr_codec_caps *codec); +int snd_soc_component_compr_ack(struct snd_compr_stream *cstream, size_t bytes);
int snd_soc_pcm_component_pointer(struct snd_pcm_substream *substream); int snd_soc_pcm_component_ioctl(struct snd_pcm_substream *substream, diff --git a/sound/soc/soc-component.c b/sound/soc/soc-component.c index 8fba1a395f1e..832177e5094e 100644 --- a/sound/soc/soc-component.c +++ b/sound/soc/soc-component.c @@ -571,6 +571,26 @@ int snd_soc_component_compr_get_codec_caps(struct snd_compr_stream *cstream, } EXPORT_SYMBOL_GPL(snd_soc_component_compr_get_codec_caps);
+int snd_soc_component_compr_ack(struct snd_compr_stream *cstream, size_t bytes) +{ + struct snd_soc_pcm_runtime *rtd = cstream->private_data; + struct snd_soc_component *component; + int i, ret; + + for_each_rtd_components(rtd, i, component) { + if (component->driver->compress_ops && + component->driver->compress_ops->ack) { + ret = component->driver->compress_ops->ack( + component, cstream, bytes); + if (ret < 0) + return soc_component_ret(component, ret); + } + } + + return 0; +} +EXPORT_SYMBOL_GPL(snd_soc_component_compr_ack); + static unsigned int soc_component_read_no_lock( struct snd_soc_component *component, unsigned int reg) diff --git a/sound/soc/soc-compress.c b/sound/soc/soc-compress.c index a82bd02d5519..234e1506ed43 100644 --- a/sound/soc/soc-compress.c +++ b/sound/soc/soc-compress.c @@ -412,9 +412,8 @@ static int soc_compr_get_params(struct snd_compr_stream *cstream, static int soc_compr_ack(struct snd_compr_stream *cstream, size_t bytes) { struct snd_soc_pcm_runtime *rtd = cstream->private_data; - struct snd_soc_component *component; struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); - int i, ret = 0; + int ret;
mutex_lock_nested(&rtd->card->pcm_mutex, rtd->card->pcm_subclass);
@@ -422,17 +421,7 @@ static int soc_compr_ack(struct snd_compr_stream *cstream, size_t bytes) if (ret < 0) goto err;
- for_each_rtd_components(rtd, i, component) { - if (!component->driver->compress_ops || - !component->driver->compress_ops->ack) - continue; - - ret = component->driver->compress_ops->ack( - component, cstream, bytes); - if (ret < 0) - goto err; - } - + ret = snd_soc_component_compr_ack(cstream, bytes); err: mutex_unlock(&rtd->card->pcm_mutex); return ret;
From: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
component related function should be implemented at soc-component.c. This patch adds snd_soc_component_compr_pointer().
Signed-off-by: Kuninori Morimoto kuninori.morimoto.gx@renesas.com --- include/sound/soc-component.h | 2 ++ sound/soc/soc-component.c | 20 ++++++++++++++++++++ sound/soc/soc-compress.c | 13 ++----------- 3 files changed, 24 insertions(+), 11 deletions(-)
diff --git a/include/sound/soc-component.h b/include/sound/soc-component.h index ba0eb49f8885..d4e396cc75c2 100644 --- a/include/sound/soc-component.h +++ b/include/sound/soc-component.h @@ -458,6 +458,8 @@ int snd_soc_component_compr_get_caps(struct snd_compr_stream *cstream, int snd_soc_component_compr_get_codec_caps(struct snd_compr_stream *cstream, struct snd_compr_codec_caps *codec); int snd_soc_component_compr_ack(struct snd_compr_stream *cstream, size_t bytes); +int snd_soc_component_compr_pointer(struct snd_compr_stream *cstream, + struct snd_compr_tstamp *tstamp);
int snd_soc_pcm_component_pointer(struct snd_pcm_substream *substream); int snd_soc_pcm_component_ioctl(struct snd_pcm_substream *substream, diff --git a/sound/soc/soc-component.c b/sound/soc/soc-component.c index 832177e5094e..3ff2f227b99e 100644 --- a/sound/soc/soc-component.c +++ b/sound/soc/soc-component.c @@ -591,6 +591,26 @@ int snd_soc_component_compr_ack(struct snd_compr_stream *cstream, size_t bytes) } EXPORT_SYMBOL_GPL(snd_soc_component_compr_ack);
+int snd_soc_component_compr_pointer(struct snd_compr_stream *cstream, + struct snd_compr_tstamp *tstamp) +{ + struct snd_soc_pcm_runtime *rtd = cstream->private_data; + struct snd_soc_component *component; + int i, ret; + + for_each_rtd_components(rtd, i, component) { + if (component->driver->compress_ops && + component->driver->compress_ops->pointer) { + ret = component->driver->compress_ops->pointer( + component, cstream, tstamp); + return soc_component_ret(component, ret); + } + } + + return 0; +} +EXPORT_SYMBOL_GPL(snd_soc_component_compr_pointer); + static unsigned int soc_component_read_no_lock( struct snd_soc_component *component, unsigned int reg) diff --git a/sound/soc/soc-compress.c b/sound/soc/soc-compress.c index 234e1506ed43..eb5cb2f1823e 100644 --- a/sound/soc/soc-compress.c +++ b/sound/soc/soc-compress.c @@ -431,8 +431,7 @@ static int soc_compr_pointer(struct snd_compr_stream *cstream, struct snd_compr_tstamp *tstamp) { struct snd_soc_pcm_runtime *rtd = cstream->private_data; - struct snd_soc_component *component; - int i, ret = 0; + int ret; struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0);
mutex_lock_nested(&rtd->card->pcm_mutex, rtd->card->pcm_subclass); @@ -441,15 +440,7 @@ static int soc_compr_pointer(struct snd_compr_stream *cstream, if (ret < 0) goto out;
- for_each_rtd_components(rtd, i, component) { - if (!component->driver->compress_ops || - !component->driver->compress_ops->pointer) - continue; - - ret = component->driver->compress_ops->pointer( - component, cstream, tstamp); - break; - } + ret = snd_soc_component_compr_pointer(cstream, tstamp); out: mutex_unlock(&rtd->card->pcm_mutex); return ret;
From: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
component related function should be implemented at soc-component.c. This patch adds snd_soc_component_compr_copy().
Signed-off-by: Kuninori Morimoto kuninori.morimoto.gx@renesas.com --- include/sound/soc-component.h | 2 ++ sound/soc/soc-component.c | 24 ++++++++++++++++++++++++ sound/soc/soc-compress.c | 25 +------------------------ 3 files changed, 27 insertions(+), 24 deletions(-)
diff --git a/include/sound/soc-component.h b/include/sound/soc-component.h index d4e396cc75c2..535f22502e1e 100644 --- a/include/sound/soc-component.h +++ b/include/sound/soc-component.h @@ -460,6 +460,8 @@ int snd_soc_component_compr_get_codec_caps(struct snd_compr_stream *cstream, int snd_soc_component_compr_ack(struct snd_compr_stream *cstream, size_t bytes); int snd_soc_component_compr_pointer(struct snd_compr_stream *cstream, struct snd_compr_tstamp *tstamp); +int snd_soc_component_compr_copy(struct snd_compr_stream *cstream, + char __user *buf, size_t count);
int snd_soc_pcm_component_pointer(struct snd_pcm_substream *substream); int snd_soc_pcm_component_ioctl(struct snd_pcm_substream *substream, diff --git a/sound/soc/soc-component.c b/sound/soc/soc-component.c index 3ff2f227b99e..77fcb6fc42fb 100644 --- a/sound/soc/soc-component.c +++ b/sound/soc/soc-component.c @@ -611,6 +611,30 @@ int snd_soc_component_compr_pointer(struct snd_compr_stream *cstream, } EXPORT_SYMBOL_GPL(snd_soc_component_compr_pointer);
+int snd_soc_component_compr_copy(struct snd_compr_stream *cstream, + char __user *buf, size_t count) +{ + struct snd_soc_pcm_runtime *rtd = cstream->private_data; + struct snd_soc_component *component; + int i, ret = 0; + + mutex_lock_nested(&rtd->card->pcm_mutex, rtd->card->pcm_subclass); + + for_each_rtd_components(rtd, i, component) { + if (component->driver->compress_ops && + component->driver->compress_ops->copy) { + ret = component->driver->compress_ops->copy( + component, cstream, buf, count); + break; + } + } + + mutex_unlock(&rtd->card->pcm_mutex); + + return soc_component_ret(component, ret); +} +EXPORT_SYMBOL_GPL(snd_soc_component_compr_copy); + static unsigned int soc_component_read_no_lock( struct snd_soc_component *component, unsigned int reg) diff --git a/sound/soc/soc-compress.c b/sound/soc/soc-compress.c index eb5cb2f1823e..4a202478a8d6 100644 --- a/sound/soc/soc-compress.c +++ b/sound/soc/soc-compress.c @@ -446,29 +446,6 @@ static int soc_compr_pointer(struct snd_compr_stream *cstream, return ret; }
-static int soc_compr_copy(struct snd_compr_stream *cstream, - char __user *buf, size_t count) -{ - struct snd_soc_pcm_runtime *rtd = cstream->private_data; - struct snd_soc_component *component; - int i, ret = 0; - - mutex_lock_nested(&rtd->card->pcm_mutex, rtd->card->pcm_subclass); - - for_each_rtd_components(rtd, i, component) { - if (!component->driver->compress_ops || - !component->driver->compress_ops->copy) - continue; - - ret = component->driver->compress_ops->copy( - component, cstream, buf, count); - break; - } - - mutex_unlock(&rtd->card->pcm_mutex); - return ret; -} - static int soc_compr_set_metadata(struct snd_compr_stream *cstream, struct snd_compr_metadata *metadata) { @@ -649,7 +626,7 @@ int snd_soc_new_compress(struct snd_soc_pcm_runtime *rtd, int num) !component->driver->compress_ops->copy) continue;
- compr->ops->copy = soc_compr_copy; + compr->ops->copy = snd_soc_component_compr_copy; break; }
From: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
component related function should be implemented at soc-component.c. This patch adds snd_soc_component_compr_set_metadata().
Signed-off-by: Kuninori Morimoto kuninori.morimoto.gx@renesas.com --- include/sound/soc-component.h | 2 ++ sound/soc/soc-component.c | 21 +++++++++++++++++++++ sound/soc/soc-compress.c | 16 ++-------------- 3 files changed, 25 insertions(+), 14 deletions(-)
diff --git a/include/sound/soc-component.h b/include/sound/soc-component.h index 535f22502e1e..d23ebd5ce617 100644 --- a/include/sound/soc-component.h +++ b/include/sound/soc-component.h @@ -462,6 +462,8 @@ int snd_soc_component_compr_pointer(struct snd_compr_stream *cstream, struct snd_compr_tstamp *tstamp); int snd_soc_component_compr_copy(struct snd_compr_stream *cstream, char __user *buf, size_t count); +int snd_soc_component_compr_set_metadata(struct snd_compr_stream *cstream, + struct snd_compr_metadata *metadata);
int snd_soc_pcm_component_pointer(struct snd_pcm_substream *substream); int snd_soc_pcm_component_ioctl(struct snd_pcm_substream *substream, diff --git a/sound/soc/soc-component.c b/sound/soc/soc-component.c index 77fcb6fc42fb..ef2b97631748 100644 --- a/sound/soc/soc-component.c +++ b/sound/soc/soc-component.c @@ -635,6 +635,27 @@ int snd_soc_component_compr_copy(struct snd_compr_stream *cstream, } EXPORT_SYMBOL_GPL(snd_soc_component_compr_copy);
+int snd_soc_component_compr_set_metadata(struct snd_compr_stream *cstream, + struct snd_compr_metadata *metadata) +{ + struct snd_soc_pcm_runtime *rtd = cstream->private_data; + struct snd_soc_component *component; + int i, ret; + + for_each_rtd_components(rtd, i, component) { + if (component->driver->compress_ops && + component->driver->compress_ops->set_metadata) { + ret = component->driver->compress_ops->set_metadata( + component, cstream, metadata); + if (ret < 0) + return soc_component_ret(component, ret); + } + } + + return 0; +} +EXPORT_SYMBOL_GPL(snd_soc_component_compr_set_metadata); + static unsigned int soc_component_read_no_lock( struct snd_soc_component *component, unsigned int reg) diff --git a/sound/soc/soc-compress.c b/sound/soc/soc-compress.c index 4a202478a8d6..3d29b41cf96f 100644 --- a/sound/soc/soc-compress.c +++ b/sound/soc/soc-compress.c @@ -450,26 +450,14 @@ static int soc_compr_set_metadata(struct snd_compr_stream *cstream, struct snd_compr_metadata *metadata) { struct snd_soc_pcm_runtime *rtd = cstream->private_data; - struct snd_soc_component *component; struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); - int i, ret; + int ret;
ret = snd_soc_dai_compr_set_metadata(cpu_dai, cstream, metadata); if (ret < 0) return ret;
- for_each_rtd_components(rtd, i, component) { - if (!component->driver->compress_ops || - !component->driver->compress_ops->set_metadata) - continue; - - ret = component->driver->compress_ops->set_metadata( - component, cstream, metadata); - if (ret < 0) - return ret; - } - - return 0; + return snd_soc_component_compr_set_metadata(cstream, metadata); }
static int soc_compr_get_metadata(struct snd_compr_stream *cstream,
From: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
component related function should be implemented at soc-component.c. This patch adds snd_soc_component_compr_get_metadata().
Signed-off-by: Kuninori Morimoto kuninori.morimoto.gx@renesas.com --- include/sound/soc-component.h | 2 ++ sound/soc/soc-component.c | 20 ++++++++++++++++++++ sound/soc/soc-compress.c | 14 ++------------ 3 files changed, 24 insertions(+), 12 deletions(-)
diff --git a/include/sound/soc-component.h b/include/sound/soc-component.h index d23ebd5ce617..984dd7353066 100644 --- a/include/sound/soc-component.h +++ b/include/sound/soc-component.h @@ -464,6 +464,8 @@ int snd_soc_component_compr_copy(struct snd_compr_stream *cstream, char __user *buf, size_t count); int snd_soc_component_compr_set_metadata(struct snd_compr_stream *cstream, struct snd_compr_metadata *metadata); +int snd_soc_component_compr_get_metadata(struct snd_compr_stream *cstream, + struct snd_compr_metadata *metadata);
int snd_soc_pcm_component_pointer(struct snd_pcm_substream *substream); int snd_soc_pcm_component_ioctl(struct snd_pcm_substream *substream, diff --git a/sound/soc/soc-component.c b/sound/soc/soc-component.c index ef2b97631748..5d3a8dcd8d49 100644 --- a/sound/soc/soc-component.c +++ b/sound/soc/soc-component.c @@ -656,6 +656,26 @@ int snd_soc_component_compr_set_metadata(struct snd_compr_stream *cstream, } EXPORT_SYMBOL_GPL(snd_soc_component_compr_set_metadata);
+int snd_soc_component_compr_get_metadata(struct snd_compr_stream *cstream, + struct snd_compr_metadata *metadata) +{ + struct snd_soc_pcm_runtime *rtd = cstream->private_data; + struct snd_soc_component *component; + int i, ret; + + for_each_rtd_components(rtd, i, component) { + if (component->driver->compress_ops && + component->driver->compress_ops->get_metadata) { + ret = component->driver->compress_ops->get_metadata( + component, cstream, metadata); + return soc_component_ret(component, ret); + } + } + + return 0; +} +EXPORT_SYMBOL_GPL(snd_soc_component_compr_get_metadata); + static unsigned int soc_component_read_no_lock( struct snd_soc_component *component, unsigned int reg) diff --git a/sound/soc/soc-compress.c b/sound/soc/soc-compress.c index 3d29b41cf96f..5a751d5d3847 100644 --- a/sound/soc/soc-compress.c +++ b/sound/soc/soc-compress.c @@ -464,24 +464,14 @@ static int soc_compr_get_metadata(struct snd_compr_stream *cstream, struct snd_compr_metadata *metadata) { struct snd_soc_pcm_runtime *rtd = cstream->private_data; - struct snd_soc_component *component; struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); - int i, ret; + int ret;
ret = snd_soc_dai_compr_get_metadata(cpu_dai, cstream, metadata); if (ret < 0) return ret;
- for_each_rtd_components(rtd, i, component) { - if (!component->driver->compress_ops || - !component->driver->compress_ops->get_metadata) - continue; - - return component->driver->compress_ops->get_metadata( - component, cstream, metadata); - } - - return 0; + return snd_soc_component_compr_get_metadata(cstream, metadata); }
/* ASoC Compress operations */
On Fri, 2020-11-13 at 13:14 +0900, Kuninori Morimoto wrote:
Hi Mark
These are v2 of snd_soc_component_compr_xxx() function patches. I think component related function should be implemented at soc-component.c, otherwise it is confusable to read. These are for it.
v1 -> v2
fixup function return timing on snd_soc_component_compr_get_params() snd_soc_component_compr_get_metadata()
use mutex at compr side on snd_soc_component_compr_get_caps() snd_soc_component_compr_get_codec_caps() snd_soc_component_compr_copy()
Link: https://lore.kernel.org/r/878sb78ac4.wl-kuninori.morimoto.gx@renesas.com
Kuninori Morimoto (12): ASoC: soc-component: add snd_soc_component_compr_open() ASoC: soc-component: add snd_soc_component_compr_free() ASoC: soc-component: add snd_soc_component_compr_trigger() ASoC: soc-component: add snd_soc_component_compr_set_params() ASoC: soc-component: add snd_soc_component_compr_get_params() ASoC: soc-component: add snd_soc_component_compr_get_caps() ASoC: soc-component: add snd_soc_component_compr_get_codec_caps() ASoC: soc-component: add snd_soc_component_compr_ack() ASoC: soc-component: add snd_soc_component_compr_pointer() ASoC: soc-component: add snd_soc_component_compr_copy() ASoC: soc-component: add snd_soc_component_compr_set_metadata() ASoC: soc-component: add snd_soc_component_compr_get_metadata()
LGTM. Thanks, Morimoto-san.
Reviewed-by: Ranjani Sridharan ranjani.sridharan@linux.intel.com
On 13 Nov 2020 13:14:38 +0900, Kuninori Morimoto wrote:
These are v2 of snd_soc_component_compr_xxx() function patches. I think component related function should be implemented at soc-component.c, otherwise it is confusable to read. These are for it.
v1 -> v2
- fixup function return timing on snd_soc_component_compr_get_params() snd_soc_component_compr_get_metadata()
[...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[01/12] ASoC: soc-component: add snd_soc_component_compr_open() commit: a4e427c59a266dc3eb0eb5d52879b067a6f6e73b [02/12] ASoC: soc-component: add snd_soc_component_compr_free() commit: dbde5e21140cd2ad9d9e8eeeb104755f5294ce9f [03/12] ASoC: soc-component: add snd_soc_component_compr_trigger() commit: 08aee25114426ba988ccb27af057dcf7faaa61ac [04/12] ASoC: soc-component: add snd_soc_component_compr_set_params() commit: ff08cf80addacbf42d419c2ef5561562f765bda3 [05/12] ASoC: soc-component: add snd_soc_component_compr_get_params() commit: 77c221ecfed8762f65d17f3a6ee7b4f2cec61ae4 [06/12] ASoC: soc-component: add snd_soc_component_compr_get_caps() commit: d67fcb2d8f15df6f98698f411d9cb8c221ab6c91 [07/12] ASoC: soc-component: add snd_soc_component_compr_get_codec_caps() commit: 0f6fe09720a3f307ab9f218f052d40b7d4e42b4c [08/12] ASoC: soc-component: add snd_soc_component_compr_ack() commit: 0506b88503645e71c18152693caee9cfa1dbf093 [09/12] ASoC: soc-component: add snd_soc_component_compr_pointer() commit: 03ecea64e0ae26d7a8b53bce05a39b78022e1312 [10/12] ASoC: soc-component: add snd_soc_component_compr_copy() commit: b5852e66b115172dc3a88cb476b99c21ac6ffed8 [11/12] ASoC: soc-component: add snd_soc_component_compr_set_metadata() commit: 1b308fb138eba8dd57198b25235d8369a42af293 [12/12] ASoC: soc-component: add snd_soc_component_compr_get_metadata() commit: bab78c238025c89df771631c54f6229f6c56fb26
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks, Mark
participants (3)
-
Kuninori Morimoto
-
Mark Brown
-
Ranjani Sridharan