Find codec driver by SoundWire address instead of guessing the name - #5927
Draft
rfvirgil wants to merge 3 commits into
Draft
Find codec driver by SoundWire address instead of guessing the name#5927rfvirgil wants to merge 3 commits into
rfvirgil wants to merge 3 commits into
Conversation
The struct sdw_bus * argument to sdw_extract_slave_id() is entirely bogus, and isn't needed for the ID conversion that this helper function performs. Also provide a stub implementation for !CONFIG_SOUNDWIRE so that callers can use if (!IS_REACHABLE(CONFIG_SOUNDWIRE)) style instead of having to be surrounded by #ifdefs. The bus argument was only used to get a struct device * for two dev_dbg() statements. This forced callers to have a valid struct sdw_bus object just to convert an ID from u64 to struct sdw_slave_id. The debug print is now a utility function sdw_debug_log_slave_id() that can be used anywhere and only requires a struct device *. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Add a function to walk the component list and call a callback for each component. This lest the machine driver implement its own component match. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
…ddress Use snd_soc_lookup_component_walk() to find the codec for the SoundWire address instead of trying to guess the name of the codec driver. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This series adds a walk function to ASoC so sof_sdw can find the codec driver by matching its SoundWire address instead of trying to guess the name of the codec driver.