17 Sep, 2016

1 commit


09 Aug, 2016

3 commits


03 Aug, 2016

1 commit


25 Jul, 2016

1 commit


17 Jun, 2016

1 commit

  • Call path:

    1) snd_hdac_power_up_pm()
    2) snd_hdac_power_up()
    3) pm_runtime_get_sync()
    4) __pm_runtime_resume()
    5) rpm_resume()

    The rpm_resume() returns 1 when the device is already active.
    Because the return value is unmodified, the hdac regmap read/write
    functions should allow this value for the retry I/O operation, too.

    Signed-off-by: Jaroslav Kysela
    Cc:
    Signed-off-by: Takashi Iwai

    Jaroslav Kysela
     

16 Jun, 2016

1 commit


16 May, 2016

1 commit


13 May, 2016

3 commits


10 May, 2016

1 commit


08 May, 2016

2 commits


29 Apr, 2016

1 commit


27 Apr, 2016

2 commits


26 Apr, 2016

2 commits

  • For taking back the recent change of HDA HDMI fixes for i915 HSW/BDW.

    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • The recent bug report suggests that BCLK setup for i915 HSW/BDW needs
    to be updated at each HDMI hotplug, not only at initialization and
    resume. That is, we need to update HSW_EM4 and HSW_EM5 registers at
    ELD notification, too. Otherwise the HDMI audio may be out of sync
    and played in a wrong pitch.

    However, the HDA codec driver has no access to the controller
    registers, and currently the code managing these registers is in
    hda_intel.c, i.e. local to the controller driver. For allowing the
    explicit BCLK update from the codec driver, as in this patch, the
    former haswell_set_bclk() in hda_intel.c is moved to hdac_i915.c and
    exposed as snd_hdac_i915_set_bclk(). This is called from both the HDA
    controller driver and intel_pin_eld_notify() in HDMI codec driver.

    Along with this change, snd_hdac_get_display_clk() gets dropped as
    it's no longer used.

    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91410
    Cc: # v4.5+
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

21 Apr, 2016

1 commit

  • HD-audio driver uses regmap cache bypass feature for reading a raw
    value without the cache. But this is racy since both the cached and
    the uncached reads may occur concurrently. The former is done via the
    normal control API access while the latter comes from the proc file
    read.

    Even though the regmap itself has the protection against the
    concurrent accesses, the flag set/reset is done without the
    protection, so it may lead to inconsistent state of bypass flag that
    doesn't match with the current read and occasionally result in a
    kernel WARNING like:
    WARNING: CPU: 3 PID: 2731 at drivers/base/regmap/regcache.c:499 regcache_cache_only+0x78/0x93

    One way to work around such a problem is to wrap with a mutex. But in
    this case, the solution is simpler: for the uncached read, we just
    skip the regmap and directly calls its accessor. The verb execution
    there is protected by itself, so basically it's safe to call
    individually.

    Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=116171
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

04 Apr, 2016

