Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SoundWire clock stop support #1586

Commits on Dec 12, 2019

  1. soundwire: renames to prepare support for master drivers/devices

    Add clearer references to sdw_slave_driver for internal macros
    
    No change for sdw_driver and module_sdw_driver to avoid compatibility
    issues with existing codec devices
    
    No functionality change.
    
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    b83fb41 View commit details
    Browse the repository at this point in the history
  2. soundwire: rename dev_to_sdw_dev macro

    Since we want to introduce master devices, rename macro so that we
    have consistency between slave and master device access, following the
    Grey Bus example.
    
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    1718116 View commit details
    Browse the repository at this point in the history
  3. soundwire: rename drv_to_sdw_slave_driver macro

    Align with previous renames and shorten macro
    
    No functionality change
    
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    2cdfdc5 View commit details
    Browse the repository at this point in the history
  4. soundwire: bus_type: rename sdw_drv_ to sdw_slave_drv

    Before we add master driver support, make sure there is no ambiguity
    and no occurrences of sdw_drv_ functions.
    
    No functionality change.
    
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    b4560c0 View commit details
    Browse the repository at this point in the history
  5. soundwire: intel: rename res field as link_res

    There are too many fields called 'res' so add prefix to make it easier
    to track what the structures are.
    
    Pure rename, no functionality change
    
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    f42e8d3 View commit details
    Browse the repository at this point in the history
  6. soundwire: add support for sdw_slave_type

    Currently the bus does not have any explicit support for master
    devices.
    
    First add explicit support for sdw_slave_type and error checks if this type
    is not set.
    
    In follow-up patches we can add support for the sdw_md_type (md==Master
    Device), following the Grey Bus example.
    
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    8624fd5 View commit details
    Browse the repository at this point in the history
  7. soundwire: slave: move uevent handling to slave

    Currently the code deals with uevents at the bus level, but we only care
    for Slave events
    
    Suggested-by: Vinod Koul <vkoul@kernel.org>
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    43cb5c5 View commit details
    Browse the repository at this point in the history
  8. soundwire: add initial definitions for sdw_master_device

    Since we want an explicit support for the SoundWire Master device, add
    the definitions, following the Grey Bus example.
    
    Unlike for the Slave device, we do not set a variable when dealing
    with the master uevent.
    
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    785e246 View commit details
    Browse the repository at this point in the history
  9. soundwire: intel: remove platform devices and provide new interface

    Use sdw_master_device and driver instead of platform devices
    
    To quote GregKH:
    
    "Don't mess with a platform device unless you really have no other
    possible choice. And even then, don't do it and try to do something
    else. Platform devices are really abused, don't perpetuate it "
    
    In addition, rather than a plain-vanilla init/exit, this patch
    provides 3 steps in the initialization (ACPI scan, probe, startup)
    which make it easier to verify support and allocate required resources
    as early as possible, and conversely help make the startup
    lighter-weight with only hardware register setup.
    
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    a947e60 View commit details
    Browse the repository at this point in the history
  10. soundwire: add device driver to sdw_md_driver

    Setting an device driver is necessary for ASoC to register DAI
    components.
    
    Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    bardliao authored and plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    0863dee View commit details
    Browse the repository at this point in the history
  11. soundwire: intel: add prepare support in sdw dai driver

    The existing code does not expose a prepare operation, which is very
    much needed to deal with underflow and resume operations.
    
    Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    RanderWang authored and plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    03a6add View commit details
    Browse the repository at this point in the history
  12. soundwire: intel: add trigger support in sdw dai driver

    The existing code does not expose a trigger callback, which is very
    much required for streaming.
    
    The SoundWire stream is enabled and disabled in trigger function.
    
    Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    RanderWang authored and plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    88b253d View commit details
    Browse the repository at this point in the history
  13. soundwire: intel: add sdw_stream_setup helper for .startup callback

    The sdw stream is allocated and stored in dai to share the sdw runtime
    information.
    
    Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    RanderWang authored and plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    8952869 View commit details
    Browse the repository at this point in the history
  14. soundwire: intel: free all resources on hw_free()

    Make sure all calls to the SoundWire stream API are done and involve
    callback
    
    Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    f602a42 View commit details
    Browse the repository at this point in the history
  15. soundwire: intel_init: add implementation of sdw_intel_enable_irq()

    This function is required to enable all interrupts across all links.
    
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    398e4bf View commit details
    Browse the repository at this point in the history
  16. soundwire: intel/cadence: merge Soundwire interrupt handlers/threads

    The existing code uses one pair of interrupt handler/thread per link
    but at the hardware level the interrupt is shared. This works fine for
    legacy PCI interrupts, but leads to timeouts in MSI (Message-Signaled
    Interrupt) mode, likely due to edges being lost.
    
    This patch unifies interrupt handling for all links. The dedicated
    handler is removed since we use a common one for all shared interrupt
    sources, and the thread function takes care of dealing with interrupt
    sources. This partition follows the model used for the SOF IPC on
    HDaudio platforms, where similar timeout issues were noticed and doing
    all the interrupt handling/clearing in the thread improved
    reliability/stability.
    
    Validation results with 4 links active in parallel show a night-and-day
    improvement with no timeouts noticed even during stress tests. Latency
    and quality of service are not affected by the change - mostly because
    events on a SoundWire link are throttled by the bus frame rate
    (typically 8..48kHz).
    
    Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    bardliao authored and plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    9ef262f View commit details
    Browse the repository at this point in the history
  17. soundwire: bus: fix race condition with probe_complete signaling

    The driver probe takes care of basic initialization and is invoked
    when a Slave becomes attached, after a match between the Slave DevID
    registers and ACPI/DT entries.
    
    The update_status callback is invoked when a Slave state changes,
    e.g. when it is assigned a non-zero Device Number and it reports with
    an ATTACHED/ALERT state.
    
    The state change detection is usually hardware-based and based on the
    SoundWire frame rate (e.g. double-digit microseconds) while the probe
    is a pure software operation, which may involve a kernel module
    load. In corner cases, it's possible that the state changes before the
    probe completes.
    
    This patch suggests the use of wait_for_completion to avoid races on
    startup, so that the update_status callback does not rely on invalid
    pointers/data structures.
    
    Signed-off-by: Rander Wang <rander.wang@intel.com>
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    3d9b4a8 View commit details
    Browse the repository at this point in the history
  18. soundwire: bus: add PM/no-PM versions of read/write functions

    Add support for pm_runtime with the appropriate error checks for
    sdw_write/read functions, e.g. when pm_runtime is not supported.
    
    Also expose internal functions without pm_runtime support, which are
    required to perform any sort of suspend/resume operation, as well as
    any enumeration tasks.
    
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    22e4428 View commit details
    Browse the repository at this point in the history
  19. soundwire: bus: write Slave Device Number without runtime_pm

    While handling the Device0, we can safely use sdw_write_no_pm.
    
    This move will also helps us track that all other usages of
    sdw_write() happen when the Slave is already enumerated.
    
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    65c5e88 View commit details
    Browse the repository at this point in the history
  20. soundwire: intel: add helpers for link power down and shim wake

    These routines are required for power management
    
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    a5b451a View commit details
    Browse the repository at this point in the history
  21. soundwire: intel: Add basic power management support

    Implement suspend/resume capabilities (not runtime_pm for now)
    The resume part is essentially a full-blown re-enumeration.
    
    When S0ix is supported, we will select clock stop mode when the ACPI
    target state is S0, and tear down the link for S3.
    
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    1a52e2c View commit details
    Browse the repository at this point in the history
  22. soundwire: intel: add pm_runtime support

    Add basic hooks in DAI .startup and .shutdown callbacks.
    
    The SoundWire IP should be powered between those two calls. The power
    dependencies between SoundWire and DSP are handled with the
    parent/child relationship, before the SoundWire master device becomes
    active the parent device will become active and power-up the shared
    rails.
    
    For now the strategy is to rely on complete enumeration when the
    device becomes active, so the code is a copy/paste of the sequence for
    system suspend/resume. In future patches, the strategy will optionally
    be to rely on clock stop if the enumeration time is prohibitive or
    when the devices connected to a link can signal a wake.
    
    A module parameter is added to make integration of new Slave devices
    easier, to e.g. keep the device active or prevent clock-stop.
    
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    f944590 View commit details
    Browse the repository at this point in the history
  23. soundwire: intel: reset pm_runtime status during system resume

    The system resume does the entire bus re-initialization and brings it
    to full-power. If the device was pm_runtime suspended, there is no
    need to run the pm_runtime resume sequence after the system runtime.
    
    Follow the documentation from runtime_pm.rst, and conditionally
    disable, set_active and re-enable the device on system resume.
    
    Note that pm_runtime_suspended() is used instead of
    pm_runtime_status_suspended() so that we can deal with the case where
    pm_runtime is disabled.
    
    Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    839c928 View commit details
    Browse the repository at this point in the history
  24. soundwire: intel: fix race condition on system resume

    Previous patches took care of the case where the master device is
    pm_runtime 'suspended' when a system suspend occurs.
    
    In the case where the master device was not suspended, e.g. if suspend
    occurred while streaming audio, Intel validation noticed a race
    condition the enumeration started by the system resume may race with
    pm_runtime suspend.
    
    This can be simply fixed by updating the status before exiting system
    resume.
    
    GitHub issue: thesofproject#1482
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    de30c32 View commit details
    Browse the repository at this point in the history
  25. soundwire: bus: add helper to reset Slave status to UNATTACHED

    When resuming, we need to re-enumerate and restart from UNATTACHED.
    
    This will help implement a more robust state machine avoiding race
    conditions on resume.
    
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    9aa4b59 View commit details
    Browse the repository at this point in the history
  26. soundwire: intel: call helper to reset Slave states on resume

    This helps make sure they are all UNATTACHED and reset the state
    machines.
    
    At the moment we perform a bus reset both for resume and pm_resume,
    this will be modified when clock-stop mode is supported
    
    Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    a3d4db2 View commit details
    Browse the repository at this point in the history
  27. soundwire: bus: check first if Slaves become UNATTACHED

    Before checking for the presence of Device0, we first need to clean-up
    the internal state of Slaves that are no longer attached.
    
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    dc8c6ef View commit details
    Browse the repository at this point in the history
  28. soundwire: bus: fix race condition with enumeration_complete signaling

    This patch adds the signaling needed for Slave drivers to wait until
    the enumeration completes so that race conditions when issuing
    read/write commands are avoided. The calls for wait_for_completion()
    will be added in codec drivers in follow-up patches.
    
    The order between init_completion() and complete() is deterministic,
    the Slave is marked as UNATTACHED either during a Master-initiated
    HardReset, or when the hardware detects the Slave no longer reports as
    ATTACHED.
    
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    59ba4a4 View commit details
    Browse the repository at this point in the history
  29. soundwire: bus: fix race condition with initialization_complete signa…

    …ling
    
    Waiting for the enumeration to be complete may not be enough for a
    Slave driver, there is a possible race condition between resume
    operations and initializations handled in an interrupt thread, which
    can results in settings not being fully restored after system or
    pm_runtime resume.
    
    This patch builds on the changes added for enumeration_complete,
    init_completion() is called when the Slave device becomes UNATTACHED,
    as done with enumeration_complete.
    
    The difference with the enumeration_complete case is that complete()
    is signaled after the Slave device is fully initialized after the
    .update_status() callback is called.
    
    A Slave device driver can decide to wait on either of the two
    complete() cases, depending on its initialization code and
    requirements.
    
    Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    01b5d4d View commit details
    Browse the repository at this point in the history
  30. soundwire: bus: fix race condition by tracking UNATTACHED transition

    In previous patches, we added enumeration_ and initialization_complete
    fields to avoid race conditions. When streaming restarts, the Master
    first resumes, then requests all Slaves to renumerate/reinitialized,
    and then the Slave devices resume.
    
    Intel validation exposed a corner case where the Slave device may
    transition to D3 when streaming stops, but streaming restarts before
    the Master transitions to D3. In that case, the Slave status was not
    cleared as UNATTACHED, and the wait_for_completion will time out.
    
    The proposed solution is that when the Master clears the Slave(s)
    status, the reason for the Slave(s) becoming unattached is
    memorized. When the slave resumes, it can check if a Master-initiated
    re-enumeration and initialization takes place and skip the
    wait_for_completion() if there is no reason to wait.
    
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    99d7094 View commit details
    Browse the repository at this point in the history
  31. soundwire: intel: disable pm_runtime when removing a master

    Prevent race conditions between remove and resume by disabling
    pm_runtime.
    
    Note that this only takes care of pm_runtime at the Master level, the
    same precautions are needed when removing a Slave device.
    
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    81f044d View commit details
    Browse the repository at this point in the history
  32. soundwire: bus: disable pm_runtime in sdw_slave_delete

    Before removing the slave device, disable pm_runtime to prevent any
    race condition with the resume being executed after the bus and slave
    devices are removed.
    
    Since this pm_runtime_disable() is handled in common routines,
    implementations of Slave drivers do not need to call it in their
    .remove() routine.
    
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    bd234e2 View commit details
    Browse the repository at this point in the history
  33. soundwire: stream: remove redundant pr_err traces

    Only keep pr_err to flag critical configuration errors that will
    typically only happen during system integration.
    
    For errors on prepare/deprepare/enable/disable, the caller can do a
    much better job with more information on the DAI and device that
    caused the issue.
    
    Suggested-by: Cezary Rojewski <cezary.rojewski@intel.com>
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    0f678f7 View commit details
    Browse the repository at this point in the history
  34. soundwire: stream: update state machine and add state checks

    The state machine and notes don't accurately explain or allow
    transitions from STREAM_DEPREPARED and STREAM_DISABLED.
    
    Add more explanations and allow for more transitions as a result of a
    trigger_stop(), trigger_suspend() and prepare(), depending on the
    ALSA/ASoC layer behavior defined by the INFO_RESUME and INFO_PAUSE
    flags.
    
    Also add basic checks to help debug inconsistent states and illegal
    state machine transitions.
    
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    58fd466 View commit details
    Browse the repository at this point in the history
  35. soundwire: stream: only prepare stream when it is configured.

    We don't need to prepare the stream again if the stream is already
    prepared.
    
    sdw_prepare_stream() could be called multiple times without calling
    sdw_deprepare_stream(). We call sdw_prepare_stream() in the prepare
    dai ops and sdw_deprepare_stream() in the hw_free dai ops. If an xrun
    happens, sdw_prepare_stream() will be called but
    sdw_deprepare_stream() will not, which results in an imbalance and an
    invalid total bandwidth.
    
    Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    bardliao authored and plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    801e891 View commit details
    Browse the repository at this point in the history
  36. soundwire: stream: do not update parameters during DISABLED-PREPARED …

    …transition
    
    After a system suspend, the ALSA/ASoC core will invoke the .prepare()
    callback and a TRIGGER_START when INFO_RESUME is not supported.
    
    Likewise, when an underflow occurs, the .prepare callback will be invoked.
    
    In both cases, the stream can be in DISABLED mode, and will transition
    into the PREPARED mode. We however don't want the bus bandwidth to be
    recomputed.
    
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    75dbfab View commit details
    Browse the repository at this point in the history
  37. soundwire: intel: reinitialize IP+DSP in .prepare(), but only when re…

    …suming
    
    The .prepare() callback is invoked for normal streaming, underflows or
    during the system resume transition. In the latter case, the context
    for the ALH PDIs is lost, and the DSP is not initialized properly
    either, but the bus parameters don't need to be recomputed.
    
    Conversely, when doing a regular .prepare() during an underflow, the
    ALH/SHIM registers shall not be changed as the hardware cannot be
    reprogrammed after the DMA started (hardware spec requirement).
    
    This patch adds storage of PDI and hw_params in the DAI dma context,
    and the difference between the types of .prepare() usages is handled
    via a simple boolean, updated when suspending, and tested for in the
    .prepare() case.
    
    Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    bardliao authored and plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    f49c9e0 View commit details
    Browse the repository at this point in the history
  38. soundwire: intel: pm_runtime idle scheduling

    Add quirk and pm_runtime idle scheduling to let the Master suspend if
    no Slaves become attached. This can happen when a link is not marked
    as disabled and has devices exposed in the DSDT, if the power is
    controlled by sideband means or the link includes a pluggable
    connector.
    
    Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    876b3f6 View commit details
    Browse the repository at this point in the history
  39. [HACK] add traces to debug aplay suspend/resume issue

    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
    plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    d9cb561 View commit details
    Browse the repository at this point in the history
  40. pm: add more traces

    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    defafaf View commit details
    Browse the repository at this point in the history
  41. soundwire: cadence_master: remove config update for interrupt setting

    Config only needs to be updated when setting MCP_Config, MCP_Control
    and MCP_CmdCtrl to make these register setting effective. When updating
    config in master, master will communicate with slave to update status.
    Communication will be failed when masters and slaves are in clock stop
    state, and this unnecessary config update makes interrupt setting failed.
    
    Tested on Comet Lake with soundwire enabled
    
    Signed-off-by: Rander Wang <rander.wang@intel.com>
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    RanderWang authored and plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    e45113c View commit details
    Browse the repository at this point in the history
  42. soundwire: intel: add mutex to prevent concurrent access to SHIM regi…

    …sters
    
    Some of the SHIM registers exposed fields that are link specific, and
    in addition some of the power-related registers (SPA/CPA) take time to
    be updated. Uncontrolled access leads to timeouts or errors.
    
    Add a mutex at the controller level, shared by all links, so that all
    accesses to such registers are serialized, and follow a pattern of
    read-modify-write.
    
    GitHub issue: thesofproject#1555
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    e3d8b27 View commit details
    Browse the repository at this point in the history
  43. ASoC: SOF: Intel: add SoundWire configuration interface

    Now that the SoundWire core supports the multi-step initialization,
    call the relevant APIs.
    
    The actual hardware enablement can be done in two places, ideally we'd
    want to startup the SoundWire IP as soon as possible (while still
    taking power rail dependencies into account)
    
    However when suspend/resume is implemented, the DSP device will be
    resumed first, and only when the DSP firmware is downloaded/booted
    would the SoundWire child devices be resumed, so there are only
    marginal benefits in starting the IP earlier for the first probe.
    
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    80308c8 View commit details
    Browse the repository at this point in the history
  44. ASoC: SOF: IPC: dai-intel: move ALH declarations in header file

    ALH was inserted in the wrong place during integration, add after DMIC
    to mirror the file used by SOF firmware.
    
    No functional change, just text move in the same file to better track
    changes, if any.
    
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    9c8ded4 View commit details
    Browse the repository at this point in the history
  45. ASoC: SOF: Intel: hda: add SoundWire stream config/free callbacks

    These callbacks are invoked when a matching hw_params/hw_free() DAI
    operation takes place, and will result in IPC operations with the SOF
    firmware.
    
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    42e8121 View commit details
    Browse the repository at this point in the history
  46. ASoC: SOF: Intel: hda: initial SoundWire machine driver autodetect

    For now we have a limited number of machine driver configurations, and
    we can detect them based on the link configuration returned after
    checking hardware and firmware (BIOS) configurations.
    
    It's likely that in the future we will need to check for _ADR match as
    well, which can easily be done by extending the acpi_info structure.
    
    There is a chance that in extreme cases where the BIOS contains too
    much information we would need to detect which Slave devices actually
    report as 'attached'. This would be more accurate than static
    table-based solutions, but it also introduces timing dependencies
    since we don't know when those devices might become attached, so will
    only be only be looked at if we see limitations with static methods
    and the usual quirks based e.g. on DMI information.
    
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    c909e96 View commit details
    Browse the repository at this point in the history
  47. ASoC: SOF: Intel: hda: disable SoundWire interrupts on suspend

    Doing this avoid conflicts and errors reported on the bus.
    
    The interrupts are only re-enabled on resume after the firmware is
    downloaded, so the behavior is not fully symmetric
    
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    40eee0d View commit details
    Browse the repository at this point in the history
  48. ASoC: SOF: Intel: add build support for SoundWire

    Select SoundWire capabilities on newer Intel platforms, starting with
    CannonLake/CoffeeLake/CometLake.
    
    As done for HDaudio, the SoundWire link is an opt-in capability. We
    explicitly test for ACPI to avoid warnings on unmet dependencies on
    the SoundWire side.
    
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    ddbf870 View commit details
    Browse the repository at this point in the history
  49. ASoC: SOF: Intel: hda-ctrl: add reset cycle before parsing capabilities

    Without this cycle, HDaudio capability parsing fails on some devices.
    
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    82023a2 View commit details
    Browse the repository at this point in the history
  50. ASoC: SOF: Intel: hda: merge IPC, stream and SoundWire interrupt hand…

    …lers
    
    We have a single irq handler for SOF interrupts. We can further merge
    SoundWire ones to completely remove MSI interrupts handling issues
    leading to timeouts.
    
    Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    bardliao authored and plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    9486e86 View commit details
    Browse the repository at this point in the history
  51. ASoC: codecs: rt700: add Soundwire support

    Initial support for ALC/RT700 in SoundWire mode
    
    This codec is present on Intel CNL/CML and ICL RVP boards and the code
    was tested by both Realtek and Intel.
    
    Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    Signed-off-by: Shuming Fan <shumingf@realtek.com>
    shumingfan authored and plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    e45d7c5 View commit details
    Browse the repository at this point in the history
  52. ASoC: codecs: rt1308: add SoundWire support

    The driver for this amplifier was tested by Realtek and Intel using
    the Realtek 3-in-1 add-on boards connected to CometLake and IceLake
    platforms
    
    Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    Signed-off-by: Shuming Fan <shumingf@realtek.com>
    shumingfan authored and plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    2a12e31 View commit details
    Browse the repository at this point in the history
  53. ASoC: codecs: rt711: add SoundWire support

    The driver for this codec was tested by Realtek and Intel using the
    Realtek 3-in-1 add-on board connected to CometLake and IceLake
    platforms.
    
    Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    Signed-off-by: Shuming Fan <shumingf@realtek.com>
    shumingfan authored and plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    dd2d2b9 View commit details
    Browse the repository at this point in the history
  54. ASoC: codecs: rt715: add SoundWire support

    The driver for this capture device was tested by Realtek and Intel
    using the Realtek 3-in-1 add-on boards connected to CometLake and
    IceLake platforms
    
    Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    Signed-off-by: Jack Yu <jack.yu@realtek.com>
    Jack Yu authored and plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    4d00532 View commit details
    Browse the repository at this point in the history
  55. ASoC: codecs: Add DEBUG to Makefile

    Don't push upstream
    
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    e9586e4 View commit details
    Browse the repository at this point in the history
  56. ASoC: codecs: rt715: rt715_sdw_regmap can be static

    Fixes: 340dea8 ("ASoC: codecs: rt715: add SoundWire support")
    Signed-off-by: kbuild test robot <lkp@intel.com>
    intel-lab-lkp authored and plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    4e927a0 View commit details
    Browse the repository at this point in the history
  57. ASoC: rt711: changes 32bits address mapping of index defined register…

    …s to 24bits
    
    It takes too many times to dump the registers when using 32 bits mapping.
    We change it to 24 bits to map the Realtek index defined registers.
    And this patch fixes some coding style.
    
    Signed-off-by: Shuming Fan <shumingf@realtek.com>
    shumingfan authored and plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    0f5f699 View commit details
    Browse the repository at this point in the history
  58. ASoC: rt700: changes 32bits address mapping of index defined register…

    …s to 24bits
    
    It takes too many times to dump the registers when using 32 bits mapping.
    We change it to 24 bits to map the Realtek index defined registers.
    And this patch fixes some coding style.
    
    Signed-off-by: Shuming Fan <shumingf@realtek.com>
    shumingfan authored and plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    37c270e View commit details
    Browse the repository at this point in the history
  59. ASoC: rt1308-sdw: fix some coding style

    Signed-off-by: Shuming Fan <shumingf@realtek.com>
    shumingfan authored and plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    c5d1c67 View commit details
    Browse the repository at this point in the history
  60. Resume correct register setting for dmic recording after suspend.

    Signed-off-by: Jack Yu <jack.yu@realtek.com>
    Jack Yu authored and plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    601477c View commit details
    Browse the repository at this point in the history
  61. ASoC: rt711: add JD2 configuration

    In dell project, the JD source changes to JD2.
    Therefore, the codec driver add the JD2 configuration in default.
    The application circuit also changes to JD2 as JD source.
    
    Signed-off-by: Shuming Fan <shumingf@realtek.com>
    shumingfan authored and plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    f6b96b8 View commit details
    Browse the repository at this point in the history
  62. ASoC: codec:rt715-sdw:Modify register mapping of index from 32bits to…

    … 24bits.
    
    Signed-off-by: Jack Yu <jack.yu@realtek.com>
    Jack Yu authored and plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    e1f3e6f View commit details
    Browse the repository at this point in the history
  63. ASoC: rt700: fix pop noise while stopping playback

    Signed-off-by: Shuming Fan <shumingf@realtek.com>
    shumingfan authored and plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    35d7ecd View commit details
    Browse the repository at this point in the history
  64. ASoC: rt711: fix pop noise while stopping playback

    Signed-off-by: Shuming Fan <shumingf@realtek.com>
    shumingfan authored and plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    2fdd576 View commit details
    Browse the repository at this point in the history
  65. ASoC: rt1308-sdw: fix DC offset loading from EFUSE and increase DAC v…

    …olume
    
    Fix the PVDD DC calibration parameters doesn't be loaded correctly.
    The DAC volume gain adjusts to the 0xe7 value which HW AE suggests.
    
    Signed-off-by: Shuming Fan <shumingf@realtek.com>
    shumingfan authored and plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    682ae36 View commit details
    Browse the repository at this point in the history
  66. ASoC: codec:rt715-sdw: Modify some ret values regarding to warning an…

    …d add return handle for regmap_read.
    
    Signed-off-by: Jack Yu <jack.yu@realtek.com>
    Jack Yu authored and plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    6f42a38 View commit details
    Browse the repository at this point in the history
  67. ASoC: rt1308-sdw: output gain enhancement

    The HW engineer changes HV_Gain voltage setting to enhance the output gain.
    And he also adjusts the DAC volume gain.
    
    Signed-off-by: Shuming Fan <shumingf@realtek.com>
    shumingfan authored and plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    64ac08f View commit details
    Browse the repository at this point in the history
  68. ASoC: rt711: move rt711_parse_dt to rt711_probe

    Intel add device property on machine driver. So we can't parse device
    before machine driver is probed.
    
    Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
    bardliao authored and plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    603de04 View commit details
    Browse the repository at this point in the history
  69. ASoC: codecs: rt1308-sdw.c: wait for initialization_complete

    Make sure the resume steps are delayed until all settings have been
    restored after the device becomes enumerated and .update_status is
    called.
    
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    74e30f0 View commit details
    Browse the repository at this point in the history
  70. ASoC: codecs: rt700-sdw.c: wait for initialization_complete

    Make sure the resume steps are delayed until all settings have been
    restored after the device becomes enumerated and .update_status is
    called.
    
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    239f56e View commit details
    Browse the repository at this point in the history
  71. ASoC: codecs: rt711-sdw.c: wait for initialization_complete

    Make sure the resume steps are delayed until all settings have been
    restored after the device becomes enumerated and .update_status is
    called.
    
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    9fd9c4f View commit details
    Browse the repository at this point in the history
  72. ASoC: codecs: rt715-sdw.c: wait for initialization_complete

    Make sure the resume steps are delayed until all settings have been
    restored after the device becomes enumerated and .update_status is
    called
    
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    f040c08 View commit details
    Browse the repository at this point in the history
  73. ASoC: rt700: enable wake_capable

    Signed-off-by: Shuming Fan <shumingf@realtek.com>
    shumingfan authored and plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    dd2a176 View commit details
    Browse the repository at this point in the history
  74. ASoC: rt711: enable wake_capable

    Signed-off-by: Shuming Fan <shumingf@realtek.com>
    shumingfan authored and plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    dd55bc8 View commit details
    Browse the repository at this point in the history
  75. ASoC: rt715: enable wake_capable

    Signed-off-by: Shuming Fan <shumingf@realtek.com>
    shumingfan authored and plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    b2fe044 View commit details
    Browse the repository at this point in the history
  76. ASoC: rt700: re-do io_init in cache_bypass mode when system resume

    Signed-off-by: Shuming Fan <shumingf@realtek.com>
    shumingfan authored and plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    4f90244 View commit details
    Browse the repository at this point in the history
  77. ASoC: rt711: re-do io_init in cache_bypass mode when system resume

    Signed-off-by: Shuming Fan <shumingf@realtek.com>
    shumingfan authored and plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    29631f7 View commit details
    Browse the repository at this point in the history
  78. ASoC: rt1308-sdw: re-do io_init in cache_bypass mode when system resume

    Signed-off-by: Shuming Fan <shumingf@realtek.com>
    shumingfan authored and plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    22bfb4e View commit details
    Browse the repository at this point in the history
  79. ASoC: codec: rt715: Remove unused rt715_index_read function.

    Signed-off-by: Jack Yu <jack.yu@realtek.com>
    Jack Yu authored and plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    2e6366c View commit details
    Browse the repository at this point in the history
  80. ASoC: codecs: rt1308-sdw: check unattach request before wait_for_comp…

    …letion()
    
    Only start the wait_for_completion() if the Master device requested the
    Slave device status to become unattached, e.g with a bus reset. For
    normal pm_runtime resume just sync the regmap
    
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    264bfc0 View commit details
    Browse the repository at this point in the history
  81. ASoC: codecs: rt700-sdw: check unattach request before wait_for_compl…

    …etion()
    
    Only start the wait_for_completion() if the Master device requested
    the Slave device status to become unattached, e.g with a bus
    reset. For normal pm_runtime resume just sync the regmap
    
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    31a9e73 View commit details
    Browse the repository at this point in the history
  82. ASoC: codecs: rt711-sdw: check unattach request before wait_for_compl…

    …etion()
    
    Only start the wait_for_completion() if the Master device requested
    the Slave device status to become unattached, e.g with a bus
    reset. For normal pm_runtime resume just sync the regmap
    
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    88c1ff3 View commit details
    Browse the repository at this point in the history
  83. ASoC: codecs: rt715-sdw: check unattach request before wait_for_compl…

    …etion()
    
    Only start the wait_for_completion() if the Master device requested
    the Slave device status to become unattached, e.g with a bus
    reset. For normal pm_runtime resume just sync the regmap
    
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    4d0fd6f View commit details
    Browse the repository at this point in the history
  84. ASoC: rt711: fix no sound output after waking up from deep s3

    The resume function needs to cache sync JD2 settings.
    
    Signed-off-by: Shuming Fan <shumingf@realtek.com>
    shumingfan authored and plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    2a360c1 View commit details
    Browse the repository at this point in the history
  85. Correct some sdw default registers and add missing registers in rt715…

    …_reg_defaults[]
    
    Signed-off-by: Jack Yu <jack.yu@realtek.com>
    Jack Yu authored and plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    a9afd6b View commit details
    Browse the repository at this point in the history
  86. ASoC: rt5682: Add the field "is_sdw" of private data

    The field "is_sdw" is used for distinguishing the driver whether is run
    in soundwire mode or not. That will run the separated setting in runtime
    to make sure the driver can be run with the same build between i2s mode
    and soundwire mode.
    
    Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
    oder-chiou authored and plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    4d3e7b0 View commit details
    Browse the repository at this point in the history
  87. ASoC: rt5682: Add the soundwire support

    This patch adds the soundwire support for ALC5682.
    
    Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
    oder-chiou authored and plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    2ee60c0 View commit details
    Browse the repository at this point in the history
  88. Add missing rt715_reg_defaults values.

    Signed-off-by: Jack Yu <jack.yu@realtek.com>
    Jack Yu authored and plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    24c461d View commit details
    Browse the repository at this point in the history
  89. ASoC: rt5682: Fix the merging conflict

    This patch fixes the patch "ASoC: rt5682: fix i2c arbitration lost issue"
    that is conflicted during the merging.
    
    Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
    oder-chiou authored and plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    edace81 View commit details
    Browse the repository at this point in the history
  90. ASoC: rt700: mark cache_dirty if redo the io_init funciton

    If the resume process redo the io_init function,
    I want to make sure the cache value will be synced again.
    And the first_init variable changes name to first_hw_init.
    
    Signed-off-by: Shuming Fan <shumingf@realtek.com>
    shumingfan authored and plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    3898542 View commit details
    Browse the repository at this point in the history
  91. ASoC: rt711: mark cache_dirty if redo the io_init funciton

    If the resume process redo the io_init function,
    I want to make sure the cache value will be synced again.
    And the first_init variable changes name to first_hw_init.
    
    Signed-off-by: Shuming Fan <shumingf@realtek.com>
    shumingfan authored and plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    3e22a3c View commit details
    Browse the repository at this point in the history
  92. ASoC: rt715: mark cache_dirty if redo the io_init funciton

    If the resume process redo the io_init function,
    I want to make sure the cache value will be synced again.
    And the first_init variable changes name to first_hw_init.
    
    Signed-off-by: Shuming Fan <shumingf@realtek.com>
    shumingfan authored and plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    cb483be View commit details
    Browse the repository at this point in the history
  93. ASoC: rt1308-sdw: mark cache_dirty if redo the io_init funciton

    If the resume process redo the io_init function,
    I want to make sure the cache value will be synced again.
    And the first_init variable changes name to first_hw_init.
    
    Signed-off-by: Shuming Fan <shumingf@realtek.com>
    shumingfan authored and plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    29620d4 View commit details
    Browse the repository at this point in the history
  94. ASoC: rt700: Add pin sense check during jack type detection

    To avoid IO error, the codec driver needs to check the pin sense
    during jack type detection.
    Due to the jack type detection will take some times in the loop,
    in case the jack is removed during this time, then the driver goes into suspend mode.
    The IO error will occur in the rest of process.
    
    Signed-off-by: Shuming Fan <shumingf@realtek.com>
    shumingfan authored and plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    8b8f892 View commit details
    Browse the repository at this point in the history
  95. ASoC: rt711: Add pin sense check during jack type detection

    To avoid IO error, the codec driver needs to check the pin sense
    during jack type detection.
    Due to the jack type detection will take some times in the loop,
    in case the jack is removed during this time, then the driver goes into suspend mode.
    The IO error will occur in the rest of process.
    
    Signed-off-by: Shuming Fan <shumingf@realtek.com>
    shumingfan authored and plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    471eb17 View commit details
    Browse the repository at this point in the history
  96. ASoC: Intel: common: soc-acpi: declare new tables for SoundWire

    We cannot really lump SoundWire-based configurations into the same
    tables since the mechanisms to identify boards is based on link
    configurations and _ADR instead of _HID for I2S, so define new tables
    
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    b5405cd View commit details
    Browse the repository at this point in the history
  97. ASoC: Intel: common: add match tables for ICL w/ SoundWire

    The two configurations are with the Realtek 3-in-1 board requiring all
    4 links to be enabled, or basic configuration with the on-board RT700
    using link0.
    
    Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    bardliao authored and plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    ab88261 View commit details
    Browse the repository at this point in the history
  98. ASoC: Intel: common: add match tables for CNL/CFL/CML w/ SoundWire

    The two configurations are with the Realtek 3-in-1 board requiring all
    4 links to be enabled, or basic configuration with the on-board
    RT700 using link1.
    
    For now we only have definitions for CML, CNL and CFL are just
    placeholders.
    
    Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
    Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    RanderWang authored and plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    d07a7fc View commit details
    Browse the repository at this point in the history
  99. ASoC: Intel: common: add match tables for TGL w/ SoundWire

    RT711 is in SoundWire mode on link0 and RT1308 on SSP2.
    
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    96da8f2 View commit details
    Browse the repository at this point in the history
  100. ASoC: SOF: Intel: reference SoundWire machine lists

    Use static tables to automatically select the relevant configurations.
    
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    2bee698 View commit details
    Browse the repository at this point in the history
  101. ASoC: Intel: boards: add sdw_rt700 machine driver

    This machine driver supports CML and ICL RVP boards in SoundWire
    mode only. These boards need to be reworked to support the SoundWire
    link and the BIOS advanced config menu also needs to select SoundWire
    for links 0 (ICL) or 1 (CML).
    
    Unlike a lot of machine drivers, we use different DAI links for
    capture and playback since SoundWire PDIs can do capture OR playback,
    not both simultaneously.
    
    Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
    Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    b8d18c0 View commit details
    Browse the repository at this point in the history
  102. ASoC: Intel: boards: add sdw_rt711_rt1308_rt715 3-in-1 config support

    Add configuration with 4 SoundWire links connected to RT711, RT1308
    (2x) and RT715, using the '3-in-1' test card. This topology will also
    be used on actual form-factors.
    
    Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    dac84d5 View commit details
    Browse the repository at this point in the history
  103. ASoC: Intel: boards: sdw_rt711: add machine driver

    Simpler subset of rt711_rt1308_rt715. The RT711 is assumed to be
    located on Link0.
    
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    5908c71 View commit details
    Browse the repository at this point in the history
  104. ASoC: Intel: boards: SoundWire rt711 + I2S RT1308 configuration

    This is the baseline for TGL RVP
    
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    7c97c7e View commit details
    Browse the repository at this point in the history
  105. NOT FOR UPSTREAM: Add debug for boards

    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    7d4d434 View commit details
    Browse the repository at this point in the history
  106. ASoC: intel: sdw_rt711_rt1308_rt715: remove ENABLE_RT1308_SDW2 flag

    We can use quick to decide if we need 2nd rt1308 or not.
    
    Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
    bardliao authored and plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    4654b7b View commit details
    Browse the repository at this point in the history
  107. ASoC: intel: sdw_rt711_rt1308_rt715: Use a fixed number of num_links and

    num__configs
    
    mc_probe could be called multiple times and card->num_links will
    decrease in each time when mc_probe is called. Same as num_configs.
    
    Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
    bardliao authored and plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    5dcddad View commit details
    Browse the repository at this point in the history
  108. ASoC: intel:sdw_rt711_i2s_rt1308: add quirk for rt711

    Set rt711 device property on machine driver according to DMI.
    On TGL, JD1 is used for headphone.
    
    Signed-off-by: Rander Wang <rander.wang@intel.com>
    Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
    RanderWang authored and plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    7a4faf4 View commit details
    Browse the repository at this point in the history
  109. ASoC: intel: refine sdw_rt711_rt1308_rt715

    Remove redundant definition.
    
    Signed-off-by: Rander Wang <rander.wang@intel.com>
    RanderWang authored and plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    219ae1a View commit details
    Browse the repository at this point in the history
  110. ASoC: Intel: sdw_rt711_rt1308_rt715: get more specific DMI info

    Not all Dell machine work with mono rt1308.
    
    Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
    bardliao authored and plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    692235c View commit details
    Browse the repository at this point in the history
  111. ASoC: Intel: sdw_rt711_rt1308_rt715: add Dell XPS to DMI table

    To set proper configurations.
    
    Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
    bardliao authored and plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    cf73676 View commit details
    Browse the repository at this point in the history
  112. ALSA: HDA: intel-dsp-config: add DMI info for Dell laptop

    The laptop doesn't use DMIC, but use SOF.
    
    Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
    bardliao authored and plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    047e733 View commit details
    Browse the repository at this point in the history
  113. soundwire: cadence_master: handle multiple status reports per Slave

    When a Slave reports multiple status in the sticky bits, find the
    latest configuration from the mirror of the PING frame status and
    update the status directly.
    
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    b815293 View commit details
    Browse the repository at this point in the history
  114. soundwire: Add generic bandwidth allocation algorithm

    This algorithm computes bus parameters like clock frequency, frame
    shape and port transport parameters based on active stream(s) running
    on the bus.
    
    Developers can also implement their own .compute_params() callback for
    specific resource management algorithm, and set if before calling
    sdw_add_bus_master()
    
    Credits: this patch is based on an earlier internal contribution by
    Vinod Koul, Sanyog Kale, Shreyas Nc and Hardik Shah. All hard-coded
    values were removed from the initial contribution to use BIOS
    information instead.
    
    FIXME: remove checkpatch report
    WARNING: Reusing the krealloc arg is almost always a bug
    +			group->rates = krealloc(group->rates,
    
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    de4ba5d View commit details
    Browse the repository at this point in the history
  115. soundwire: dynamic_allocation: set grp_ctrl_valid false

    Some Realtek codecs don't support grp_ctrl_valid. Set it to false
    to prevent DPN_BlockCtrl2 reg write failed.
    
    Signed-off-by: Bard Liao <bardliao@gmail.com>
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    bardliao authored and plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    447c3b5 View commit details
    Browse the repository at this point in the history
  116. soundwire: bus: fix device number leak on errors

    If the programming of the dev_number fails due to an IO error, a new
    device_number will be assigned, resulting in a leak.
    
    Make sure we only assign a device_number once per Slave device.
    
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    6f89626 View commit details
    Browse the repository at this point in the history
  117. soundwire: intel: modify DMAT field for ALH

    The current value for this field is too low and results in some
    samples getting dropped and playback being faster than normal.
    
    Increase the value to a safer value.
    
    Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    bardliao authored and plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    6b1f74e View commit details
    Browse the repository at this point in the history
  118. soundwire: intel: fix factor of two in MCLK handling

    Somehow Intel folks were confused, the property is 2x what the mclk
    frequency actually is, as checked with the actual bus frequency.
    
    Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    bardliao authored and plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    95422d9 View commit details
    Browse the repository at this point in the history
  119. soundwire: cadence_master: log register write info

    useful for debug, but can be verbose so only enable if strictly needed.
    
    Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    b7652fb View commit details
    Browse the repository at this point in the history
  120. add more traces to bus code

    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    c68c1e5 View commit details
    Browse the repository at this point in the history
  121. add traces for bus

    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    c1ecac7 View commit details
    Browse the repository at this point in the history
  122. [HACK] soundwire: add dynamic DEBUG in makefile

    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    43b6f49 View commit details
    Browse the repository at this point in the history
  123. ALSA: HDA: intel-dsp-config: add DMI info for Dell laptop

    Another Dell laptop uses SOF with CML platform
    
    Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
    bardliao authored and plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    a23cd53 View commit details
    Browse the repository at this point in the history
  124. Soundwire: generic_bandwidth_allocation: don't free params if it is null

    We will free params when we goto out in sdw_compute_port_params(). But
    we can't free params if it is not allocated successfully.
    
    Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
    bardliao authored and plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    fbb3cda View commit details
    Browse the repository at this point in the history
  125. soundwire: cadence_master: remove useless variable incrementation

    Fix cppcheck warning:
    
    drivers/soundwire/cadence_master.c:992:9: style: Variable 'offset' is
    assigned a value that is never used. [unreadVariable]
     offset += stream->num_out;
            ^
    
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    71d66fd View commit details
    Browse the repository at this point in the history
  126. soundwire: cadence_master: fix a io timeout issue in S3 test

    After system resumes from S3, io timeout occurs when setting one
    unused master on Comet Lake platform. In this case, the master is
    reset to default state, and FIFOLEVEL is reset to default value,
    but msg_count used for tracing FIFOLEVEL is still with old value,
    so FIFOLEVEL will not be set if a new msg FIFO usage is equal to
    the old msg_count.
    
    This patch updates msg_count to default value of FIFOLEVEL when
    resetting master.
    
    Tested on Comet Lake platform.
    
    Signed-off-by: Rander Wang <rander.wang@intel.com>
    RanderWang authored and plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    ca4fdc2 View commit details
    Browse the repository at this point in the history
  127. Soundwire: register intel sdw master driver with driver_register()

    dev->power.no_pm_callbacks flag is used to check if there is pm ops
    for the device. Pm callback function will not be invoked if there is
    no pm ops. Currently the flag is true for sdw-master devices which
    is incorrect since we do have pm ops in intel_sdw_driver. As a result,
    intel_suspend() which is the suspend callback function of intel-sdw
    driver may not be invoked in system suspend.
    With driver_register() and setting md->dev.driver before
    device_register(), dev->power.no_pm_callbacks flag will be set to the
    correct value (false) by device_pm_check_callbacks() which will be
    triggered by device_register().
    
    Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
    bardliao authored and plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    540e010 View commit details
    Browse the repository at this point in the history
  128. Merge remote-tracking branch 'sof/integration/soundwire-interfaces' i…

    …nto integration/soundwire-latest
    
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    a3b1f3e View commit details
    Browse the repository at this point in the history
  129. Merge remote-tracking branch 'sof/integration/soundwire-intel' into i…

    …ntegration/soundwire-latest
    
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    aaddede View commit details
    Browse the repository at this point in the history
  130. Merge remote-tracking branch 'sof/integration/soundwire-sof' into int…

    …egration/soundwire-latest
    
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    d362415 View commit details
    Browse the repository at this point in the history
  131. Merge remote-tracking branch 'sof/integration/realtek-sdw-codecs' int…

    …o integration/soundwire-latest
    
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    e08f33a View commit details
    Browse the repository at this point in the history
  132. Merge remote-tracking branch 'sof/integration/soundwire-machine-drive…

    …rs' into integration/soundwire-latest
    
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    dd03f5f View commit details
    Browse the repository at this point in the history
  133. Merge remote-tracking branch 'sof/integration/soundwire-debug-fixes' …

    …into integration/soundwire-latest
    
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    e888e6e View commit details
    Browse the repository at this point in the history
  134. ASoC: SOF: Intel: hda: specify behavior for clock stop

    For now we only support a complete teardown.
    
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    b64ca26 View commit details
    Browse the repository at this point in the history
  135. soundwire: intel_init: add support for clock_stop quirks

    Just pass the information provided by the parent (SOF driver)
    
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    95ff781 View commit details
    Browse the repository at this point in the history
  136. soundwire: intel: add CLK_STOP_TEARDOWN for pm_runtime suspend

    Now that we have options, add support for TEARDOWN mode (same
    functionality as existing code)
    
    All other modes will be added in follow-up patches.
    
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    1f43714 View commit details
    Browse the repository at this point in the history
  137. soundwire: bus: add clock stop helpers

    SoundWire supports two clock stop modes. Add support to handle the
    clock stop modes and add pm_runtime calls in the bus.
    
    Signed-off-by: Rander Wang <rander.wang@intel.com>
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    RanderWang authored and plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    6c70bf8 View commit details
    Browse the repository at this point in the history
  138. soundwire: cadence_master: simplifiy cdns_init()

    There is no need for the clock_stop_exit argument with the latest
    implementation
    
    Signed-off-by: Rander Wang <rander.wang@intel.com>
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    RanderWang authored and plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    0f2ca39 View commit details
    Browse the repository at this point in the history
  139. soundwire: cadence_master: add clock_stop/restart routines

    Add support for clock stop and restart, with two configuration
    parameters:
    
    1) when entering the ClockStop mode, Slave-initiated wakes can be
    prevented.
    
    2) When exiting the ClockStop mode, the caller can request a Bus Reset
    (either if all Slaves were configured in ClockStopMode1 or the Master
    IP lost context and enumeration is required)
    
    Signed-off-by: Rander Wang <rander.wang@intel.com>
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    RanderWang authored and plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    4f251a4 View commit details
    Browse the repository at this point in the history
  140. soundwire: intel: add CLK_STOP_BUS_RESET support

    Move existing pm_runtime suspend under the CLK_STOP_TEARDOWN case.
    
    In this mode the Master IP will lose all context but in-band wakes are
    supported.
    
    On pm_runtime resume a complete re-enumeration will be performed after
    a bus reset.
    
    Signed-off-by: Rander Wang <rander.wang@intel.com>
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    RanderWang authored and plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    72b964e View commit details
    Browse the repository at this point in the history
  141. soundwire: intel: add CLK_STOP_NOT_ALLOWED support

    In case the clock needs to keep running, we need to prevent the Master
    from entering pm_runtime suspend.
    
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    dd6d5f9 View commit details
    Browse the repository at this point in the history
  142. soundwire: intel: add wake interrupt support

    When system is suspended in clock stop mode on intel platforms, both
    master and slave are in clock stop mode and soundwire bus is taken
    over by a glue hardware. The bus message for jack event is processed
    by this glue hardware, which will trigger an interrupt to resume audio
    pci device. Then audio pci driver will resume soundwire master and slave,
    transfer bus ownership to master, finally slave will report jack event
    to master and codec driver is triggered to check jack status.
    
    Signed-off-by: Rander Wang <rander.wang@intel.com>
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    RanderWang authored and plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    e59726e View commit details
    Browse the repository at this point in the history
  143. soundwire: intel_init: handle power rail dependencies for clock stop …

    …mode
    
    When none of the clock stop quirks is specified, the Master IP will
    assume the context is preserved and will not reset the Bus and restart
    enumeration. Due to power rail dependencies, the HDaudio controller
    needs to remain powered and prevented from executing its pm_runtime
    suspend routine.
    
    This choice of course has a power impact, and this mode should only be
    selected when latency requirements are critical or the parent device
    can enter D0ix modes.
    
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    c9c59df View commit details
    Browse the repository at this point in the history
  144. soundwire: intel: support clock_stop mode without quirks

    In this mode, on restart the bus restarts immediately, the Slaves
    remain synchronized and all context is kept intact.
    
    Signed-off-by: Rander Wang <rander.wang@intel.com>
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    d0351fc View commit details
    Browse the repository at this point in the history
  145. ASoC: SOF: Intel: hda: add WAKEEN interrupt support for SoundWire

    When a SoundWire link is in clock stop state, a Slave device may wake
    up the Master for some events such as jack detection. The WAKEEN
    interrupt will be triggered and processed by the audio pci device.
    
    If audio device is in D3, the interrupt will be routed to PME, or
    aggregated at cAVS level as interrupt when audio device is in D0. This
    patch only supports D3 case, where the audio pci device will be
    resumed by a PME event and the WAKEEN interrupt will be processed
    after audio pci device is powered up and ROM is initialized
    successfully.
    
    The WAKEEN handling is only enabled after the first boot due to
    dependencies on a shim_lock mutex being initialized.
    
    Signed-off-by: Rander Wang <rander.wang@intel.com>
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    RanderWang authored and plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    466a741 View commit details
    Browse the repository at this point in the history
  146. ASoC: SOF: Intel: hda: add parameter to control SoundWire clock stop …

    …quirks
    
    Add module parameter so that the different modes can be quickly tested.
    
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    510949e View commit details
    Browse the repository at this point in the history
  147. Asoc: SOF: Intel: hda: check SoundWire wakeen interrupt in irq thread

    If pci device is in D0, wakeen interrupt will be
    aggregated at cAVS level as interrupt. This commit
    check the wakeen status and process it in irq thread
    
    Signed-off-by: Rander Wang <rander.wang@intel.com>
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    RanderWang authored and plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    ffc15bd View commit details
    Browse the repository at this point in the history
  148. soundwire: bus: fix io error when processing alert event

    There are two types of io error when processing alert event.
    The first one is: master receives a alert event for jack event
    and invokes implement_def function in slave to check jack status.
    At this time codec is just suspended, so io registers can't be
    accessed. Another one is: when waken up from clock stop state
    and bus needs a complete re-enumeration for synchronization issue
    , slave register can't be accessed.
    
    This patch wakes up codec and wait for initialization complete
    when processing slave alert event, so that io registers can be
    accessed.
    
    Signed-off-by: Rander Wang <rander.wang@intel.com>
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    RanderWang authored and plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    b5de086 View commit details
    Browse the repository at this point in the history
  149. soundwire: cadence_master: add interface to check clock status

    If master is in clock stop state, driver can't modify registers
    in master except the registers for clock stop setting.
    
    Signed-off-by: Rander Wang <rander.wang@intel.com>
    RanderWang authored and plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    881cd7b View commit details
    Browse the repository at this point in the history
  150. soundwire: intel: Fix a io timeout issue if SDW_INTEL_CLK_STOP_BUS_RESET

    is set
    
    If two masters are working and one of them become suspended and activated
    again, this master will be failed to resumed in SDW_INTEL_CLK_STOP_BUS_RESET
    mode. The reason is: on intel platform, there are four masters in the same
    power domain. If one master is active, all other masters are always powered on.
    Each master will be set to clock stop when it is inactive. And in resume function
    each master will be initialized because it asummes it is powered off. But if the
    master is not powered off, it should be in clock stop state, and the normal
    initialization will be failed in this state.
    
    Now check clock status and don't initialize master if it is in clock
    stop mode.
    
    Signed-off-by: Rander Wang <rander.wang@intel.com>
    RanderWang authored and plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    f2b9d04 View commit details
    Browse the repository at this point in the history
  151. soundwire: cadence_master: debug error on Olympic device in clock_stop

    Somehow the master-2 fails to stop the clock
    
    [   24.007288] intel-sdw sdw-master-2: intel_suspend_runtime start
    [   24.007297] intel-sdw sdw-master-2: sdw_cdns_clock_stop: start
    [   24.007303] intel-sdw sdw-master-2: sdw_cdns_clock_stop: slave attached 0
    [   24.007498] intel-sdw sdw-master-2: Msg ignored for Slave 15
    [   24.007501] intel-sdw sdw-master-2: ClockStopNow Broadcast message failed -61
    [   24.007505] intel-sdw sdw-master-2: bus clock stop failed -61
    [   24.007508] intel-sdw sdw-master-2: cannot enable clock stop on suspend
    
    there are not slaves attached, so the command ignored should be accepted
    
    what's not clear is what the CMD_ACCEPT (1) is already the default?
    
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    b8cb68e View commit details
    Browse the repository at this point in the history
  152. soundwire: bus: add traces for slave alerts

    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    162fe5d View commit details
    Browse the repository at this point in the history
  153. soundwire: cadence_master: add traces for Slave state change

    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    8b1f399 View commit details
    Browse the repository at this point in the history
  154. soundwire: bus: add traces for Slave state changes

    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    a2715bd View commit details
    Browse the repository at this point in the history
  155. ASoC: codecs: rt711-sdw: add traces for suspend-resume

    These traces show the suspend can happen before jack detection is complete
    
    [  184.045885] rt711 sdw:0:25d:711:0: [rt711_sdw_read] 7520 85a0 9c20 aca0 => 00000404
    [  184.056884] rt711 sdw:0:25d:711:0: [rt711_sdw_read] 7520 85a0 9c20 aca0 => 00000404
    [  184.067823] rt711 sdw:0:25d:711:0: [rt711_sdw_read] 7520 85a0 9c20 aca0 => 00000404
    [  184.078824] rt711 sdw:0:25d:711:0: [rt711_sdw_read] 7520 85a0 9c20 aca0 => 00000404
    [  184.089928] rt711 sdw:0:25d:711:0: [rt711_sdw_read] 7520 85a0 9c20 aca0 => 00000404
    [  184.100949] rt711 sdw:0:25d:711:0: [rt711_sdw_read] 7520 85a0 9c20 aca0 => 00000404
    [  184.111990] rt711 sdw:0:25d:711:0: [rt711_sdw_read] 7520 85a0 9c20 aca0 => 00000404
    [  184.121175] rt711 sdw:0:25d:711:0: rt711_dev_suspend start
    [  184.121183] rt711 sdw:0:25d:711:0: rt711_dev_suspend end
    [  184.121205] Failed to get private value: 752046 => 0000 ret=-16
    [  184.121214] IO error in rt711_headset_detect, ret -16
    [  184.121221] IO error in rt711_jack_detect_handler, ret -16
    
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    0c102a8 View commit details
    Browse the repository at this point in the history
  156. soundwire: cadence_master: enter clock stop if there are no Slaves pr…

    …esent
    
    If there aren't any Slaves present (ATTACHED or ALERT status), we can
    safely infore CMD_IGNORED/-ENODATA error codes. The Cadence IP is
    configured to handle such cases as success.
    
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    9524bf0 View commit details
    Browse the repository at this point in the history
  157. soundwire: bus: treat CMD_IGNORED as success on ClockStop

    If there are no Slaves in ATTACHED or ALERT mode, the
    CMD_IGNORED/-ENODATA error code is perfectly legit. Filter this case
    to report errors and let the caller deal with the CMD_IGNORED case.
    
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    d9317e4 View commit details
    Browse the repository at this point in the history
  158. soundwire: cadence_master: fix usage of CMD_ACCEPT

    cdns_updatel() applies its parameter assuming it's already shifted by
    the correct amount. Using '1' instead of BIT(1) is incorrect, fix.
    
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    204b6d5 View commit details
    Browse the repository at this point in the history
  159. soundwire: cadence_master: add traces for clock_restart

    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    f9c1bf7 View commit details
    Browse the repository at this point in the history
  160. soundwire: cadence_master: log more useful information during timeouts

    Add the type of command, device number, register offset and length to
    reverse engineer what caused the issue.
    
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    b49e4ab View commit details
    Browse the repository at this point in the history
  161. soundwire: intel: refine function for wakeen event processing

    if a slave has been attached to a bus, the slave->dev_num_sticky
    should be non-zero, so we can check this value to skip the
    ghost devices defined in ACPI table but not populated in hardware.
    
    Signed-off-by: Rander Wang <rander.wang@intel.com>
    RanderWang authored and plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    6fa65e2 View commit details
    Browse the repository at this point in the history
  162. soundwire: intel: refine runtime pm for SDW_INTEL_CLK_STOP_BUS_RESET

    When all the links are suspended, the HDaudio controller may suspend
    and the power rails to the SoundWire IP may be disabled, requiring a
    complete re-initialization/enumeration on resume. However, if one or
    more Masters remained active, the HDaudio controller will remain active
    and the power rails will remain enabled. As a result, during the link
    resume step we can check if the context was preserved by verifying if
    the clock was stopped, and avoid doing a complete bus reset and
    re-enumeration.
    
    Signed-off-by: Rander Wang <rander.wang@intel.com>
    RanderWang authored and plbossart committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    9477f3d View commit details
    Browse the repository at this point in the history

Commits on Dec 13, 2019

  1. Soundwire: bus: return in the while loop rather than break and return

    So we don't need extra if condition outside the while loop.
    
    Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
    bardliao authored and plbossart committed Dec 13, 2019
    Configuration menu
    Copy the full SHA
    14b02fb View commit details
    Browse the repository at this point in the history
  2. Soundwire: set is_slave only if the slave is attached

    We don't need to do anything for the slave if it is unattached.
    
    Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
    bardliao authored and plbossart committed Dec 13, 2019
    Configuration menu
    Copy the full SHA
    791e176 View commit details
    Browse the repository at this point in the history
  3. soundwire: test is_slave before list_for_each_entry(slave, &bus->slav…

    …es, node)
    
    We don't need to test each slave's status if we already know there
    is no slave attached.
    
    Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
    bardliao authored and plbossart committed Dec 13, 2019
    Configuration menu
    Copy the full SHA
    07ac7cd View commit details
    Browse the repository at this point in the history