1. 18 12月, 2017 1 次提交
    • K
      ALSA: hda/realtek - Fix Dell AIO LineOut issue · 92266651
      Kailang Yang 提交于
      Dell AIO had LineOut jack.
      Add LineOut verb into this patch.
      
      [ Additional notes:
        the ALC274 codec seems requiring the fixed pin / DAC connections for
        HP / line-out pins for enabling EQ for speakers; i.e. the HP / LO
        pins expect to be connected with NID 0x03 while keeping the speaker
        with NID 0x02.  However, by adding a new line-out pin, the
        auto-parser assigns the NID 0x02 for HP/LO pins as primary outputs.
        As an easy workaround, we provide the preferred_pairs[] to map
        forcibly for these pins. -- tiwai ]
      
      Fixes: 75ee94b2 ("ALSA: hda - fix headset mic problem for Dell machines with alc274")
      Signed-off-by: NKailang Yang <kailang@realtek.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      92266651
  2. 07 12月, 2017 1 次提交
  3. 05 12月, 2017 1 次提交
  4. 29 11月, 2017 2 次提交
  5. 23 11月, 2017 2 次提交
  6. 22 11月, 2017 1 次提交
    • T
      ALSA: hda - Fix yet remaining issue with vmaster 0dB initialization · d6c0615f
      Takashi Iwai 提交于
      The previous fix for addressing the breakage in vmaster slave
      initialization, commit a91d6612 ("ALSA: hda - Fix incorrect TLV
      callback check introduced during set_fs() removal"), introduced a new
      helper to process over each slave kctl.  However, this helper passes
      only the original kctl, not the virtual slave kctl.  As a result,
      HD-audio driver (which is the only user so far) couldn't initialize
      the slave correctly because it's trying to update the value directly
      with the original kctl, not with the mapped kctl.
      
      This patch fixes the situation again by passing both the mapped slaved
      and original slave kctls to the function.  Luckily there is a single
      caller as of now, so changing the call signature is no big matter.
      
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=197959
      Fixes: a91d6612 ("ALSA: hda - Fix incorrect TLV callback check introduced during set_fs() removal")
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      d6c0615f
  7. 20 11月, 2017 1 次提交
  8. 16 11月, 2017 1 次提交
  9. 09 11月, 2017 1 次提交
  10. 06 11月, 2017 1 次提交
  11. 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
  12. 26 10月, 2017 2 次提交
  13. 24 10月, 2017 1 次提交
  14. 20 10月, 2017 1 次提交
  15. 19 10月, 2017 1 次提交
    • T
      ALSA: hda: Avoid racy recreation of widget kobjects · 9780ded3
      Takashi Iwai 提交于
      The refresh of HD-audio widget sysfs kobjects via
      snd_hdac_refresh_widget_sysfs() is slightly racy.
      The driver recreates the whole tree from scratch after deleting the
      whole.  When CONFIG_DEBUG_KOBJECT_RELEASE option is used, kobject
      release doesn't happen immediately but delayed, while the re-creation
      of the same named kobject happens soon after invoking kobject_put().
      This may end up with the conflicts of duplicated kobjects, as found in
      the bug report below.
      
      In this patch, we take another approach to refresh the tree: instead
      of recreating the whole tree, just add the new nodes and delete the
      non-existing nodes.  Since the refresh happens only once at
      initialization, no longer race would happen.
      
      Along with the code change, merge snd_hdac_refresh_widget_sysfs() with
      the existing snd_hdac_refresh_widgets() with an additional bool flag
      for simplifying the code.
      
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=197307Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      9780ded3
  16. 18 10月, 2017 4 次提交
    • T
      ALSA: hda - Add model string for Intel reference board quirk · 28d1d6d2
      Takashi Iwai 提交于
      For allowing user to apply the existing quirk on a machine with a
      different SSID, add a new model string entry, alc700-ref.
      The quirk itself was introduced in the commit b84e8436: "ALSA:
      hda/realtek - Enable jack detection function for Intel ALC700")
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      28d1d6d2
    • T
      ALSA: hda - Fix incorrect TLV callback check introduced during set_fs() removal · a91d6612
      Takashi Iwai 提交于
      The commit 99b5c5bb ("ALSA: hda - Remove the use of set_fs()")
      converted the get_kctl_0dB_offset() call for killing set_fs() usage in
      HD-audio codec code.  The conversion assumed that the TLV callback
      used in HD-audio code is only snd_hda_mixer_amp() and applies the TLV
      calculation locally.
      
      Although this assumption is correct, and all slave kctls are actually
      with that callback, the current code is still utterly buggy; it
      doesn't hit this condition and falls back to the next check.  It's
      because the function gets called after adding slave kctls to vmaster.
      By assigning a slave kctl, the slave kctl object is faked inside
      vmaster code, and the whole kctl ops are overridden.  Thus the
      callback op points to a different value from what we've assumed.
      
      More badly, as reported by the KERNEXEC and UDEREF features of PaX,
      the code flow turns into the unexpected pitfall.  The next fallback
      check is SNDRV_CTL_ELEM_ACCESS_TLV_READ access bit, and this always
      hits for each kctl with TLV.  Then it evaluates the callback function
      pointer wrongly as if it were a TLV array.  Although currently its
      side-effect is fairly limited, this incorrect reference may lead to an
      unpleasant result.
      
      For addressing the regression, this patch introduces a new helper to
      vmaster code, snd_ctl_apply_vmaster_slaves().  This works similarly
      like the existing map_slaves() in hda_codec.c: it loops over the slave
      list of the given master, and applies the given function to each
      slave.  Then the initializer function receives the right kctl object
      and we can compare the correct pointer instead of the faked one.
      
      Also, for catching the similar breakage in future, give an error
      message when the unexpected TLV callback is found and bail out
      immediately.
      
      Fixes: 99b5c5bb ("ALSA: hda - Remove the use of set_fs()")
      Reported-by: NPaX Team <pageexec@freemail.hu>
      Cc: <stable@vger.kernel.org> # v4.13
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      a91d6612
    • T
      ALSA: hda: Remove superfluous '-' added by printk conversion · 6bf88a34
      Takashi Iwai 提交于
      While converting the error messages to the standard macros in the
      commit 4e76a883 ("ALSA: hda - Replace with standard printk"), a
      superfluous '-' slipped in the code mistakenly.  Its influence is
      almost negligible, merely shows a dB value as negative integer instead
      of positive integer (or vice versa) in the rare error message.
      So let's kill this embarrassing byte to show more correct value.
      
      Fixes: 4e76a883 ("ALSA: hda - Replace with standard printk")
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      6bf88a34
    • C
      ALSA: emu10k1: remove redundant assignment to tmp · d368478b
      Colin Ian King 提交于
      The assignment to variable tmp is redundant as the value is never
      read and a new value is assigned to tmp in the following for-loop,
      so remove the assignment.
      Cleans up clang warning: Value stored to 'tmp' is never read
      Signed-off-by: NColin Ian King <colin.king@canonical.com>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      d368478b
  17. 17 10月, 2017 1 次提交
  18. 16 10月, 2017 2 次提交
  19. 13 10月, 2017 2 次提交
  20. 05 10月, 2017 1 次提交
  21. 02 10月, 2017 1 次提交
    • T
      Revert "ALSA: echoaudio: purge contradictions between dimension matrix members... · 51db452d
      Takashi Sakamoto 提交于
      Revert "ALSA: echoaudio: purge contradictions between dimension matrix members and total number of members"
      
      This reverts commit 275353bb to fix a regression which can abort
      'alsactl' program in alsa-utils due to assertion in alsa-lib.
      
      alsactl: control.c:2513: snd_ctl_elem_value_get_integer: Assertion `idx < sizeof(obj->value.integer.value) / sizeof(obj->value.integer.value[0])' failed.
      
      alsactl: control.c:2976: snd_ctl_elem_value_get_integer: Assertion `idx < ARRAY_SIZE(obj->value.integer.value)' failed.
      
      This commit is a band-aid. In a point of usage of ALSA control interface,
      the drivers still bring an issue that they prevent userspace applications
      to have a consistent way to parse each levels of the dimension information
      via ALSA control interface.
      
      Let me investigate this issue. Current implementation of the drivers
      have three control element sets with dimension information:
       * 'Monitor Mixer Volume' (type: integer)
       * 'VMixer Volume' (type: integer)
       * 'VU-meters' (type: boolean)
      
      Although the number of elements named as 'Monitor Mixer Volume' differs
      depending on drivers in this group, it can be calculated by macros
      defined by each driver (= (BX_NUM - BX_ANALOG_IN) * BX_ANALOG_IN). Each
      of the elements has one member for value and has dimension information
      with 2 levels (= BX_ANALOG_IN * (BX_NUM - BX_ANALOG_IN)). For these
      elements, userspace applications are expected to handle the dimension
      information so that all of the elements construct a matrix where the
      number of rows and columns are represented by the dimension information.
      
      The same way is applied to elements named as 'VMixer Volume'. The number
      of these elements can also be calculated by macros defined by each
      drivers (= PX_ANALOG_IN * BX_ANALOG_IN). Each of the element has one
      member for value and has dimension information with 2 levels
      (= BX_ANALOG_IN * PX_ANALOG_IN). All of the elements construct a matrix
      with the dimension information.
      
      An element named as 'VU-meters' gets a different way in a point of
      dimension information. The element includes 96 members for value. The
      element has dimension information with 3 levels (= 3 or 2 * 16 * 2). For
      this element, userspace applications are expected to handle the dimension
      information so that all of the members for value construct a matrix
      where the number of rows and columns are represented by the dimension
      information. This is different from the way for the former.
      
      As a summary, the drivers were not designed to produce a consistent way to
      parse the dimension information. This makes it hard for general userspace
      applications such as amixer to parse the information by a consistent way,
      and actually no userspace applications except for 'echomixer' utilize the
      dimension information. Additionally, no drivers excluding this group use
      the information.
      
      The reverted commit was written based on the latter way. A commit
      860c1994 ('ALSA: control: add dimension validator for userspace
      elements') is written based on the latter way, too. The patch should be
      reconsider too in the same time to re-define a consistent way to parse the
      dimension information.
      Reported-by: NMark Hills <mark@xwax.org>
      Reported-by: NS. Christian Collins <s.chriscollins@gmail.com>
      Fixes: 275353bb ('ALSA: echoaudio: purge contradictions between dimension matrix members and total number of members')
      Cc: <stable@vger.kernel.org> # v4.8+
      Signed-off-by: NTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      51db452d
  22. 20 9月, 2017 2 次提交
  23. 18 9月, 2017 1 次提交
  24. 07 9月, 2017 6 次提交
  25. 04 9月, 2017 2 次提交