[Sound-open-firmware] How do you provide the firmware binary, e.g sof-byt.ri file?

Daniel Baluta daniel.baluta at gmail.com
Tue Dec 11 15:32:53 CET 2018


On Tue, Dec 11, 2018 at 4:20 PM Takashi Iwai <tiwai at 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.


More information about the Sound-open-firmware mailing list