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)
This commit is contained in:
Reinhard Panhuber
2021-04-03 09:49:27 +02:00
parent 994dddc231
commit 9b2ddd9cc6
10 changed files with 1221 additions and 410 deletions

View File

@@ -138,9 +138,7 @@ static void _tu_fifo_read_from_const_src_ptr_in_full_words(void * dst, const voi
}
}
// Intended to be used to write to hardware USB FIFO in e.g. STM32 where all data is written to a constant address
// Code adapted from dcd_synopsis.c
// TODO generalize with configurable 1 byte or 4 byte each write
// Intended to be used to write to hardware USB FIFO in e.g. STM32 where all data is written to a constant address in full word copies
static void _tu_fifo_write_to_const_dst_ptr_in_full_words(void * dst, const void * src, uint16_t len)
{
volatile uint32_t * tx_fifo = (volatile uint32_t *) dst;