1. 28 Jan, 2023 1 commit
    • Mark Brown's avatar
      ASoC: simple-card-utils: create jack inputs for · 6c9802b8
      Mark Brown authored
      Merge series from Astrid Rost <astrid.rost@axis.com>:
      
      Add a generic way to create jack inputs for auxiliary jack detection
      drivers (e.g. via i2c, spi), which are not part of any real codec.
      The simple-card can be used as combining card driver to add the jacks,
      no new one is required.
      
      Create a jack (for input-events) for jack devices in the auxiliary
      device list (aux_devs). A device which returns a valid value on
      get_jack_type counts as jack device; set_jack is required
      to add the jack to the device.
      6c9802b8
  2. 27 Jan, 2023 4 commits
    • Astrid Rost's avatar
      ASoC: ts3a227e: add set_jack and get_jack_type · 087b9dda
      Astrid Rost authored
      Add set_jack and get_jack_type to allow simple-card-utils to add
      a jack for it.
      Signed-off-by: default avatarAstrid Rost <astrid.rost@axis.com>
      Link: https://lore.kernel.org/r/20230123135913.2720991-4-astrid.rost@axis.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
      087b9dda
    • Astrid Rost's avatar
      ASoC: simple-card-utils: create jack inputs for aux_devs · 9b271207
      Astrid Rost authored
      Add a generic way to create jack inputs for auxiliary jack detection
      drivers (e.g. via i2c, spi), which are not part of any real codec.
      The simple-card can be used as combining card driver to add the jacks,
      no new one is required.
      
      Create a jack (for input-events) for jack devices in the auxiliary
      device list (aux_devs). A device which returns a valid value on
      get_jack_type counts as jack device; set_jack is required
      to add the jack to the device.
      Signed-off-by: default avatarAstrid Rost <astrid.rost@axis.com>
      Link: https://lore.kernel.org/r/20230123135913.2720991-3-astrid.rost@axis.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
      9b271207
    • Astrid Rost's avatar
      ASoC: soc-component: add get_jack_type · df55122b
      Astrid Rost authored
      Add function to return the jack type of snd_jack_types.
      This allows a generic card driver to add a jack with the specified
      type.
      Signed-off-by: default avatarAstrid Rost <astrid.rost@axis.com>
      Link: https://lore.kernel.org/r/20230123135913.2720991-2-astrid.rost@axis.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
      df55122b
    • 강신형's avatar
      ASoC: soc-compress: Reposition and add pcm_mutex · aa9ff6a4
      강신형 authored
      If panic_on_warn is set and compress stream(DPCM) is started,
      then kernel panic occurred because card->pcm_mutex isn't held appropriately.
      In the following functions, warning were issued at this line
      "snd_soc_dpcm_mutex_assert_held".
      
      static int dpcm_be_connect(struct snd_soc_pcm_runtime *fe,
      		struct snd_soc_pcm_runtime *be, int stream)
      {
      	...
      	snd_soc_dpcm_mutex_assert_held(fe);
      	...
      }
      
      void dpcm_be_disconnect(struct snd_soc_pcm_runtime *fe, int stream)
      {
      	...
      	snd_soc_dpcm_mutex_assert_held(fe);
      	...
      }
      
      void snd_soc_runtime_action(struct snd_soc_pcm_runtime *rtd,
      			    int stream, int action)
      {
      	...
      	snd_soc_dpcm_mutex_assert_held(rtd);
      	...
      }
      
      int dpcm_dapm_stream_event(struct snd_soc_pcm_runtime *fe, int dir,
      	int event)
      {
      	...
      	snd_soc_dpcm_mutex_assert_held(fe);
      	...
      }
      
      These functions are called by soc_compr_set_params_fe, soc_compr_open_fe
      and soc_compr_free_fe
      without pcm_mutex locking. And this is call stack.
      
      [  414.527841][ T2179] pc : dpcm_process_paths+0x5a4/0x750
      [  414.527848][ T2179] lr : dpcm_process_paths+0x37c/0x750
      [  414.527945][ T2179] Call trace:
      [  414.527949][ T2179]  dpcm_process_paths+0x5a4/0x750
      [  414.527955][ T2179]  soc_compr_open_fe+0xb0/0x2cc
      [  414.527972][ T2179]  snd_compr_open+0x180/0x248
      [  414.527981][ T2179]  snd_open+0x15c/0x194
      [  414.528003][ T2179]  chrdev_open+0x1b0/0x220
      [  414.528023][ T2179]  do_dentry_open+0x30c/0x594
      [  414.528045][ T2179]  vfs_open+0x34/0x44
      [  414.528053][ T2179]  path_openat+0x914/0xb08
      [  414.528062][ T2179]  do_filp_open+0xc0/0x170
      [  414.528068][ T2179]  do_sys_openat2+0x94/0x18c
      [  414.528076][ T2179]  __arm64_sys_openat+0x78/0xa4
      [  414.528084][ T2179]  invoke_syscall+0x48/0x10c
      [  414.528094][ T2179]  el0_svc_common+0xbc/0x104
      [  414.528099][ T2179]  do_el0_svc+0x34/0xd8
      [  414.528103][ T2179]  el0_svc+0x34/0xc4
      [  414.528125][ T2179]  el0t_64_sync_handler+0x8c/0xfc
      [  414.528133][ T2179]  el0t_64_sync+0x1a0/0x1a4
      [  414.528142][ T2179] Kernel panic - not syncing: panic_on_warn set ...
      
      So, I reposition and add pcm_mutex to resolve lockdep error.
      Signed-off-by: default avatarShinhyung Kang <s47.kang@samsung.com>
      Link: https://lore.kernel.org/r/016401d90ac4$7b6848c0$7238da40$@samsung.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
      aa9ff6a4
  3. 26 Jan, 2023 7 commits
  4. 25 Jan, 2023 9 commits
  5. 23 Jan, 2023 3 commits
  6. 20 Jan, 2023 2 commits
  7. 19 Jan, 2023 1 commit
    • Mark Brown's avatar
      ASoC: mediatek: Add support for MT8188 SoC · 8dc08c82
      Mark Brown authored
      Merge series from Trevor Wu <trevor.wu@mediatek.com>:
      
      This series of patches adds support for Mediatek AFE of MT8188 SoC.
      Patches are based on broonie tree "for-next" branch.
      
      Changes since v4:
        - refine etdm dai driver based on reviewer's suggestions
        - refine dt-binding files based on reviewer's suggestions
      
      Changes since v3:
        - replace apll_ck with apll to sync with the relationship in CCF
        - add mtk-soundcard-driver.c to support codec parsing
        - drop mclk-always-on-rates support in mt8188-dai-etdm.c
        - refine dt-binding files based on reviewer's suggestions
      
      Changes since v2:
        - drop CLK_IGNORE_UNUSED flag
        - include bitfield.h to reslove the issue reported by kernel test robot
        - rename mt8188-afe-pcm.yaml to mt8188-afe.yaml
        - refine dt-binding files based on reviewer's suggestions
      
      Changes since v1:
        - remove bus protection functions in case of unmerged dependency problem
        - replace some bit operation macro with FIELD_PREP
        - simplify register control by regmap_set_bits and regmap_clear_bits
        - fix dt-binding errors
        - rename compatible string for recognition
      
      Trevor Wu (13):
        ASoC: mediatek: common: add SMC ops and SMC CMD
        ASoC: mediatek: mt8188: add common header
        ASoC: mediatek: mt8188: support audsys clock
        ASoC: mediatek: mt8188: support adda in platform driver
        ASoC: mediatek: mt8188: support etdm in platform driver
        ASoC: mediatek: mt8188: support pcmif in platform driver
        ASoC: mediatek: mt8188: support audio clock control
        ASoC: mediatek: mt8188: add platform driver
        ASoC: mediatek: mt8188: add control for timing select
        ASoC: dt-bindings: mediatek,mt8188-afe: add audio afe document
        ASoC: mediatek: common: add soundcard driver common code
        ASoC: mediatek: mt8188: add machine driver with mt6359
        ASoC: dt-bindings: mediatek,mt8188-mt6359: add mt8188-mt6359 document
      
       .../bindings/sound/mediatek,mt8188-afe.yaml   |  208 +
       .../sound/mediatek,mt8188-mt6359.yaml         |   97 +
       sound/soc/mediatek/Kconfig                    |   23 +
       sound/soc/mediatek/Makefile                   |    1 +
       sound/soc/mediatek/common/Makefile            |    2 +-
       sound/soc/mediatek/common/mtk-base-afe.h      |   19 +
       .../mediatek/common/mtk-soundcard-driver.c    |   79 +
       .../mediatek/common/mtk-soundcard-driver.h    |   14 +
       sound/soc/mediatek/mt8188/Makefile            |   15 +
       sound/soc/mediatek/mt8188/mt8188-afe-clk.c    |  658 ++++
       sound/soc/mediatek/mt8188/mt8188-afe-clk.h    |  115 +
       sound/soc/mediatek/mt8188/mt8188-afe-common.h |  151 +
       sound/soc/mediatek/mt8188/mt8188-afe-pcm.c    | 3359 +++++++++++++++++
       sound/soc/mediatek/mt8188/mt8188-audsys-clk.c |  205 +
       sound/soc/mediatek/mt8188/mt8188-audsys-clk.h |   15 +
       .../soc/mediatek/mt8188/mt8188-audsys-clkid.h |   83 +
       sound/soc/mediatek/mt8188/mt8188-dai-adda.c   |  632 ++++
       sound/soc/mediatek/mt8188/mt8188-dai-etdm.c   | 2588 +++++++++++++
       sound/soc/mediatek/mt8188/mt8188-dai-pcm.c    |  367 ++
       sound/soc/mediatek/mt8188/mt8188-mt6359.c     |  785 ++++
       sound/soc/mediatek/mt8188/mt8188-reg.h        | 3180 ++++++++++++++++
       21 files changed, 12595 insertions(+), 1 deletion(-)
       create mode 100644 Documentation/devicetree/bindings/sound/mediatek,mt8188-afe.yaml
       create mode 100644 Documentation/devicetree/bindings/sound/mediatek,mt8188-mt6359.yaml
       create mode 100644 sound/soc/mediatek/common/mtk-soundcard-driver.c
       create mode 100644 sound/soc/mediatek/common/mtk-soundcard-driver.h
       create mode 100644 sound/soc/mediatek/mt8188/Makefile
       create mode 100644 sound/soc/mediatek/mt8188/mt8188-afe-clk.c
       create mode 100644 sound/soc/mediatek/mt8188/mt8188-afe-clk.h
       create mode 100644 sound/soc/mediatek/mt8188/mt8188-afe-common.h
       create mode 100644 sound/soc/mediatek/mt8188/mt8188-afe-pcm.c
       create mode 100644 sound/soc/mediatek/mt8188/mt8188-audsys-clk.c
       create mode 100644 sound/soc/mediatek/mt8188/mt8188-audsys-clk.h
       create mode 100644 sound/soc/mediatek/mt8188/mt8188-audsys-clkid.h
       create mode 100644 sound/soc/mediatek/mt8188/mt8188-dai-adda.c
       create mode 100644 sound/soc/mediatek/mt8188/mt8188-dai-etdm.c
       create mode 100644 sound/soc/mediatek/mt8188/mt8188-dai-pcm.c
       create mode 100644 sound/soc/mediatek/mt8188/mt8188-mt6359.c
       create mode 100644 sound/soc/mediatek/mt8188/mt8188-reg.h
      
      --
      2.18.0
      8dc08c82
  8. 18 Jan, 2023 8 commits
  9. 17 Jan, 2023 5 commits