Commit Graph

72 Commits

Author SHA1 Message Date
MasterPhi 5877f20d4b Fix IAR compile error on pointer type.
Clean up warnings.

Signed-off-by: MasterPhi <admin@hifiphile.com>
2021-06-29 10:57:26 +02:00
MasterPhi 8433f638e6 Add bracket to switch case, fix warning. 2021-06-20 15:39:47 +02:00
hathach 9736e54734
include clean up 2021-05-27 17:40:39 +07:00
hathach faa31152b4 rename usbd_edpt_iso_xfer to usbd_edpt_xfer_fifo 2021-05-26 20:34:06 +07:00
Jerzy Kasenberg 74ca1894de audio_device: Fix build error
ep_in_as_intf_num was incorrectly used to access out interface
which is defined for 'in' interface.
Code related to 'out' endpoint should use ep_out_as_intf_num instead.
2021-05-10 15:58:04 +02:00
Reinhard Panhuber 5add664874 Remove n from tu_fifo_get_write_info() and fix bug in vendor class 2021-04-30 17:37:14 +02:00
Reinhard Panhuber 14e2c004cd Remove variable n in tu_fifo_get_read_info() 2021-04-30 15:08:14 +02:00
Reinhard Panhuber 8f72c97f7b Change read infos to pointer type 2021-04-30 12:59:12 +02:00
hathach c9177246d2 temporarily fix include recusrive loop 2021-04-28 12:31:24 +07:00
Reinhard Panhuber 7072f0155e Change tu_fifo_get_linear_write/read_info() to return a struct
Compilers always complain that variables set by function via pointer
might be uninitialized so to avoid that return values are now delivered
via struct.
2021-04-23 11:48:54 +02:00
Reinhard Panhuber a98d0217a0 Init len_wrap = 0 to fix compiler complains. 2021-04-23 10:47:22 +02:00
Reinhard Panhuber 03f974c9b9 Implement functions to allow for DMA usage in audio driver.
- Add tud_audio_n_get_ep_out_ff(), tud_audio_n_get_ep_in_ff(),
tud_audio_n_get_rx_support_ff(), and tud_audio_n_get_tx_support_ff()
- Change get_linear_read/write_info() to return linear and wrapped part
at once
- Adjusted affected code in audio_device.c and tested with
audio_4_channel.
2021-04-23 10:27:48 +02:00
Reinhard Panhuber 29bcc83d0f Remove unnecessary volatile and short audio function index to func_id 2021-04-21 17:01:38 +02:00
Reinhard Panhuber c7c11b181c Clean up old depracted and misleading variable names 2021-04-20 20:15:02 +02:00
Reinhard Panhuber fef0d54559 Refactor static function for better performance 2021-04-20 19:56:40 +02:00
Reinhard Panhuber 4408ffce88 Fix pointer alt_setting to be cleared when driver gets initialized 2021-04-20 18:44:56 +02:00
Reinhard Panhuber 8d9f60ca5e Improve user feedback in case of wrong configuration of audio driver 2021-04-14 21:52:54 +02:00
Reinhard Panhuber 2134c1a875 Fix defines in audio_device.c 2021-04-08 21:48:36 +02:00
Reinhard Panhuber 4bebb9ca49 Remove depracted defines in audio_device.c 2021-04-08 20:11:51 +02:00
Reinhard Panhuber 8eacdffebd Optimize encode/decode - refactor unnecessary repetitive division 2021-04-07 20:07:28 +02:00
hathach 68687ed0f4 fix build 2021-04-06 01:16:51 +07:00
hathach 7ab8da949e audio driver only use USE_LINEAR_BUFFER = 0 for stm32 synopsys driver 2021-04-06 01:07:32 +07:00
Reinhard Panhuber 1ac9e7e3a7 Fix wrong read mutexes in audio_device.c 2021-04-03 18:22:19 +02:00
Reinhard Panhuber f6ba58e370 Fix wrong pointer type in audio_device.c 2021-04-03 17:50:30 +02:00
Reinhard Panhuber 4af5189492 Fix potential bug in support FIFO sizes 2021-04-03 16:53:29 +02:00
Reinhard Panhuber 475badd087 Add missing #defines in uac2_headset example 2021-04-03 16:10:46 +02:00
Reinhard Panhuber fc65f39ff2 Fix error in #defines in uac2_headset 2021-04-03 15:58:41 +02:00
Reinhard Panhuber 9b2ddd9cc6 Generalize audio driver for 3 audio functions plus a lot more.
- Audio format and parameters are parsed from descriptors thus user no
longer needs to give them explicitely

