[Sound-open-firmware] Using the Qemu DSP emulator

Liam Girdwood liam.r.girdwood at linux.intel.com
Mon Mar 19 12:33:16 CET 2018


On Sat, 2018-03-17 at 11:29 +0200, Daniel Baluta wrote:
> 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.

Yeah, I've not root caused that yet, had to hack around it when I upgraded to
the latest qemu release.

> 
> I'm using:
> 
> * sof.git/master - 19e48c5 Merge branch '1.1-stable'

Can you also use the 1.1-stable branch for the sof tools and topology.

> * osadsp-qemu/master - 771e78b FIXME: log: Support 64bit trace format.
> * asoc/sof-v4.15 - 130e9f7 0day warnings
> 
Best to use my Pierre's v4.14 stable branch here as we are in the middle of a
release (meaning my branches have more experiment patches).

 https://github.com/plbossart/sound.git #topic/sof-v4.14

> 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:

great, thanks ! Can you send that as a patch with your SoB ?

> 
> 
> 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, &params, 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?

Firmware is crashing 

[   11.264202] sof-audio sof-audio: shim 0x40 value 0x0dead00670028800

But what does rmbox show ?

Liam

> _______________________________________________
> 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