]> Git Repo - J-linux.git/commitdiff
Merge series "regmap/SoundWire/ASoC: Add SoundWire SDCA support" from Bard Liao ...
authorMark Brown <[email protected]>
Thu, 26 Nov 2020 20:03:02 +0000 (20:03 +0000)
committerMark Brown <[email protected]>
Thu, 26 Nov 2020 20:03:02 +0000 (20:03 +0000)
The MIPI SoundWire Device Class standard will define audio functionality
beyond the scope of the existing SoundWire 1.2 standard, which is limited
to the bus and interface.

The description is inspired by the USB Audio Class, with "functions",
"entities", "control selectors", "audio clusters". The main difference
with the USB Audio class is that the devices are typically on a motherboard
and descriptors stored in platform firmware instead of being retrieved
from the device.

The current set of devices managed in this patchset are conformant with the
SDCA 0.6 specification and require dedicated drivers since the descriptors
and platform firmware specification is not complete at this time. They do
however rely on the hierarchical addressing required by the SDCA standard.
Future devices conformant with SDCA 1.0 should rely on a class driver.

This series adds support for the hierarchical SDCA addressing and extends
regmap. It then provides 3 codecs for RT711-sdca headset codec, RT1316
amplifier and RT715-scda microphone codec.

Note that the release of this code before the formal adoption of the
SDCA 1.0 specification was formally endorsed by the MIPI Board to make
sure there is no delay for Linux-based support of this specification.

Jack Yu (1):
  ASoC/SoundWire: rt715-sdca: First version of rt715 sdw sdca codec
    driver

Pierre-Louis Bossart (2):
  soundwire: SDCA: add helper macro to access controls
  regmap/SoundWire: sdw: add support for SoundWire 1.2 MBQ

Shuming Fan (2):
  ASoC/SoundWire: rt1316: Add RT1316 SDCA vendor-specific driver
  ASoC/SoundWire: rt711-sdca: Add RT711 SDCA vendor-specific driver

 drivers/base/regmap/Kconfig             |    6 +-
 drivers/base/regmap/Makefile            |    1 +
 drivers/base/regmap/regmap-sdw-mbq.c    |  101 ++
 include/linux/regmap.h                  |   35 +
 include/linux/soundwire/sdw_registers.h |   32 +
 sound/soc/codecs/Kconfig                |   20 +
 sound/soc/codecs/Makefile               |    6 +
 sound/soc/codecs/rt1316-sdw.c           |  756 ++++++++++++
 sound/soc/codecs/rt1316-sdw.h           |  115 ++
 sound/soc/codecs/rt711-sdca-sdw.c       |  424 +++++++
 sound/soc/codecs/rt711-sdca-sdw.h       |  101 ++
 sound/soc/codecs/rt711-sdca.c           | 1481 +++++++++++++++++++++++
 sound/soc/codecs/rt711-sdca.h           |  246 ++++
 sound/soc/codecs/rt715-sdca-sdw.c       |  278 +++++
 sound/soc/codecs/rt715-sdca-sdw.h       |  170 +++
 sound/soc/codecs/rt715-sdca.c           |  936 ++++++++++++++
 sound/soc/codecs/rt715-sdca.h           |  124 ++
 17 files changed, 4831 insertions(+), 1 deletion(-)
 create mode 100644 drivers/base/regmap/regmap-sdw-mbq.c
 create mode 100644 sound/soc/codecs/rt1316-sdw.c
 create mode 100644 sound/soc/codecs/rt1316-sdw.h
 create mode 100644 sound/soc/codecs/rt711-sdca-sdw.c
 create mode 100644 sound/soc/codecs/rt711-sdca-sdw.h
 create mode 100644 sound/soc/codecs/rt711-sdca.c
 create mode 100644 sound/soc/codecs/rt711-sdca.h
 create mode 100644 sound/soc/codecs/rt715-sdca-sdw.c
 create mode 100644 sound/soc/codecs/rt715-sdca-sdw.h
 create mode 100644 sound/soc/codecs/rt715-sdca.c
 create mode 100644 sound/soc/codecs/rt715-sdca.h

