[Sound-open-firmware] First caller of pipeline_copy

Paul Olaru (OSS) paul.olaru at oss.nxp.com
Tue Apr 14 12:42:24 CEST 2020


Alright but there is something I don't get about the flow of the calls to the DMA driver. In order to get an interrupt from the DMAC I need to mark at least one buffer as containing data. Do we know that on playback the buffers already contain data at the time set_config() is called, or between this call and the subsequent start() call, so that I can mark them as ready in the hardware descriptors when I create them in set_config()?

________________________________________
From: Sound-open-firmware <sound-open-firmware-bounces at alsa-project.org> on behalf of Lauda, Tomasz <tomasz.lauda at intel.com>
Sent: Tuesday, April 14, 2020 7:50 AM
To: Daniel Baluta
Cc: Paul Olaru; sound-open-firmware at alsa-project.org
Subject: Re: [Sound-open-firmware] First caller of pipeline_copy

Hi Daniel,

Data is not preloaded anymore. Some time ago I've introduced additional DMA buffers in both host and dai components, so buf1 is not directly connected to DMA. Transfer is started right away and zeroes are sent out before first chunk of data is copied.

Tomek

-----Original Message-----
From: Sound-open-firmware <sound-open-firmware-bounces at alsa-project.org> On Behalf Of Daniel Baluta
Sent: Monday, April 13, 2020 1:55 PM
To: tomasz.lauda at linux.intel.com
Cc: Paul Olaru <paul.olaru at nxp.com>; sound-open-firmware at alsa-project.org
Subject: Re: [Sound-open-firmware] First caller of pipeline_copy

On Mon, Apr 13, 2020 at 2:16 PM Daniel Baluta <daniel.baluta at gmail.com> wrote:
>
> Hi,
>
> I want to understand how copying data works on a playback pipeline,
> specifically how the first bytes are copied.
>
> It looks like SOF_SCHEDULE_LL_DMA scheduler takes care about
> scheduling pipeline_task.
>
> In a simple pipeline with Host <-> (buf0) <-> Volume <->(buf1) DAI the
> data needs to be propagated from upstream up to DAI.
>
> DMA is responsible to copy the data from buf1 to DAI. But at the time
> the DMA interrupt arrives the data are not yet propagated to buf1.
>
> We would need a way to preload first bytes. But I couldn't find
> anywhere in the code where this happens.

More to add to this: So, basically in our design the DMA controller will send an interrupt after successfully copied data.

So, in order for this to work the first chunk needs to be preloaded into buf1. Any suggestion where to look into the code are welcomed!
_______________________________________________
Sound-open-firmware mailing list
Sound-open-firmware at alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/sound-open-firmware
--------------------------------------------------------------------

Intel Technology Poland sp. z o.o.
ul. Slowackiego 173 | 80-298 Gdansk | Sad Rejonowy Gdansk Polnoc | VII Wydzial Gospodarczy Krajowego Rejestru Sadowego - KRS 101882 | NIP 957-07-52-316 | Kapital zakladowy 200.000 PLN.

Ta wiadomosc wraz z zalacznikami jest przeznaczona dla okreslonego adresata i moze zawierac informacje poufne. W razie przypadkowego otrzymania tej wiadomosci, prosimy o powiadomienie nadawcy oraz trwale jej usuniecie; jakiekolwiek
przegladanie lub rozpowszechnianie jest zabronione.
This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). If you are not the intended recipient, please contact the sender and delete all copies; any review or distribution by
others is strictly prohibited.

_______________________________________________
Sound-open-firmware mailing list
Sound-open-firmware at alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/sound-open-firmware


More information about the Sound-open-firmware mailing list