1. 29 Oct, 2021 7 commits
    • Arnd Bergmann's avatar
      ASoC: amd: acp: select CONFIG_SND_SOC_ACPI · 62a30322
      Arnd Bergmann authored
      The acp-platform driver now needs the ACPI helpers:
      
      ld.lld: error: undefined symbol: snd_soc_acpi_find_machine
      >>> referenced by acp-platform.c
      >>>               soc/amd/acp/acp-platform.o:(acp_machine_select) in archive sound/built-in.a
      
      ld.lld: error: undefined symbol: snd_soc_acpi_codec_list
      >>> referenced by acp-renoir.c
      >>>               soc/amd/acp/acp-renoir.o:(snd_soc_acpi_amd_acp_machines) in archive sound/built-in.a
      
      Other drivers using this interface, select SND_SOC_ACPI, so do the
      same thing here.
      
      Fixes: e646b51f ("ASoC: amd: acp: Add callback for machine driver on ACP")
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Link: https://lore.kernel.org/r/20211029113714.966823-1-arnd@kernel.orgSigned-off-by: default avatarMark Brown <broonie@kernel.org>
      62a30322
    • Mark Brown's avatar
      Merge series "ASoC: cs42l42: Fix definition and handling of jack switch... · 1560081f
      Mark Brown authored
      Merge series "ASoC: cs42l42: Fix definition and handling of jack switch invert" from Richard Fitzgerald <rf@opensource.cirrus.com>:
      
      Summary: The driver applied the opposite of the DT setting to the
      wrong register bit.
      
      The jack plug detect hardware in cs42l42 is somewhat confusing,
      compounded by an unclear description in the datasheet. This is most
      likely the reason that the driver implemented a DT property for the
      wrong register bit, that had the opposite effect of what was
      described in the binding.
      
      Changing the meaning of the property values isn't feasible; the
      driver dates from 2016 and the risk of breaking out-of-tree configs
      is too high (the property is also available to ACPI systems).
      
      So the fix is to make the binding doc match the actual behaviour and
      then fix the driver to apply it to the correct register bit.
      
      As a bonus, patch #3 converts the binding to yaml.
      
      Richard Fitzgerald (3):
        ASoC: dt-bindings: cs42l42: Correct description of ts-inv
        ASoC: cs42l42: Correct configuring of switch inversion from ts-inv
        ASoC: dt-bindings: cs42l42: Convert binding to yaml
      
       .../devicetree/bindings/sound/cirrus,cs42l42.yaml  | 225 +++++++++++++++++++++
       .../devicetree/bindings/sound/cs42l42.txt          | 114 -----------
       MAINTAINERS                                        |   1 +
       sound/soc/codecs/cs42l42.c                         |   9 +-
       4 files changed, 230 insertions(+), 119 deletions(-)
       create mode 100644 Documentation/devicetree/bindings/sound/cirrus,cs42l42.yaml
       delete mode 100644 Documentation/devicetree/bindings/sound/cs42l42.txt
      
      --
      2.11.0
      1560081f
    • Brent Lu's avatar
      ASoC: Intel: glk_rt5682_max98357a: support ALC5682I-VS codec · 88b4d77d
      Brent Lu authored
      Detect the codec variant in probe function and update DAI link
      accordingly. Also add an new entry in enumeration table for machine
      driver enumeration.
      Signed-off-by: default avatarBrent Lu <brent.lu@intel.com>
      Acked-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
      Link: https://lore.kernel.org/r/20211028140909.496022-1-brent.lu@intel.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
      88b4d77d
    • Julian Braha's avatar
      ASoC: fix unmet dependencies on GPIOLIB for SND_SOC_RT1015P · 2554877e
      Julian Braha authored
      When SND_SOC_MT8192_MT6359_RT1015_RT5682,
      SND_SOC_MT8192_MT6359_RT1015_RT5682,
      SND_SOC_MT8183_DA7219_MAX98357A, or
      SND_SOC_MT8183_MT6358_TS3A227E_MAX98357A is 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_MT8192_MT6359_RT1015_RT5682 [=y] && SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && I2C [=y] && SND_SOC_MT8192 [=y] && MTK_PMIC_WRAP [=y]
      
      WARNING: unmet direct dependencies detected for SND_SOC_RT1015P
        Depends on [n]: SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && GPIOLIB [=n]
        Selected by [y]:
        - SND_SOC_MT8192_MT6359_RT1015_RT5682 [=y] && SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && I2C [=y] && SND_SOC_MT8192 [=y] && MTK_PMIC_WRAP [=y]
      
      WARNING: unmet direct dependencies detected for SND_SOC_RT1015P
        Depends on [n]: SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && GPIOLIB [=n]
        Selected by [y]:
        - SND_SOC_MT8183_DA7219_MAX98357A [=y] && SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && SND_SOC_MT8183 [=y] && I2C [=y]
      
      WARNING: unmet direct dependencies detected for SND_SOC_RT1015P
        Depends on [n]: SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && GPIOLIB [=n]
        Selected by [y]:
        - SND_SOC_MT8183_MT6358_TS3A227E_MAX98357A [=y] && SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && I2C [=y] && SND_SOC_MT8183 [=y]
      
      This is because these config options select SND_SOC_RT1015P
      without selecting or depending on GPIOLIB, despite
      SND_SOC_RT1015P 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>
      Acked-by: default avatarTzung-Bi Shih <tzungbi@google.com>
      Link: https://lore.kernel.org/r/20211029001225.27218-1-julianbraha@gmail.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
      2554877e
    • Pierre-Louis Bossart's avatar
      ASoC: es8316: add support for ESSX8336 ACPI _HID · 986c5b0a
      Pierre-Louis Bossart authored
      The same codec seems to have different personalities. ESSX8316 was
      used for Baytrail/CherryTrail, ESSX8336 seems to be used for AppoloLake,
      GeminiLake, JasperLake and TigerLake devices.
      
      BugLink: https://github.com/thesofproject/linux/issues/2955
      Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>-e
      Reviewed-by: default avatarKai Vehmanen <kai.vehmanen@linux.intel.com>
      Signed-off-by: default avatarBard Liao <yung-chuan.liao@linux.intel.com>
      Link: https://lore.kernel.org/r/20211029011109.23633-1-yung-chuan.liao@linux.intel.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
      986c5b0a
    • Richard Fitzgerald's avatar
      ASoC: cs42l42: Correct configuring of switch inversion from ts-inv · 778a0cbe
      Richard Fitzgerald authored
      The setting from the cirrus,ts-inv property should be applied to the
      TIP_SENSE_INV bit, as this is the one that actually affects the jack
      detect block. The TS_INV bit only swaps the meaning of the PLUG and
      UNPLUG interrupts and should always be 1 for the interrupts to have
      the normal meaning.
      
      Due to some misunderstanding the driver had been implemented to
      configure the TS_INV bit based on the jack switch polarity. This made
      the interrupts behave the correct way around, but left the jack detect
      block, button detect and analogue circuits always interpreting an open
      switch as unplugged.
      
      The signal chain inside the codec is:
      
      SENSE pin -> TIP_SENSE_INV -> TS_INV -> (invert) -> interrupts
                        |
                        v
                   Jack detect,
                button detect and
                  analog control
      
      As the TIP_SENSE_INV already performs the necessary inversion the
      TS_INV bit never needs to change. It must always be 1 to yield the
      expected interrupt behaviour.
      
      Some extra confusion has arisen because of the additional invert in the
      interrupt path, meaning that a value applied to the TS_INV bit produces
      the opposite effect of applying it to the TIP_SENSE_INV bit. The ts-inv
      property has therefore always had the opposite effect to what might be
      expected (0 = inverted, 1 = not inverted). To maintain the meaning of
      the ts-inv property it must be inverted when applied to TIP_SENSE_INV.
      Signed-off-by: default avatarRichard Fitzgerald <rf@opensource.cirrus.com>
      Fixes: 2c394ca7 ("ASoC: Add support for CS42L42 codec")
      Link: https://lore.kernel.org/r/20211028140902.11786-3-rf@opensource.cirrus.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
      778a0cbe
    • Richard Fitzgerald's avatar
      ASoC: dt-bindings: cs42l42: Correct description of ts-inv · 2a2df2a7
      Richard Fitzgerald authored
      This swaps the descriptions of the 0 and 1 values to match
      what the driver actually does with this property.
      
      The background here is somewhat confusing. The codec has two
      invert bits for the tip sense. The DT property should have been
      for the TIP_SENSE_INV bit, which is the one that controls the
      detect block. Due to some misunderstanding of the hardware the
      driver actually implemented setting of the TS_INV bit, which is
      only for swapping the sense of the interrupt bits. The description
      was taken from the datasheet and refers to TIP_SENSE_INV but
      unfortunately TS_INV has a different purpose and the net effect
      of changing it is the reverse of what was intended (this is not
      clearly described in the datasheet). So the ts-inv settings have
      always done the exact opposite of what the description said.
      
      Given the age of the driver, it's too late now to swap the meanings
      of the values, so the description is changed to match the behaviour.
      They have been annotated with the terminology used in the datasheet
      to avoid the confusion of which one corresponds to what the datasheet
      calls "inverted tip sense".
      Signed-off-by: default avatarRichard Fitzgerald <rf@opensource.cirrus.com>
      Fixes: da16c557 ("ASoC: cs42l42: Add devicetree bindings for CS42L42")
      Link: https://lore.kernel.org/r/20211028140902.11786-2-rf@opensource.cirrus.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
      2a2df2a7
  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 15 commits