1. 29 Oct, 2021 14 commits
  2. 28 Oct, 2021 2 commits
    • Nathan Chancellor's avatar
      ASoC: qdsp6: audioreach: Fix clang -Wimplicit-fallthrough · c6c203bc
      Nathan Chancellor authored
      Clang warns:
      
      sound/soc/qcom/qdsp6/topology.c:465:3: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
                      default:
                      ^
      sound/soc/qcom/qdsp6/topology.c:465:3: note: insert 'break;' to avoid fall-through
                      default:
                      ^
                      break;
      1 warning generated.
      
      Clang is a little more pedantic than GCC, which permits implicit
      fallthroughs to cases that contain just break or return. Clang's version
      is more in line with the kernel's own stance in deprecated.rst, which
      states that all switch/case blocks must end in either break,
      fallthrough, continue, goto, or return. Add the missing break to fix
      the warning.
      
      Link: https://github.com/ClangBuiltLinux/linux/issues/1495Signed-off-by: default avatarNathan Chancellor <nathan@kernel.org>
      Link: https://lore.kernel.org/r/20211027190823.4057382-1-nathan@kernel.orgSigned-off-by: default avatarMark Brown <broonie@kernel.org>
      c6c203bc
    • Julian Braha's avatar
      ASoC: fix unmet dependencies on GPIOLIB for SND_SOC_DMIC · 5c7dee44
      Julian Braha authored
      When SND_SOC_AMD_RENOIR_MACH or SND_SOC_AMD_RV_RT5682_MACH
      are selected, and GPIOLIB is not selected, Kbuild gives
      the following warnings, respectively:
      
      WARNING: unmet direct dependencies detected for SND_SOC_DMIC
        Depends on [n]: SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && GPIOLIB [=n]
        Selected by [y]:
        - SND_SOC_AMD_RENOIR_MACH [=y] && SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && SND_SOC_AMD_RENOIR [=y]
      
      and
      
      WARNING: unmet direct dependencies detected for SND_SOC_MAX98357A
        Depends on [n]: SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && GPIOLIB [=n]
        Selected by [y]:
        - SND_SOC_AMD_RV_RT5682_MACH [=y] && SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && SND_SOC_AMD_ACP3x [=y] && I2C [=y] && CROS_EC [=y]
      
      This is because SND_SOC_DMIC and SND_SOC_MAX98357A are
      selected by SND_SOC_AMD_RV_RT5682_MACH and SND_SOC_AMD_RENOIR_MACH,
      respectively. However, neither of the selectors depend on or select GPIOLIB,
      despite their selectees depending on GPIOLIB.
      
      These unmet dependency bugs were detected by Kismet,
      a static analysis tool for Kconfig. Please advise if this
      is not the appropriate solution.
      Signed-off-by: default avatarJulian Braha <julianbraha@gmail.com>
      Link: https://lore.kernel.org/r/20211027184835.112916-1-julianbraha@gmail.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
      5c7dee44
  3. 27 Oct, 2021 16 commits
  4. 26 Oct, 2021 8 commits
    • Mark Brown's avatar
      Merge series "ASoC: cs42l42: Fixes to power-down" from Richard Fitzgerald... · d7a8940d
      Mark Brown authored
      Merge series "ASoC: cs42l42: Fixes to power-down" from Richard Fitzgerald <rf@opensource.cirrus.com>:
      
      Driver probe and remove were inconsistent in what they did to power-down
      and neither did all steps. In addition to that, neither function
      prevented the interrupt handler from running during and after power-down.
      
      Richard Fitzgerald (2):
        ASoC: cs42l42: Reset and power-down on remove() and failed probe()
        ASoC: cs42l42: free_irq() before powering-down on probe() fail
      
       sound/soc/codecs/cs42l42.c | 43 +++++++++++++++++++++++++++++++------------
       1 file changed, 31 insertions(+), 12 deletions(-)
      
      --
      2.11.0
      d7a8940d
    • Mark Brown's avatar
      Merge series "Update Lpass digital codec macro drivers" from Srinivasa Rao... · 1af4d2e7
      Mark Brown authored
      Merge series "Update Lpass digital codec macro drivers" from Srinivasa Rao Mandadapu <srivasam@codeaurora.org>:
      
      This patch set is to add support for lpass sc7280 based targets.
      Upadate compatible name and change of bulk clock voting to optional
      clock voting in digital codecs va, rx, tx macro drivers.
      
      Changes Since V3:
          -- Removed fixes tag.
          -- Change signedoff by sequence.
      Changes Since V2:
          -- Add Tx macro deafults for lpass sc7280
      Changes Since V1:
          -- Removed individual clock voting and used bulk clock optional.
          -- Removed volatile changes and fixed default values.
          -- Typo errors.
      Srinivasa Rao Mandadapu (5):
        ASoC: qcom: Add compatible names in va,wsa,rx,tx codec drivers for
          sc7280
        ASoC: qcom: dt-bindings: Add compatible names for lpass sc7280 digital
          codecs
        ASoC: codecs: tx-macro: Enable tx top soundwire mic clock
        ASoC: codecs: tx-macro: Update tx default values
        ASoC: codecs: Change bulk clock voting to optional voting in digital
          codecs
      
       .../bindings/sound/qcom,lpass-rx-macro.yaml        |  4 +++-
       .../bindings/sound/qcom,lpass-tx-macro.yaml        |  4 +++-
       .../bindings/sound/qcom,lpass-va-macro.yaml        |  4 +++-
       .../bindings/sound/qcom,lpass-wsa-macro.yaml       |  4 +++-
       sound/soc/codecs/lpass-rx-macro.c                  |  3 ++-
       sound/soc/codecs/lpass-tx-macro.c                  | 25 +++++++++++++++++++---
       sound/soc/codecs/lpass-va-macro.c                  |  3 ++-
       sound/soc/codecs/lpass-wsa-macro.c                 |  1 +
       8 files changed, 39 insertions(+), 9 deletions(-)
      
      --
      Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc.,
      is a member of Code Aurora Forum, a Linux Foundation Collaborative Project.
      1af4d2e7
    • Mark Brown's avatar
      Merge series "ASoC: qcom: Add AudioReach support" from Srinivas Kandagatla... · 98378140
      Mark Brown authored
      Merge series "ASoC: qcom: Add AudioReach support" from Srinivas Kandagatla <srinivas.kandagatla@linaro.org>:
      
      Hi Mark,
      
      This version is a respin of v10 fixing a build error in 12/17 patch.
      
      QCOM SoC relevant non-audio patches in this series has been merged into
      the Qualcomm drivers-for-5.16 tree, as this series depends those patches
      an immutable tag is available at:
      https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux.git tags/20210927135559.738-6-srinivas.kandagatla@linaro.org
      
      This patchset adds ASoC driver support to configure signal processing
      framework ("AudioReach") which is integral part of Qualcomm next
      generation audio SDK and will be deployed on upcoming Qualcomm chipsets.
      It makes use of ASoC Topology to load graphs on to the DSP which is then
      managed by APM (Audio Processing Manager) service to prepare/start/stop.
      
      Here is simplified high-level block diagram of AudioReach:
      
       ___________________________________________________________
      |                 CPU (Application Processor)               |
      |  +---------+          +---------+         +----------+    |
      |  |  q6apm  |          |  q6apm  |         |  q6apm   |    |
      |  |   dais  | <------> |         | <-----> |lpass-dais|    |
      |  +---------+          +---------+         +----------+    |
      |                            ^  ^                           |
      |                            |  |           +---------+     |
      |  +---------+               v  +---------->|topology |     |
      |  | q6prm   |          +---------+         |         |     |
      |  |         |<-------->|   GPR   |         +---------+     |
      |  +---------+          +---------+                         |
      |       ^                    ^                              |
      |       |                    |                              |
      |  +----------+              |                              |
      |  |   q6prm  |              |                              |
      |  |lpass-clks|              |                              |
      |  +----------+              |                              |
      |____________________________|______________________________|
                                   |
                                   | RPMSG (IPC over GLINK)
       ____________________________|______________________________
      |                            |                              |
      |    +-----------------------+                              |
      |    |                       |                              |
      |    v                       v              q6 (Audio DSP)  |
      |+-----+    +----------------------------------+            |
      || PRM |    | APM (Audio Processing Manager)   |            |
      |+-----+    |  . Graph Management              |            |
      |           |  . Command Handing               |            |
      |           |  . Event Management              |            |
      |           |  ...                             |            |
      |           +----------------------------------+            |
      |                            ^                              |
      |____________________________|______________________________|
                                   |
                                   |   LPASS AIF
       ____________________________|______________________________
      |                            |            Audio I/O         |
      |                            v                              |
      |    +--------------------------------------------------+   |
      |    |                Audio devices                     |   |
      |    | CODEC | HDMI-TX | PCM  | SLIMBUS | I2S |MI2S |...|   |
      |    |                                                  |   |
      |    +--------------------------------------------------+   |
      |___________________________________________________________|
      
      AudioReach has constructs of sub-graph, container and modules.
      Each sub-graph can have N containers and each Container can have N Modules
      and connections between them can be linear or non-linear.
      An audio function can be realized with one or many connected
      sub-graphs. There are also control/event paths between modules that can
      be wired up while building graph to achieve various control mechanism
      between modules. These concepts of Sub-Graph, Containers and Modules
      are represented in ASoC topology.
      
      Here is simple I2S graph with a Write Shared Memory and a
      Volume control module within a single Subgraph (1) with one Container (1)
      and 5 modules.
      
        ____________________________________________________________
       |                        Sub-Graph [1]                       |
       |  _______________________________________________________   |
       | |                       Container [1]                   |  |
       | | [WR_SH] -> [PCM DEC] -> [PCM CONV] -> [VOL]-> [I2S-EP]|  |
       | |_______________________________________________________|  |
       |____________________________________________________________|
      
      For now this graph is split into two subgraphs to achieve dpcm like below:
       ________________________________________________    _________________
      |                Sub-Graph [1]                   |  |  Sub-Graph [2]  |
      |  ____________________________________________  |  |  _____________  |
      | |              Container [1]                 | |  | |Container [2]| |
      | | [WR_SH] -> [PCM DEC] -> [PCM CONV] -> [VOL]| |  | |   [I2S-EP]  | |
      | |____________________________________________| |  | |_____________| |
      |________________________________________________|  |_________________|
      
                                                            _________________
                                                          |  Sub-Graph [3]  |
                                                          |  _____________  |
                                                          | |Container [3]| |
                                                          | |  [DMA-EP]   | |
                                                          | |_____________| |
                                                          |_________________|
      
      This patchset adds very minimal support for AudioReach which includes
      supporting sub-graphs containing CODEC DMA ports and simple PCM
      Decoder/Encoder and Logger Modules. Additional capabilities will
      be built over time to expose features offered by AudioReach.
      
      This patchset is Tested on SM8250 SoC based Qualcomm Robotics Platform RB5
      and SM9250 MTP with WSA881X Smart Speaker Amplifiers, DMICs connected via
      VA Macro and WCD938x Codec connected via TX and RX Macro and HDMI audio
      via I2S.
      
      First 10 Patches are mostly reorganization existing Old QDSP Audio
      Framework code and bindings so that we could reuse them on AudioReach.
      
      ASoC topology graphs for DragonBoard RB5 and SM8250 MTP are available at
      https://git.linaro.org/people/srinivas.kandagatla/audioreach-topology.git/
      and Qualcomm AudioReach DSP headers are available at:
      https://source.codeaurora.org/quic/la/platform/vendor/opensource/arspf-headers
      
      Note: There is one false positive warning in this patchset:
      audioreach.c:80:45: warning: array of flexible structures
      
      Thanks,
      srini
      
      Changes since v10:
      - fix build error during arm64 defconfig build reported by Mark in 12/17 patch
      for audioreach_tplg_init symbol
      
      Srinivas Kandagatla (17):
        ASoC: dt-bindings: move LPASS dai related bindings out of q6afe
        ASoC: dt-bindings: move LPASS clocks related bindings out of q6afe
        ASoC: dt-bindings: rename q6afe.h to q6dsp-lpass-ports.h
        ASoC: qdsp6: q6afe-dai: move lpass audio ports to common file
        ASoC: qdsp6: q6afe-clocks: move audio-clocks to common file
        ASoC: dt-bindings: q6dsp: add q6apm-lpass-dai compatible
        ASoC: dt-bindings: lpass-clocks: add q6prm clocks compatible
        ASoC: dt-bindings: add q6apm digital audio stream bindings
        ASoC: qdsp6: audioreach: add basic pkt alloc support
        ASoC: qdsp6: audioreach: add q6apm support
        ASoC: qdsp6: audioreach: add module configuration command helpers
        ASoC: qdsp6: audioreach: add Kconfig and Makefile
        ASoC: qdsp6: audioreach: add topology support
        ASoC: qdsp6: audioreach: add q6apm-dai support
        ASoC: qdsp6: audioreach: add q6apm lpass dai support
        ASoC: qdsp6: audioreach: add q6prm support
        ASoC: qdsp6: audioreach: add support for q6prm-clocks
      
       .../devicetree/bindings/sound/qcom,q6afe.txt  |  181 ---
       .../bindings/sound/qcom,q6apm-dai.yaml        |   53 +
       .../sound/qcom,q6dsp-lpass-clocks.yaml        |   77 ++
       .../sound/qcom,q6dsp-lpass-ports.yaml         |  205 +++
       include/dt-bindings/sound/qcom,q6afe.h        |  203 +--
       .../sound/qcom,q6dsp-lpass-ports.h            |  208 +++
       include/uapi/sound/snd_ar_tokens.h            |  208 +++
       sound/soc/qcom/Kconfig                        |   22 +
       sound/soc/qcom/qdsp6/Makefile                 |   11 +-
       sound/soc/qcom/qdsp6/audioreach.c             | 1130 +++++++++++++++++
       sound/soc/qcom/qdsp6/audioreach.h             |  726 +++++++++++
       sound/soc/qcom/qdsp6/q6afe-clocks.c           |  187 +--
       sound/soc/qcom/qdsp6/q6afe-dai.c              |  687 +---------
       sound/soc/qcom/qdsp6/q6apm-dai.c              |  416 ++++++
       sound/soc/qcom/qdsp6/q6apm-lpass-dais.c       |  260 ++++
       sound/soc/qcom/qdsp6/q6apm.c                  |  822 ++++++++++++
       sound/soc/qcom/qdsp6/q6apm.h                  |  152 +++
       sound/soc/qcom/qdsp6/q6dsp-lpass-clocks.c     |  186 +++
       sound/soc/qcom/qdsp6/q6dsp-lpass-clocks.h     |   30 +
       sound/soc/qcom/qdsp6/q6dsp-lpass-ports.c      |  627 +++++++++
       sound/soc/qcom/qdsp6/q6dsp-lpass-ports.h      |   22 +
       sound/soc/qcom/qdsp6/q6prm-clocks.c           |   85 ++
       sound/soc/qcom/qdsp6/q6prm.c                  |  202 +++
       sound/soc/qcom/qdsp6/q6prm.h                  |   78 ++
       sound/soc/qcom/qdsp6/topology.c               | 1113 ++++++++++++++++
       25 files changed, 6664 insertions(+), 1227 deletions(-)
       create mode 100644 Documentation/devicetree/bindings/sound/qcom,q6apm-dai.yaml
       create mode 100644 Documentation/devicetree/bindings/sound/qcom,q6dsp-lpass-clocks.yaml
       create mode 100644 Documentation/devicetree/bindings/sound/qcom,q6dsp-lpass-ports.yaml
       create mode 100644 include/dt-bindings/sound/qcom,q6dsp-lpass-ports.h
       create mode 100644 include/uapi/sound/snd_ar_tokens.h
       create mode 100644 sound/soc/qcom/qdsp6/audioreach.c
       create mode 100644 sound/soc/qcom/qdsp6/audioreach.h
       create mode 100644 sound/soc/qcom/qdsp6/q6apm-dai.c
       create mode 100644 sound/soc/qcom/qdsp6/q6apm-lpass-dais.c
       create mode 100644 sound/soc/qcom/qdsp6/q6apm.c
       create mode 100644 sound/soc/qcom/qdsp6/q6apm.h
       create mode 100644 sound/soc/qcom/qdsp6/q6dsp-lpass-clocks.c
       create mode 100644 sound/soc/qcom/qdsp6/q6dsp-lpass-clocks.h
       create mode 100644 sound/soc/qcom/qdsp6/q6dsp-lpass-ports.c
       create mode 100644 sound/soc/qcom/qdsp6/q6dsp-lpass-ports.h
       create mode 100644 sound/soc/qcom/qdsp6/q6prm-clocks.c
       create mode 100644 sound/soc/qcom/qdsp6/q6prm.c
       create mode 100644 sound/soc/qcom/qdsp6/q6prm.h
       create mode 100644 sound/soc/qcom/qdsp6/topology.c
      
      --
      2.21.0
      98378140
    • Geert Uytterhoeven's avatar
      ASoC: amd: acp: SND_SOC_AMD_ACP_COMMON should depend on X86 && PCI · 4bf74f8e
      Geert Uytterhoeven authored
      All configuration symbols for AMD Audio ACP conponents depend on X86 &&
      PCI, except for SND_SOC_AMD_ACP_COMMON.  Add a dependency on X86 && PCI
      to SND_SOC_AMD_ACP_COMMON, to prevent asking the user about AMD Audio
      ACP support when configuring a kernel without X86 or PCI support.
      Signed-off-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
      Link: https://lore.kernel.org/r/30fcedce513186bf89f1f2655b665298250fdc66.1635260849.git.geert+renesas@glider.beSigned-off-by: default avatarMark Brown <broonie@kernel.org>
      4bf74f8e
    • Geert Uytterhoeven's avatar
      ASoC: amd: acp: SND_SOC_AMD_{LEGACY_MACH,SOF_MACH} should depend on X86 && PCI && I2C · f31c9399
      Geert Uytterhoeven authored
      If not all of CONFIG_X86, CONFIG_PCI, and CONFIG_I2C are set:
      
          WARNING: unmet direct dependencies detected for SND_SOC_AMD_MACH_COMMON
            Depends on [n]: SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && X86 && PCI [=y] && I2C [=y]
            Selected by [y]:
            - SND_SOC_AMD_LEGACY_MACH [=y] && SOUND [=y] && !UML && SND [=y] && SND_SOC [=y]
            - SND_SOC_AMD_SOF_MACH [=y] && SOUND [=y] && !UML && SND [=y] && SND_SOC [=y]
      
      As SND_SOC_AMD_MACH_COMMON depends on X86 && PCI && I2C, all symbols
      selecting it should depend on X86 && PCI && I2C, too.
      
      Fixes: 9d8a7be8 ("ASoC: amd: acp: Add legacy sound card support for Chrome audio")
      Fixes: 9f84940f ("ASoC: amd: acp: Add SOF audio support on Chrome board")
      Signed-off-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
      Link: https://lore.kernel.org/r/dfb03bd33117e26f3f04ce227bb28095109b3d80.1635260849.git.geert+renesas@glider.beSigned-off-by: default avatarMark Brown <broonie@kernel.org>
      f31c9399
    • Geert Uytterhoeven's avatar
      ASoC: amd: acp: Wrap AMD Audio ACP components in SND_SOC_AMD_ACP_COMMON · f41d2ece
      Geert Uytterhoeven authored
      The build only descends into sound/soc/amd/acp/ if
      CONFIG_SND_SOC_AMD_ACP_COMMON=y.  Hence all later config symbols should
      depend on SND_SOC_AMD_ACP_COMMON, to prevent asking the user about
      config symbols for driver code that won't be build anyway.
      
      Fixes: 623621a9 ("ASoC: amd: Add common framework to support I2S on ACP SOC")
      Signed-off-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
      Link: https://lore.kernel.org/r/53d1d63bed1865293e6f5085ead21cdbb068fb15.1635260849.git.geert+renesas@glider.beSigned-off-by: default avatarMark Brown <broonie@kernel.org>
      f41d2ece
    • Richard Fitzgerald's avatar
      ASoC: cs42l42: free_irq() before powering-down on probe() fail · a10148a8
      Richard Fitzgerald authored
      Relying on devm to free the irq handler on probe failure leaves a
      small window of opportunity for an interrupt to become pending and
      then the handler to run after the chip has been reset and powered
      off.
      
      For safety cs42l42_probe() should free the irq in the error path.
      As the irq is now disabled by the driver in probe() and remove()
      there is no point allocating it as a devres-managed item, so
      convert to plain non-devres.
      Signed-off-by: default avatarRichard Fitzgerald <rf@opensource.cirrus.com>
      Link: https://lore.kernel.org/r/20211026125722.10220-3-rf@opensource.cirrus.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
      a10148a8
    • Richard Fitzgerald's avatar
      ASoC: cs42l42: Reset and power-down on remove() and failed probe() · 6cb725b8
      Richard Fitzgerald authored
      Driver remove() should assert RESET and disable the supplies.
      
      probe() fail was disabling supplies but it didn't assert reset or
      put the codec into a power-down state.
      Signed-off-by: default avatarRichard Fitzgerald <rf@opensource.cirrus.com>
      Link: https://lore.kernel.org/r/20211026125722.10220-2-rf@opensource.cirrus.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
      6cb725b8