AnsweredAssumed Answered

Possible bug in USB 5.0 Audio class driver

Question asked by John Strohm on Nov 19, 2014
Latest reply on Nov 24, 2014 by Make Shi

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.

Outcomes