Skip to content

ASoC: loongson: Refactor DMA and regmap handling

Binbin Zhou linux-sound loongarch 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest4 patches 1 replyIn review
  2. v25 patches 4 repliesSuperseded
  3. v14 patches 1 replySuperseded

Changes in v3 from the cover letter

- Drop es8323 patch.
Patch (2/4):
- Add I2S_CTRL as volatile register.

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4MAINTAINERS: Add entry for Loongson ASoC driverMAINTAINERS+9 -00 replies
2/4ASoC: loongson: Combined regmap definitionssound/soc/loongson/loongson_i2s.c sound/soc/loongson/loongson_i2s.h sound/soc/loongson/loongson_i2s_pci.c +1 more+56 -630 replies
3/4ASoC: loongson: Use the `idma` identifier for internal DMA variablessound/soc/loongson/loongson_dma.c sound/soc/loongson/loongson_dma.h sound/soc/loongson/loongson_i2s.h +1 more+52 -520 replies
4/4ASoC: loongson: Separate external shared DMA from the platform interfacesound/soc/loongson/Makefile sound/soc/loongson/loongson_dma.c sound/soc/loongson/loongson_dma.h +1 more+65 -590 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [PATCH v3 0/4] ASoC: loongson: Refactor DMA and regmap handling

Hi all:

This series refactors the Loongson I2S ASoC drivers, reducing code duplication and improving DMA differentiation. It also adds an entry in MAINTAINERS and applies a few fixes to the es8323 codec driver.

Patch 1 adds a MAINTAINERS entry to track the Loongson audio drivers.

Patch 2 consolidates duplicate regmap configurations from the PCI and platform glue drivers into the shared loongson_i2s.c. It also fixes volatile register marking and switches from REGCACHE_FLAT to REGCACHE_MAPLE.

Patch 3 renames internal DMA structures and functions with an "idma" prefix to clearly distinguish them from external DMA (eDMA) support.

Patch 4 extracts the external DMA logic from the platform driver into loongson_dma.c, making it reusable and avoiding duplication with the internal DMA implementation.

These changes have been tested on Loongson-2K0300 (platform, eDMA) and Loongson-2K2000 (PCI, iDMA) boards.

Thanks.
Binbin

========
V3:
- Drop es8323 patch.
Patch (2/4):
- Add I2S_CTRL as volatile register.

Link to V2:
https://lore.kernel.org/all/[email protected]/

V2:
Patch (2/5):
- Fix volatile register handling, and switch from REGCACHE_FLAT to

    REGCACHE_MAPLE;

Patch (5/5):
- New patch for ES8323 coedc.

Link to V1:
https://lore.kernel.org/all/[email protected]/

Change from [1]:
Patch (2/4):
- Reordered the write function to follow the read function;
Patch (3/4)/(4/4):
- Use idma (internal dma) and edma (external dma) for short.

[1]:
https://lore.kernel.org/all/[email protected]/

Binbin Zhou (4):
MAINTAINERS: Add entry for Loongson ASoC driver
ASoC: loongson: Combined regmap definitions
ASoC: loongson: Use the idma identifier for internal DMA variables
ASoC: loongson: Separate external shared DMA from the platform
interface

 MAINTAINERS                            |   9 ++
 sound/soc/loongson/Makefile            |   4 +-
 sound/soc/loongson/loongson_dma.c      | 148 +++++++++++++++++--------
 sound/soc/loongson/loongson_dma.h      |   6 +-
 sound/soc/loongson/loongson_i2s.c      |  56 +++++++++-
 sound/soc/loongson/loongson_i2s.h      |   7 +-
 sound/soc/loongson/loongson_i2s_pci.c  |  59 +---------
 sound/soc/loongson/loongson_i2s_plat.c |  67 +----------
 8 files changed, 182 insertions(+), 174 deletions(-)

base-commit: 9617ce6798f8eee61d8068f0ea03a08ce051932e

Signature · 1 line
2.52.0