1. 16 2月, 2018 1 次提交
  2. 14 2月, 2018 1 次提交
  3. 18 1月, 2018 2 次提交
  4. 10 8月, 2017 1 次提交
    • B
      ASoC: codecs: add const to snd_soc_codec_driver structures · a180ba45
      Bhumika Goyal 提交于
      Declare snd_soc_codec_driver structures as const as they are only passed
      as an argument to the function snd_soc_register_codec. This argument is
      of type const, so declare the structures with this property as const.
      In file codecs/sn95031.c, snd_soc_codec_driver structure is also used in
      a copy operation along with getting passed to snd_soc_register_codec.
      So, it can be made const too.
      Done using Coccinelle:
      
      @match disable optional_qualifier@
      identifier s;
      position p;
      @@
      static struct snd_soc_codec_driver s@p={...};
      
      @good1@
      identifier match.s;
      position p;
      @@
      snd_soc_register_codec(...,&s@p,...)
      
      @bad@
      identifier match.s;
      position p!={match.p,good1.p};
      @@
      s@p
      
      @depends on !bad disable optional_qualifier@
      identifier match.s;
      @@
      static
      +const
      struct snd_soc_codec_driver s={...};
      Signed-off-by: NBhumika Goyal <bhumirks@gmail.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      a180ba45
  5. 21 7月, 2017 1 次提交
  6. 14 6月, 2017 1 次提交
    • R
      ASoC: sgtl5000: add avc support · a7295267
      Richard Leitner 提交于
      The sgtl5000 features an automatic volume control block (AVC), which
      reduces loud signals and amplifies low level signals for easier
      listening. This patch adds support for this AVC block to the driver.
      
      Apart from the "AVC Switch" control which enables the block following
      controls for the configuration of AVC are added:
      	+ AVC Threshold Volume: threshold where audio is compressed when
      		the measured level is above or expanded when below
      	+ AVC Max Gain Volume: maximum gain which can be applied when
      		the measured audio level is below threshold
      	+ AVC Hard Limiter Switch: when enabled the signal is limited to
      		the programmed threshold.
      	+ AVC Integrator Response: response time of the integrator
      
      The AVC block is enabled and configured using the DAP_AVC_CTRL and
      DAP_AVC_THRESHOLD registers.
      
      Following 2 checkpatch.pl strict checks are ignored because the
      indentation style is different for the struct snd_kcontrol_new
      definition:
      	patch:147: CHECK: Alignment should match open parenthesis
      	patch:150: CHECK: Alignment should match open parenthesis
      Signed-off-by: NRichard Leitner <richard.leitner@skidata.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      a7295267
  7. 11 4月, 2017 1 次提交
  8. 02 9月, 2016 1 次提交
  9. 08 8月, 2016 1 次提交
  10. 12 7月, 2016 1 次提交
  11. 15 6月, 2016 6 次提交
  12. 17 12月, 2015 1 次提交
  13. 01 10月, 2015 1 次提交
  14. 30 9月, 2015 1 次提交
  15. 05 8月, 2015 1 次提交
  16. 15 7月, 2015 1 次提交
  17. 12 5月, 2015 1 次提交
  18. 28 4月, 2015 1 次提交
  19. 27 4月, 2015 2 次提交
  20. 07 3月, 2015 1 次提交
  21. 03 2月, 2015 1 次提交
  22. 30 1月, 2015 1 次提交
  23. 15 1月, 2015 1 次提交
  24. 28 11月, 2014 2 次提交
    • F
      ASoC: sgtl5000: Allow 8kHz playback in codec slave mode · 2a4cfd10
      Fabio Estevam 提交于
      When trying to play a 8kHz file with codec in slave mode we get the following
      error on a mx28evk:
      
      $ aplay -Dhw:0,0 stereo_8k.wav
      Playing WAVE 'stereo_8k.wav' : Signed 16 bit Little Endian, Rate 8000 Hz, Stereo
      [   21.218647] sgtl5000 0-000a: PLL not supported in slave mode
      [   21.224559] sgtl5000 0-000a: 128 ratio is not supported. SYS_MCLK needs to be 256, 384 or 512 * fs
      [   21.233687] sgtl5000 0-000a: ASoC: can't set sgtl5000 hw params: -22
      aplay: set_params:1123: Unable to install hw params:
      
      This error happens because we are using 'sys_fs' instead of 'frame_rate' in the
      valid ratio check.
      
      Use the real'frame_rate' so that the ratio is correctly calculated and the
      playback can run.
      
      sgtl5000 codec manual states that in 'Synchronous SYS_MCLK input' mode that the
      following SYS_CLK frequencies are allowed: 256*fs, 384*fs, 512*fs.
      
      , where fs is the sampling frequency, which can be in the range of:
      8, 11.025, 16, 22.5, 32, 44.1, 48, 96 kHz.
      Signed-off-by: NFabio Estevam <fabio.estevam@freescale.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      2a4cfd10
    • F
      ASoC: sgtl5000: Remove MCLK restriction · d819ce96
      Fabio Estevam 提交于
      According to the sgtl5000 datasheet the MCLK frequency range restriction of
      8 to 27 MHz only applies when the PLL is used - synchronous SYS_MCLK input mode.
      
      When running the codec as slave, the master should generate MCLK in the range of
      256*fs, 384*fs or 512*fs, which is called asynchronous SYS_MCLK input mode.
      
      In asynchronous SYS_MCLK we cannot have the 8 to 27 MHz check because if we
      want to play a 8KHz sample rate track, with a MCLK of 8k * 512 = 4.096MHz the
      current check would return -EINVAL, which is not correct.
      
      Remove the 8 to 27MHz frequency check, since this only applies to the
      synchronous SYS_MCLK input case.
      Signed-off-by: NFabio Estevam <fabio.estevam@freescale.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      d819ce96
  25. 14 11月, 2014 1 次提交
    • F
      ASoC: sgtl5000: Fix SMALL_POP bit definition · c251ea7b
      Fabio Estevam 提交于
      On a mx28evk with a sgtl5000 codec we notice a loud 'click' sound  to happen
      5 seconds after the end of a playback.
      
      The SMALL_POP bit should fix this, but its definition is incorrect:
      according to the sgtl5000 manual it is bit 0 of CHIP_REF_CTRL register, not
      bit 1.
      
      Fix the definition accordingly and enable the bit as intended per the code
      comment.
      
      After applying this change, no loud 'click' sound is heard after playback
      Signed-off-by: NFabio Estevam <fabio.estevam@freescale.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      Cc: stable@vger.kernel.org
      c251ea7b
  26. 28 10月, 2014 1 次提交
  27. 20 10月, 2014 3 次提交
  28. 03 10月, 2014 2 次提交
  29. 06 9月, 2014 1 次提交
    • L
      ASoC: sgtl5000: Cleanup bias level transitions · e649057a
      Lars-Peter Clausen 提交于
      Set the CODEC driver's suspend_bias_off flag rather than manually going to
      SND_SOC_BIAS_OFF in suspend and SND_SOC_BIAS_STANDBY in resume. This makes
      the code a bit shorter and cleaner.
      
      Since the ASoC core now takes care of setting the bias level to
      SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually
      anymore either.
      
      The manual transition to SND_SOC_BIAS_STANDBY at the end of CODEC probe()
      can also be removed as the core will automatically do this after the CODEC
      has been probed.
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      e649057a