Skip to content
  1. Nov 11, 2021
    • Takashi Sakamoto's avatar
      ALSA: fireworks: add support for Loud Onyx 1200f quirk · 0ca37273
      Takashi Sakamoto authored
      
      
      Loud Technologies shipped Onyx 1200f 2008 in its Mackie brand and
      already discontinued. The model uses component of Fireworks board
      module as its communication and DSP function.
      
      The latest firmware (v4.6.0) has a quirk that tx packet includes wrong
      value (0x1f) in its dbs field at middle and higher sampling transfer
      frequency. It brings ALSA fireworks driver discontinuity of data block
      counter.
      
      This commit fixes it by assuming it as a quirk of firmware version
      4.6.0.
      
      $ cd linux-firewire-tools/src
      $ python crpp < /sys/bus/firewire/devices/fw1/config_rom
                     ROM header and bus information block
                     -----------------------------------------------------------------
      400  0404b9ef  bus_info_length 4, crc_length 4, crc 47599
      404  31333934  bus_name "1394"
      408  e064a212  irmc 1, cmc 1, isc 1, bmc 0, pmc 0, cyc_clk_acc 100,
                     max_rec 10 (2048), max_rom 2, gen 1, spd 2 (S400)
      40c  000ff209  company_id 000ff2     |
      410  62550ce0  device_id 0962550ce0  | EUI-64 000ff20962550ce0
      
                     root directory
                     -----------------------------------------------------------------
      414  0008088e  directory_length 8, crc 2190
      418  03000ff2  vendor
      41c  8100000f  --> descriptor leaf at 458
      420  1701200f  model
      424  81000018  --> descriptor leaf at 484
      428  0c008380  node capabilities
      42c  8d000003  --> eui-64 leaf at 438
      430  d1000005  --> unit directory at 444
      434  08000ff2  (immediate value)
      
                     eui-64 leaf at 438
                     -----------------------------------------------------------------
      438  000281ae  leaf_length 2, crc 33198
      43c  000ff209  company_id 000ff2     |
      440  62550ce0  device_id 0962550ce0  | EUI-64 000ff20962550ce0
      
                     unit directory at 444
                     -----------------------------------------------------------------
      444  00045d94  directory_length 4, crc 23956
      448  1200a02d  specifier id: 1394 TA
      44c  13010000  version
      450  1701200f  model
      454  8100000c  --> descriptor leaf at 484
      
                     descriptor leaf at 458
                     -----------------------------------------------------------------
      458  000a199d  leaf_length 10, crc 6557
      45c  00000000  textual descriptor
      460  00000000  minimal ASCII
      464  4d61636b  "Mack"
      468  69650000  "ie"
      46c  00000000
      470  00000000
      474  00000000
      478  00000000
      47c  00000000
      480  00000000
      
                     descriptor leaf at 484
                     -----------------------------------------------------------------
      484  000a0964  leaf_length 10, crc 2404
      488  00000000  textual descriptor
      48c  00000000  minimal ASCII
      490  4f6e7978  "Onyx"
      494  20313230  " 120"
      498  30460000  "0F"
      49c  00000000
      4a0  00000000
      4a4  00000000
      4a8  00000000
      4ac  00000000
      
      Signed-off-by: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Link: https://lore.kernel.org/r/20211111103015.7498-1-o-takashi@sakamocchi.jp
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      0ca37273
    • Kai Vehmanen's avatar
      ALSA: hda: fix general protection fault in azx_runtime_idle · e81478bb
      Kai Vehmanen authored
      
      
      Fix a corner case between PCI device driver remove callback and
      runtime PM idle callback.
      
      Following sequence of events can happen:
        - at azx_create, context is allocated with devm_kzalloc() and
          stored as pci_set_drvdata()
        - user-space requests to unbind audio driver
        - dd.c:__device_release_driver() calls PCI remove
        - pci-driver.c:pci_device_remove() calls the audio
          driver azx_remove() callback and this is completed
        - pci-driver.c:pm_runtime_put_sync() leads to a call
          to rpm_idle() which again calls azx_runtime_idle()
        - the azx context object, as returned by dev_get_drvdata(),
          is no longer valid
        -> access fault in azx_runtime_idle when executing
      	struct snd_card *card = dev_get_drvdata(dev);
      	chip = card->private_data;
      	if (chip->disabled || hda->init_failed)
      
      This was discovered by i915_module_load test with 5.15.0 based
      linux-next tree.
      
      Example log caught by i915_module_load test with linux-next
      https://intel-gfx-ci.01.org/tree/linux-next/
      
      <4> [264.038232] general protection fault, probably for non-canonical address 0x6b6b6b6b6b6b73f0: 0000 [#1] PREEMPT SMP NOPTI
      <4> [264.038248] CPU: 0 PID: 5374 Comm: i915_module_loa Not tainted 5.15.0-next-20211109-gc8109c2ba35e-next-20211109 #1
      [...]
      <4> [264.038267] RIP: 0010:azx_runtime_idle+0x12/0x60 [snd_hda_intel]
      [...]
      <4> [264.038355] Call Trace:
      <4> [264.038359]  <TASK>
      <4> [264.038362]  __rpm_callback+0x3d/0x110
      <4> [264.038371]  rpm_idle+0x27f/0x380
      <4> [264.038376]  __pm_runtime_idle+0x3b/0x100
      <4> [264.038382]  pci_device_remove+0x6d/0xa0
      <4> [264.038388]  device_release_driver_internal+0xef/0x1e0
      <4> [264.038395]  unbind_store+0xeb/0x120
      <4> [264.038400]  kernfs_fop_write_iter+0x11a/0x1c0
      
      Fix the issue by setting drvdata to NULL at end of azx_remove().
      
      Signed-off-by: default avatarKai Vehmanen <kai.vehmanen@linux.intel.com>
      Link: https://lore.kernel.org/r/20211110210307.1172004-1-kai.vehmanen@linux.intel.com
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      e81478bb
    • Takashi Iwai's avatar
      ALSA: hda: Free card instance properly at probe errors · 39173303
      Takashi Iwai authored
      The recent change in hda-intel driver to allow repeated probes
      surfaced a problem that has been hidden until; the probe process in
      the work calls azx_free() at the error path, and this skips the card
      free process that eventually releases codec instances.  As a result,
      we get a kernel WARNING like:
      
        snd_hda_intel 0000:00:1f.3: Cannot probe codecs, giving up
        ------------[ cut here ]------------
        WARNING: CPU: 14 PID: 186 at sound/hda/hdac_bus.c:73
        ....
      
      For fixing this, we need to call snd_card_free() instead of
      azx_free().  Additionally, the device drvdata has to be cleared, as
      the driver binding itself is still active.  Then the PM and other
      driver callbacks will ignore the procedure.
      
      Fixes: c0f1886d
      
       ("ALSA: hda: intel: Allow repeatedly probing on codec configuration errors")
      Reported-and-tested-by: default avatarScott Branden <scott.branden@broadcom.com>
      Cc: <stable@vger.kernel.org>
      Link: https://lore.kernel.org/r/063e2397-7edb-5f48-7b0d-618b938d9dd8@broadcom.com
      Link: https://lore.kernel.org/r/20211110194633.19098-1-tiwai@suse.de
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      39173303
  2. Nov 10, 2021
  3. Nov 09, 2021
  4. Nov 08, 2021
    • Takashi Iwai's avatar
      ALSA: pci: rme: Fix unaligned buffer addresses · 43d35ccc
      Takashi Iwai authored
      The recent fix for setting up the DMA buffer type on RME drivers tried
      to address the non-standard memory managements and changed the DMA
      buffer information to the standard snd_dma_buffer object that is
      allocated at the probe time.  However, I overlooked that the RME
      drivers handle the buffer addresses based on 64k alignment, and the
      previous conversion broke that silently.
      
      This patch is an attempt to fix the regression.  The snd_dma_buffer
      objects are copied to the original data with the correction to the
      aligned accesses, and those are passed to snd_pcm_set_runtime_buffer()
      helpers instead.  The original snd_dma_buffer objects are managed by
      devres, hence they'll be released automagically.
      
      Fixes: 0899a7a2
      
       ("ALSA: pci: rme: Set up buffer type properly")
      Cc: <stable@vger.kernel.org>
      Link: https://lore.kernel.org/r/20211108145752.30572-1-tiwai@suse.de
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      43d35ccc
    • Takashi Sakamoto's avatar
      ALSA: firewire-motu: add support for MOTU Track 16 · 411ac298
      Takashi Sakamoto authored
      
      
      Mark of the Unicorn designed Track 16 2011 as one of models in third
      generation of its FireWire series. The model is already discontinued.
      It consists of below ICs:
      
       * Texas Instruments TSB41AB1
       * Microchip (SMSC) USB3300
       * Xilinx Spartan-3A FPGA, XC3S700A
       * Texas Instruments TMS320C6722
       * Microchip (Atmel) AT91SAM SAM7S512
      
      It supports sampling transfer frequency up to 192.0 kHz. The packet
      format differs depending on both of current sampling transfer frequency
      and the type of signal in optical interfaces. The model supports
      transmission of PCM frames as well as MIDI messages.
      
      The model supports command mechanism to configure internal DSP. Hardware
      meter information is available in the first 2 chunks of each data block
      of tx packet.
      
      This commit adds support for it.
      
      $ cd linux-firewire-tools/src
      $ python crpp < /sys/bus/firewire/devices/fw1/config_rom
                     ROM header and bus information block
                     -----------------------------------------------------------------
      400  04107d95  bus_info_length 4, crc_length 16, crc 32149
      404  31333934  bus_name "1394"
      408  20ff7000  irmc 0, cmc 0, isc 1, bmc 0, cyc_clk_acc 255, max_rec 7 (256)
      40c  0001f200  company_id 0001f2     |
      410  000a83c4  device_id 00000a83c4  | EUI-64 0001f200000a83c4
      
                     root directory
                     -----------------------------------------------------------------
      414  0004ef04  directory_length 4, crc 61188
      418  030001f2  vendor
      41c  0c0083c0  node capabilities per IEEE 1394
      420  d1000002  --> unit directory at 428
      424  8d000005  --> eui-64 leaf at 438
      
                     unit directory at 428
                     -----------------------------------------------------------------
      428  00035b04  directory_length 3, crc 23300
      42c  120001f2  specifier id
      430  13000039  version
      434  17102800  model
      
                     eui-64 leaf at 438
                     -----------------------------------------------------------------
      438  0002b25f  leaf_length 2, crc 45663
      43c  0001f200  company_id 0001f2     |
      440  000a83c4  device_id 00000a83c4  | EUI-64 0001f200000a83c4
      
      Signed-off-by: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Link: https://lore.kernel.org/r/20211107110644.23511-1-o-takashi@sakamocchi.jp
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      411ac298
    • Takashi Iwai's avatar
      ALSA: PCM: Fix NULL dereference at mmap checks · 8e537d5d
      Takashi Iwai authored
      The recent refactoring of mmap handling caused Oops on some devices
      that don't use the standard memory allocations.  This patch addresses
      it by allowing snd_dma_buffer_mmap() helper to receive the NULL
      pointer dmab argument (and return an error appropriately).
      
      Fixes: a202bd1a
      
       ("ALSA: core: Move mmap handler into memalloc ops")
      Cc: <stable@vger.kernel.org>
      Link: https://lore.kernel.org/r/20211107163911.13534-1-tiwai@suse.de
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      8e537d5d
  5. Nov 07, 2021
    • Takashi Iwai's avatar
      ALSA: hda/realtek: Add quirk for ASUS UX550VE · 4fad4fb9
      Takashi Iwai authored
      
      
      ASUS UX550VE (SSID 1043:1970) requires a similar workaround for
      managing the routing of the 4 speakers like some other ASUS models.
      Add a corresponding quirk entry for fixing it.
      
      BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=212641
      Cc: <stable@vger.kernel.org>
      Link: https://lore.kernel.org/r/20211107083339.18013-1-tiwai@suse.de
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      4fad4fb9
  6. Nov 05, 2021
  7. Nov 04, 2021
    • Takashi Sakamoto's avatar
      ALSA: firewire-motu: add support for MOTU Traveler mk3 · bf868be7
      Takashi Sakamoto authored
      
      
      Mark of the Unicorn (MOTU) shipped Traveler mk3 as one of models in third
      generation of its FireWire series, and discontinued it already. The model
      consists of below ICs:
      
       * Texas Instruments TSB41AB2
       * Phillips Semiconductors PDI1394L40
       * Altera cyclone EP1C3
       * Texas Instruments TMS320VC5402
      
      It supports sampling transfer frequency up to 192.0 kHz. The packet
      format differs depending on both of current sampling transfer frequency
      and whether to enable ADAT channels in rx/tx packets. The model supports
      transmission of PCM frames as well as MIDI messages.
      
      The model supports command mechanism to configure internal DSP. Hardware
      meter information is available in the first 2 chunks of each data block
      of tx packet.
      
      This commit adds support for it.
      
      $ cd linux-firewire-tools/src
      $ python crpp < /sys/bus/firewire/devices/fw1/config_rom
                     ROM header and bus information block
                     -----------------------------------------------------------------
      400  0410af0a  bus_info_length 4, crc_length 16, crc 44810
      404  31333934  bus_name "1394"
      408  20ff7000  irmc 0, cmc 0, isc 1, bmc 0, cyc_clk_acc 255, max_rec 7 (256)
      40c  0001f200  company_id 0001f2     |
      410  00090911  device_id 0000090911  | EUI-64 0001f20000090911
      
                     root directory
                     -----------------------------------------------------------------
      414  0004ef04  directory_length 4, crc 61188
      418  030001f2  vendor
      41c  0c0083c0  node capabilities per IEEE 1394
      420  d1000002  --> unit directory at 428
      424  8d000005  --> eui-64 leaf at 438
      
                     unit directory at 428
                     -----------------------------------------------------------------
      428  00031733  directory_length 3, crc 5939
      42c  120001f2  specifier id
      430  1300001b  version
      434  17102800  model
      
                     eui-64 leaf at 438
                     -----------------------------------------------------------------
      438  00028484  leaf_length 2, crc 33924
      43c  0001f200  company_id 0001f2     |
      440  00090911  device_id 0000090911  | EUI-64 0001f20000090911
      
      Signed-off-by: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Link: https://lore.kernel.org/r/20211104110627.94469-1-o-takashi@sakamocchi.jp
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      bf868be7
    • Jeremy Soller's avatar
      ALSA: hda/realtek: Headset fixup for Clevo NH77HJQ · 1278cc5a
      Jeremy Soller authored
      
      
      On Clevo NH77HJ, NH77HP, and their 15" variants, there is a headset
      microphone input attached to 0x19 that does not have a jack detect. In
      order to get it working, the pin configuration needs to be set
      correctly, and a new ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE fixup is
      applied. This is similar to the existing System76 quirk for ALC293, but
      for ALC256.
      
      Signed-off-by: default avatarJeremy Soller <jeremy@system76.com>
      Signed-off-by: default avatarTim Crawford <tcrawford@system76.com>
      Cc: <stable@vger.kernel.org>
      Link: https://lore.kernel.org/r/20211102172104.10610-1-tcrawford@system76.com
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      1278cc5a
  8. Nov 03, 2021
    • Wang Wensheng's avatar
      ALSA: timer: Fix use-after-free problem · c0317c0e
      Wang Wensheng authored
      
      
      When the timer instance was add into ack_list but was not currently in
      process, the user could stop it via snd_timer_stop1() without delete it
      from the ack_list. Then the user could free the timer instance and when
      it was actually processed UAF occurred.
      
      This issue could be reproduced via testcase snd_timer01 in ltp - running
      several instances of that testcase at the same time.
      
      What I actually met was that the ack_list of the timer broken and the
      kernel went into deadloop with irqoff. That could be detected by
      hardlockup detector on board or when we run it on qemu, we could use gdb
      to dump the ack_list when the console has no response.
      
      To fix this issue, we delete the timer instance from ack_list and
      active_list unconditionally in snd_timer_stop1().
      
      Signed-off-by: default avatarWang Wensheng <wangwensheng4@huawei.com>
      Suggested-by: default avatarTakashi Iwai <tiwai@suse.de>
      Cc: <stable@vger.kernel.org>
      Link: https://lore.kernel.org/r/20211103033517.80531-1-wangwensheng4@huawei.com
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      c0317c0e
    • Takashi Iwai's avatar
      ALSA: usb-audio: Add quirk for Audient iD14 · df0380b9
      Takashi Iwai authored
      
      
      Audient iD14 (2708:0002) may get a control message error that
      interferes the operation e.g. with alsactl.  Add the quirk to ignore
      such errors like other devices.
      
      BugLink: https://bugzilla.suse.com/show_bug.cgi?id=1191247
      Cc: <stable@vger.kernel.org>
      Link: https://lore.kernel.org/r/20211102161859.19301-1-tiwai@suse.de
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      df0380b9
  9. Nov 02, 2021
  10. Nov 01, 2021
    • Takashi Iwai's avatar
      Merge tag 'asoc-v5.16' of... · a0292f3e
      Takashi Iwai authored
      Merge tag 'asoc-v5.16' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
      
      ASoC: Updates for v5.16
      
      This is an unusually large set of updates, mostly a large crop of
      unusually big drivers coupled with extensive overhauls of existing code.
      There's a SH change here for the DAI format terminology, the change is
      straightforward and the SH maintainers don't seem very active.
      
       - A new version of the audio graph card which supports a wider range of
         systems.
       - Move of the Cirrus DSP framework into drivers/firmware to allow for
         future use by non-audio DSPs.
       - Several conversions to YAML DT bindings.
       - Continuing cleanups to the SOF and Intel code.
       - A very big overhaul of the cs42l42 driver, correcting many problems.
       - Support for AMD Vangogh and Yelow Cap, Cirrus CS35L41, Maxim
         MAX98520 and MAX98360A, Mediatek MT8195, Nuvoton NAU8821, nVidia
         Tegra210, NXP i.MX8ULP, Qualcomm AudioReach, Realtek ALC5682I-VS,
         RT5682S, and RT9120 and Rockchip RV1126 and RK3568
      a0292f3e
    • Jason Ormes's avatar
      ALSA: usb-audio: Line6 HX-Stomp XL USB_ID for 48k-fixed quirk · 8f27b689
      Jason Ormes authored
      
      
      Adding the Line6 HX-Stomp XL USB_ID as it needs this fixed frequency
      quirk as well.
      
      The device is basically just the HX-Stomp with some more buttons on
      the face.  I've done some recording with it after adding it, and it
      seems to function properly with this fix.  The Midi features appear to
      be working as well.
      
      [ a coding style fix and patch reformat by tiwai ]
      
      Signed-off-by: default avatarJason Ormes <skryking@gmail.com>
      Cc: <stable@vger.kernel.org>
      Link: https://lore.kernel.org/r/20211030200405.1358678-1-skryking@gmail.com
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      8f27b689
    • Alexander Tsoy's avatar
      ALSA: usb-audio: Add registration quirk for JBL Quantum 400 · 763d92ed
      Alexander Tsoy authored
      
      
      Add another device ID for JBL Quantum 400. It requires the same quirk as
      other JBL Quantum devices.
      
      Signed-off-by: default avatarAlexander Tsoy <alexander@tsoy.me>
      Cc: <stable@vger.kernel.org>
      Link: https://lore.kernel.org/r/20211030174308.1011825-1-alexander@tsoy.me
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      763d92ed
    • Takashi Iwai's avatar
      Merge branch 'for-next' into for-linus · 8beea313
      Takashi Iwai authored
      
      
      Merge 5.16-devel branch for upstreaming
      
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      8beea313
  11. Oct 30, 2021
  12. Oct 29, 2021