-
Notifications
You must be signed in to change notification settings - Fork 349
[Temporarily Inactive] zephyr: alh: add ALH zephyr driver #5727
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
Conversation
Rename dai funcs, add zephyr alh driver, add get_stream_id to dai driver Switch to ALH zephyr driver in zephyr build Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
| * not during topology parsing. | ||
| */ | ||
| dd->stream_id = alh->params.stream_id; | ||
| dd->stream_id = dai_get_stream_id(dai_p, 0);//alh->params.stream_id; |
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.
Temporarily added dai_get_stream_id, not sure if this is the correct approach (feel free to comment) but we need to address this as alh private data was used here
| break; | ||
| default: | ||
| dai_warn(dai,"%d not supported format", cfg->word_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.
indentation - like in SSP
lgirdwood
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.
@juimonen @abonislawski we need to do the abstraction at the layer above for both DMA and DAIs. i.e.for DAIs like ALH and SSP we need to
- rename src/audio/dai.c to src/audio/dai-xtos.c
- create a new file called src/audio/dai.c that maps the SOF dai module to Zephyr DAI driver APIs
Likewise for the DMAs
This avoids all the alh-zephyr.c and ssp-zephyr.c (+more) wrappers - as we map/wrap at the layer above.
@lgirdwood I see we could unify ssp-zephyr and alh-zephyr etc. into a single wrapper file, but that's about it....??? the dai_probe etc name clash with zephyr needs to be resolved anyway. |
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 modifies cAVS2.5 build which is probably not intentional (and can't be merged as the matching drivers and board changes are not submitted to Zephyr upstream for cAVS2.5).
I'm guessing this is better done via #5731 , right ?
|
|
||
| zephyr_library_sources_ifdef(CONFIG_INTEL_ALH | ||
| ${SOF_DRIVERS_PATH}/intel/alh.c | ||
| ${SOF_DRIVERS_PATH}/intel/alh/alh-zephyr.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.
I think this is a problem. If we change cAVS2.5 to use the Zephyr ALH driver, then we have to submit matching changes to Zephyr upstream (for cAVS2.5).
lgirdwood
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.
Needs to be abstracted as follows (and this looks like it's half done here).
- rename alh.c to alh-legacy.c (and build will use this for xtos).
- Can we have a src/lib/dai-common.c, dail-legacy.c and dai-zephyr.c
|
Just to make sure everyone is up to date: this PR is using old way with zephyr wrappers in sof, it is not needed anymore as we are switching to native zephyr api in DAI PR where alh part from this PR is already included |
We will be using native Zephyr APIs in the same manner as the DMA API that has been merged so does this need closed ? |
|
Yes, I will reopen if needed |
Rename dai funcs, add zephyr alh driver,
add get_stream_id to dai driver
Switch to ALH zephyr driver in zephyr build
based on SSP example https://github.com/juimonen/sof/commits/ssp-wip