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

Keyon Jie yang.jie at linux.intel.com
Wed Dec 12 02:35:54 CET 2018



On 2018/12/11 下午10:32, Daniel Baluta wrote:
> 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.

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 at alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/sound-open-firmware
> 


More information about the Sound-open-firmware mailing list