23 Mar, 2016

1 commit

  • Pull sound fixes from Takashi Iwai:
    "The previous pull request introduced a few WARN_ON() for Intel
    HD-audio HDMI. Indeed it caught bugs, and now users get annoyed. So
    this request came up: a collection of small fixes to paper over the
    inconsistencies on (mostly) old Intel chipsets.

    In addition, a trivial USB-audio quirk is included, too"

    * tag 'sound-fix-4.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
    ALSA: hda - Fix missing ELD update at unplugging
    ALSA: usb-audio: add Microsoft HD-5001 to quirks
    ALSA: hda - Workaround for unbalanced i915 power refcount by concurrent probe
    ALSA: hda - Fix spurious kernel WARNING on Baytrail HDMI
    ALSA: hda - Fix forgotten HDMI monitor_present update
    ALSA: hda - Really restrict i915 notifier to HSW+

    Linus Torvalds
     

21 Mar, 2016

1 commit

  • i915 get_eld ops may return an error when no encoder is connected, and
    currently we regard the error as fatal and skip the whole ELD
    handling. This ended up with the missing ELD update at unplugging.

    This patch fixes the issue by treating the error as the unplugged
    state, instead of skipping the rest.

    Reported-by: Libin Yang
    Cc: # v4.5
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

20 Mar, 2016

1 commit

  • The recent addition of on-demand i915 audio component binding in the
    codec driver seems leading to the unbalanced i915 power refcount,
    according to Intel CI tests. Typically, it gets a kernel WARNING
    like:
    WARNING: CPU: 3 PID: 173 at sound/hda/hdac_i915.c:91 snd_hdac_display_power+0xf1/0x110 [snd_hda_core]()
    Call Trace:
    [] dump_stack+0x67/0x92
    [] warn_slowpath_common+0x81/0xc0
    [] warn_slowpath_null+0x15/0x20
    [] snd_hdac_display_power+0xf1/0x110 [snd_hda_core]
    [] azx_intel_link_power+0xd/0x10 [snd_hda_intel]
    [] azx_link_power+0x1a/0x30 [snd_hda_codec]
    [] snd_hdac_link_power+0x29/0x40 [snd_hda_core]
    [] hda_codec_runtime_suspend+0x76/0xa0 [snd_hda_codec]
    .....

    The scenario is like below:
    - HD-audio driver and i915 driver are probed concurrently at the
    (almost) same time; HDA bus tries to bind with i915, but it fails
    because i915 initialization is still being processed.
    - Later on, HD-audio probes the HDMI codec, where it again tries to
    bind with i915. At this time, it succeeds.
    - At finishing the probe of HDA, it decreases the refcount as if it
    were already bound at the bus probe, since the component is bound
    now. This triggers a kernel WARNING due to the unbalance.

    As a workaround, in this patch, we just disable the on-demand i915
    component binding in the codec driver. This essentially reverts back
    to the state of 4.4 kernel.

    We know that this is no real solution, but it's a minimalistic simple
    change that can be applied to 4.5.x kernel as stable.

    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94566
    Reported-by: Ville Syrjälä
    Cc: # v4.5
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

19 Mar, 2016

