1. 24 3月, 2018 6 次提交
    • A
      ALSA: usb-audio: update clock valid control · 568fa7e0
      Andrew Chant 提交于
      Make the "clock valid" control a global control instead of a mixer
      so that it doesn't appear in mixer applications.
      
      Additionally, remove the check for writeability prohibited by spec, and
      Use common code to read the control value.
      
      Tested with a UAC2 Audio device that presents a clock validity
      control.  The control still shows up in /proc usbmixer but not
      in alsamixer.
      Signed-off-by: NAndrew Chant <achant@google.com>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      568fa7e0
    • A
      ALSA: usb-audio: UAC2 jack detection · 5a222e84
      Andrew Chant 提交于
      This implements UAC2 jack detection support, presenting
      jack status as a boolean read-only mono mixer.
      
      The presence of any channel in the UAC2_TE_CONNECTOR
      control for a terminal will result in the mixer saying
      the jack is connected.
      
      Mixer naming follows the convention in sound/core/ctljack.c,
      terminating the mixer with " Jack".
      For additional clues as to which jack is being presented,
      the name is prefixed with " - Input Jack" or " - Output Jack"
      depending on if it's an input or output terminal.
      
      This is required because terminal names are ambiguous
      between inputs and outputs and often duplicated -
      Bidirectional terminal types (0x400 -> 0x4FF)
      "... may be used separately for input only or output only.
      These types require two Terminal descriptors. Both have the same type."
      (quote from "USB Device Class Definition for Terminal Types")
      
      Since bidirectional terminal types are common for headphone adapters,
      this distinguishes between two otherwise identically-named
      jack controls.
      
      Tested with a UAC2 audio device with connector control capability.
      Signed-off-by: NAndrew Chant <achant@google.com>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      5a222e84
    • N
      ALSA: usb-audio: Integrate native DSD support for ITF-USB based DACs. · f3b906d7
      Nobutaka Okabe 提交于
      Integrate the native DSD support quirk codes of "ITF-USB DSD" based DACs.
      
      Now, "is_itf_usb_dsd_2alts_dac()" and "is_itf_usb_dsd_3alts_dac()" is
      integrated into one function "is_itf_usb_dsd_dac()".
      So, remove the logic to distinguish UD-501 and UD-501V2 by the
      "Product Name".
      
      The integration is possible by changing the following two functions.
      
      - snd_usb_select_mode_quirk():
      Change the determination condition of the DSD mode switch command,
      from the altset number being used, to the audio format being played.
      Actually, this operation is same as playback using ASIO driver in
      Windows environment.
      
      - snd_usb_interface_dsd_format_quirk():
      To which altset supports native DSD is determined by the number of altsets.
      Previously, it's a constant "2" or "3".
      Signed-off-by: NNobutaka Okabe <nob77413@gmail.com>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      f3b906d7
    • N
      ALSA: usb-audio: FIX native DSD support for TEAC UD-501 DAC · 74dc71f8
      Nobutaka Okabe 提交于
      There are two versions of TEAC UD-501, the normal version and
      the vendor updated version(UD-501V2).
      
      They have the same VID/PID, but the num of the altsetting is different,
      UD-501 has 2 altsets for stream, and UD-501V2 has 3.
      
      So, add the logic to distinguish them by the Product Name, not by the PID.
      Signed-off-by: NNobutaka Okabe <nob77413@gmail.com>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      74dc71f8
    • N
      ALSA: usb-audio: Add native DSD support for Luxman DA-06 · 71426535
      Nobutaka Okabe 提交于
      Add native DSD support quirk for Luxman DA-06 DAC, by adding the
      PID/VID 1852:5065.
      
      Rename "is_marantz_denon_dac()" function to "is_itf_usb_dsd_2alts_dac()"
      to cover broader device family sharing the same USB audio
      implementation(*).
      For the same reason, rename "is_teac_dsd_dac()" function to
      "is_itf_usb_dsd_3alts_dac()".
      
      (*)
      These devices have the same USB controller "ITF-USB DSD", supplied by
      INTERFACE Co., Ltd.
      "ITF-USB DSD" USB controller has two patterns,
      
      Pattern 1. (2 altsets version)
      - Altset 0: for control
      - Altset 1: for stream (S32)
      - Altset 2: for stream (S32, DSD_U32)
      
      Pattern 2. (3 altsets version)
      - Altset 0: for control
      - Altset 1: for stream (S16)
      - Altset 2: for stream (S32)
      - Altset 3: for stream (S32, DSD_U32)
      
      "is_itf_usb_dsd_2alts_dac()" returns true, if the DAC has "Pattern 1"
      USB controller, and "is_itf_usb_dsd_3alts_dac()" returns true, if
      "Pattern2".
      Signed-off-by: NNobutaka Okabe <nob77413@gmail.com>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      71426535
    • N
      ALSA: usb-audio: Add native DSD support for TEAC UD-301 · b0021486
      Nobutaka Okabe 提交于
      Add native DSD support quirk for TEAC UD-301 DAC,
      by adding the PID/VID 0644:804a.
      Signed-off-by: NNobutaka Okabe <nob77413@gmail.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      b0021486
  2. 23 3月, 2018 1 次提交
    • A
      ALSA: usb-audio: fix uac control query argument · 21e9b3e9
      Andrew Chant 提交于
      This patch fixes code readability and should have no functional change.
      
      Correct uac control query functions to account for the 1-based indexing
      of USB Audio Class control identifiers.
      
      The function parameter, u8 control, should be the
      constant defined in audio-v2.h to identify the control to be checked for
      readability or writeability.
      
      This patch fixes all callers that had adjusted, and makes explicit
      the mapping between audio_feature_info[] array index and the associated
      control identifier.
      Signed-off-by: NAndrew Chant <achant@google.com>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      21e9b3e9
  3. 21 3月, 2018 1 次提交
    • R
      ALSA: usb: initial USB Audio Device Class 3.0 support · 9a2fe9b8
      Ruslan Bilovol 提交于
      Recently released USB Audio Class 3.0 specification
      introduces many significant changes comparing to
      previous versions, like
       - new Power Domains, support for LPM/L1
       - new Cluster descriptor
       - changed layout of all class-specific descriptors
       - new High Capability descriptors
       - New class-specific String descriptors
       - new and removed units
       - additional sources for interrupts
       - removed Type II Audio Data Formats
       - ... and many other things (check spec)
      
      It also provides backward compatibility through
      multiple configurations, as well as requires
      mandatory support for BADD (Basic Audio Device
      Definition) on each ADC3.0 compliant device
      
      This patch adds initial support of UAC3 specification
      that is enough for Generic I/O Profile (BAOF, BAIF)
      device support from BADD document.
      Signed-off-by: NRuslan Bilovol <ruslan.bilovol@gmail.com>
      Reviewed-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      9a2fe9b8
  4. 20 3月, 2018 1 次提交
  5. 24 2月, 2018 1 次提交
  6. 12 2月, 2018 4 次提交
  7. 18 1月, 2018 1 次提交
  8. 15 1月, 2018 1 次提交
  9. 29 12月, 2017 2 次提交
  10. 19 12月, 2017 2 次提交
    • T
      ALSA: usb-audio: Proper fallback at get_term_name() · 56a23ee5
      Takashi Iwai 提交于
      get_term_name() calls snd_usb_copy_string_desc() for retrieving the
      name when a specific ID (name field) is given.  When this returns an
      error (zero), however, it simply returns as is.  This will end up in a
      fixed name string in the caller side, which often is meaningless.
      
      For giving a bit more useful name string depending on the terminal
      type, change the get_term_name() function to go through the fallback
      mode.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      56a23ee5
    • T
      ALSA: usb-audio: Fix the missing ctl name suffix at parsing SU · 5a15f289
      Takashi Iwai 提交于
      The commit 89b89d12 ("ALSA: usb-audio: Add check return value for
      usb_string()") added the check of the return value from
      snd_usb_copy_string_desc(), which is correct per se, but it introduced
      a regression.  In the original code, either the "Clock Source",
      "Playback Source" or "Capture Source" suffix is added after the
      terminal string, while the commit changed it to add the suffix only
      when get_term_name() is failing.  It ended up with an incorrect ctl
      name like "PCM" instead of "PCM Capture Source".
      
      Also, even the original code has a similar bug: when the ctl name is
      generated from snd_usb_copy_string_desc() for the given iSelector, it
      also doesn't put the suffix.
      
      This patch addresses these issues: the suffix is added always when no
      static mapping is found.  Also the patch tries to put more comments
      and cleans up the if/else block for better readability in order to
      avoid the same pitfall again.
      
      Fixes: 89b89d12 ("ALSA: usb-audio: Add check return value for usb_string()")
      Reported-and-tested-by: NMauro Santos <registo.mailling@gmail.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      5a15f289
  11. 07 12月, 2017 1 次提交
  12. 04 12月, 2017 2 次提交
    • J
      ALSA: usb-audio: Add check return value for usb_string() · 89b89d12
      Jaejoong Kim 提交于
      snd_usb_copy_string_desc() returns zero if usb_string() fails.
      In case of failure, we need to check the snd_usb_copy_string_desc()'s
      return value and add an exception case
      Signed-off-by: NJaejoong Kim <climbbb.kim@gmail.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      89b89d12
    • J
      ALSA: usb-audio: Fix out-of-bound error · 251552a2
      Jaejoong Kim 提交于
      The snd_usb_copy_string_desc() retrieves the usb string corresponding to
      the index number through the usb_string(). The problem is that the
      usb_string() returns the length of the string (>= 0) when successful, but
      it can also return a negative value about the error case or status of
      usb_control_msg().
      
      If iClockSource is '0' as shown below, usb_string() will returns -EINVAL.
      This will result in '0' being inserted into buf[-22], and the following
      KASAN out-of-bound error message will be output.
      
      AudioControl Interface Descriptor:
        bLength                 8
        bDescriptorType        36
        bDescriptorSubtype     10 (CLOCK_SOURCE)
        bClockID                1
        bmAttributes         0x07 Internal programmable Clock (synced to SOF)
        bmControls           0x07
        Clock Frequency Control (read/write)
        Clock Validity Control (read-only)
        bAssocTerminal          0
        iClockSource            0
      
      To fix it, check usb_string()'return value and bail out.
      
      ==================================================================
      BUG: KASAN: stack-out-of-bounds in parse_audio_unit+0x1327/0x1960 [snd_usb_audio]
      Write of size 1 at addr ffff88007e66735a by task systemd-udevd/18376
      
      CPU: 0 PID: 18376 Comm: systemd-udevd Not tainted 4.13.0+ #3
      Hardware name: LG Electronics                   15N540-RFLGL/White Tip Mountain, BIOS 15N5
      Call Trace:
      dump_stack+0x63/0x8d
      print_address_description+0x70/0x290
      ? parse_audio_unit+0x1327/0x1960 [snd_usb_audio]
      kasan_report+0x265/0x350
      __asan_store1+0x4a/0x50
      parse_audio_unit+0x1327/0x1960 [snd_usb_audio]
      ? save_stack+0xb5/0xd0
      ? save_stack_trace+0x1b/0x20
      ? save_stack+0x46/0xd0
      ? kasan_kmalloc+0xad/0xe0
      ? kmem_cache_alloc_trace+0xff/0x230
      ? snd_usb_create_mixer+0xb0/0x4b0 [snd_usb_audio]
      ? usb_audio_probe+0x4de/0xf40 [snd_usb_audio]
      ? usb_probe_interface+0x1f5/0x440
      ? driver_probe_device+0x3ed/0x660
      ? build_feature_ctl+0xb10/0xb10 [snd_usb_audio]
      ? save_stack_trace+0x1b/0x20
      ? init_object+0x69/0xa0
      ? snd_usb_find_csint_desc+0xa8/0xf0 [snd_usb_audio]
      snd_usb_mixer_controls+0x1dc/0x370 [snd_usb_audio]
      ? build_audio_procunit+0x890/0x890 [snd_usb_audio]
      ? snd_usb_create_mixer+0xb0/0x4b0 [snd_usb_audio]
      ? kmem_cache_alloc_trace+0xff/0x230
      ? usb_ifnum_to_if+0xbd/0xf0
      snd_usb_create_mixer+0x25b/0x4b0 [snd_usb_audio]
      ? snd_usb_create_stream+0x255/0x2c0 [snd_usb_audio]
      usb_audio_probe+0x4de/0xf40 [snd_usb_audio]
      ? snd_usb_autosuspend.part.7+0x30/0x30 [snd_usb_audio]
      ? __pm_runtime_idle+0x90/0x90
      ? kernfs_activate+0xa6/0xc0
      ? usb_match_one_id_intf+0xdc/0x130
      ? __pm_runtime_set_status+0x2d4/0x450
      usb_probe_interface+0x1f5/0x440
      
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NJaejoong Kim <climbbb.kim@gmail.com>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      251552a2
  13. 30 11月, 2017 1 次提交
  14. 29 11月, 2017 1 次提交
  15. 28 11月, 2017 1 次提交
  16. 22 11月, 2017 5 次提交
    • K
      treewide: Remove TIMER_FUNC_TYPE and TIMER_DATA_TYPE casts · 841b86f3
      Kees Cook 提交于
      With all callbacks converted, and the timer callback prototype
      switched over, the TIMER_FUNC_TYPE cast is no longer needed,
      so remove it. Conversion was done with the following scripts:
      
          perl -pi -e 's|\(TIMER_FUNC_TYPE\)||g' \
              $(git grep TIMER_FUNC_TYPE | cut -d: -f1 | sort -u)
      
          perl -pi -e 's|\(TIMER_DATA_TYPE\)||g' \
              $(git grep TIMER_DATA_TYPE | cut -d: -f1 | sort -u)
      
      The now unused macros are also dropped from include/linux/timer.h.
      Signed-off-by: NKees Cook <keescook@chromium.org>
      841b86f3
    • T
      ALSA: usb-audio: Add sanity checks in v2 clock parsers · 0a62d6c9
      Takashi Iwai 提交于
      The helper functions to parse and look for the clock source, selector
      and multiplier unit may return the descriptor with a too short length
      than required, while there is no sanity check in the caller side.
      Add some sanity checks in the parsers, at least, to guarantee the
      given descriptor size, for avoiding the potential crashes.
      
      Fixes: 79f920fb ("ALSA: usb-audio: parse clock topology of UAC2 devices")
      Reported-by: NAndrey Konovalov <andreyknvl@google.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      0a62d6c9
    • T
      ALSA: usb-audio: Fix potential zero-division at parsing FU · 8428a8eb
      Takashi Iwai 提交于
      parse_audio_feature_unit() contains a code dividing potentially with
      zero when a malformed FU descriptor is passed.  Although there is
      already a sanity check, it checks only the value zero, hence it can
      still lead to a zero-division when a value 1 is passed there.
      
      Fix it by correcting the sanity check (and the error message
      thereof).
      
      Fixes: 23caaf19 ("ALSA: usb-mixer: Add support for Audio Class v2.0")
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      8428a8eb
    • T
      ALSA: usb-audio: Fix potential out-of-bound access at parsing SU · f658f17b
      Takashi Iwai 提交于
      The usb-audio driver may trigger an out-of-bound access at parsing a
      malformed selector unit, as it checks the header length only after
      evaluating bNrInPins field, which can be already above the given
      length.  Fix it by adding the length check beforehand.
      
      Fixes: 99fc8645 ("ALSA: usb-mixer: parse descriptors with structs")
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      f658f17b
    • T
      ALSA: usb-audio: Add sanity checks to FE parser · d937cd67
      Takashi Iwai 提交于
      When the usb-audio descriptor contains the malformed feature unit
      description with a too short length, the driver may access
      out-of-bounds.  Add a sanity check of the header size at the beginning
      of parse_audio_feature_unit().
      
      Fixes: 23caaf19 ("ALSA: usb-mixer: Add support for Audio Class v2.0")
      Reported-by: NAndrey Konovalov <andreyknvl@google.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      d937cd67
  17. 17 11月, 2017 1 次提交
  18. 06 11月, 2017 1 次提交
    • T
      ALSA: usx2y: Fix invalid stream URBs · f9a1c372
      Takashi Iwai 提交于
      The us122l driver creates URBs per the fixed endpoints, and this may
      end up with URBs with inconsistent pipes when a fuzzer or a malicious
      program deals with the manipulated endpoints.  It ends up with a
      kernel warning like:
      
        usb 1-1: BOGUS urb xfer, pipe 0 != type 3
        ------------[ cut here ]------------
        WARNING: CPU: 0 PID: 24 at drivers/usb/core/urb.c:471
        usb_submit_urb+0x113e/0x1400
        Call Trace:
         usb_stream_start+0x48a/0x9f0 sound/usb/usx2y/usb_stream.c:690
         us122l_start+0x116/0x290 sound/usb/usx2y/us122l.c:365
         us122l_create_card sound/usb/usx2y/us122l.c:502
         us122l_usb_probe sound/usb/usx2y/us122l.c:588
         ....
      
      For avoiding the bad access, this patch adds a few sanity checks of
      the validity of created URBs like previous similar fixes using the new
      usb_urb_ep_type_check() helper function.
      Reported-by: NAndrey Konovalov <andreyknvl@google.com>
      Tested-by: NAndrey Konovalov <andreyknvl@google.com>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      f9a1c372
  19. 02 11月, 2017 2 次提交
    • 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
    • J
      ALSA: usb-audio: support new Amanero Combo384 firmware version · f5ce8179
      Jussi Laako 提交于
      Support DSD_U32_BE sample format on new Amanero Combo384 firmware
      version on older VID/PID.
      
      Fixes: 3eff682d ("ALSA: usb-audio: Support both DSD LE/BE Amanero firmware versions")
      Signed-off-by: NJussi Laako <jussi@sonarnerd.net>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      f5ce8179
  20. 25 10月, 2017 1 次提交
    • M
      locking/atomics: COCCINELLE/treewide: Convert trivial ACCESS_ONCE() patterns... · 6aa7de05
      Mark Rutland 提交于
      locking/atomics: COCCINELLE/treewide: Convert trivial ACCESS_ONCE() patterns to READ_ONCE()/WRITE_ONCE()
      
      Please do not apply this to mainline directly, instead please re-run the
      coccinelle script shown below and apply its output.
      
      For several reasons, it is desirable to use {READ,WRITE}_ONCE() in
      preference to ACCESS_ONCE(), and new code is expected to use one of the
      former. So far, there's been no reason to change most existing uses of
      ACCESS_ONCE(), as these aren't harmful, and changing them results in
      churn.
      
      However, for some features, the read/write distinction is critical to
      correct operation. To distinguish these cases, separate read/write
      accessors must be used. This patch migrates (most) remaining
      ACCESS_ONCE() instances to {READ,WRITE}_ONCE(), using the following
      coccinelle script:
      
      ----
      // Convert trivial ACCESS_ONCE() uses to equivalent READ_ONCE() and
      // WRITE_ONCE()
      
      // $ make coccicheck COCCI=/home/mark/once.cocci SPFLAGS="--include-headers" MODE=patch
      
      virtual patch
      
      @ depends on patch @
      expression E1, E2;
      @@
      
      - ACCESS_ONCE(E1) = E2
      + WRITE_ONCE(E1, E2)
      
      @ depends on patch @
      expression E;
      @@
      
      - ACCESS_ONCE(E)
      + READ_ONCE(E)
      ----
      Signed-off-by: NMark Rutland <mark.rutland@arm.com>
      Signed-off-by: NPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: davem@davemloft.net
      Cc: linux-arch@vger.kernel.org
      Cc: mpe@ellerman.id.au
      Cc: shuah@kernel.org
      Cc: snitzer@redhat.com
      Cc: thor.thayer@linux.intel.com
      Cc: tj@kernel.org
      Cc: viro@zeniv.linux.org.uk
      Cc: will.deacon@arm.com
      Link: http://lkml.kernel.org/r/1508792849-3115-19-git-send-email-paulmck@linux.vnet.ibm.comSigned-off-by: NIngo Molnar <mingo@kernel.org>
      6aa7de05
  21. 17 10月, 2017 1 次提交
  22. 16 10月, 2017 2 次提交
  23. 11 10月, 2017 1 次提交