1. 06 Jun, 2019 3 commits
    • Nathan Chancellor's avatar
      ASoC: rt1011: Mark format integer literals as unsigned · 83a6edbb
      Nathan Chancellor authored
      Clang warns:
      
      sound/soc/codecs/rt1011.c:1291:12: warning: integer literal is too large
      to be represented in type 'long', interpreting as 'unsigned long' per
      C89; this literal will have type 'long long' in C99 onwards
      [-Wc99-compat]
                      format = 2147483648; /* 2^24 * 128 */
                               ^
      sound/soc/codecs/rt1011.c:2123:13: warning: integer literal is too large
      to be represented in type 'long', interpreting as 'unsigned long' per
      C89; this literal will have type 'long long' in C99 onwards
      [-Wc99-compat]
                              format = 2147483648; /* 2^24 * 128 */
                                       ^
      2 warnings generated.
      
      Mark the integer literals as unsigned explicitly so that if the kernel
      does ever bump the C standard it uses, the behavior is consitent.
      
      Fixes: d6e65bb7 ("ASoC: rt1011: Add RT1011 amplifier driver")
      Link: https://github.com/ClangBuiltLinux/linux/issues/506Signed-off-by: default avatarNathan Chancellor <natechancellor@gmail.com>
      Reviewed-by: default avatarNick Desaulniers <ndesaulniers@google.com>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      83a6edbb
    • Amadeusz Sławiński's avatar
      ASoC: core: Tell codec that jack is being removed · 3bb936f5
      Amadeusz Sławiński authored
      When component is being removed we should disable jack, otherwise some
      codecs will try to trigger interrupt using freed structures.
      Signed-off-by: default avatarAmadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      3bb936f5
    • Maxime Ripard's avatar
      ASoC: sun4i-i2s: Change SR and WSS computation · 619c15f7
      Maxime Ripard authored
      The current computation for the SR (sample resolution) and the WSS (word
      slot size) register parameters is based on a switch returning the matching
      parameters for a given params width.
      
      Later SoCs (A83t, H3, A64) changed that calculation, which was loosely the
      same with an offset. Therefore, an offset was added to adjust those
      parameters.
      
      However, the calculation is a bit less trivial than initially thought.
      Indeed, while we assumed that SR and WSS were always the same, on older
      SoCs, SR will max at 24 (since those SoCs do not support 32 bits formats),
      but the word size can be 32.
      
      Newer SoCs can also support a much larger range (8 bits to 32 bits, by
      increments of 4) of size than the older SoCs could.
      
      Finally, the A64 and A83t were never adjusted to have that offset in the
      first place, and were therefore broken from that point of view.
      
      In order to fix all those issues, let's introduce two functions, get_wss
      and get_sr, with their respective implementations for all the SoCs
      supported so far.
      
      Fixes: 21faaea1 ("ASoC: sun4i-i2s: Add support for A83T")
      Fixes: 66ecce33 ("ASoC: sun4i-i2s: Add compatibility with A64 codec I2S")
      Signed-off-by: default avatarMaxime Ripard <maxime.ripard@bootlin.com>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      619c15f7
  2. 04 Jun, 2019 4 commits
  3. 03 Jun, 2019 23 commits
  4. 30 May, 2019 8 commits
  5. 29 May, 2019 2 commits
    • Tzung-Bi Shih's avatar
      ASoC: core: use component driver name as component name · b19671d6
      Tzung-Bi Shih authored
      fmt_single_name() uses device name to determine component name.  If
      multiple components bind to the same device, the debugfs creation in
      soc_init_component_debugfs() would fail due to duplicated entity
      names.
      
      Name provided by component driver is unique enough to represent each
      component.  Use component driver name as the component name to avoid
      name duplication.
      Signed-off-by: default avatarTzung-Bi Shih <tzungbi@google.com>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      b19671d6
    • Shengjiu Wang's avatar
      ASoC: cs42xx8: Fix build error with CONFIG_GPIOLIB is not set · 7cda6223
      Shengjiu Wang authored
      config: x86_64-randconfig-x000201921-201921
      compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
      reproduce:
              make ARCH=x86_64
      
      sound/soc/codecs/cs42xx8.c: In function ‘cs42xx8_probe’:
      sound/soc/codecs/cs42xx8.c:472:25: error: implicit declaration of function ‘devm_gpiod_get_optional’; did you mean ‘devm_clk_get_optional’? [-Werror=implicit-function-declaration]
        cs42xx8->gpiod_reset = devm_gpiod_get_optional(dev, "reset",
                               ^~~~~~~~~~~~~~~~~~~~~~~
                               devm_clk_get_optional
      sound/soc/codecs/cs42xx8.c:473:8: error: ‘GPIOD_OUT_HIGH’ undeclared (first use in this function); did you mean ‘GPIOF_INIT_HIGH’?
              GPIOD_OUT_HIGH);
              ^~~~~~~~~~~~~~
              GPIOF_INIT_HIGH
      sound/soc/codecs/cs42xx8.c:473:8: note: each undeclared identifier is reported only once for each function it appears in
      sound/soc/codecs/cs42xx8.c:477:2: error: implicit declaration of function ‘gpiod_set_value_cansleep’; did you mean ‘gpio_set_value_cansleep’? [-Werror=implicit-function-declaration]
        gpiod_set_value_cansleep(cs42xx8->gpiod_reset, 0);
        ^~~~~~~~~~~~~~~~~~~~~~~~
        gpio_set_value_cansleep
      
      Fixes: bfe95dfa ("ASoC: cs42xx8: Add reset gpio handling")
      Reported-by: default avatarkbuild test robot <lkp@intel.com>
      Signed-off-by: default avatarShengjiu Wang <shengjiu.wang@nxp.com>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      7cda6223