1. 22 Jul, 2019 2 commits
    • Chris Wilson's avatar
      ALSA: hda: Flush interrupts on disabling · caa8422d
      Chris Wilson authored
      I was looking at
      
      <4> [241.835158] general protection fault: 0000 [#1] PREEMPT SMP PTI
      <4> [241.835181] CPU: 1 PID: 214 Comm: kworker/1:3 Tainted: G     U            5.2.0-CI-CI_DRM_6509+ #1
      <4> [241.835199] Hardware name: Dell Inc.                 OptiPlex 745                 /0GW726, BIOS 2.3.1  05/21/2007
      <4> [241.835234] Workqueue: events snd_hdac_bus_process_unsol_events [snd_hda_core]
      <4> [241.835256] RIP: 0010:input_handle_event+0x16d/0x5e0
      <4> [241.835270] Code: 48 8b 93 58 01 00 00 8b 52 08 89 50 04 8b 83 f8 06 00 00 48 8b 93 00 07 00 00 8d 70 01 48 8d 04 c2 83 e1 08 89 b3 f8 06 00 00 <66> 89 28 66 44 89 60 02 44 89 68 04 8b 93 f8 06 00 00 0f 84 fd fe
      <4> [241.835304] RSP: 0018:ffffc9000019fda0 EFLAGS: 00010046
      <4> [241.835317] RAX: 6b6b6b6ec6c6c6c3 RBX: ffff8880290fefc8 RCX: 0000000000000000
      <4> [241.835332] RDX: 000000006b6b6b6b RSI: 000000006b6b6b6c RDI: 0000000000000046
      <4> [241.835347] RBP: 0000000000000005 R08: 0000000000000000 R09: 0000000000000001
      <4> [241.835362] R10: ffffc9000019faa0 R11: 0000000000000000 R12: 0000000000000004
      <4> [241.835377] R13: 0000000000000000 R14: ffff8880290ff1d0 R15: 0000000000000293
      <4> [241.835392] FS:  0000000000000000(0000) GS:ffff88803de80000(0000) knlGS:0000000000000000
      <4> [241.835409] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      <4> [241.835422] CR2: 00007ffe9a99e9b7 CR3: 000000002f588000 CR4: 00000000000006e0
      <4> [241.835436] Call Trace:
      <4> [241.835449]  input_event+0x45/0x70
      <4> [241.835464]  snd_jack_report+0xdc/0x100
      <4> [241.835490]  snd_hda_jack_report_sync+0x83/0xc0 [snd_hda_codec]
      <4> [241.835512]  snd_hdac_bus_process_unsol_events+0x5a/0x70 [snd_hda_core]
      <4> [241.835530]  process_one_work+0x245/0x610
      
      which has the hallmarks of a worker queued from interrupt after it was
      supposedly cancelled (note the POISON_FREE), and I could not see where
      the interrupt would be flushed on shutdown so added the likely suspects.
      
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111174Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      caa8422d
    • Christophe JAILLET's avatar
      ALSA: line6: Fix a typo · e4091bdd
      Christophe JAILLET authored
      s/Vairax/Variax/
      Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      e4091bdd
  2. 19 Jul, 2019 1 commit
    • Takashi Iwai's avatar
      ALSA: pcm: Fix refcount_inc() on zero usage · 0e279dce
      Takashi Iwai authored
      The recent rewrite of PCM link lock management introduced the refcount
      in snd_pcm_group object, managed by the kernel refcount_t API.  This
      caused unexpected kernel warnings when the kernel is built with
      CONFIG_REFCOUNT_FULL=y.  As the warning line indicates, the problem is
      obviously that we start with refcount=0 and do refcount_inc() for
      adding each PCM link, while refcount_t API doesn't like refcount_inc()
      performed on zero.
      
      For adapting the proper refcount_t usage, this patch changes the logic
      slightly:
      - The initial refcount is 1, assuming the single list entry
      - The refcount is incremented / decremented at each PCM link addition
        and deletion
      - ... which allows us concentrating only on the refcount as a release
        condition
      
      Fixes: f57f3df0 ("ALSA: pcm: More fine-grained PCM link locking")
      BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=204221Reported-and-tested-by: default avatarDuncan Overbruck <kernel@duncano.de>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      0e279dce
  3. 18 Jul, 2019 2 commits
  4. 16 Jul, 2019 5 commits
    • Takashi Iwai's avatar
      ALSA: hda - Don't resume forcibly i915 HDMI/DP codec · 4914da2f
      Takashi Iwai authored
      We apply the codec resume forcibly at system resume callback for
      updating and syncing the jack detection state that may have changed
      during sleeping.  This is, however, superfluous for the codec like
      Intel HDMI/DP, where the jack detection is managed via the audio
      component notification; i.e. the jack state change shall be reported
      sooner or later from the graphics side at mode change.
      
      This patch changes the codec resume callback to avoid the forcible
      resume conditionally with a new flag, codec->relaxed_resume, for
      reducing the resume time.  The flag is set in the codec probe.
      
      Although this doesn't fix the entire bug mentioned in the bugzilla
      entry below, it's still a good optimization and some improvements are
      seen.
      
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=201901
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      4914da2f
    • Takashi Iwai's avatar
      ALSA: hda/hdmi - Fix i915 reverse port/pin mapping · 3140aafb
      Takashi Iwai authored
      The recent fix for Icelake HDMI codec introduced the mapping from pin
      NID to the i915 gfx port number.  However, it forgot the reverse
      mapping from the port number to the pin NID that is used in the ELD
      notifier callback.  As a result, it's processed to a wrong widget and
      gives a warning like
        snd_hda_codec_hdmi hdaudioC0D2: HDMI: pin nid 5 not registered
      
      This patch corrects it with a proper reverse mapping function.
      
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=204133
      Fixes: b0d8bc50 ("ALSA: hda: hdmi - add Icelake support")
      Reviewed-by: default avatarKai Vehmanen <kai.vehmanen@linux.intel.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      3140aafb
    • Takashi Iwai's avatar
      ALSA: hda/hdmi - Remove duplicated define · eb417711
      Takashi Iwai authored
      INTEL_GET_VENDOR_VERB is defined twice identically.
      Let's remove a superfluous line.
      
      Fixes: b0d8bc50 ("ALSA: hda: hdmi - add Icelake support")
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      eb417711
    • Takashi Iwai's avatar
      ALSA: seq: Break too long mutex context in the write loop · ede34f39
      Takashi Iwai authored
      The fix for the racy writes and ioctls to sequencer widened the
      application of client->ioctl_mutex to the whole write loop.  Although
      it does unlock/relock for the lengthy operation like the event dup,
      the loop keeps the ioctl_mutex for the whole time in other
      situations.  This may take quite long time if the user-space would
      give a huge buffer, and this is a likely cause of some weird behavior
      spotted by syzcaller fuzzer.
      
      This patch puts a simple workaround, just adding a mutex break in the
      loop when a large number of events have been processed.  This
      shouldn't hit any performance drop because the threshold is set high
      enough for usual operations.
      
      Fixes: 7bd80091 ("ALSA: seq: More protection for concurrent write and ioctl races")
      Reported-by: syzbot+97aae04ce27e39cbfca9@syzkaller.appspotmail.com
      Reported-by: syzbot+4c595632b98bb8ffcc66@syzkaller.appspotmail.com
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      ede34f39
    • Hui Wang's avatar
      ALSA: hda/realtek: apply ALC891 headset fixup to one Dell machine · 4b4e0e32
      Hui Wang authored
      Without this patch, the headset-mic and headphone-mic don't work.
      
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarHui Wang <hui.wang@canonical.com>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      4b4e0e32
  5. 15 Jul, 2019 4 commits
  6. 10 Jul, 2019 2 commits
  7. 08 Jul, 2019 8 commits
  8. 07 Jul, 2019 8 commits
    • Takashi Iwai's avatar
      Merge branch 'topic/hda-refresh-cleanup' into for-next · b89b889a
      Takashi Iwai authored
      Merge a cleanup for HD-audio widget refresh code
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      b89b889a
    • Nicola Lunghi's avatar
      ALSA: usb-audio: fix Line6 Helix audio format rates · d4bd3053
      Nicola Lunghi authored
      Line6 Helix and HX stomp devices don't support retrieving
      the number of clock sample rate.
      
      Add a quirk to set it to 48Khz by default.
      
      [ fixed wrong variable initialization changes by tiwai ]
      Signed-off-by: default avatarNicola Lunghi <nick83ola@gmail.com>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      d4bd3053
    • Takashi Sakamoto's avatar
      firewire-motu: fix wrong reference count for stream functionality at error... · ba18ca2b
      Takashi Sakamoto authored
      firewire-motu: fix wrong reference count for stream functionality at error path of rawmidi interface
      
      In IEC 61883-6, several types of sampling data can be multiplexed into
      payload of common isochronous packet (CIP). For typical audio and music
      units, PCM samples and MIDI messages are multiplexed into one packet
      streaming.
      
      ALSA firewire-motu driver allows applications of rawmidi interface to
      start packet streaming for transmission of MIDI messages. However at
      error path, the reference count of stream functionality is not operated
      correctly. This can brings a bug that packet streaming is not stopped
      when all referrers release the count.
      
      This commit fixes the bug.
      
      Fixes: 8edc56ec ("ALSA: firewire-motu: reserve/release isochronous resources in pcm.hw_params/hw_free callbacks")
      Signed-off-by: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      ba18ca2b
    • Takashi Sakamoto's avatar
      ALSA: firewire-digi00x: fix wrong reference count for stream functionality at... · 64582c56
      Takashi Sakamoto authored
      ALSA: firewire-digi00x: fix wrong reference count for stream functionality at error path of rawmidi interface
      
      In IEC 61883-6, several types of sampling data can be multiplexed into
      payload of common isochronous packet (CIP). For typical audio and music
      units, PCM samples and MIDI messages are multiplexed into one packet
      streaming.
      
      ALSA firewire-digi00x driver allows applications of rawmidi interface to
      start packet streaming for transmission of MIDI messages. However at
      error path, the reference count of stream functionality is not operated
      correctly. This can brings a bug that packet streaming is not stopped
      when all referrers release the count.
      
      This commit fixes the bug.
      
      Fixes: ae8ffbb2 ("ALSA: firewire-digi00x: reserve/release isochronous resources in pcm.hw_params/hw_free callbacks")
      Signed-off-by: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      64582c56
    • Takashi Sakamoto's avatar
      ALSA: dice: fix wrong reference count for stream functionality at error path of rawmidi interface · e79c3f0c
      Takashi Sakamoto authored
      In IEC 61883-6, several types of sampling data can be multiplexed into
      payload of common isochronous packet (CIP). For typical audio and music
      units, PCM samples and MIDI messages are multiplexed into one packet
      streaming.
      
      ALSA dice driver allows applications of rawmidi interface to start
      packet streaming for transmission of MIDI messages. However at error
      path, the reference count of stream functionality is not operated
      correctly. This can brings a bug that packet streaming is not stopped
      when all referrers release the count.
      
      This commit fixes the bug.
      
      Fixes: 3cd2c2d7 ("ALSA: dice: reserve/release isochronous resources in pcm.hw_params/hw_free callbacks")
      Signed-off-by: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      e79c3f0c
    • Takashi Sakamoto's avatar
      ALSA: oxfw: fix wrong reference count for stream functionality at error path of rawmidi interface · 03a954ae
      Takashi Sakamoto authored
      In IEC 61883-6, several types of sampling data can be multiplexed into
      payload of common isochronous packet (CIP). For typical audio and music
      units, PCM samples and MIDI messages are multiplexed into one packet
      streaming.
      
      ALSA oxfw driver allows applications of rawmidi interface to start
      packet streaming for transmission of MIDI messages. However at error
      path, the reference count of stream functionality is not operated
      correctly. This can brings a bug that packet streaming is not stopped
      when all referrers release the count.
      
      This commit fixes the bug.
      
      Fixes: 4f380d00 ("ALSA: oxfw: configure packet format in pcm.hw_params callback")
      Signed-off-by: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      03a954ae
    • Takashi Sakamoto's avatar
      ALSA: fireworks: fix wrong reference count for stream functionality at error... · 2e9f17e3
      Takashi Sakamoto authored
      ALSA: fireworks: fix wrong reference count for stream functionality at error path of rawmidi interface
      
      In IEC 61883-6, several types of sampling data can be multiplexed into
      payload of common isochronous packet (CIP). For typical audio and music
      units, PCM samples and MIDI messages are multiplexed into one packet
      streaming.
      
      ALSA fireworks driver allows applications of rawmidi interface to start
      packet streaming for transmission of MIDI messages. However at error
      path, the reference count of stream functionality is not operated
      correctly. This can brings a bug that packet streaming is not stopped
      when all referrers release the count.
      
      This commit fixes the bug.
      
      Fixes: 3d725066 ("ALSA: fireworks: configure sampling transfer frequency in pcm.hw_params callback")
      Signed-off-by: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      2e9f17e3
    • Takashi Sakamoto's avatar
      ALSA: bebob: fix wrong reference count for stream functionality at error path of rawmidi interface · 097f8ba3
      Takashi Sakamoto authored
      In IEC 61883-6, several types of sampling data can be multiplexed into
      payload of common isochronous packet (CIP). For typical audio and music
      units, PCM samples and MIDI messages are multiplexed into one packet
      streaming.
      
      ALSA bebob driver allows applications of rawmidi interface to start
      packet streaming for transmission of MIDI messages. However at error
      path, the reference count of stream functionality is not operated
      correctly. This can brings a bug that packet streaming is not stopped
      when all referrers release the count.
      
      This commit fixes the bug.
      
      Fixes: ac2888b9 ("ALSA: bebob: configure sampling transfer frequency in pcm.hw_params callback")
      Signed-off-by: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      097f8ba3
  9. 06 Jul, 2019 6 commits
  10. 05 Jul, 2019 2 commits