[Sound-open-firmware] host_dma_cb() error: Wrong callback type = 3

Paul Olaru paul.olaru at nxp.com
Thu Aug 1 12:29:24 CEST 2019


Wait, so the type parameter is not opaque but a bitmask of situations when the callback should be called?
And then the driver will call with one of the types specified in there? I will look into the drivers for the other
Platforms to see how this actually works, though a more thorough explanation may be nice.

-----Original Message-----
From: Lauda, Tomasz [mailto:tomasz.lauda at intel.com] 
Sent: Thursday, August 1, 2019 1:17 PM
To: Paul Olaru <paul.olaru at nxp.com>; sound-open-firmware at alsa-project.org
Cc: Daniel Baluta <daniel.baluta at nxp.com>; tomasz.lauda at linux.intel.com
Subject: RE: host_dma_cb() error: Wrong callback type = 3

Host are registering the same callback function for both of them, but DMAs call them individually.
Probably your Dummy DMA is calling the cb function with DMA_CB_TYPE_IRQ | DMA_CB_TYPE_COPY.

Tomek

-----Original Message-----
From: Sound-open-firmware [mailto:sound-open-firmware-bounces at alsa-project.org] On Behalf Of Paul Olaru
Sent: Thursday, August 1, 2019 11:59 AM
To: sound-open-firmware at alsa-project.org
Cc: Daniel Baluta <daniel.baluta at nxp.com>; tomasz.lauda at linux.intel.com
Subject: [Sound-open-firmware] host_dma_cb() error: Wrong callback type = 3

Hello, I'm currently implementing the DMA driver for the IMX platform (Dummy DMA). With this partial implementation I have noticed the error message in the title.

The thing is, within host.c I see that dma_set_cb is called with the type as DMA_CB_TYPE_IRQ | DMA_CB_TYPE_COPY (which is 3), yet in host_dma_cb itself I only see the cases for these bits individually, and it falls into the default case.

I've also noticed this in the dai.c file.
_______________________________________________
Sound-open-firmware mailing list
Sound-open-firmware at alsa-project.org
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmailman.alsa-project.org%2Fmailman%2Flistinfo%2Fsound-open-firmware&data=02%7C01%7Cpaul.olaru%40nxp.com%7C9177c98062b14679c97908d716696163%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C637002514175829033&sdata=CM2ehCgV2HXuTAhSdXP%2FC4lk6WTBFWg78363bGfobcQ%3D&reserved=0
--------------------------------------------------------------------

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.



More information about the Sound-open-firmware mailing list