Skip to contentSkip to conversation

ASoC: Intel: Clenaup SST initialization

PATCH NAK Cezary Rojewski 4 participants 107 messages Aug 22, 2019 – Aug 27, 2019 Page 2 of 2

Subsystems (3)
lore
Share & tools
lore
maintainer
#86 lore raw
In reply to Cezary Rojewski
Quoted 20 lines · Cezary Rojewski
Quoted 11 lines · Pierre-Louis Bossart
Quoted 8 lines · Cezary Rojewski

Code seen here is part of new Skylake fundament, located at the very bottom of internal mainline. Said mainline is tested constantly on at least sigle platform from every cAVS bucket (description below). This week, BDW has been added to the CI family and was essential in validating legacy changes. Baytrail platform is still missing. Changes for BYT directly mirror HSW/ BDW but due to current lack of platform were untested.
Boards engaged in testing: rt286, rt298, rt274.

Quoted 2 lines

this is not enough, sorry. these are RVPs and you need to check with commercial devices supported in sound/soc/intel/boards/.

What machine board has to do with FW and host side? If it has, we better notify the owner so he can fix codec's code at once. All boards MUST follow recommended protocol whether its HDA or I2S in communicating with /skylake. This is hardware IP we taking about. I could as well test all platforms with AudioPrecision and say: shipit.

...

Quoted 6 lines

DSP "commercial devices" with 99% of home audio being routed through HD-Audio legacy? I do contact representatives of "commercial devices" daily, you of all should be aware of fact that in almost all cases they are fed neither with upstream code nor upstream binaries.
For the first time since eons sound/soc/intel/skylake code is tested before upstreaming, yet you still defend the mistakes of the past?

System vendors don't really matter here, end users with their desktops and laptops do. If a user has a system and they for whatever reason upgrade their kernel from one upstream version to another and don't touch any other aspect of their system the expectation is that they'll still have everything working after the upgrade. This means that if there's bugs in how things were deployed in the past the kernel ought to try to work with those bugs.

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines

Some upstream FW binaries are not compatible with existing /skylake driver while changes found here (HARDWARE_CONFIG/ FIRMWARE_CONFIG) make use of firmware ability to offload hardware-specifics away from driver. These and more are core part of any cAVS design and are to be implemented and used by host. This too is missing on Linux upstream.

This sounds like it might be a problem.

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

SKL FW binary existing on upstream is a descendant of old spt branch, obsoleted for 4-5 years now. That FW is a stub, quickly replaced by kbl which is to be used on all 1.5 cAVS platforms.

That's well within the lifespan people will expect from a PC these days, my personal systems are mostly older than that and do fine at most things except for big builds.

Quoted 2 lines

If I could, I'd rather prefer the "detect and notify" as it is impossible to repair all the mistakes made in /sound/soc/intel/skylake.

Do we have a sense of how many such systems exist?

Quoted 5 lines

However, in practice there isn't any reliable way to verify the actual usability of old FW binary against host site as the interface is volatile and numbers alone don't mean much.
Patch with FW binaries would not remove old ones, simply add new versions to the directory.

Can you do things the other way around and positively identify firmwares that meet whatever standards you're interested in here?

author maintainer
#87 lore raw
Quoted 31 lines · Mark Brown
Quoted 20 lines · Cezary Rojewski
Quoted 11 lines · Pierre-Louis Bossart
Quoted 8 lines · Cezary Rojewski

Code seen here is part of new Skylake fundament, located at the very bottom of internal mainline. Said mainline is tested constantly on at least sigle platform from every cAVS bucket (description below). This week, BDW has been added to the CI family and was essential in validating legacy changes. Baytrail platform is still missing. Changes for BYT directly mirror HSW/ BDW but due to current lack of platform were untested.
Boards engaged in testing: rt286, rt298, rt274.

Quoted 2 lines

this is not enough, sorry. these are RVPs and you need to check with commercial devices supported in sound/soc/intel/boards/.

What machine board has to do with FW and host side? If it has, we better notify the owner so he can fix codec's code at once. All boards MUST follow recommended protocol whether its HDA or I2S in communicating with /skylake. This is hardware IP we taking about. I could as well test all platforms with AudioPrecision and say: shipit.

...

Quoted 6 lines

DSP "commercial devices" with 99% of home audio being routed through HD-Audio legacy? I do contact representatives of "commercial devices" daily, you of all should be aware of fact that in almost all cases they are fed neither with upstream code nor upstream binaries.
For the first time since eons sound/soc/intel/skylake code is tested before upstreaming, yet you still defend the mistakes of the past?

Quoted 9 lines

System vendors don't really matter here, end users with their desktops and laptops do. If a user has a system and they for whatever reason upgrade their kernel from one upstream version to another and don't touch any other aspect of their system the expectation is that they'll still have everything working after the upgrade. This means that if there's bugs in how things were deployed in the past the kernel ought to try to work with those bugs.

Noted, see below comments.

Quoted 8 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines

Some upstream FW binaries are not compatible with existing /skylake driver while changes found here (HARDWARE_CONFIG/ FIRMWARE_CONFIG) make use of firmware ability to offload hardware-specifics away from driver. These and more are core part of any cAVS design and are to be implemented and used by host. This too is missing on Linux upstream.

This sounds like it might be a problem.

Problem is, HARDWARE/ FIRMWARE_CONFIG (and more upcoming) should be the core part of cAVS driver, implemented before any PCM related code is added.

Quoted 8 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

SKL FW binary existing on upstream is a descendant of old spt branch, obsoleted for 4-5 years now. That FW is a stub, quickly replaced by kbl which is to be used on all 1.5 cAVS platforms.

That's well within the lifespan people will expect from a PC these days, my personal systems are mostly older than that and do fine at most things except for big builds.

It's not about age itself. It's about the fact that FW binaries from non-supported or main FW branches ended here and given the date these have been added, it has already been recommended to make use of kbl or apl_auto branches.

Quoted 5 lines
Quoted 2 lines

If I could, I'd rather prefer the "detect and notify" as it is impossible to repair all the mistakes made in /sound/soc/intel/skylake.

Do we have a sense of how many such systems exist?

Quoted 9 lines
Quoted 5 lines

However, in practice there isn't any reliable way to verify the actual usability of old FW binary against host site as the interface is volatile and numbers alone don't mean much.
Patch with FW binaries would not remove old ones, simply add new versions to the directory.

Can you do things the other way around and positively identify firmwares that meet whatever standards you're interested in here?

The only thing that comes to my mind is the following:
- during boot up sequence, in response to any INVALID_REQUEST or such coming from FW, collapse and dump: "upgrade firmware" message

- once boot up sequence is completed, disregard INVALID_REQUEST check as it is also the common response of FW in various scenarios

- user removes existing sym link from /lib/firmware/intel and creates new one, pointing to updated FW binary that should also be present in /lib/firmware/intel

#88 lore raw
Quoted 14 lines · Cezary Rojewski
Quoted 13 lines · Mark Brown
Quoted 11 lines · Cezary Rojewski
Quoted 10 lines · Pierre-Louis Bossart
Quoted 8 lines · Cezary Rojewski

Code seen here is part of new Skylake fundament, located at the very bottom of internal mainline. Said mainline is tested constantly on at least sigle platform from every cAVS bucket (description below). This week, BDW has been added to the CI family and was essential in validating legacy changes. Baytrail platform is still missing. Changes for BYT directly mirror HSW/ BDW but due to current lack of platform were untested.
Boards engaged in testing: rt286, rt298, rt274.

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 2 lines

this is not enough, sorry. these are RVPs and you need to check with commercial devices supported in sound/soc/intel/boards/.

What machine board has to do with FW and host side? If it has, we better notify the owner so he can fix codec's code at once. All boards MUST follow recommended protocol whether its HDA or I2S in communicating with /skylake. This is hardware IP we taking about. I could as well test all platforms with AudioPrecision and say: shipit.

The machine driver defines how many links are used, and in what mode for the older cases where the topology is not used. You have configurations with very complicated links, e.g. with amplifiers in TDM mode plus IV feedback that will stress the firmware in ways that regular RVPs don't. Same for the case where the SSP clock is turned on at the request of the machine drivers. That's another case that can't be tested on RVPs.

I am not saying you need to test with every single commercial device, but that testing on RVPs is not a representative sample of the configurations and actual workloads.

Quoted 37 lines
Quoted 10 lines

...

Quoted 6 lines

DSP "commercial devices" with 99% of home audio being routed through HD-Audio legacy? I do contact representatives of "commercial devices" daily, you of all should be aware of fact that in almost all cases they are fed neither with upstream code nor upstream binaries.
For the first time since eons sound/soc/intel/skylake code is tested before upstreaming, yet you still defend the mistakes of the past?

Quoted 9 lines

System vendors don't really matter here, end users with their desktops and laptops do.  If a user has a system and they for whatever reason upgrade their kernel from one upstream version to another and don't touch any other aspect of their system the expectation is that they'll still have everything working after the upgrade.  This means that if there's bugs in how things were deployed in the past the kernel ought to try to work with those bugs.

Noted, see below comments.

Quoted 8 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines

Some upstream FW binaries are not compatible with existing /skylake driver while changes found here (HARDWARE_CONFIG/ FIRMWARE_CONFIG) make use of firmware ability to offload hardware-specifics away from driver. These and more are core part of any cAVS design and are to be implemented and used by host. This too is missing on Linux upstream.

This sounds like it might be a problem.

Problem is, HARDWARE/ FIRMWARE_CONFIG (and more upcoming) should be the core part of cAVS driver, implemented before any PCM related code is added.

Quoted 4 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

SKL FW binary existing on upstream is a descendant of old spt branch, obsoleted for 4-5 years now. That FW is a stub, quickly replaced by kbl which is to be used on all 1.5 cAVS platforms.

Quoted 11 lines
Quoted 4 lines

That's well within the lifespan people will expect from a PC these days, my personal systems are mostly older than that and do fine at most things except for big builds.

