Home
last modified time | relevance | path

Searched hist:"403 f830e" (Results 1 – 3 of 3) sorted by relevance

/openbmc/linux/include/sound/
H A Dsoc-component.h403f830e Tue Nov 16 01:45:18 CST 2021 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> ASoC: soc-component: add snd_soc_pcm_component_delay()

Current soc-pcm.c :: soc_pcm_pointer() is assuming that
component driver might update runtime->delay silently in
snd_soc_pcm_component_pointer() (= A).

static snd_pcm_uframes_t soc_pcm_pointer(...)
{
...

/* clearing the previous total delay */
=> runtime->delay = 0;

(A) offset = snd_soc_pcm_component_pointer(substream);

/* base delay if assigned in pointer callback */
=> delay = runtime->delay;
...
}

1) The behavior that ".pointer callback secretly updates
runtime->delay" is strange and confusable.

2) Current snd_soc_pcm_component_pointer() uses 1st found component's
.pointer callback only, thus it is no problem for now.
But runtime->delay might be overwrote if it adjusted to multiple
components in the future.

3) Component delay is updated at .pointer callback timing (secretly).
But some components which doesn't have .pointer callback might want
to increase runtime->delay for some reasons.

We already have .delay function for DAI, but not have for Component.
This patch adds new snd_soc_pcm_component_delay() for it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/874k8cy25t.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
/openbmc/linux/sound/soc/
H A Dsoc-component.c403f830e Tue Nov 16 01:45:18 CST 2021 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> ASoC: soc-component: add snd_soc_pcm_component_delay()

Current soc-pcm.c :: soc_pcm_pointer() is assuming that
component driver might update runtime->delay silently in
snd_soc_pcm_component_pointer() (= A).

static snd_pcm_uframes_t soc_pcm_pointer(...)
{
...

/* clearing the previous total delay */
=> runtime->delay = 0;

(A) offset = snd_soc_pcm_component_pointer(substream);

/* base delay if assigned in pointer callback */
=> delay = runtime->delay;
...
}

1) The behavior that ".pointer callback secretly updates
runtime->delay" is strange and confusable.

2) Current snd_soc_pcm_component_pointer() uses 1st found component's
.pointer callback only, thus it is no problem for now.
But runtime->delay might be overwrote if it adjusted to multiple
components in the future.

3) Component delay is updated at .pointer callback timing (secretly).
But some components which doesn't have .pointer callback might want
to increase runtime->delay for some reasons.

We already have .delay function for DAI, but not have for Component.
This patch adds new snd_soc_pcm_component_delay() for it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/874k8cy25t.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
H A Dsoc-pcm.c403f830e Tue Nov 16 01:45:18 CST 2021 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> ASoC: soc-component: add snd_soc_pcm_component_delay()

Current soc-pcm.c :: soc_pcm_pointer() is assuming that
component driver might update runtime->delay silently in
snd_soc_pcm_component_pointer() (= A).

static snd_pcm_uframes_t soc_pcm_pointer(...)
{
...

/* clearing the previous total delay */
=> runtime->delay = 0;

(A) offset = snd_soc_pcm_component_pointer(substream);

/* base delay if assigned in pointer callback */
=> delay = runtime->delay;
...
}

1) The behavior that ".pointer callback secretly updates
runtime->delay" is strange and confusable.

2) Current snd_soc_pcm_component_pointer() uses 1st found component's
.pointer callback only, thus it is no problem for now.
But runtime->delay might be overwrote if it adjusted to multiple
components in the future.

3) Component delay is updated at .pointer callback timing (secretly).
But some components which doesn't have .pointer callback might want
to increase runtime->delay for some reasons.

We already have .delay function for DAI, but not have for Component.
This patch adds new snd_soc_pcm_component_delay() for it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/874k8cy25t.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>