Reinhard Panhuber
4dd1f1f3b5
Fix include path in audio_device.h
2021-04-23 10:32: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
58bab86d79
minor clean up
2021-04-06 21:09:23 +07:00
hathach
8b79040c38
code format
2021-04-06 15:34:50 +07: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
ec6b240de2
Fix #define error in audio_device.h
2021-04-03 15:44:44 +02:00
Reinhard Panhuber
6236effb14
Fix #define error in audio_device.h
2021-04-03 15:29:39 +02:00
Reinhard Panhuber
8b90c08b35
Fix #define errors in audio_device.h
2021-04-03 15:24:38 +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
9e2a1d2e6a
Fix CFG_TUD_AUDIO_EP_IN/OUT_SW_BUFFER_SIZE to be defined anyway
2021-02-12 18:31:54 +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
Reinhard Panhuber
f700c08aed
Remove CFG_TUD_AUDIO_TX_DMA_RINGBUFFER_SIZE which is not needed any more
2020-10-07 10:57:12 +02:00
hathach
3f54c27afa
fix audio_test build
2020-10-07 13:36:03 +07:00
Reinhard Panhuber
2050dc0dc7
Revert #define CFG_TUSB_DEBUG 2 to #define CFG_TUSB_DEBUG 0
...
Change 1 << 31 to 0x100000000 in audio.h
2020-10-03 09:46:22 +02:00
Reinhard Panhuber
529622710c
Cleanup for PR.
2020-09-28 18:10:57 +02:00
Jerzy Kasenberg
2ace98e943
audio_device: Update explicit feedback support
...
Feedback can be specified by the user code and will be
sent at feedback endpoint specified interval.
2020-09-28 08:41:17 +02:00
Jerzy Kasenberg
759d530506
audio_device: Allow one FIFO for N channels
...
This allow to build with single FIFO for devices with multiple channels.
Having just one FIFO greatly reduces time needed to feed endpoint.
This change also allows to have one FIFO with 24 bit samples that
is not rounded up to 32 bit elements.
CFG_TUD_AUDIO_RX_ITEMSIZE and CFG_TUD_AUDIO_TX_ITEMSIZE can be manually
defined. This allows to use FIFO more efficiently when 24 bits samples
are already using 3 bytes, in this case there is no need to put them
into FIFO one by one.
For 8, 16, 32 bits samples size efficient FIFO access is always used
when single FIFO is selected.
This also changes FIFO element size to 1, FIFO usage was confusing
in some place it treated content as byte base in other it looked like
ITEM size is to be used. Also bufsize that in most (maybe all) cases
was really meaning item count.
bufsize now mean buffer size in bytes so there is no confusion.
2020-09-28 08:41:17 +02:00