forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 140
ASoC: Intel: add I2S function topology support #5657
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
Open
bardliao
wants to merge
5
commits into
thesofproject:topic/sof-dev
Choose a base branch
from
bardliao:get-i2s-tplg
base: topic/sof-dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+298
−61
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
259d80c
ASoC: SOF: get nhlt from all topologies
bardliao de9aed8
ASoC: Intel: sof-function-topology-lib: create common helpers
bardliao 4ffadaa
ASoC: Intel: sof-function-topology-lib: add I2S support for sof_sdw_g…
bardliao a70ffa3
ASoC: Intel: sof-function-topology-lib: add get_function_topology for…
bardliao a0fd522
ASoC: soc-acpi-intel-ptl-match: I2S machines: use function topology
bardliao File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -760,8 +760,15 @@ void hda_set_dai_drv_ops(struct snd_sof_dev *sdev, struct snd_sof_dsp_ops *ops) | |
|
|
||
| if (sdev->pdata->ipc_type == SOF_IPC_TYPE_4 && !hda_use_tplg_nhlt) { | ||
| struct sof_ipc4_fw_data *ipc4_data = sdev->private; | ||
| struct snd_ipc4_nhlt *nhlt; | ||
|
|
||
| ipc4_data->nhlt = intel_nhlt_init(sdev->dev); | ||
| nhlt = devm_kzalloc(sdev->dev, sizeof(*nhlt), GFP_KERNEL); | ||
| if (!nhlt) | ||
| return; | ||
|
|
||
| nhlt->nhlt = intel_nhlt_init(sdev->dev); | ||
|
|
||
| list_add(&nhlt->list, &ipc4_data->nhlt_list); | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same here. |
||
| } | ||
| } | ||
| EXPORT_SYMBOL_NS(hda_set_dai_drv_ops, "SND_SOC_SOF_INTEL_HDA_COMMON"); | ||
|
|
@@ -770,9 +777,14 @@ void hda_ops_free(struct snd_sof_dev *sdev) | |
| { | ||
| if (sdev->pdata->ipc_type == SOF_IPC_TYPE_4) { | ||
| struct sof_ipc4_fw_data *ipc4_data = sdev->private; | ||
| struct snd_ipc4_nhlt *nhlt; | ||
|
|
||
| if (!hda_use_tplg_nhlt) | ||
| intel_nhlt_free(ipc4_data->nhlt); | ||
| if (!hda_use_tplg_nhlt) { | ||
| nhlt = list_first_entry(&ipc4_data->nhlt_list, | ||
| struct snd_ipc4_nhlt, list); | ||
| intel_nhlt_free(nhlt->nhlt); | ||
| list_del(&nhlt->list); | ||
| } | ||
|
|
||
| kfree(sdev->private); | ||
| sdev->private = NULL; | ||
|
|
||
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hrm, does this works?
nhltis a pointer, which has not been initialized.nhlt->nhltdereferencing a random memory and stores a pointer in random place, corrupting something?