lkml.org 
[lkml]   [2021]   [Jan]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5.10 114/152] ASoC: meson: axg-tdm-interface: fix loopback
    Date
    From: Jerome Brunet <jbrunet@baylibre.com>

    commit 671ee4db952449acde126965bf76817a3159040d upstream.

    When the axg-tdm-interface was introduced, the backend DAI was marked as an
    endpoint when DPCM was walking the DAPM graph to find a its BE.

    It is no longer the case since this
    commit 8dd26dff00c0 ("ASoC: dapm: Fix handling of custom_stop_condition on DAPM graph walks")
    Because of this, when DPCM finds a BE it does everything it needs on the
    DAIs but it won't power up the widgets between the FE and the BE if there
    is no actual endpoint after the BE.

    On meson-axg HWs, the loopback is a special DAI of the tdm-interface BE.
    It is only linked to the dummy codec since there no actual HW after it.
    >From the DAPM perspective, the DAI has no endpoint. Because of this, the TDM
    decoder, which is a widget between the FE and BE is not powered up.

    >From the user perspective, everything seems fine but no data is produced.

    Connecting the Loopback DAI to a dummy DAPM endpoint solves the problem.

    Fixes: 8dd26dff00c0 ("ASoC: dapm: Fix handling of custom_stop_condition on DAPM graph walks")
    Cc: Charles Keepax <ckeepax@opensource.cirrus.com>
    Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
    Link: https://lore.kernel.org/r/20201217150812.3247405-1-jbrunet@baylibre.com
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

    ---
    sound/soc/meson/axg-tdm-interface.c | 14 +++++++++++++-
    1 file changed, 13 insertions(+), 1 deletion(-)

    --- a/sound/soc/meson/axg-tdm-interface.c
    +++ b/sound/soc/meson/axg-tdm-interface.c
    @@ -467,8 +467,20 @@ static int axg_tdm_iface_set_bias_level(
    return ret;
    }

    +static const struct snd_soc_dapm_widget axg_tdm_iface_dapm_widgets[] = {
    + SND_SOC_DAPM_SIGGEN("Playback Signal"),
    +};
    +
    +static const struct snd_soc_dapm_route axg_tdm_iface_dapm_routes[] = {
    + { "Loopback", NULL, "Playback Signal" },
    +};
    +
    static const struct snd_soc_component_driver axg_tdm_iface_component_drv = {
    - .set_bias_level = axg_tdm_iface_set_bias_level,
    + .dapm_widgets = axg_tdm_iface_dapm_widgets,
    + .num_dapm_widgets = ARRAY_SIZE(axg_tdm_iface_dapm_widgets),
    + .dapm_routes = axg_tdm_iface_dapm_routes,
    + .num_dapm_routes = ARRAY_SIZE(axg_tdm_iface_dapm_routes),
    + .set_bias_level = axg_tdm_iface_set_bias_level,
    };

    static const struct of_device_id axg_tdm_iface_of_match[] = {

    \
     
     \ /
      Last update: 2021-01-18 15:14    [W:4.315 / U:0.044 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site