You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
FW authentication questions regarding Apollo Lake chromebooks #5361
Hi, I have an Apollo lake Chromebook and had a few questions with SOF
According to the docs, they say that Apollo Lake is supported but it requires a BIOS change. What changes are required in the BIOS for this to work? I have a custom coreboot + tianocore firmware loaded on my Apollo lake Chromebook already (and don’t boot chrome os on there), so if the BIOS change could be documented or upstreamed into coreboot that would be great to get audio working with SOF (it seems audio does work on geminilake already with the same coreboot tree).
ditto. I'm not seeing any differences between APL and GLK Chromebooks firmware-wise on the audio side, so clarification on what needs to be changed would be appreciated
@coolstar@MrChromebox the issue is the CSME keys used for the SOF firmware authentication. ApolloLake Chromebooks rely on the Intel production key - which means an SOF firmware that you compile yourself would simply be rejected during the boot time. Starting with GeminiLake the key used changed, and you CAN generate the SOF firmware yourself as long as you have access to the Tensilica tools, put the device in developer mode and remove the write protection.
I did test SOF some 3 years ago on ApolloLake, but we had to find devices where we could update coreBoot with the Servo board. It failed on all devices past a specific production milestone, I have exactly ONE device that I could configure with SOF.
It's also impossible to update that key with a regular update.
Bottom line: ApolloLake Chromebooks, despite using the same audio DSP as GeminiLake, will not support SOF. It is what it is, there's nothing we can do about it.
@plbossart just wondering, is it possible to update the key with a custom coreboot (even if an external flasher is required to write over the ME region), or are Apollo Lake chromebooks SOL when it comes to SOF?
(even if an external flasher is required to write over the ME region)
Note merely adding a key does AFAIK not require replacing any firmware code. However I'm not familiar with the flash layout so I unfortunately don't know which region(s) it requires to overwrite (if possible)
@plbossart just wondering, is it possible to update the key with a custom coreboot (even if an external flasher is required to write over the ME region), or are Apollo Lake chromebooks SOL when it comes to SOF?
I don't fully recall the details but there was something fused or preventing updates at or after the DVT1 hw prototype stage. In other words none of the actual products can be updated.
@plbossart just wondering, is it possible to update the key with a custom coreboot (even if an external flasher is required to write over the ME region), or are Apollo Lake chromebooks SOL when it comes to SOF?
I don't fully recall the details but there was something fused or preventing updates at or after the DVT1 hw prototype stage. In other words none of the actual products can be updated.
I am pretty sure if you disable RO FW write protect you can still get in there and change the key. How to do that is a completely different question as I am not a coreboot guy. Also note the many warnings you will see if you venture down that path.
@cujomalainey , in the docs you helped review recently we have:
As stated above, starting from 2019/2020, Intel Chromeboooks have been configured with the community key.
Could we add more specific product references there? It would obviously help answer the questions here. Thanks!
GLK/CML/TGL/JSL/ADL and all following intel chips are signed with the community key. IIRC BYT/CHT/BDW can also run unsigned FW. There is just that gap of APL/SKL/KBL/AML/HSW that can't be switched over easily. Any AMD/MTK platform supported here will also have the community keys. This is again specific to chromebooks.
I am pretty sure if you disable RO FW write protect you can still get in there and change the key. How to do that is a completely different question as I am not a coreboot guy. Also note the many warnings you will see if you venture down that path.
@cujomalainey you are very optimistic on this one. I tried with the support of the Intel team and the Google team (Dylan, Duncan et. al) and did not succeed except on the 'Elektro' device which was pre-production hardware. The same process failed on all other devices. It would take master hacker skills to make this work without any formal support.
I am pretty sure if you disable RO FW write protect you can still get in there and change the key. How to do that is a completely different question as I am not a coreboot guy. Also note the many warnings you will see if you venture down that path.
@cujomalainey you are very optimistic on this one. I tried with the support of the Intel team and the Google team (Dylan, Duncan et. al) and did not succeed except on the 'Elektro' device which was pre-production hardware. The same process failed on all other devices. It would take master hacker skills to make this work without any formal support.
I don't doubt, I have yet to see anything happen easily in that space. And this would be a high risk activity too, even with servod/ccd
Q: Since APL Chromebooks can load, and SoF provides as part of sof-bin, the intel-signed firmware for Apollolake, why can't that be used instead? Seems others have gotten that to work by disabling route checking on the bxt-da7219-max98357a driver (ref: https://github.com/EMLommers/Apollolake_Audio/)
I deleted my comments too. Do we open a topic surrounding GLK/APL Chromebook audio here or should we take the discussion elsewhere? Maybe here? pulseaudio-issues
one additional note - the volume control seems to be a bit off - it scales from 0-10%, but 11-100 is constant. So 10% is full volume (and quite loud)
I've tested the topology file on my X360 G1 EE and have the exact same effect/result. aplay -l lists however Speakers and Headset. After some digging I found this, but no luck so far. Editing default.pa like here seems to have the best effect - I can now see 'better behaving' speaker and two mics under pavucontrol. Would be good to have it all figured out, but might be 'good enough' solution for now also for other people, so I thought I'll post it here.
@plbossart submitted patches to Linux kernel 6.0 and alsa-ucm for GeminiLake devices.
Thanks to Intel engineers introducing AVS kernel module, we've moved audio development for SKL/KBL/APL (and their refresh variants) to snd_soc_avs.
It is currently unclear whether GLK and GLK-R devices will be supported by AVS. Source code for that module shows that it should, but it hasn't been tested yet.
I've asked Fedora developers to include DA7219 definitions in rawhide kernel.
Thanks to Intel engineers introducing AVS kernel module, we've moved audio development for SKL/KBL/APL (and their refresh variants) to snd_soc_avs.
Can I somewhere find info on how to test this? I've installed kernel 6.0-rc3 and without any additional kernel args on SNAPPY I can see only this in dmesg:
[ 7.344432] snd_soc_avs 0000:00:0e.0: DSP detected with PCI class/subclass/prog-if info 0x040100
With options snd-intel-dspcfg dsp_driver=3 nothing seems to change in comparison to the older kernel.
With options snd-intel-dspcfg dsp_driver=3 nothing seems to change in comparison to the older kernel.
Because AVS gets selected if you select dsp_driver=4. That being said, 6.0-rc3 from fedora maintainers still doesn't enable it be default, so you'd have to compile it yourself :)
For GLK on Chromebooks, SOF is still the plan of action, not AVS, even post 6.0
Sure, but it looks like GLK might work on AVS. We're currently trying to get someone from our community to boot APL firmware on GLK, since it should be compatible. AVS is looking for APL path if you select it as DSP driver.
I just wanted to see/check if I have a chance of fully working sound (on APL). Things are happening, so I'm happy :)
You need Intel's AVS firmware from ChromeOS and rewritten UCM. Both can be found on our discord server. Fedora maintainers included DA7219 in rc4.
Yes, so I've downloaded avs.zip. The dmesg above is with this fw.
Makes sense :)
You also need UCM configuration, @coolstar posted hers (for some reason automatic jack detection doesn't work, but we'll look into that later) in the same channel I believe.
When you'll have FW, UCM and kernel 6.0-rc, audio should be working perfectly fine. I haven't tested external microphone, but internal mic does work :)
Yeah, so I have kernel 6.0.0-rc3, the FW from discord and UCM files copied to /usr/share/alsa/ucm2/Intel. Pavucontrol shows one output and one input, but no sound.
Activity
MrChromebox commentedon Feb 14, 2022
ditto. I'm not seeing any differences between APL and GLK Chromebooks firmware-wise on the audio side, so clarification on what needs to be changed would be appreciated
marc-hb commentedon Feb 14, 2022
Which docs, this one? https://thesofproject.github.io/latest/platforms/intel-cavs/apollolake/index.html
This section is a bit confusing,
chromebooks never require any BIOS change(only Chromebooks after some date), I mean at least not for authentication reasons. Switching to developer mode is enough, all chromebooks (EDIT: after some date) ship with the community key:https://thesofproject.github.io/latest/getting_started/intel_debug/introduction.html#chromebooks-and-sof
See confirmation in thesofproject/sof-docs#379
Please submit doc fixes to https://github.com/thesofproject/sof-docs , thanks!
Indeed, check the symbolic links in https://github.com/thesofproject/sof-bin/tree/main/v2.0.x/sof-v2.0 (cloning may make that easier). They're created by https://github.com/thesofproject/sof/blob/main/installer/GNUmakefile where you can find this:
plbossart commentedon Feb 15, 2022
@coolstar @MrChromebox the issue is the CSME keys used for the SOF firmware authentication. ApolloLake Chromebooks rely on the Intel production key - which means an SOF firmware that you compile yourself would simply be rejected during the boot time. Starting with GeminiLake the key used changed, and you CAN generate the SOF firmware yourself as long as you have access to the Tensilica tools, put the device in developer mode and remove the write protection.
I did test SOF some 3 years ago on ApolloLake, but we had to find devices where we could update coreBoot with the Servo board. It failed on all devices past a specific production milestone, I have exactly ONE device that I could configure with SOF.
It's also impossible to update that key with a regular update.
Bottom line: ApolloLake Chromebooks, despite using the same audio DSP as GeminiLake, will not support SOF. It is what it is, there's nothing we can do about it.
MrChromebox commentedon Feb 15, 2022
ok, so same issue as SKL/KBL then =(
plbossart commentedon Feb 15, 2022
yes indeed.
coolstar commentedon Feb 15, 2022
@plbossart just wondering, is it possible to update the key with a custom coreboot (even if an external flasher is required to write over the ME region), or are Apollo Lake chromebooks SOL when it comes to SOF?
marc-hb commentedon Feb 15, 2022
@cujomalainey , in the docs you helped review recently we have:
Could we add more specific product references there? It would obviously help answer the questions here. Thanks!
marc-hb commentedon Feb 15, 2022
Note merely adding a key does AFAIK not require replacing any firmware code. However I'm not familiar with the flash layout so I unfortunately don't know which region(s) it requires to overwrite (if possible)
This looks relevant: https://www.chromium.org/chromium-os/firmware-porting-guide/2-concepts/
plbossart commentedon Feb 15, 2022
I don't fully recall the details but there was something fused or preventing updates at or after the DVT1 hw prototype stage. In other words none of the actual products can be updated.
marc-hb commentedon Feb 15, 2022
For non-performance sensitive testing you can use the free, crosstool-ng-based toolchain:
https://thesofproject.github.io/latest/introduction/index.html?highlight=toolchain#toolchain-faq
Don't release binaries compiled with it.
All binaries released in https://github.com/thesofproject/sof-bin are compiled with XCC.
cujomalainey commentedon Feb 16, 2022
I am pretty sure if you disable RO FW write protect you can still get in there and change the key. How to do that is a completely different question as I am not a coreboot guy. Also note the many warnings you will see if you venture down that path.
GLK/CML/TGL/JSL/ADL and all following intel chips are signed with the community key. IIRC BYT/CHT/BDW can also run unsigned FW. There is just that gap of APL/SKL/KBL/AML/HSW that can't be switched over easily. Any AMD/MTK platform supported here will also have the community keys. This is again specific to chromebooks.
plbossart commentedon Feb 16, 2022
@cujomalainey you are very optimistic on this one. I tried with the support of the Intel team and the Google team (Dylan, Duncan et. al) and did not succeed except on the 'Elektro' device which was pre-production hardware. The same process failed on all other devices. It would take master hacker skills to make this work without any formal support.
cujomalainey commentedon Feb 16, 2022
I don't doubt, I have yet to see anything happen easily in that space. And this would be a high risk activity too, even with servod/ccd
MrChromebox commentedon Feb 18, 2022
Q: Since APL Chromebooks can load, and SoF provides as part of sof-bin, the intel-signed firmware for Apollolake, why can't that be used instead? Seems others have gotten that to work by disabling route checking on the bxt-da7219-max98357a driver (ref: https://github.com/EMLommers/Apollolake_Audio/)
56 remaining items
ericwoud commentedon Mar 26, 2022
Thanks. I deleted my unrelated posts.
Denisuu commentedon Mar 26, 2022
I deleted my comments too. Do we open a topic surrounding GLK/APL Chromebook audio here or should we take the discussion elsewhere? Maybe here? pulseaudio-issues
mryndzionek commentedon Sep 4, 2022
I've tested the topology file on my X360 G1 EE and have the exact same effect/result.
aplay -llists howeverSpeakersandHeadset. After some digging I found this, but no luck so far. Editing default.pa like here seems to have the best effect - I can now see 'better behaving' speaker and two mics underpavucontrol. Would be good to have it all figured out, but might be 'good enough' solution for now also for other people, so I thought I'll post it here.ellyq commentedon Sep 4, 2022
I think this issue can be closed.
@plbossart submitted patches to Linux kernel 6.0 and alsa-ucm for GeminiLake devices.
Thanks to Intel engineers introducing AVS kernel module, we've moved audio development for SKL/KBL/APL (and their refresh variants) to snd_soc_avs.
It is currently unclear whether GLK and GLK-R devices will be supported by AVS. Source code for that module shows that it should, but it hasn't been tested yet.
I've asked Fedora developers to include DA7219 definitions in rawhide kernel.
https://bugzilla.redhat.com/show_bug.cgi?id=2120725
Below can see APL chromebook (google/reef - hp/snappy) almost completely functional on kernel 6.0-rc1.
https://user-images.githubusercontent.com/81479208/188331887-e3159795-a0b4-4f68-8d5c-9ffefadb2145.mp4
https://user-images.githubusercontent.com/81479208/188331889-8ee74dad-0ff5-4c1f-b669-446c641be4c4.mp4
mryndzionek commentedon Sep 4, 2022
Okay then. Lets wait for 6.0. Thanks for the update!
mryndzionek commentedon Sep 4, 2022
Can I somewhere find info on how to test this? I've installed kernel 6.0-rc3 and without any additional kernel args on SNAPPY I can see only this in dmesg:
With
options snd-intel-dspcfg dsp_driver=3nothing seems to change in comparison to the older kernel.ellyq commentedon Sep 4, 2022
Best place would be to check out our discord: https://discord.gg/tkPTk5w
Because AVS gets selected if you select dsp_driver=4. That being said, 6.0-rc3 from fedora maintainers still doesn't enable it be default, so you'd have to compile it yourself :)
mryndzionek commentedon Sep 4, 2022
Okay, so with dsp_driver=4 speaker works okay. Some logs:
cujomalainey commentedon Sep 7, 2022
For GLK on Chromebooks, SOF is still the plan of action, not AVS, even post 6.0
mryndzionek commentedon Sep 7, 2022
I just wanted to see/check if I have a chance of fully working sound (on APL). Things are happening, so I'm happy :)
ellyq commentedon Sep 7, 2022
Sure, but it looks like GLK might work on AVS. We're currently trying to get someone from our community to boot APL firmware on GLK, since it should be compatible. AVS is looking for APL path if you select it as DSP driver.
You need Intel's AVS firmware from ChromeOS and rewritten UCM. Both can be found on our discord server. Fedora maintainers included DA7219 in rc4.
mryndzionek commentedon Sep 7, 2022
Yes, so I've downloaded
avs.zip. Thedmesgabove is with this fw.ellyq commentedon Sep 7, 2022
Makes sense :)
You also need UCM configuration, @coolstar posted hers (for some reason automatic jack detection doesn't work, but we'll look into that later) in the same channel I believe.
When you'll have FW, UCM and kernel 6.0-rc, audio should be working perfectly fine. I haven't tested external microphone, but internal mic does work :)
mryndzionek commentedon Sep 7, 2022
Yeah, so I have kernel 6.0.0-rc3, the FW from discord and UCM files copied to /usr/share/alsa/ucm2/Intel. Pavucontrol shows one output and one input, but no sound.