I see couple of problems here: 1. Preload finishes too quickly - what does it exactly mean? As far as I remember you have direct access to the host, so probably your memcpy is done very fast and there is nothing else to wait for. 2. On preload finish DAI and DMA are just started, so there should be at least 1 ms difference between finishing preload task and next pipeline copy schedule. It indicates some kind of problem with DMA interrupts on your side.
Tomek
-----Original Message----- From: Sound-open-firmware [mailto:sound-open-firmware-bounces@alsa-project.org] On Behalf Of Paul Olaru Sent: Thursday, September 5, 2019 9:03 AM To: sound-open-firmware@alsa-project.org Subject: [Sound-open-firmware] Questions about the DAI DMA/pipeline flow
Hello, I'm currently having issues with implementing the DAI DMA driver on my platform. Whenever the DAI component calls start(), the preload transfer finishes too quickly and The callback, pipeline_schedule_copy() (called by dai_cb), encounters an issue about the copy task being already queued. Then I see that the copy task doesn't run again (the scheduler must believe it's already done working and that extra schedule() needs to be ignored).
What should be the way to go from this? Should I investigate why the preload finishes too quickly? Should I do some hacks to delay the finishing of the preload? Should I tweak the buffer sizes (the current transfer buffer size is exactly 384 bytes, which works out as 48 samples per channel, 2 channels, 4 byte wide samples, AKA exactly 1ms).
Should I try to figure out a way to make the scheduler run pipeline_copy() again after the current (preload) one finishes? _______________________________________________ Sound-open-firmware mailing list Sound-open-firmware@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.