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

Remove large global CPUs array. #4529

Merged

Commits on Aug 16, 2023

  1. ASoC: intel: sof_sdw: Move sdw_pin_index into private struct

    Whilst it should not cause any issues as only a single instance of the
    machine will be instantiated, it is still slightly better practice to
    keep working data in the private data structure, rather than a global
    variable. Move sdw_pin_index into the mc_private structure.
    
    Signed-off-by: Charles Keepax <[email protected]>
    charleskeepax committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    59a92f0 View commit details
    Browse the repository at this point in the history
  2. ASoC: intel: sof_sdw: Add simple DAI link creation helper

    The code contains a fair amount of state tracking and one part of that
    is keeping track of which entry in the large global cpus
    snd_soc_dai_link_component array is currently in use. Add a helper
    function to allocate a simple DAI link, this simplifies the
    code slightly and moves us in the direction of eliminating the need for
    the large global cpus array. This does slightly increase the number of
    allocations done, but this is probe time and the code already does a
    large number of allocations so this increase is small over all.
    
    Signed-off-by: Charles Keepax <[email protected]>
    charleskeepax committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    e258950 View commit details
    Browse the repository at this point in the history
  3. ASoC: intel: sof_sdw: Make create_sdw_dailink allocate link components

    Now only the SoundWire part of the code uses the global cpus array,
    remove it and have create_sdw_dailink allocate its own link components.
    This removes a lot of state being passed around in the driver, which
    simplifies things a fair bit.
    
    Signed-off-by: Charles Keepax <[email protected]>
    charleskeepax committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    1d42572 View commit details
    Browse the repository at this point in the history
  4. ASoC: intel: sof_sdw: Increment be_id in init_dai_link

    Rather than incrementing the ID for the dai_links in many places
    throughout the code, just increment it each time we initialise a new DAI
    link.
    
    Signed-off-by: Charles Keepax <[email protected]>
    charleskeepax committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    2d2922c View commit details
    Browse the repository at this point in the history