It's not about age itself. It's about the fact that FW binaries from non-supported or main FW branches ended here and given the date these have been added, it has already been recommended to make use of kbl or apl_auto branches.

Quoted 4 lines
Quoted 2 lines

If I could, I'd rather prefer the "detect and notify" as it is impossible to repair all the mistakes made in /sound/soc/intel/skylake.

Do we have a sense of how many such systems exist?

My understanding is that the SST driver is used for Skylake for Chromebooks only. For platforms defined for Windows the cases where the DSP is used are marginal. I'd view the risk of updating the firmware for Skylake as very limited but that's my personal opinion only. For APL/KBL it's a lot harder to track, there are industrial/embedded cases and that's where we'd really want to trap any incompatibilities.

Quoted 11 lines
Quoted 10 lines
Quoted 6 lines

However, in practice there isn't any reliable way to verify the actual usability of old FW binary against host site as the interface is volatile and numbers alone don't mean much.
Patch with FW binaries would not remove old ones, simply add new versions to the directory.

Can you do things the other way around and positively identify firmwares that meet whatever standards you're interested in here?

Quoted 6 lines

The only thing that comes to my mind is the following:
- during boot up sequence, in response to any INVALID_REQUEST or such coming from FW, collapse and dump: "upgrade firmware" message

- once boot up sequence is completed, disregard INVALID_REQUEST check as it is also the common response of FW in various scenarios

With the request_firmware() mechanism, the kernel cannot parse the file ahead of time, but don't you have a version information reported by the firmware post-boot that can be used by the kernel so track that the firmware isn't likely to work?

Quoted 3 lines

- user removes existing sym link from /lib/firmware/intel and creates
new one, pointing to updated FW binary that should also be present in /lib/firmware/intel

That's typically handled by distributions updating the linux-firmware package. Only advanced users and developers can change these symlinks.

The other point that comes to my mind is whether we are going to see dependencies between firmware and topology files? Can you use an 'old' topology with a 'newer' firmware, or is this a 3-way interoperability issue?
_______________________________________________
Alsa-devel mailing list
[email protected]
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

author maintainer
#89 lore raw
Quoted 26 lines · Pierre-Louis Bossart
Quoted 14 lines · Cezary Rojewski
Quoted 13 lines · Mark Brown
Quoted 11 lines · Cezary Rojewski
Quoted 10 lines · Pierre-Louis Bossart
Quoted 8 lines · Cezary Rojewski

Code seen here is part of new Skylake fundament, located at the very bottom of internal mainline. Said mainline is tested constantly on at least sigle platform from every cAVS bucket (description below). This week, BDW has been added to the CI family and was essential in validating legacy changes. Baytrail platform is still missing. Changes for BYT directly mirror HSW/ BDW but due to current lack of platform were untested.
Boards engaged in testing: rt286, rt298, rt274.

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 2 lines

this is not enough, sorry. these are RVPs and you need to check with commercial devices supported in sound/soc/intel/boards/.

What machine board has to do with FW and host side? If it has, we better notify the owner so he can fix codec's code at once. All boards MUST follow recommended protocol whether its HDA or I2S in communicating with /skylake. This is hardware IP we taking about. I could as well test all platforms with AudioPrecision and say: shipit.

Quoted 4 lines

The machine driver defines how many links are used, and in what mode for the older cases where the topology is not used. You have configurations with very complicated links, e.g. with amplifiers in TDM mode plus IV feedback that will stress the firmware in ways that regular RVPs don't. Same for the case where the SSP clock is turned on at the request of the machine drivers. That's another case that can't be tested on RVPs.

I am not saying you need to test with every single commercial device, but that testing on RVPs is not a representative sample of the configurations and actual workloads.

Each and every FW coming from main branch gets tested on both RVP and production devices what is done with cooperation with integration teams, PAEs and such. Windows teams alone ensures each binary gets smashed by ten of thousands tests each week - this is true for any release candidate, the standards are very high. Moreover, array of platforms is engaged per target (e.g.: TGL) as single platform alone does not cut it.

So, I'd not worry about FW being vulnerable to any scenario as long as recommended protocol is followed.

Quoted 44 lines
Quoted 44 lines
Quoted 10 lines

...

Quoted 6 lines

DSP "commercial devices" with 99% of home audio being routed through HD-Audio legacy? I do contact representatives of "commercial devices" daily, you of all should be aware of fact that in almost all cases they are fed neither with upstream code nor upstream binaries.
For the first time since eons sound/soc/intel/skylake code is tested before upstreaming, yet you still defend the mistakes of the past?

Quoted 9 lines

System vendors don't really matter here, end users with their desktops and laptops do.  If a user has a system and they for whatever reason upgrade their kernel from one upstream version to another and don't touch any other aspect of their system the expectation is that they'll still have everything working after the upgrade.  This means that if there's bugs in how things were deployed in the past the kernel ought to try to work with those bugs.

Noted, see below comments.

Quoted 8 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines

Some upstream FW binaries are not compatible with existing /skylake driver while changes found here (HARDWARE_CONFIG/ FIRMWARE_CONFIG) make use of firmware ability to offload hardware-specifics away from driver. These and more are core part of any cAVS design and are to be implemented and used by host. This too is missing on Linux upstream.

This sounds like it might be a problem.

Problem is, HARDWARE/ FIRMWARE_CONFIG (and more upcoming) should be the core part of cAVS driver, implemented before any PCM related code is added.

Quoted 8 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

SKL FW binary existing on upstream is a descendant of old spt branch, obsoleted for 4-5 years now. That FW is a stub, quickly replaced by kbl which is to be used on all 1.5 cAVS platforms.

That's well within the lifespan people will expect from a PC these days, my personal systems are mostly older than that and do fine at most things except for big builds.

It's not about age itself. It's about the fact that FW binaries from non-supported or main FW branches ended here and given the date these have been added, it has already been recommended to make use of kbl or apl_auto branches.

Quoted 8 lines
Quoted 4 lines
Quoted 4 lines
Quoted 2 lines

If I could, I'd rather prefer the "detect and notify" as it is impossible to repair all the mistakes made in /sound/soc/intel/skylake.

Do we have a sense of how many such systems exist?

My understanding is that the SST driver is used for Skylake for Chromebooks only. For platforms defined for Windows the cases where the DSP is used are marginal. I'd view the risk of updating the firmware for Skylake as very limited but that's my personal opinion only. For APL/KBL it's a lot harder to track, there are industrial/embedded cases and that's where we'd really want to trap any incompatibilities.

APL/ KBL - are there any examples I should be aware of? To my knowledge we are handling all of them internally and they have not seen any obsolete binary for quite some time already. For some, FW has been updated even this week..

Quoted 11 lines
Quoted 11 lines
Quoted 10 lines
Quoted 6 lines

However, in practice there isn't any reliable way to verify the actual usability of old FW binary against host site as the interface is volatile and numbers alone don't mean much.
Patch with FW binaries would not remove old ones, simply add new versions to the directory.

Can you do things the other way around and positively identify firmwares that meet whatever standards you're interested in here?

Quoted 9 lines
Quoted 6 lines

The only thing that comes to my mind is the following:
- during boot up sequence, in response to any INVALID_REQUEST or such coming from FW, collapse and dump: "upgrade firmware" message

- once boot up sequence is completed, disregard INVALID_REQUEST check as it is also the common response of FW in various scenarios

With the request_firmware() mechanism, the kernel cannot parse the file ahead of time, but don't you have a version information reported by the firmware post-boot that can be used by the kernel so track that the firmware isn't likely to work?

Wasn't lying about FW version being unreliable. Let's say vendor receives quick FW drop with new RCR.. such eng drop may carry invalid numbers such as 0.0.0.0.. In general, I try to avoid relying on FW version whenever possible. It can be dumped for debug reasons, true, but to be relied on? Not really.

Quoted 7 lines
Quoted 3 lines

- user removes existing sym link from /lib/firmware/intel and creates
new one, pointing to updated FW binary that should also be present in /lib/firmware/intel

That's typically handled by distributions updating the linux-firmware package. Only advanced users and developers can change these symlinks.

The other point that comes to my mind is whether we are going to see dependencies between firmware and topology files? Can you use an 'old' topology with a 'newer' firmware, or is this a 3-way interoperability issue?

Precisely! Three-way-tie!
It's best FW get updated together with topology as old FW may enforce different constraints on pipeline modules.

Yay, between rock and hard place. On one side we got old buggy FWs which should (more like should NOT be even here..) be updated to improve user's experience but updating these alone won't cut it as host side needs to be aligned too. On the other we want to align upstream /skylake with actual working example, which will quickly fail if it encounters obsolete FW binary.
And if that wasn't enough, lovely topologies come into picture where some of these were developed behind FDK's back and thus completely bypassing deployment process.

First thing we will do now is prioritizing topology refactor so all initialization/ load oriented thingies will be visible for upstream review. By doing so, we got all elephants in one room and can discuss how to handle it in best fashion: seamless transition for end-users.

There aren't many options available: notify user -or- fallback to defaults (hardcodes)? in case encountered binaries do not meet cAVS design criteria.

Personally, I'm against all hardcodes and would simply recommend all user to redirect their symlinks when they do switch kernel - along with dumping warning/ error message in dmesg. Hardcodes bring problems with forward compatibility and that's why host should offload them away to FW.

Czarek
_______________________________________________
Alsa-devel mailing list
[email protected]
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

#90 lore raw
Quoted 27 lines · Cezary Rojewski
Quoted 26 lines · Pierre-Louis Bossart
Quoted 22 lines · Cezary Rojewski
Quoted 21 lines · Mark Brown
Quoted 20 lines · Cezary Rojewski
Quoted 11 lines · Pierre-Louis Bossart
Quoted 8 lines · Cezary Rojewski

Code seen here is part of new Skylake fundament, located at the very bottom of internal mainline. Said mainline is tested constantly on at least sigle platform from every cAVS bucket (description below). This week, BDW has been added to the CI family and was essential in validating legacy changes. Baytrail platform is still missing. Changes for BYT directly mirror HSW/ BDW but due to current lack of platform were untested.
Boards engaged in testing: rt286, rt298, rt274.

