Commit Graph

13 Commits

Author SHA1 Message Date
Reinhard Panhuber b9c9cfdbac Change min to tu_min16. 2020-08-29 13:22:21 +02:00
Jerzy Kasenberg a3eff0c51a audio_device: Fix NULL pointer access in audiod_xfer_cb
b_bytes_copied was pointer with NULL value instead of
plain variable.
NULL pointer was passed to audio_tx_done_cb() and dereference
as well.

Now variable is not a pointer.
2020-08-25 14:35:05 +02:00
Jerzy Kasenberg a4c096be37 audio_device: Fix FIFO element size discrepancies
Buffer for TX and RX FIFO was not taking into account
size of element leading to out of bound access.

audio_tx_done_type_I_pcm_ff_cb() reported copied bytes was not returning
correct value number if channels was omitted in computation.

Transfer size calculation uses simpler arithmetic.
2020-08-25 14:35:05 +02:00
Jerzy Kasenberg c61e9fb96d audio_device: Fix descriptor limit calculation
In several place p_desc_end calculation was not taking into account
that starting pointer (_audiod_itf[idxDriver].p_desc) was pointing
past interface association descriptor.
It would result in accessing random memory.
2020-08-24 09:04:42 +02:00
Reinhard Panhuber 37be0ca732 Fix formatting, get rid of all tabs. 2020-08-20 20:09:44 +02:00
Reinhard Panhuber c14f68e2c1 Commit before sharing.
Setup a test example - UNTESTED!
Missing: Start transmitting audio data in set_interface.
2020-08-19 21:07:43 +02:00
Reinhard Panhuber 444e4d2821 Add EP close. Fix bug in set_interface within audio. 2020-08-16 13:48:25 +02:00
Reinhard Panhuber 1269bb440a Fix structure definition audio_control_range_X_n_t 2020-07-25 14:31:25 +02:00
Reinhard Panhuber d91843bcd2 Get and set requests work 2020-07-25 11:18:50 +02:00
Reinhard Panhuber fdb156a3bb Implement control EP0 buffer and get rid of CFG_TUD_AUDIO_USE_TX_FIFO 2020-07-20 20:18:45 +02:00
Reinhard Panhuber d0f3d03933 Intermediate commit. 2020-07-17 08:40:10 +02:00
Reinhard Panhuber 4362665fb3 Fix mic audio descriptor, fix too strict check on IAD desc. in usbd.c 2020-06-13 12:36:05 +02:00
Reinhard Panhuber 9be2f1bf3d Add basic UAC2 structure - untested 2020-05-22 12:09:34 +02:00