[tuxdroid-svn] r1265 - firmware/fuxusb/branches/new_rf/src
Status: Beta
Brought to you by:
ks156
From: jaguarondi <c2m...@c2...> - 2008-06-25 08:30:02
|
Author: jaguarondi Date: 2008-06-25 10:30:11 +0200 (Wed, 25 Jun 2008) New Revision: 1265 Modified: firmware/fuxusb/branches/new_rf/src/fifo_spk.c firmware/fuxusb/branches/new_rf/src/fifo_stt.c firmware/fuxusb/branches/new_rf/src/spi_task.c firmware/fuxusb/branches/new_rf/src/usb_desc.c firmware/fuxusb/branches/new_rf/src/usb_ep.c Log: * Paul changed this to 16kHz audio output. This works now with tuxaudio. Modified: firmware/fuxusb/branches/new_rf/src/fifo_spk.c =================================================================== --- firmware/fuxusb/branches/new_rf/src/fifo_spk.c 2008-06-25 08:28:54 UTC (rev 1264) +++ firmware/fuxusb/branches/new_rf/src/fifo_spk.c 2008-06-25 08:30:11 UTC (rev 1265) @@ -32,7 +32,7 @@ /** \name Fifo's constants * @{ */ /** Buffer size */ -#define SPK_BUF_SIZE 64 +#define SPK_BUF_SIZE 128 /*! @} */ /** \name Variables Modified: firmware/fuxusb/branches/new_rf/src/fifo_stt.c =================================================================== --- firmware/fuxusb/branches/new_rf/src/fifo_stt.c 2008-06-25 08:28:54 UTC (rev 1264) +++ firmware/fuxusb/branches/new_rf/src/fifo_stt.c 2008-06-25 08:30:11 UTC (rev 1265) @@ -41,7 +41,7 @@ * access time. * @{ */ /** Fifo buffer */ -uint8_t idata FifoTbl_STT[FIFOTBL_STT_MAX]; +uint8_t FifoTbl_STT[FIFOTBL_STT_MAX]; /** In index */ uint8_t data FifoIn_STT_Idx; /** Out index */ Modified: firmware/fuxusb/branches/new_rf/src/spi_task.c =================================================================== --- firmware/fuxusb/branches/new_rf/src/spi_task.c 2008-06-25 08:28:54 UTC (rev 1264) +++ firmware/fuxusb/branches/new_rf/src/spi_task.c 2008-06-25 08:30:11 UTC (rev 1265) @@ -75,6 +75,8 @@ /** \name SPI frame constants * @{ */ /** Size of the audio data in the SPI frame */ +// XXX Double frame +//#define AUDIO_SIZE 34 #define AUDIO_SIZE 17 /* Bits of the config byte */ @@ -239,10 +241,11 @@ spi_out[i+SPI_DATA_OFFSET] = command_received[i]; } } - if (FIFO_SPK_length() >= AUDIO_SIZE) + if (FIFO_SPK_length() >= 34)//AUDIO_SIZE) { config |= CFG_AUDIO_MK; - for (i=0; i<AUDIO_SIZE; i++) + //for (i=0; i<AUDIO_SIZE; i++) + for (i=0; i<34; i++) { //static uint8_t cnt = 0; //static bit dir = 1; Modified: firmware/fuxusb/branches/new_rf/src/usb_desc.c =================================================================== --- firmware/fuxusb/branches/new_rf/src/usb_desc.c 2008-06-25 08:28:54 UTC (rev 1264) +++ firmware/fuxusb/branches/new_rf/src/usb_desc.c 2008-06-25 08:30:11 UTC (rev 1265) @@ -356,7 +356,7 @@ 0x01, // bSubFrameSize 1 Bytes per Audio Subframe 0x08, // BitResolution 8 bits per Sample 0x01, // SampleFreqType One Frequency supported - 0x40,0x1F,0x00 // SamFreq 8000Hz + 0x80,0x3E,0x00 // SamFreq 16000Hz }, // SpkStandardEndpointDescriptor[] = @@ -366,7 +366,7 @@ 0x05, // descriptor type (ENDPOINT) OUT_ENDPOINT2, // endpoint address (OUT endpoint, endpoint 2) 0x01, // endpoint attributes (Isochronous) - 0x0800, // maximum packet size (8 bytes) + 0x1000, // maximum packet size (16 bytes) 0x01, // polling interval (1ms) 0x00, // brefresh 0x00 // Unused Modified: firmware/fuxusb/branches/new_rf/src/usb_ep.c =================================================================== --- firmware/fuxusb/branches/new_rf/src/usb_ep.c 2008-06-25 08:28:54 UTC (rev 1264) +++ firmware/fuxusb/branches/new_rf/src/usb_ep.c 2008-06-25 08:30:11 UTC (rev 1265) @@ -191,7 +191,7 @@ { if(usb_get_nb_byte()) { - FIFO_SPK_put_n(8); + FIFO_SPK_put_n(16); } } Usb_clear_rx(); |