Quoted 2 lines

this is not enough, sorry. these are RVPs and you need to check with commercial devices supported in sound/soc/intel/boards/.

What machine board has to do with FW and host side? If it has, we better notify the owner so he can fix codec's code at once. All boards MUST follow recommended protocol whether its HDA or I2S in communicating with /skylake. This is hardware IP we taking about. I could as well test all platforms with AudioPrecision and say: shipit.

Quoted 8 lines
Quoted 4 lines

The machine driver defines how many links are used, and in what mode for the older cases where the topology is not used. You have configurations with very complicated links, e.g. with amplifiers in TDM mode plus IV feedback that will stress the firmware in ways that regular RVPs don't. Same for the case where the SSP clock is turned on at the request of the machine drivers. That's another case that can't be tested on RVPs.

I am not saying you need to test with every single commercial device, but that testing on RVPs is not a representative sample of the configurations and actual workloads.

Each and every FW coming from main branch gets tested on both RVP and production devices what is done with cooperation with integration teams, PAEs and such. Windows teams alone ensures each binary gets smashed by ten of thousands tests each week - this is true for any release candidate, the standards are very high. Moreover, array of platforms is engaged per target (e.g.: TGL) as single platform alone does not cut it.

So, I'd not worry about FW being vulnerable to any scenario as long as recommended protocol is followed.

I didn't mean to diss the validation work, but the Chromebook cases and amplifiers over TDM with IV feedback are certainly not configurations tested by Windows folks who are using HDaudio+DMIC only.

Quoted 5 lines
Quoted 2 lines

With the request_firmware() mechanism, the kernel cannot parse the file ahead of time, but don't you have a version information reported by the firmware post-boot that can be used by the kernel so track that the firmware isn't likely to work?

Wasn't lying about FW version being unreliable. Let's say vendor receives quick FW drop with new RCR.. such eng drop may carry invalid numbers such as 0.0.0.0.. In general, I try to avoid relying on FW version whenever possible. It can be dumped for debug reasons, true, but to be relied on? Not really.

Goodness, that's really bad. I didn't realize this.

Quoted 16 lines
Quoted 8 lines
Quoted 4 lines

- user removes existing sym link from /lib/firmware/intel and creates
new one, pointing to updated FW binary that should also be present in /lib/firmware/intel

That's typically handled by distributions updating the linux-firmware package. Only advanced users and developers can change these symlinks.

The other point that comes to my mind is whether we are going to see dependencies between firmware and topology files? Can you use an 'old' topology with a 'newer' firmware, or is this a 3-way interoperability issue?

Precisely! Three-way-tie!
It's best FW get updated together with topology as old FW may enforce different constraints on pipeline modules.

Yay, between rock and hard place. On one side we got old buggy FWs which should (more like should NOT be even here..) be updated to improve user's experience but updating these alone won't cut it as host side needs to be aligned too. On the other we want to align upstream /skylake with actual working example, which will quickly fail if it encounters obsolete FW binary.
And if that wasn't enough, lovely topologies come into picture where some of these were developed behind FDK's back and thus completely bypassing deployment process.

Quoted 5 lines

First thing we will do now is prioritizing topology refactor so all initialization/ load oriented thingies will be visible for upstream review. By doing so, we got all elephants in one room and can discuss how to handle it in best fashion: seamless transition for end-users.

There aren't many options available: notify user -or- fallback to defaults (hardcodes)? in case encountered binaries do not meet cAVS design criteria.

Personally, I'm against all hardcodes and would simply recommend all user to redirect their symlinks when they do switch kernel - along with dumping warning/ error message in dmesg. Hardcodes bring problems with forward compatibility and that's why host should offload them away to FW.

Cezary, I know you are not responsible for all this, but at this point if we (Intel) can't guarantee any sort of interoperability with both firmware and topology we should make it clear that this driver is not recommended unless specific versions of the firmware/topology are used, and as a consequence the typical client distros and desktop/laptop users should use HDaudio legacy or SOF (for DMICs)

maintainer
#91 lore raw
Quoted 9 lines · Pierre-Louis Bossart
Quoted 5 lines · Cezary Rojewski

Wasn't lying about FW version being unreliable. Let's say vendor receives quick FW drop with new RCR.. such eng drop may carry invalid numbers such as 0.0.0.0..
In general, I try to avoid relying on FW version whenever possible. It can be dumped for debug reasons, true, but to be relied on? Not really.

Goodness, that's really bad. I didn't realize this.

At a previous employer I modified our build stamping infrastructure to also include both a timestamp and a serialized build number in the version number since one of my colleagues was fond of sending people prereleases of what he was working on to other people with identical version numbers on different binaries leading to much confusion and checksumming. You do see a lot of things with those serialized version numbers, especially SVN based projects.

Quoted 6 lines
Quoted 5 lines

Personally, I'm against all hardcodes and would simply recommend all user to redirect their symlinks when they do switch kernel - along with dumping warning/ error message in dmesg. Hardcodes bring problems with forward compatibility and that's why host should offload them away to FW.

Quoted 6 lines

Cezary, I know you are not responsible for all this, but at this point if we (Intel) can't guarantee any sort of interoperability with both firmware and topology we should make it clear that this driver is not recommended unless specific versions of the firmware/topology are used, and as a consequence the typical client distros and desktop/laptop users should use HDaudio legacy or SOF (for DMICs)

Not the most elegent solution but I'm wondering if keeping a copy of the driver as is around and using new locations for the fixed firmware might be the safest way to handle this. We could have a wrapper which tries to load the newer firmware and uses the fixed driver code if that's there, otherwise tries the old driver with the existing firmware paths. This is obviously a horror show and leaves the old code sitting there but given the mistakes that have been made the whole situation looks like a house of cards.

author maintainer
#92 lore raw
Quoted 33 lines · Mark Brown
Quoted 9 lines · Pierre-Louis Bossart
Quoted 5 lines · Cezary Rojewski

Wasn't lying about FW version being unreliable. Let's say vendor receives quick FW drop with new RCR.. such eng drop may carry invalid numbers such as 0.0.0.0..
In general, I try to avoid relying on FW version whenever possible. It can be dumped for debug reasons, true, but to be relied on? Not really.

Goodness, that's really bad. I didn't realize this.

At a previous employer I modified our build stamping infrastructure to also include both a timestamp and a serialized build number in the version number since one of my colleagues was fond of sending people prereleases of what he was working on to other people with identical version numbers on different binaries leading to much confusion and checksumming. You do see a lot of things with those serialized version numbers, especially SVN based projects.

Quoted 6 lines
Quoted 5 lines

Personally, I'm against all hardcodes and would simply recommend all user to redirect their symlinks when they do switch kernel - along with dumping warning/ error message in dmesg. Hardcodes bring problems with forward compatibility and that's why host should offload them away to FW.

Quoted 6 lines

Cezary, I know you are not responsible for all this, but at this point if we (Intel) can't guarantee any sort of interoperability with both firmware and topology we should make it clear that this driver is not recommended unless specific versions of the firmware/topology are used, and as a consequence the typical client distros and desktop/laptop users should use HDaudio legacy or SOF (for DMICs)

Quoted 9 lines

Not the most elegent solution but I'm wondering if keeping a copy of the driver as is around and using new locations for the fixed firmware might be the safest way to handle this. We could have a wrapper which tries to load the newer firmware and uses the fixed driver code if that's there, otherwise tries the old driver with the existing firmware paths. This is obviously a horror show and leaves the old code sitting there but given the mistakes that have been made the whole situation looks like a house of cards.

Thanks for the feedback Mark. While I'm not yet on the "SOF will fix this" train, I'm keen to agree to leaving this entirely to SOF if it comes down to us duplicating /skylake.

However, we are not going to give up that easily. I'll see if some "golden config" hardcodes can't be provided in some legacy.c file which would be fetched if initial setup fails. E.g.: 2cores, 3ssps, 1PAGE_SIZE per trace buffer.. and such. There are quite a few factors to take into consideration though. If "asking" user via dmesg to upgrade the firmware if his/her setup contains obsolete binary is really not an option, then some magic words got to be involved.

Czarek

author maintainer
#93 lore raw
Quoted 44 lines · Cezary Rojewski
Quoted 33 lines · Mark Brown
Quoted 9 lines · Pierre-Louis Bossart
Quoted 5 lines · Cezary Rojewski

Wasn't lying about FW version being unreliable. Let's say vendor receives quick FW drop with new RCR.. such eng drop may carry invalid numbers such as 0.0.0.0..
In general, I try to avoid relying on FW version whenever possible. It can be dumped for debug reasons, true, but to be relied on? Not really.

Goodness, that's really bad. I didn't realize this.

At a previous employer I modified our build stamping infrastructure to also include both a timestamp and a serialized build number in the version number since one of my colleagues was fond of sending people prereleases of what he was working on to other people with identical version numbers on different binaries leading to much confusion and checksumming.  You do see a lot of things with those serialized version numbers, especially SVN based projects.

Quoted 6 lines
Quoted 5 lines

Personally, I'm against all hardcodes and would simply recommend all user to redirect their symlinks when they do switch kernel - along with dumping warning/ error message in dmesg. Hardcodes bring problems with forward compatibility and that's why host should offload them away to FW.

Quoted 6 lines

Cezary, I know you are not responsible for all this, but at this point if we (Intel) can't guarantee any sort of interoperability with both firmware and topology we should make it clear that this driver is not recommended unless specific versions of the firmware/topology are used, and as a consequence the typical client distros and desktop/laptop users should use HDaudio legacy or SOF (for DMICs)

Quoted 9 lines

Not the most elegent solution but I'm wondering if keeping a copy of the driver as is around and using new locations for the fixed firmware might be the safest way to handle this.  We could have a wrapper which tries to load the newer firmware and uses the fixed driver code if that's there, otherwise tries the old driver with the existing firmware paths.  This is obviously a horror show and leaves the old code sitting there but given the mistakes that have been made the whole situation looks like a house of cards.