- Tested for 4 channel software type I PCM encoding with 16 bit with 1
channel per FIFO and 2 channels per FIFO (this is I2S specific)
2021-04-03 09:49:27 +02:00
Reinhard Panhuber cd491e296e Intermediate commit 2021-03-14 18:55:16 +01:00
Reinhard Panhuber d5a5a1cab6 Implement audio PCM type I enc./decoding acc. to 2.3.1.5 Audio Streams
Extending capabilities of support FIFOs
Removing copy from to FIFO
Adjusting audio examples
Remove peek/read into other FIFO
2021-03-10 19:32:13 +01:00
Reinhard Panhuber 7e56f46957 Extend FIFO mutex to use separate write and read mutexes.
Adjust all USB drivers using FIFO and mutexes.
2021-03-04 13:52:14 +01:00
Reinhard Panhuber 7b8a08d2e1 Rename dcd_edpt_iso_xfer() to dcd_edpt_xfer_fifo() 2021-03-02 20:00:39 +01:00
Reinhard Panhuber fc35b3f72d Switch back OPT_MCU_DA1469X to use linear buffers 2021-03-02 17:24:58 +01:00
Reinhard Panhuber 8ec99694d2 audio_decive clean up and bootstrapping of linear (formerly evade) buff. 2021-03-01 09:09:15 +01:00
Reinhard Panhuber 313dd1439d Implement dcd_edpt_iso_xfer() for dcd_da146xx.c BUT WITHOUT DMA SUPPORT 2021-02-23 19:41:21 +01:00
Reinhard Panhuber c098da9803 Implement left and right justifications for 24 to 32 bit PCM encoding 2021-02-18 19:25:08 +01:00
Reinhard Panhuber 681cfd0bf2 Correct for wrong pointer type in audio_device.c 2021-02-18 11:12:16 +01:00
Reinhard Panhuber 53a796a92e Fix wrong pointer type. 2021-02-17 22:29:40 +01:00
Reinhard Panhuber eee47493a3 Fix bug in evasion buffer list 2021-02-17 21:59:32 +01:00
Reinhard Panhuber e407ce463d Add SAMD MCUs to buffer evasion list 2021-02-17 21:47:01 +01:00
Reinhard Panhuber 189b357b54 Implement an evasion linear buffer for MCUs not capable for EP FIFO
Also MCUs using DMAs are within this list, however, these can use an EP
FIFO. There is just no time for implementation
2021-02-17 21:42:44 +01:00
Reinhard Panhuber 185414721f Formating 2021-02-12 18:04:45 +01:00
Reinhard Panhuber a9fd0a454a Complete redesign of audio driver. 2021-02-12 16:28:41 +01:00
Reinhard Panhuber 84406f1654 Rework audio driver 2021-01-31 19:08:23 +01:00
Reinhard Panhuber 56edc2b261 Change names from edpt_ISO_xfer to edpt_iso_xfer 2021-01-19 10:50:19 +01:00
Reinhard Panhuber 3a3ada0c57 Implement the usage of usbd_edpt_ISO_xfer() 2021-01-18 17:07:15 +01:00
hathach cebb375eac migrate audio device to new control xfer cb 2020-11-20 17:20:05 +07:00
Reinhard Panhuber 032e84c9be Revert dcd_alloc_mem_for_conf() but keep changes from @kasjer for ISO EP
Add tud_audio_set_itf_close_EP_cb()
2020-10-09 19:50:05 +02:00
hathach 3f54c27afa fix audio_test build 2020-10-07 13:36:03 +07:00
Reinhard Panhuber 529622710c Cleanup for PR. 2020-09-28 18:10:57 +02:00