1. 28 Aug, 2018 1 commit
  2. 06 Aug, 2018 1 commit
  3. 27 Jun, 2018 1 commit
  4. 28 Feb, 2018 2 commits
    • Takashi Iwai's avatar
      ALSA: x86: Fix potential crash at error path · c77a6edb
      Takashi Iwai authored
      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: default avatarTakashi Iwai <tiwai@suse.de>
    • Takashi Iwai's avatar
      ALSA: x86: Fix missing spinlock and mutex initializations · 35014406
      Takashi Iwai authored
      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: default avatarTakashi Iwai <tiwai@suse.de>
  5. 22 Feb, 2018 1 commit
    • Takashi Iwai's avatar
      ALSA: x86: hdmi: Add single_port option for compatible behavior · 7229b12f
      Takashi Iwai authored
      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: default avatarHubert Mantel <mantel@metadox.de>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
  6. 30 Jun, 2017 1 commit
  7. 15 May, 2017 1 commit
    • Ville Syrjälä's avatar
      drm/i915: Fix runtime PM for LPE audio · 668e3b01
      Ville Syrjälä authored
      Not calling pm_runtime_enable() means that runtime PM can't be
      enabled at all via sysfs. So we definitely need to call it
      from somewhere.
      Calling it from the driver seems like a bad idea because it
      would have to be paired with a pm_runtime_disable() at driver
      unload time, otherwise the core gets upset. Also if there's
      no LPE audio driver loaded then we couldn't runtime suspend
      i915 either.
      So it looks like a better plan is to call it from i915 when
      we register the platform device. That seems to match how
      pci generally does things. I cargo culted the
      pm_runtime_forbid() and pm_runtime_set_active() calls from
      pci as well.
      The exposed runtime PM API is massive an thorougly misleading, so
      I don't actually know if this is how you're supposed to use the API
      or not. But it seems to work. I can now runtime suspend i915 again
      with or without the LPE audio driver loaded, and reloading the
      LPE audio driver also seems to work.
      Note that powertop won't auto-tune runtime PM for platform devices,
      which is a little annoying. So I'm not sure that leaving runtime
      PM in "on" mode by default is the best choice here. But I've left
      it like that for now at least.
      Also remove the comment about there not being much benefit from
      LPE audio runtime PM. Not allowing runtime PM blocks i915 runtime
      PM, which will also block s0ix, and that could have a measurable
      impact on power consumption.
      Cc: stable@vger.kernel.org
      Cc: Takashi Iwai <tiwai@suse.de>
      Cc: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
      Fixes: 0b6b524f ("ALSA: x86: Don't enable runtime PM as default")
      Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/20170427160231.13337-2-ville.syrjala@linux.intel.comReviewed-by: default avatarTakashi Iwai <tiwai@suse.de>
      (cherry picked from commit 183c0035)
      Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
  8. 09 May, 2017 1 commit
  9. 03 May, 2017 9 commits
  10. 21 Mar, 2017 1 commit
    • Takashi Iwai's avatar
      ALSA: x86: Make CONFIG_SND_X86 bool · c6736a94
      Takashi Iwai authored
      CONFIG_SND_X86 is a menu config to filter only for x86-specific
      drivers in its sub-menu, and this doesn't have to be tristate but
      rather it should be a bool.  Also, like other sub-menu configs, it's
      more user-friendly to be default=y; it's merely a menu config and the
      actual drivers are configured in the sub-menu, after all.
      Fixes: 287599cf ("ALSA: add Intel HDMI LPE audio driver for BYT/CHT-T")
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
  11. 21 Feb, 2017 3 commits
    • Arnd Bergmann's avatar
      ALSA: x86: hdmi: select CONFIG_SND_PCM · 4b49f0f7
      Arnd Bergmann authored
      The newly added driver uses the PCM helpers and fails to link if they are disabled:
      sound/built-in.o: In function `hdmi_lpe_audio_runtime_suspend':
      intel_hdmi_audio.c:(.text+0x15906): undefined reference to `snd_pcm_suspend'
      sound/built-in.o: In function `had_pcm_hw_params':
      intel_hdmi_audio.c:(.text+0x15ac7): undefined reference to `snd_pcm_lib_malloc_pages'
      sound/built-in.o: In function `had_pcm_open':
      intel_hdmi_audio.c:(.text+0x15d49): undefined reference to `snd_pcm_hw_constraint_integer'
      This uses a Kconfig 'select' statement to make sure they are enabled.
      Fixes: 5dab11d8 ("ALSA: x86: hdmi: Add audio support for BYT and CHT")
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
    • Takashi Iwai's avatar
      ALSA: x86: Don't enable runtime PM as default · 0b6b524f
      Takashi Iwai authored
      Unlike HSW and newer, BYT/CHT devices have no fine control of audio
      power domain in i915 side.  Since there is little gain by runtime PM
      on BYT/CHT, so far, this commit removes the pm_runtime_enable() call
      as default.
      User who still wants the runtime PM may adjust the corresponding
      sysfs files (power/control and power/autosuspend_delay_ms)
      appropriately, of course.
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
    • Takashi Iwai's avatar
      ALSA: x86: Use runtime PM autosuspend · 3002b9fb
      Takashi Iwai authored
      This patch adds a few lines to the driver to use autosuspend for the
      runtime PM.  It'll become useful with the combination of the keep-link
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
  12. 16 Feb, 2017 8 commits
  13. 13 Feb, 2017 2 commits
    • Takashi Iwai's avatar
      ALSA: x86: Drop unused stream.running field · df42cb49
      Takashi Iwai authored
      The pcm_stream_info.running field is only set in the PCM trigger
      callback but never referred, thus it can be safely removed.
      Also, properly cover the spinlock in both the trigger START and STOP
      to protect had_enable_audio() calls.
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
    • Takashi Iwai's avatar
      ALSA: x86: Handle reset at prepare callback · e2acecf2
      Takashi Iwai authored
      Currently the driver handles some reset procedure at the trigger STOP
      and the underrun functions, where both are executed in the interrupt
      context.  Especially the underrun function has a sync-loop to clear
      the UNDERRUN status bit, and this is supposed to be one of plausible
      causes of GPU hangup.
      Since the job to be done in the interrupt handler should be minimum,
      we move the reset function out of trigger and underrun, and push it
      into the prepare (and hw_free) callbacks instead.  Here a new flag,
      need_reset, is introduced to indicate the requirement of the reset
      procedure.  This is for avoiding the multiple resets when PCM prepare
      is called sequentially.
      Also in the UNDERRUN bit-clear sync loop, take a longer pause to be in
      the safer side.  Taking a longer delay is no longer a problem now
      because we're running in the normal context.
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
  14. 10 Feb, 2017 5 commits
  15. 07 Feb, 2017 3 commits
    • Takashi Iwai's avatar
      ALSA: x86: Cache AUD_CONFIG register value · 40ce4b5d
      Takashi Iwai authored
      At enabling the audio, we modify AUD_CONFIG register bit 0.  So far,
      it does read-modify-write procedure with a special hack for the
      channel bits due to the silicon bug.  But we can optimize it by
      remembering the AUD_CONFIG register value privately.  This simplifies
      the things a lot.
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
    • Takashi Iwai's avatar
      ALSA: x86: Rearrange defines · 77531bee
      Takashi Iwai authored
      We have two header files and everything is mixed up chaotically.
      Move the chip-specific definitions like the hardware registers to
      intel_hdmi_lpe_audio.h, and the rest, the implementation specific
      stuff into intel_hdmi_audio.h.
      In addition, put some more comments to the register fields, and fix
      the incorrect name prefix for AUD_HDMI_STATUS bits, too.
      The whole changes are merely a code shuffling, and there is no
      functional change.
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
    • Arnd Bergmann's avatar
      ALSA: x86: mark hdmi suspend/resume functions as __maybe_unused · 1df98924
      Arnd Bergmann authored
      The two functions are unused when CONFIG_PM_SLEEP is disabled:
      sound/x86/intel_hdmi_audio.c:1633:12: error: 'hdmi_lpe_audio_resume' defined but not used [-Werror=unused-function]
      sound/x86/intel_hdmi_audio.c:1622:12: error: 'hdmi_lpe_audio_suspend' defined but not used [-Werror=unused-function]
      Marking them as __maybe_unused avoids the warning without introducing an
      ugly #ifdef.
      Fixes: 182cdf23 ("ALSA: x86: Implement runtime PM")
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>