Quoted 5 lines

Thanks for the feedback Mark. While I'm not yet on the "SOF will fix this" train, I'm keen to agree to leaving this entirely to SOF if it comes down to us duplicating /skylake.

However, we are not going to give up that easily. I'll see if some "golden config" hardcodes can't be provided in some legacy.c file which would be fetched if initial setup fails. E.g.: 2cores, 3ssps, 1PAGE_SIZE per trace buffer.. and such. There are quite a few factors to take into consideration though. If "asking" user via dmesg to upgrade the firmware if his/her setup contains obsolete binary is really not an option, then some magic words got to be involved.

Czarek

On the second thought what if instead of duplicating kernel code, binaries would be duplicated?
I.e. rather than targeting /intel/dsp_fw_cnl.bin, _new_ /skylake would be expecting /intel/dsp_fw_cnl_release.bin? Same with topology binaries.
In such case, we "only" need to figure out how to propagate new files to Linux distos so whenever someone updates their kernel, new binaries are already present in their /lib/firmware.

If such option is valid, we can postpone /skylake upgrade till 5.4 merging window closes and the patches (rough estimation is 150) would descend upon alsa-devel in time between 5.4 and 5.5.
_______________________________________________
Alsa-devel mailing list
[email protected]
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

#94 lore raw
Quoted 49 lines · Cezary Rojewski
Quoted 48 lines · Cezary Rojewski
Quoted 33 lines · Mark Brown
Quoted 9 lines · Pierre-Louis Bossart
Quoted 5 lines · Cezary Rojewski

Wasn't lying about FW version being unreliable. Let's say vendor receives quick FW drop with new RCR.. such eng drop may carry invalid numbers such as 0.0.0.0..
In general, I try to avoid relying on FW version whenever possible. It can be dumped for debug reasons, true, but to be relied on? Not really.

Goodness, that's really bad. I didn't realize this.

At a previous employer I modified our build stamping infrastructure to also include both a timestamp and a serialized build number in the version number since one of my colleagues was fond of sending people prereleases of what he was working on to other people with identical version numbers on different binaries leading to much confusion and checksumming.  You do see a lot of things with those serialized version numbers, especially SVN based projects.

Quoted 6 lines
Quoted 5 lines

Personally, I'm against all hardcodes and would simply recommend all user to redirect their symlinks when they do switch kernel - along with dumping warning/ error message in dmesg. Hardcodes bring problems with forward compatibility and that's why host should offload them away to FW.

Quoted 6 lines

Cezary, I know you are not responsible for all this, but at this point if we (Intel) can't guarantee any sort of interoperability with both firmware and topology we should make it clear that this driver is not recommended unless specific versions of the firmware/topology are used, and as a consequence the typical client distros and desktop/laptop users should use HDaudio legacy or SOF (for DMICs)

Quoted 9 lines

Not the most elegent solution but I'm wondering if keeping a copy of the driver as is around and using new locations for the fixed firmware might be the safest way to handle this.  We could have a wrapper which tries to load the newer firmware and uses the fixed driver code if that's there, otherwise tries the old driver with the existing firmware paths.  This is obviously a horror show and leaves the old code sitting there but given the mistakes that have been made the whole situation looks like a house of cards.

Thanks for the feedback Mark. While I'm not yet on the "SOF will fix this" train, I'm keen to agree to leaving this entirely to SOF if it comes down to us duplicating /skylake.

However, we are not going to give up that easily. I'll see if some "golden config" hardcodes can't be provided in some legacy.c file which would be fetched if initial setup fails. E.g.: 2cores, 3ssps, 1PAGE_SIZE per trace buffer.. and such. There are quite a few factors to take into consideration though. If "asking" user via dmesg to upgrade the firmware if his/her setup contains obsolete binary is really not an option, then some magic words got to be involved.

Quoted 7 lines
Quoted 1 line

Czarek

On the second thought what if instead of duplicating kernel code, binaries would be duplicated?
I.e. rather than targeting /intel/dsp_fw_cnl.bin, _new_ /skylake would be expecting /intel/dsp_fw_cnl_release.bin? Same with topology binaries.
In such case, we "only" need to figure out how to propagate new files to Linux distos so whenever someone updates their kernel, new binaries are already present in their /lib/firmware.

If such option is valid, we can postpone /skylake upgrade till 5.4 merging window closes and the patches (rough estimation is 150) would descend upon alsa-devel in time between 5.4 and 5.5.

If the driver and FW update will be within the same kernel release then IMHO there should be no compatibility problem between those two components, right? This way kernel users willing to stick to old FW can stay on older kernel version while others can update and receive all the latest FW functionality that was developed and enabled.

In terms of FW topology compatibility there is an option to read from topology manifest a FW version that it was build for and in  case if it does not match FW version present on the platform then print warning that the FW topology binary should be rebuild for current FW version (x.x.x.x).

The above approach at the end may be less confusing then source code or binary duplication.

Quoted 4 lines

_______________________________________________
Alsa-devel mailing list
[email protected]
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

_______________________________________________
Alsa-devel mailing list
[email protected]
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

#95 lore raw
Quoted 57 lines · Michal
Quoted 55 lines · Cezary Rojewski
Quoted 44 lines · Cezary Rojewski
Quoted 33 lines · Mark Brown
Quoted 9 lines · Pierre-Louis Bossart
Quoted 5 lines · Cezary Rojewski

Wasn't lying about FW version being unreliable. Let's say vendor receives quick FW drop with new RCR.. such eng drop may carry invalid numbers such as 0.0.0.0..
In general, I try to avoid relying on FW version whenever possible. It can be dumped for debug reasons, true, but to be relied on? Not really.

Goodness, that's really bad. I didn't realize this.

At a previous employer I modified our build stamping infrastructure to also include both a timestamp and a serialized build number in the version number since one of my colleagues was fond of sending people prereleases of what he was working on to other people with identical version numbers on different binaries leading to much confusion and checksumming.  You do see a lot of things with those serialized version numbers, especially SVN based projects.

Quoted 6 lines
Quoted 5 lines

Personally, I'm against all hardcodes and would simply recommend all user to redirect their symlinks when they do switch kernel - along with dumping warning/ error message in dmesg. Hardcodes bring problems with forward compatibility and that's why host should offload them away to FW.

Quoted 6 lines

Cezary, I know you are not responsible for all this, but at this point if we (Intel) can't guarantee any sort of interoperability with both firmware and topology we should make it clear that this driver is not recommended unless specific versions of the firmware/topology are used, and as a consequence the typical client distros and desktop/laptop users should use HDaudio legacy or SOF (for DMICs)

Quoted 9 lines

Not the most elegent solution but I'm wondering if keeping a copy of the driver as is around and using new locations for the fixed firmware might be the safest way to handle this.  We could have a wrapper which tries to load the newer firmware and uses the fixed driver code if that's there, otherwise tries the old driver with the existing firmware paths.  This is obviously a horror show and leaves the old code sitting there but given the mistakes that have been made the whole situation looks like a house of cards.

Quoted 5 lines

Thanks for the feedback Mark. While I'm not yet on the "SOF will fix this" train, I'm keen to agree to leaving this entirely to SOF if it comes down to us duplicating /skylake.

However, we are not going to give up that easily. I'll see if some "golden config" hardcodes can't be provided in some legacy.c file which would be fetched if initial setup fails. E.g.: 2cores, 3ssps, 1PAGE_SIZE per trace buffer.. and such. There are quite a few factors to take into consideration though. If "asking" user via dmesg to upgrade the firmware if his/her setup contains obsolete binary is really not an option, then some magic words got to be involved.

Czarek

On the second thought what if instead of duplicating kernel code, binaries would be duplicated?
I.e. rather than targeting /intel/dsp_fw_cnl.bin, _new_ /skylake would be expecting /intel/dsp_fw_cnl_release.bin? Same with topology binaries.
In such case, we "only" need to figure out how to propagate new files to Linux distos so whenever someone updates their kernel, new binaries are already present in their /lib/firmware.

Quoted 6 lines
Quoted 1 line

If such option is valid, we can postpone /skylake upgrade till 5.4 merging window closes and the patches (rough estimation is 150) would descend upon alsa-devel in time between 5.4 and 5.5.

If the driver and FW update will be within the same kernel release then IMHO there should be no compatibility problem between those two components, right? This way kernel users willing to stick to old FW can stay on older kernel version while others can update and receive all the latest FW functionality that was developed and enabled.

I am not comfortable with precluding a kernel update because of a single firmware file. There are all sort of reasons for updating a kernel, security, sideband attacks and Android CDD compatibility being the most obvious ones.

Quoted 5 lines

In terms of FW topology compatibility there is an option to read from topology manifest a FW version that it was build for and in  case if it does not match FW version present on the platform then print warning that the FW topology binary should be rebuild for current FW version (x.x.x.x).

Can you provide a pointer on how the FW version is embedded in a .conf/.tplg file? I see a couple where that information does not seem present.

Quoted 1 line

The above approach at the end may be less confusing then source code or binary duplication.

_______________________________________________
Alsa-devel mailing list
[email protected]
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

author maintainer
#96 lore raw
Quoted 70 lines · Pierre-Louis Bossart
Quoted 57 lines · Michal
Quoted 55 lines · Cezary Rojewski
Quoted 44 lines · Cezary Rojewski
Quoted 33 lines · Mark Brown
Quoted 9 lines · Pierre-Louis Bossart
Quoted 5 lines · Cezary Rojewski

Wasn't lying about FW version being unreliable. Let's say vendor receives quick FW drop with new RCR.. such eng drop may carry invalid numbers such as 0.0.0.0..
In general, I try to avoid relying on FW version whenever possible. It can be dumped for debug reasons, true, but to be relied on? Not really.

Goodness, that's really bad. I didn't realize this.