3 commits

  • snd_hdac_sync_audio_rate() call is mandatory only for HSW and later
    models, but we call the function unconditionally blindly assuming that
    the function doesn't do anything harmful. But since recently, the
    function checks the validity of the passed pin NID, and eventually
    spews the warning if an unexpected pin is passed. This is seen on old
    chips like Baytrail.

    The fix is to limit the call of this function again only for the chips
    with the proper binding. This can be identified by the same flag as
    the eld notifier.

    Reported-by: Ville Syrjälä
    Tested-by: Ville Syrjälä
    Cc: # v4.5
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • Pull sound updates from Takashi Iwai:
    "After a heavy storm by syzkaller in 4.5 cycle, we have relatively few
    changes in the core at this time while a lot of changes are found in
    the driver side, unsurprisingly. Below are some highlights:

    ALSA core:
    - A few more hardening in ALSA timer codes
    - An extension of sequencer API for advertising the card / pid
    - Small fixes in compress-offload and jack layers

    HD-audio:
    - Dynamic PCM assignment in HDMI/DP codec; preparation for upcoming
    DP-MST support
    - Lots of code refactoring for sharing with ASoC SKL driver
    - Regression fixes for Intel HDMI/DP
    - Fixups for CX20724 codec, Lenovo AiO

    USB-audio:
    - Add quirk_alias option to make quirk debugging easier
    - Fixes for possible Oops by malformed firmware

    Firewire:
    - Add support for FW-1804 in tascam driver
    - Improvements / changes in card registration, multi stream handling,
    etc for DICE
    - Lots of code refactoring

    ASoC:
    - Enhancements of still ongoing topology API
    - Lots of commits for Intel Skylake support including HDMI support
    - A few Intel Atom driver updates for recent devices
    - Lots of improvements to the Renesas drivers
    - Capture support for Qualcomm drivers
    - Support for TI DaVinci DRA7xxx devices
    - New machine drivers for Freescale systems with Cirrus CODECs,
    Mediatek systems with RT5650 CODECs
    - New CPU drivers for Allwinner S/PDIF controllers
    - New CODEC drivers for Maxim MAX9867 and MAX98926 and Realtek RT5514"

    * tag 'sound-4.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (291 commits)
    ALSA: hda - Fix mutex deadlock at HDMI/DP hotplug
    ALSA: ctl: change return value in compatibility layer so that it's the same value in core implementation
    ALSA: mixart: silence an uninitialized variable warning
    ALSA: usb-audio: Add sanity checks for endpoint accesses
    ALSA: usb-audio: Minor code cleanup in create_fixed_stream_quirk()
    ALSA: usb-audio: Fix NULL dereference in create_fixed_stream_quirk()
    ALSA: hda - Limit i915 HDMI binding only for HSW and later
    ALSA: hda - Fix unconditional GPIO toggle via automute
    ALSA: mixart: silence unitialized variable warnings
    ALSA: hda - Fixes double fault in nvhdmi_chmap_cea_alloc_validate_get_type
    ALSA: intel8x0: Add clock quirk entry for AD1981B on IBM ThinkPad X41.
    ALSA: hda - Add new GPU codec ID 0x10de0082 to snd-hda
    ASoC: rsnd: add simplified module explanation
    ASoC: hdac_hdmi: Add broxton device ID
    ASoC: Intel: Bxtn: Add Broxton PCI ID
    ASoC: Intel: Skylake: Move Skylake dsp ops & loader ops
    ASoC: Intel: add dmabuffer to common sst_dsp
    ASoC: Intel: Skylake: Unstatify skl_dsp_enable_core
    ASoC: Intel: Skylake: Fix whitepsace issues
    ASoC: Intel: Skylake: Move module id defines
    ...

    Linus Torvalds
     
  • We forgot to copy monitor_present value when updating the ELD
    information. This won't change the ELD retrieval and the jack
    notification behavior, but appears only in the proc output. In that
    sense, it's no fatal error, but a bug is a bug is a bug.

    Cc:
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

18 Mar, 2016

1 commit

  • The commit [b62232d429fa: ALSA: hda - Limit i915 HDMI binding only for
    HSW and later] tried to limit the usage of i915 audio notifier to the
    recent Intel models and switch to the old method on pre-Haswell
    models. However, it assumed that the i915 component binding hasn't
    been done on such models, and the assumption was wrong: namely,
    Baytrail had already the i915 component binding due to powerwell
    control. Thus, the workaround wasn't applied to Baytrail.

    For fixing this properly, this patch introduces a new flag indicating
    the usage of audio notifier and codec_has_acomp() refers to this flag
    instead of checking the existence of audio component.

    Reported-by: Ville Syrjälä
    Cc: # v4.5
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

17 Mar, 2016

