1. 26 2月, 2015 1 次提交
    • T
      ALSA: hda - Drop power_save value indirection in hda_bus · bb573928
      Takashi Iwai 提交于
      We used to pass the power_save option value to hda_bus via a given
      pointer.  This was needed to refer to the value from the HD-audio core
      side.  However, after the transition to the runtime PM, this is no
      longer needed.
      
      This patch drops the power_save value indirection in hda_bus above,
      and let the controller driver reprograms the autosuspend value
      explicitly by a new helper, snd_hda_set_power_save().  Without this
      call, the HD-audio core doesn't set up the autosuspend and flip the
      runtime PM.  (User may still be able to set up via sysfs, though.)
      
      Along with this change, the pointer argument of azx_bus_create() is
      dropped as well.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      bb573928
  2. 23 2月, 2015 10 次提交
    • T
      ALSA: hda - Use standard runtime PM for codec power-save control · cc72da7d
      Takashi Iwai 提交于
      Like the previous transition of suspend/resume, now move the
      power-save code to the standard runtime PM.  As usual for runtime PM,
      it's a bit tricky, but this simplified codes a lot in the end.
      
      For keeping the usage compatibility, power_save module option still
      controls the whole power-saving behavior on all codecs.  The value is
      translated to pm_runtime_*_autosuspend() and pm_runtime_allow() /
      pm_runtime_forbid() calls.
      
      snd_hda_power_up() and snd_hda_power_down() are translated to
      pm_runtime_get_sync() and pm_runtime_put_autosuspend(), respectively.
      Since we can do call pm_runtime_get_sync() more reliably, the sync
      version is used always and snd_hda_power_up_d3wait() is dropped.
      Another slight difference is that snd_hda_power_up()/down() don't call
      runtime_pm code during the suspend/resume transition phase.  Calling
      them there isn't safe unlike our own code, resulted in unexpected
      behavior (endless wakeups).
      
      The hda_power_count tracepoint was removed, as it doesn't match well
      with the new code.
      
      Last but not least, we need to set ignore_children flag in the parent
      dev.power field so that the runtime PM of the controller chip won't
      get confused.  The notification is still done in the bus pm_notify
      callback.  We'll get rid of this hack in the later patch.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      cc72da7d
    • T
      ALSA: hda - Move codec suspend/resume to codec driver · 59ed1ead
      Takashi Iwai 提交于
      This patch moves the suspend/resume mechanisms down to each codec
      driver level, as we have a proper codec driver bound on the bus now.
      Then we get the asynchronous PM gratis without fiddling much in the
      driver level.
      
      As a soft-landing transition, implement the common suspend/resume pm
      ops for hda_codec_driver and keep the each codec driver intact.  Only
      the callers of suspend/resume in the controller side (azx_suspend()
      and azx_resume()) are removed.
      
      Another involved place is azx_bus_reset() calling the temporary
      suspend and resume as a hackish method of bus reset.  The HD-audio
      core provide a helper function snd_hda_bus_reset() instead.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      59ed1ead
    • T
      ALSA: hda - Bind codecs via standard bus · d8a766a1
      Takashi Iwai 提交于
      Now we create the standard HD-audio bus (/sys/bus/hdaudio), and bind
      the codec driver with the codec device over there.  This is the first
      step of the whole transition so that the changes to each codec driver
      are kept as minimal as possible.
      
      Each codec driver needs to register hda_codec_driver struct containing
      the currently existing preset via the new helper macro
      module_hda_codec_driver().  The old hda_codec_preset_list is replaced
      with this infrastructure.  The generic parsers (for HDMI and other)
      are also included in the preset with the special IDs to bind
      uniquely.
      
      In HD-audio core side, the device binding code is split to
      hda_bind.c.  It provides the snd_hda_bus_type implementation to match
      the codec driver with the given codec vendor ID.  It also manages the
      module auto-loading by itself like before: when the matching isn't
      found, it tries to probe the corresponding codec modules, and finally
      falls back to the generic drivers.  (The special ID mentioned above is
      set at this stage.)
      
      The only visible change to outside is that the hdaudio sysfs entry now
      appears in /sys/bus/devices, not as a sound class device.
      
      More works to move the suspend/resume and remove ops will be
      (hopefully) done in later patches.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      d8a766a1
    • T
      ALSA: hda - Decouple PCM and hwdep devices from codec object · 327ef4f0
      Takashi Iwai 提交于
      This is a preliminary patch for the hda_bus implementation, removing
      the parent device setup to codec device.  Since the bus and the class
      devices can't be crossed over, leave the sound devices to the default
      parent device as is.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      327ef4f0
    • T
      ALSA: fireworks/bebob/dice/oxfw: make it possible to shutdown safely · dec84316
      Takashi Sakamoto 提交于
      A part of these drivers, especially BeBoB driver, are programmed to wait
      some events. Thus the drivers should not destroy any data in .remove()
      context.
      
      This commit moves some destructors from 'struct fw_driver.remove()' to
      'struct snd_card.private_free()' to shutdown safely.
      Signed-off-by: NTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Cc: <stable@vger.kernel.org> # 3.19+
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      dec84316
    • T
      ALSA: fireworks/bebob/dice/oxfw: allow stream destructor after releasing runtime · d23c2cc4
      Takashi Sakamoto 提交于
      Currently stream destructor in each driver has a problem to be called in
      a context in which sound card object is released, because the destructors
      call amdtp_stream_pcm_abort() and touch PCM runtime data.
      
      The PCM runtime data is destroyed in application's context with
      snd_pcm_close(), on the other hand PCM substream data is destroyed after
      sound card object is released, in most case after all of ALSA character
      devices are released. When PCM runtime is destroyed and PCM substream is
      remained, amdtp_stream_pcm_abort() touches PCM runtime data and causes
      Null-pointer-dereference.
      
      This commit changes stream destructors and allows each driver to call
      it after releasing runtime.
      Signed-off-by: NTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Cc: <stable@vger.kernel.org> # 3.19+
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      d23c2cc4
    • T
      ALSA: firewire-lib: remove reference counting · c6f224dc
      Takashi Sakamoto 提交于
      AMDTP helper functions increment/decrement reference counter for an
      instance of FireWire unit, while it's complicated for each driver to
      process error state.
      
      In previous commit, each driver has the role of reference counting. This
      commit removes this role from the helper function.
      Signed-off-by: NTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Cc: <stable@vger.kernel.org> # 3.19+
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      c6f224dc
    • T
      ALSA: fireworks/bebob/dice/oxfw: add reference-counting for FireWire unit · 12ed7192
      Takashi Sakamoto 提交于
      Fireworks and Dice drivers try to touch instances of FireWire unit after
      sound card object is released, while references to the unit is decremented
      in .remove(). When unplugging during streaming, sound card object is
      released after .remove(), thus Fireworks and Dice drivers causes GPF or
      Null-pointer-dereferencing to application processes because an instance of
      FireWire unit was already released.
      
      This commit adds reference-counting for FireWire unit in drivers to allow
      them to touch an instance of FireWire unit after .remove(). In most case,
      any operations after .remove() may be failed safely.
      Signed-off-by: NTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Cc: <stable@vger.kernel.org> # 3.19+
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      12ed7192
    • T
      ALSA: hda - Add pin configs for ASUS mobo with IDT 92HD73XX codec · 6426460e
      Takashi Iwai 提交于
      BIOS doesn't seem to set up pins for 5.1 and the SPDIF out, so we need
      to give explicitly here.
      Reported-and-tested-by: NMisan Thropos <misanthropos@gmx.de>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      6426460e
    • T
      ALSA: firewire-lib: fix an unexpected byte sequence for micro sign · ca5b5050
      Takashi Sakamoto 提交于
      The sign for microsecond (U+0085, MICRO SIGN) was encoded to '0x c2 b5'
      by UTF-8 character encoding scheme. But the byte sequence was converted
      to '0x c3 82 c2 b5' in a previous commit. As a result, the byte
      sequence cannot represent microsecond sign in UTF-8 or ASCII. This
      may confuse developers.
      
      This commit replaces the sign to string expression with 'microseconds'
      to purge superfluous troubles.
      
      Fixes: 5c697e5b("ALSA: firewire-lib: remove rx_blocks_for_midi quirk")
      Signed-off-by: NTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      ca5b5050
  3. 21 2月, 2015 8 次提交
  4. 20 2月, 2015 5 次提交
  5. 18 2月, 2015 1 次提交
  6. 17 2月, 2015 8 次提交
  7. 14 2月, 2015 2 次提交
  8. 13 2月, 2015 1 次提交
  9. 12 2月, 2015 4 次提交
    • T
      ALSA: seq: Drop snd_seq_autoload_lock() and _unlock() · 54a721ab
      Takashi Iwai 提交于
      The autoload lock became already superfluous due to the recent rework
      of autoload code.  Let's drop them now.  This allows us to simplify a
      few codes nicely.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      54a721ab
    • T
      ALSA: seq: Define driver object in each driver · 05662205
      Takashi Iwai 提交于
      This patch moves the driver object initialization and allocation to
      each driver's module init/exit code like other normal drivers.  The
      snd_seq_driver struct is now published in seq_device.h, and each
      driver is responsible to define it with proper driver attributes
      (name, probe and remove) with snd_seq_driver specific attributes as id
      and argsize fields.  The helper functions snd_seq_driver_register(),
      snd_seq_driver_unregister() and module_snd_seq_driver() are used for
      simplifying codes.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      05662205
    • T
      ALSA: seq: Clean up device and driver structs · af03c243
      Takashi Iwai 提交于
      Use const string pointer instead of copying the id string to each
      object.  Also drop the status and list fields of snd_seq_device struct
      that are no longer used.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      af03c243
    • T
      ALSA: seq: Rewrite sequencer device binding with standard bus · 7c37ae5c
      Takashi Iwai 提交于
      We've used the old house-made code for binding the sequencer device
      and driver.  This can be far better implemented with the standard
      bus nowadays.
      
      This patch refactors the whole sequencer binding code with the bus
      /sys/bus/snd_seq.  The devices appear as id-card-device on this bus
      and are bound with the drivers corresponding to the given id like the
      former implementation.  The module autoload is also kept like before.
      
      There is no change in API functions by this patch, and almost all
      transitions are kept inside seq_device.c.  The proc file output will
      change slightly but kept compatible as much as possible.
      
      Further integration works will follow in later patches.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      7c37ae5c