-
Notifications
You must be signed in to change notification settings - Fork 350
dai: uaol: add support for Intel UAOL #10567
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: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -322,6 +322,17 @@ __cold int copier_dai_create(struct comp_dev *dev, struct copier_data *cd, | |
| if (ret) | ||
| return ret; | ||
| break; | ||
| case ipc4_alh_uaol_stream_link_output_class: | ||
| case ipc4_alh_uaol_stream_link_input_class: | ||
| dai.type = SOF_DAI_INTEL_UAOL; | ||
| dai.is_config_blob = true; | ||
| cd->gtw_type = ipc4_gtw_alh; | ||
| ret = ipc4_find_dma_config(&dai, gtw_cfg_data, gtw_cfg_szie); | ||
| if (ret != IPC4_SUCCESS) { | ||
| comp_err(dev, "No uaol dma_config found in blob!"); | ||
| return -EINVAL; | ||
|
Comment on lines
+325
to
+333
|
||
| } | ||
| break; | ||
| case ipc4_dmic_link_input_class: | ||
| dai.type = SOF_DAI_INTEL_DMIC; | ||
| dai.is_config_blob = true; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -60,6 +60,12 @@ void dai_set_link_hda_config(uint16_t *link_config, | |
| } | ||
| link_cfg.part.stream = common_config->host_dma_config[0]->stream_id; | ||
| break; | ||
| case SOF_DAI_INTEL_UAOL: | ||
| link_cfg.full = 0; | ||
| link_cfg.part.hchan = gtw_fmt->channels_count - 1; | ||
| link_cfg.part.dir = common_config->direction; | ||
| link_cfg.part.stream = common_config->host_dma_config[0]->stream_id; | ||
| break; | ||
|
Comment on lines
+63
to
+68
|
||
| default: | ||
| /* other types of DAIs not need link_config */ | ||
| return; | ||
|
|
@@ -112,6 +118,13 @@ int dai_config_dma_channel(struct dai_data *dd, struct comp_dev *dev, const void | |
| */ | ||
| channel = 0; | ||
| break; | ||
| #if ACE_VERSION > ACE_VERSION_1_5 | ||
| case SOF_DAI_INTEL_UAOL: | ||
| channel = 0; | ||
| if (dai->host_dma_config[0]->pre_allocated_by_host) | ||
| channel = dai->host_dma_config[0]->dma_channel_id; | ||
| break; | ||
| #endif | ||
| default: | ||
| /* other types of DAIs not handled for now */ | ||
| comp_err(dev, "Unknown dai type %d", dai->type); | ||
|
|
@@ -173,6 +186,8 @@ int ipc_dai_data_config(struct dai_data *dd, struct comp_dev *dev) | |
| comp_dbg(dev, "dai_data_config() SOF_DAI_INTEL_ALH dev->ipc_config.frame_fmt: %d, stream_id: %d", | ||
| dev->ipc_config.frame_fmt, dd->stream_id); | ||
|
|
||
| break; | ||
| case SOF_DAI_INTEL_UAOL: | ||
| break; | ||
| default: | ||
| /* other types of DAIs not handled for now */ | ||
|
|
||
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.
offsetof(struct ..., link_caps[dev_count])uses a non-constant array index; this is not valid with standardoffsetof/__builtin_offsetofand can fail to compile. Compute the size assizeof(*caps) + dev_count * sizeof(caps->link_caps[0])(or the equivalent using the element type) instead.