1. 08 3月, 2018 2 次提交
  2. 06 3月, 2018 4 次提交
  3. 02 3月, 2018 1 次提交
  4. 28 2月, 2018 3 次提交
    • T
      ALSA: x86: Fix potential crash at error path · c77a6edb
      Takashi Iwai 提交于
      When LPE audio driver gets some error at probing, it may lead to a
      crash because of canceling the pending work in hdmi_lpe_audio_free(),
      since some of ports might be still not initialized.
      
      For assuring the proper free of each port, initialize all ports at the
      beginning of the probe.
      
      Fixes: b4eb0d52 ("ALSA: x86: Split snd_intelhad into card and PCM specific structures")
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      c77a6edb
    • T
      ALSA: x86: Fix missing spinlock and mutex initializations · 35014406
      Takashi Iwai 提交于
      The commit change for supporting the multiple ports moved involved
      some code shuffling, and there the initializations of spinlock and
      mutex in snd_intelhad object were dropped mistakenly.
      
      This patch adds the missing initializations again for each port.
      
      Fixes: b4eb0d52 ("ALSA: x86: Split snd_intelhad into card and PCM specific structures")
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      35014406
    • R
      ALSA: control: Fix memory corruption risk in snd_ctl_elem_read · 5a23699a
      Richard Fitzgerald 提交于
      The patch "ALSA: control: code refactoring for ELEM_READ/ELEM_WRITE
      operations" introduced a potential for kernel memory corruption due
      to an incorrect if statement allowing non-readable controls to fall
      through and call the get function. For TLV controls a driver can omit
      SNDRV_CTL_ELEM_ACCESS_READ to ensure that only the TLV get function
      can be called. Instead the normal get() can be invoked unexpectedly
      and as the driver expects that this will only be called for controls
      <= 512 bytes, potentially try to copy >512 bytes into the 512 byte
      return array, so corrupting kernel memory.
      
      The problem is an attempt to refactor the snd_ctl_elem_read function
      to invert the logic so that it conditionally aborted if the control
      is unreadable instead of conditionally executing. But the if statement
      wasn't inverted correctly.
      
      The correct inversion of
      
          if (a && !b)
      
      is
          if (!a || b)
      
      Fixes: becf9e5d ("ALSA: control: code refactoring for ELEM_READ/ELEM_WRITE operations")
      Signed-off-by: NRichard Fitzgerald <rf@opensource.cirrus.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      5a23699a
  5. 26 2月, 2018 1 次提交
    • T
      ALSA: hda - Fix pincfg at resume on Lenovo T470 dock · 71db96dd
      Takashi Iwai 提交于
      We've added a quirk to enable the recent Lenovo dock support, where it
      overwrites the pin configs of NID 0x17 and 19, not only updating the
      pin config cache.  It works right after the boot, but the problem is
      that the pin configs are occasionally cleared when the machine goes to
      PM.  Meanwhile the quirk writes the pin configs only at the pre-probe,
      so this won't be applied any longer.
      
      For addressing that issue, this patch moves the code to overwrite the
      pin configs into HDA_FIXUP_ACT_INIT section so that it's always
      applied at both probe and resume time.
      
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=195161
      Fixes: 61fcf8ec ("ALSA: hda/realtek - Enable Thinkpad Dock device for ALC298 platform")
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      71db96dd
  6. 24 2月, 2018 2 次提交
  7. 22 2月, 2018 1 次提交
    • T
      ALSA: x86: hdmi: Add single_port option for compatible behavior · 7229b12f
      Takashi Iwai 提交于
      The recent support for the multiple PCM devices allowed user to use
      multiple HDMI/DP outputs, but at the same time, the PCM stream
      assignment has been changed, too.  Due to that, the former PCM#0
      (there was only one stream in the past) is likely assigned to a
      different one (e.g. PCM#2), and it ends up with the regression when
      user sticks with the fixed configuration using the device#0.
      
      Although the multiple monitor support shouldn't matter when user
      deploys the backend like PulseAudio that checks the jack detection
      state, the behavior change isn't always acceptable for some users.
      
      As a mitigation, this patch introduces an option to switch the
      behavior back to the old-good-days: when the new option,
      single_port=1, is passed, the driver creates only a single PCM device,
      and it's assigned to the first connected one, like the earlier
      versions did.  The option is turned off as default still to support
      the multiple monitors.
      
      Fixes: 8a2d6ae1 ("ALSA: x86: Register multiple PCM devices for the LPE audio card")
      Reported-and-tested-by: NHubert Mantel <mantel@metadox.de>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      7229b12f
  8. 14 2月, 2018 2 次提交
    • J
      ALSA: hda/realtek: PCI quirk for Fujitsu U7x7 · fdcc968a
      Jan-Marek Glogowski 提交于
      These laptops have a combined jack to attach headsets, the U727 on
      the left, the U757 on the right, but a headsets microphone doesn't
      work. Using hdajacksensetest I found that pin 0x19 changed the
      present state when plugging the headset, in addition to 0x21, but
      didn't have the correct configuration (shown as "Not connected").
      
      So this sets the configuration to the same values as the headphone
      pin 0x21 except for the device type microphone, which makes it
      work correctly. With the patch the configured pins for U727 are
      
      Pin 0x12 (Internal Mic, Mobile-In): present = No
      Pin 0x14 (Internal Speaker): present = No
      Pin 0x19 (Black Mic, Left side): present = No
      Pin 0x1d (Internal Aux): present = No
      Pin 0x21 (Black Headphone, Left side): present = No
      Signed-off-by: NJan-Marek Glogowski <glogow@fbihome.de>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      fdcc968a
    • T
      ALSA: seq: Fix racy pool initializations · d15d662e
      Takashi Iwai 提交于
      ALSA sequencer core initializes the event pool on demand by invoking
      snd_seq_pool_init() when the first write happens and the pool is
      empty.  Meanwhile user can reset the pool size manually via ioctl
      concurrently, and this may lead to UAF or out-of-bound accesses since
      the function tries to vmalloc / vfree the buffer.
      
      A simple fix is to just wrap the snd_seq_pool_init() call with the
      recently introduced client->ioctl_mutex; as the calls for
      snd_seq_pool_init() from other side are always protected with this
      mutex, we can avoid the race.
      Reported-by: N范龙飞 <long7573@126.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      d15d662e
  9. 12 2月, 2018 5 次提交
  10. 07 2月, 2018 6 次提交
  11. 26 1月, 2018 7 次提交
  12. 25 1月, 2018 3 次提交
  13. 24 1月, 2018 2 次提交
  14. 23 1月, 2018 1 次提交