ASoC: partial match the sdca codec name#5664
ASoC: partial match the sdca codec name#5664bardliao wants to merge 3 commits intothesofproject:topic/sof-devfrom
Conversation
Add a helper to help user to get the component by name. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
| if (dai_info->codec_name) { | ||
| struct snd_soc_component *component; | ||
|
|
||
| component = snd_soc_lookup_component_by_name(dai_info->codec_name); |
There was a problem hiding this comment.
Can we be sure the component exists by this point?
There was a problem hiding this comment.
Can we be sure the component exists by this point?
No, but in theory, the function will be called again when the component probed and be registered.
|
Ok well it mostly works for me, will investigate the probe concerns a little more. One thing that is missing though is the handling of aux devices on the link, we added very basic support for this for the HID device and it would also need renaming. |
Oh, yes, I missed |
Currently, we can set codec name in the dai info which will be set as the codec component name in a DAI link. However, the codec name may not be fixed. For example, there is an index in a SDCA codec name and that is not fixed. Lookup the fixed codec name string from the component list to get the right component name to ensure the DAI link will bind to the right codec component. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
The index is not fixed and it will lead to the DAI link can't bind the codec component with the name when the index is different from the predefined one. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
3495316 to
e4b195e
Compare
Currently, we set a predefined codec component name in a DAI link. But the codec name may contain an index which is not fixed. This series suggest using partial match the codec name to fix the issue.