At a previous employer I modified our build stamping infrastructure to also include both a timestamp and a serialized build number in the version number since one of my colleagues was fond of sending people prereleases of what he was working on to other people with identical version numbers on different binaries leading to much confusion and checksumming.  You do see a lot of things with those serialized version numbers, especially SVN based projects.

Quoted 6 lines
Quoted 5 lines

Personally, I'm against all hardcodes and would simply recommend all user to redirect their symlinks when they do switch kernel - along with dumping warning/ error message in dmesg. Hardcodes bring problems with forward compatibility and that's why host should offload them away to FW.

Quoted 6 lines

Cezary, I know you are not responsible for all this, but at this point if we (Intel) can't guarantee any sort of interoperability with both firmware and topology we should make it clear that this driver is not recommended unless specific versions of the firmware/topology are used, and as a consequence the typical client distros and desktop/laptop users should use HDaudio legacy or SOF (for DMICs)

Quoted 9 lines

Not the most elegent solution but I'm wondering if keeping a copy of the driver as is around and using new locations for the fixed firmware might be the safest way to handle this.  We could have a wrapper which tries to load the newer firmware and uses the fixed driver code if that's there, otherwise tries the old driver with the existing firmware paths.  This is obviously a horror show and leaves the old code sitting there but given the mistakes that have been made the whole situation looks like a house of cards.

Quoted 5 lines

Thanks for the feedback Mark. While I'm not yet on the "SOF will fix this" train, I'm keen to agree to leaving this entirely to SOF if it comes down to us duplicating /skylake.

However, we are not going to give up that easily. I'll see if some "golden config" hardcodes can't be provided in some legacy.c file which would be fetched if initial setup fails. E.g.: 2cores, 3ssps, 1PAGE_SIZE per trace buffer.. and such. There are quite a few factors to take into consideration though. If "asking" user via dmesg to upgrade the firmware if his/her setup contains obsolete binary is really not an option, then some magic words got to be involved.

Czarek

On the second thought what if instead of duplicating kernel code, binaries would be duplicated?
I.e. rather than targeting /intel/dsp_fw_cnl.bin, _new_ /skylake would be expecting /intel/dsp_fw_cnl_release.bin? Same with topology binaries.
In such case, we "only" need to figure out how to propagate new files to Linux distos so whenever someone updates their kernel, new binaries are already present in their /lib/firmware.

Quoted 6 lines
Quoted 1 line

If such option is valid, we can postpone /skylake upgrade till 5.4 merging window closes and the patches (rough estimation is 150) would descend upon alsa-devel in time between 5.4 and 5.5.

If the driver and FW update will be within the same kernel release then IMHO there should be no compatibility problem between those two components, right? This way kernel users willing to stick to old FW can stay on older kernel version while others can update and receive all the latest FW functionality that was developed and enabled.

I am not comfortable with precluding a kernel update because of a single firmware file. There are all sort of reasons for updating a kernel, security, sideband attacks and Android CDD compatibility being the most obvious ones.

Quoted 1 line
Quoted 9 lines
Quoted 4 lines

In terms of FW topology compatibility there is an option to read from topology manifest a FW version that it was build for and in  case if it does not match FW version present on the platform then print warning that the FW topology binary should be rebuild for current FW version (x.x.x.x).

Can you provide a pointer on how the FW version is embedded in a .conf/.tplg file? I see a couple where that information does not seem present.

Quoted 1 line

The above approach at the end may be less confusing then source code or binary duplication.

Indeed. Our existing topology skips that part of internal .xml and thus such information is not propagated to kernel.

Pierre, how about the binary-duplication - as described above? Btw, that's not a single firmware file ^)^ We would immediately update all of them, together with topologies.
_______________________________________________
Alsa-devel mailing list
[email protected]
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

#97 lore raw
Quoted 76 lines · Cezary Rojewski
Quoted 75 lines · Pierre-Louis Bossart
Quoted 57 lines · Michal
Quoted 55 lines · Cezary Rojewski
Quoted 44 lines · Cezary Rojewski
Quoted 33 lines · Mark Brown
Quoted 9 lines · Pierre-Louis Bossart
Quoted 5 lines · Cezary Rojewski

Wasn't lying about FW version being unreliable. Let's say vendor receives quick FW drop with new RCR.. such eng drop may carry invalid numbers such as 0.0.0.0..
In general, I try to avoid relying on FW version whenever possible. It can be dumped for debug reasons, true, but to be relied on? Not really.

Goodness, that's really bad. I didn't realize this.

At a previous employer I modified our build stamping infrastructure to also include both a timestamp and a serialized build number in the version number since one of my colleagues was fond of sending people prereleases of what he was working on to other people with identical version numbers on different binaries leading to much confusion and checksumming.  You do see a lot of things with those serialized version numbers, especially SVN based projects.

Quoted 6 lines
Quoted 5 lines

Personally, I'm against all hardcodes and would simply recommend all user to redirect their symlinks when they do switch kernel - along with dumping warning/ error message in dmesg. Hardcodes bring problems with forward compatibility and that's why host should offload them away to FW.

Quoted 6 lines

Cezary, I know you are not responsible for all this, but at this point if we (Intel) can't guarantee any sort of interoperability with both firmware and topology we should make it clear that this driver is not recommended unless specific versions of the firmware/topology are used, and as a consequence the typical client distros and desktop/laptop users should use HDaudio legacy or SOF (for DMICs)

Quoted 9 lines

Not the most elegent solution but I'm wondering if keeping a copy of the driver as is around and using new locations for the fixed firmware might be the safest way to handle this.  We could have a wrapper which tries to load the newer firmware and uses the fixed driver code if that's there, otherwise tries the old driver with the existing firmware paths.  This is obviously a horror show and leaves the old code sitting there but given the mistakes that have been made the whole situation looks like a house of cards.

Quoted 5 lines

Thanks for the feedback Mark. While I'm not yet on the "SOF will fix this" train, I'm keen to agree to leaving this entirely to SOF if it comes down to us duplicating /skylake.

However, we are not going to give up that easily. I'll see if some "golden config" hardcodes can't be provided in some legacy.c file which would be fetched if initial setup fails. E.g.: 2cores, 3ssps, 1PAGE_SIZE per trace buffer.. and such. There are quite a few factors to take into consideration though. If "asking" user via dmesg to upgrade the firmware if his/her setup contains obsolete binary is really not an option, then some magic words got to be involved.

Czarek

On the second thought what if instead of duplicating kernel code, binaries would be duplicated?
I.e. rather than targeting /intel/dsp_fw_cnl.bin, _new_ /skylake would be expecting /intel/dsp_fw_cnl_release.bin? Same with topology binaries.
In such case, we "only" need to figure out how to propagate new files to Linux distos so whenever someone updates their kernel, new binaries are already present in their /lib/firmware.

Quoted 6 lines
Quoted 1 line

If such option is valid, we can postpone /skylake upgrade till 5.4 merging window closes and the patches (rough estimation is 150) would descend upon alsa-devel in time between 5.4 and 5.5.

If the driver and FW update will be within the same kernel release then IMHO there should be no compatibility problem between those two components, right? This way kernel users willing to stick to old FW can stay on older kernel version while others can update and receive all the latest FW functionality that was developed and enabled.

I am not comfortable with precluding a kernel update because of a single firmware file. There are all sort of reasons for updating a kernel, security, sideband attacks and Android CDD compatibility being the most obvious ones.

Quoted 5 lines

In terms of FW topology compatibility there is an option to read from topology manifest a FW version that it was build for and in  case if it does not match FW version present on the platform then print warning that the FW topology binary should be rebuild for current FW version (x.x.x.x).

Quoted 8 lines
Quoted 4 lines

Can you provide a pointer on how the FW version is embedded in a .conf/.tplg file? I see a couple where that information does not seem present.

Quoted 1 line

The above approach at the end may be less confusing then source code or binary duplication.

Indeed. Our existing topology skips that part of internal .xml and thus such information is not propagated to kernel.

Pierre, how about the binary-duplication - as described above? Btw, that's not a single firmware file ^)^ We would immediately update all of them, together with topologies.

I didn't understand how you would select the new firmwares? Some code change needs to happen as well?
_______________________________________________
Alsa-devel mailing list
[email protected]
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

#98 lore raw
Quoted 66 lines · Pierre-Louis Bossart
Quoted 63 lines · Cezary Rojewski
Quoted 62 lines · Pierre-Louis Bossart
Quoted 59 lines · Michal
Quoted 56 lines · Cezary Rojewski
Quoted 44 lines · Cezary Rojewski
Quoted 33 lines · Mark Brown
Quoted 9 lines · Pierre-Louis Bossart
Quoted 5 lines · Cezary Rojewski

Wasn't lying about FW version being unreliable. Let's say vendor receives quick FW drop with new RCR.. such eng drop may carry invalid numbers such as 0.0.0.0..
In general, I try to avoid relying on FW version whenever possible. It can be dumped for debug reasons, true, but to be relied on? Not really.

Goodness, that's really bad. I didn't realize this.

At a previous employer I modified our build stamping infrastructure to also include both a timestamp and a serialized build number in the version number since one of my colleagues was fond of sending people prereleases of what he was working on to other people with identical version numbers on different binaries leading to much confusion and checksumming. You do see a lot of things with those serialized version numbers, especially SVN based projects.

Quoted 6 lines
Quoted 5 lines

Personally, I'm against all hardcodes and would simply recommend all user to redirect their symlinks when they do switch kernel - along with dumping warning/ error message in dmesg. Hardcodes bring problems with forward compatibility and that's why host should offload them away to FW.

Quoted 6 lines

Cezary, I know you are not responsible for all this, but at this point if we (Intel) can't guarantee any sort of interoperability with both firmware and topology we should make it clear that this driver is not recommended unless specific versions of the firmware/topology are used, and as a consequence the typical client distros and desktop/laptop users should use HDaudio legacy or SOF (for DMICs)

Quoted 9 lines