3 commits

  • The existing TLV callback implementation copies all of the
    cea_channel_speaker_allocation map table to the TLV container
    irrespective of what is reported by sink. This is of little use
    to the userspace application.

    With this patch, it parses the spk_alloc block as queried from
    the ELD, and copies only the corresponding mapping channel
    allocation entries from the cea channel speaker allocation table.
    Thus the user can parse the TLV container to identify sink's
    capability and set the channel map accordingly.

    It shouldn't impact the behavior in AMD chipset, as this makes
    use of already parsed spk alloc block to calculate the channel
    map.

    Signed-off-by: Subhransu S. Prusty
    Signed-off-by: Vinod Koul
    Signed-off-by: Takashi Iwai

    Subhransu S. Prusty
     
  • Conflicts:
    sound/hda/hdac_i915.c

    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • On Skylake and onwards, the HD-audio controller driver needs to bind
    with i915 for having the control of power well audio domain before
    actually probing the codec. This leads to the load of i915 driver
    from the audio driver side. But, there are systems that have no Intel
    graphics but Nvidia or AMD GPU, although they still use HD-audio bus
    for the onboard audio codecs. On these, loading the i915 driver is
    nothing but a useless memory and CPU consumption.

    A simple way to avoid it is just to look for the Intel graphics PCI
    entry beforehand, and try to bind with i915 only when such an entry is
    found. Currently, it assumes the PCI display class. If another class
    appears, this needs to be extended (although it's very unlikely).

    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

30 Mar, 2016

1 commit


29 Mar, 2016

1 commit

  • The commit [d745f5e7b8b2: ALSA: hda - Add the pin / port mapping on
    Intel ILK and VLV] introduced a WARN_ON() to check the pointer for
    avoiding the double initializations. But hdac_acomp pointer wasn't
    cleared at snd_hdac_i915_exit(), thus after reloading the HD-audio
    driver, it may result in the false positive warning. This patch makes
    sure to clear the leftover pointer at exit.

    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94736
    Reported-by: Daniela Doras-prodan
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

28 Mar, 2016

1 commit

  • Intel IronLake and ValleyView platforms have different HDMI widget pin
    and digital port mapping from other newer ones. The recent ones
    (HSW+) have NID 0x05 to 0x07 for port B to port D, while these chips
    have NID 0x04 to 0x06.

    For adapting this mapping, pass the codec object instead of the bus
    object to snd_hdac_sync_audio_rate() and snd_hdac_acomp_get_eld() so
    that they can check the codec ID and calculate the mapping properly.

    The changes in the HDMI codec driver side will follow in the later
    patch.

    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

16 Mar, 2016

1 commit


10 Mar, 2016

1 commit


08 Mar, 2016

2 commits

  • Takashi Iwai
     
  • HD-audio driver has a mechanism to trigger the runtime resume
    automatically at accessing the verbs. This auto-resume, however,
    causes the mutex deadlock when invoked from the regmap handler since
    the regmap keeps the mutex while auto-resuming. For avoiding that,
    there is some tricky check in the HDA regmap handler to return -EAGAIN
    error to back-off when the codec is powered down. Then the caller of
    regmap r/w will retry after properly turning on the codec power.

    This works in most cases, but there seems a slight race between the
    codec power check and the actual on-demand auto-resume trigger. This
    resulted in the lockdep splat, eventually leading to a real deadlock.

    This patch tries to address the race window by getting the runtime PM
    refcount at the check time using pm_runtime_get_if_in_use(). With
    this call, we can keep the power on only when the codec has been
    already turned on, and back off if not.

    For keeping the code consistency, the code touching the runtime PM is
    stored in hdac_device.c although it's used only locally in
    hdac_regmap.c.

    Reported-by: Jiri Slaby
    Cc:
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

07 Mar, 2016

3 commits


26 Feb, 2016

1 commit

  • Currently the interrupt handler of HD-audio driver assumes that no irq
    update is needed while processing the irq. But in reality, it has
    been confirmed that the HW irq is issued even during the irq
    handling. Since we clear the irq status at the beginning, process the
    interrupt, then exits from the handler, the lately issued interrupt is
    left untouched without being properly processed.

    This patch changes the interrupt handler code to loop over the
    check-and-process. The handler tries repeatedly as long as the IRQ
    status are turned on, and either stream or CORB/RIRB is handled.

    For checking the stream handling, snd_hdac_bus_handle_stream_irq()
    returns a value indicating the stream indices bits. Other than that,
    the change is only in the irq handler itself.

    Reported-by: Libin Yang
    Cc:
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

20 Jan, 2016

1 commit

  • Currently HD-audio driver on Intel Skylake or Broxteon gives an error
    message when binding with i915 audio component fails. However, this
    isn't any serious error on a system without Intel graphics. Indeed
    there are such systems, where a third-party codec (e.g. Creative) is
    put on the mobo while using other discrete GPU (e.g. Nvidia).
    Printing a kernel "error" message is overreaction in such a case.

    This patch downgrades the print level for that message. For systems
    that mandate the i915 binding (e.g. Haswell or Broadwell HDMI/DP),
    another kernel error message is shown in addition to make clear what
    went wrong.

    Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=111021
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

12 Jan, 2016

1 commit

  • …ie/sound into for-next

    ASoC: Last updates for v4.5

    A bunch more updates for v4.5, mainly driver work:

    - More topology API enhancements from Mengdong Lin working towards
    making everything more component based and being able to specify PCM
    links via topology.
    - Large sets driver updates from Cirrus, Intel (mainly more Skylake
    support) and Renesas.
    - New driver for AMD ACP
    - Rename PCM1792a driver to be generic pcm179x

    Takashi Iwai
     

10 Jan, 2016

3 commits