Slight hack for Sony DoP mode - uses global dsdMode to output DoP idle on undeflow. NOT FOR GENERAL RELEASE

This commit is contained in:
Ross Owen
2013-09-05 23:22:00 +01:00
parent 4651dcf71f
commit d0479dd92a

View File

@@ -27,7 +27,6 @@
#ifdef HID_CONTROLS #ifdef HID_CONTROLS
#include "user_hid.h" #include "user_hid.h"
#endif #endif
#define MAX(x,y) ((x)>(y) ? (x) : (y)) #define MAX(x,y) ((x)>(y) ? (x) : (y))
#define CLASS_TWO_PACKET_SIZE ((((MAX_FREQ+7999)/8000))+3) #define CLASS_TWO_PACKET_SIZE ((((MAX_FREQ+7999)/8000))+3)
@@ -262,7 +261,13 @@ void handle_audio_request(chanend c_mix_out)
for(int i = 0; i < NUM_USB_CHAN_OUT; i++) for(int i = 0; i < NUM_USB_CHAN_OUT; i++)
{ {
unsigned sample; unsigned sample;
unsigned mode;
GET_SHARED_GLOBAL(sample, g_muteSample); GET_SHARED_GLOBAL(sample, g_muteSample);
GET_SHARED_GLOBAL(mode, dsdMode);
if(mode == DSD_MODE_DOP)
outuint(c_mix_out, 0xFA696969);
else
outuint(c_mix_out, sample); outuint(c_mix_out, sample);
} }
@@ -274,9 +279,11 @@ void handle_audio_request(chanend c_mix_out)
} }
/* If we have a decent number of samples, come out of underflow cond */ /* If we have a decent number of samples, come out of underflow cond */
if (outSamps >= (OUT_BUFFER_PREFILL)) if(outSamps >= (OUT_BUFFER_PREFILL))
{ {
outUnderflow = 0; outUnderflow = 0;
outSamps++;
} }
} }
else else
@@ -462,11 +469,11 @@ void handle_audio_request(chanend c_mix_out)
} }
outUnderflow = (g_aud_from_host_rdptr == g_aud_from_host_wrptr); outUnderflow = (g_aud_from_host_rdptr == g_aud_from_host_wrptr);
if (!outUnderflow) if (!outUnderflow)
{ {
read_via_xc_ptr(aud_data_remaining_to_device, g_aud_from_host_rdptr); read_via_xc_ptr(aud_data_remaining_to_device, g_aud_from_host_rdptr);
unpackState = 0; unpackState = 0;
@@ -856,7 +863,7 @@ void decouple(chanend c_mix_out,
/* if we have enough space left then send a new buffer pointer /* if we have enough space left then send a new buffer pointer
* back to the buffer thread */ * back to the buffer thread */
space_left = aud_from_host_rdptr - aud_from_host_wrptr; space_left = aud_from_host_rdptr - aud_from_host_wrptr;
/* Mod and special case */ /* Mod and special case */
if(space_left <= 0 && g_aud_from_host_rdptr == aud_from_host_fifo_start) if(space_left <= 0 && g_aud_from_host_rdptr == aud_from_host_fifo_start)
{ {
@@ -872,6 +879,9 @@ void decouple(chanend c_mix_out,
{ {
/* Enter OUT over flow state */ /* Enter OUT over flow state */
outOverflow = 1; outOverflow = 1;
#ifdef DEBUG_LEDS #ifdef DEBUG_LEDS
led(c_led); led(c_led);
#endif #endif