Not the most elegent solution but I'm wondering if keeping a copy of the driver as is around and using new locations for the fixed firmware might be the safest way to handle this.  We could have a wrapper which tries to load the newer firmware and uses the fixed driver code if that's there, otherwise tries the old driver with the existing firmware paths.  This is obviously a horror show and leaves the old code sitting there but given the mistakes that have been made the whole situation looks like a house of cards.

Quoted 5 lines

Thanks for the feedback Mark. While I'm not yet on the "SOF will fix this" train, I'm keen to agree to leaving this entirely to SOF if it comes down to us duplicating /skylake.

However, we are not going to give up that easily. I'll see if some "golden config" hardcodes can't be provided in some legacy.c file which would be fetched if initial setup fails. E.g.: 2cores, 3ssps, 1PAGE_SIZE per trace buffer.. and such. There are quite a few factors to take into consideration though. If "asking" user via dmesg to upgrade the firmware if his/her setup contains obsolete binary is really not an option, then some magic words got to be involved.

Czarek

On the second thought what if instead of duplicating kernel code, binaries would be duplicated?
I.e. rather than targeting /intel/dsp_fw_cnl.bin, _new_ /skylake would be expecting /intel/dsp_fw_cnl_release.bin? Same with topology binaries.
In such case, we "only" need to figure out how to propagate new files to Linux distos so whenever someone updates their kernel, new binaries are already present in their /lib/firmware.

If such option is valid, we can postpone /skylake upgrade till 5.4 merging window closes and the patches (rough estimation is 150) would descend upon alsa-devel in time between 5.4 and 5.5.

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 4 lines

If the driver and FW update will be within the same kernel release then IMHO there should be no compatibility problem between those two components, right? This way kernel users willing to stick to old FW can stay on older kernel version while others can update and receive all the latest FW functionality that was developed and enabled.

I am not comfortable with precluding a kernel update because of a single firmware file. There are all sort of reasons for updating a kernel, security, sideband attacks and Android CDD compatibility being the most obvious ones.

The single firmware file will not be a blocker as the driver included in updated kernel will support it. All you have to do is the little effort to re-generate your custom topology for the new firmware target. The entire operation should not be a problem as there are dedicated utilities like FDK to do that.

Your statement Pierre suggest that everyone should avoid any functional changes in kernel that are not critical because that would be problematic for others who switch from older kernel version.

Quoted 13 lines
Quoted 13 lines
Quoted 10 lines
Quoted 5 lines

In terms of FW topology compatibility there is an option to read from topology manifest a FW version that it was build for and in  case if it does not match FW version present on the platform then print warning that the FW topology binary should be rebuild for current FW version (x.x.x.x).

Can you provide a pointer on how the FW version is embedded in a .conf/.tplg file? I see a couple where that information does not seem present.

Quoted 1 line

The above approach at the end may be less confusing then source code or binary duplication.

Indeed. Our existing topology skips that part of internal .xml and thus such information is not propagated to kernel.

Quoted 7 lines
Quoted 1 line

Pierre, how about the binary-duplication - as described above? Btw, that's not a single firmware file ^)^ We would immediately update all of them, together with topologies.

I didn't understand how you would select the new firmwares? Some code change needs to happen as well?
_______________________________________________
Alsa-devel mailing list
[email protected]
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

_______________________________________________
Alsa-devel mailing list
[email protected]
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

#99 lore raw
Quoted 28 lines
Quoted 28 lines
Quoted 28 lines
Quoted 28 lines
Quoted 27 lines
Quoted 15 lines
Quoted 15 lines
Quoted 10 lines

Not the most elegent solution but I'm wondering if keeping a copy of the driver as is around and using new locations for the fixed firmware might be the safest way to handle this.  We could have a wrapper which tries to load the newer firmware and uses the fixed driver code if that's there, otherwise tries the old driver with the existing firmware paths.  This is obviously a horror show and leaves the old code sitting there but given the mistakes that have been made the whole situation looks like a house of cards.

Thanks for the feedback Mark. While I'm not yet on the "SOF will fix this" train, I'm keen to agree to leaving this entirely to SOF if it comes down to us duplicating /skylake.

However, we are not going to give up that easily. I'll see if some "golden config" hardcodes can't be provided in some legacy.c file which would be fetched if initial setup fails. E.g.: 2cores, 3ssps, 1PAGE_SIZE per trace buffer.. and such. There are quite a few factors to take into consideration though. If "asking" user via dmesg to upgrade the firmware if his/her setup contains obsolete binary is really not an option, then some magic words got to be involved.

Quoted 7 lines
Quoted 1 line

Czarek

On the second thought what if instead of duplicating kernel code, binaries would be duplicated?
I.e. rather than targeting /intel/dsp_fw_cnl.bin, _new_ /skylake would be expecting /intel/dsp_fw_cnl_release.bin? Same with topology binaries.
In such case, we "only" need to figure out how to propagate new files to Linux distos so whenever someone updates their kernel, new binaries are already present in their /lib/firmware.

If such option is valid, we can postpone /skylake upgrade till 5.4 merging window closes and the patches (rough estimation is 150) would descend upon alsa-devel in time between 5.4 and 5.5.

If the driver and FW update will be within the same kernel release then IMHO there should be no compatibility problem between those two components, right? This way kernel users willing to stick to old FW can stay on older kernel version while others can update and receive all the latest FW functionality that was developed and enabled.

Quoted 5 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

I am not comfortable with precluding a kernel update because of a single firmware file. There are all sort of reasons for updating a kernel, security, sideband attacks and Android CDD compatibility being the most obvious ones.

The single firmware file will not be a blocker as the driver included in updated kernel will support it. All you have to do is the little effort to re-generate your custom topology for the new firmware target. The entire operation should not be a problem as there are dedicated utilities like FDK to do that.

The issue is the same whether it's a topology file or a firmware file. The ideal situation is that when the kernel is updated it handles both in backwards compatible ways.

If to deal with a new firmware file you have to regenerate a new topology, you are in a different model altogether.

Quoted 2 lines

Your statement Pierre suggest that everyone should avoid any functional changes in kernel that are not critical because that would be problematic for others who switch from older kernel version.

All I said was that you cannot assume that people who are using an old
firmware/driver will remain on an old kernel.

Mark made an initial proposal to essentially freeze the current solution, which would make it possible to update the kernel but keep the same skylake driver in legacy/maintenance mode only, and an 'new' option that would rely on an updated distribution of firmware/driver. I did not get the counter proposal from Cezary at all.
_______________________________________________
Alsa-devel mailing list
[email protected]
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

author maintainer
#100 lore raw
Quoted 36 lines · Pierre-Louis Bossart
Quoted 28 lines
Quoted 28 lines
Quoted 28 lines
Quoted 28 lines
Quoted 27 lines
Quoted 15 lines
Quoted 15 lines
Quoted 10 lines

Not the most elegent solution but I'm wondering if keeping a copy of the driver as is around and using new locations for the fixed firmware might be the safest way to handle this.  We could have a wrapper which tries to load the newer firmware and uses the fixed driver code if that's there, otherwise tries the old driver with the existing firmware paths.  This is obviously a horror show and leaves the old code sitting there but given the mistakes that have been made the whole situation looks like a house of cards.

Thanks for the feedback Mark. While I'm not yet on the "SOF will fix this" train, I'm keen to agree to leaving this entirely to SOF if it comes down to us duplicating /skylake.

However, we are not going to give up that easily. I'll see if some "golden config" hardcodes can't be provided in some legacy.c file which would be fetched if initial setup fails. E.g.: 2cores, 3ssps, 1PAGE_SIZE per trace buffer.. and such. There are quite a few factors to take into consideration though. If "asking" user via dmesg to upgrade the firmware if his/her setup contains obsolete binary is really not an option, then some magic words got to be involved.

Quoted 7 lines
Quoted 1 line

Czarek

On the second thought what if instead of duplicating kernel code, binaries would be duplicated?
I.e. rather than targeting /intel/dsp_fw_cnl.bin, _new_ /skylake would be expecting /intel/dsp_fw_cnl_release.bin? Same with topology binaries.
In such case, we "only" need to figure out how to propagate new files to Linux distos so whenever someone updates their kernel, new binaries are already present in their /lib/firmware.

If such option is valid, we can postpone /skylake upgrade till 5.4 merging window closes and the patches (rough estimation is 150) would descend upon alsa-devel in time between 5.4 and 5.5.

If the driver and FW update will be within the same kernel release then IMHO there should be no compatibility problem between those two components, right? This way kernel users willing to stick to old FW can stay on older kernel version while others can update and receive all the latest FW functionality that was developed and enabled.

Quoted 5 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

I am not comfortable with precluding a kernel update because of a single firmware file. There are all sort of reasons for updating a kernel, security, sideband attacks and Android CDD compatibility being the most obvious ones.

The single firmware file will not be a blocker as the driver included in updated kernel will support it. All you have to do is the little effort to re-generate your custom topology for the new firmware target. The entire operation should not be a problem as there are dedicated utilities like FDK to do that.

The issue is the same whether it's a topology file or a firmware file. The ideal situation is that when the kernel is updated it handles both in backwards compatible ways.

Quoted 8 lines

If to deal with a new firmware file you have to regenerate a new topology, you are in a different model altogether.

Quoted 2 lines

Your statement Pierre suggest that everyone should avoid any functional changes in kernel that are not critical because that would be problematic for others who switch from older kernel version.

 All I said was that you cannot assume that people who are using an old
firmware/driver will remain on an old kernel.

Mark made an initial proposal to essentially freeze the current solution, which would make it possible to update the kernel but keep the same skylake driver in legacy/maintenance mode only, and an 'new' option that would rely on an updated distribution of firmware/driver. I did not get the counter proposal from Cezary at all.

Ain't my previous message:

-

On the second thought what if instead of duplicating kernel code, binaries would be duplicated?
I.e. rather than targeting /intel/dsp_fw_cnl.bin, _new_ /skylake would be expecting /intel/dsp_fw_cnl_release.bin? Same with topology binaries.
In such case, we "only" need to figure out how to propagate new files to Linux distos so whenever someone updates their kernel, new binaries are already present in their /lib/firmware.

