-
Notifications
You must be signed in to change notification settings - Fork 8.3k
drivers: dai: add ALH dai driver #45104
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
drivers: dai: add ALH dai driver #45104
Conversation
|
@marcinszkudlinski @nashif please review |
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.
label is also required, pls add
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.
Can I ask why label is required?
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.
somehow we need to bind to the device.
984a5f6 to
106feef
Compare
|
Updated with unified version (cavs & ace supported) |
106feef to
483c20e
Compare
|
Since you are adding |
c3f47bb to
504b128
Compare
504b128 to
e37bb46
Compare
Extend dai properties with stream ID parameter Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
Yes, I see in the logs, hopefully this time it will pass every check EDIT: sorry, reverted to original form with copy in alh.h, there are tons of SET_BITS definitions |
e37bb46 to
cbfd056
Compare
juimonen
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.
CI looks green now and dai properties is a separate commit. I can't test the actual driver myself now, but I trust you have tested it. kudos for cavs25 dtsi -> this will be tested a lot for sure (other than fpga). so LGTM.
drivers/dai/intel/alh/alh.c
Outdated
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.
Why is this hard coded to instance 0? Will this driver work for multiple instances?
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.
They are the same for every instance so it doesnt matter but how to do it in more clean way?
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.
For starters, it is recommended to comment usage of a hardcode.
drivers/dai/intel/alh/alh.c
Outdated
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 question about hard coded instance
drivers/dai/intel/alh/alh.c
Outdated
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.
Please stay with this approach
drivers/dai/intel/alh/alh.h
Outdated
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.
These might be better as devicetree properties
cc: @laurenmurphyx64
dts/xtensa/intel/intel_cavs25.dtsi
Outdated
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.
The first value here needs to match the value in line 262; otherwise you will get a build warning. Twister converts build warnings to errors but this PR somehow passes CI, so is there a sample or test application configuration that builds with this new driver?
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.
@MaureenHelm is there a "clean" way to create several instances of a driver with the same set of registers?
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.
Changed both of them to alh@24400, surprisingly it builds without warnings (previously there was a warning as you said but it was not treated as error in cavs25 CI), is that correct?
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.
Maybe twister only converts compiler warnings to errors, and not devicetree warnings too? What caught my attention in your previous version was the odd base address ending in 1. Also, is the second value here an address? It looks like an address, but it should be the size of the memory region.
Why are there multiple instances of the driver at the same address? How do you decide how many driver instances there should be? Is it a property of the hardware?
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.
Maybe twister only converts compiler warnings to errors, and not devicetree warnings too?
I remember I had to fix two issues in #41706 to stop -Wa,--fatal-warnings from being ignored. I see --edtlib-Werror in the same place but maybe it's being ignored too because of some other bug?
If it's not tested then it does not work and error handling is rarely ever tested. It took a number of coincidences to notice that -Wa,--fatal-warnings was being ignored.
cbfd056 to
2329316
Compare
drivers/dai/intel/alh/Kconfig.alh
Outdated
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.
If you add this before config,
DT_COMPAT_INTEL_ALH_DAI := intel,alh-dai
and this inside config
default $(dt_compat_enabled,$(DT_COMPAT_INTEL_ALH_DAI))
This will allow the driver to be enabled whenever a devicetree node has the compatible value is enabled. This will allow CI to build this driver for cAVS 2.5
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.
Sure, we can do it later but for now @juimonen requested to not enabling this driver until sof can use it (changes in review)
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.
No, it needs to be enabled somewhere before we can merge it. Otherwise, it will not be included in CI and we won't know if it even builds.
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.
@abonislawski @juimonen I think we can proceed with a) a test case, b) enable it for cAVS2.5 SOF build, c) add a new board file using this.
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.
@dcpleung @MaureenHelm driver enabled again as you requested, hopefully it will pass CI :)
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.
Thanks @abonislawski
drivers/dai/intel/alh/Kconfig.alh
Outdated
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.
No, it needs to be enabled somewhere before we can merge it. Otherwise, it will not be included in CI and we won't know if it even builds.
dts/xtensa/intel/intel_cavs25.dtsi
Outdated
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.
Maybe twister only converts compiler warnings to errors, and not devicetree warnings too? What caught my attention in your previous version was the odd base address ending in 1. Also, is the second value here an address? It looks like an address, but it should be the size of the memory region.
Why are there multiple instances of the driver at the same address? How do you decide how many driver instances there should be? Is it a property of the hardware?
2329316 to
2c25f09
Compare
The ALH is an intermediary device, which acts as a hub and provides an abstracted support for numerous sound interfaces (e.g. SoundWire). Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
drivers/dai/intel/alh/Kconfig.alh
Outdated
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.
Thanks @abonislawski
The ALH is an intermediary device, which acts as a hub and provides an
abstracted support for numerous sound interfaces (e.g. SoundWire).