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@intel.com] Sent: Thursday, August 1, 2019 1:17 PM To: Paul Olaru paul.olaru@nxp.com; sound-open-firmware@alsa-project.org Cc: Daniel Baluta daniel.baluta@nxp.com; tomasz.lauda@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@alsa-project.org] On Behalf Of Paul Olaru Sent: Thursday, August 1, 2019 11:59 AM To: sound-open-firmware@alsa-project.org Cc: Daniel Baluta daniel.baluta@nxp.com; tomasz.lauda@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@alsa-project.org https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmailman.al... --------------------------------------------------------------------
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.