If such option is valid, we can postpone /skylake upgrade till 5.4 merging window closes and the patches (rough estimation is 150) would descend upon alsa-devel in time between 5.4 and 5.5.

-

a counter proposal?
_______________________________________________
Alsa-devel mailing list
[email protected]
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

#101 lore raw
Quoted 53 lines · Cezary Rojewski
Quoted 36 lines · Pierre-Louis Bossart
Quoted 28 lines
Quoted 28 lines
Quoted 28 lines
Quoted 28 lines
Quoted 27 lines
Quoted 15 lines
Quoted 15 lines
Quoted 10 lines

Not the most elegent solution but I'm wondering if keeping a copy of the driver as is around and using new locations for the fixed firmware might be the safest way to handle this.  We could have a wrapper which tries to load the newer firmware and uses the fixed driver code if that's there, otherwise tries the old driver with the existing firmware paths.  This is obviously a horror show and leaves the old code sitting there but given the mistakes that have been made the whole situation looks like a house of cards.

Thanks for the feedback Mark. While I'm not yet on the "SOF will fix this" train, I'm keen to agree to leaving this entirely to SOF if it comes down to us duplicating /skylake.

However, we are not going to give up that easily. I'll see if some "golden config" hardcodes can't be provided in some legacy.c file which would be fetched if initial setup fails. E.g.: 2cores, 3ssps, 1PAGE_SIZE per trace buffer.. and such. There are quite a few factors to take into consideration though. If "asking" user via dmesg to upgrade the firmware if his/her setup contains obsolete binary is really not an option, then some magic words got to be involved.

Quoted 7 lines
Quoted 1 line

Czarek

On the second thought what if instead of duplicating kernel code, binaries would be duplicated?
I.e. rather than targeting /intel/dsp_fw_cnl.bin, _new_ /skylake would be expecting /intel/dsp_fw_cnl_release.bin? Same with topology binaries.
In such case, we "only" need to figure out how to propagate new files to Linux distos so whenever someone updates their kernel, new binaries are already present in their /lib/firmware.

If such option is valid, we can postpone /skylake upgrade till 5.4 merging window closes and the patches (rough estimation is 150) would descend upon alsa-devel in time between 5.4 and 5.5.

If the driver and FW update will be within the same kernel release then IMHO there should be no compatibility problem between those two components, right? This way kernel users willing to stick to old FW can stay on older kernel version while others can update and receive all the latest FW functionality that was developed and enabled.

Quoted 5 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

I am not comfortable with precluding a kernel update because of a single firmware file. There are all sort of reasons for updating a kernel, security, sideband attacks and Android CDD compatibility being the most obvious ones.

The single firmware file will not be a blocker as the driver included in updated kernel will support it. All you have to do is the little effort to re-generate your custom topology for the new firmware target. The entire operation should not be a problem as there are dedicated utilities like FDK to do that.

The issue is the same whether it's a topology file or a firmware file. The ideal situation is that when the kernel is updated it handles both in backwards compatible ways.

Quoted 7 lines

If to deal with a new firmware file you have to regenerate a new topology, you are in a different model altogether.

Quoted 2 lines

Your statement Pierre suggest that everyone should avoid any functional changes in kernel that are not critical because that would be problematic for others who switch from older kernel version.

  All I said was that you cannot assume that people who are using an old firmware/driver will remain on an old kernel.

Mark made an initial proposal to essentially freeze the current solution, which would make it possible to update the kernel but keep the same skylake driver in legacy/maintenance mode only, and an 'new' option that would rely on an updated distribution of firmware/driver. I did not get the counter proposal from Cezary at all.

Ain't my previous message:

-

On the second thought what if instead of duplicating kernel code, binaries would be duplicated?
I.e. rather than targeting /intel/dsp_fw_cnl.bin, _new_ /skylake would be expecting /intel/dsp_fw_cnl_release.bin? Same with topology binaries.
In such case, we "only" need to figure out how to propagate new files to Linux distos so whenever someone updates their kernel, new binaries are already present in their /lib/firmware.

Quoted 5 lines

If such option is valid, we can postpone /skylake upgrade till 5.4 merging window closes and the patches (rough estimation is 150) would descend upon alsa-devel in time between 5.4 and 5.5.

-

a counter proposal?

you didn't explain how the 'duplicated binaries' would be selected. And 'instead of' means you suggested an alternative to Mark's proposal.
_______________________________________________
Alsa-devel mailing list
[email protected]
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

author maintainer
#102 lore raw
Quoted 35 lines · Pierre-Louis Bossart
Quoted 35 lines
Quoted 19 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 10 lines
Quoted 5 lines

On the second thought what if instead of duplicating kernel code, binaries would be duplicated?
I.e. rather than targeting /intel/dsp_fw_cnl.bin, _new_ /skylake would be expecting /intel/dsp_fw_cnl_release.bin? Same with topology binaries.
In such case, we "only" need to figure out how to propagate new files to Linux distos so whenever someone updates their kernel, new binaries are already present in their /lib/firmware.

If such option is valid, we can postpone /skylake upgrade till 5.4 merging window closes and the patches (rough estimation is 150) would descend upon alsa-devel in time between 5.4 and 5.5.

If the driver and FW update will be within the same kernel release then IMHO there should be no compatibility problem between those two components, right? This way kernel users willing to stick to old FW can stay on older kernel version while others can update and receive all the latest FW functionality that was developed and enabled.

Quoted 5 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

I am not comfortable with precluding a kernel update because of a single firmware file. There are all sort of reasons for updating a kernel, security, sideband attacks and Android CDD compatibility being the most obvious ones.

The single firmware file will not be a blocker as the driver included in updated kernel will support it. All you have to do is the little effort to re-generate your custom topology for the new firmware target. The entire operation should not be a problem as there are dedicated utilities like FDK to do that.

The issue is the same whether it's a topology file or a firmware file. The ideal situation is that when the kernel is updated it handles both in backwards compatible ways.

Quoted 7 lines

If to deal with a new firmware file you have to regenerate a new topology, you are in a different model altogether.

Quoted 2 lines

Your statement Pierre suggest that everyone should avoid any functional changes in kernel that are not critical because that would be problematic for others who switch from older kernel version.

  All I said was that you cannot assume that people who are using an old firmware/driver will remain on an old kernel.

Mark made an initial proposal to essentially freeze the current solution, which would make it possible to update the kernel but keep the same skylake driver in legacy/maintenance mode only, and an 'new' option that would rely on an updated distribution of firmware/driver. I did not get the counter proposal from Cezary at all.

Ain't my previous message:

-

On the second thought what if instead of duplicating kernel code, binaries would be duplicated?
I.e. rather than targeting /intel/dsp_fw_cnl.bin, _new_ /skylake would be expecting /intel/dsp_fw_cnl_release.bin? Same with topology binaries.
In such case, we "only" need to figure out how to propagate new files to Linux distos so whenever someone updates their kernel, new binaries are already present in their /lib/firmware.

Quoted 7 lines
Quoted 5 lines

If such option is valid, we can postpone /skylake upgrade till 5.4 merging window closes and the patches (rough estimation is 150) would descend upon alsa-devel in time between 5.4 and 5.5.

-

a counter proposal?

you didn't explain how the 'duplicated binaries' would be selected. And 'instead of' means you suggested an alternative to Mark's proposal.

What I have in mind:

We leave the old stuff as is, e.g:
/lib/firmware/intel/dsp_fw_cnl.bin -> points to _old_ FW binaries /lib/firmware/<PCI-ID>-INTEL-<oem_data_from_NHLT -> points to old topology

Existing /skylake i.e. before our initialization refactor would (kernels <5.5?) would still point to these and since they are not being removed from linux-firmware, nothing gets broken.

And then we "duplicate" and simply append the new ones:
/lib/firmware/intel/dsp_fw_cnl_release.bin -> points to _new_ FW /lib/firmware/dfw_cnl_rt274 -> points to _new_ topology

Updated /skylake would simply expect the _new_ files and totally ignore the old ones i.e.: descriptors would be pointing to dsp_fw_cnl_release and dfw_cnl_rt274.
_______________________________________________
Alsa-devel mailing list
[email protected]
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

#103 lore raw
Quoted 47 lines · Cezary Rojewski
Quoted 32 lines · Pierre-Louis Bossart
Quoted 32 lines
Quoted 14 lines
Quoted 9 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines

On the second thought what if instead of duplicating kernel code, binaries would be duplicated? I.e. rather than targeting /intel/dsp_fw_cnl.bin, _new_ /skylake would be expecting /intel/dsp_fw_cnl_release.bin? Same with topology binaries. In such case, we "only" need to figure out how to propagate new files to Linux distos so whenever someone updates their kernel, new binaries are already present in their /lib/firmware.

If such option is valid, we can postpone /skylake upgrade till 5.4 merging window closes and the patches (rough estimation is 150) would descend upon alsa-devel in time between 5.4 and 5.5.

If the driver and FW update will be within the same kernel release then IMHO there should be no compatibility problem between those two components, right? This way kernel users willing to stick to old FW can stay on older kernel version while others can update and receive all the latest FW functionality that was developed and enabled.

I am not comfortable with precluding a kernel update because of a single firmware file. There are all sort of reasons for updating a kernel, security, sideband attacks and Android CDD compatibility being the most obvious ones.

The single firmware file will not be a blocker as the driver included in updated kernel will support it. All you have to do is the little effort to re-generate your custom topology for the new firmware target. The entire operation should not be a problem as there are dedicated utilities like FDK to do that.

The issue is the same whether it's a topology file or a firmware file. The ideal situation is that when the kernel is updated it handles both in backwards compatible ways.

If to deal with a new firmware file you have to regenerate a new topology, you are in a different model altogether.

Quoted 8 lines
Quoted 1 line

Your statement Pierre suggest that everyone should avoid any functional changes in kernel that are not critical because that would be problematic for others who switch from older kernel version.

