[Sound-open-firmware] Using the Qemu DSP emulator
Daniel Baluta
daniel.baluta at gmail.com
Sat Mar 17 10:29:59 CET 2018
On Tue, Feb 6, 2018 at 6:38 PM, Liam Girdwood
<liam.r.girdwood at linux.intel.com> wrote:
> On Tue, 2018-02-06 at 10:14 +0200, Daniel Baluta wrote:
>> > Sorry for the delay, I was travelling last week. Turns out I missed
>> > some machine type setting in some of the machines when doing the
>> > forward port. Fix pushed.
>>
>> Thanks Liam for the updates. I forgot to reply, I've did some hacks
>> and
>> finally got qemu working.
>>
>> Now I get a timeout when trying to boot the DSP, but will get back
>> with more details once I have some spare time.
>
> Fwiw, firmware will send a FW ready message to the host to indicate
> boot complete. This involves writing to a special shim register that
> causes an IRQ on the host side.
Finally got a chance to get back to this.
First run I got a crash, which I think it's due to a race condition.
I'm using:
* sof.git/master - 19e48c5 Merge branch '1.1-stable'
* osadsp-qemu/master - 771e78b FIXME: log: Support 64bit trace format.
* asoc/sof-v4.15 - 130e9f7 0day warnings
Running
$ ./xtensa-host.sh byt
$ ./x86-host.sh byt
I get the following crash:
* https://pastebin.com/tDawwd5P
full log here:
* https://pastebin.com/dbjiimJx
I guess this is a race and fixed it with:
daniel at firefly:~/w/sof-sdk/asoc$ git diff
diff --git a/sound/soc/sof/trace.c b/sound/soc/sof/trace.c
index 744d75b..7f5bef9 100644
--- a/sound/soc/sof/trace.c
+++ b/sound/soc/sof/trace.c
@@ -245,6 +245,9 @@ int snd_sof_init_trace(struct snd_sof_dev *sdev)
params.buffer.offset = 0;
params.buffer.pages = sdev->dma_trace_pages;
+
+ init_waitqueue_head(&sdev->trace_sleep);
+
/* send IPC to the DSP */
ret = sof_ipc_tx_message(sdev->ipc,
params.hdr.cmd, ¶ms, sizeof(params),
@@ -255,7 +258,6 @@ int snd_sof_init_trace(struct snd_sof_dev *sdev)
goto table_err;
}
- init_waitqueue_head(&sdev->trace_sleep);
sdev->host_offset = 0;
return 0;
After this, DSP firmware boots fine but then i get this error:
[ 11.264059] sof-audio sof-audio: error: ipc timed out for
0x90010000 size 0x18
[ 11.264458] sof-audio sof-audio: error: waking up any trace sleepers
[ 11.264460] sof-audio sof-audio: error: cant set params for DMA for Trace-110
[ 11.264467] sof-audio sof-audio: error: failed to initialize trace -110
Full log here:
* https://pastebin.com/VffNxrXg
Any idea?
More information about the Sound-open-firmware
mailing list