1. 13 5月, 2018 5 次提交
  2. 02 5月, 2018 1 次提交
  3. 13 10月, 2017 1 次提交
  4. 04 9月, 2017 1 次提交
  5. 01 4月, 2017 1 次提交
  6. 20 3月, 2017 1 次提交
    • M
      ALSA: hda/ca0132: Remove double parentheses · a16fbb85
      Matthias Kaehlcke 提交于
      The extra pairs of parantheses are not needed and causes clang to
      generate warnings like this:
      
      sound/pci/hda/patch_ca0132.c:1171:14: error: equality comparison with extraneous parentheses [-Werror,-Wparentheses-equality]
              if ((buffer == NULL))
                   ~~~~~~~^~~~~~~
      sound/pci/hda/patch_ca0132.c:1171:14: note: remove extraneous parentheses around the comparison to silence this warning
              if ((buffer == NULL))
                  ~       ^      ~
      sound/pci/hda/patch_ca0132.c:1171:14: note: use '=' to turn this equality comparison into an assignment
              if ((buffer == NULL))
      Signed-off-by: NMatthias Kaehlcke <mka@chromium.org>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      a16fbb85
  7. 28 2月, 2017 1 次提交
  8. 12 1月, 2017 1 次提交
    • A
      ALSA: hda/ca0132 - fix possible NULL pointer use · 46a049da
      Arnd Bergmann 提交于
      gcc-7 caught what it considers a NULL pointer dereference:
      
      sound/pci/hda/patch_ca0132.c: In function 'dspio_scp.constprop':
      sound/pci/hda/patch_ca0132.c:1487:4: error: argument 1 null where non-null expected [-Werror=nonnull]
      
      This is plausible from looking at the function, as we compare 'reply'
      to NULL earlier in it. I have not tried to analyze if there are constraints
      that make it impossible to hit the bug, but adding another NULL check in
      the end kills the warning and makes the function more robust.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      46a049da
  9. 25 11月, 2016 1 次提交
  10. 12 9月, 2016 1 次提交
    • J
      ALSA: pci: constify local structures · 071f1344
      Julia Lawall 提交于
      For structure types defined in the same file or local header files, find
      top-level static structure declarations that have the following
      properties:
      1. Never reassigned.
      2. Address never taken
      3. Not passed to a top-level macro call
      4. No pointer or array-typed field passed to a function or stored in a
      variable.
      Declare structures having all of these properties as const.
      
      Done using Coccinelle.
      Based on a suggestion by Joe Perches <joe@perches.com>.
      Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      071f1344
  11. 09 2月, 2016 1 次提交
    • T
      ALSA: hda - Fix bad dereference of jack object · 2ebab40e
      Takashi Iwai 提交于
      The hda_jack_tbl entries are managed by snd_array for allowing
      multiple jacks.  It's good per se, but the problem is that struct
      hda_jack_callback keeps the hda_jack_tbl pointer.  Since snd_array
      doesn't preserve each pointer at resizing the array, we can't keep the
      original pointer but have to deduce the pointer at each time via
      snd_array_entry() instead.  Actually, this resulted in the deference
      to the wrong pointer on codecs that have many pins such as CS4208.
      
      This patch replaces the pointer to the NID value as the search key.
      As an unexpected good side effect, this even simplifies the code, as
      only NID is needed in most cases.
      
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      2ebab40e
  12. 10 12月, 2015 1 次提交
  13. 26 10月, 2015 1 次提交
  14. 20 10月, 2015 1 次提交
    • T
      ALSA: hda - convert to hda_device_id · b9a94a9c
      Takashi Iwai 提交于
      Finally we have a proper infrastructure to generate the modaliases
      automatically, let's move to hda_device_id from the legacy
      hda_codec_preset that contains basically the same information.
      
      The patch function hook is stored in driver_data field, which is long,
      and we need an explicit cast.  Other than that, the conversion is
      mostly straightforward.  Each entry is even simplified using a macro,
      and the lengthy (and error-prone) manual modaliases got removed.
      
      As a result, we achieved a quite good diet:
       14 files changed, 407 insertions(+), 595 deletions(-)
      Reviewed-by: NVinod Koul <vinod.koul@intel.com>
      Tested-by: NSubhransu S Prusty <subhransu.s.prusty@intel.com>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      b9a94a9c
  15. 10 8月, 2015 1 次提交
    • T
      ALSA: hda - Fix pin config and mapping on Alienware 15 · fe14f39e
      Takashi Iwai 提交于
      Alienware 15 has CA0132 codec for its onboard sound, but the pin
      config and mapping seem quite different from other Creative boards.
      This patch corrects them, at least, for providing the right headphone
      and mic jack notification, as well as removing the non-existing SPDIF
      pins.
      
      Even with this fix, not all stuff works perfectly yet, mainly because
      of the badly written ca0132 driver code -- it has too many implicit
      assumptions of pin configs and maps.  Nevertheless, this is a small
      good step forward.
      
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=101981Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      fe14f39e
  16. 29 5月, 2015 1 次提交
  17. 19 5月, 2015 1 次提交
  18. 16 4月, 2015 1 次提交
  19. 08 4月, 2015 1 次提交
    • T
      ALSA: hda - Work around races of power up/down with runtime PM · 664c7155
      Takashi Iwai 提交于
      Currently, snd_hdac_power_up()/down() helpers checks whether the codec
      is being in pm (suspend/resume), and skips the call of runtime get/put
      during it.  This is needed as there are lots of power up/down
      sequences called in the paths that are also used in the PM itself.  An
      example is found in hda_codec.c::codec_exec_verb(), where this can
      power up the codec while it may be called again in its power up
      sequence, too.
      
      The above works in most cases, but sometimes we really want to wait
      for the real power up.  For example, the control element get/put may
      want explicit power up so that the value change is assured to reach to
      the hardware.   Using the current snd_hdac_power_up(), however,
      results in a race, e.g. when it's called during the runtime suspend is
      being performed.  In the worst case, as found in patch_ca0132.c, it
      can even lead to the deadlock because the code assumes the power up
      while it was skipped due to the check above.
      
      For dealing with such cases, this patch makes snd_hdac_power_up() and
      _down() to two variants: with and without in_pm flag check.  The
      version with pm flag check is named as snd_hdac_power_up_pm() while
      the version without pm flag check is still kept as
      snd_hdac_power_up().  (Just because the usage of the former is fewer.)
      
      Then finally, the patch replaces each call potentially done in PM with
      the new _pm() variant.
      
      In theory, we can implement a unified version -- if we can distinguish
      the current context whether it's in the pm path.  But such an
      implementation is cumbersome, so leave the code like this a bit messy
      way for now...
      
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=96271Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      664c7155
  20. 23 3月, 2015 1 次提交
  21. 03 3月, 2015 3 次提交
    • T
      ALSA: hda - Use standard workqueue for unsol and jack events · 2f35c630
      Takashi Iwai 提交于
      The events that are handled by HD-audio drivers are no frequent and
      urgent ones, so we can use the standard workqueue without any problem
      nowadays.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      2f35c630
    • T
      ALSA: hda - Allocate hda_pcm objects dynamically · bbbc7e85
      Takashi Iwai 提交于
      So far, the hda_codec object kept the hda_pcm list in an array, and
      the codec driver was expected to assign the array.  However, this
      makes the object life cycle management harder, because the assigned
      array is freed at the codec driver detach while it might be still
      accessed by the opened streams.
      
      In this patch, we allocate each hda_pcm object dynamically and manage
      it as a linked list.  Each object has a kref refcount, and both the
      codec driver binder and the PCM open/close touches it, so that the
      object won't be freed while in use.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      bbbc7e85
    • T
      ALSA: hda - Add card field to hda_codec struct · 6efdd851
      Takashi Iwai 提交于
      Allow the codec object to have an individual card pointer.  Not only
      this simplifies the redirections in many places, also this will allow
      us to make each codec assigned to a different card object.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      6efdd851
  22. 23 2月, 2015 1 次提交
    • 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
  23. 11 11月, 2014 1 次提交
  24. 16 9月, 2014 1 次提交
  25. 11 9月, 2014 1 次提交
    • T
      ALSA: hda - Get rid of action field from struct hda_jack_tbl · 62f949bf
      Takashi Iwai 提交于
      The action value assigned to each hda_jack_tbl entry is mostly
      superfluous.  The actually used values are either the widget NID or a
      value specific to the callback.
      
      The former case can be simply replaced by a reference to widget NID
      itself.  The only place doing the latter is STAC/IDT codec driver for
      the powermap handling.  But, the code doesn't need to check the action
      field at all -- the function jack_update_power() is called either with
      a specific pin or with NULL.  So the check of jack->action can be
      removed completely there, too.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      62f949bf
  26. 10 8月, 2014 1 次提交
    • T
      ALSA: hda/ca0132 - Don't try loading firmware at resume when already failed · e24aa0a4
      Takashi Iwai 提交于
      CA0132 driver tries to reload the firmware at resume.  Usually this
      works since the firmware loader core caches the firmware contents by
      itself.  However, if the driver failed to load the firmwares
      (e.g. missing files), reloading the firmware at resume goes through
      the actual file loading code path, and triggers a kernel WARNING like:
      
       WARNING: CPU: 10 PID:11371 at drivers/base/firmware_class.c:1105 _request_firmware+0x9ab/0x9d0()
      
      For avoiding this situation, this patch makes CA0132 skipping the f/w
      loading at resume when it failed at probe time.
      Reported-and-tested-by: NJanek Kozicki <cosurgi@gmail.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      e24aa0a4
  27. 25 6月, 2014 1 次提交
  28. 25 2月, 2014 1 次提交
    • T
      ALSA: hda - Replace with standard printk · 4e76a883
      Takashi Iwai 提交于
      Use dev_err() and co for messages from HD-audio controller and codec
      drivers.  The codec drivers are mostly bound with codec objects, so
      some helper macros, codec_err(), codec_info(), etc, are provided.
      They merely wrap the corresponding dev_xxx().
      
      There are a few places still calling snd_printk() and its variants
      as they are called without the codec or device context.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      4e76a883
  29. 19 2月, 2014 2 次提交
  30. 15 2月, 2014 1 次提交
  31. 13 9月, 2013 1 次提交
  32. 28 6月, 2013 1 次提交
  33. 05 4月, 2013 1 次提交