1. 21 2月, 2018 11 次提交
  2. 12 2月, 2018 1 次提交
    • F
      ASoC: fsl_ssi: Use 'const _be *' type for iprop · da18bcf7
      Fabio Estevam 提交于
      The 'iprop' variable is passed as an argument to the be32_to_cpup()
      function, which expects a 'const _be *' type.
      
      Change the iprop variable type so that the following build warnings
      with W=1 are gone:
      
      sound/soc/fsl/fsl_ssi.c:1463:48: warning: incorrect type in argument 1 (different base types)
      sound/soc/fsl/fsl_ssi.c:1463:48:    expected restricted __be32 const [usertype] *p
      sound/soc/fsl/fsl_ssi.c:1463:48:    got unsigned int const [usertype] *[assigned] iprop
      Signed-off-by: NFabio Estevam <fabio.estevam@nxp.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      da18bcf7
  3. 08 1月, 2018 1 次提交
  4. 19 12月, 2017 11 次提交
  5. 06 12月, 2017 1 次提交
  6. 05 12月, 2017 2 次提交
  7. 29 11月, 2017 4 次提交
    • M
      ASoC: fsl_ssi: add 20-bit sample format for AC'97 and use it for capture · 10582635
      Maciej S. Szmigiero 提交于
      When testing AC'97 capture on UDOO board (currently the only user of
      fsl_ssi driver in the AC'97 mode) it become obvious that there is a massive
      distortion above certain, small input signal.
      
      This problem has been traced to silicon errata ERR003778:
      "In AC97, 16-bit mode, received data is shifted by 4-bit locations" that
      has "No fix scheduled".
      This errata suggests a workaround of doing a 4-bit shift back in SDMA
      script for this specific operation mode, however our SDMA scripts are
      shared between various SoC peripherals so we can't really modify them.
      
      There is a simple way to avoid this problem, however, that is to disallow
      recording in 16-bit mode and only support it in AC'97-native 20-bit mode.
      We have to use a 4-byte format for this since SSI FIFOs do not allow 3-byte
      accesses (and these aren't supported by imx-sdma driver anyway).
      With this change the capture distortion is gone.
      
      We can also add this format as an additional one supported for playback,
      using this opportunity to make sure that we use CPU-endian-native formats
      in AC'97 mode as we already do in I2S mode.
      
      There is no problem in using different bit widths in playback and capture
      in AC'97 mode so allow this, too.
      Signed-off-by: NMaciej S. Szmigiero <mail@maciej.szmigiero.name>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      10582635
    • N
      ASoC: fsl_asrc: Fix typo in a field define · b89b6925
      Nicolin Chen 提交于
      ASRFSTi_IAEi has an 11-bit offset as its _SHIFT macro defines.
      
      So this patch just fixes that.
      Reported-by: NLaurent Charpentier <laurent.charpentier@nxp.com>
      Signed-off-by: NNicolin Chen <nicoleotsuka@gmail.com>
      Reviewed-by: NFabio Estevam <fabio.estevam@nxp.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      b89b6925
    • M
      ASoC: fsl_ssi: only enable proper channel slots in AC'97 mode · 01ca4851
      Maciej S. Szmigiero 提交于
      We need to make sure that only proper channel slots (in SACCST register)
      are enabled at playback start time since some AC'97 CODECs (like VT1613 on
      UDOO board) were observed requesting via SLOTREQ spurious ones just after
      an AC'97 link is started but before the CODEC is configured by its driver.
      When a bit for some channel slot is set in a SLOTREQ request then SSI sets
      the relevant bit in SACCST automatically, which then 'sticks' until it is
      manually unset.
      The SACCST register is not writable directly, we have to use SACCDIS and
      SACCEN registers to configure it instead (these aren't normal registers:
      writing a '1' bit at some position in SACCEN sets the relevant bit in
      SACCST; SACCDIS operates in a similar way but allows unsetting bits in
      SACCST).
      
      Theoretically, this should be necessary only for the very first playback
      but since some CODECs are so untrustworthy and extra channel slots enabled
      mean ruined playback let's play safe here and make sure that no extra
      slots are enabled in SACCST every time a playback is started.
      Signed-off-by: NMaciej S. Szmigiero <mail@maciej.szmigiero.name>
      Acked-by: NNicolin Chen <nicoleotsuka@gmail.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      01ca4851
    • M
      ASoC: fsl_ssi: call _fsl_ssi_set_dai_fmt() just once in AC'97 mode · c997a92a
      Maciej S. Szmigiero 提交于
      In AC'97 mode we configure and start SSI RX / TX on probe path via
      a call to _fsl_ssi_set_dai_fmt() function.
      We don't need to call this function again later and in fact don't want to
      do it since this function temporarily sets STCR, SRCR and SCR to some
      intermediate values.
      Signed-off-by: NMaciej S. Szmigiero <mail@maciej.szmigiero.name>
      Acked-by: NNicolin Chen <nicoleotsuka@gmail.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      c997a92a
  8. 28 11月, 2017 3 次提交
  9. 02 11月, 2017 1 次提交
    • G
      License cleanup: add SPDX GPL-2.0 license identifier to files with no license · b2441318
      Greg Kroah-Hartman 提交于
      Many source files in the tree are missing licensing information, which
      makes it harder for compliance tools to determine the correct license.
      
      By default all files without license information are under the default
      license of the kernel, which is GPL version 2.
      
      Update the files which contain no license information with the 'GPL-2.0'
      SPDX license identifier.  The SPDX identifier is a legally binding
      shorthand, which can be used instead of the full boiler plate text.
      
      This patch is based on work done by Thomas Gleixner and Kate Stewart and
      Philippe Ombredanne.
      
      How this work was done:
      
      Patches were generated and checked against linux-4.14-rc6 for a subset of
      the use cases:
       - file had no licensing information it it.
       - file was a */uapi/* one with no licensing information in it,
       - file was a */uapi/* one with existing licensing information,
      
      Further patches will be generated in subsequent months to fix up cases
      where non-standard license headers were used, and references to license
      had to be inferred by heuristics based on keywords.
      
      The analysis to determine which SPDX License Identifier to be applied to
      a file was done in a spreadsheet of side by side results from of the
      output of two independent scanners (ScanCode & Windriver) producing SPDX
      tag:value files created by Philippe Ombredanne.  Philippe prepared the
      base worksheet, and did an initial spot review of a few 1000 files.
      
      The 4.13 kernel was the starting point of the analysis with 60,537 files
      assessed.  Kate Stewart did a file by file comparison of the scanner
      results in the spreadsheet to determine which SPDX license identifier(s)
      to be applied to the file. She confirmed any determination that was not
      immediately clear with lawyers working with the Linux Foundation.
      
      Criteria used to select files for SPDX license identifier tagging was:
       - Files considered eligible had to be source code files.
       - Make and config files were included as candidates if they contained >5
         lines of source
       - File already had some variant of a license header in it (even if <5
         lines).
      
      All documentation files were explicitly excluded.
      
      The following heuristics were used to determine which SPDX license
      identifiers to apply.
      
       - when both scanners couldn't find any license traces, file was
         considered to have no license information in it, and the top level
         COPYING file license applied.
      
         For non */uapi/* files that summary was:
      
         SPDX license identifier                            # files
         ---------------------------------------------------|-------
         GPL-2.0                                              11139
      
         and resulted in the first patch in this series.
      
         If that file was a */uapi/* path one, it was "GPL-2.0 WITH
         Linux-syscall-note" otherwise it was "GPL-2.0".  Results of that was:
      
         SPDX license identifier                            # files
         ---------------------------------------------------|-------
         GPL-2.0 WITH Linux-syscall-note                        930
      
         and resulted in the second patch in this series.
      
       - if a file had some form of licensing information in it, and was one
         of the */uapi/* ones, it was denoted with the Linux-syscall-note if
         any GPL family license was found in the file or had no licensing in
         it (per prior point).  Results summary:
      
         SPDX license identifier                            # files
         ---------------------------------------------------|------
         GPL-2.0 WITH Linux-syscall-note                       270
         GPL-2.0+ WITH Linux-syscall-note                      169
         ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause)    21
         ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)    17
         LGPL-2.1+ WITH Linux-syscall-note                      15
         GPL-1.0+ WITH Linux-syscall-note                       14
         ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause)    5
         LGPL-2.0+ WITH Linux-syscall-note                       4
         LGPL-2.1 WITH Linux-syscall-note                        3
         ((GPL-2.0 WITH Linux-syscall-note) OR MIT)              3
         ((GPL-2.0 WITH Linux-syscall-note) AND MIT)             1
      
         and that resulted in the third patch in this series.
      
       - when the two scanners agreed on the detected license(s), that became
         the concluded license(s).
      
       - when there was disagreement between the two scanners (one detected a
         license but the other didn't, or they both detected different
         licenses) a manual inspection of the file occurred.
      
       - In most cases a manual inspection of the information in the file
         resulted in a clear resolution of the license that should apply (and
         which scanner probably needed to revisit its heuristics).
      
       - When it was not immediately clear, the license identifier was
         confirmed with lawyers working with the Linux Foundation.
      
       - If there was any question as to the appropriate license identifier,
         the file was flagged for further research and to be revisited later
         in time.
      
      In total, over 70 hours of logged manual review was done on the
      spreadsheet to determine the SPDX license identifiers to apply to the
      source files by Kate, Philippe, Thomas and, in some cases, confirmation
      by lawyers working with the Linux Foundation.
      
      Kate also obtained a third independent scan of the 4.13 code base from
      FOSSology, and compared selected files where the other two scanners
      disagreed against that SPDX file, to see if there was new insights.  The
      Windriver scanner is based on an older version of FOSSology in part, so
      they are related.
      
      Thomas did random spot checks in about 500 files from the spreadsheets
      for the uapi headers and agreed with SPDX license identifier in the
      files he inspected. For the non-uapi files Thomas did random spot checks
      in about 15000 files.
      
      In initial set of patches against 4.14-rc6, 3 files were found to have
      copy/paste license identifier errors, and have been fixed to reflect the
      correct identifier.
      
      Additionally Philippe spent 10 hours this week doing a detailed manual
      inspection and review of the 12,461 patched files from the initial patch
      version early this week with:
       - a full scancode scan run, collecting the matched texts, detected
         license ids and scores
       - reviewing anything where there was a license detected (about 500+
         files) to ensure that the applied SPDX license was correct
       - reviewing anything where there was no detection but the patch license
         was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied
         SPDX license was correct
      
      This produced a worksheet with 20 files needing minor correction.  This
      worksheet was then exported into 3 different .csv files for the
      different types of files to be modified.
      
      These .csv files were then reviewed by Greg.  Thomas wrote a script to
      parse the csv files and add the proper SPDX tag to the file, in the
      format that the file expected.  This script was further refined by Greg
      based on the output to detect more types of files automatically and to
      distinguish between header and source .c files (which need different
      comment types.)  Finally Greg ran the script using the .csv files to
      generate the patches.
      Reviewed-by: NKate Stewart <kstewart@linuxfoundation.org>
      Reviewed-by: NPhilippe Ombredanne <pombredanne@nexb.com>
      Reviewed-by: NThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      b2441318
  10. 21 9月, 2017 1 次提交
  11. 19 9月, 2017 2 次提交
    • N
      ASoC: fsl-asoc-card: Don't error out if ENOTSUPP · 758a3b01
      Nicolin Chen 提交于
      The snd_soc_component_set_sysclk() and snd_soc_dai_set_tdm_slot()
      in the soc-core.c will return -ENOTSUPP if there is no function
      implementation for them in the dai and component drivers.
      
      So this patch tries to ignore this errno.
      Signed-off-by: NNicolin Chen <nicoleotsuka@gmail.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      758a3b01
    • N
      ASoC: fsl_ssi: Caculate bit clock rate using slot number and width · b0a7043d
      Nicolin Chen 提交于
      The set_sysclk() now is used to override the output bit clock rate.
      But this is not a common way to implement a set_dai_sysclk(). And
      this creates a problem when a general machine driver (simple-card
      for example) tries to do set_dai_sysclk() by passing an input clock
      rate for the baud clock instead of setting the bit clock rate as
      fsl_ssi driver expected.
      
      So this patch solves this problem by firstly removing set_sysclk()
      since the hw_params() can calculate the bit clock rate. Secondly,
      in order not to break those TDM use cases which previously might
      have been using set_sysclk() to override the bit clock rate, this
      patch changes the driver to calculate the bit clock rate using the
      slot number and the slot width from the via set_tdm_slot().
      
      The patch also removes an obsolete comment of the dir parameter.
      Signed-off-by: NNicolin Chen <nicoleotsuka@gmail.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      b0a7043d
  12. 04 9月, 2017 1 次提交
  13. 30 8月, 2017 1 次提交