Skip to content
  1. Jul 08, 2020
  2. Jul 07, 2020
    • Nicolin Chen's avatar
      MAINTAINERS: Add Shengjiu to reviewer list of sound/soc/fsl · 503ed522
      Nicolin Chen authored
      
      
      Add Shengjiu who's actively working on the latest fsl/nxp audio drivers.
      
      Signed-off-by: default avatarNicolin Chen <nicoleotsuka@gmail.com>
      Reviewed-by: default avatarFabio Estevam <festevam@gmail.com>
      Acked-by: default avatarShengjiu Wang <shengjiu.wang@gmail.com>
      Link: https://lore.kernel.org/r/20200707045829.10002-1-nicoleotsuka@gmail.com
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      503ed522
    • Maxime Ripard's avatar
      ASoC: core: Remove only the registered component in devm functions · 58f30150
      Maxime Ripard authored
      
      
      The ASoC devm_ functions that register a component
      (devm_snd_soc_register_component and devm_snd_dmaengine_pcm_register) will
      clean their component by running snd_soc_unregister_component.
      
      snd_soc_unregister_component will then remove all the components for the
      device that was used to register the component in the first place.
      
      However, some drivers register several components (such as a DAI and a
      dmaengine PCM) on the same device, and if the dmaengine PCM is registered
      first, then the DAI will be cleaned up first and
      snd_dmaengine_pcm_unregister will be called next.
      
      snd_dmaengine_pcm_unregister will then lookup the dmaengine PCM component
      on the device, and if there's one unregister that component and release its
      dmaengine channels. That doesn't happen in practice though since the first
      call to snd_soc_unregister_component removed all the components, so we
      never get the chance to release the dmaengine channels.
      
      In order to fix this, instead of removing all the components for a given
      device, we can simply remove the component that was registered in the first
      place. We should have the same number of component registration than we
      have components, so it should work just fine.
      
      Signed-off-by: default avatarMaxime Ripard <maxime@cerno.tech>
      Link: https://lore.kernel.org/r/20200707074237.287171-1-maxime@cerno.tech
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      58f30150
  3. Jul 03, 2020
  4. Jul 02, 2020
    • Fabio Estevam's avatar
      ASoC: dt-bindings: simple-card: Fix 'make dt_binding_check' warnings · 5aaec71d
      Fabio Estevam authored
      
      
      The following build warnings are seen with 'make dt_binding_check':
      
      Documentation/devicetree/bindings/sound/simple-card.example.dts:209.46-211.15: Warning (unit_address_vs_reg): /example-4/sound/simple-audio-card,cpu@0: node has a unit name, but no reg or ranges property
      Documentation/devicetree/bindings/sound/simple-card.example.dts:213.37-215.15: Warning (unit_address_vs_reg): /example-4/sound/simple-audio-card,cpu@1: node has a unit name, but no reg or ranges property
      Documentation/devicetree/bindings/sound/simple-card.example.dts:250.42-261.15: Warning (unit_address_vs_reg): /example-5/sound/simple-audio-card,dai-link@0: node has a unit name, but no reg or ranges property
      Documentation/devicetree/bindings/sound/simple-card.example.dts:263.42-288.15: Warning (unit_address_vs_reg): /example-5/sound/simple-audio-card,dai-link@1: node has a unit name, but no reg or ranges property
      Documentation/devicetree/bindings/sound/simple-card.example.dts:270.32-272.19: Warning (unit_address_vs_reg): /example-5/sound/simple-audio-card,dai-link@1/cpu@0: node has a unit name, but no reg or ranges property
      Documentation/devicetree/bindings/sound/simple-card.example.dts:273.23-275.19: Warning (unit_address_vs_reg): /example-5/sound/simple-audio-card,dai-link@1/cpu@1: node has a unit name, but no reg or ranges property
      Documentation/devicetree/bindings/sound/simple-card.example.dts:276.23-278.19: Warning (unit_address_vs_reg): /example-5/sound/simple-audio-card,dai-link@1/cpu@2: node has a unit name, but no reg or ranges property
      Documentation/devicetree/bindings/sound/simple-card.example.dts:279.23-281.19: Warning (unit_address_vs_reg): /example-5/sound/simple-audio-card,dai-link@1/cpu@3: node has a unit name, but no reg or ranges property
      Documentation/devicetree/bindings/sound/simple-card.example.dts:290.42-303.15: Warning (unit_address_vs_reg): /example-5/sound/simple-audio-card,dai-link@2: node has a unit name, but no reg or ranges property
      
      Fix them all.
      
      Signed-off-by: default avatarFabio Estevam <festevam@gmail.com>
      Link: https://lore.kernel.org/r/20200630223020.25546-1-festevam@gmail.com
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      5aaec71d
  5. Jul 01, 2020
  6. Jun 30, 2020
    • Hans de Goede's avatar
      ASoC: rt5670: Fix dac- and adc- vol-tlv values being off by a factor of 10 · 3f31f7d9
      Hans de Goede authored
      
      
      The adc_vol_tlv volume-control has a range from -17.625 dB to +30 dB,
      not -176.25 dB to + 300 dB. This wrong scale is esp. a problem in userspace
      apps which translate the dB scale to a linear scale. With the logarithmic
      dB scale being of by a factor of 10 we loose all precision in the lower
      area of the range when apps translate things to a linear scale.
      
      E.g. the 0 dB default, which corresponds with a value of 47 of the
      0 - 127 range for the control, would be shown as 0/100 in alsa-mixer.
      
      Since the centi-dB values used in the TLV struct cannot represent the
      0.375 dB step size used by these controls, change the TLV definition
      for them to specify a min and max value instead of min + stepsize.
      
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      Link: https://lore.kernel.org/r/20200628155231.71089-5-hdegoede@redhat.com
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      3f31f7d9
    • Hans de Goede's avatar
      ASoC: rt5670: Add new gpio1_is_ext_spk_en quirk and enable it on the Lenovo Miix 2 10 · 85ca6b17
      Hans de Goede authored
      The Lenovo Miix 2 10 has a keyboard dock with extra speakers in the dock.
      Rather then the ACL5672's GPIO1 pin being used as IRQ to the CPU, it is
      actually used to enable the amplifier for these speakers
      (the IRQ to the CPU comes directly from the jack-detect switch).
      
      Add a quirk for having an ext speaker-amplifier enable pin on GPIO1
      and replace the Lenovo Miix 2 10's dmi_system_id table entry's wrong
      GPIO_DEV quirk (which needs to be renamed to GPIO1_IS_IRQ) with the
      new RT5670_GPIO1_IS_EXT_SPK_EN quirk, so that we enable the external
      speaker-amplifier as necessary.
      
      Also update the ident field for the dmi_system_id table entry, the
      Miix models are not Thinkpads.
      
      Fixes: 67e03ff3
      
       ("ASoC: codecs: rt5670: add Thinkpad Tablet 10 quirk")
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1786723
      Link: https://lore.kernel.org/r/20200628155231.71089-4-hdegoede@redhat.com
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      85ca6b17
    • Hans de Goede's avatar
      ASoC: rt5670: Correct RT5670_LDO_SEL_MASK · 5cacc6f5
      Hans de Goede authored
      The RT5670_PWR_ANLG1 register has 3 bits to select the LDO voltage,
      so the correct mask is 0x7 not 0x3.
      
      Because of this wrong mask we were programming the ldo bits
      to a setting of binary 001 (0x05 & 0x03) instead of binary 101
      when moving to SND_SOC_BIAS_PREPARE.
      
      According to the datasheet 001 is a reserved value, so no idea
      what it did, since the driver was working fine before I guess we
      got lucky and it does something which is ok.
      
      Fixes: 5e8351de
      
       ("ASoC: add RT5670 CODEC driver")
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      Cc: stable@vger.kernel.org
      Link: https://lore.kernel.org/r/20200628155231.71089-3-hdegoede@redhat.com
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      5cacc6f5
    • Hans de Goede's avatar
      ASoC: Intel: cht_bsw_rt5672: Change bus format to I2S 2 channel · 0ceb8a36
      Hans de Goede authored
      
      
      The default mode for SSP configuration is TDM 4 slot and so far we were
      using this for the bus format on cht-bsw-rt56732 boards.
      
      One board, the Lenovo Miix 2 10 uses not 1 but 2 codecs connected to SSP2.
      The second piggy-backed, output-only codec is inside the keyboard-dock
      (which has extra speakers). Unlike the main rt5672 codec, we cannot
      configure this codec, it is hard coded to use 2 channel 24 bit I2S.
      
      Using 4 channel TDM leads to the dock speakers codec (which listens in on
      the data send from the SSP to the rt5672 codec) emiting horribly distorted
      sound.
      
      Since we only support 2 channels anyways, there is no need for TDM on any
      cht-bsw-rt5672 designs. So we can simply use I2S 2ch everywhere.
      
      This commit fixes the Lenovo Miix 2 10 dock speakers issue by changing
      the bus format set in cht_codec_fixup() to I2S 2 channel.
      
      This change has been tested on the following devices with a rt5672 codec:
      
      Lenovo Miix 2 10
      Lenovo Thinkpad 8
      Lenovo Thinkpad 10 (gen 1)
      
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      Cc: stable@vger.kernel.org
      BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1786723
      Link: https://lore.kernel.org/r/20200628155231.71089-2-hdegoede@redhat.com
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      0ceb8a36
    • Geert Uytterhoeven's avatar
      ASoC: qcom: Drop HAS_DMA dependency to fix link failure · b6aa06de
      Geert Uytterhoeven authored
      When building on allyesconfig kernel for a NO_DMA=y platform (e.g.
      Sun-3), CONFIG_SND_SOC_QCOM_COMMON=y, but CONFIG_SND_SOC_QDSP6_AFE=n,
      leading to a link failure:
      
          sound/soc/qcom/common.o: In function `qcom_snd_parse_of':
          common.c:(.text+0x2e2): undefined reference to `q6afe_is_rx_port'
      
      While SND_SOC_QDSP6 depends on HAS_DMA, SND_SOC_MSM8996 and SND_SOC_SDM845
      don't, so the following warning is seen:
      
          WARNING: unmet direct dependencies detected for SND_SOC_QDSP6
            Depends on [n]: SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && QCOM_APR [=y] && HAS_DMA [=n]
            Selected by [y]:
            - SND_SOC_MSM8996 [=y] && SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && QCOM_APR [=y]
            - SND_SOC_SDM845 [=y] && SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && QCOM_APR [=y] && CROS_EC [=y] && I2C [=y] && SOUNDWIRE [=y]
      
      Until recently, this warning was harmless (from a compile-testing
      point-of-view), but the new user of q6afe_is_rx_port() turned this into
      a hard failure.
      
      As the QDSP6 driver itself builds fine if NO_DMA=y, and it depends on
      QCOM_APR (which in turns depends on ARCH_QCOM || COMPILE_TEST), it is
      safe to increase compile testing coverage.  Hence fix the link failure
      by dropping the HAS_DMA dependency of SND_SOC_QDSP6.
      
      Fixes: a2120089 ("ASoC: qcom: common: set correct directions for dailinks")
      Fixes: 6b1687bf ("ASoC: qcom: add sdm845 sound card support")
      Fixes: a6f933f6
      
       ("ASoC: qcom: apq8096: Add db820c machine driver")
      Signed-off-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
      Link: https://lore.kernel.org/r/20200629122443.21736-1-geert@linux-m68k.org
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      b6aa06de
  7. Jun 25, 2020
  8. Jun 24, 2020
  9. Jun 23, 2020
  10. Jun 19, 2020
  11. Jun 18, 2020
  12. Jun 16, 2020
    • Shengjiu Wang's avatar
      ASoC: fsl_ssi: Fix bclk calculation for mono channel · ed1220df
      Shengjiu Wang authored
      For mono channel, SSI will switch to Normal mode.
      
      In Normal mode and Network mode, the Word Length Control bits
      control the word length divider in clock generator, which is
      different with I2S Master mode (the word length is fixed to
      32bit), it should be the value of params_width(hw_params).
      
      The condition "slots == 2" is not good for I2S Master mode,
      because for Network mode and Normal mode, the slots can also
      be 2. Then we need to use (ssi->i2s_net & SSI_SCR_I2S_MODE_MASK)
      to check if it is I2S Master mode.
      
      So we refine the formula for mono channel, otherwise there
      will be sound issue for S24_LE.
      
      Fixes: b0a7043d
      
       ("ASoC: fsl_ssi: Caculate bit clock rate using slot number and width")
      Signed-off-by: default avatarShengjiu Wang <shengjiu.wang@nxp.com>
      Reviewed-by: default avatarNicolin Chen <nicoleotsuka@gmail.com>
      Link: https://lore.kernel.org/r/034eff1435ff6ce300b6c781130cefd9db22ab9a.1592276147.git.shengjiu.wang@nxp.com
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      ed1220df
  13. Jun 15, 2020
  14. Jun 12, 2020
  15. Jun 11, 2020