AnsweredAssumed Answered

Possible BUG REPORT against 5.0 USB Stack, file usb_audio.c, at line 767

Question asked by John Strohm on Oct 1, 2014
Latest reply on Oct 9, 2014 by Jorge_Gonzalez

In file Freescale_BM_USB_Stack_v5.0/Src/usb_core/device/sources/classes/audio/usb_audio.c, at line 767, you have (reformatted for readability):

 

    error = audio_obj_ptr->class_specific_callback.callback((uint8_t)GET_CUR_COPY_PROTECT_CONTROL,

                                                            audio_obj_ptr->current_interface,

                                                            data,

                                                            size,

                                                            audio_obj_ptr->class_specific_callback.arg);

 

EVERY other call to the class_specific_callback that involves audio_obj_ptr->current_interface is of the form:

 

    error = audio_obj_ptr->class_specific_callback.callback(audio_obj_ptr->current_interface,

                                                            cmd,

                                                            data,

                                                            size,

                                                            audio_obj_ptr->class_specific_callback.arg);

 

It appears to me that the call at line 767 is incorrect, and should instead be:

 

    error = audio_obj_ptr->class_specific_callback.callback(audio_obj_ptr->current_interface,

                                                            (uint8_t)GET_CUR_COPY_PROTECT_CONTROL,

                                                            data,

                                                            size,

                                                            audio_obj_ptr->class_specific_callback.arg);

Outcomes