Possible bug in USB 5.0 Audio class driver

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Possible bug in USB 5.0 Audio class driver

512 Views
johnstrohm
Contributor III

In file usb_audio.c, at line 146, you have:

    /* Callback to application */

    if (audio_obj_ptr->class_specific_callback.callback != NULL)

    {

     /* notify the app of the send complete */

     audio_obj_ptr->class_specific_callback.callback(USB_DEV_EVENT_SEND_COMPLETE, USB_REQ_VAL_INVALID,NULL,0,

     audio_obj_ptr->audio_application_callback.arg);

    }

Reformatting for readability:

    /* Callback to application */

    if (audio_obj_ptr->class_specific_callback.callback != NULL)

    {

       /* notify the app of the send complete */

       audio_obj_ptr->class_specific_callback.callback(USB_DEV_EVENT_SEND_COMPLETE,

                                                       USB_REQ_VAL_INVALID,

                                                       NULL,

                                                       0,

                                                       audio_obj_ptr->audio_application_callback.arg);

    }

I believe this should be:

    /* Callback to application */

    if (audio_obj_ptr->class_specific_callback.callback != NULL)

    {

       /* notify the app of the send complete */

       audio_obj_ptr->class_specific_callback.callback(USB_DEV_EVENT_SEND_COMPLETE,

                                                       USB_REQ_VAL_INVALID,

                                                       NULL,

                                                       0,

                                                       audio_obj_ptr->class_specific_callback.arg);

    }

That is, calls to the class_specific_callback should use the class_specific.callback.arg.

Labels (2)
Tags (2)
0 Kudos
1 Reply

352 Views
makeshi
NXP Employee
NXP Employee

Thanks for you raising the issue, it is a typo  issue in USB audio class driver, USB software team will fix

it in subsequent release.

0 Kudos