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

Paul Olaru paul.olaru at nxp.com
Mon Aug 5 09:03:54 CEST 2019


Hello again, do you have any resource on what the dma_cb_status values mean? Right now I'm ignoring them and that doesn't seem to work. Also tried treating DMA_CB_STATUS_SPLIT in a sense but that leads to IPC timeouts and a sort of hanging (when aplay stops due to the timeout the firmware seems to acknowledge and recover).

-----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 1:37 PM
To: Lauda, Tomasz <tomasz.lauda at intel.com>; sound-open-firmware at alsa-project.org
Cc: Daniel Baluta <daniel.baluta at nxp.com>
Subject: Re: [Sound-open-firmware] host_dma_cb() error: Wrong callback type = 3

Alright, thanks, so for now I will call it with DMA_CB_TYPE_COPY (since I only do the callback from copy() itself at least currently) and ignore registrations which don't specify this bit. Will keep an eye on it when the framework gets updated in this sense.

Paul

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

It works this way due to the fact, that we can only register one callback function to the DMA.
It will get much simpler after someone will refactor/reimplement the callback system and allow for the multiple callbacks.

Tomek


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

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%7Cbd809608d5b84240338508d7166dbef5%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C637002532922181518&sdata=XIxZrkqevPKBoalWEZWr9ddE%2FNpNIh0P4PlRwd5szsQ%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.

--------------------------------------------------------------------

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://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%7Cbd809608d5b84240338508d7166dbef5%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C637002532922181518&sdata=XIxZrkqevPKBoalWEZWr9ddE%2FNpNIh0P4PlRwd5szsQ%3D&reserved=0


More information about the Sound-open-firmware mailing list