base-commit: 3650b228f83adda7e5ee532e2b90429c03f7b9ec

--
2.17.1

1  2 
include/linux/regmap.h

diff --combined include/linux/regmap.h
index 126fe700d1d84686e3969b366cb5a8cbcd267ffa,a652d1474d6aa25c517ccba8829a54f90e6aab0c..2cc4ecd36298f376a7286c1cdc70318977baec82
@@@ -315,10 -315,6 +315,10 @@@ typedef void (*regmap_unlock)(void *)
   *                   masks are used.
   * @zero_flag_mask: If set, read_flag_mask and write_flag_mask are used even
   *                   if they are both empty.
 + * @use_relaxed_mmio: If set, MMIO R/W operations will not use memory barriers.
 + *                    This can avoid load on devices which don't require strict
 + *                    orderings, but drivers should carefully add any explicit
 + *                    memory barriers when they may require them.
   * @use_single_read: If set, converts the bulk read operation into a series of
   *                   single read operations. This is useful for a device that
   *                   does not support  bulk read.
@@@ -392,7 -388,6 +392,7 @@@ struct regmap_config 
  
        bool use_single_read;
        bool use_single_write;
 +      bool use_relaxed_mmio;
        bool can_multi_write;
  
        enum regmap_endian reg_format_endian;
@@@ -575,6 -570,10 +575,10 @@@ struct regmap *__regmap_init_sdw(struc
                                 const struct regmap_config *config,
                                 struct lock_class_key *lock_key,
                                 const char *lock_name);
+ struct regmap *__regmap_init_sdw_mbq(struct sdw_slave *sdw,
+                                    const struct regmap_config *config,
+                                    struct lock_class_key *lock_key,
+                                    const char *lock_name);
  struct regmap *__regmap_init_spi_avmm(struct spi_device *spi,
                                      const struct regmap_config *config,
                                      struct lock_class_key *lock_key,
@@@ -624,6 -623,10 +628,10 @@@ struct regmap *__devm_regmap_init_sdw(s
                                 const struct regmap_config *config,
                                 struct lock_class_key *lock_key,
                                 const char *lock_name);
+ struct regmap *__devm_regmap_init_sdw_mbq(struct sdw_slave *sdw,
+                                         const struct regmap_config *config,
+                                         struct lock_class_key *lock_key,
+                                         const char *lock_name);
  struct regmap *__devm_regmap_init_slimbus(struct slim_device *slimbus,
                                 const struct regmap_config *config,
                                 struct lock_class_key *lock_key,
@@@ -822,6 -825,19 +830,19 @@@ bool regmap_ac97_default_volatile(struc
        __regmap_lockdep_wrapper(__regmap_init_sdw, #config,            \
                                sdw, config)
  
+ /**
+  * regmap_init_sdw_mbq() - Initialise register map
+  *
+  * @sdw: Device that will be interacted with
+  * @config: Configuration for register map
+  *
+  * The return value will be an ERR_PTR() on error or a valid pointer to
+  * a struct regmap.
+  */
+ #define regmap_init_sdw_mbq(sdw, config)                                      \
+       __regmap_lockdep_wrapper(__regmap_init_sdw_mbq, #config,                \
+                               sdw, config)
  /**
   * regmap_init_spi_avmm() - Initialize register map for Intel SPI Slave
   * to AVMM Bus Bridge
        __regmap_lockdep_wrapper(__devm_regmap_init_sdw, #config,       \
                                sdw, config)
  
+ /**
+  * devm_regmap_init_sdw_mbq() - Initialise managed register map
+  *
+  * @sdw: Device that will be interacted with
+  * @config: Configuration for register map
+  *
+  * The return value will be an ERR_PTR() on error or a valid pointer
+  * to a struct regmap. The regmap will be automatically freed by the
+  * device management code.
+  */
+ #define devm_regmap_init_sdw_mbq(sdw, config)                 \
+       __regmap_lockdep_wrapper(__devm_regmap_init_sdw_mbq, #config,   \
+                               sdw, config)
  /**
   * devm_regmap_init_slimbus() - Initialise managed register map
   *
This page took 0.067533 seconds and 4 git commands to generate.