All I said was that you cannot assume that people who are using an old firmware/driver will remain on an old kernel.

Mark made an initial proposal to essentially freeze the
current solution, which would make it possible to update the
kernel but keep the same skylake driver in legacy/maintenance
mode only, and an 'new' option that would rely on an updated distribution of firmware/driver. I did not get the counter proposal from Cezary at all.

Ain't my previous message:

-

On the second thought what if instead of duplicating kernel
code, binaries would be duplicated? I.e. rather than targeting /intel/dsp_fw_cnl.bin, _new_ /skylake would be expecting /intel/dsp_fw_cnl_release.bin? Same with topology binaries. In such case, we "only" need to figure out how to propagate new files to Linux distos so whenever someone updates their kernel, new binaries are already present in their /lib/firmware.

If such option is valid, we can postpone /skylake upgrade till 5.4 merging window closes and the patches (rough estimation is 150) would descend upon alsa-devel in time between 5.4 and 5.5.

Quoted 7 lines
Quoted 3 lines

-

a counter proposal?

you didn't explain how the 'duplicated binaries' would be selected. And 'instead of' means you suggested an alternative to Mark's proposal.

What I have in mind:

We leave the old stuff as is, e.g:
/lib/firmware/intel/dsp_fw_cnl.bin -> points to _old_ FW binaries /lib/firmware/<PCI-ID>-INTEL-<oem_data_from_NHLT -> points to old topology

Quoted 6 lines

Existing /skylake i.e. before our initialization refactor would (kernels <5.5?) would still point to these and since they are not being removed from linux-firmware, nothing gets broken.

And then we "duplicate" and simply append the new ones: /lib/firmware/intel/dsp_fw_cnl_release.bin -> points to _new_ FW /lib/firmware/dfw_cnl_rt274 -> points to _new_ topology

Updated /skylake would simply expect the _new_ files and totally ignore the old ones i.e.: descriptors would be pointing to dsp_fw_cnl_release and dfw_cnl_rt274.

What if those new files are not present on the filesystem?

Mark suggested:
"We could have a wrapper which tries to load the newer firmware and uses the fixed driver code if that's there, otherwise tries the old driver with the existing firmware paths."

Maybe that's too complicated, I had in mind some sort of opt-in Kconfig where you only use the new firmware/topology when the user/distro gives a clear hint than it's fine to use newer stuff.

I also wonder how you are going to deal with all these topology files with a name derived from the OEM/NHLT. There's just so many of them...For upstream you probably want to provide ONE per platform variant, which limits you to the number of machine drivers supported.

author maintainer
#104 lore raw
Quoted 50 lines · Pierre-Louis Bossart
Quoted 47 lines · Cezary Rojewski
Quoted 32 lines · Pierre-Louis Bossart
Quoted 32 lines
Quoted 14 lines
Quoted 9 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines

On the second thought what if instead of duplicating kernel code, binaries would be duplicated? I.e. rather than targeting /intel/dsp_fw_cnl.bin, _new_ /skylake would be expecting /intel/dsp_fw_cnl_release.bin? Same with topology binaries. In such case, we "only" need to figure out how to propagate new files to Linux distos so whenever someone updates their kernel, new binaries are already present in their /lib/firmware.

If such option is valid, we can postpone /skylake upgrade till 5.4 merging window closes and the patches (rough estimation is 150) would descend upon alsa-devel in time between 5.4 and 5.5.

If the driver and FW update will be within the same kernel release then IMHO there should be no compatibility problem between those two components, right? This way kernel users willing to stick to old FW can stay on older kernel version while others can update and receive all the latest FW functionality that was developed and enabled.

I am not comfortable with precluding a kernel update because of a single firmware file. There are all sort of reasons for updating a kernel, security, sideband attacks and Android CDD compatibility being the most obvious ones.

The single firmware file will not be a blocker as the driver included in updated kernel will support it. All you have to do is the little effort to re-generate your custom topology for the new firmware target. The entire operation should not be a problem as there are dedicated utilities like FDK to do that.

The issue is the same whether it's a topology file or a firmware file. The ideal situation is that when the kernel is updated it handles both in backwards compatible ways.

If to deal with a new firmware file you have to regenerate a new topology, you are in a different model altogether.

Quoted 8 lines
Quoted 1 line

Your statement Pierre suggest that everyone should avoid any functional changes in kernel that are not critical because that would be problematic for others who switch from older kernel version.

All I said was that you cannot assume that people who are using an old firmware/driver will remain on an old kernel.

Mark made an initial proposal to essentially freeze the
current solution, which would make it possible to update the
kernel but keep the same skylake driver in legacy/maintenance
mode only, and an 'new' option that would rely on an updated distribution of firmware/driver. I did not get the counter proposal from Cezary at all.

Ain't my previous message:

-

On the second thought what if instead of duplicating kernel
code, binaries would be duplicated? I.e. rather than targeting /intel/dsp_fw_cnl.bin, _new_ /skylake would be expecting /intel/dsp_fw_cnl_release.bin? Same with topology binaries. In such case, we "only" need to figure out how to propagate new files to Linux distos so whenever someone updates their kernel, new binaries are already present in their /lib/firmware.

If such option is valid, we can postpone /skylake upgrade till 5.4 merging window closes and the patches (rough estimation is 150) would descend upon alsa-devel in time between 5.4 and 5.5.

Quoted 7 lines
Quoted 3 lines

-

a counter proposal?

you didn't explain how the 'duplicated binaries' would be selected. And 'instead of' means you suggested an alternative to Mark's proposal.

What I have in mind:

We leave the old stuff as is, e.g:
/lib/firmware/intel/dsp_fw_cnl.bin -> points to _old_ FW binaries /lib/firmware/<PCI-ID>-INTEL-<oem_data_from_NHLT -> points to old topology

Quoted 8 lines
Quoted 6 lines

Existing /skylake i.e. before our initialization refactor would (kernels <5.5?) would still point to these and since they are not being removed from linux-firmware, nothing gets broken.

And then we "duplicate" and simply append the new ones: /lib/firmware/intel/dsp_fw_cnl_release.bin -> points to _new_ FW /lib/firmware/dfw_cnl_rt274 -> points to _new_ topology

Updated /skylake would simply expect the _new_ files and totally ignore the old ones i.e.: descriptors would be pointing to dsp_fw_cnl_release and dfw_cnl_rt274.

What if those new files are not present on the filesystem?

That's the hard part - we need to propagate these the Linux distos, much like older topologies are.

5.5+ (?) /skylake would rely on those new files as if the _old_ ones never existed.

Quoted 7 lines

Mark suggested:
"We could have a wrapper which tries to load the newer firmware and uses the fixed driver code if that's there, otherwise tries the old driver with the existing firmware paths."

Maybe that's too complicated, I had in mind some sort of opt-in Kconfig where you only use the new firmware/topology when the user/distro gives a clear hint than it's fine to use newer stuff.

In one of the email you mentioned resources - human resources. If /skylake was to be duplicated, I fear maintenance of both would require too many resources. In such case we cannot guarantee same level of quality and coverage as in the _new_ /skylake-only case.

Quoted 2 lines

I also wonder how you are going to deal with all these topology files with a name derived from the OEM/NHLT. There's just so many of them...For upstream you probably want to provide ONE per platform variant, which limits you to the number of machine drivers supported.

Precisely! That's why we resign from these and move to a simpler format - dfw_cnl_rt274 or something of that sort. And no, we would provide as many topologies (e.g. dfw_cnl_my_wondeful_board123) as it's necessary. _Old_ topologies are not even propagated for every OEM/NHLT - there are sightings such as:
https://bugzilla.kernel.org/show_bug.cgi?id=200963
or:
https://github.com/GalliumOS/galliumos-distro/issues/379

See the -ENOENT (-2) in the logs dumped. The debug-only dfw_sst.bin fallback plays a role there too when in fact, it should not be even present on upstream : )

I even saw cases where peps are copying binaries (FW) from Windows machines.

"we don't break userspace" - I'm all aboard, Pierre, but our ship has too many holes already. For a short while it was possible not to notice the water pouring in through them. But now ship is literally sinking. Userspace is broken.

Improper process led to distributed topologies missing or not even being compatible with all upstreamed FWs. These FWs are also carrying some bugs as they are deprecated for quite a while. In order to update them, host side (driver) needs to be aligned - there is no escaping that. And so the loop closes.

We want to - rather MUST - fix that and make Intel SST works as it should for the sake of all users.

maintainer
#105 lore raw
In reply to Pierre-Louis Bossart
Quoted 8 lines · Pierre-Louis Bossart

Mark suggested:
"We could have a wrapper which tries to load the newer firmware and uses the fixed driver code if that's there, otherwise tries the old driver with the existing firmware paths."

Maybe that's too complicated, I had in mind some sort of opt-in Kconfig where you only use the new firmware/topology when the user/distro gives a clear hint than it's fine to use newer stuff.

To be clear I don't think this is a *good* idea, but I'm not sure that there are any options that are good ideas.

Quoted 4 lines

I also wonder how you are going to deal with all these topology files with a name derived from the OEM/NHLT. There's just so many of them...For upstream you probably want to provide ONE per platform variant, which limits you to the number of machine drivers supported.

Unless the way they're generated is consistent (or often consistent) in which case you can just derive it?

maintainer
#106 lore raw
In reply to Pierre-Louis Bossart
Quoted 11 lines · Pierre-Louis Bossart
Quoted 8 lines · Michal

If the driver and FW update will be within the same kernel release then IMHO
there should be no compatibility problem between those two components, right?
This way kernel users willing to stick to old FW can stay on older kernel version while
others can update and receive all the latest FW functionality that was developed and enabled.

Quoted 4 lines

I am not comfortable with precluding a kernel update because of a single firmware file. There are all sort of reasons for updating a kernel, security, sideband attacks and Android CDD compatibility being the most obvious ones.

Right, this is the whole ABI guarantee thing - we'd need an incredibly strong reason to require a change in firmware for upgrade of existing systems.