Skip to content
  1. Aug 23, 2021
    • Takashi Iwai's avatar
      ALSA: hda: Code refactoring snd_hda_pick_fixup() · 73355ddd
      Takashi Iwai authored
      
      
      This contains a slight code refactoring of snd_hda_pick_fixup():
      - Unify the ID setup
      - Unify the debug print message
      - Use snd_pci_quirk_lookup_id() for the codec SSID matching
      
      Mostly for simplifying the code flow but also it makes easier to add
      the codec alias handling in the upcoming patch.
      
      Link: https://lore.kernel.org/r/20210823073722.14873-2-tiwai@suse.de
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      73355ddd
    • Takashi Sakamoto's avatar
      ALSA: firewire-motu: add support for MOTU 896HD · 23c671be
      Takashi Sakamoto authored
      
      
      Mark of the Unicorn (MOTU) shipped 896HD 2003 as one of models in second
      generation of its FireWire series, and already discontinued it. The model
      consists of below ICs:
      
       * Texas Instruments TSB41AB2
       * Phillips Semiconductors PDI1394L40
       * Altera cyclone EP1C3
       * Texas Instruments TMS320VC5402
      
      It supports sampling transmission frequency up to 192.0 kHz. The packet
      format differs depending on both of sampling transfer frequency and enabling
      ADAT channels. The model doesn't support MIDI message transmission.
      
      This commit adds support for it.
      
      $ python3 crpp < /sys/bus/firewire/devices/fw1/config_rom
                     ROM header and bus information block
                     -----------------------------------------------------------------
      400  04101b66  bus_info_length 4, crc_length 16, crc 7014
      404  31333934  bus_name "1394"
      408  20001000  irmc 0, cmc 0, isc 1, bmc 0, cyc_clk_acc 0, max_rec 1 (4)
      40c  0001f200  company_id 0001f2     |
      410  0001dbce  device_id 000001dbce  | EUI-64 0001f2000001dbce
      
                     root directory
                     -----------------------------------------------------------------
      414  0004c65c  directory_length 4, crc 50780
      418  030001f2  vendor
      41c  0c0083c0  node capabilities per IEEE 1394
      420  8d000006  --> eui-64 leaf at 438
      424  d1000001  --> unit directory at 428
      
                     unit directory at 428
                     -----------------------------------------------------------------
      428  0003dcc1  directory_length 3, crc 56513
      42c  120001f2  specifier id
      430  13000005  version
      434  17102800  model
      
                     eui-64 leaf at 438
                     -----------------------------------------------------------------
      438  000264f2  leaf_length 2, crc 25842
      43c  0001f200  company_id 0001f2     |
      440  0001dbce  device_id 000001dbce  | EUI-64 0001f2000001dbce
      
      Signed-off-by: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Link: https://lore.kernel.org/r/20210823085741.33864-1-o-takashi@sakamocchi.jp
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      23c671be
  2. Aug 18, 2021
    • Nathan Chancellor's avatar
      ALSA: hda/analog - Sink ad198x_shutup() and shuffle CONFIG_PM guards · d2d83756
      Nathan Chancellor authored
      When CONFIG_PM is not set, there is an unused function warning:
      
      sound/pci/hda/patch_analog.c:115:13: warning: unused function
      'ad198x_shutup' [-Wunused-function]
      static void ad198x_shutup(struct hda_codec *codec)
                  ^
      1 warning generated.
      
      Sink ad198x_shutup() into ad198x_suspend(), as it is only called in that
      one space. Move the CONFIG_PM guards above ad198x_power_eapd_write() as
      it is only called in ad198x_power_eapd(), which is in turn only called
      in ad198x_power_eapd(). Those two functions are large enough that they
      are left alone.
      
      Fixes: 327b34f2
      
       ("ALSA: hda: Nuke unused reboot_notify callback")
      Signed-off-by: default avatarNathan Chancellor <nathan@kernel.org>
      Link: https://lore.kernel.org/r/20210818012705.311963-2-nathan@kernel.org
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      d2d83756
    • Nathan Chancellor's avatar
      ALSA: hda/sigmatel - Sink stac_shutup() into stac_suspend() · f8b32a6d
      Nathan Chancellor authored
      When CONFIG_PM is not set, there is an unused function warning:
      
      sound/pci/hda/patch_sigmatel.c:4383:13: warning: unused function
      'stac_shutup' [-Wunused-function]
      static void stac_shutup(struct hda_codec *codec)
                  ^
      1 warning generated.
      
      Sink the contents of stac_shutup() into stac_suspend() since
      stac_shutup() is only called in that one location now.
      
      Fixes: 327b34f2
      
       ("ALSA: hda: Nuke unused reboot_notify callback")
      Signed-off-by: default avatarNathan Chancellor <nathan@kernel.org>
      Link: https://lore.kernel.org/r/20210818012705.311963-1-nathan@kernel.org
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      f8b32a6d
  3. Aug 17, 2021
    • Takashi Iwai's avatar
      ALSA: hda: Drop workaround for a hang at shutdown again · 8fc8e903
      Takashi Iwai authored
      The commit 0165c4e1
      
       ("ALSA: hda: Fix hang during shutdown due to
      link reset") modified the shutdown callback of the HD-audio controller
      for working around a hang.  Meanwhile, the actual culprit of the hang
      was identified to be the leftover active codecs that may interfere
      with the powered down controller somehow, but we took a minimal fix
      approach for 5.14, and that was the commit above.
      
      Now, since the codec drivers go runtime-suspend at shutdown for 5.15,
      we can revert the change and make sure that the full runtime-suspend
      is performed at shutdown of HD-audio controller again.  This patch
      essentially reverts the commit above to restore the behavior.
      
      BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=214045
      Link: https://lore.kernel.org/r/20210817075630.7115-1-tiwai@suse.de
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      8fc8e903
    • Takashi Iwai's avatar
      Merge branch 'for-linus' into for-next · c0a7f937
      Takashi Iwai authored
      c0a7f937
    • Takashi Iwai's avatar
      ALSA: hda/via: Apply runtime PM workaround for ASUS B23E · 4bf61ad5
      Takashi Iwai authored
      ASUS B23E requires the same workaround like other machines with
      VT1802, otherwise it looses the codec power on a few nodes and the
      sound kept silence.
      
      Fixes: a0645daf
      
       ("ALSA: HDA: Early Forbid of runtime PM")
      Link: https://lore.kernel.org/r/ac2232f142efcd67fe6ac38897f704f7176bd200.camel@gmail.com
      Cc: <stable@vger.kernel.org>
      Link: https://lore.kernel.org/r/20210817052432.14751-1-tiwai@suse.de
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      4bf61ad5
    • Imre Deak's avatar
      ALSA: hda: Fix hang during shutdown due to link reset · 0165c4e1
      Imre Deak authored
      During system shutdown codecs may be still active, and resetting the
      controller->codec HW link in this state - based on the bug reporter's
      tests - leads to the shutdown sequence to get stuck. This happens at
      least on the reporter's KBL system with an ALC662 codec.
      
      For now fix the issue by skipping the link reset step.
      
      Fixes: 472e18f6
      
       ("ALSA: hda: Release controller display power during shutdown/reboot")
      References: https://bugzilla.kernel.org/show_bug.cgi?id=214045
      References: https://gitlab.freedesktop.org/drm/intel/-/issues/3618#note_1024665
      Reported-and-tested-by: default avatar <youling257@gmail.com>
      Cc: youling257@gmail.com
      Signed-off-by: default avatarImre Deak <imre.deak@intel.com>
      Link: https://lore.kernel.org/r/20210816174259.2759103-1-imre.deak@intel.com
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      0165c4e1
  4. Aug 15, 2021
  5. Aug 14, 2021
    • Takashi Iwai's avatar
      ALSA: hda: Nuke unused reboot_notify callback · 327b34f2
      Takashi Iwai authored
      
      
      As reboot_notify callback is no longer used by the codec core, let's
      get rid of the unused code.  Conexant codec needs a slight code change
      as it used to call the reboot_notify at the codec removal, too.
      
      BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=214045
      Link: https://lore.kernel.org/r/20210813081230.4268-4-tiwai@suse.de
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      327b34f2
    • Takashi Iwai's avatar
      ALSA: hda: Suspend codec at shutdown · b98444ed
      Takashi Iwai authored
      
      
      So far we have a few workarounds at shutdown for each codec,
      e.g. turning off the display power and setting the codec to D3.
      But all those are basically a part of the suspend procedure.
      Moreover, the streams are still active after that call, hence it might
      hit the update on the codec that has been already put to D3.
      
      In this patch, instead of calling each reboot_notify callback, simply
      put the codec into the runtime-suspended state after the manual
      suspend of all PCM streams.  It makes the code and the behavior more
      consistent.
      
      The reboot_notify callback is no longer used after this patch, and
      will be cleaned up later.
      
      BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=214045
      Link: https://lore.kernel.org/r/20210813081230.4268-3-tiwai@suse.de
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      b98444ed
    • Takashi Iwai's avatar
      ALSA: hda: conexant: Turn off EAPD at suspend, too · 95dc85db
      Takashi Iwai authored
      
      
      Conexant codecs have a workaround for the noise at shutdown to turn
      off EAPD, but it wasn't applied at suspend.  In the later patch, we'll
      switch from reboot_notify callback to the general suspend-at-shutdown,
      so let's apply the workaround to the suspend case, too.
      
      BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=214045
      Link: https://lore.kernel.org/r/20210813081230.4268-2-tiwai@suse.de
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      95dc85db
    • Takashi Iwai's avatar
      ALSA: pcm: Add SNDRV_PCM_INFO_EXPLICIT_SYNC flag · 81be1093
      Takashi Iwai authored
      
      
      ALSA PCM core has an optimized way to communicate with user-space for
      its control and status data via mmap on the supported architectures
      like x86.  Depending on the situation, however, we'd rather want to
      enforce user-space notifying the applptr or hwptr change explicitly
      via ioctl.  For example, the upcoming non-contig and non-coherent
      buffer handling would need an explicit sync, and this needs to catch
      the applptr and hwptr changes.  Also, ASoC SOF driver will have the
      SPIB support that has the similar requirement for the explicit control
      of the applptr and hwptr.
      
      This patch adds the new PCM hardware info flag,
      SNDRV_PCM_INFO_EXPLICIT_SYNC.  When this flag is set, PCM core
      disables both the control and the status mmap, which enforces
      user-space to update via SYNC_PTR ioctl.  In that way, drivers can
      catch the applptr and hwptr update and apply the sync operation if
      needed.
      
      Link: https://lore.kernel.org/r/20210812113818.6479-1-tiwai@suse.de
      Link: https://lore.kernel.org/r/20210610205326.1176400-1-pierre-louis.bossart@linux.intel.com
      Link: https://lore.kernel.org/r/20210813082142.5375-1-tiwai@suse.de
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      81be1093
    • Damien Zammit's avatar
      ALSA: usb-audio: Input source control - digidesign mbox · 7ac2246f
      Damien Zammit authored
      
      
      This adds a second mixer control to Digidesign Mbox
      to select between Analog/SPDIF capture.
      
      Users will note that selecting the SPDIF input source
      automatically switches the clock mode to sync to SPDIF,
      which is a feature of the hardware.
      
      (You can change the clock source back to internal if you want
      to capture from spdif but not sync to its clock although this mode
      is probably not recommended).
      
      Unfortunately, starting the stream resets both modes
      to Internally clocked and Analog input mode.
      
      Signed-off-by: default avatarDamien Zammit <damien@zamaudio.com>
      Tested-by: default avatarDamien Zammit <damien@zamaudio.com>
      Link: https://lore.kernel.org/r/20210813113402.11849-1-damien@zamaudio.com
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      7ac2246f
  6. Aug 13, 2021
  7. Aug 12, 2021