alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] ASoC: meson: tdm fixes
@ 2020-07-29 15:44 Jerome Brunet
  2020-07-29 15:44 ` [PATCH 1/4] ASoC: meson: axg-tdm-interface: fix link fmt setup Jerome Brunet
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Jerome Brunet @ 2020-07-29 15:44 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood
  Cc: linux-amlogic, alsa-devel, Kevin Hilman, linux-kernel, Jerome Brunet

This patcheset is collection of fixes for the TDM input and output the
axg audio architecture. Its fixes:
 - slave mode format setting
 - g12 and sm1 skew offset
 - tdm clock inversion
 - standard daifmt props names which don't require a specific prefix

Jerome Brunet (4):
  ASoC: meson: axg-tdm-interface: fix link fmt setup
  ASoC: meson: axg-tdmin: fix g12a skew
  ASoC: meson: axg-tdm-formatters: fix sclk inversion
  ASoC: meson: cards: remove DT_PREFIX for standard daifmt properties

 sound/soc/meson/axg-tdm-formatter.c | 11 ++++++-----
 sound/soc/meson/axg-tdm-formatter.h |  1 -
 sound/soc/meson/axg-tdm-interface.c | 26 +++++++++++++++++---------
 sound/soc/meson/axg-tdmin.c         | 16 +++++++++++++++-
 sound/soc/meson/axg-tdmout.c        |  3 ---
 sound/soc/meson/meson-card-utils.c  |  2 +-
 6 files changed, 39 insertions(+), 20 deletions(-)

-- 
2.25.4


^ permalink raw reply	[flat|nested] 8+ messages in thread
* [PATCH 0/4] ASoC: meson: tdm fixes
@ 2024-04-26 15:29 Jerome Brunet
  2024-05-01 13:43 ` Mark Brown
  0 siblings, 1 reply; 8+ messages in thread
From: Jerome Brunet @ 2024-04-26 15:29 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood
  Cc: Jerome Brunet, alsa-devel, linux-kernel, linux-amlogic

This patchset fixes 2 problems on TDM which both find a solution
by properly implementing the .trigger() callback for the TDM backend.

ATM, enabling the TDM formatters is done by the .prepare() callback
because handling the formatter is slow due to necessary calls to CCF.

The first problem affects the TDMIN. Because .prepare() is called on DPCM
backend first, the formatter are started before the FIFOs and this may
cause a random channel shifts if the TDMIN use multiple lanes with more
than 2 slots per lanes. Using trigger() allows to set the FE/BE order,
solving the problem.

There has already been an attempt to fix this 3y ago [1] and reverted [2]
It triggered a 'sleep in irq' error on the period IRQ. The solution is
to just use the bottom half of threaded IRQ. This is patch #1. Patch #2
and #3 remain mostly the same as 3y ago.

For TDMOUT, the problem is on pause. ATM pause only stops the FIFO and
the TDMOUT just starves. When it does, it will actually repeat the last
sample continuously. Depending on the platform, if there is no high-pass
filter on the analog path, this may translate to a constant position of
the speaker membrane. There is no audible glitch but it may damage the
speaker coil.

Properly stopping the TDMOUT in pause solves the problem. There is
behaviour change associated with that fix. Clocks used to be continuous
on pause because of the problem above. They will now be gated on pause by
default, as they should. The last change introduce the proper support for
continuous clocks, if needed.

[1]: https://lore.kernel.org/linux-amlogic/20211020114217.133153-1-jbrunet@baylibre.com
[2]: https://lore.kernel.org/linux-amlogic/20220421155725.2589089-1-narmstrong@baylibre.com

Jerome Brunet (4):
  ASoC: meson: axg-fifo: use threaded irq to check periods
  ASoC: meson: axg-card: make links nonatomic
  ASoC: meson: axg-tdm-interface: manage formatters in trigger
  ASoC: meson: axg-tdm: add continuous clock support

 sound/soc/meson/axg-card.c          |  1 +
 sound/soc/meson/axg-fifo.c          | 29 +++++++++++++--------
 sound/soc/meson/axg-tdm-formatter.c | 40 +++++++++++++++++++++++++++++
 sound/soc/meson/axg-tdm-interface.c | 38 +++++++++++++++++++--------
 sound/soc/meson/axg-tdm.h           |  5 ++++
 5 files changed, 93 insertions(+), 20 deletions(-)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-05-01 13:45 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-29 15:44 [PATCH 0/4] ASoC: meson: tdm fixes Jerome Brunet
2020-07-29 15:44 ` [PATCH 1/4] ASoC: meson: axg-tdm-interface: fix link fmt setup Jerome Brunet
2020-07-29 15:44 ` [PATCH 2/4] ASoC: meson: axg-tdmin: fix g12a skew Jerome Brunet
2020-07-29 15:44 ` [PATCH 3/4] ASoC: meson: axg-tdm-formatters: fix sclk inversion Jerome Brunet
2020-07-29 15:44 ` [PATCH 4/4] ASoC: meson: cards: remove DT_PREFIX for standard daifmt properties Jerome Brunet
2020-07-30 22:28 ` [PATCH 0/4] ASoC: meson: tdm fixes Mark Brown
2024-04-26 15:29 Jerome Brunet
2024-05-01 13:43 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).