[Sound-open-firmware] How do you provide the firmware binary, e.g sof-byt.ri file?
Hello all,
I am having this problem where SOF is compiled as built in the kernel and the firmware binary is on the rootfs.
When request_firmware is called in sof_probe the rootfs is not yet mounted so the call to request_firmware fails.
Just curious, how do you provide the firmware binary?
thanks, Daniel.
I am having this problem where SOF is compiled as built in the kernel and the firmware binary is on the rootfs.
When request_firmware is called in sof_probe the rootfs is not yet mounted so the call to request_firmware fails.
Just curious, how do you provide the firmware binary?
it's a known issue that we haven't fixed since we use modules both for development and production. Other drivers have the same problem IIRC.
On Mon, 2018-12-10 at 07:48 -0600, Pierre-Louis Bossart wrote:
I am having this problem where SOF is compiled as built in the kernel and the firmware binary is on the rootfs.
When request_firmware is called in sof_probe the rootfs is not yet mounted so the call to request_firmware fails.
Just curious, how do you provide the firmware binary?
it's a known issue that we haven't fixed since we use modules both for development and production. Other drivers have the same problem IIRC.
You could try adding the image to initramfs, but as Pierre says this is a general problem with loading FW on Linux, not just related to audio.
Liam
On Mon, Dec 10, 2018 at 5:00 PM Liam Girdwood liam.r.girdwood@linux.intel.com wrote:
On Mon, 2018-12-10 at 07:48 -0600, Pierre-Louis Bossart wrote:
I am having this problem where SOF is compiled as built in the kernel and the firmware binary is on the rootfs.
When request_firmware is called in sof_probe the rootfs is not yet mounted so the call to request_firmware fails.
Just curious, how do you provide the firmware binary?
it's a known issue that we haven't fixed since we use modules both for development and production. Other drivers have the same problem IIRC.
You could try adding the image to initramfs, but as Pierre says this is a general problem with loading FW on Linux, not just related to audio.
I used CONFIG_EXTRA_FIRMWARE and compiled the firmware binary inside the kernel Image and it works just fine for the moment.
Yes, the easiest solution would be to add the image to initramfs.
Thanks a lot for your quick replies!
Daniel.
On 12/10/18 2:48 PM, Daniel Baluta wrote:
On Mon, Dec 10, 2018 at 5:00 PM Liam Girdwood liam.r.girdwood@linux.intel.com wrote:
On Mon, 2018-12-10 at 07:48 -0600, Pierre-Louis Bossart wrote:
I am having this problem where SOF is compiled as built in the kernel and the firmware binary is on the rootfs.
When request_firmware is called in sof_probe the rootfs is not yet mounted so the call to request_firmware fails.
Just curious, how do you provide the firmware binary?
it's a known issue that we haven't fixed since we use modules both for development and production. Other drivers have the same problem IIRC.
You could try adding the image to initramfs, but as Pierre says this is a general problem with loading FW on Linux, not just related to audio.
I used CONFIG_EXTRA_FIRMWARE and compiled the firmware binary inside the kernel Image and it works just fine for the moment.
Yes, the easiest solution would be to add the image to initramfs.
We use request_firmware as well for the topology file. Did you also include it in the kernel image?
On Mon, Dec 10, 2018 at 11:01 PM Pierre-Louis Bossart pierre-louis.bossart@linux.intel.com wrote:
On 12/10/18 2:48 PM, Daniel Baluta wrote:
On Mon, Dec 10, 2018 at 5:00 PM Liam Girdwood liam.r.girdwood@linux.intel.com wrote:
On Mon, 2018-12-10 at 07:48 -0600, Pierre-Louis Bossart wrote:
I am having this problem where SOF is compiled as built in the kernel and the firmware binary is on the rootfs.
When request_firmware is called in sof_probe the rootfs is not yet mounted so the call to request_firmware fails.
Just curious, how do you provide the firmware binary?
it's a known issue that we haven't fixed since we use modules both for development and production. Other drivers have the same problem IIRC.
You could try adding the image to initramfs, but as Pierre says this is a general problem with loading FW on Linux, not just related to audio.
I used CONFIG_EXTRA_FIRMWARE and compiled the firmware binary inside the kernel Image and it works just fine for the moment.
Yes, the easiest solution would be to add the image to initramfs.
We use request_firmware as well for the topology file. Did you also include it in the kernel image?
I haven't got that far. For the moment I am just hacking around loading the various sections of the firmware into memory (btw, I'm working on ARM board :D).
Anyhow, I assume that for the topology file it won't be necessary to compile it inside the kernel image because it is used later when the rootfs is already mounted.
thanks, Daniel.
On Mon, 10 Dec 2018 16:00:10 +0100, Liam Girdwood wrote:
On Mon, 2018-12-10 at 07:48 -0600, Pierre-Louis Bossart wrote:
I am having this problem where SOF is compiled as built in the kernel and the firmware binary is on the rootfs.
When request_firmware is called in sof_probe the rootfs is not yet mounted so the call to request_firmware fails.
Just curious, how do you provide the firmware binary?
it's a known issue that we haven't fixed since we use modules both for development and production. Other drivers have the same problem IIRC.
You could try adding the image to initramfs, but as Pierre says this is a general problem with loading FW on Linux, not just related to audio.
Right, it's a PITA for drivers.
The driver can use request_firmware() for simplicity, but it's a synchronous API, hence the firmware has to be present statically in the kernel image if the driver is built-in. OTOH, request_firmware_nowait() would work asynchronously and you can delay the load for another rootfs mount, but it's often difficult to design / code correctly.
Takashi
On Tue, Dec 11, 2018 at 4:20 PM Takashi Iwai tiwai@suse.de wrote:
On Mon, 10 Dec 2018 16:00:10 +0100, Liam Girdwood wrote:
On Mon, 2018-12-10 at 07:48 -0600, Pierre-Louis Bossart wrote:
I am having this problem where SOF is compiled as built in the kernel and the firmware binary is on the rootfs.
When request_firmware is called in sof_probe the rootfs is not yet mounted so the call to request_firmware fails.
Just curious, how do you provide the firmware binary?
it's a known issue that we haven't fixed since we use modules both for development and production. Other drivers have the same problem IIRC.
You could try adding the image to initramfs, but as Pierre says this is a general problem with loading FW on Linux, not just related to audio.
Right, it's a PITA for drivers.
The driver can use request_firmware() for simplicity, but it's a synchronous API, hence the firmware has to be present statically in the kernel image if the driver is built-in. OTOH, request_firmware_nowait() would work asynchronously and you can delay the load for another rootfs mount, but it's often difficult to design / code correctly.
Correct! I've tried using request_firmware_nowait but this requires a lot of other changes in SOF which I'm not happy with.
On 2018/12/11 下午10:32, Daniel Baluta wrote:
On Tue, Dec 11, 2018 at 4:20 PM Takashi Iwai tiwai@suse.de wrote:
On Mon, 10 Dec 2018 16:00:10 +0100, Liam Girdwood wrote:
On Mon, 2018-12-10 at 07:48 -0600, Pierre-Louis Bossart wrote:
I am having this problem where SOF is compiled as built in the kernel and the firmware binary is on the rootfs.
When request_firmware is called in sof_probe the rootfs is not yet mounted so the call to request_firmware fails.
Just curious, how do you provide the firmware binary?
it's a known issue that we haven't fixed since we use modules both for development and production. Other drivers have the same problem IIRC.
You could try adding the image to initramfs, but as Pierre says this is a general problem with loading FW on Linux, not just related to audio.
Right, it's a PITA for drivers.
The driver can use request_firmware() for simplicity, but it's a synchronous API, hence the firmware has to be present statically in the kernel image if the driver is built-in. OTOH, request_firmware_nowait() would work asynchronously and you can delay the load for another rootfs mount, but it's often difficult to design / code correctly.
Correct! I've tried using request_firmware_nowait but this requires a lot of other changes in SOF which I'm not happy with.
We have exactly plan for this, please refer to: https://github.com/thesofproject/linux/issues/139
You are welcomed to contribute to it, our intention is to use request_firmware_nowait to implement it.
Thanks, ~Keyon
Sound-open-firmware mailing list Sound-open-firmware@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/sound-open-firmware
participants (5)
-
Daniel Baluta
-
Keyon Jie
-
Liam Girdwood
-
Pierre-Louis Bossart
-
Takashi Iwai