1. 22 12月, 2017 4 次提交
  2. 20 12月, 2017 1 次提交
  3. 19 12月, 2017 3 次提交
    • B
      ASoC: rt5514-spi: only enable wakeup when fully initialized · 20220945
      Brian Norris 提交于
      If an rt5514-spi device is probed but the platform hasn't linked it in,
      we might never fully request the SPI IRQ, nor configure the rt5514 DSP,
      but we still might try to enable the SPI IRQ (enable_irq_wake()). This
      is bad, and among other things, can cause the interrupt to trigger every
      time we try to suspend the system (e.g., because the interrupt trigger
      setting was never set properly).
      
      Instead of setting our wakeup capabilities in the SPI driver probe
      routine, let's wait until we've actually requested the IRQ.
      
      Fixes issues seen on the "kevin" Chromebook (Samsung Chromebook Plus).
      
      Fixes: 58f1c07d ("ASoC: rt5514: Voice wakeup support.")
      Signed-off-by: NBrian Norris <briannorris@chromium.org>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      20220945
    • A
      ASoC: nau8825: fix issue that pop noise when start capture · d070f7c7
      Abhijeet Kumar 提交于
      In skylake platform, we hear a loud pop noise(0 dB) at start of
      audio capture power up sequence. This patch removes the pop noise
      from the recording by adding a delay before enabling ADC.
      Signed-off-by: NAbhijeet Kumar <abhijeet.kumar@intel.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      d070f7c7
    • 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
  4. 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
  5. 14 12月, 2017 2 次提交
    • T
      ALSA: rawmidi: Avoid racy info ioctl via ctl device · c1cfd902
      Takashi Iwai 提交于
      The rawmidi also allows to obtaining the information via ioctl of ctl
      API.  It means that user can issue an ioctl to the rawmidi device even
      when it's being removed as long as the control device is present.
      Although the code has some protection via the global register_mutex,
      its range is limited to the search of the corresponding rawmidi
      object, and the mutex is already unlocked at accessing the rawmidi
      object.  This may lead to a use-after-free.
      
      For avoiding it, this patch widens the application of register_mutex
      to the whole snd_rawmidi_info_select() function.  We have another
      mutex per rawmidi object, but this operation isn't very hot path, so
      it shouldn't matter from the performance POV.
      
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      c1cfd902
    • O
      ASoC: rt5663: Fix the wrong result of the first jack detection · 958d022e
      oder_chiou@realtek.com 提交于
      In the first jack detection while booting, the result will always show as
      headset, even we insert the headphone.
      Signed-off-by: NOder Chiou <oder_chiou@realtek.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      958d022e
  6. 09 12月, 2017 4 次提交
  7. 07 12月, 2017 3 次提交
  8. 06 12月, 2017 2 次提交
  9. 05 12月, 2017 1 次提交
  10. 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
  11. 30 11月, 2017 3 次提交
  12. 29 11月, 2017 2 次提交
  13. 28 11月, 2017 5 次提交
  14. 24 11月, 2017 1 次提交
  15. 23 11月, 2017 2 次提交
  16. 22 11月, 2017 4 次提交
    • B
      ASoC: rt5645: reset RT5645_AD_DA_MIXER at probe · 56986b07
      Bard Liao 提交于
      RT5645_AD_DA_MIXER (0x29) register will not be reset to default after
      SW reset. So we have to write it to its default value in i2c_probe.
      Signed-off-by: NBard Liao <bardliao@realtek.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      56986b07
    • 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
    • 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