2 commits

  • The recent change in HD-audio HDMI/DP codec driver for allowing the
    dynamic PCM binding introduced a new spec->pcm_mutex. One of the
    protected area by this mutex is hdmi_present_sense(). As reported by
    Intel CI tests, unfortunately, the new mutex causes a deadlock when
    the hotplug/unplug is triggered during the codec is in runtime
    suspend. The buggy code path is like the following:

    hdmi_unsol_event() -> ...
    -> hdmi_present_sense()
    ==> ** here taking pcm_mutex
    -> hdmi_present_sense_via_verbs()
    -> snd_hda_power_up_pm() -> ... (runtime resume calls)
    -> generic_hdmi_resume()
    -> hdmi_present_sense()
    ==> ** here taking pcm_mutex again!

    As we can see here, the problem is that the mutex is taken before
    snd_hda_power_up_pm() call that triggers the runtime resume. That is,
    the obvious solution is to move the power up/down call outside the
    mutex; it is exactly what this patch provides.

    The patch also clarifies why this bug wasn't caught beforehand. We
    used to have the i915 audio component for hotplug for all Intel chips,
    and in that code path, there is no power up required but the
    information is taken directly from the graphics side. However, we
    recently switched back to the old method for some old Intel chips due
    to regressions, and now the deadlock issue is surfaced.

    Fixes: a76056f2e57e ('ALSA: hda - hdmi dynamically bind PCM to pin when monitor hotplug')
    Reported-by: Ville Syrjälä
    Tested-by: Ville Syrjälä
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • Pull PCI updates from Bjorn Helgaas:
    "PCI changes for v4.6:

    Enumeration:
    - Disable IO/MEM decoding for devices with non-compliant BARs (Bjorn Helgaas)
    - Mark Broadwell-EP Home Agent & PCU as having non-compliant BARs (Bjorn Helgaas

    Resource management:
    - Mark shadow copy of VGA ROM as IORESOURCE_PCI_FIXED (Bjorn Helgaas)
    - Don't assign or reassign immutable resources (Bjorn Helgaas)
    - Don't enable/disable ROM BAR if we're using a RAM shadow copy (Bjorn Helgaas)
    - Set ROM shadow location in arch code, not in PCI core (Bjorn Helgaas)
    - Remove arch-specific IORESOURCE_ROM_SHADOW size from sysfs (Bjorn Helgaas)
    - ia64: Use ioremap() instead of open-coded equivalent (Bjorn Helgaas)
    - ia64: Keep CPU physical (not virtual) addresses in shadow ROM resource (Bjorn Helgaas)
    - MIPS: Keep CPU physical (not virtual) addresses in shadow ROM resource (Bjorn Helgaas)
    - Remove unused IORESOURCE_ROM_COPY and IORESOURCE_ROM_BIOS_COPY (Bjorn Helgaas)
    - Don't leak memory if sysfs_create_bin_file() fails (Bjorn Helgaas)
    - rcar: Remove PCI_PROBE_ONLY handling (Lorenzo Pieralisi)
    - designware: Remove PCI_PROBE_ONLY handling (Lorenzo Pieralisi)

    Virtualization:
    - Wait for up to 1000ms after FLR reset (Alex Williamson)
    - Support SR-IOV on any function type (Kelly Zytaruk)
    - Add ACS quirk for all Cavium devices (Manish Jaggi)

    AER:
    - Rename pci_ops_aer to aer_inj_pci_ops (Bjorn Helgaas)
    - Restore pci_ops pointer while calling original pci_ops (David Daney)
    - Fix aer_inject error codes (Jean Delvare)
    - Use dev_warn() in aer_inject (Jean Delvare)
    - Log actual error causes in aer_inject (Jean Delvare)
    - Log aer_inject error injections (Jean Delvare)

    VPD:
    - Prevent VPD access for buggy devices (Babu Moger)
    - Move pci_read_vpd() and pci_write_vpd() close to other VPD code (Bjorn Helgaas)
    - Move pci_vpd_release() from header file to pci/access.c (Bjorn Helgaas)
    - Remove struct pci_vpd_ops.release function pointer (Bjorn Helgaas)
    - Rename VPD symbols to remove unnecessary "pci22" (Bjorn Helgaas)
    - Fold struct pci_vpd_pci22 into struct pci_vpd (Bjorn Helgaas)
    - Sleep rather than busy-wait for VPD access completion (Bjorn Helgaas)
    - Update VPD definitions (Hannes Reinecke)
    - Allow access to VPD attributes with size 0 (Hannes Reinecke)
    - Determine actual VPD size on first access (Hannes Reinecke)

    Generic host bridge driver:
    - Move structure definitions to separate header file (David Daney)
    - Add pci_host_common_probe(), based on gen_pci_probe() (David Daney)
    - Expose pci_host_common_probe() for use by other drivers (David Daney)

    Altera host bridge driver:
    - Fix altera_pcie_link_is_up() (Ley Foon Tan)

    Cavium ThunderX host bridge driver:
    - Add PCIe host driver for ThunderX processors (David Daney)
    - Add driver for ThunderX-pass{1,2} on-chip devices (David Daney)

    Freescale i.MX6 host bridge driver:
    - Add DT bindings to configure PHY Tx driver settings (Justin Waters)
    - Move imx6_pcie_reset_phy() near other PHY handling functions (Lucas Stach)
    - Move PHY reset into imx6_pcie_establish_link() (Lucas Stach)
    - Remove broken Gen2 workaround (Lucas Stach)
    - Move link up check into imx6_pcie_wait_for_link() (Lucas Stach)

    Freescale Layerscape host bridge driver:
    - Add "fsl,ls2085a-pcie" compatible ID (Yang Shi)

    Intel VMD host bridge driver:
    - Attach VMD resources to parent domain's resource tree (Jon Derrick)
    - Set bus resource start to 0 (Keith Busch)

    Microsoft Hyper-V host bridge driver:
    - Add fwnode_handle to x86 pci_sysdata (Jake Oshins)
    - Look up IRQ domain by fwnode_handle (Jake Oshins)
    - Add paravirtual PCI front-end for Microsoft Hyper-V VMs (Jake Oshins)

    NVIDIA Tegra host bridge driver:
    - Add pci_ops.{add,remove}_bus() callbacks (Thierry Reding)
    - Implement ->{add,remove}_bus() callbacks (Thierry Reding)
    - Remove unused struct tegra_pcie.num_ports field (Thierry Reding)
    - Track bus -> CPU mapping (Thierry Reding)
    - Remove misleading PHYS_OFFSET (Thierry Reding)

    Renesas R-Car host bridge driver:
    - Depend on ARCH_RENESAS, not ARCH_SHMOBILE (Simon Horman)

    Synopsys DesignWare host bridge driver:
    - ARC: Add PCI support (Joao Pinto)
    - Add generic dw_pcie_wait_for_link() (Joao Pinto)
    - Add default link up check if sub-driver doesn't override (Joao Pinto)
    - Add driver for prototyping kits based on ARC SDP (Joao Pinto)

    TI Keystone host bridge driver:
    - Defer probing if devm_phy_get() returns -EPROBE_DEFER (Shawn Lin)

    Xilinx AXI host bridge driver:
    - Use of_pci_get_host_bridge_resources() to parse DT (Bharat Kumar Gogada)
    - Remove dependency on ARM-specific struct hw_pci (Bharat Kumar Gogada)
    - Don't call pci_fixup_irqs() on Microblaze (Bharat Kumar Gogada)
    - Update Zynq binding with Microblaze node (Bharat Kumar Gogada)
    - microblaze: Support generic Xilinx AXI PCIe Host Bridge IP driver (Bharat Kumar Gogada)

    Xilinx NWL host bridge driver:
    - Add support for Xilinx NWL PCIe Host Controller (Bharat Kumar Gogada)

    Miscellaneous:
    - Check device_attach() return value always (Bjorn Helgaas)
    - Move pci_set_flags() from asm-generic/pci-bridge.h to linux/pci.h (Bjorn Helgaas)
    - Remove includes of empty asm-generic/pci-bridge.h (Bjorn Helgaas)
    - ARM64: Remove generated include of asm-generic/pci-bridge.h (Bjorn Helgaas)
    - Remove empty asm-generic/pci-bridge.h (Bjorn Helgaas)
    - Remove includes of asm/pci-bridge.h (Bjorn Helgaas)
    - Consolidate PCI DMA constants and interfaces in linux/pci-dma-compat.h (Bjorn Helgaas)
    - unicore32: Remove unused HAVE_ARCH_PCI_SET_DMA_MASK definition (Bjorn Helgaas)
    - Cleanup pci/pcie/Kconfig whitespace (Andreas Ziegler)
    - Include pci/hotplug Kconfig directly from pci/Kconfig (Bjorn Helgaas)
    - Include pci/pcie/Kconfig directly from pci/Kconfig (Bogicevic Sasa)
    - frv: Remove stray pci_{alloc,free}_consistent() declaration (Christoph Hellwig)
    - Move pci_dma_* helpers to common code (Christoph Hellwig)
    - Add PCI_CLASS_SERIAL_USB_DEVICE definition (Heikki Krogerus)
    - Add QEMU top-level IDs for (sub)vendor & device (Robin H. Johnson)
    - Fix broken URL for Dell biosdevname (Naga Venkata Sai Indubhaskar Jupudi)"

    * tag 'pci-v4.6-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (94 commits)
    PCI: Add PCI_CLASS_SERIAL_USB_DEVICE definition
    PCI: designware: Add driver for prototyping kits based on ARC SDP
    PCI: designware: Add default link up check if sub-driver doesn't override
    PCI: designware: Add generic dw_pcie_wait_for_link()
    PCI: Cleanup pci/pcie/Kconfig whitespace
    PCI: Simplify pci_create_attr() control flow
    PCI: Don't leak memory if sysfs_create_bin_file() fails
    PCI: Simplify sysfs ROM cleanup
    PCI: Remove unused IORESOURCE_ROM_COPY and IORESOURCE_ROM_BIOS_COPY
    MIPS: Loongson 3: Keep CPU physical (not virtual) addresses in shadow ROM resource
    MIPS: Loongson 3: Use temporary struct resource * to avoid repetition
    ia64/PCI: Keep CPU physical (not virtual) addresses in shadow ROM resource
    ia64/PCI: Use ioremap() instead of open-coded equivalent
    ia64/PCI: Use temporary struct resource * to avoid repetition
    PCI: Clean up pci_map_rom() whitespace
    PCI: Remove arch-specific IORESOURCE_ROM_SHADOW size from sysfs
    PCI: thunder: Add driver for ThunderX-pass{1,2} on-chip devices
    PCI: thunder: Add PCIe host driver for ThunderX processors
    PCI: generic: Expose pci_host_common_probe() for use by other drivers
    PCI: generic: Add pci_host_common_probe(), based on gen_pci_probe()
    ...

    Linus Torvalds
     

16 Mar, 2016

2 commits


15 Mar, 2016

2 commits

  • Cirrus HD-audio driver may adjust GPIO pins for EAPD dynamically
    depending on the jack plug state. This works fine for the auto-mute
    mode where the speaker gets muted upon the HP jack plug. OTOH, when
    the auto-mute mode is off, this turns off the EAPD unexpectedly
    depending on the jack state, which results in the silent speaker
    output.

    This patch fixes the silent speaker output issue by setting GPIO bits
    constantly when the auto-mute mode is off.

    Reported-and-tested-by: moosotc@gmail.com
    Cc:
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • We print can print the uninitialized memory on error. Which is an info
    leak, I suppose but it's basically harmless.

    Signed-off-by: Dan Carpenter
    Signed-off-by: Takashi Iwai

    Dan Carpenter
     

14 Mar, 2016

4 commits


11 Mar, 2016

1 commit


10 Mar, 2016

2 commits

  • The current Intel HDMI codec driver supports only three fixed ports
    from port B to port D. However, i915 driver may assign a DP on other
    ports, e.g. port A, when no eDP is used. This incompatibility is
    caught later at pin_nid_to_pin_index() and results in a warning
    message like "HDMI: pin nid 4 not registered" at each time.

    This patch filters out such invalid events beforehand, so that the
    kernel won't be too grumbling.

    Reported-by: Stefan Assmann
    Cc:
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • Just like CX20722, CX7024 codec also requires the power down at reboot
    in order to reduce the noise at reboot/shutdown.

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

    Takashi Iwai
     

09 Mar, 2016

1 commit

  • Introduce PCI_VENDOR/PCI_SUBVENDOR/PCI_SUBDEVICE defines to replace the
    constants scattered in the kernel already used to detect QEMU.

    They are defined in the QEMU codebase per docs/specs/pci-ids.txt.

    Signed-off-by: Robin H. Johnson
    Signed-off-by: Bjorn Helgaas
    Reviewed-by: Takashi Iwai
    Reviewed-by: Gerd Hoffmann
    Acked-by: Michael S. Tsirkin
    Acked-by: Daniel Vetter

    Robin H. Johnson
     

07 Mar, 2016

7 commits


04 Mar, 2016

3 commits

  • Resolved the conflicts with the latest HDA HDMI fixes.

    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • Defer to register acomp eld notifier until hdmi audio driver
    is fully ready.

    After registering eld notifier, gfx driver can use this
    callback function to notify audio driver the monitor
    connection event. However this action may happen when
    audio driver is adding the pins or doing other initialization.
    This is not always safe, however. For example, using
    per_pin->lock before the lock is initialized.

    Let's register the eld notifier after the initialization is done.

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

    Libin Yang
     
  • To make sure audio_ptr is set before intel_audio_codec_enable()
    or intel_audio_codec_disable() calling pin_eld_notify(),
    this patch adds wmb barrier to prevent optimizing.

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

    Libin Yang
     

03 Mar, 2016

1 commit

  • This patch applies the microphone-related fix created for the Acer
    Aspire E1-572 to the E1-472 as well, as it uses the same Realtek ALC282
    CODEC and demonstrates the same issues.

    This patch allows an external, headset microphone to be used and limits
    the gain on the (quite noisy) internal microphone.

    Signed-off-by: Simon South
    Cc:
    Signed-off-by: Takashi Iwai

    Simon South
     

01 Mar, 2016

4 commits


27 Feb, 2016

2 commits

  • Takashi Iwai
     
  • azx_probe_continue() uses pm_runtime_put_noidle() to drop the rpm
    usage_count, which means that if it's the last reference the
    autosuspend of the controller won't actually happen. So if the codecs
    autosuspend before the azx_probe_continue() drops the last
    reference we'll fail to autosuspend the controller. This does happen
    in practice, but not every time. As can be seen in [1] the controller
    autosuspend attempt fails due to the usage_count when suspending the
    codecs. A bit later we see the the contoller usage_count dropping to
    zero without further attempts at autosuspend.

    Fix the problem by using pm_runtime_put_autosuspend() instead, which
    will kick off the autosuspend of the controller even if the codecs
    are already asleep. As can be seen in [2] the controller autosuspend
    still fails while suspending the codecs, but later on we see another
    autosuspend attempt after dropping the usage_count to 0.

    I was also a bit worried that there might still be a race between the
    controller autosuspend and the rest of the code in azx_probe_continue().
    So I also tried replacing the the put_noidle() with put_sync_suspend().
    No explosions occurred, so I'm somewhat satisfied that there are no
    serious problems in this area.

    [1]
    kworker/1:2-122 [001] .... 63.661310: __pm_runtime_suspend: hdaudioC0D0 usage_count 0
    kworker/1:2-122 [001] d..2 63.661316: rpm_suspend: hdaudioC0D0 flags-d cnt-0 dep-0 auto-1 p-0 irq-0 child-0
    kworker/1:2-122 [001] d..1 63.661317: rpm_check_suspend_allowed: hdaudioC0D0 retval 0
    kworker/1:2-122 [001] d..2 63.661332: rpm_return_int: rpm_suspend+0x406/0x5e8:hdaudioC0D0 ret=0
    kworker/1:1-72 [001] d..2 63.661543: rpm_suspend: hdaudioC0D0 flags-a cnt-0 dep-0 auto-1 p-0 irq-0 child-0
    kworker/1:1-72 [001] d..1 63.661544: rpm_check_suspend_allowed: hdaudioC0D0 retval 0
    kworker/1:1-72 [001] .... 63.661545: hda_codec_runtime_suspend: hdaudioC0D0 suspend
    kworker/1:1-72 [001] d..2 63.661614: rpm_idle: 0000:00:03.0 flags-1 cnt-1 dep-0 auto-1 p-0 irq-0 child-0
    kworker/1:1-72 [001] d..1 63.661615: rpm_check_suspend_allowed: 0000:00:03.0 usage_count 1
    kworker/1:1-72 [001] d..1 63.661615: rpm_check_suspend_allowed: 0000:00:03.0 retval -11
    kworker/1:1-72 [001] d..2 63.661616: rpm_return_int: rpm_idle+0x249/0x487:0000:00:03.0 ret=-11
    kworker/1:1-72 [001] d..2 63.661616: rpm_return_int: rpm_suspend+0x406/0x5e8:hdaudioC0D0 ret=0
    kworker/1:2-122 [001] d..2 63.664834: rpm_idle: hdaudioC0D0 flags-8 cnt-0 dep-0 auto-1 p-0 irq-0 child-0
    kworker/1:2-122 [001] d..1 63.664835: rpm_check_suspend_allowed: hdaudioC0D0 retval 1
    kworker/1:2-122 [001] d..2 63.664836: rpm_return_int: rpm_idle+0x249/0x487:hdaudioC0D0 ret=-11
    kworker/1:2-122 [001] d..2 63.664841: rpm_idle: hdaudioC0D0 flags-8 cnt-0 dep-0 auto-1 p-0 irq-0 child-0
    kworker/1:2-122 [001] d..1 63.664841: rpm_check_suspend_allowed: hdaudioC0D0 retval 1
    kworker/1:2-122 [001] d..2 63.664841: rpm_return_int: rpm_idle+0x249/0x487:hdaudioC0D0 ret=-11
    kworker/1:2-122 [001] .... 63.664842: azx_probe_continue: 0000:00:03.0 usage_count=0

    [2]
    kworker/0:0-4 [000] .... 50.354567: __pm_runtime_suspend: hdaudioC0D0 usage_count 0
    kworker/0:0-4 [000] d..2 50.354574: rpm_suspend: hdaudioC0D0 flags-d cnt-0 dep-0 auto-1 p-0 irq-0 child-0
    kworker/0:0-4 [000] d..1 50.354575: rpm_check_suspend_allowed: hdaudioC0D0 retval 0
    kworker/0:0-4 [000] d..2 50.354589: rpm_return_int: rpm_suspend+0x406/0x5e8:hdaudioC0D0 ret=0
    kworker/0:2-135 [000] d..2 50.354809: rpm_suspend: hdaudioC0D0 flags-a cnt-0 dep-0 auto-1 p-0 irq-0 child-0
    kworker/0:2-135 [000] d..1 50.354810: rpm_check_suspend_allowed: hdaudioC0D0 retval 0
    kworker/0:2-135 [000] .... 50.354816: hda_codec_runtime_suspend: hdaudioC0D0 suspend
    kworker/0:2-135 [000] d..2 50.354908: rpm_idle: 0000:00:03.0 flags-1 cnt-1 dep-0 auto-1 p-0 irq-0 child-0
    kworker/0:2-135 [000] d..1 50.354909: rpm_check_suspend_allowed: 0000:00:03.0 usage_count 1
    kworker/0:2-135 [000] d..1 50.354909: rpm_check_suspend_allowed: 0000:00:03.0 retval -11
    kworker/0:2-135 [000] d..2 50.354909: rpm_return_int: rpm_idle+0x249/0x487:0000:00:03.0 ret=-11
    kworker/0:2-135 [000] d..2 50.354910: rpm_return_int: rpm_suspend+0x406/0x5e8:hdaudioC0D0 ret=0
    kworker/0:0-4 [000] d..2 50.373791: rpm_idle: hdaudioC0D0 flags-8 cnt-0 dep-0 auto-1 p-0 irq-0 child-0
    kworker/0:0-4 [000] d..1 50.373792: rpm_check_suspend_allowed: hdaudioC0D0 retval 1
    kworker/0:0-4 [000] d..2 50.373793: rpm_return_int: rpm_idle+0x249/0x487:hdaudioC0D0 ret=-11
    kworker/0:0-4 [000] d..2 50.373797: rpm_idle: hdaudioC0D0 flags-8 cnt-0 dep-0 auto-1 p-0 irq-0 child-0
    kworker/0:0-4 [000] d..1 50.373798: rpm_check_suspend_allowed: hdaudioC0D0 retval 1
    kworker/0:0-4 [000] d..2 50.373798: rpm_return_int: rpm_idle+0x249/0x487:hdaudioC0D0 ret=-11
    kworker/0:0-4 [000] .... 50.373799: __pm_runtime_suspend: 0000:00:03.0 usage_count 0
    kworker/0:0-4 [000] d..2 50.373800: rpm_suspend: 0000:00:03.0 flags-d cnt-0 dep-0 auto-1 p-0 irq-0 child-0
    kworker/0:0-4 [000] d..1 50.373800: rpm_check_suspend_allowed: 0000:00:03.0 retval 0
    kworker/0:0-4 [000] d..2 50.373803: rpm_return_int: rpm_suspend+0x406/0x5e8:0000:00:03.0 ret=0
    kworker/0:0-4 [000] d..2 50.385164: rpm_suspend: 0000:00:03.0 flags-a cnt-0 dep-0 auto-1 p-0 irq-0 child-0
    kworker/0:0-4 [000] d..1 50.385165: rpm_check_suspend_allowed: 0000:00:03.0 retval 0
    kworker/0:0-4 [000] .... 50.385174: azx_runtime_suspend: 0000:00:03.0 azx suspend releaseing power well
    kworker/0:0-4 [000] .... 50.385179: azx_runtime_suspend: 0000:00:03.0 azx suspend
    kworker/0:0-4 [000] d..2 50.386872: rpm_return_int: rpm_suspend+0x406/0x5e8:0000:00:03.0 ret=0

    Signed-off-by: Ville Syrjälä
    Signed-off-by: Takashi Iwai

    Ville Syrjälä
     

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
     

25 Feb, 2016

1 commit