-
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
base: topic/sof-dev
Are you sure you want to change the base?
Conversation
Each function topology has its own NHLT blob sections. And we need to look for the matching blob from all the NHLT blobs. Also, move the error log to where the blob can't be found from all the NHLT blobs. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
The existing code supports get_function_tplg_files callback for SoundWire machine driver only. Some common sections can be used for other machines. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
…et_tplg_files The Intel SOF SDW machine drive also supports I2S interface. Add related supports for the sof_sdw_get_tplg_files() callback. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
… I2S machines Add sof_i2s_get_tplg_files() callback for Intel SOF I2S machines. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Use sof_i2s_get_tplg_files() for SOF es83x6 machines. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
ujfalusi
left a comment
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.
only checked the first patch
| } | ||
|
|
||
| dev_err(dev, "%s: No match for SSP%d in NHLT table\n", __func__, | ||
| dev_dbg(dev, "%s: No match for SSP%d in NHLT table\n", __func__, |
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.
I would have this as separate patch?
we are also going to look for DMIC blobs in several nhlt, so change those prints as well?
| struct snd_ipc4_nhlt *nhlt; | ||
|
|
||
| ipc4_data->nhlt = intel_nhlt_init(sdev->dev); | ||
| nhlt->nhlt = intel_nhlt_init(sdev->dev); |
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? nhlt is a pointer, which has not been initialized. nhlt->nhlt dereferencing a random memory and stores a pointer in random place, corrupting something?
| ipc4_data->nhlt = intel_nhlt_init(sdev->dev); | ||
| nhlt->nhlt = intel_nhlt_init(sdev->dev); | ||
|
|
||
| list_add(&nhlt->list, &ipc4_data->nhlt_list); |
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.
same here.
| struct snd_ipc4_nhlt { | ||
| struct list_head list; | ||
| void *nhlt; | ||
| size_t nhlt_size; |
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.
nhlt_size is not used
| size_t nhlt_size; | ||
| }; | ||
|
|
||
|
|
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.
extra line break
| channel_count, sample_rate, | ||
| dir, dev_type); | ||
| if (cfg) | ||
| break; |
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.
goto out; and remove the cfg check after the loop?
| struct snd_ipc4_nhlt *tplg_nhlt; | ||
|
|
||
| /* Get the nhlt from topology manifest*/ | ||
| tplg_nhlt = kzalloc(sizeof(*tplg_nhlt), GFP_KERNEL); |
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.
this is what is missing in hda-dai.c!
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.
but you need devm_kzalloc() to leak memory..
Currently, function topology is only used by the SoundWire machines. Extend the support to the I2S machines.