1. 25 Aug, 2021 5 commits
    • Shengjiu Wang's avatar
      ASoC: imx-rpmsg: change dev_err to dev_err_probe for -EPROBE_DEFER · a8946f03
      Shengjiu Wang authored
      Change dev_err to dev_err_probe for no need print error message
      when defer probe happens.
      
      Fixes: 39f8405c ("ASoC: imx-rpmsg: Add machine driver for audio base on rpmsg")
      Signed-off-by: default avatarShengjiu Wang <shengjiu.wang@nxp.com>
      Link: https://lore.kernel.org/r/1629875681-16373-1-git-send-email-shengjiu.wang@nxp.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
      a8946f03
    • Derek Fang's avatar
      ASoC: rt5682: Fix the vol+ button detection issue · 8d3019b6
      Derek Fang authored
      Fix the wrong button vol+ detection issue with some brand headsets
      by fine tuning the threshold of button vol+ and SAR ADC button accuracy.
      Signed-off-by: default avatarDerek Fang <derek.fang@realtek.com>
      Link: https://lore.kernel.org/r/20210825040346.28346-1-derek.fang@realtek.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
      8d3019b6
    • Peter Ujfalusi's avatar
      ASoC: Intel: bytcr_rt5640: Make rt5640_jack_gpio/rt5640_jack2_gpio static · dc2d01c7
      Peter Ujfalusi authored
      Marking the two jack gpio as static fixes the following Sparse errors:
      sound/soc/intel/boards/bytcr_rt5640.c:468:26: error: symbol 'rt5640_jack_gpio' was not declared. Should it be static?
      sound/soc/intel/boards/bytcr_rt5640.c:475:26: error: symbol 'rt5640_jack2_gpio' was not declared. Should it be static?
      
      Fixes: 9ba00856 ("ASoC: Intel: bytcr_rt5640: Add support for HP Elite Pad 1000G2 jack-detect")
      Signed-off-by: default avatarPeter Ujfalusi <peter.ujfalusi@linux.intel.com>
      Link: https://lore.kernel.org/r/20210825122519.3364-1-peter.ujfalusi@linux.intel.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
      dc2d01c7
    • Mark Brown's avatar
      Merge branch 'for-5.14' of... · 2d02e7d7
      Mark Brown authored
      Merge branch 'for-5.14' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-5.15
      2d02e7d7
    • Mark Brown's avatar
      Merge series "ASoC: mediatek: Add support for MT8195 SoC" from Trevor Wu <trevor.wu@mediatek.com>: · 88939e73
      Mark Brown authored
      This series of patches adds support for Mediatek AFE of MT8195 SoC.
      Patches are based on broonie tree "for-next" branch.
      
      Changes since v4:
        - removed sof related code
      
      Changes since v3:
        - fixed warnings found by kernel test robot
        - removed unused critical section
        - corrected the lock protected sections on etdm driver
        - added DPTX and HDMITX audio support
      
      Changes since v2:
        - added audio clock gate control
        - added 'mediatek' prefix to private dts properties
        - added consumed clocks to dt-bindins and adopted suggestions from Rob
        - refined clock usage and remove unused clock and control code
        - fixed typos
      
      Changes since v1:
        - fixed some problems related to dt-bindings
        - added some missing properties to dt-bindings
        - added depency declaration on dt-bindings
        - fixed some warnings found by kernel test robot
      
      Trevor Wu (11):
        ASoC: mediatek: mt8195: update mediatek common driver
        ASoC: mediatek: mt8195: support audsys clock control
        ASoC: mediatek: mt8195: support etdm in platform driver
        ASoC: mediatek: mt8195: support adda in platform driver
        ASoC: mediatek: mt8195: support pcm in platform driver
        ASoC: mediatek: mt8195: add platform driver
        dt-bindings: mediatek: mt8195: add audio afe document
        ASoC: mediatek: mt8195: add machine driver with mt6359, rt1019 and
          rt5682
        ASoC: mediatek: mt8195: add DPTX audio support
        ASoC: mediatek: mt8195: add HDMITX audio support
        dt-bindings: mediatek: mt8195: add mt8195-mt6359-rt1019-rt5682
          document
      
       .../bindings/sound/mt8195-afe-pcm.yaml        |  184 +
       .../sound/mt8195-mt6359-rt1019-rt5682.yaml    |   47 +
       sound/soc/mediatek/Kconfig                    |   24 +
       sound/soc/mediatek/Makefile                   |    1 +
       sound/soc/mediatek/common/mtk-afe-fe-dai.c    |   22 +-
       sound/soc/mediatek/common/mtk-base-afe.h      |   10 +-
       sound/soc/mediatek/mt8195/Makefile            |   15 +
       sound/soc/mediatek/mt8195/mt8195-afe-clk.c    |  441 +++
       sound/soc/mediatek/mt8195/mt8195-afe-clk.h    |  109 +
       sound/soc/mediatek/mt8195/mt8195-afe-common.h |  158 +
       sound/soc/mediatek/mt8195/mt8195-afe-pcm.c    | 3281 +++++++++++++++++
       sound/soc/mediatek/mt8195/mt8195-audsys-clk.c |  214 ++
       sound/soc/mediatek/mt8195/mt8195-audsys-clk.h |   15 +
       .../soc/mediatek/mt8195/mt8195-audsys-clkid.h |   93 +
       sound/soc/mediatek/mt8195/mt8195-dai-adda.c   |  830 +++++
       sound/soc/mediatek/mt8195/mt8195-dai-etdm.c   | 2639 +++++++++++++
       sound/soc/mediatek/mt8195/mt8195-dai-pcm.c    |  389 ++
       .../mt8195/mt8195-mt6359-rt1019-rt5682.c      | 1087 ++++++
       sound/soc/mediatek/mt8195/mt8195-reg.h        | 2796 ++++++++++++++
       19 files changed, 12350 insertions(+), 5 deletions(-)
       create mode 100644 Documentation/devicetree/bindings/sound/mt8195-afe-pcm.yaml
       create mode 100644 Documentation/devicetree/bindings/sound/mt8195-mt6359-rt1019-rt5682.yaml
       create mode 100644 sound/soc/mediatek/mt8195/Makefile
       create mode 100644 sound/soc/mediatek/mt8195/mt8195-afe-clk.c
       create mode 100644 sound/soc/mediatek/mt8195/mt8195-afe-clk.h
       create mode 100644 sound/soc/mediatek/mt8195/mt8195-afe-common.h
       create mode 100644 sound/soc/mediatek/mt8195/mt8195-afe-pcm.c
       create mode 100644 sound/soc/mediatek/mt8195/mt8195-audsys-clk.c
       create mode 100644 sound/soc/mediatek/mt8195/mt8195-audsys-clk.h
       create mode 100644 sound/soc/mediatek/mt8195/mt8195-audsys-clkid.h
       create mode 100644 sound/soc/mediatek/mt8195/mt8195-dai-adda.c
       create mode 100644 sound/soc/mediatek/mt8195/mt8195-dai-etdm.c
       create mode 100644 sound/soc/mediatek/mt8195/mt8195-dai-pcm.c
       create mode 100644 sound/soc/mediatek/mt8195/mt8195-mt6359-rt1019-rt5682.c
       create mode 100644 sound/soc/mediatek/mt8195/mt8195-reg.h
      
      --
      2.18.0
      88939e73
  2. 24 Aug, 2021 13 commits
  3. 23 Aug, 2021 18 commits
  4. 20 Aug, 2021 3 commits
    • Mark Brown's avatar
      Merge series "ASoC: Intel/rt5640: Add support for HP Elite Pad 1000G2... · 77eca00f
      Mark Brown authored
      Merge series "ASoC: Intel/rt5640: Add support for HP Elite Pad 1000G2 jack-detect" from Hans de Goede <hdegoede@redhat.com>:
      
      Changes in v2:
      - Rebase on asoc/for-next
      - New patch: "ASoC: Intel: bytct_rt5640: Add a separate "Headset Mic 2"
        DAPM pin for the mic on the 2nd jack"
      - Addressed Pierre-Louis' comments about calling
        acpi_dev_add_driver_gpios() twice
      
      Original cover-letter:
      
      The HP Elitepad 1000 G2 tablet has 2 headset jacks:
      
      1. on the dock which uses the output of the codecs built-in HP-amp +
      the standard IN2 input which is always used with the headset-jack.
      
      2. on the tablet itself, this uses the line-out of the codec + an external
      HP-amp, which gets enabled by the ALC5642 codec's GPIO1 pin; and IN1 for
      the headset-mic.
      
      The codec's GPIO1 is also its only IRQ output pin, so this means that
      the codec's IRQ cannot be used on this tablet. Instead the jack-detect
      is connected directly to GPIOs on the main SoC. The dock has a helper
      chip which also detects if a headset-mic is present or not, so there
      are 2 GPIOs for the jack-detect status of the dock. The tablet jack
      uses a single GPIO which indicates if a jack is present or not.
      
      Differentiating between between headphones vs a headset on the tablet jack
      is done by using the usual mic-bias over-current-detection mechanism.
      
      Regards,
      
      Hans
      
      Hans de Goede (6):
        ASoC: rt5640: Move rt5640_disable_jack_detect() up in the rt5640.c
          file
        ASoC: rt5640: Delay requesting IRQ until the machine-drv calls
          set_jack
        ASoC: rt5640: Add optional hp_det_gpio parameter to
          rt5640_detect_headset()
        ASoC: rt5640: Add rt5640_set_ovcd_params() helper
        ASoC: Intel: bytct_rt5640: Add a separate "Headset Mic 2" DAPM pin for
          the mic on the 2nd jack
        ASoC: Intel: bytcr_rt5640: Add support for HP Elite Pad 1000G2
          jack-detect
      
       sound/soc/codecs/rt5640.c             | 136 ++++++++++++----------
       sound/soc/codecs/rt5640.h             |   6 +
       sound/soc/intel/boards/bytcr_rt5640.c | 158 +++++++++++++++++++++++++-
       3 files changed, 234 insertions(+), 66 deletions(-)
      
      --
      2.31.1
      77eca00f
    • Kuninori Morimoto's avatar
      ASoC: rsnd: adg: clearly handle clock error / NULL case · cc64c390
      Kuninori Morimoto authored
      This driver is assuming that all adg->clk[i] is not NULL.
      Because of this prerequisites, for_each_rsnd_clk() is possible to work
      for all clk without checking NULL. In other words, all adg->clk[i]
      should not NULL.
      
      Some SoC might doesn't have clk_a/b/c/i. devm_clk_get() returns error in
      such case. This driver calls rsnd_adg_null_clk_get() and use null_clk
      instead of NULL in such cases.
      
      But devm_clk_get() might returns NULL even though such clocks exist, but
      it doesn't mean error (user deliberately chose to disable the feature).
      NULL clk itself is not error from clk point of view, but is error from
      this driver point of view because it is not assuming such case.
      
      But current code is using IS_ERR() which doesn't care NULL.
      This driver uses IS_ERR_OR_NULL() instead of IS_ERR() for clk check.
      And it uses ERR_CAST() to clarify null_clk error.
      
      One concern here is that it unconditionally uses null_clk if clk_a/b/c/i
      was error. It is correct if it doesn't exist, but is not correct if it
      returns error even though it exist.
      It needs to check "clock-names" from DT before calling devm_clk_get() to
      handling such case. But let's assume it is overkill so far.
      
      Link: https://lore.kernel.org/r/YMCmhfQUimHCSH/n@mwandaReported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
      Link: https://lore.kernel.org/r/87v940wyf9.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
      cc64c390
    • Kuninori Morimoto's avatar
      ASoC: rsnd: core: make some arrays static const, makes object smaller · 28889de6
      Kuninori Morimoto authored
      Don't populate arrays on the stack but instead them static const.
      Makes the object code smaller by 48 bytes.
      
      Before:
         text    data     bss     dec     hex filename
        20938     916     104   21958    55c6 ./sound/soc/sh/rcar/core.o
      
      After:
         text    data     bss     dec     hex filename
        20890     916     104   21910    5596 ./sound/soc/sh/rcar/core.o
      
      gcc version 11.1.0)
      Signed-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
      Link: https://lore.kernel.org/r/87tujkwydx.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
      28889de6
  5. 19 Aug, 2021 1 commit