Fix even more tabs
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24155 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
64fb3e8df3
commit
bfc129a592
|
@ -26,8 +26,8 @@
|
|||
|
||||
#define SMLAL(lo, hi, x, y) \
|
||||
asm volatile ("smlal %0, %1, %2, %3" \
|
||||
: "+r" (lo), "+r" (hi) \
|
||||
: "%r" (x), "r" (y))
|
||||
: "+r" (lo), "+r" (hi) \
|
||||
: "%r" (x), "r" (y))
|
||||
|
||||
const unsigned short battery_level_dangerous[BATTERY_TYPES_COUNT] =
|
||||
{
|
||||
|
|
|
@ -37,7 +37,7 @@ static size_t size;
|
|||
|
||||
void pcm_postinit(void)
|
||||
{
|
||||
audiohw_postinit();
|
||||
audiohw_postinit();
|
||||
}
|
||||
|
||||
/* Return the current location in the SDRAM to SARAM transfer along with the
|
||||
|
@ -48,7 +48,7 @@ void pcm_postinit(void)
|
|||
*/
|
||||
const void * pcm_play_dma_get_peak_buffer(int *count)
|
||||
{
|
||||
int cnt = DSP_(_sdem_level);
|
||||
int cnt = DSP_(_sdem_level);
|
||||
|
||||
unsigned long addr = (unsigned long) start +cnt;
|
||||
|
||||
|
@ -73,7 +73,7 @@ void pcm_play_dma_init(void)
|
|||
|
||||
void pcm_dma_apply_settings(void)
|
||||
{
|
||||
audiohw_set_frequency(pcm_fsel);
|
||||
audiohw_set_frequency(pcm_fsel);
|
||||
}
|
||||
|
||||
/* Note that size is actually limited to the size of a short right now due to
|
||||
|
@ -81,7 +81,7 @@ void pcm_dma_apply_settings(void)
|
|||
*/
|
||||
void pcm_play_dma_start(const void *addr, size_t size)
|
||||
{
|
||||
unsigned long sdem_addr=(unsigned long)addr - CONFIG_SDRAM_START;
|
||||
unsigned long sdem_addr=(unsigned long)addr - CONFIG_SDRAM_START;
|
||||
/* Initialize codec. */
|
||||
DSP_(_sdem_addrl) = sdem_addr & 0xffff;
|
||||
DSP_(_sdem_addrh) = sdem_addr >> 16;
|
||||
|
@ -116,7 +116,7 @@ void pcm_play_dma_pause(bool pause)
|
|||
}
|
||||
else
|
||||
{
|
||||
DSP_(_dma0_stopped)=0;
|
||||
DSP_(_dma0_stopped)=0;
|
||||
dsp_wake();
|
||||
}
|
||||
}
|
||||
|
@ -132,8 +132,8 @@ char buffer[80];
|
|||
void DSPHINT(void) __attribute__ ((section(".icode")));
|
||||
void DSPHINT(void)
|
||||
{
|
||||
register pcm_more_callback_type get_more; /* No stack for this */
|
||||
|
||||
register pcm_more_callback_type get_more; /* No stack for this */
|
||||
|
||||
unsigned int i;
|
||||
|
||||
IO_INTC_FIQ0 = 1 << 11;
|
||||
|
@ -151,35 +151,35 @@ void DSPHINT(void)
|
|||
break;
|
||||
|
||||
case MSG_REFILL:
|
||||
/* Buffer empty. Try to get more. */
|
||||
get_more = pcm_callback_for_more;
|
||||
size = 0;
|
||||
|
||||
if (get_more == NULL || (get_more(&start, &size), size == 0))
|
||||
{
|
||||
/* Callback missing or no more DMA to do */
|
||||
pcm_play_dma_stop();
|
||||
pcm_play_dma_stopped_callback();
|
||||
}
|
||||
/* Buffer empty. Try to get more. */
|
||||
get_more = pcm_callback_for_more;
|
||||
size = 0;
|
||||
|
||||
if (get_more == NULL || (get_more(&start, &size), size == 0))
|
||||
{
|
||||
/* Callback missing or no more DMA to do */
|
||||
pcm_play_dma_stop();
|
||||
pcm_play_dma_stopped_callback();
|
||||
}
|
||||
|
||||
{
|
||||
unsigned long sdem_addr=(unsigned long)start - CONFIG_SDRAM_START;
|
||||
/* Flush any pending cache writes */
|
||||
clean_dcache_range(start, size);
|
||||
{
|
||||
unsigned long sdem_addr=(unsigned long)start - CONFIG_SDRAM_START;
|
||||
/* Flush any pending cache writes */
|
||||
clean_dcache_range(start, size);
|
||||
|
||||
/* set the new DMA values */
|
||||
DSP_(_sdem_addrl) = sdem_addr & 0xffff;
|
||||
DSP_(_sdem_addrh) = sdem_addr >> 16;
|
||||
DSP_(_sdem_dsp_size) = size;
|
||||
|
||||
DEBUGF("pcm_sdram at 0x%08lx, sdem_addr 0x%08lx",
|
||||
(unsigned long)start, (unsigned long)sdem_addr);
|
||||
}
|
||||
|
||||
break;
|
||||
/* set the new DMA values */
|
||||
DSP_(_sdem_addrl) = sdem_addr & 0xffff;
|
||||
DSP_(_sdem_addrh) = sdem_addr >> 16;
|
||||
DSP_(_sdem_dsp_size) = size;
|
||||
|
||||
DEBUGF("pcm_sdram at 0x%08lx, sdem_addr 0x%08lx",
|
||||
(unsigned long)start, (unsigned long)sdem_addr);
|
||||
}
|
||||
|
||||
break;
|
||||
default:
|
||||
DEBUGF("DSP: unknown msg 0x%04x", dsp_message.msg);
|
||||
break;
|
||||
DEBUGF("DSP: unknown msg 0x%04x", dsp_message.msg);
|
||||
break;
|
||||
}
|
||||
|
||||
/* Re-Activate the channel */
|
||||
|
|
|
@ -10,22 +10,22 @@ int main(int argc, char *argv[])
|
|||
|
||||
if(f)
|
||||
{
|
||||
if(fread(buf, 1, 128000, f) < 128000)
|
||||
{
|
||||
fprintf(stderr, "FAN!\n");
|
||||
exit(1);
|
||||
}
|
||||
if(fread(buf, 1, 128000, f) < 128000)
|
||||
{
|
||||
fprintf(stderr, "FAN!\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
printf("int mp3datalen = 128000;\n");
|
||||
printf("unsigned char mp3data[128000] =\n{");
|
||||
for(i = 0;i < 128000;i++)
|
||||
{
|
||||
if(i % 8 == 0)
|
||||
{
|
||||
printf("\n");
|
||||
}
|
||||
printf("0x%02x, ", buf[i]);
|
||||
}
|
||||
printf("};\n");
|
||||
printf("int mp3datalen = 128000;\n");
|
||||
printf("unsigned char mp3data[128000] =\n{");
|
||||
for(i = 0;i < 128000;i++)
|
||||
{
|
||||
if(i % 8 == 0)
|
||||
{
|
||||
printf("\n");
|
||||
}
|
||||
printf("0x%02x, ", buf[i]);
|
||||
}
|
||||
printf("};\n");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -41,46 +41,46 @@ struct usb_class_driver {
|
|||
/* Tells the driver what its first interface number will be. The driver
|
||||
returns the number of the first available interface for the next driver
|
||||
(i.e. a driver with one interface will return interface+1)
|
||||
A driver must have at least one interface
|
||||
Mandatory function */
|
||||
A driver must have at least one interface
|
||||
Mandatory function */
|
||||
int (*set_first_interface)(int interface);
|
||||
|
||||
/* Asks the driver to put the interface descriptor and all other
|
||||
needed descriptor for this driver at dest.
|
||||
Returns the number of bytes taken by these descriptors.
|
||||
Mandatory function */
|
||||
Mandatory function */
|
||||
int (*get_config_descriptor)(unsigned char *dest, int max_packet_size);
|
||||
|
||||
/* Tells the driver that a usb connection has been set up and is now
|
||||
ready to use.
|
||||
Optional function */
|
||||
Optional function */
|
||||
void (*init_connection)(void);
|
||||
|
||||
/* Initialises the driver. This can be called multiple times,
|
||||
and should not perform any action that can disturb other threads
|
||||
(like getting the audio buffer)
|
||||
Optional function */
|
||||
Optional function */
|
||||
void (*init)(void);
|
||||
|
||||
/* Tells the driver that the usb connection is no longer active
|
||||
Optional function */
|
||||
Optional function */
|
||||
void (*disconnect)(void);
|
||||
|
||||
/* Tells the driver that a usb transfer has been completed. Note that "dir"
|
||||
is relative to the host
|
||||
Optional function */
|
||||
Optional function */
|
||||
void (*transfer_complete)(int ep,int dir, int status, int length);
|
||||
|
||||
/* Tells the driver that a control request has come in. If the driver is
|
||||
able to handle it, it should ack the request, and return true. Otherwise
|
||||
it should return false.
|
||||
Optional function */
|
||||
Optional function */
|
||||
bool (*control_request)(struct usb_ctrlrequest* req, unsigned char *dest);
|
||||
|
||||
#ifdef HAVE_HOTSWAP
|
||||
/* Tells the driver that a hotswappable disk/card was inserted or
|
||||
extracted
|
||||
Optional function */
|
||||
Optional function */
|
||||
void (*notify_hotswap)(int volume, bool inserted);
|
||||
#endif
|
||||
};
|
||||
|
|
|
@ -71,7 +71,7 @@
|
|||
#define USB_BULK_RESET_REQUEST 0xff
|
||||
#define USB_BULK_GET_MAX_LUN 0xfe
|
||||
|
||||
#define DIRECT_ACCESS_DEVICE 0x00 /* disks */
|
||||
#define DIRECT_ACCESS_DEVICE 0x00 /* disks */
|
||||
#define DEVICE_REMOVABLE 0x80
|
||||
|
||||
#define CBW_SIGNATURE 0x43425355
|
||||
|
|
Loading…
Reference in New Issue
Block a user