drivers: dai: extend user-space support to more DAI drivers - #101193
Merged
henrikbrixandersen merged 7 commits intoJan 13, 2026
Conversation
Handle the case if driver is not implementing get_properties_copy(). Document the behaviour and add a note that the method is optional and users need to be handle the case that not all drivers will have this method defined. Also add documentation on error codes. Drivers should use -ENOENT if no properties are defined for the device. This matches behaviour of dai_get_properties() returning NULL if there are no properties. Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
…copy Fix function indentation to match coding style. Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
…py() dai_ssp_get_properties() can return NULL if there are no properties defined for the device. Handle this case correctly in ssp driver's dai_ssp_get_properties_copy() by returning -ENOENT in this case. Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Make a in-kernel copy of 'cfg' parameter before passing the struct to kernel z_impl_dai_config_set() implementation. This ensures user-space will not have access to the object when kernel part of the syscall is running. Also add separate handling for the case where bespoke configuration object is NULL. While no current driver works without a bespoke configuration, this is not forbidden in the API and the generic syscall handler should not assume a bespoke object is passed. Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Implement get_properties_copy(). This allows the driver to be used from user-space threads. Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Implement get_properties_copy(). This allows the driver to be used from user-space threads. Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Implement get_properties_copy(). This allows the driver to be used from user-space threads. Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
zephyrbot
requested review from
LaurentiuM1234,
dbaluta,
iuliana-prodan and
lgirdwood
December 17, 2025 11:55
kv2019i
requested review from
abonislawski,
dcpleung,
softwarecki and
tmleman
December 17, 2025 12:00
|
lyakh
reviewed
Dec 19, 2025
| return -ENOENT; | ||
| } | ||
|
|
||
| memcpy(prop, kernel_prop, sizeof(*kernel_prop)); |
Contributor
There was a problem hiding this comment.
nitpick: this made me go check that prop was big enough to hold kernel_prop - admittedly I didn't have to go very far, but still maybe *prop = *kernel_prop; would be more explicit
Contributor
Author
|
@lyakh @dbaluta @abonislawski @softwarecki @tmleman could you take a look? This would be ready to go... |
lyakh
approved these changes
Jan 12, 2026
softwarecki
approved these changes
Jan 13, 2026
abonislawski
approved these changes
Jan 13, 2026
henrikbrixandersen
merged commit Jan 13, 2026
72d0660
into
zephyrproject-rtos:main
38 of 40 checks passed
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.



Follow up to #99811 , with: